diff --git a/games/lemm/draw_lemming.s b/games/lemm/draw_lemming.s index 99d44a43..9380a62d 100644 --- a/games/lemm/draw_lemming.s +++ b/games/lemm/draw_lemming.s @@ -86,6 +86,8 @@ do_draw_lemming: beq draw_exploding_sprite cmp #LEMMING_PARTICLES beq draw_particles + cmp #LEMMING_SPLATTING + beq draw_splatting_sprite draw_walking_sprite: @@ -159,6 +161,18 @@ draw_exploding_sprite: jmp done_draw_lemming + ;==================== + ; draw splatting + ;==================== + +draw_splatting_sprite: + + + jsr handle_splatting + + jmp done_draw_lemming + + ;==================== ; draw particles ;==================== @@ -292,6 +306,19 @@ countdown_sprites_h: .byte >countdown2_sprite,>countdown1_sprite +splatting_sprite_l: + .byte lemming_splat1_sprite,>lemming_splat2_sprite + .byte >lemming_splat3_sprite,>lemming_splat4_sprite + .byte >lemming_splat5_sprite,>lemming_splat6_sprite + .byte >lemming_splat7_sprite,>lemming_splat8_sprite + + ;========================== ; Handle particles ;========================== @@ -451,3 +478,40 @@ done_handle_exploding: jsr hgr_draw_sprite_autoshift rts + + + + ;========================== + ; Handle splatting + ;========================== + + ; moved to make room +handle_splatting: + + lda lemming_frame,Y + cmp #$8 + beq done_splatting + +draw_splatting: + jsr click_speaker + + tax + + lda splatting_sprite_l,X + sta INL + lda splatting_sprite_h,X + sta INH + + ldx lemming_x,Y + stx XPOS + lda lemming_y,Y + sta YPOS + + jsr hgr_draw_sprite_autoshift + + rts + +done_splatting: + clc + jsr remove_lemming ; FIXME: tail call + rts diff --git a/games/lemm/move_lemming.s b/games/lemm/move_lemming.s index ac69b641..0f252fc0 100644 --- a/games/lemm/move_lemming.s +++ b/games/lemm/move_lemming.s @@ -303,8 +303,14 @@ done_check_ground: lemming_goes_splat: - clc - jsr remove_lemming + lda #LEMMING_SPLATTING + sta lemming_status,Y + + lda #0 + sta lemming_frame,Y + +; clc +; jsr remove_lemming rts