From 5b1af9af50716bd4f6feb8dd9e6f5cf57071a3df Mon Sep 17 00:00:00 2001 From: "Matthew D. Steele" Date: Tue, 16 Apr 2024 18:03:07 -0400 Subject: [PATCH] Fix mine boss death animation --- src/chr.asm | 9 +++++---- src/linker.cfg | 2 +- src/rooms/boss_city.asm | 4 ++-- src/rooms/boss_mine.asm | 4 ++++ src/tiles/anim_wyrm_static.ahi | 36 ++++++++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 src/tiles/anim_wyrm_static.ahi diff --git a/src/chr.asm b/src/chr.asm index 0748fd7e..3b5d8006 100644 --- a/src/chr.asm +++ b/src/chr.asm @@ -398,13 +398,14 @@ _chr_begin: ;;;=========================================================================;;; -.SEGMENT "CHR_BgBossCity" +.SEGMENT "CHR_BgBossStatic" -.EXPORT Ppu_ChrBgBossCity -.PROC Ppu_ChrBgBossCity +.EXPORT Ppu_ChrBgBossStatic +.PROC Ppu_ChrBgBossStatic CHR1_BANK $40 chr_inc "boss_city" - chr_res $14 + chr_res $04 + chr_inc "anim_wyrm_static" END_CHR_BANK .ENDPROC diff --git a/src/linker.cfg b/src/linker.cfg index cea03854..ca26f5cb 100644 --- a/src/linker.cfg +++ b/src/linker.cfg @@ -304,7 +304,7 @@ SEGMENTS { CHR_BgMermaid: load=CHR1_29, type=ro; CHR_BgMine: load=CHR1_2A, type=ro; CHR_BgMinimap: load=CHR1_2B, type=ro; - CHR_BgBossCity: load=CHR1_2C, type=ro; + CHR_BgBossStatic: load=CHR1_2C, type=ro; CHR_BgOutdoors: load=CHR1_2D, type=ro; CHR_BgPause: load=CHR1_2E, type=ro; CHR_BgPrison: load=CHR1_2F, type=ro; diff --git a/src/rooms/boss_city.asm b/src/rooms/boss_city.asm index 04f8dbef..3daa7bc8 100644 --- a/src/rooms/boss_city.asm +++ b/src/rooms/boss_city.asm @@ -86,7 +86,7 @@ .IMPORT Func_ShakeRoom .IMPORT Func_SignedMult .IMPORT Func_Sine -.IMPORT Ppu_ChrBgBossCity +.IMPORT Ppu_ChrBgBossStatic .IMPORT Ppu_ChrObjBoss2 .IMPORT Ram_ActorPosY_i16_0_arr .IMPORT Ram_MachineGoalHorz_u8_arr @@ -836,7 +836,7 @@ _SpineAngle_u8_arr5: ;;; Draw function for the city boss. ;;; @prereq PRGA_Objects is loaded. .PROC FuncC_Boss_City_DrawBoss - lda #<.bank(Ppu_ChrBgBossCity) + lda #<.bank(Ppu_ChrBgBossStatic) sta Zp_Chr04Bank_u8 _SetShapePosition: ;; Set the shape position to the center of the boss's body. diff --git a/src/rooms/boss_mine.asm b/src/rooms/boss_mine.asm index d64fa11a..ded62abe 100644 --- a/src/rooms/boss_mine.asm +++ b/src/rooms/boss_mine.asm @@ -74,6 +74,7 @@ .IMPORT Func_SetPointToPlatformCenter .IMPORT Func_ShakeRoom .IMPORT Ppu_ChrBgAnimB4 +.IMPORT Ppu_ChrBgBossStatic .IMPORT Ppu_ChrObjBoss2 .IMPORT Ram_MachineGoalHorz_u8_arr .IMPORT Ram_MachineGoalVert_u8_arr @@ -817,6 +818,9 @@ _DrawBoulder: ldx #kBoulderPlatformIndex ; param: platform index jsr FuncA_Objects_DrawBoulderPlatform _DrawBoss: + ;; Set default CHR04 bank, in case boss isn't drawn. + lda #<.bank(Ppu_ChrBgBossStatic) + sta Zp_Chr04Bank_u8 jmp FuncA_Objects_DrawBoss .ENDPROC diff --git a/src/tiles/anim_wyrm_static.ahi b/src/tiles/anim_wyrm_static.ahi new file mode 100644 index 00000000..3df58d42 --- /dev/null +++ b/src/tiles/anim_wyrm_static.ahi @@ -0,0 +1,36 @@ +ahi1 f0 p1 i1 w32 h32 + +F0F;0;54;ECEEEC;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0 + +11111111111211211111211111111111 +11111121112212111121221111112111 +11121221111122211221111111221111 +11221211122221111112222211212111 +11122111221111111111111222122111 +11211211111111111111111122211111 +11111221111111111111111111112211 +22112211111111211111111111112111 +21122111111112211211221111111111 +11121111112111111111112111111122 +11211111121111111111111111111112 +11211111111111111111111112111111 +11111111111111111111111112111111 +21111121111111111211111111211121 +21111121111112111111121111111111 +21111111111111111111112111111111 +11111111111111111111111111111112 +21111211111111111111111111121121 +21111211111211111111111121121112 +11111111111211111111111111111111 +11111111111111111111111111211112 +21111111111111111111111111111222 +21111112111111111111111112111211 +11111112111211111111111112112211 +12111111211111111111111111112111 +12211111111111111111111211121221 +11111111111221111111112111212211 +11122111111121112112211111121111 +11211211111111111111111112122111 +11221212111111111111111122121121 +11121211221221111111221212211111 +11211111112111221122112211111111