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

@@ -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
;--------------------------------------------------------------------------------