map & lamp fixes

This commit is contained in:
Karkat
2017-05-19 00:07:56 -04:00
parent f755a63925
commit e30814ad16
5 changed files with 49 additions and 11 deletions

View File

@@ -55,6 +55,7 @@ DrawDungeonCompassCounts:
+ : ++
JSL.l HexToDec
;LDX.b #$00 ; check the width on this
LDA $7F5006 : AND.w #$00FF : ORA #$2400 : STA $7EC794
LDA $7F5007 : AND.w #$00FF : ORA #$2400 : STA $7EC796

View File

@@ -2,15 +2,32 @@
; Glitched Mode Fixes
;================================================================================
GetAgahnimType:
PHP
REP #$20 ; set 16-bit accumulator
LDA $A0 ; these are all decimal because i got them that way
CMP.w #13 : BNE + ; Agahnim 2 room
LDA.w #$0006 ; Use Agahnim 2
LDA $A0 ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.b #$0006 ; Use Agahnim 2
BRA .done
+ ; Elsewhere
LDA.w #$0001 ; Use Agahnim 1
LDA.b #$0001 ; Use Agahnim 1
.done
PLP
RTL
;--------------------------------------------------------------------------------
GetAgahnimPalette:
PHX
LDA $A0 ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.b #$01 ; Use Agahnim 2
JML.l GetAgahnimPaletteReturn
+ ; Elsewhere
LDA.b #$00 ; Use Agahnim 1
JML.l GetAgahnimPaletteReturn
;--------------------------------------------------------------------------------
GetAgahnimLightning:
INC $0E30, X ; thing we wrote over
LDA $A0 ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.b #$01 ; Use Agahnim 2
RTL
+ ; Elsewhere
LDA.b #$00 ; Use Agahnim 1
RTL
;--------------------------------------------------------------------------------

View File

@@ -765,10 +765,18 @@ NOP
;================================================================================
; Glitched Mode Fixes
;--------------------------------------------------------------------------------
org $1ED4E6 ; <- F54E6
org $1ED4E6 ; <- F54E6 - sprite_agahnim.asm:314 (LDY $0FFF)
JSL.l GetAgahnimType
NOP #2
;--------------------------------------------------------------------------------
org $1ED577 ; <- F5577 - sprite_agahnim.asm:418 (PHX)
JML.l GetAgahnimPalette
GetAgahnimPaletteReturn:
;--------------------------------------------------------------------------------
org $1ED577 ; <- F5577 - sprite_agahnim.asm:587 (INC $0E30, X)
NOP #2
JSL.l GetAgahnimLightning
;--------------------------------------------------------------------------------
;================================================================================
; Half Magic Bat
@@ -918,6 +926,9 @@ JSL.l GetMapMode
org $0DC849 ; <- 6C849
JSL.l GetMapMode
;================================================================================
org $0AC012 ; <- 54012 - Bank0A.asm:1039 (LDA $7EF2DB : AND.b #$20 : BNE BRANCH_DELTA)
NOP #8
;================================================================================
org $028B8F ; <- 10B8F - Bank02.asm:2236 (LDA $7EF374 : LSR A : BCS BRANCH_BETA)
JSL.l CheckHeraObject : BNE + : NOP
LDX.b #$F1 : STX $012C
@@ -1552,4 +1563,7 @@ NOP #6 ; remove check
;--------------------------------------------------------------------------------
org $0DFA53 ; <- 6FA53 - hud check for lantern
JSL.l LampCheck
;--------------------------------------------------------------------------------
org $01F503 ; <- F503 - Bank01.asm:14994 (LDA.b #$01 : STA $1D)
JSL.l SetOverlayIfLamp
;================================================================================

View File

@@ -30,4 +30,10 @@ CheckForZelda:
LDA $7EF3CC
RTL
;================================================================================
;--------------------------------------------------------------------------------
SetOverlayIfLamp:
LDA $7EF34A ; check if lamp
STA $1D ; write it directly to the overlay, this isn't a terrible idea at all
RTL
;================================================================================
;LDA $7EF3CA : EOR #$40 : LSR #6 : AND #$01 ; return the same result as having the lantern in the light world

View File

@@ -131,7 +131,7 @@ org $30803B ; PC 0x18003B
MapMode:
db #$00 ; #$00 = Always On (default) - #$01 = Require Map Item
CompassMode:
db #$01 ; #$00 = Off (default) - #$01 = Display Dungeon Count
db #$00 ; #$00 = Off (default) - #$01 = Display Dungeon Count
;--------------------------------------------------------------------------------
org $308080 ; PC 0x180080
Upgrade5BombsRefill:
@@ -145,9 +145,9 @@ db #$00
;--------------------------------------------------------------------------------
org $308084 ; PC 0x180084
PotionHealthRefill:
db #$08 ; #$A0 - Full Refill (Default)
db #$A0 ; #$A0 - Full Refill (Default)
PotionMagicRefill:
db #$08 ; #$80 - Full Refill (Default)
db #$80 ; #$80 - Full Refill (Default)
;--------------------------------------------------------------------------------
org $308040 ; PC 0x180040
UncleQuote: