Dungeon status in menu

Big key, big chest key, treasure, scroll
This commit is contained in:
scawful
2023-07-16 18:30:06 -04:00
parent e0c23cd586
commit 6c9c16f7fc
4 changed files with 242 additions and 29 deletions

View File

@@ -84,12 +84,14 @@ Menu_UploadRight:
JSR Menu_DrawBackground
JSR Menu_DrawQuestItems
JSR Menu_DrawCharacterName
JSR Menu_DrawBigKey
JSR Menu_DrawBigChestKey
JSR DrawQuestIcons
JSR DrawTriforceIcon
JSR DrawPendantIcons
JSR DrawDeathCounter
JSR DrawPlaytimeLabel
JSR DrawScrollsLabel
;; heart piece empty, move this later
LDX.w #$2484 : STX.w $149E ; draw empty top left
@@ -343,11 +345,11 @@ Menu_CheckBottle:
.not_second
LDA.w $0202 : CMP.b #$12 : BNE .not_third
LDA.b #$03 : JMP .prepare_bottle
LDA.b #$0003 : JMP .prepare_bottle
.not_third
LDA.w $0202 : CMP.b #$18 : BNE .not_any
LDA.b #$04
LDA.b #$0004
.prepare_bottle
STA.l $7EF34F

View File

