Conditionally draw staircase labels

This commit is contained in:
2026-01-12 15:49:09 -06:00
parent fcf17a6dff
commit c38b3b6d0a
6 changed files with 93 additions and 14 deletions

View File

@@ -540,6 +540,53 @@ DrawStairs:
PLX
RTS
GetCurrentRoomVisibility:
PHX
LDA.l ShowRooms_default
AND.w #$00FF
STA.b $0A
LDX.w DungeonID
LDA.l MapField
AND.l DungeonMask, X
BEQ +
LDA.l ShowRooms_have_map
AND.w #$00FF
CMP.b $0A
BCC +
STA.b $0A
+
LDX.w DungeonID
LDA.l CompassField
AND.l DungeonMask, X
BEQ +
LDA.l ShowRooms_have_compass
AND.w #$00FF
CMP.b $0A
BCC +
STA.b $0A
+
LDA.l CurrentDisplayedRoom
AND.w #$00FF
ASL A
TAX
LDA.l SaveDataWRAM, X
AND.w #$000F
STA.b $0E
BEQ +
LDA.l ShowRooms_visited_tile
AND.w #$00FF
CMP.b $0A
BCC +
STA.b $0A
+
PLX
LDA.b $0A
RTS
DrawDropOrWarp:
PHX
LDA.l CurrentDisplayedRoom
@@ -1391,18 +1438,16 @@ DrawDoorsStairs:
LDA.l SpiralPropsIndex, X
TAX
LDA.l SpiralProps, X
STA.b $0E
STZ.b $0F
BEQ .done
.next_sprite
LDY.b $00
LDA.b #$00
STA.w OAMBufferAux, Y
TYA
ASL A : ASL A
TAY
STA.b $0C
STZ.b $0D
REP #$30
JSR GetCurrentRoomVisibility
SEP #$30
.next_sprite
INX : INX
LDA.l SpiralProps, X
@@ -1410,6 +1455,22 @@ DrawDoorsStairs:
ASL A
TAX
LDA.b $0A
CMP.b #$04
BCS .draw
LDA.l SpiralLabelQuadrantMasks, X
AND.b $0E
BEQ .skip
.draw
LDY.b $00
LDA.b #$00
STA.w OAMBufferAux, Y
TYA
ASL A : ASL A
TAY
LDA.l DoorSlotsSprites
CLC : ADC.l SpiralLabelOffsets, X
STA.w OAMBuffer, Y
@@ -1417,17 +1478,19 @@ DrawDoorsStairs:
LDA.l DoorSlotsSprites+1
CLC : ADC.l SpiralLabelOffsets+1, X
STA.w OAMBuffer+1, Y
PLX
LDA.b #$39
CLC : ADC.b $0F
CLC : ADC.b $0D
STA.w OAMBuffer+2, Y
LDA.b #$33
STA.w OAMBuffer+3, Y
INC.b $00
INC.b $0F
DEC.b $0E
.skip
PLX
INC.b $0D
DEC.b $0C
BNE .next_sprite
.done

View File

@@ -43,7 +43,7 @@ db $02, $00, $01, $01, $0B ; ($53) Pod Rupees
db $01, $00, $04 ; ($58) Ice Gators
db $02, $01, $0A, $02, $01 ; ($5B) HC Tiny (first value placeholder)
db $03, $00, $01, $01, $0B, $02, $09 ; ($60) Swamp Sunken
db $03, $01, $00, $02, $09, $03, $08 ; ($67) Hera Entrance (first value unused)
db $03, $01, $00, $03, $08, $02, $09 ; ($67) Hera Entrance (first value unused)
db $01, $00, $08 ; ($6E) Ice Hookshot
db $02, $01, $00, $03, $08 ; ($71) Hera Basement (first and third values unused)
db $03, $01, $00, $00, $02, $03, $08 ; ($76) GT Circle (third value unused)
@@ -68,3 +68,19 @@ db -3, -9
db 13, -9
db -3, -1
db 13, -1
SpiralLabelQuadrantMasks:
dw $0008
dw $000C
dw $0004
dw $0008
dw $0004
dw $0002
dw $0003
dw $0001
dw $0002
dw $0001
dw $0008
dw $0004
dw $0002
dw $0001

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.