home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Assembler / dse-src6.dms / in.adf / BOUNCHSRCS.LZH / FIREWORKS.S < prev    next >
Encoding:
Text File  |  1989-10-02  |  12.7 KB  |  802 lines

  1. ;    opt     l-,c+,d-
  2.  
  3.     output    fireworks
  4.  
  5. _LVOAllocMem    EQU    -198         * exec library
  6. _LVOFreeMem    EQU    -210 
  7. _LVOOpenLibrary    EQU    -552 
  8. _LVOCloseLibrary    EQU    -414
  9.  
  10. _LVOLoadRGB4    EQU    -192         * graphics library
  11. _LVOMove        EQU    -240 
  12. _LVODraw        EQU    -246 
  13. _LVOSetAPen    EQU    -342 
  14. _LVOWritePixel    EQU    -324
  15.  
  16. _LVOOutput    EQU    -60 
  17. _LVOWrite        EQU    -48         * DOS library
  18. _LVODelay        EQU    -198 
  19. _LVODateStamp    EQU    -192
  20.  
  21. _LVOCloseScreen    EQU    -66         * intuition
  22. _LVOOpenScreen    EQU    -198 
  23.  
  24. _LVOFindTask    EQU    -$126
  25. _LVOGetMsg    EQU    -$174
  26. _LVOReplyMsg    EQU    -$17a
  27. _LVOForbid    EQU    -$84
  28. _LVOWaitPort    EQU    -$180
  29.  
  30. _SysBase    EQU    4
  31.  
  32. pr_MsgPort    EQU    $5c
  33. pr_CLI        EQU    $ac
  34.  
  35.  
  36.  
  37. CALLEXEC    MACRO
  38.     move.l    (_SysBase).w,a6
  39.     jsr    _LVO\1(a6)
  40.     ENDM
  41. CALLGRAF    MACRO
  42.     move.l    _GfxBase,a6
  43.     jsr    _LVO\1(a6)
  44.     ENDM
  45. CALLDOS    MACRO
  46.     move.l    _DOSBase,a6
  47.     jsr    _LVO\1(a6)
  48.     ENDM
  49. CALLINT    MACRO
  50.     move.l    _IntuitionBase,a6
  51.     jsr    _LVO\1(a6)
  52.     ENDM
  53.  
  54.  
  55. start
  56.     sub.l    a1,a1        * a1=NULL hence current task
  57.     CALLEXEC FindTask        * Where's our process struct?
  58.     move.l    d0,a4        * in a4 so we can index off it
  59.  
  60.     tst.l    pr_CLI(a4)    * Have we come from the CLI??
  61.     bne.s    setup
  62.  
  63.     lea    pr_MsgPort(a4),a0    * The Hit it! message
  64.     move.l    a0,a3        * save the pointer
  65.     CALLEXEC WaitPort
  66.     move.l    a3,a0        * restore pointer
  67.     CALLEXEC GetMsg        * get the message
  68.     move.l    d0,wbmsg        * and save the pointer to it..
  69.  
  70.  
  71. setup    moveq    #0,d0        
  72.     lea    intname,a1    
  73.     CALLEXEC OpenLibrary    * open intuition
  74.     move.l    d0,_IntuitionBase
  75.     beq    fin
  76.     moveq    #0,d0
  77.     lea    grafname,a1
  78.     CALLEXEC OpenLibrary    * open graphics
  79.     move.l    d0,_GfxBase
  80.     beq    panic
  81.     moveq    #0,d0
  82.     lea    dosname,a1
  83.     CALLEXEC OpenLibrary    * open DOS
  84.     move.l    d0,_DOSBase
  85.     beq    panic
  86.  
  87.     tst.l    pr_CLI(a4)    * If there's no CLI, then we
  88.     beq.s    screen        * can't Write to it..
  89.  
  90.     CALLDOS    Output        
  91.     move.l    d0,ohandle    * get output handle
  92.  
  93. screen    lea    NScr,a0
  94.     CALLINT    OpenScreen    * make ourselves a screen
  95.     move.l    d0,scr
  96.     move.l    d0,d1
  97.     beq    scrpanic
  98.     add.l    #$54,d1        * sc_RastPort
  99.     move.l    d1,rastp
  100.     add.l    #$2c,d0        * sc_ViewPort
  101.     move.l    d0,viewp    
  102.  
  103.     tst.l    pr_CLI(a4)    * test CLI again
  104.     beq.s    cmap
  105.  
  106.     move.l    ohandle,d1    * Print the welcome massage
  107.     move.l    #stmess,d2
  108.     move.l    #stmesslen,d3
  109.     CALLDOS    Write
  110.  
  111.  
  112. cmap    move.l    viewp,a0        * setup our own personal pallete
  113.     lea    colmap,a1
  114.     move.w    #32,d0
  115.     CALLGRAF LoadRGB4
  116.  
  117. variables
  118.     move.l    #date,d1        * use date to setup random seed
  119.     CALLDOS    DateStamp
  120.     
  121.     lea    date,a0
  122.     move.w    10(a0),d2
  123.     swap    d2
  124.     move.w    6(a0),d2
  125.     move.l    d2,rndseed
  126.  
  127.     clr.w    numactive        * initialise variables
  128.     clr.w    wait
  129.     clr.w    blocksfull
  130.  
  131.     move.w    #numlines,d0    * loop to clear firework blocks
  132.     lea    data,a2
  133. clearloop
  134.     clr.l    (a2)+
  135.     clr.l    (a2)+
  136.     clr.l    (a2)+
  137.     clr.l    (a2)+
  138.     dbra    d0,clearloop
  139.  
  140. Outsideloop
  141.     move.w    wait,d0        * check wait counter
  142.     bne.s    nonewones        
  143.  
  144.     cmp.w    #minnum,numactive    * check number of fireworks 
  145.     bgt.s    noneed
  146.     
  147.     bsr    makefirework
  148.     move.w    #25,d0        * reset wait between creation
  149. nonewones
  150.     subq.w    #1,d0
  151.     move.w    d0,wait        * decrement wait counter
  152. noneed
  153.     move.w    blocksfull,d0    * number of full blocks
  154.     lsr.w    #4,d0
  155.     cmp.w    #2,d0
  156.     bge.s    dontwaitup    * determines value to use 
  157.     
  158.     moveq    #2,d6
  159.     sub.w    d0,d6
  160.     bsr    delay        * for dos delay
  161. dontwaitup
  162.     lea    data,a2        * loop through 
  163.     move.w    #numlines,d4    * number of blocks
  164. innerloop
  165.     moveq    #0,d2        * clear d2
  166.     move.b    colr(a2),d2    
  167.     beq.s    next1        * if zero, empty block
  168.     
  169.     cmp.w    #groundval+20,Ypos(a2)
  170.     ble.s    leaveit        * check against ground
  171.  
  172.     bsr    removeit        * if below ground remove
  173.     bra.s    next1
  174. leaveit
  175.     rol.b    #3,d2        * move type into lower three bits
  176.     and.b    #7,d2        *
  177.  
  178.     add.w    d2,d2
  179.     add.w    d2,d2
  180.     lea    firejumptab,a0
  181.     move.l    (a0,d2.w),a3
  182.  
  183.     movem.l    d4/a2,-(sp)
  184.     jsr    (a3)
  185.     movem.l    (sp)+,a2/d4
  186.  
  187.     bsr    procpoint
  188. next1
  189.     lea    ppsize(a2),a2
  190.     dbra    d4,innerloop
  191. next2
  192.     btst    #6,$bfe001
  193.     beq.s    end
  194.     bra    outsideloop
  195.  
  196. end    move.l    scr,a0
  197.     CALLINT    CloseScreen
  198. panic
  199.     move.l    _GfxBase,d1
  200.     beq.s    panic1
  201.     move.l    d1,a1
  202.     CALLEXEC CloseLibrary
  203. panic1    move.l    _IntuitionBase,d1
  204.     beq.s    panic2
  205.     move.l    d1,a1
  206.     CALLEXEC CloseLibrary
  207. panic2    move.l    _DOSBase,d1
  208.     beq.s    fin
  209.     move.l    d1,a1
  210.     CALLEXEC CloseLibrary
  211.  
  212. fin    tst.l    wbmsg            * If we came from workbench,
  213.     beq.s    epilog
  214.  
  215.     CALLEXEC Forbid            * Then clean up.
  216.     move.l    wbmsg(pc),a1
  217.     CALLEXEC ReplyMsg        * dispose of the message
  218.  
  219. epilog    rts
  220.  
  221.  
  222. scrpanic
  223.     tst.l    pr_CLI(a4)
  224.     beq.s    panic
  225.  
  226.     move.l    ohandle,d1
  227.     move.l    #scrmess,d2
  228.     move.l    #scrmesslen,d3
  229.     CALLDOS Write
  230.     bra.s    panic
  231.  
  232.  
  233. ***
  234. *** Subroutines:
  235. *** 
  236. getblock
  237.     lea    data,a2
  238.     move.w    #numlines,d0
  239. blockloop
  240.     move.b    colr(a2),d1
  241.     beq.s    gotblock
  242.     lea    ppsize(a2),a2
  243.     dbra    d0,blockloop
  244.     moveq    #0,d0
  245.     rts
  246. gotblock    
  247.     addq.w    #1,blocksfull
  248.     moveq    #-1,d0
  249.     rts
  250.  
  251. firejumptab
  252.     dc.l    help        ;0 firework zero, an error
  253.     dc.l    rocket1        ;1 single boom rocket
  254.     dc.l    rocket2        ;2 double boom rocket
  255.     dc.l    romancandle    ;3 three straight up red,green,blue
  256.     dc.l    traficlight    ;4 sparks in all colours
  257.     dc.l    spark1        ;5 spark, last generation
  258.     dc.l    spark2        ;6 spark, nearly last generation
  259.     dc.l    help        ;7 firework seven, an error
  260.  
  261. help
  262.     rts
  263. romancandle
  264.     addq.b    #1,time(a2)
  265.     move.l    a2,a3
  266.     move.b    time(a2),d0
  267.     cmp.b    #32,d0
  268.     beq.s    done1
  269.  
  270.     move.w    #0,colour
  271.  
  272.     and.b    #%00000111,d0
  273.     bne.s    notnowdear
  274.  
  275.     bsr    getblock
  276.     beq.s    done1
  277.     bsr    makerocket2
  278.     move.w    #0,Xvel(a2)
  279.     move.w    Xpos(a3),Xpos(a2)
  280.     move.w    lXpos(a3),lXpos(a2)
  281.  
  282.     moveq    #0,d0
  283.     move.b    time(a3),d0
  284.     asl.w    #1,d0
  285.     sub.w    #groundval-50,d0
  286.     move.w    d0,Yvel(a2)    
  287.     
  288.     move.b    time(a3),d0
  289.     and.b    #%00011000,d0
  290.     and.b    #%11100000,colr(a2)
  291.     or.b    d0,colr(a2)
  292.     move.l    a3,a2
  293. notnowdear
  294.     rts
  295. done1
  296.     move.l    a3,a2
  297.     bsr    removeit
  298.     rts
  299.  
  300. traficlight
  301.     rts
  302.  
  303. rocket1
  304.     moveq    #0,d0
  305.     move.b    Yacc(a2),d0
  306.     beq.s    sparkloop1
  307.  
  308.     moveq    #0,d0
  309.     move.b    colr(a2),d0
  310.     and.w    #%00011111,d0
  311.     move.w    d0,colour
  312.  
  313.     cmp.w    #24,Yvel(a2)
  314.     bgt.s    bang1
  315.     rts
  316. bang1    
  317.     move.b    #0,Yacc(a2)
  318.     move.w    #0,Xvel(a2)
  319.     move.w    #4,Yvel(a2)
  320.     move.w    #31,d1
  321.     bsr    rnd
  322.     move.b    d0,time(a2)    
  323. sparkloop1
  324.     move.l    a2,a3
  325.     bsr    getblock
  326.     beq.s    noneleft
  327.     bsr    makespark1
  328.  
  329.     bsr    getblock
  330.     beq.s    noneleft
  331.     bsr    makespark1
  332.  
  333.     subq.b    #3,time(a3)
  334.     bmi.s    noneleft
  335.  
  336.     move.l    a3,a2
  337.     move.w    #0,colour
  338.     rts
  339. noneleft
  340.     move.l    a3,a2
  341.     bsr    removeit
  342.     move.w    #0,colour
  343.     rts
  344.  
  345. rocket2
  346.     move.w    Yvel(a2),d0
  347.     bpl.s    stop2
  348.  
  349.     moveq    #0,d0
  350. ;    move.w    d0,Xvel(a2)
  351.     move.b    colr(a2),d0
  352.     and.w    #%00011111,d0
  353.     move.w    d0,colour
  354.  
  355.     move.b    time(a2),d0
  356.     beq.s    makeone
  357.     rts
  358. makeone
  359.     move.l    a2,a3
  360.     bsr    getblock
  361.     beq.s    stop2
  362.     bsr    makespark1
  363.     move.w    Yvel(a3),d0
  364.     sub.w    d0,Yvel(a2)
  365.     move.w    Xvel(a3),d0
  366.     sub.w    d0,Xvel(a2)
  367.     or.b    #1,colr(a2)
  368.     move.l    a3,a2
  369.     rts
  370. stop2
  371.     bsr    removeit
  372.     rts
  373.  
  374.  
  375. spark1
  376.     subq.b    #1,time(a2)
  377.     bpl.s    nochange1
  378.  
  379.     move.b    #4,time(a2)
  380.  
  381.     move.b    colr(a2),d0
  382.     addq.b    #1,d0
  383.     and.b    #%00000111,d0
  384.     beq.s    dieout1
  385.     and.b    #%11111000,colr(a2)
  386.     or.b    d0,colr(a2)
  387. nochange1
  388.     moveq    #0,d0
  389.     move.b    colr(a2),d0
  390.     and.b    #%00011111,d0
  391.     move.w    d0,colour
  392.     rts
  393. dieout1
  394.     bsr    removeit
  395.     rts
  396. spark2
  397.     rts
  398.  
  399.  
  400. makefirework
  401.     bsr    getblock
  402.     beq.s    dontmake
  403.  
  404.     move.w    #127,d1
  405.     bsr    rnd
  406.     lsr.w    #4,d0
  407.  
  408.     add.w    d0,d0
  409.     add.w    d0,d0
  410.     lea    makejumptab,a0
  411.     move.l    (a0,d0.w),a0
  412.     jmp    (a0)
  413. dontmake
  414.     rts
  415.  
  416. makejumptab
  417.     dc.l    makerocket1    ;1 single boom rocket
  418.     dc.l    makerocket2    ;2 double boom rocket
  419.     dc.l    makeromancandle    ;3 single boom rocket
  420.     dc.l    makerocket2    ;4 double boom rocket
  421.     dc.l    makerocket1    ;5 single boom rocket
  422.     dc.l    makeromancandle    ;6 double boom rocket
  423.     dc.l    makerocket1    ;7 single boom rocket
  424.     dc.l    makerocket2    ;8 double boom rocket
  425.  
  426. makeromancandle
  427.     addq.w    #1,numactive
  428.     move.b    #%01100000,colr(a2)
  429.     move.w    #groundval,Ypos(a2)
  430.     move.w    #groundval,lYpos(a2)
  431.     move.w    #120,d1
  432.     bsr    rnd
  433.     add.w    #100,d0
  434.     move.w    d0,Xpos(a2)
  435.     move.w    d0,lXpos(a2)
  436.  
  437.     move.w    #0,Yvel(a2)
  438.     move.w    #0,Xvel(a2)
  439.     rts
  440.  
  441. maketraficlight
  442.     rts
  443.  
  444. makespark1
  445.     move.b    #%10100000,colr(a2)
  446.     bra    makespark
  447. makespark2
  448.     move.b    #%11000000,colr(a2)
  449. makespark
  450.     move.b    (a3),d0
  451.     and.b    #%00011000,d0
  452.     or.b    d0,colr(a2)
  453.  
  454.     move.w    Xpos(a3),Xpos(a2)
  455.     move.w    Xpos(a3),lXpos(a2)
  456.     move.w    Ypos(a3),Ypos(a2)
  457.     move.w    Ypos(a3),lYpos(a2)
  458.  
  459.     move.w    #80,d1
  460.     bsr    rnd
  461.     sub.w    #40,d0
  462. ;    add.w    Yvel(a3),d0
  463.     move.w    d0,Yvel(a2)
  464.  
  465.     move.w    #79,d1
  466.     bsr    rnd
  467.     sub.w    #40,d0
  468.     add.w    Xvel(a3),d0
  469.     move.w    d0,Xvel(a2)
  470.  
  471.     move.w    #32,d1
  472.     bsr    rnd
  473.     and.w    #$FF,d0
  474.     asr.b    #4,d0
  475.     addq.b    #1,d0
  476.     move.b    d0,Yacc(a2)
  477.  
  478.     move.b    #0,Xacc(a2)
  479.     move.w    #7,d1
  480.     bsr    rnd
  481.     move.b    d0,time(a2)
  482.     rts
  483.  
  484. makerocket1
  485.     move.b    #%00100000,colr(a2)
  486.     bra    makerocket
  487.  
  488. makerocket2
  489.     move.b    #%01000000,colr(a2)
  490.  
  491. makerocket
  492.     addq.w    #1,numactive
  493.     move.w    #groundval,Ypos(a2)
  494.     move.w    #groundval,lYpos(a2)
  495.  
  496.  
  497.     move.w    #120,d1
  498.     bsr    rnd
  499.     add.w    #100,d0
  500.     move.w    d0,Xpos(a2)
  501.     move.w    d0,lXpos(a2)
  502.  
  503.     move.w    #groundval/2,d1
  504.     bsr    rnd
  505.     add.w    #groundval/4,d0
  506.     neg.w    d0
  507.     move.w    d0,Yvel(a2)
  508.  
  509.     move.w    #200,d1
  510.     bsr    rnd
  511.     sub.w    #100,d0
  512.     asr.w    d0
  513.     move.w    d0,Xvel(a2)
  514.  
  515.     move.b    #0,Xacc(a2)
  516.     move.b    #6,Yacc(a2)
  517.  
  518.  
  519.     move.w    #3,d1
  520.     bsr    rnd
  521.     and.w    #$ff,d0
  522.     addq.b    #1,d0
  523.     lsl.b    #3,d0
  524.     or.b    d0,colr(a2)
  525.     rts
  526.  
  527. removeit
  528.     subq.w    #1,blocksfull
  529.     move.b    colr(a2),d0
  530.     and.b    #%11100000,d0
  531.  
  532.     cmp.b    #%10100000,d0
  533.     beq.s    killit
  534.  
  535.     cmp.b    #%11000000,d0
  536.     beq.s    killit
  537.  
  538.     subq.w    #1,numactive
  539. killit
  540.     move.l    rastp,a1        * undraw last line
  541.     move.l    #0,d0
  542.     CALLGRAF SetAPen
  543.  
  544.     move.w    lxpos(a2),d0        * move cursor to point b4 last 
  545.     move.w    lypos(a2),d1
  546.     move.w    xpos(a2),d2
  547.     move.w    ypos(a2),d3
  548.     
  549.     clr.l    (a2)
  550.     clr.l    4(a2)
  551.     clr.l    8(a2)
  552.     clr.l    12(a2)
  553.     bra    drawc
  554.     rts
  555.  
  556.     
  557. ** procpoint: draws and updates a point
  558. ** On entry: a2 point to the data block of the point
  559.  
  560. procpoint
  561.     move.l    rastp,a1        * undraw last line
  562.     move.l    #0,d0
  563.     CALLGRAF SetAPen
  564.  
  565.     move.w    lxpos(a2),d0        * move cursor to point b4 last 
  566.     move.w    lypos(a2),d1
  567.     move.w    xpos(a2),d2
  568.     move.w    ypos(a2),d3
  569.  
  570.     move.w    d2,lxpos(a2)        * update last x & y posns
  571.     move.w    d3,lypos(a2)
  572.  
  573.     bsr    drawc
  574.     move.l    rastp,a1        * draw new line
  575.     move.w    colour,d0
  576.     CALLGRAF    SetAPen
  577.     
  578.     moveq    #0,d0
  579.     moveq    #0,d1
  580.     move.b    xacc(a2),d0        * update vels from accelerations
  581.     move.b    yacc(a2),d1
  582.     add.w    xvel(a2),d0        * get velocoties
  583.     add.w    yvel(a2),d1
  584.     move.w    d0,xvel(a2)        * save velocoties
  585.     move.w    d1,yvel(a2)
  586.     asr.w    #4,d0
  587.     asr.w    #4,d1
  588.     add.w    d2,d0            * move point with new vels
  589.     add.w    d3,d1
  590.     move.w    d0,xpos(a2)        * save point
  591.     move.w    d1,ypos(a2)
  592.     exg.l    d0,d2            } here so both line & anti-line
  593.     exg.l    d1,d3            } go in same direction
  594.  
  595.     bsr    drawc
  596.     rts
  597.  
  598. rnd    moveq    #32,d0        * Returns rnd number in d0 between 0 and d1
  599. rnd32lp    move.b    rndseed+2,d6    * Trashes d6,d7
  600.     move.b    rndseed+4,d7    
  601.     lsr.b    #3,d6
  602.     eor.b    d6,d7
  603.     roxr.b    #1,d7
  604.     roxl.w    rndseed
  605.     roxl.w    rndseed+2
  606.     roxl.w    rndseed+4
  607.     dbra    d0,rnd32lp
  608.     move.l    rndseed,d0
  609.     mulu    d1,d0
  610.     lsr.l    #8,d0
  611.     lsr.l    #8,d0
  612.     rts
  613.  
  614.  
  615. * Delays for d6 ticks (50ths)
  616. *
  617.  
  618. delay    movem.l    d0/a6,-(a7)
  619.     move.l    d6,d1
  620.     ext.l    d1
  621.     CALLDOS    Delay
  622.     movem.l    (a7)+,d0/a6
  623.     rts
  624.  
  625. * draws the line (d0,d1)-(d2,d3) if all the line is onscreen
  626.  
  627. drawcfail    rts
  628.  
  629. drawc    tst.w    d0            * test all for -ve
  630.     bmi.s    drawcfail
  631.     cmp.w    #16,d1
  632.     blt.s    drawcfail
  633.     tst.w    d2
  634.     bmi.s    drawcfail
  635.     cmp.w    #16,d3
  636.     blt.s    drawcfail
  637.  
  638.     cmp.w    #xmax,d0        * test all for too much +ve
  639.     bgt.s    drawcfail
  640.     cmp.w    #xmax,d2
  641.     bgt.s    drawcfail
  642.     cmp.w    #ymax,d1
  643.     bgt.s    drawcfail
  644.     cmp.w    #ymax,d3
  645.     bgt.s    drawcfail
  646.     
  647.     btst    #7,colr(a2)
  648.     bne.s    dot
  649.  
  650.     move.l    rastp,a1        * move to 1st point
  651.     CALLGRAF Move
  652.  
  653.     move.w    d2,d0            * draw to 2nd point
  654.     move.w    d3,d1
  655.     move.l    rastp,a1
  656.     CALLGRAF Draw
  657.     rts
  658. dot
  659.     move.l    rastp,a1        * move to 1st point
  660.     CALLGRAF    WritePixel
  661.     rts
  662.  
  663. ******* Data ********
  664.  
  665. grafname    dc.b    "graphics.library",0
  666. intname    dc.b    "intuition.library",0
  667. dosname    dc.b    "dos.library",0
  668.  
  669. _GfxBase    DC.L    0
  670. _IntuitionBase    DC.L    0
  671. _DOSBase    dc.l    0
  672.  
  673. ohandle    ds.l    1
  674.  
  675. NScr    DC.W    0                LeftEdge
  676.     DC.W    0                TopEdge
  677.     DC.W    xmax                Width
  678.     DC.W    ymax                Height
  679.     DC.W    depth                Depth
  680.     DC.B    0                DetailPen
  681.     DC.B    1                BlockPen
  682.     DC.W    $0                ViewModes
  683.     DC.W    $000F                Type
  684.     DC.L    textattr            Font
  685.     DC.L    scname                DefaultTitle
  686.     DC.L    0                Gadgets
  687.     DC.L    0                 CustomBitMap
  688.  
  689.  
  690. textattr    DC.L    fname
  691.     DC.W    8
  692.     DC.B    0
  693.     DC.B    0
  694.  
  695. fname    DC.B    "topaz.font"
  696.     DC.W    0
  697.  
  698. scname    DC.B    "Fireworks - By Fuzzz & Euphoria"
  699.     DC.W    0
  700.  
  701. colmap    DC.W    $0000    ;0
  702.     DC.W    $0FFF    ;1
  703.     DC.W    $0F0f    ;2
  704.     DC.W    $0f0f    ;3
  705.     dc.w    $0f0f    ;4
  706.     dc.w    $0f0f    ;5
  707.     dc.w    $0f0f    ;6
  708.     dc.w    $0f0f    ;7
  709.  
  710.     dc.w    $0f00    ;8
  711.     dc.w    $0d00    ;9
  712.     dc.w    $0b00    ;a
  713.     dc.w    $0900    ;b
  714.     dc.w    $0800    ;d
  715.     dc.w    $0700    ;c
  716.     dc.w    $0600    ;e
  717.     dc.w    $0500    ;f
  718.     dc.w    $00f0    ;10
  719.     dc.w    $00d0    ;11
  720.     dc.w    $00b0    ;12
  721.     dc.w    $0090    ;13
  722.     dc.w    $0080    ;14
  723.     dc.w    $0070    ;15
  724.     dc.w    $0060    ;16
  725.     dc.w    $0050    ;17
  726.     dc.w    $008f    ;18
  727.     dc.w    $007e    ;19
  728.     dc.w    $006d    ;1a
  729.     dc.w    $005c    ;1b
  730.     dc.w    $004b    ;1c
  731.     dc.w    $003a    ;1d
  732.     dc.w    $0039    ;1e
  733.     dc.w    $0038    ;1f
  734.  
  735. scr    DC.L    0                Screen Pointers
  736. rastp    DC.L    0
  737. viewp    DC.L    0
  738. colour
  739.     dc.w    0    
  740. StoreXpos
  741.     dc.w    0
  742. numactive
  743.     dc.w    0
  744. blocksfull
  745.     dc.w    0
  746. StoreYpos
  747.     dc.w    0
  748. wait
  749.     dc.w    0
  750. date
  751.     dc.l    0,0,0,0
  752.  
  753. rndseed    dc.l    $4523
  754.     dc.w    $6
  755.  
  756.     rsset    0
  757. colr    rs.b    1    ;0   includes type as bits 5,6,7
  758. time    rs.b    1    ;1
  759. xpos    rs.w    1    ;2
  760. ypos    rs.w    1    ;4
  761. lxpos    rs.w    1    ;6
  762. lypos    rs.w    1    ;8
  763. xvel    rs.w    1    ;10 Pix*16
  764. yvel    rs.w    1    ;12 Pix*16
  765. xacc    rs.b    1    ;14 *16
  766. yacc    rs.b    1    ;15 *16
  767. ppsize    rs.w    0    ;16
  768.  
  769. pointdata
  770.     dc.w    xmax/2
  771.     dc.w    240
  772.     dc.w    xmax/2
  773.     dc.w    240
  774.     dc.w    16
  775.     dc.w    -150
  776.     dc.w    0
  777.     dc.w    5
  778.  
  779. wbmsg    dc.l    0        * Ptr to the Hit it! message from workbench
  780.  
  781.  
  782. xmax    equ    320
  783. ymax    equ    256
  784. depth    equ    5
  785.  
  786. numlines    equ    79
  787. minnum    equ    1
  788. groundval    equ    220
  789.  
  790. data    ds.b    ppsize*(numlines+1)
  791.  
  792. scrmess    dc.b    "OpenScreen failed.",10
  793. scrmesslen    equ    *-scrmess
  794. stmess    dc.b    10,"The Electric Menagerie Corporation Presents!",10
  795.     dc.b    "             ",$9b,"1;33m","Fireworks",10
  796.     dc.b    $9b,"0;31m - By James Hakewill & Ian Crowther"
  797.     dc.b    " (Fuzzz & Euphoria)",10,10
  798.     dc.b    "Written with ArgAsm from Argonaut Software.",10,0
  799. stmesslen    equ     *-stmess
  800.  
  801.  
  802.