mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Replace raw hex values with HRAM constants
To do: turn constants into labels and use ldh
This commit is contained in:
parent
35deb77113
commit
6ef36800b0
65 changed files with 311 additions and 248 deletions
|
|
@ -35,7 +35,7 @@ GiveFossilToCinnabarLab::
|
|||
ld e, a
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
ld [$ffdb], a
|
||||
ld [hItemToRemoveID], a
|
||||
cp DOME_FOSSIL
|
||||
jr z, .choseDomeFossil
|
||||
cp HELIX_FOSSIL
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ UnusedPlayerNameLengthFunc:
|
|||
; Unused function that does a calculation involving the length of the player's
|
||||
; name.
|
||||
ld hl, wPlayerName
|
||||
ld bc, $ff00
|
||||
lb bc, $ff, $00
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp "@"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ PrintBookshelfText::
|
|||
pop af
|
||||
call PrintPredefTextID
|
||||
xor a
|
||||
ld [$ffdb], a
|
||||
ld [hFFDB], a
|
||||
ret
|
||||
.nextBookshelfEntry1
|
||||
inc hl
|
||||
|
|
@ -33,7 +33,7 @@ PrintBookshelfText::
|
|||
jr .loop
|
||||
.noMatch
|
||||
ld a, $ff
|
||||
ld [$ffdb], a
|
||||
ld [hFFDB], a
|
||||
jpba PrintCardKeyText
|
||||
|
||||
INCLUDE "data/tilesets/bookshelf_tile_ids.asm"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ CinnabarGymQuiz::
|
|||
pop af
|
||||
and $f0
|
||||
swap a
|
||||
ld [$ffdc], a
|
||||
ld [hGymGateAnswer], a
|
||||
ld hl, CinnabarGymQuizIntroText
|
||||
call PrintText
|
||||
ld a, [hGymGateIndex]
|
||||
|
|
@ -77,7 +77,7 @@ CinnabarGymGateFlagAction:
|
|||
|
||||
CinnabarGymQuiz_1ea92:
|
||||
call YesNoChoice
|
||||
ld a, [$ffdc]
|
||||
ld a, [hGymGateAnswer]
|
||||
ld c, a
|
||||
ld a, [wCurrentMenuItem]
|
||||
cp c
|
||||
|
|
@ -85,10 +85,10 @@ CinnabarGymQuiz_1ea92:
|
|||
ld hl, wCurrentMapScriptFlags
|
||||
set 5, [hl]
|
||||
ld a, [hGymGateIndex]
|
||||
ld [$ffe0], a
|
||||
ld [hBackupGymGateIndex], a
|
||||
ld hl, CinnabarGymQuizCorrectText
|
||||
call PrintText
|
||||
ld a, [$ffe0]
|
||||
ld a, [hBackupGymGateIndex]
|
||||
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
|
||||
ld c, a
|
||||
ld b, FLAG_SET
|
||||
|
|
@ -122,7 +122,7 @@ CinnabarGymQuizCorrectText:
|
|||
TX_BLINK
|
||||
TX_ASM
|
||||
|
||||
ld a, [$ffe0]
|
||||
ld a, [hBackupGymGateIndex]
|
||||
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
|
||||
ld c, a
|
||||
ld b, FLAG_TEST
|
||||
|
|
@ -162,7 +162,7 @@ UpdateCinnabarGymGateTileBlocks_::
|
|||
ld [wGymGateTileBlock], a
|
||||
push bc
|
||||
ld a, [hGymGateIndex]
|
||||
ld [$ffe0], a
|
||||
ld [hBackupGymGateIndex], a
|
||||
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
|
||||
ld c, a
|
||||
ld b, FLAG_TEST
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ PickUpItem:
|
|||
|
||||
.isMissable
|
||||
ld a, [hl]
|
||||
ld [$ffdb], a
|
||||
ld [hMissableObjectIndex], a
|
||||
|
||||
ld hl, wMapSpriteExtraData
|
||||
ld a, [hSpriteIndexOrTextID]
|
||||
|
|
@ -30,7 +30,7 @@ PickUpItem:
|
|||
call GiveItem
|
||||
jr nc, .BagFull
|
||||
|
||||
ld a, [$ffdb]
|
||||
ld a, [hMissableObjectIndex]
|
||||
ld [wMissableObjectIndex], a
|
||||
predef HideObject
|
||||
ld a, 1
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ RemoveGuardDrink::
|
|||
ld hl, GuardDrinksList
|
||||
.drinkLoop
|
||||
ld a, [hli]
|
||||
ld [$ffdb], a
|
||||
ld [hItemToRemoveID], a
|
||||
and a
|
||||
ret z
|
||||
push hl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue