diff --git a/games/tfv/tfv_battle.s b/games/tfv/tfv_battle.s index 67b3b3dc..3f95d197 100644 --- a/games/tfv/tfv_battle.s +++ b/games/tfv/tfv_battle.s @@ -176,7 +176,7 @@ battle_draw_normal_hero: lda #20 sta HERO_Y - jsr draw_hero_and_sword + jsr draw_battle_hero_and_sword battle_done_draw_hero: diff --git a/games/tfv/tfv_battle_draw_hero.s b/games/tfv/tfv_battle_draw_hero.s index 4c4f1b5f..f7a140d7 100644 --- a/games/tfv/tfv_battle_draw_hero.s +++ b/games/tfv/tfv_battle_draw_hero.s @@ -117,6 +117,90 @@ draw_hero_sword: + + + + + + + + ;============================ + ; draw battle hero and sword + ;============================ + ; bounces in readiness + ; draws at HERO_X,HERO_Y + +draw_battle_hero_and_sword: + + lda HERO_X + sta XPOS + lda HERO_Y + sta YPOS + + lda FRAMEL + and #$8 + beq hero_bounce1 + +hero_bounce2: + + lda #tfv_battle1_sprite + sta INH + + jsr put_sprite_crop + +hero_sword2: + ; grsim_put_sprite(tfv_led_sword,ax-5,20); + lda HERO_X + sec + sbc #5 + sta XPOS + lda HERO_Y +; clc +; adc #2 + sta YPOS + + lda #tfv_led_sword_sprite + sta INH + + jmp put_sprite_crop ; tail call + + +hero_bounce1: + + lda #tfv_battle2_sprite + sta INH + + jsr put_sprite_crop + +hero_sword1: + ; grsim_put_sprite(tfv_led_sword,ax-5,20); + lda HERO_X + sec + sbc #5 + sta XPOS + lda HERO_Y + clc + adc #2 + sta YPOS + + lda #tfv_led_sword2_sprite + sta INH + + jmp put_sprite_crop ; tail call + + + + + + ;=================== ; heal hero ;=================== diff --git a/games/tfv/tfv_battle_menu.s b/games/tfv/tfv_battle_menu.s index 90b8ac21..40693e52 100644 --- a/games/tfv/tfv_battle_menu.s +++ b/games/tfv/tfv_battle_menu.s @@ -10,6 +10,14 @@ draw_battle_bottom: + ; increment frame + ; weird place for this but everything calls this once per frame + + inc FRAMEL + bne frame_no_oflo + inc FRAMEH +frame_no_oflo: + jsr clear_bottom jsr normal_text diff --git a/games/tfv/tfv_sprites.inc b/games/tfv/tfv_sprites.inc index e23bda74..aea3ca9a 100644 --- a/games/tfv/tfv_sprites.inc +++ b/games/tfv/tfv_sprites.inc @@ -49,12 +49,42 @@ tfv_walk_left_sprite: .byte $AA,$2A,$A2,$22 .byte $AA,$82,$AA,$82 +;==================== +; TFV Battle Sprites +;==================== + +tfv_battle1_sprite: + .byte $4,$6 + .byte $AA,$BD,$DD,$AA + .byte $AB,$DB,$DD,$AA + .byte $AA,$AA,$22,$AA + .byte $AB,$A2,$22,$AA + .byte $AA,$22,$22,$2A + .byte $8A,$82,$AA,$82 + +tfv_battle2_sprite: + .byte $4,$6 + .byte $AA,$DA,$DA,$AA + .byte $BA,$BB,$DD,$AA + .byte $AA,$AD,$2D,$AA + .byte $BA,$2A,$22,$AA + .byte $AA,$2A,$22,$22 + .byte $8A,$82,$AA,$82 + + tfv_led_sword_sprite: .byte $5,$3 .byte $1A,$AA,$1A,$AA,$AA .byte $1A,$A1,$1A,$1A,$1A .byte $AA,$AA,$11,$A1,$1A +tfv_led_sword2_sprite: + .byte $5,$3 + .byte $A1,$1A,$A1,$AA,$AA + .byte $A1,$AA,$11,$11,$A1 + .byte $AA,$AA,$A1,$AA,$A1 + + tfv_defeat_sprite: .byte $7,$3 .byte $AA,$AA,$AA,$2b,$AA,$AA,$AA