@@ -411,4 +411,212 @@ Menu_DrawQuestItems:
LDY.w #MoonPearlGFX
JSR DrawMenuItem
RTS
RTS
; =============================================================================
Menu_DrawBigKey:
{
REP #$30
LDA $040C : AND.w #$00FF : CMP.w #$00FF : BEQ .notInPalace
LSR A : TAX
; Check if we have the big key in this palace
LDA $7EF366
.locateBigKeyFlag
ASL A : DEX : BPL .locateBigKeyFlag : BCC .dontHaveBigKey
JSR CheckPalaceItemPossession : LDA $02 : BEQ .noTreasureYet
SEP #$30
LDA.b #$7E : STA.b $0A
REP #$30
LDA.w #$01
STA.w ShortSpoof
LDA.w #ShortSpoof
LDX.w #menu_offset(11,8)
LDY.w #TreasureChestGFX
JSR DrawMenuItem
.noTreasureYet
LDA.w #$01
STA.w ShortSpoof
LDA.w #ShortSpoof
; Draw the big key (or big key with chest if we've gotten the treasure) icon
LDX.w #menu_offset(11,2)
LDY.w #BigKeyGFX
JSR DrawMenuItem
.dontHaveBigKey
.notInPalace
LDA $040C : AND.w #$00FF : CMP.w #$00FF : BEQ .notInPalaceAgain
LSR A : TAX
; Check if we have the map in this dungeon
LDA $7EF368
.locateMapFlag
ASL A : DEX : BPL .locateMapFlag : BCC .dontHaveMap
LDA.w #$01
STA.w ShortSpoof
LDA.w #ShortSpoof
; Draw the big key (or big key with chest if we've gotten the treasure) icon
LDX.w #menu_offset(11,11)
LDY.w #MapGFX
JSR DrawMenuItem
.dontHaveMap
.notInPalaceAgain
; SEP #$30
RTS
}
; =============================================================================
; *$6EEB6-$6EEDB LOCAL
CheckPalaceItemPossession:
{
SEP #$30
LDA $040C : LSR A
JSL UseImplicitRegIndexedLocalJumpTable
dw .no_item
dw .no_item
dw .bow
dw .power_glove
dw .no_item
dw .hookshot
dw .hammer
dw .cane_of_somaria
dw .fire_rod
dw .blue_mail
dw .moon_pearl
dw .titans_mitt
dw .mirror_shield
dw .red_mail
}
; ==============================================================================
; *$6EEDC-$6EEE0 JUMP LOCATION
.pool_CheckPalaceItemPossession:
{
.failure
STZ $02
STZ $03
RTS
.bow
LDA $7EF340
.no_item
.compare
BEQ .failure
.success
LDA.b #$01 : STA $02
STZ $03
RTS
.power_glove
LDA $7EF354 : BRA .compare
.hookshot
LDA $7EF342 : BRA .compare
.hammer
LDA $7EF34B : BRA .compare
.cane_of_somaria
LDA $7EF350 : BRA .compare
.fire_rod
LDA $7EF345 : BRA .compare
.blue_mail
LDA $7EF35B : BRA .compare
.moon_pearl
LDA $7EF357 : BRA .compare
.titans_mitt
LDA $7EF354 : DEC A : BRA .compare
.mirror_shield
LDA $7EF35A : CMP.b #$03 : BEQ .success
STZ $02
STZ $03
RTS
.red_mail
LDA $7EF35B : CMP.b #$02 : BEQ .success
STZ $02
STZ $03
RTS
}
; *$6EF39-$6EF66 LOCAL
Menu_DrawBigChestKey:
{
LDA $040C : AND.w #$00FF : CMP.w #$00FF : BEQ .notInPalace
LSR A : TAX
LDA $7EF364
.locateCompassFlag
ASL A : DEX : BPL .locateCompassFlag
BCC .dontHaveCompass
SEP #$30
LDA.b #$7E : STA.b $0A
REP #$30
LDA.w #$01
STA.w ShortSpoof
LDA.w #ShortSpoof
LDX.w #menu_offset(11, 5)
LDY.w #BigChestKeyGFX
JSR DrawMenuItem
.dontHaveCompass
.notInPalace
RTS
}

View File

@@ -88,8 +88,26 @@ ShovelGFX:
OcarinaGFX:
dw $2CD4, $2CD5, $2CE4, $2CE5
; dw $2CD4, $2CD5, $2CE4, $2CE5
; dw $2CD4, $2CD5, $2CE4, $2CE5
; -------------------------------------
BigKeyGFX:
dw $34D6, $74D6, $34E6, $34E7
; -------------------------------------
BigChestKeyGFX:
dw $34BF, $74BF, $34E6, $34E7
; -------------------------------------
MapGFX:
dw $2936, $2937, $2946, $2947
; -------------------------------------
TreasureChestGFX:
dw $294B, $294C, $294D, $294E
; -------------------------------------
; formerly fishing net
@@ -156,8 +174,8 @@ MirrorGFX:
QuarterNoteGFX:
dw $30AA, $306B, $307A, $306A ; Gray Note
dw $2CAA, $2C6B, $2C7A, $2C6A ; Blue Note
dw $24AA, $246B, $247A, $246A ; Red Note
dw $3CAA, $3C6B, $3C7A, $3C6A ; Green Note
dw $24AA, $246B, $247A, $246A ; Red Note
dw $34AA, $346B, $347A, $346A ; Gold Note
; -------------------------------------

View File

@@ -45,22 +45,6 @@
; =============================================================================
DeathLabel:
dw "DEATHS:_"
DrawDeathCounter:
REP #$30
LDX.w #$0E
.draw2
LDA.w DeathLabel, X
STA.w $13CC, X
DEX : DEX : BPL .draw2
RTS
; =============================================================================
ScrollsLabel:
dw "SCROLLS:_"
@@ -148,11 +132,11 @@ TestLocationName:
dw "GANONS_LAIR_____", "________________", "________________", "________________"
dw "________________", "ZORA_TEMPLE_____", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 16
dw "________________", "________________", "________________", "________________" ; 15
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "ZORA_TEMPLE_____", "SHRINE_COURAGE__", "ZORA_TEMPLE_____"
dw "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_", "________________"
dw "________________", "________________", "________________", "________________" ; 32
dw "________________", "________________", "________________", "________________"
@@ -167,7 +151,7 @@ TestLocationName:
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "MUSHROOM_GROTTO_", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
@@ -374,7 +358,8 @@ Menu_DrawCharacterName:
.write_to_screen
CLC : ADC #$2550
STA.w $138C, X
; STA.w $138C, X
STA.w $134C, X
DEX : DEX : BPL .draw_name_loop
RTS