mirror of https://github.com/pret/pokeemerald.git
Replaced DrawStdWindowFrameBattleInfoSystem with DrawStdWindowFrame
parent
7e8e24a7ce
commit
6b74c2da45
|
@ -21,21 +21,6 @@ index 4dfa31cec8..b1ac50303e 100644
|
|||
#define ARENA_WIN_VS 16
|
||||
```
|
||||
|
||||
```diff
|
||||
-------------------------------- include/menu.h --------------------------------
|
||||
index 0b0a42423d..cc956e5334 100644
|
||||
@@ -95,8 +95,9 @@ u8 GetStartMenuWindowId(void);
|
||||
void ListMenuLoadStdPalAt(u8 palOffset, u8 palId);
|
||||
u8 Menu_MoveCursor(s8 cursorDelta);
|
||||
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta);
|
||||
void DrawStdWindowFrame(u8 windowId, bool8 CopyToVram);
|
||||
+void DrawStdWindowFrameBattleInfoSystem(u8 windowId);
|
||||
u8 AddStartMenuWindow(u8 numActions);
|
||||
u8 InitMenuNormal(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos);
|
||||
void LoadMessageBoxAndFrameGfx(u8 windowId, bool8 copyToVram);
|
||||
void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress);
|
||||
```
|
||||
|
||||
```diff
|
||||
------------------------------- src/battle_bg.c -------------------------------
|
||||
index f24bb5d28a..9f76f1e0ff 100644
|
||||
|
@ -72,7 +57,6 @@ index 6bf2b9d0cb..1d0317c010 100644
|
|||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/rgb.h"
|
||||
+#include "menu.h"
|
||||
+#include "pokemon_summary_screen.h"
|
||||
|
||||
static void PlayerHandleGetMonData(void);
|
||||
|
@ -93,9 +77,7 @@ index 6bf2b9d0cb..1d0317c010 100644
|
|||
[CONTROLLER_TERMINATOR_NOP] = PlayerCmdEnd
|
||||
};
|
||||
|
||||
+EWRAM_DATA bool8 gAdditionalBattleInfoSubmenu = 0;
|
||||
+
|
||||
+
|
||||
+static EWRAM_DATA bool8 sDescriptionSubmenu = 0;
|
||||
+
|
||||
static const u8 sTargetIdentities[MAX_BATTLERS_COUNT] = {B_POSITION_PLAYER_LEFT, B_POSITION_PLAYER_RIGHT, B_POSITION_OPPONENT_RIGHT, B_POSITION_OPPONENT_LEFT};
|
||||
|
||||
|
@ -107,11 +89,11 @@ index 6bf2b9d0cb..1d0317c010 100644
|
|||
gPlayerDpadHoldFrames = 0;
|
||||
|
||||
- if (JOY_NEW(A_BUTTON))
|
||||
+ if (gAdditionalBattleInfoSubmenu)
|
||||
+ if (sDescriptionSubmenu)
|
||||
+ {
|
||||
+ if (JOY_NEW(START_BUTTON) || JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON))
|
||||
+ {
|
||||
+ gAdditionalBattleInfoSubmenu = FALSE;
|
||||
+ sDescriptionSubmenu = FALSE;
|
||||
+ FillWindowPixelBuffer(B_WIN_MOVE_DESCRIPTION, PIXEL_FILL(0));
|
||||
+ ClearStdWindowAndFrame(B_WIN_MOVE_DESCRIPTION, FALSE);
|
||||
+ CopyWindowToVram(B_WIN_MOVE_DESCRIPTION, COPYWIN_GFX);
|
||||
|
@ -132,7 +114,7 @@ index 6bf2b9d0cb..1d0317c010 100644
|
|||
}
|
||||
+ else if (JOY_NEW(START_BUTTON)) //AdditionalBattleInfo
|
||||
+ {
|
||||
+ gAdditionalBattleInfoSubmenu = TRUE;
|
||||
+ sDescriptionSubmenu = TRUE;
|
||||
+ MoveSelectionDisplayMoveDescription();
|
||||
+ }
|
||||
}
|
||||
|
@ -157,7 +139,7 @@ index 6bf2b9d0cb..1d0317c010 100644
|
|||
+ u8 acc_desc[10] = _(" ACC: ");
|
||||
+ u8 pri_desc[10] = _(" PRI: ");
|
||||
+ LoadMessageBoxAndBorderGfx();
|
||||
+ DrawStdWindowFrameBattleInfoSystem(B_WIN_MOVE_DESCRIPTION);
|
||||
+ DrawStdWindowFrame(B_WIN_MOVE_DESCRIPTION, FALSE);
|
||||
+ if (pwr < 2)
|
||||
+ StringCopy(pwr_num, gText_BattleSwitchWhich5);
|
||||
+ else
|
||||
|
@ -220,23 +202,4 @@ index 0835dda70c..4949575d00 100644
|
|||
|
||||
static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
{
|
||||
```
|
||||
|
||||
```diff
|
||||
---------------------------------- src/menu.c ----------------------------------
|
||||
index e14a2af595..a6e0f468d9 100644
|
||||
@@ -230,8 +230,13 @@ void DrawStdWindowFrame(u8 windowId, bool8 copyToVram)
|
||||
if (copyToVram == TRUE)
|
||||
CopyWindowToVram(windowId, COPYWIN_FULL);
|
||||
}
|
||||
|
||||
+void DrawStdWindowFrameBattleInfoSystem(u8 windowId)
|
||||
+{
|
||||
+ CallWindowFunction(windowId, WindowFunc_DrawStandardFrame);
|
||||
+}
|
||||
+
|
||||
void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram)
|
||||
{
|
||||
CallWindowFunction(windowId, WindowFunc_ClearDialogWindowAndFrame);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
```
|
Loading…
Reference in New Issue