diff --git a/Core/symbols.asm b/Core/symbols.asm index 8367834..a9ab0ea 100644 --- a/Core/symbols.asm +++ b/Core/symbols.asm @@ -42,7 +42,7 @@ SaveRam: ; 0x01 - Uncle reached ; 0x02 - Zelda rescued ; 0x03 - Agahnim defeated -GAMESTATE = $7EF3C5 +GameState = $7EF3C5 ; Red X on Hall of Secrets ; Red X on Kalyxo Pyramid @@ -98,7 +98,7 @@ MapIcon = $7EF3C7 ; i - Ice Palace ; m - Misery Mire ; t - Turtle Rock -CRYSTALS = $7EF37A +Crystals = $7EF37A ; 01 - Fishing Rod ; 02 - Portal Rod diff --git a/Dungeons/custom_tag.asm b/Dungeons/custom_tag.asm index b1972a0..9a7c26e 100644 --- a/Dungeons/custom_tag.asm +++ b/Dungeons/custom_tag.asm @@ -39,23 +39,20 @@ HouseTag_Main: LDA.b #$08 : STA $7EE000 ; Set the time to 8:00am LDA.b #$03 : STA.w $012C ; Play the deku tree music - ; ------------------------------- ; Set Link's coordinates to this specific position. LDA.b #$40 : STA $0FC2 LDA.b #$09 : STA $0FC3 - LDA.b #$5A : STA $0FC4 LDA.b #$21 : STA $0FC5 ; "Accept our quest, Link!" LDA.b #$1F : LDY.b #$00 - JSL $05E219 ; Sprite_ShowMessageUnconditional + JSL Sprite_ShowMessageUnconditional INC.b StoryState RTS } - HouseTag_WakeUpPlayer: { ; Lighten the screen gradually and then wake Link up partially @@ -80,7 +77,7 @@ HouseTag_Main: LDA $7EF3C6 : ORA.b #$10 : STA $7EF3C6 ; Set the game mode - LDA #$00 : STA $7EF3C5 ; (0 - intro, 1 - pendants, 2 - crystals) + LDA #$00 : STA GameState ; (0 - intro, 1 - pendants, 2 - crystals) LDA #$00 : STA $7EF3CC ; disable telepathic message JSL Sprite_LoadGfxProperties RTS diff --git a/Items/ocarina.asm b/Items/ocarina.asm index ecf5a32..420c260 100644 --- a/Items/ocarina.asm +++ b/Items/ocarina.asm @@ -337,8 +337,8 @@ CheckRealTable: ResetOcarinaFlag: { - LDA $7EF3C5 : BEQ .continue - CMP #$01 : BEQ .continue + LDA.l GameState : BEQ .continue + CMP #$01 : BEQ .continue REP #$30 LDA #$0000 : STA.l $7EE00E SEP #$30 @@ -416,7 +416,7 @@ RainAnimation_Overridden: JSL CheckRealTable : BEQ .rainOverlaySet ; LDA.b $8C : CMP.b #$9F : ; Check the progress indicator - LDA.l $7EF3C5 : CMP.b #$02 : BRA .skipMovement + LDA.l GameState : CMP.b #$02 : BRA .skipMovement .rainOverlaySet ; If misery mire has been opened already, we're done. diff --git a/Masks/minish_form.asm b/Masks/minish_form.asm index c64bd05..4ca4958 100644 --- a/Masks/minish_form.asm +++ b/Masks/minish_form.asm @@ -21,7 +21,7 @@ pullpc LinkState_CheckForMinishForm: { SEP #$30 - LDA.l GAMESTATE : BEQ .return + LDA.l GameState : BEQ .return JSL $0FF979 ; AncillaSpawn_SwordChargeSparkle ; Check for the R button (like minish cap) diff --git a/Overworld/overworld.asm b/Overworld/overworld.asm index c0b2cbd..a91a7ed 100644 --- a/Overworld/overworld.asm +++ b/Overworld/overworld.asm @@ -6,7 +6,7 @@ org $1AFBC7 : db $0B ; Heart Index org $1AFBD7 : db $00 ; Remove rain sound effects from beginning -org $02838C : LDA.l $7EF3C5 : CMP.b #$00 +org $02838C : LDA.l GameState : CMP.b #$00 ; RoomTag_GanonDoor ; Replace SprState == 04 -> .exit @@ -121,7 +121,7 @@ LoadDarkWorldIntro: LDA.b #$40 : STA.l $7EF3CA RTL .not_dw_spawn - LDA.l GAMESTATE : CMP.b #$02 : BNE .intro_sequence + LDA.l GameState : CMP.b #$02 : BNE .intro_sequence ; Check for maku tree progress flag LDA.l OOSPROG : CMP.b #$02 : BCS .has_pearl STZ.w $1B @@ -148,7 +148,7 @@ org $0281E2 : LDA.l $7EF342 : CMP.b #$02 org $0281CD : LDA.l $7EF3D6 : CMP.b #$04 ; GameOver_FadeAndRevive -org $09F520 : LDA.l $7EF3C5 : CMP.b #$02 +org $09F520 : LDA.l GameState : CMP.b #$02 pullpc LoadOverworldPitAreas: diff --git a/Overworld/time_system.asm b/Overworld/time_system.asm index 18f38a1..f23b9d3 100644 --- a/Overworld/time_system.asm +++ b/Overworld/time_system.asm @@ -446,11 +446,11 @@ CheckIfNight: JSR LoadPeacetimeSprites : BCS + RTL + - LDA.l $7EF3C5 : CMP.b #$02 : BCC .day_time + LDA.l GameState : CMP.b #$02 : BCC .day_time LDA $7EE000 : CMP.b #$12 : BCS .night_time LDA $7EE000 : CMP.b #$06 : BCC .night_time .day_time - LDA.l $7EF3C5 + LDA.l GameState RTL .night_time LDA.b #$03 @@ -487,32 +487,32 @@ CheckIfNight16Bit: + REP #$30 ; Don't change the spriteset during the intro sequence - LDA.l $7EF3C5 : AND.w #$00FF : CMP.w #$0002 : BCC .day_time + LDA.l GameState : AND.w #$00FF : CMP.w #$0002 : BCC .day_time ; 0x12 = 18 hours or 6 pm LDA $7EE000 : AND.w #$00FF : CMP.w #$0012 : BCS .night_time ; If it's less than 6 am, jump to night time LDA $7EE000 : AND.w #$00FF : CMP.w #$0006 : BCC .night_time .day_time - LDA.l $7EF3C5 + LDA.l GameState RTL .night_time ; Load the gamestate 03 spritesets, but don't change the save ram - LDA.l $7EF3C5 : CLC : ADC #$0001 + LDA.l GameState : CLC : ADC #$0001 RTL } LoadPeacetimeSprites: { - ; Map 2E, 2F if CRYSTALS && 0x10 == 0 + ; Map 2E, 2F if Crystals && 0x10 == 0 LDA $8A : CMP.b #$2E : BEQ .tail_palace CMP.b #$2F : BEQ .tail_palace CMP.b #$1E : BEQ .zora_sanctuary JMP + .tail_palace - LDA.l CRYSTALS : AND #$10 : BNE .load_peacetime + LDA.l Crystals : AND #$10 : BNE .load_peacetime JMP + .zora_sanctuary - LDA.l CRYSTALS : AND #$20 : BNE .load_peacetime + LDA.l Crystals : AND #$20 : BNE .load_peacetime JMP + .load_peacetime LDA.b #$01 @@ -526,7 +526,7 @@ LoadPeacetimeSprites: FixSaveAndQuit: { LDA #$08 : STA $7EE000 - LDA.l $7EF3C5 + LDA.l GameState RTL } diff --git a/Sprites/NPCs/zora.asm b/Sprites/NPCs/zora.asm index 6d96a40..de5fe51 100644 --- a/Sprites/NPCs/zora.asm +++ b/Sprites/NPCs/zora.asm @@ -105,7 +105,7 @@ Zora_TrackHeadToPlayer: Zora_HandleDialogue: { - LDA.l CRYSTALS : AND.b #$20 : BEQ +++ + LDA.l Crystals : AND.b #$20 : BEQ +++ %ShowSolicitedMessage($01A6) JMP + +++