From 04b5c013a9668e3bd5ab967679962cdf036de3f8 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:28:59 +0200 Subject: [PATCH] Adds config to show target of ingame partner (#5307) * Adds config to show chosen move and target of ingame partner, `#define B_SHOW_PARTNER_TARGET`, default `FALSE` --------- Co-authored-by: Hedara --- charmap.txt | 1 + gflib/characters.h | 1 + graphics/fonts/latin_normal.png | Bin 3543 -> 4661 bytes include/config/battle.h | 3 +++ src/battle_controller_player.c | 36 +++++++++++++++++++++++++++++++- src/fonts.c | 2 +- 6 files changed, 41 insertions(+), 2 deletions(-) diff --git a/charmap.txt b/charmap.txt index 4c9f2e0497..e5a901d6d9 100644 --- a/charmap.txt +++ b/charmap.txt @@ -45,6 +45,7 @@ SUPER_ER = 2C LV = 34 '=' = 35 ';' = 36 +V_D_ARROW = 38 '¿' = 51 '¡' = 52 PK = 53 diff --git a/gflib/characters.h b/gflib/characters.h index 8ed440e63a..3725cecce0 100644 --- a/gflib/characters.h +++ b/gflib/characters.h @@ -53,6 +53,7 @@ #define CHAR_EQUALS 0x35 #define CHAR_SEMICOLON 0x36 #define CHAR_BARD_WORD_DELIMIT 0x37 // Empty space to separate words in Bard's song +#define CHAR_V_D_ARROW 0x38 #define CHAR_INV_QUESTION_MARK 0x51 #define CHAR_INV_EXCL_MARK 0x52 #define CHAR_PK 0x53 diff --git a/graphics/fonts/latin_normal.png b/graphics/fonts/latin_normal.png index ade914858f4810795c03faa18e38f1263f761091..d1de69d136c6fff2a296f42ee6e46c003f6c0493 100644 GIT binary patch literal 4661 zcmc(j`8U*$_s3tam%-S_R+j8V%7iFB8D@yo+uDvSQ_5DD53(;WhDaLIyLVKUQ4(cI zlqJiIkR>8y$u^PD$PC7tF=l*vf6w`R{)O*3&vWkcp8M0|o^#K+_uh7Pw3QH55(NN2 z;?zm&GXMbowh(|6_#ND=t-5{(F!YSA6;SbM&*JYy+}Zw|4Y_m2)YNozba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ZF`JTU$dF^>G}WsIs?GA z?J;GzeDAjKpSO1>PMkP#;>3v)Cr+F=apJ^@6DLlbIB|dC#EBCpPMkP#;>3v)Cr+F= zapJ^@6DLlbIB`-)KJtVpm2V2LEX1wt9DsJ)grSfn(z}2W{FZfI%Pk$(7w!pFI@RJX zWx7q_2gq0z;^8i*vupQoHvuU9(Eut`qmSwQ14^`1#aBfX4-DYeGM|e9YGnhErzrCS z^hp)pHK~6>)c>&zKs5>YLnQ%N7vd2T)A_Zs>TCtLb3lL{!Mz`K4xPM>Hm~z{j~@k` z5ZY>SlkmSiw+~bkDoFsz$0(69HtGD5)nShg7-;uF3m-?~_MvkkL5Y;;37x-VoyNJ3 zxA`dJlx7heD|RcFMdJIASXUi z!}fryfAEA80`%#pG>y?b7SLQ5Jm&CYJ+J+S?7US`V_ldUK#=HpJ>Fb-e9BfT<=17N zd9^I9bLr>{?Y3b1PnXPH(#_@?w9JePK~1nWf++)nj=QUziwvuCKl{1LP)hkbi`q9w z-d7!~6`&_U!iVU;chosenMovePositions + B_POSITION_PLAYER_RIGHT)]; + StringAppend(gStringVar1, gMovesInfo[move].name); + if (gMovesInfo[move].target == MOVE_TARGET_SELECTED) + { + if (gBattleStruct->aiChosenTarget[B_POSITION_PLAYER_RIGHT] == B_POSITION_OPPONENT_LEFT) + StringAppend(gStringVar1, COMPOUND_STRING(" -{UP_ARROW}")); + else if (gBattleStruct->aiChosenTarget[B_POSITION_PLAYER_RIGHT] == B_POSITION_OPPONENT_RIGHT) + StringAppend(gStringVar1, COMPOUND_STRING(" {UP_ARROW}-")); + else if (gBattleStruct->aiChosenTarget[B_POSITION_PLAYER_RIGHT] == B_POSITION_PLAYER_LEFT) + StringAppend(gStringVar1, COMPOUND_STRING(" {DOWN_ARROW}-")); + else if (gBattleStruct->aiChosenTarget[B_POSITION_PLAYER_RIGHT] == B_POSITION_PLAYER_RIGHT) + StringAppend(gStringVar1, COMPOUND_STRING(" {DOWN_ARROW}-")); + } + else if (gMovesInfo[move].target == MOVE_TARGET_BOTH) + { + StringAppend(gStringVar1, COMPOUND_STRING(" {UP_ARROW}{UP_ARROW}")); + } + else if (gMovesInfo[move].target == MOVE_TARGET_FOES_AND_ALLY) + { + StringAppend(gStringVar1, COMPOUND_STRING(" {V_D_ARROW}{UP_ARROW}")); + } + else if (gMovesInfo[move].target == MOVE_TARGET_ALL_BATTLERS) + { + StringAppend(gStringVar1, COMPOUND_STRING(" {V_D_ARROW}{V_D_ARROW}")); + } + BattlePutTextOnWindow(gStringVar1, B_WIN_ACTION_PROMPT); + } + else + { + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_ACTION_PROMPT); + } } static void PlayerHandleYesNoBox(u32 battler) diff --git a/src/fonts.c b/src/fonts.c index 6bd2d35e83..3f2c536985 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -149,7 +149,7 @@ ALIGNED(4) const u8 gFontNormalLatinGlyphWidths[] = { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 9, 7, 6, 3, - 3, 3, 3, 3, 10, 8, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 10, 8, 3, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6,