ref: a436bbc23bb7ba723a7f897ddbe9d25830169612
parent: 16a39f655a4b46f6d2a56f28e646939e6f957712
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Wed Jan 10 21:54:07 EST 2018
Move party menu qualities to data/
--- a/constants/item_data_constants.asm
+++ b/constants/item_data_constants.asm
@@ -163,8 +163,7 @@
const MART_UNDERGROUND
-; PartyMenuActionText values
-; GetPartyMenuQualityIndexes arguments (see engine/party_menu.asm)
+; PartyMenuQualityPointers indexes (see data/party_menu_qualities.asm)
const_def
const PARTYMENUACTION_CHOOSE_POKEMON
const PARTYMENUACTION_HEALING_ITEM
--- /dev/null
+++ b/data/party_menu_qualities.asm
@@ -1,0 +1,41 @@
+; WritePartyMenuTilemap.Jumptable indexes (see engine/party_menu.asm)
+ const_def
+ const PARTYMENUQUALITY_NICKNAMES
+ const PARTYMENUQUALITY_HP_BAR
+ const PARTYMENUQUALITY_HP_DIGITS
+ const PARTYMENUQUALITY_LEVEL
+ const PARTYMENUQUALITY_STATUS
+ const PARTYMENUQUALITY_TMHM_COMPAT
+ const PARTYMENUQUALITY_EVO_STONE_COMPAT
+ const PARTYMENUQUALITY_GENDER
+ const PARTYMENUQUALITY_MOBILE_SELECTION
+
+partymenuqualities: MACRO
+rept _NARG
+ db PARTYMENUQUALITY_\1
+shift
+endr
+ db -1 ; end
+ENDM
+
+
+PartyMenuQualityPointers: ; 503b2
+; entries correspond to PARTYMENUACTION_* constants
+ dw .Default ; PARTYMENUACTION_CHOOSE_POKEMON
+ dw .Default ; PARTYMENUACTION_HEALING_ITEM
+ dw .Default ; PARTYMENUACTION_SWITCH
+ dw .TMHM ; PARTYMENUACTION_TEACH_TMHM
+ dw .Default ; PARTYMENUACTION_MOVE
+ dw .EvoStone ; PARTYMENUACTION_EVO_STONE
+ dw .Gender ; PARTYMENUACTION_GIVE_MON
+ dw .Gender ; PARTYMENUACTION_GIVE_MON_FEMALE
+ dw .Default ; PARTYMENUACTION_GIVE_ITEM
+ dw .Mobile ; PARTYMENUACTION_MOBILE
+; 503c6
+
+.Default: partymenuqualities NICKNAMES, HP_BAR, HP_DIGITS, LEVEL, STATUS
+.TMHM: partymenuqualities NICKNAMES, TMHM_COMPAT, LEVEL, STATUS
+.EvoStone: partymenuqualities NICKNAMES, EVO_STONE_COMPAT, LEVEL, STATUS
+.Gender: partymenuqualities NICKNAMES, GENDER, LEVEL, STATUS
+.Mobile: partymenuqualities NICKNAMES, MOBILE_SELECTION, LEVEL, STATUS
+; 503e0
--- a/engine/party_menu.asm
+++ b/engine/party_menu.asm
@@ -1,15 +1,3 @@
-; WritePartyMenuTilemap.Jumptable indexes
- const_def
- const PARTYMENUQUALITY_NICKNAMES
- const PARTYMENUQUALITY_HP_BAR
- const PARTYMENUQUALITY_HP_DIGITS
- const PARTYMENUQUALITY_LEVEL
- const PARTYMENUQUALITY_STATUS
- const PARTYMENUQUALITY_TMHM_COMPAT
- const PARTYMENUQUALITY_EVO_STONE_COMPAT
- const PARTYMENUQUALITY_GENDER
- const PARTYMENUQUALITY_MOBILE_SELECTION
-
SelectMonFromParty: ; 50000
call DisableSpriteUpdates
xor a
@@ -62,7 +50,7 @@
ld hl, Options
ld a, [hl]
push af
- set 4, [hl] ; Disable text delay
+ set NO_TEXT_SCROLL, [hl]
xor a
ld [hBGMapMode], a
hlcoord 0, 0
@@ -619,7 +607,7 @@
and $f
ld e, a
ld d, 0
- ld hl, .Pointers
+ ld hl, PartyMenuQualityPointers
add hl, de
add hl, de
ld a, [hli]
@@ -628,38 +616,11 @@
ret
.skip
- ld hl, .Default
+ ld hl, PartyMenuQualityPointers.Default
ret
; 503b2
-.Pointers: ; 503b2
-; entries correspond to PARTYMENUACTION_* constants
- dw .Default ; PARTYMENUACTION_CHOOSE_POKEMON
- dw .Default ; PARTYMENUACTION_HEALING_ITEM
- dw .Default ; PARTYMENUACTION_SWITCH
- dw .TMHM ; PARTYMENUACTION_TEACH_TMHM
- dw .Default ; PARTYMENUACTION_MOVE
- dw .EvoStone ; PARTYMENUACTION_EVO_STONE
- dw .Gender ; PARTYMENUACTION_GIVE_MON
- dw .Gender ; PARTYMENUACTION_GIVE_MON_FEMALE
- dw .Default ; PARTYMENUACTION_GIVE_ITEM
- dw .Mobile ; PARTYMENUACTION_MOBILE
-; 503c6
-
-partymenuqualities: MACRO
-rept _NARG
- db PARTYMENUQUALITY_\1
-shift
-endr
- db -1 ; end
-ENDM
-
-.Default: partymenuqualities NICKNAMES, HP_BAR, HP_DIGITS, LEVEL, STATUS
-.TMHM: partymenuqualities NICKNAMES, TMHM_COMPAT, LEVEL, STATUS
-.EvoStone: partymenuqualities NICKNAMES, EVO_STONE_COMPAT, LEVEL, STATUS
-.Gender: partymenuqualities NICKNAMES, GENDER, LEVEL, STATUS
-.Mobile: partymenuqualities NICKNAMES, MOBILE_SELECTION, LEVEL, STATUS
-; 503e0
+INCLUDE "data/party_menu_qualities.asm"
InitPartyMenuGFX: ; 503e0