From 14574d6548556c577be2419a02dfa9eb8b899b2c Mon Sep 17 00:00:00 2001 From: Ninjdai Date: Mon, 13 Nov 2023 20:34:59 +0100 Subject: [PATCH] Added move type split icons in battle --- README.md | 21 ++++++++++---- graphics/interface/split_icons_battle.png | Bin 0 -> 5237 bytes include/constants/battle.h | 2 +- src/battle_bg.c | 32 +++++++++++----------- src/battle_controller_player.c | 19 +++++++++++++ src/battle_message.c | 4 +-- 6 files changed, 53 insertions(+), 25 deletions(-) create mode 100644 graphics/interface/split_icons_battle.png diff --git a/README.md b/README.md index ba5f3b43a..f68ca05d4 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,12 @@ If you have suggestions, found bugs, or just want to talk, feel free to DM me on * Battle mechanics such as megas, S/P split, fairy type... * New Exp Share * For more info, check out [their github](https://github.com/rh-hideout/pokeemerald-expansion) -- SIDEWAYS STAIRS :OOOOOO [by ghoulslash](https://www.pokecommunity.com/showthread.php?p=10175618) (Best feature of the hack frfr) +- SIDEWAYS STAIRS :OOOOOO (Best feature of the hack frfr) - QOL * Bigger bag (Up to 999 of each item) - * X/Y-style wrapping summary screen ([Zeturic](https://www.pokecommunity.com/showpost.php?p=10060875&postcount=27)) - * Options default to fast text speed and set battle type - * Day/Night system [by quocmanh94](https://github.com/quocmanh94/pokeemerald/commit/a0fd237009a1bd1f999e3ab25ca07508985b4435) - * Faster text speed ([ellabrella](https://www.pokecommunity.com/showpost.php?p=10400198)) - * EV/IV Menu (will be accessible in the late game) (credits go to [LOuroboros](https://github.com/DizzyEggg/pokeemerald/commit/e11dac36d69b09557a63a217caa33c7e11728831) and [Acimut](https://github.com/Acimut/Custom-EV-IV-Display-Screen)) + * Text greatly sped up. + * Day/Night system + * EV/IV Menu (will be accessible in the late game) **WIP** - Brand new region of ??????? @@ -36,6 +34,7 @@ If you have suggestions, found bugs, or just want to talk, feel free to DM me on - Adapt encounters to D/N system - Every pokemon obtainable, including mythicals/legendaries - 4G-esque OW graphics +- Ability to change IVs - Better inventory system * TM Case, Berry pouch * Later gen-like UI @@ -52,6 +51,16 @@ If you have suggestions, found bugs, or just want to talk, feel free to DM me on ### Overworld Sprites ### Battle graphics - Vent +### Code +- The RHH team (pokeemerald-expansion) +- Ghoulslash (sideways stairs, a lot of contributions in various projects and feature branches) +- Quocmanh94 (Day/Night system) +- LOuroboros (EV/IV Menu) +- Acimut (EV/IV Menu) +- Ellabrella (Text speed changes) +- Zeturic (X/Y-style wrapping summary screen) +- Anon822 (Physical/Special split icons in battle) + ### Tools used - Porymap - Gimp diff --git a/graphics/interface/split_icons_battle.png b/graphics/interface/split_icons_battle.png new file mode 100644 index 0000000000000000000000000000000000000000..25567cf90883964952a85d26a175b8d67b1a851f GIT binary patch literal 5237 zcmV-*6pHJKP)T%~}000qydQ@0+Qek%> zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3*tmgKk%g#YstJ_0uow-^cxne_3*MS+tf`isxT$xy8<#>Ysn@J_n!g^ZUVny!m$A zrH?NnhwQ_9K>K@s=eYd1;A4z1z8`n>{U+A;Mju1IH%vBiv`-`dbsyv5OI4|5I zA&KK9rTET-fP7otXJq}?0DTLx$h)+kqyPEtr{Kr_9#22TvV7dA{Q8R^zYhKl@t1+q z`_6Ir+ZT0(KQ8C}J7?8%_OrU43lS|ZqP+Wvj$OlvgOI0tS>d7l3Gekj8jtF`pQL>G z=?9M)T8L!jxRApNJ)E%b>kN}A=D4Hs8sm)V9;-=Xi!)iCvOU6ynp#?^lD8SRBWF3q z&$)yTfc9&h^n7yJNKGAK99l?8S`o?8qFKd_ZsB^E*`JE#pjx_R+QHG8>+UOJb%sge5sk6>D`-&?qXkwM6tFE^C4sOE~J8#)# z>#n=)e!$vECm%WG=&7fj{+YG#mhI1ve~`8CW-Z=K*?IbzHI6#fk6Q$z6S16;v6urH zSIYo^j+QfDL(b7MXF2mNQWO%Iq*!ho#ZJaZVcsFi37@(9k-5K>Hz)OPi(FwUu11rpPM&hPZe5BeWLn~wjQhF&wHN!&TE<{O<9b*(%vbv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7Rb`6kz)a6sE`~#_#gc4*33;#xJjWH(EeiEA0t3;7pPZl z`}^3o>nA|q8MxA#{&EeN`6RvC)FMYf?>2C8-PGhg;Bp5Te9|RDa-;xFe=Y~SpV2pE zfc{&cYt8Mgv5(USAVpmzZh(VBU^GwJ>mKj!XzlIaGmZX!02w)QgFqBk-2eapFi=cX zMUU~Z@qsbHF)6vB`AIpEaXI;^sd@SN`2hg|+}zv%0000000000000000000008e}g zf&c&j0b)x>L;#2d9Y_EG010qNS#tmY5_A9n5_AFHW*>L}000McNliru<_8c74-IYAQe1hZO-kZ3FTa{|TN`X;&{ zDqHxfkKs)+O?jpH#zrACK(~kiT5Ysx1)cf zEC8F30Hi=MC)AeQtpX5DIcSAe);!3`#W+2u8gb!9!kk9 v$jpOaz=(4Nmpr26+CiJ&w@&iTYVw{3)J&1pu>RfM00000NkvXXu0mjf^%C#u literal 0 HcmV?d00001 diff --git a/include/constants/battle.h b/include/constants/battle.h index 5e94f27fe..fb6d3121b 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -442,7 +442,7 @@ #define B_WIN_MOVE_NAME_3 5 // Bottom left #define B_WIN_MOVE_NAME_4 6 // Bottom right #define B_WIN_PP 7 -#define B_WIN_DUMMY 8 +#define B_WIN_SPLIT_ICON 8 #define B_WIN_PP_REMAINING 9 #define B_WIN_MOVE_TYPE 10 #define B_WIN_SWITCH_PROMPT 11 // "Switch which?" diff --git a/src/battle_bg.c b/src/battle_bg.c index 56a7079af..0b80fa1a3 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -220,21 +220,21 @@ static const struct WindowTemplate sStandardBattleWindowTemplates[] = }, [B_WIN_PP] = { .bg = 0, - .tilemapLeft = 21, + .tilemapLeft = 23, .tilemapTop = 55, - .width = 4, + .width = 2, .height = 2, .paletteNum = 5, .baseBlock = 0x0290, }, - [B_WIN_DUMMY] = { + [B_WIN_SPLIT_ICON] = { .bg = 0, .tilemapLeft = 21, - .tilemapTop = 57, - .width = 0, - .height = 0, - .paletteNum = 5, - .baseBlock = 0x0298, + .tilemapTop = 55, + .width = 2, + .height = 2, + .paletteNum = 10, + .baseBlock = 0x0294, }, [B_WIN_PP_REMAINING] = { .bg = 0, @@ -441,21 +441,21 @@ static const struct WindowTemplate sBattleArenaWindowTemplates[] = }, [B_WIN_PP] = { .bg = 0, - .tilemapLeft = 21, + .tilemapLeft = 23, .tilemapTop = 55, - .width = 4, + .width = 2, .height = 2, .paletteNum = 5, .baseBlock = 0x0290, }, - [B_WIN_DUMMY] = { + [B_WIN_SPLIT_ICON] = { .bg = 0, .tilemapLeft = 21, - .tilemapTop = 57, - .width = 0, - .height = 0, - .paletteNum = 5, - .baseBlock = 0x0298, + .tilemapTop = 55, + .width = 2, + .height = 2, + .paletteNum = 10, + .baseBlock = 0x0294, }, [B_WIN_PP_REMAINING] = { .bg = 0, diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 3a464910e..ff2111140 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -93,6 +93,8 @@ static void PrintLinkStandbyMsg(void); static void ReloadMoveNames(u32 battler); +static void MoveSelectionDisplaySplitIcon(u32 battler); + static void (*const sPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(u32 battler) = { [CONTROLLER_GETMONDATA] = BtlController_HandleGetMonData, @@ -1674,7 +1676,10 @@ static void MoveSelectionDisplayMoveType(u32 battler) *(txtPtr)++ = FONT_NORMAL; StringCopy(txtPtr, gTypeNames[gBattleMoves[moveInfo->moves[gMoveSelectionCursor[battler]]].type]); + //EDIT HERE REMINDER BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_TYPE); + + MoveSelectionDisplaySplitIcon(battler); } void MoveSelectionCreateCursorAt(u8 cursorPosition, u8 baseTileNum) @@ -2232,3 +2237,17 @@ static void PlayerHandleBattleDebug(u32 battler) SetMainCallback2(CB2_BattleDebugMenu); gBattlerControllerFuncs[battler] = Controller_WaitForDebug; } + +static void MoveSelectionDisplaySplitIcon(u32 battler){ + static const u16 sSplitIcons_Pal[] = INCBIN_U16("graphics/interface/split_icons_battle.gbapal"); + static const u8 sSplitIcons_Gfx[] = INCBIN_U8("graphics/interface/split_icons_battle.4bpp"); + struct ChooseMoveStruct *moveInfo; + int icon; + + moveInfo = (struct ChooseMoveStruct*)(&gBattleResources->bufferA[battler][4]); + icon = GetBattleMoveSplit(moveInfo->moves[gMoveSelectionCursor[battler]]); + LoadPalette(sSplitIcons_Pal, 10 * 0x10, 0x20); + BlitBitmapToWindow(B_WIN_SPLIT_ICON, sSplitIcons_Gfx + 0x80 * icon, 0, 0, 16, 16); + PutWindowTilemap(B_WIN_SPLIT_ICON); + CopyWindowToVram(B_WIN_SPLIT_ICON, 3); +} diff --git a/src/battle_message.c b/src/battle_message.c index 41e34b44f..32ba47883 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2249,7 +2249,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .bgColor = 14, .shadowColor = 11, }, - [B_WIN_DUMMY] = { + [B_WIN_SPLIT_ICON] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0, @@ -2489,7 +2489,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .bgColor = 14, .shadowColor = 11, }, - [B_WIN_DUMMY] = { + [B_WIN_SPLIT_ICON] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0,