Fix gloom heart icons to be loaded via DMA

This commit is contained in:
2025-05-18 02:32:39 -05:00
parent bc0f396275
commit 642aec9112
8 changed files with 55 additions and 11 deletions

View File

@@ -184,6 +184,7 @@ incsrc multiworld.asm
incsrc textrenderer.asm
incsrc crystalswitchbook.asm
incsrc mimicdash.asm
incsrc gloom.asm
warnpc $A58000
org $A28000

Binary file not shown.

Binary file not shown.

BIN
data/skull.bin Normal file

Binary file not shown.

38
gloom.asm Normal file
View File

@@ -0,0 +1,38 @@
AdjustDefaultGraphics:
JSL $80E310
LDA.l ChallengeModes : AND.b #$03 : CMP.b #$02 : BEQ .gloom
RTL
.gloom
LDA.b #$80
STA.w $2115
LDA.b #$00
STA.w $2116
LDA.b #$75
STA.w $2117
LDA.b #$01
STA.w $4300
LDA.b #$18
STA.w $4301
LDA.b #SkullGfx
STA.w $4302
LDA.b #SkullGfx>>8
STA.w $4303
LDA.b #SkullGfx>>16
STA.w $4304
LDA.b #SkullGfx_end-SkullGfx
STA.w $4305
LDA.b #(SkullGfx_end-SkullGfx)>>8
STA.w $4306
LDA.b #$01
STA.w $420B
RTL
SkullGfx:
incbin "data/skull.bin"
.end

View File

@@ -2722,3 +2722,14 @@ LDA.b #$30
;--------------------------------------------------------------------------------
org $9EC7BE
JSL MimicDirection
;===================================================================================================
;--------------------------------------------------------------------------------
; Gloom VRAM overwrite
;--------------------------------------------------------------------------------
org $828068
JSL AdjustDefaultGraphics
org $8CC229
JSL AdjustDefaultGraphics
org $8CCCC0
JSL AdjustDefaultGraphics

View File

@@ -509,7 +509,7 @@ UpdateHearts:
LDA.l HUDHeartColors_index : ASL : TAX
LDA.l HUDHeartColors_masks_game_hud,X
PLX
ORA.l HeartIcon
ORA.w #$20A0
CPY.b #$01
BPL .add_heart
@@ -553,14 +553,14 @@ UpdateHearts:
LDA.l HUDHeartColors_index : ASL : TAX
LDA.l HUDHeartColors_masks_game_hud,X
ORA.l HalfHeartIcon
ORA.w #$20A1
STA.b (Scrap09)
BRA .skip_partial
.more_than_half
LDA.l HUDHeartColors_index : ASL : TAX
LDA.l HUDHeartColors_masks_game_hud,X
ORA.l HeartIcon
ORA.w #$20A0
STA.b (Scrap09)
.skip_partial
@@ -580,7 +580,7 @@ CheckHeartPalette:
PHX
LDA.l HUDHeartColors_index : ASL : TAX
LDA.l HUDHeartColors_masks_game_hud,X
ORA.l HeartIcon
ORA.w #$20A0
PLX
RTS

View File

@@ -2644,14 +2644,8 @@ org $B0F032 ; PC 0x187032
RomSpeed:
db $01 ; $01 = FastROM (default) | $00 = SlowROM
org $B0F033 ; PC 0x187033
HeartIcon:
dw $20A0
HalfHeartIcon:
dw $20A1
;--------------------------------------------------------------------------------
; 0x187037 - 18703F (unused)
; 0x187033 - 18703F (unused)
;--------------------------------------------------------------------------------
org $B0F040 ; PC 0x187040