Skip to content

Commit

Permalink
Fix mine boss death animation
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Apr 16, 2024
1 parent b9560ea commit 5b1af9a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/chr.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/linker.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/rooms/boss_city.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions src/rooms/boss_mine.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
36 changes: 36 additions & 0 deletions src/tiles/anim_wyrm_static.ahi
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5b1af9a

Please sign in to comment.