diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-10-29 14:45:40 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-10-29 14:51:41 -0400 |
commit | bcc0d633e948227e68da8a264d1533771a54b5c4 (patch) | |
tree | f28e95e126f4f398597539f5c45205ed048561e5 /engine/overworld | |
parent | ea426a88794b1d216a278b54d18cefafbf7d8771 (diff) |
Identify the remaining (non-mobile) uses of another WRAM union
Diffstat (limited to 'engine/overworld')
-rw-r--r-- | engine/overworld/decorations.asm | 29 | ||||
-rw-r--r-- | engine/overworld/scripting.asm | 2 |
2 files changed, 17 insertions, 14 deletions
diff --git a/engine/overworld/decorations.asm b/engine/overworld/decorations.asm index 3499cf54f..6cc86181a 100644 --- a/engine/overworld/decorations.asm +++ b/engine/overworld/decorations.asm @@ -44,7 +44,7 @@ _PlayerDecorationMenu: .MenuData: db STATICMENU_CURSOR | STATICMENU_WRAP ; flags db 0 ; items - dw wd002 + dw wNumOwnedDecoCategories dw PlaceNthMenuStrings dw .pointers @@ -75,7 +75,7 @@ _PlayerDecorationMenu: ld a, 7 call .AppendToStringBuffer2 ld hl, wStringBuffer2 - ld de, wd002 + ld de, wDecoNameBuffer ld bc, ITEM_NAME_LENGTH call CopyBytes ret @@ -133,10 +133,11 @@ _PlayerDecorationMenu: Deco_FillTempWithMinusOne: xor a - ld hl, wd002 + ld hl, wNumOwnedDecoCategories ld [hli], a + assert wNumOwnedDecoCategories + 1 == wOwnedDecoCategories ld a, -1 - ld bc, $10 + ld bc, 16 call ByteFill ret @@ -161,10 +162,11 @@ CheckAllDecorationFlags: ret AppendDecoIndex: - ld hl, wd002 + ld hl, wNumOwnedDecoCategories inc [hl] + assert wNumOwnedDecoCategories + 1 == wOwnedDecoCategories ld e, [hl] - ld d, $0 + ld d, 0 add hl, de ld [hl], a ret @@ -176,7 +178,7 @@ FindOwnedDecosInCategory: pop hl call CheckAllDecorationFlags pop bc - ld a, [wd002] + ld a, [wNumOwnedDecoCategories] and a ret z @@ -335,7 +337,7 @@ DecoExitMenu: ret PopulateDecoCategoryMenu: - ld a, [wd002] + ld a, [wNumOwnedDecoCategories] and a jr z, .empty cp 8 @@ -353,9 +355,10 @@ PopulateDecoCategoryMenu: ret .beyond_eight - ld hl, wd002 + ld hl, wNumOwnedDecoCategories ld e, [hl] dec [hl] + assert wNumOwnedDecoCategories + 1 == wOwnedDecoCategories ld d, 0 add hl, de ld [hl], -1 @@ -395,7 +398,7 @@ PopulateDecoCategoryMenu: .NonscrollingMenuData: db STATICMENU_CURSOR | STATICMENU_WRAP ; flags db 0 ; items - dw wd002 + dw wDecoNameBuffer dw DecorationMenuFunction dw DecorationAttributes @@ -409,10 +412,10 @@ PopulateDecoCategoryMenu: db SCROLLINGMENU_DISPLAY_ARROWS ; flags db 8, 0 ; rows, columns db SCROLLINGMENU_ITEMS_NORMAL ; item format - dbw 0, wd002 ; text pointer + dbw 0, wDecoNameBuffer ; text pointer dba DecorationMenuFunction - dbw 0, 0 - dbw 0, 0 + dbw 0, NULL + dbw 0, NULL GetDecorationData: ld hl, DecorationAttributes diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm index 8258ea830..d9878269b 100644 --- a/engine/overworld/scripting.asm +++ b/engine/overworld/scripting.asm @@ -1703,7 +1703,7 @@ Script_givepokemail: push bc inc hl ld bc, MAIL_MSG_LENGTH - ld de, wd002 + ld de, wMonMailMessageBuffer ld a, [wScriptBank] call FarCopyBytes pop bc |