Move compass counts to ROM and trackable RAM
Add flag if compass HUD count has been displayed in SRAM Move low hearts fix from tables.asm to bugfixes.asm Rearrange dungeon stats in SRAM to match door rando ROM
This commit is contained in:
175
compasses.asm
175
compasses.asm
@@ -5,11 +5,11 @@
|
||||
; HexToDec when drawing the "??/XX" item counter
|
||||
; %DrawConstantNumber(1,4) draws 14
|
||||
;--------------------------------------------------------------------------------
|
||||
macro DrawConstantNumber(digit1,digit2)
|
||||
LDA.w #$2490+<digit1> : STA $7EC79A
|
||||
LDA.w #$2490+<digit2> : STA $7EC79C
|
||||
SEP #$20
|
||||
endmacro
|
||||
;macro DrawConstantNumber(digit1,digit2)
|
||||
; LDA.w #$2490+<digit1> : STA $7EC79A
|
||||
; LDA.w #$2490+<digit2> : STA $7EC79C
|
||||
; SEP #$20
|
||||
;endmacro
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
DrawDungeonCompassCounts:
|
||||
@@ -21,12 +21,23 @@ DrawDungeonCompassCounts:
|
||||
BEQ .done ; skip if we don't have compass
|
||||
++
|
||||
|
||||
JMP (CompassCountDungeonHandlers, X) : .return_spot
|
||||
|
||||
; we switch to 8-bit A in the jump before this
|
||||
LDA $040C : LSR
|
||||
BNE +
|
||||
INC
|
||||
+
|
||||
TAX : LDA.l CompassTotalsWRAM, X : AND #$00FF
|
||||
SEP #$20
|
||||
JSR HudHexToDec2Digit
|
||||
REP #$20
|
||||
PHX
|
||||
LDX.b $06 : TXA : ORA #$2400 : STA $7EC79A
|
||||
LDX.b $07 : TXA : ORA #$2400 : STA $7EC79C
|
||||
PLX
|
||||
|
||||
LDA DungeonLocationsChecked-1, X : AND #$00FF
|
||||
SEP #$20
|
||||
JSR HudHexToDec2Digit
|
||||
REP #$20
|
||||
|
||||
LDX.b $06 : TXA : ORA #$2400 : STA $7EC794 ; Draw the item count
|
||||
LDX.b $07 : TXA : ORA #$2400 : STA $7EC796
|
||||
|
||||
@@ -39,76 +50,76 @@ DungeonItemMasks: ; these are dungeon correlations to $7EF364 - $7EF369 so it kn
|
||||
dw $8000, $4000, $2000, $1000, $0800, $0400, $0200, $0100
|
||||
dw $0080, $0040, $0020, $0010, $0008, $0004
|
||||
|
||||
CompassCountDungeonHandlers: ; pointers to functions that handle dungeon-specific code
|
||||
dw CompassCount_Escape, CompassCount_Escape ; (hyrule castle, sewers)
|
||||
dw CompassCount_Eastern, CompassCount_Desert, CompassCount_Agah
|
||||
dw CompassCount_Swamp, CompassCount_PoD, CompassCount_Mire
|
||||
dw CompassCount_Skull, CompassCount_Ice, CompassCount_Hera
|
||||
dw CompassCount_Thieves, CompassCount_Trock, CompassCount_Gt
|
||||
}
|
||||
|
||||
CompassCount_Escape:
|
||||
%DrawConstantNumber(0,8)
|
||||
LDA SewersLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Eastern:
|
||||
%DrawConstantNumber(0,6)
|
||||
LDA EPLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Desert:
|
||||
%DrawConstantNumber(0,6)
|
||||
LDA DPLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Agah:
|
||||
%DrawConstantNumber(0,2)
|
||||
LDA CTLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Swamp:
|
||||
%DrawConstantNumber(1,0)
|
||||
LDA SPLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_PoD:
|
||||
%DrawConstantNumber(1,4)
|
||||
LDA PDLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Mire:
|
||||
%DrawConstantNumber(0,8)
|
||||
LDA MMLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Skull:
|
||||
%DrawConstantNumber(0,8)
|
||||
LDA SWLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Ice:
|
||||
%DrawConstantNumber(0,8)
|
||||
LDA IPLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Hera:
|
||||
%DrawConstantNumber(0,6)
|
||||
LDA THLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Thieves:
|
||||
%DrawConstantNumber(0,8)
|
||||
LDA TTLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Trock:
|
||||
%DrawConstantNumber(1,2)
|
||||
LDA TRLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
CompassCount_Gt:
|
||||
%DrawConstantNumber(2,7)
|
||||
LDA GTLocations
|
||||
JMP DrawDungeonCompassCounts_return_spot
|
||||
|
||||
;CompassCountDungeonHandlers: ; pointers to functions that handle dungeon-specific code
|
||||
; dw CompassCount_Escape, CompassCount_Escape ; (hyrule castle, sewers)
|
||||
; dw CompassCount_Eastern, CompassCount_Desert, CompassCount_Agah
|
||||
; dw CompassCount_Swamp, CompassCount_PoD, CompassCount_Mire
|
||||
; dw CompassCount_Skull, CompassCount_Ice, CompassCount_Hera
|
||||
; dw CompassCount_Thieves, CompassCount_Trock, CompassCount_Gt
|
||||
;}
|
||||
;
|
||||
;CompassCount_Escape:
|
||||
; %DrawConstantNumber(0,8)
|
||||
; LDA SewersLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Eastern:
|
||||
; %DrawConstantNumber(0,6)
|
||||
; LDA EPLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Desert:
|
||||
; %DrawConstantNumber(0,6)
|
||||
; LDA DPLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Agah:
|
||||
; %DrawConstantNumber(0,2)
|
||||
; LDA CTLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Swamp:
|
||||
; %DrawConstantNumber(1,0)
|
||||
; LDA SPLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_PoD:
|
||||
; %DrawConstantNumber(1,4)
|
||||
; LDA PDLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Mire:
|
||||
; %DrawConstantNumber(0,8)
|
||||
; LDA MMLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Skull:
|
||||
; %DrawConstantNumber(0,8)
|
||||
; LDA SWLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Ice:
|
||||
; %DrawConstantNumber(0,8)
|
||||
; LDA IPLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Hera:
|
||||
; %DrawConstantNumber(0,6)
|
||||
; LDA THLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Thieves:
|
||||
; %DrawConstantNumber(0,8)
|
||||
; LDA TTLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Trock:
|
||||
; %DrawConstantNumber(1,2)
|
||||
; LDA TRLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
;CompassCount_Gt:
|
||||
; %DrawConstantNumber(2,7)
|
||||
; LDA GTLocations
|
||||
; JMP DrawDungeonCompassCounts_return_spot
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user