From 324944f56da91a53245c0c6755f479ec80891f8d Mon Sep 17 00:00:00 2001 From: earthoul Date: Tue, 27 Jan 2026 17:32:11 +0900 Subject: [PATCH 1/4] =?UTF-8?q?Relabel=20the=20=E2=80=BB=20symbol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/charmaps.asm | 2 +- src/engine/bank01.asm | 2 +- src/engine/bank04.asm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/constants/charmaps.asm b/src/constants/charmaps.asm index 7c3e0d9..5b5665c 100644 --- a/src/constants/charmaps.asm +++ b/src/constants/charmaps.asm @@ -1217,7 +1217,7 @@ ENDM txsymbol "CONFUSED" ; $0b txsymbol "PARALYZED" ; $0c txsymbol "CURSOR_U" ; $0d - txsymbol "ATK_DESCR" ; $0e + txsymbol "REF_MARK" ; $0e txsymbol "CURSOR_R" ; $0f txsymbol "HP" ; $10 txsymbol "Lv" ; $11 diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm index 7f89680..3ac0e1b 100644 --- a/src/engine/bank01.asm +++ b/src/engine/bank01.asm @@ -3607,7 +3607,7 @@ PrintAttackOrPkmnPowerInformation: ld b, 7 ld c, e inc c - ld a, SYM_ATK_DESCR + ld a, SYM_REF_MARK call WriteByteToBGMap0 .print_damage inc hl diff --git a/src/engine/bank04.asm b/src/engine/bank04.asm index 473d56c..af3bfff 100644 --- a/src/engine/bank04.asm +++ b/src/engine/bank04.asm @@ -1223,7 +1223,7 @@ HandlePauseMenu: jr z, .done_show_menu ; has new mail(s), so add an asterisk lb bc, 18, 8 - ld d, SYM_ATK_DESCR + ld d, SYM_REF_MARK ld e, $00 ; priority call Func_383b .done_show_menu From 09162211bdf83e10a7775322e4621208d2274933 Mon Sep 17 00:00:00 2001 From: earthoul Date: Tue, 27 Jan 2026 18:00:39 +0900 Subject: [PATCH 2/4] Refactor leftovers from #53 --- src/constants/game_event_constants.asm | 2 -- src/engine/bank0c.asm | 10 ++++++---- src/engine/bank0f.asm | 10 ++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/constants/game_event_constants.asm b/src/constants/game_event_constants.asm index 1c6c449..93e8b2c 100644 --- a/src/constants/game_event_constants.asm +++ b/src/constants/game_event_constants.asm @@ -30,5 +30,3 @@ DEF NUM_GAME_EVENTS EQU const_value ; 6 const OWMODE_MUSIC_POSTLOAD ; $10 const OWMODE_AFTER_DUEL_PRELOAD ; $11 const OWMODE_PAUSE_MENU ; $12 - -; DEF NUM_OWMODES EQU const_value ; $13 diff --git a/src/engine/bank0c.asm b/src/engine/bank0c.asm index 8885ea0..8617c6a 100644 --- a/src/engine/bank0c.asm +++ b/src/engine/bank0c.asm @@ -1284,18 +1284,20 @@ Func_31447: farcall ZeroOutVarValue pop af jr nz, .done +; cup winner, so switch the cup state from start to end/inactive +; by incrementing if cup 1, 2 +; or by (verbosely) decremmenting if cup 3 +; due to the constants' ordering ld a, VAR_GR_CHALLENGE_CUP_STATE farcall GetVarValue cp CHALLENGE_CUP_3_START - jr z, .adjust + jr z, .won_cup3 inc a ld c, a ld a, VAR_GR_CHALLENGE_CUP_STATE farcall SetVarValue jr .done -; keep the state var < 7 -; verbose: dec a between inc a :: ld c, a above should suffice -.adjust +.won_cup3 ld a, VAR_GR_CHALLENGE_CUP_STATE ld c, CHALLENGE_CUP_3_UNLOCKED farcall SetVarValue diff --git a/src/engine/bank0f.asm b/src/engine/bank0f.asm index 9da07d9..83b10f4 100644 --- a/src/engine/bank0f.asm +++ b/src/engine/bank0f.asm @@ -2326,18 +2326,20 @@ Func_3d210: farcall ZeroOutVarValue pop af jr nz, .done +; cup winner, so switch the cup state from start to end +; by incrementing if cup 1, 2 +; or by (verbosely) decremmenting if cup 3 +; due to the constants' ordering ld a, VAR_TCG_CHALLENGE_CUP_STATE farcall GetVarValue cp CHALLENGE_CUP_3_START - jr z, .adjust + jr z, .won_cup3 inc a ld c, a ld a, VAR_TCG_CHALLENGE_CUP_STATE farcall SetVarValue jr .done -; keep the state var < 7 -; verbose: dec a between inc a :: ld c, a above should suffice -.adjust +.won_cup3 ld a, VAR_TCG_CHALLENGE_CUP_STATE ld c, CHALLENGE_CUP_3_UNLOCKED farcall SetVarValue From 72f29850f23c0b601f3fda0ed3ef33f44d379ad1 Mon Sep 17 00:00:00 2001 From: earthoul Date: Thu, 29 Jan 2026 18:02:17 +0900 Subject: [PATCH 3/4] Improve explanations of NPC name texts --- src/text/text_offsets.asm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/text/text_offsets.asm b/src/text/text_offsets.asm index c9b9053..6584e69 100644 --- a/src/text/text_offsets.asm +++ b/src/text/text_offsets.asm @@ -1065,9 +1065,11 @@ TextOffsets:: textpointer DebugTransmittingMenuText ; 0x0423 textpointer DebugLectureDuelText ; 0x0424 textpointer FirstStrikeDeckText ; 0x0425 - ; names of opponents and their decks, intermixed and sorted by character encoding - ; cf. 0x09d0--: NPC names for the dialog box header - ; causing variance, e.g. "トビちゃん" vs "とびちゃん" for Tobi-chan + +; names of opponents and their decks, intermixed and sorted by character encoding +; unlike *NPCName in tcg1, npc names are split into +; Duelist*Name (here) and Dialog*Text (0x09d0--), +; which also causes variance, e.g. "トビちゃん" vs "とびちゃん" for Tobi-chan textpointer ThunderboltDeckName ; 0x0426 textpointer DuelistGR1Name ; 0x0427 textpointer DuelistGR2Name ; 0x0428 @@ -1277,6 +1279,7 @@ TextOffsets:: textpointer RockBlastDeckName ; 0x04f4 textpointer DuelistAdamName ; 0x04f5 textpointer DuelistMainCharacterName ; 0x04f6 + textpointer DrMasonText ; 0x04f7 textpointer PracticeDuelHeaderPlayersTurnNumberText ; 0x04f8 textpointer PracticeDuelHeaderKnockedOutReplaceText ; 0x04f9 @@ -2518,6 +2521,9 @@ TextOffsets:: textpointer MapGRPsychicStrongholdText ; 0x09cd textpointer MapGRColorlessAltarText ; 0x09ce textpointer MapGRCastleText ; 0x09cf + +; npc names in the dialog box header +; see also Duelist*Name (0x0426--) textpointer DialogDrMasonText ; 0x09d0 textpointer DialogSamText ; 0x09d1 textpointer DialogAaronText ; 0x09d2 @@ -2658,6 +2664,7 @@ TextOffsets:: textpointer DialogStaffText ; 0x0a59 textpointer DialogReceptionistText ; 0x0a5a textpointer DialogCupHostText ; 0x0a5b + textpointer GRFireFortShortText ; 0x0a5c textpointer GRWaterFortShortText ; 0x0a5d textpointer GRLightningFortShortText ; 0x0a5e From 30d015f8f87add20cc476e43457753da6aee4e01 Mon Sep 17 00:00:00 2001 From: earthoul Date: Thu, 29 Jan 2026 18:07:52 +0900 Subject: [PATCH 4/4] Fix the comment on the asterisk, which is now REF_MARK --- src/engine/bank04.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/bank04.asm b/src/engine/bank04.asm index af3bfff..010614d 100644 --- a/src/engine/bank04.asm +++ b/src/engine/bank04.asm @@ -1221,7 +1221,7 @@ HandlePauseMenu: farcall DrawMenuBox farcall GetNewMailFlag jr z, .done_show_menu -; has new mail(s), so add an asterisk +; has new mail(s), so add a ref mark lb bc, 18, 8 ld d, SYM_REF_MARK ld e, $00 ; priority