**************************************************************************** **************************************************************************** ** ** Monster for TI-89 / TI-92 Plus - Lasers ** ** Copyright 2002 by Patrick Davidson. This software may be freely ** modified and/or copied with no restrictions. There is no warranty. ** ** by Patrick Davidson (pad@calc.org, http://pad.calc.org/) ** ** Last updated March 17, 2002 ** **************************************************************************** **************************************************************************** Handle_Lasers: lea laserblasts(a5),a6 moveq #l_num-1,d6 lasers_loop: tst.w (a6) beq.s \no_laser subq.w #4,(a6) blt.s \hit move.w (a6),d1 move.w l_x(a6),d0 lea laser_image(pc),a0 bsr Adjusted_Sprite move.w (a6),d5 move.w l_x(a6),d4 bsr Check_Brick_Hit_Special sne d0 move.w (a6),d5 move.w l_x(a6),d4 addq.w #4,d4 bsr Check_Brick_Hit_Special bne.s \hit tst.b d0 bne.s \hit \no_laser: addq.w #l_size,a6 dbra d6,lasers_loop rts \hit: clr.w (a6) bra.s \no_laser Fire_Lasers: bsr Find_Empty_Blast move.w #11*TILE_HEIGHT-4,(a6)+ move.w paddlex(a5),(a6) bsr Find_Empty_Blast move.w #11*TILE_HEIGHT-4,(a6)+ move.w paddlex(a5),d0 subq.w #4,d0 add.w paddlew(a5),d0 move.w d0,(a6) rts Find_Empty_Blast: lea laserblasts(a5),a6 moveq #l_num-1,d6 \f: tst.w (a6) beq.s \found addq.w #l_size,a6 dbra d6,\f addq.w #4,sp rts \found: subq.w #1,laserpower(a5) rts