**************************************************************************** **************************************************************************** ** ** Platinum (Player bullet movement/display code) ** ** This software is in the public domain. There is no warranty. ** ** by Patrick Davidson (pad@calc.org, http://pad.calc.org/) ** ** Last updated July 27, 2001 ** **************************************************************************** **************************************************************************** swinging_bullet: addq.b #1,b_data(a4) move.b b_data(a4),d4 cmp.b #-9,1(a4) beq.s shallow_swing btst #1,d4 beq.s bullet_draw bra.s bullet_move_x shallow_swing: and.w #6,d4 bne.s bullet_draw bra.s bullet_move_x Player_Bullets: lea bullets_data(a5),a4 move.w num_b(a5),d7 loop_player_bullets: tst.w (a4) ;Skip if doesn't exist beq.s no_bullet_here move.b 1(a4),d0 ;Move in Y direction ext.w d0 asr.w #1,d0 add.w b_y(a4),d0 ble.s kill_bullet move.w d0,b_y(a4) cmp.b #2,b_data+1(a4) ;Test for "arch" bullet bne.s not_arch_bullet subq.b #1,1(a4) ;If so, adjust velocity not_arch_bullet: cmp.b #1,b_data+1(a4) ;Test for "swinging" bullets beq.s swinging_bullet bullet_move_x: move.b (a4),d0 ext.w d0 add.w b_x(a4),d0 ble.s kill_bullet move.w d0,b_x(a4) cmp.w #240,d0 bge.s kill_bullet bullet_draw: move.w b_x(a4),d0 move.w b_y(a4),d1 move.w b_image(a4),d2 bsr Xor_Sprite_D2 no_bullet_here: lea b_size(a4),a4 ;Move on to next bullet dbra d7,loop_player_bullets rts kill_bullet: ;Destory this bullet clr.w (a4) ;Mark its entry as unused bra.s no_bullet_here forward: subq.w #5,b_y(a4) ble.s kill_bullet bra.s bullet_draw