diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-03 22:11:35 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-03 22:22:09 -0400 |
| commit | 6ef36800b0dcb86100a7c716172015667e60dc99 (patch) | |
| tree | 7e381171a7f42cadb6e619c839bfc4d3eb88e7d1 /engine/events | |
| parent | H_CONSTANTNAMES -> hConstantNames (diff) | |
| download | pokeyellow-6ef36800b0dcb86100a7c716172015667e60dc99.tar.gz pokeyellow-6ef36800b0dcb86100a7c716172015667e60dc99.tar.xz pokeyellow-6ef36800b0dcb86100a7c716172015667e60dc99.zip | |
Replace raw hex values with HRAM constants
To do: turn constants into labels and use ldh
Diffstat (limited to 'engine/events')
| -rwxr-xr-x | engine/events/cinnabar_lab.asm | 2 | ||||
| -rwxr-xr-x | engine/events/diploma.asm | 2 | ||||
| -rw-r--r-- | engine/events/hidden_objects/bookshelves.asm | 4 | ||||
| -rw-r--r-- | engine/events/hidden_objects/cinnabar_gym_quiz.asm | 12 | ||||
| -rw-r--r-- | engine/events/pick_up_item.asm | 4 | ||||
| -rwxr-xr-x | engine/events/saffron_guards.asm | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/engine/events/cinnabar_lab.asm b/engine/events/cinnabar_lab.asm index e642840d..e1598f98 100755 --- a/engine/events/cinnabar_lab.asm +++ b/engine/events/cinnabar_lab.asm @@ -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 diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index e53ef58f..24bd2f22 100755 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -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 "@" diff --git a/engine/events/hidden_objects/bookshelves.asm b/engine/events/hidden_objects/bookshelves.asm index 82cd8843..eaf744ff 100644 --- a/engine/events/hidden_objects/bookshelves.asm +++ b/engine/events/hidden_objects/bookshelves.asm @@ -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" diff --git a/engine/events/hidden_objects/cinnabar_gym_quiz.asm b/engine/events/hidden_objects/cinnabar_gym_quiz.asm index 9f549eea..6404717e 100644 --- a/engine/events/hidden_objects/cinnabar_gym_quiz.asm +++ b/engine/events/hidden_objects/cinnabar_gym_quiz.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 diff --git a/engine/events/pick_up_item.asm b/engine/events/pick_up_item.asm index 9f19100a..5a658f22 100644 --- a/engine/events/pick_up_item.asm +++ b/engine/events/pick_up_item.asm @@ -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 diff --git a/engine/events/saffron_guards.asm b/engine/events/saffron_guards.asm index 02ab92ea..59c2725c 100755 --- a/engine/events/saffron_guards.asm +++ b/engine/events/saffron_guards.asm @@ -2,7 +2,7 @@ RemoveGuardDrink:: ld hl, GuardDrinksList .drinkLoop ld a, [hli] - ld [$ffdb], a + ld [hItemToRemoveID], a and a ret z push hl |
