Fixed tablets checking for item collected, uses NpcFlags+1 Deleted mantle.asm, moved to lampmantlecone.asm
60 lines
1.3 KiB
NASM
60 lines
1.3 KiB
NASM
; Note shortly before this we have a blank-the-sram slot code that we might want to hook
|
|
WriteBlanksToPlayerName:
|
|
STA.l ExtendedFileNameSRAM
|
|
STA.l ExtendedFileNameSRAM+2
|
|
STA.l ExtendedFileNameSRAM+4
|
|
STA.l ExtendedFileNameSRAM+6
|
|
|
|
STA.l ExtendedFileNameSRAM+8
|
|
STA.l ExtendedFileNameSRAM+10
|
|
STA.l ExtendedFileNameSRAM+12
|
|
STA.l ExtendedFileNameSRAM+14
|
|
|
|
STA.l ExtendedFileNameSRAM+16
|
|
STA.l ExtendedFileNameSRAM+18
|
|
STA.l ExtendedFileNameSRAM+20
|
|
STA.l ExtendedFileNameSRAM+22
|
|
|
|
STA.l FileNameVanillaSRAM, X ;What we wrote over (clear first byte of vanilla name slot)
|
|
RTL
|
|
|
|
WriteCharacterToPlayerName:
|
|
STA.l ExtendedFileNameSRAM, X
|
|
CPX.w #$0008 : !BGE +
|
|
STA.l FileNameVanillaSRAM, X ;what we wrote over
|
|
+
|
|
RTL
|
|
|
|
ReadCharacterFromPlayerName: ;Only for use on Name Screen
|
|
LDA.l ExtendedFileNameSRAM, X
|
|
CPX.w #$0008 : !BGE +
|
|
LDA.l FileNameVanillaSRAM, X ;what we wrote over
|
|
+
|
|
RTL
|
|
|
|
GetCharacterPosition:
|
|
PHB : PHK : PLB
|
|
ORA.w CharacterPositions, Y
|
|
XBA
|
|
PLB
|
|
RTL
|
|
|
|
WrapCharacterPosition:
|
|
LDA.w PlayerNameCursor : BPL +
|
|
LDA.b #$0B
|
|
+
|
|
CMP.b #$0C : !BLT +
|
|
LDA.b #$00
|
|
+
|
|
STA.w PlayerNameCursor
|
|
RTL
|
|
|
|
CharacterPositions:
|
|
dw $006E, $006F, $0070, $0071
|
|
dw $0073, $0074, $0075, $0076
|
|
dw $0078, $0079, $007a, $007b
|
|
HeartCursorPositions:
|
|
db $70, $78, $80, $88
|
|
db $98, $a0, $a8, $b0
|
|
db $c0, $c8, $d0, $d8
|