home *** CD-ROM | disk | FTP | other *** search
/ ST-Computer Leser 2002 January / STC_CD_01_2002.iso / SCENE / IMATROLL / SRC / LOGO.S < prev    next >
Text File  |  2001-12-10  |  6KB  |  358 lines

  1.  
  2.  
  3.         section    text
  4. ;
  5. ; Fonts routine
  6. ;
  7. ; a1 = data pointer :
  8. ;    
  9. credits1:        move.w    #0,d0
  10.         move.w    #70,d1
  11.         move.w    #319,d2
  12.         move.w    #70,d3
  13.         move.w    #-1,d4
  14.         bsr    tc_line
  15.  
  16.         move.w    #0,d0
  17.         move.w    #170,d1
  18.         move.w    #319,d2
  19.         move.w    #170,d3
  20.         move.w    #-1,d4
  21.         bsr    tc_line
  22.  
  23.         move.l    screen_adr,a0    ; screen pointer
  24.  
  25.         lea    creditstext1,a1
  26.         bsr    display_text
  27.         
  28.         move.l    screen_adr,a0
  29.         lea    creditstext2,a1
  30.         bsr    display_text
  31.         
  32.         move.l    screen_adr,a0
  33.         lea    creditstext3,a1
  34.         bsr    display_text
  35.         rts
  36. ;
  37. ;
  38. ;
  39.  
  40. credits2:        move.w    #0,d0
  41.         move.w    #86,d1
  42.         move.w    #319,d2
  43.         move.w    #86,d3
  44.         move.w    #-1,d4
  45.         bsr    tc_line
  46.  
  47.         move.w    #0,d0
  48.         move.w    #154,d1
  49.         move.w    #319,d2
  50.         move.w    #154,d3
  51.         move.w    #-1,d4
  52.         bsr    tc_line
  53.  
  54.         move.l    screen_adr,a0    ; screen pointer
  55.  
  56.         lea    creditstext4,a1
  57.         bsr    display_text
  58.         
  59.         move.l    screen_adr,a0
  60.         lea    creditstext5,a1
  61.         bsr    display_text
  62.         
  63.         rts
  64. ;
  65. ;
  66. ;
  67.  
  68. credits3:        move.w    #0,d0
  69.         move.w    #70,d1
  70.         move.w    #319,d2
  71.         move.w    #70,d3
  72.         move.w    #-1,d4
  73.         bsr    tc_line
  74.  
  75.         move.w    #0,d0
  76.         move.w    #170,d1
  77.         move.w    #319,d2
  78.         move.w    #170,d3
  79.         move.w    #-1,d4
  80.         bsr    tc_line
  81.  
  82.         move.l    screen_adr,a0    ; screen pointer
  83.  
  84.         lea    creditstext6,a1
  85.         bsr    display_text
  86.         
  87.         move.l    screen_adr,a0
  88.         lea    creditstext7,a1
  89.         bsr    display_text
  90.         
  91.         move.l    screen_adr,a0
  92.         lea    creditstext8,a1
  93.         bsr    display_text
  94.  
  95.         rts
  96. ;
  97. ;
  98. ;
  99.  
  100. credits4:        move.w    #0,d0
  101.         move.w    #54,d1
  102.         move.w    #319,d2
  103.         move.w    #54,d3
  104.         move.w    #-1,d4
  105.         bsr    tc_line
  106.  
  107.         move.w    #0,d0
  108.         move.w    #186,d1
  109.         move.w    #319,d2
  110.         move.w    #186,d3
  111.         move.w    #-1,d4
  112.         bsr    tc_line
  113.  
  114.         move.l    screen_adr,a0    ; screen pointer
  115.  
  116.         lea    creditstext9,a1
  117.         bsr    display_text
  118.         
  119.         move.l    screen_adr,a0
  120.         lea    creditstext10,a1
  121.         bsr    display_text
  122.         
  123.         move.l    screen_adr,a0
  124.         lea    creditstext11,a1
  125.         bsr    display_text
  126.  
  127.         move.l    screen_adr,a0
  128.         lea    creditstext12,a1
  129.         bsr    display_text
  130.  
  131.         rts
  132. ;
  133. ;
  134. ;
  135. endtext:        move.w    #0,d0
  136.         move.w    #86,d1
  137.         move.w    #319,d2
  138.         move.w    #86,d3
  139.         move.w    #-1,d4
  140.         bsr    tc_line
  141.  
  142.         move.w    #0,d0
  143.         move.w    #154,d1
  144.         move.w    #319,d2
  145.         move.w    #154,d3
  146.         move.w    #-1,d4
  147.         bsr    tc_line
  148.  
  149.         move.l    screen_adr,a0    ; screen pointer
  150.  
  151.         lea    endtext1,a1
  152.         bsr    display_text
  153.         
  154.         move.l    screen_adr,a0
  155.         lea    endtext2,a1
  156.         bsr    display_text
  157.         
  158.         rts
  159. ;
  160. ;
  161. ;
  162. intro_text:        move.w    #0,d0
  163.         move.w    #70,d1
  164.         move.w    #319,d2
  165.         move.w    #70,d3
  166.         move.w    #-1,d4
  167.         bsr    tc_line
  168.  
  169.         move.w    #0,d0
  170.         move.w    #170,d1
  171.         move.w    #319,d2
  172.         move.w    #170,d3
  173.         move.w    #-1,d4
  174.         bsr    tc_line
  175.  
  176.         move.l    screen_adr,a0    ; screen pointer
  177.  
  178.         lea    introtext1,a1
  179.         bsr    display_text
  180.         
  181.         move.l    screen_adr,a0
  182.         lea    introtext2,a1
  183.         bsr    display_text
  184.         
  185.         move.l    screen_adr,a0
  186.         lea    introtext3,a1
  187.         bsr    display_text
  188.         rts
  189. ;
  190. ; display routine
  191. ; a0 = screen buffer
  192. ; a1 = text data (x:w,y:w,nb chars-1:w,{text:b})
  193. ;
  194. display_text:    move.w    (a1)+,d0        ; x offset
  195.         move.w    (a1)+,d1        ; y offset
  196.         mulu.w    #320,d1
  197.         add.w    d0,d1        ; save d1 for future offset
  198.         lea    (a0,d1.l*2),a0    ; set start offset        
  199.  
  200.         move.w    (a1)+,d2        ; get textsize    
  201.     
  202. .textsizeloop:    lea    fonts+20,a2
  203.         moveq.w    #0,d0        ; erase d0
  204.         move.b    (a1)+,d0        ; get d2th character
  205.  
  206.         subi.b    #65,d0        ; pos(A)=Asc(A)-65 as Asc(A)=65    
  207.  
  208.         ext.w    d0
  209.         move.w    #10,d1
  210.  
  211.         cmp.w    d1,d0
  212.         blt.w    .nextStep        ; first 10 chars row
  213.         
  214.         sub.w    d1,d0
  215.         lea    640*28(a2),a2    
  216.     
  217.         cmp.w    d1,d0
  218.         blt.w    .nextStep        ; second 10 chars row
  219.  
  220.         sub.w    d1,d0
  221.         lea    640*28(a2),a2    ; third 7 chars row    
  222.  
  223. .nextStep:        lsl.w    #6,d0        ; = mulu.w #64,d0 -> d0=d0*64
  224.         ext.l    d0
  225.         lea    (a2,d0.l),a2    ; set a char position
  226.     
  227. .nextStep2:        move.w    #31,d3        ; each char = 32 pixels height
  228.         moveq.l    #0,d4        
  229.  
  230. .drawChar:        
  231.         rept    16
  232.         move.l    (a2,d4.l*2),(a0,d4.l*2)    ; copy 16 longwords = 32 pixels
  233.         addq.l    #2,d4
  234.         endr
  235.         
  236.         add.l    #288,d4        ; d4=counter*320 (counter from 0 to 31)
  237.                 
  238.         dbra    d3,.drawChar
  239.  
  240.         lea    64(a0),a0
  241.  
  242.         dbra    d2,.textsizeloop        
  243.  
  244.         rts
  245.  
  246. ; -------------------------------------------------------------------
  247. ;
  248. ; routine 'copy_logo1'
  249. ; Display the first logo to the screen
  250. ;
  251. ; -------------------------------------------------------------------
  252.  
  253. copy_logo1:        lea.l    logo1+20,a1        ;(apex hicol block)
  254.         move.w    #320*192*2/64-1,sizelogo
  255.         bra    copy_logo
  256.  
  257.  
  258.  
  259. ; -------------------------------------------------------------------
  260. ;
  261. ; internal routine 'copy_logo'
  262. ; Display the given logo to the screen
  263. ;
  264. ; ------------------------------------------------------------------
  265.  
  266. copy_logo:
  267.  
  268.         move.l    screen_adr,a0
  269.         adda.l    #640*27,a0    
  270.         move.w    sizelogo,d7
  271. .loop:
  272.         rept    16
  273.         move.l    (a1)+,(a0)+
  274.         endr
  275.  
  276.         dbra    d7,.loop
  277.         rts
  278.  
  279. ; -------------------------------------------------------------------
  280. ;
  281. ; BSS Section : variables to initialise
  282. ;
  283. ; -------------------------------------------------------------------
  284.         
  285.         section    bss
  286.  
  287. sizelogo:        ds.w    1
  288.  
  289. ; -------------------------------------------------------------------
  290. ;
  291. ; Data Section : constant data
  292. ;
  293. ; -------------------------------------------------------------------
  294.         
  295.         section    data
  296.  
  297. logo1:        incbin    'incbin\logo.apx'
  298. fonts:        incbin    'incbin\fonts32.apx'
  299. bool_init:        dc.w    1
  300. introtext1:        dc.w    80,72,4
  301.         dc.b    "TROLL",0
  302.         EVEN
  303. introtext2:        dc.w    64,104,5
  304.         dc.b    "AND",94,"CO",0
  305.         EVEN
  306. introtext3:        dc.w    48,136,6
  307.         dc.b    "PRESENT",0    
  308.         EVEN
  309.  
  310. creditstext1:    dc.w    96,72,3
  311.         dc.b    "CODE",0
  312.         EVEN
  313. creditstext2:    dc.w    48,104,6    
  314.         dc.b    "MATT",94,"US",0
  315.         EVEN
  316. creditstext3:    dc.w    96,136,3
  317.         dc.b    "ALEM",0    
  318.         EVEN
  319.  
  320. creditstext4:    dc.w    80,88,4
  321.         dc.b    "MUSIC",0
  322.         EVEN
  323. creditstext5:    dc.w    16,120,8    
  324.         dc.b    "FIVEOFIVE",0
  325.         EVEN
  326.  
  327. creditstext6:    dc.w    96,72,3
  328.         dc.b    "LOGO",0    
  329.         EVEN
  330. creditstext7:    dc.w    16,104,8
  331.         dc.b    "IDEA",94,"FROM",0
  332.         EVEN
  333. creditstext8:    dc.w    80,136,4    
  334.         dc.b    "UKONX",0
  335.         EVEN
  336.  
  337. creditstext9:    dc.w    32,56,7
  338.         dc.b    "THANX",94,"TO",0    
  339.         EVEN
  340. creditstext10:    dc.w    112,88,2
  341.         dc.b    "RAY",0
  342.         EVEN
  343. creditstext11:    dc.w    48,120,6    
  344.         dc.b    "ZERKMAN",0
  345.         EVEN
  346. creditstext12:    dc.w    112,152,2
  347.         dc.b    "SOS",0    
  348.         EVEN
  349.  
  350. endtext1:    dc.w    0,88,9
  351.         dc.b    "THAT",93,"S",94,"ALL",0
  352.         EVEN
  353. endtext2:    dc.w    48,120,6
  354.         dc.b    "FOLKS",94,91,0
  355.         EVEN
  356.  
  357.  
  358.         section    text