From d7970f749ac23786728926109be430ab732f19e6 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 18:49:25 +0100 Subject: Consistent predef function names --- engine/party_menu.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/party_menu.asm') diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 0415e29e4..59a9904aa 100644 --- a/engine/party_menu.asm +++ b/engine/party_menu.asm @@ -188,7 +188,7 @@ PlacePartymonHPBar: ; 50117 ld d, a ld a, [hli] ld e, a - predef ComputeHPBarPixels + predef Predef_ComputeHPBarPixels ret ; 50138 @@ -297,7 +297,7 @@ PlacePartyMonStatus: ; 501b2 ld e, l ld d, h pop hl - call PlaceStatusString + call Predef_PlaceStatusString .next pop hl @@ -329,7 +329,7 @@ PlacePartyMonTMHMCompatibility: ; 501e0 add hl, de ld a, [hl] ld [CurPartySpecies], a - predef CanLearnTMHMMove + predef Predef_CanLearnTMHMMove pop hl call .PlaceAbleNotAble call PlaceString @@ -468,7 +468,7 @@ PlacePartyMonGender: ; 502b1 ld [CurPartyMon], a xor a ld [MonType], a - call GetGender + call Predef_GetGender ld de, .unknown jr c, .got_gender ld de, .male -- cgit v1.2.3 From b4e087167f3263342bbe01b5256f42fcf2d726af Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 19:38:56 +0100 Subject: More unreferenced labels and unused text --- engine/party_menu.asm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'engine/party_menu.asm') diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 59a9904aa..13181c626 100644 --- a/engine/party_menu.asm +++ b/engine/party_menu.asm @@ -817,25 +817,33 @@ PartyMenuStrings: ; 0x504d2 ChooseAMonString: ; 0x504e4 db "Choose a #MON.@" + UseOnWhichPKMNString: ; 0x504f3 db "Use on which ?@" + WhichPKMNString: ; 0x50504 db "Which ?@" + TeachWhichPKMNString: ; 0x5050e db "Teach which ?@" + MoveToWhereString: ; 0x5051e db "Move to where?@" -ChooseAFemalePKMNString: ; 0x5052d ; UNUSED + +ChooseAFemalePKMNString: ; 0x5052d +; unused db "Choose a ♀.@" -ChooseAMalePKMNString: ; 0x5053b ; UNUSED + +ChooseAMalePKMNString: ; 0x5053b +; unused db "Choose a ♂.@" + ToWhichPKMNString: ; 0x50549 db "To which ?@" YouHaveNoPKMNString: ; 0x50556 db "You have no !@" - PrintPartyMenuActionText: ; 50566 ld a, [CurPartyMon] ld hl, PartyMonNicknames -- cgit v1.2.3 From b45f89f80c62d22cbc2a4b38ae63a2da67878ee4 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 11 Jan 2018 01:45:27 -0500 Subject: More constants and data tables --- engine/party_menu.asm | 62 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 20 deletions(-) (limited to 'engine/party_menu.asm') diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 0415e29e4..911ec01d8 100644 --- a/engine/party_menu.asm +++ b/engine/party_menu.asm @@ -1,3 +1,15 @@ +; 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 @@ -57,16 +69,16 @@ WritePartyMenuTilemap: ; 0x5005f ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, " " call ByteFill ; blank the tilemap - call GetPartyMenuTilemapPointers ; This reads from a pointer table??? + call GetPartyMenuQualityIndexes .loop ld a, [hli] - cp $ff - jr z, .end ; 0x5007a $8 + cp -1 + jr z, .end push hl ld hl, .Jumptable rst JumpTable pop hl - jr .loop ; 0x50082 $f3 + jr .loop .end pop af ld [Options], a @@ -74,6 +86,7 @@ WritePartyMenuTilemap: ; 0x5005f ; 0x50089 .Jumptable: ; 50089 +; entries correspond to PARTYMENUQUALITY_* constants dw PlacePartyNicknames dw PlacePartyHPBar dw PlacePartyMenuHPDigits @@ -598,7 +611,7 @@ PartyMenuCheckEgg: ; 50389 ret ; 50396 -GetPartyMenuTilemapPointers: ; 50396 +GetPartyMenuQualityIndexes: ; 50396 ld a, [PartyMenuActionText] and $f0 jr nz, .skip @@ -620,23 +633,32 @@ GetPartyMenuTilemapPointers: ; 50396 ; 503b2 .Pointers: ; 503b2 - dw .Default - dw .Default - dw .Default - dw .TMHM - dw .Default - dw .EvoStone - dw .Gender - dw .Gender - dw .Default - dw .Mobile +; 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: db 0, 1, 2, 3, 4, $ff -.TMHM: db 0, 5, 3, 4, $ff -.EvoStone: db 0, 6, 3, 4, $ff -.Gender: db 0, 7, 3, 4, $ff -.Mobile: db 0, 8, 3, 4, $ff +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 -- cgit v1.2.3 From a436bbc23bb7ba723a7f897ddbe9d25830169612 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 11 Jan 2018 02:54:07 -0500 Subject: Move party menu qualities to data/ --- engine/party_menu.asm | 47 ++++------------------------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) (limited to 'engine/party_menu.asm') diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 911ec01d8..77f0457e2 100644 --- 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 @@ WritePartyMenuTilemap: ; 0x5005f 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 @@ GetPartyMenuQualityIndexes: ; 50396 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 @@ GetPartyMenuQualityIndexes: ; 50396 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 -- cgit v1.2.3 From 80480821142d7a7b16dd2b1a98a213e7b389af0f Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 16 Jan 2018 14:30:10 -0500 Subject: Remove Predef_ prefix from routines listed in PredefPointers --- engine/party_menu.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/party_menu.asm') diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 1efcfe417..612f1d0e0 100644 --- a/engine/party_menu.asm +++ b/engine/party_menu.asm @@ -189,7 +189,7 @@ PlacePartymonHPBar: ; 50117 ld d, a ld a, [hli] ld e, a - predef Predef_ComputeHPBarPixels + predef ComputeHPBarPixels ret ; 50138 @@ -298,7 +298,7 @@ PlacePartyMonStatus: ; 501b2 ld e, l ld d, h pop hl - call Predef_PlaceStatusString + call PlaceStatusString .next pop hl @@ -330,7 +330,7 @@ PlacePartyMonTMHMCompatibility: ; 501e0 add hl, de ld a, [hl] ld [CurPartySpecies], a - predef Predef_CanLearnTMHMMove + predef CanLearnTMHMMove pop hl call .PlaceAbleNotAble call PlaceString @@ -469,7 +469,7 @@ PlacePartyMonGender: ; 502b1 ld [CurPartyMon], a xor a ld [MonType], a - call Predef_GetGender + call GetGender ld de, .unknown jr c, .got_gender ld de, .male -- cgit v1.2.3 From b071dd364f715165d6eec99ebbd1e4aed4b84bde Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Fri, 19 Jan 2018 21:49:16 -0500 Subject: =?UTF-8?q?Japanese=20characters=20in=20Japanese=20text=20(e.g.=20?= =?UTF-8?q?"=E3=82=A9"=20not=20","=20for=20$f4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/party_menu.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/party_menu.asm') diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 612f1d0e0..33186170a 100644 --- a/engine/party_menu.asm +++ b/engine/party_menu.asm @@ -574,16 +574,16 @@ PlacePartyMonMobileBattleSelection: ; 50307 ; 5036b .String_Banme: ; 5036b - db " ばんめ @" ; Place + db " ばんめ  @" ; Place ; 50372 .String_Sanka_Shinai: ; 50372 db "さんかしない@" ; Cancel ; 50379 .String_Kettei_Yameru: ; 50379 - db "けってい やめる@" ; Quit + db "けってい  やめる@" ; Quit ; 50383 .Strings_1_2_3: ; 50383 - db "1@", "2@", "3@" ; 1st, 2nd, 3rd + db "1@", "2@", "3@" ; 1st, 2nd, 3rd ; 50389 -- cgit v1.2.3 From 05382d3e3c03616d6edf21833e89a8264a8cd10a Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sat, 20 Jan 2018 12:25:55 -0500 Subject: PARTY_LENGTH; MON_NAME; sgb_border.bin --- engine/party_menu.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/party_menu.asm') diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 33186170a..5ef9b50de 100644 --- a/engine/party_menu.asm +++ b/engine/party_menu.asm @@ -524,7 +524,7 @@ PlacePartyMonMobileBattleSelection: ; 50307 dec c jr nz, .loop ld a, l - ld e, PKMN_NAME_LENGTH + ld e, MON_NAME_LENGTH sub e ld l, a ld a, h -- cgit v1.2.3