mirror of
https://github.com/pret/pokeheartgold.git
synced 2026-04-26 08:32:37 -05:00
Requested Changes
This commit is contained in:
parent
f3689c6b18
commit
8c75ed466f
|
|
@ -591,7 +591,7 @@ struct BattleSystem {
|
|||
u8 criticalHpMusic : 2;
|
||||
u8 criticalHpMusicDelay : 3;
|
||||
Terrain terrain;
|
||||
int unk2404;
|
||||
int backgroundId;
|
||||
int location;
|
||||
u32 battleSpecial;
|
||||
int timezone; // might be timeOfDay? unclear
|
||||
|
|
@ -626,7 +626,7 @@ struct BattleSystem {
|
|||
u32 unk2478;
|
||||
SysTask *unk247C;
|
||||
u8 chatotVoiceParam[4];
|
||||
Pokemon *unk2488;
|
||||
Pokemon *bugContestCaughtMon;
|
||||
u8 unk248C[4];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ BOOL ov12_02238358(OverlayManager *man);
|
|||
void ov12_0223843C(OverlayManager *man);
|
||||
BOOL ov12_0223A3F0(OverlayManager *man);
|
||||
BOOL ov12_0223A5E4(OverlayManager *man);
|
||||
void BgConfig_CleanupBattleMenuBackgrounds(BgConfig *);
|
||||
void BgConfig_CleanupBattleMenuBackgrounds(BgConfig *bgConfig);
|
||||
void ov12_0223A620(BattleSystem *battleSystem);
|
||||
|
||||
// the following functions aren't static/haven't been checked to their status and are yet to be decompiled
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ u8 ov12_02261258(OpponentData *opponentData);
|
|||
void *ov12_02261270(OpponentData *opponentData);
|
||||
u32 ov12_02261264(OpponentData *opponentData);
|
||||
BattleHpBar *OpponentData_GetHpBar(OpponentData *opponentData);
|
||||
BattleCursorPosition *ov12_02261280(OpponentData *data);
|
||||
BattleCursorPosition *ov12_02261280(OpponentData *opponentData);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "sys_task_api.h"
|
||||
|
||||
//typedef'd in battle.h
|
||||
struct BattleCursorPosition {
|
||||
s8 commandX;
|
||||
s8 commandY;
|
||||
|
|
|
|||
|
|
@ -11,16 +11,16 @@
|
|||
#include "touchscreen.h"
|
||||
#include "unk_02013534.h"
|
||||
|
||||
typedef struct BattleInputMainScreen {
|
||||
typedef struct BattleInputMainMenu {
|
||||
u8 battlerType;
|
||||
u8 battlerId;
|
||||
u8 selectedMon;
|
||||
u8 monIconStatus;
|
||||
s16 hp;
|
||||
u16 maxHp;
|
||||
u8 cancelRun;
|
||||
u8 cancelRunDisplay;
|
||||
u8 unused[3];
|
||||
} BattleInputMainScreen;
|
||||
} BattleInputMainMenu;
|
||||
|
||||
typedef struct BattleInputFightMenu {
|
||||
u16 moveNo[4];
|
||||
|
|
@ -41,7 +41,7 @@ typedef struct BattleInputTwoOptionMenu {
|
|||
} BattleInputTwoOptionMenu;
|
||||
|
||||
typedef union BattleInputMenu {
|
||||
BattleInputMainScreen main;
|
||||
BattleInputMainMenu main;
|
||||
BattleInputFightMenu fight;
|
||||
BattleInputTargetMenu target;
|
||||
BattleInputTwoOptionMenu twoOption;
|
||||
|
|
@ -78,6 +78,7 @@ typedef struct BattleInputTextObject {
|
|||
UnkStruct_02021AC8 unk4;
|
||||
u16 fontLength;
|
||||
} BattleInputTextObject;
|
||||
|
||||
typedef struct {
|
||||
BattleInput *battleInput;
|
||||
SysTask *vblankTask;
|
||||
|
|
@ -89,6 +90,7 @@ typedef struct {
|
|||
u8 battlerId;
|
||||
u8 state;
|
||||
} BattleMenuSlideIn;
|
||||
|
||||
typedef struct BallGaugeAnimation {
|
||||
s16 xOffset;
|
||||
u8 percentExpToNextLevel;
|
||||
|
|
@ -155,6 +157,7 @@ typedef struct BattleMenuCursor {
|
|||
s8 menuX;
|
||||
u8 unused;
|
||||
} BattleMenuCursor;
|
||||
|
||||
typedef struct BattleInputTutorial {
|
||||
BattleFinger *finger;
|
||||
u8 state;
|
||||
|
|
@ -179,7 +182,7 @@ struct BattleInput {
|
|||
BattleInputMoveMemory moveMemory[4]; // Holds the move display info for ALL the currently active pokemon
|
||||
void *fontSystem;
|
||||
BattleInputTextObject textObj[13];
|
||||
void *unk67C; // 5B8
|
||||
void *unk5B8;
|
||||
ManagedSprite *spriteBallGauge[6];
|
||||
ManagedSprite *spriteBallGaugeOpponent[6];
|
||||
ManagedSprite *spriteTypeIcons[4];
|
||||
|
|
@ -195,9 +198,9 @@ struct BattleInput {
|
|||
u8 monTargetType;
|
||||
u8 gender;
|
||||
u8 isTouchDisabled;
|
||||
u8 unk6F3; // true when cancel is displayed, false when run is displayed
|
||||
u8 unk6F4; // 670
|
||||
s16 unk6F5;
|
||||
u8 unk66F; // true when cancel is displayed, false when run is displayed
|
||||
u8 unk670;
|
||||
s16 unk671;
|
||||
u8 fadeDir;
|
||||
s16 fadeCur;
|
||||
SysTask *fadeTask;
|
||||
|
|
@ -207,9 +210,9 @@ struct BattleInput {
|
|||
s32 scrollXSpeed;
|
||||
s32 scrollXEnd;
|
||||
BattleCursor *cursor;
|
||||
BattleMenuCursor cursorData;
|
||||
BattleMenuCursor menuCursor;
|
||||
u8 keyPressed;
|
||||
u8 cancelRun; // needs a better name; controls if cancel or run should be displayed as the bottom middle button in the current menu
|
||||
u8 cancelRunDisplay;
|
||||
BattleInputTutorial tutorial;
|
||||
ManagedSprite *spriteCaughtBugIcon;
|
||||
ManagedSprite *spriteBugNet;
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef POKEHEARTGOLD_OVERLAY_12_02266024_H
|
||||
#define POKEHEARTGOLD_OVERLAY_12_02266024_H
|
||||
|
||||
#include "battle/battle.h"
|
||||
|
||||
#include "filesystem.h"
|
||||
|
||||
BOOL BattleInput_CheckFeedbackDone(BattleInput *a0);
|
||||
BOOL BattleInput_CheckTouch(BattleInput *a0);
|
||||
|
||||
#endif
|
||||
|
|
@ -21,6 +21,7 @@ typedef struct _MAT {
|
|||
MAT_ENTRY alloc[1];
|
||||
} MAT;
|
||||
|
||||
//TODO: Rename MsgData -> MessageLoader to be in sync with pokeplat repository
|
||||
typedef struct MsgData {
|
||||
u16 type;
|
||||
u16 heapId;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include "bg_window.h"
|
||||
#include "heap.h"
|
||||
|
||||
typedef struct {
|
||||
typedef struct FontOAMInitData {
|
||||
void *fontSystem;
|
||||
const Window *window;
|
||||
SpriteList *spriteList;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include "sprite_system.h"
|
||||
|
||||
int sub_02077678(int moveType);
|
||||
NarcId sub_020776B4();
|
||||
NarcId sub_020776B4(void);
|
||||
void sub_02077720(PaletteData *paletteData, int a1, SpriteSystem *spriteSystem, SpriteManager *spriteManager, int a4, int a5);
|
||||
void sub_0207775C(SpriteSystem *spriteSystem, SpriteManager *spriteManager, int a2, int a3);
|
||||
void sub_020776B8(SpriteSystem *spriteSystem, SpriteManager *spriteManager, NNS_G2D_VRAM_TYPE vramType, int type, int a4); // load type icon graphics?
|
||||
|
|
|
|||
|
|
@ -614,8 +614,7 @@ static inline GXBg23ControlDCBmp G2S_GetBG3ControlDCBmp(void) {
|
|||
return *(volatile GXBg23ControlDCBmp *)®_G2S_DB_BG3CNT;
|
||||
}
|
||||
|
||||
static inline void * G2S_GetOBJCharPtr (void)
|
||||
{
|
||||
static inline void *G2S_GetOBJCharPtr(void) {
|
||||
return (void *)HW_DB_OBJ_VRAM;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "battle/battle_input.h"
|
||||
#include "battle/battle_system.h"
|
||||
#include "battle/overlay_12_02266024.h"
|
||||
|
||||
#include "filesystem_files_def.h"
|
||||
#include "gf_gfx_planes.h"
|
||||
|
|
|
|||
|
|
@ -255,9 +255,9 @@ static const UnkStruct_ov12_0226D408 ov12_0226D408[] = {
|
|||
{ 0, 0 },
|
||||
};
|
||||
|
||||
static void ov12_02264824(SpriteSystem *renderer, SpriteManager *gfxHandler, NARC *narc, PaletteData *plttData, int barType);
|
||||
static void ov12_022648EC(SpriteSystem *renderer, SpriteManager *gfxHandler, NARC *narc, PaletteData *plttData, int barType);
|
||||
static ManagedSprite *ov12_02264968(SpriteSystem *renderer, SpriteManager *gfxHandler, int barType);
|
||||
static void ov12_02264824(SpriteSystem *spriteSystem, SpriteManager *spriteManager, NARC *narc, PaletteData *plttData, int barType);
|
||||
static void ov12_022648EC(SpriteSystem *spriteSystem, SpriteManager *spriteManager, NARC *narc, PaletteData *plttData, int barType);
|
||||
static ManagedSprite *ov12_02264968(SpriteSystem *spriteSystem, SpriteManager *spriteManager, int barType);
|
||||
static void ov12_02264B28(BattleHpBar *hpBar);
|
||||
static void ov12_02264B4C(BattleHpBar *hpBar);
|
||||
static void ov12_02264B60(BattleHpBar *hpBar);
|
||||
|
|
@ -449,34 +449,34 @@ static const ManagedSpriteTemplate sSpriteTemplate_HpBarSafariOrPark = {
|
|||
|
||||
#include "battle/battle_hp_bar_data.h"
|
||||
|
||||
static void ov12_02264824(SpriteSystem *renderer, SpriteManager *gfxHandler, NARC *narc, PaletteData *plttData, int barType) {
|
||||
static void ov12_02264824(SpriteSystem *spriteSystem, SpriteManager *spriteManager, NARC *narc, PaletteData *plttData, int barType) {
|
||||
const ManagedSpriteTemplate *pRes = BattleHpBar_Util_GetHpBoxSpriteTemplate(barType);
|
||||
|
||||
SpriteSystem_LoadCharResObjFromOpenNarc(renderer, gfxHandler, narc, pRes->resIdList[GF_GFX_RES_TYPE_CHAR], TRUE, NNS_G2D_VRAM_TYPE_2DMAIN, pRes->resIdList[GF_GFX_RES_TYPE_CHAR]);
|
||||
SpriteSystem_LoadPaletteBufferFromOpenNarc(plttData, PLTTBUF_MAIN_OBJ, renderer, gfxHandler, narc, 71, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20006);
|
||||
SpriteSystem_LoadCellResObjFromOpenNarc(renderer, gfxHandler, narc, pRes->resIdList[GF_GFX_RES_TYPE_CELL], TRUE, pRes->resIdList[GF_GFX_RES_TYPE_CELL]);
|
||||
SpriteSystem_LoadAnimResObjFromOpenNarc(renderer, gfxHandler, narc, pRes->resIdList[GF_GFX_RES_TYPE_ANIM], TRUE, pRes->resIdList[GF_GFX_RES_TYPE_ANIM]);
|
||||
SpriteSystem_LoadPaletteBufferFromOpenNarc(plttData, PLTTBUF_MAIN_OBJ, renderer, gfxHandler, narc, 71, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20007);
|
||||
SpriteSystem_LoadCharResObjFromOpenNarc(spriteSystem, spriteManager, narc, pRes->resIdList[GF_GFX_RES_TYPE_CHAR], TRUE, NNS_G2D_VRAM_TYPE_2DMAIN, pRes->resIdList[GF_GFX_RES_TYPE_CHAR]);
|
||||
SpriteSystem_LoadPaletteBufferFromOpenNarc(plttData, PLTTBUF_MAIN_OBJ, spriteSystem, spriteManager, narc, 71, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20006);
|
||||
SpriteSystem_LoadCellResObjFromOpenNarc(spriteSystem, spriteManager, narc, pRes->resIdList[GF_GFX_RES_TYPE_CELL], TRUE, pRes->resIdList[GF_GFX_RES_TYPE_CELL]);
|
||||
SpriteSystem_LoadAnimResObjFromOpenNarc(spriteSystem, spriteManager, narc, pRes->resIdList[GF_GFX_RES_TYPE_ANIM], TRUE, pRes->resIdList[GF_GFX_RES_TYPE_ANIM]);
|
||||
SpriteSystem_LoadPaletteBufferFromOpenNarc(plttData, PLTTBUF_MAIN_OBJ, spriteSystem, spriteManager, narc, 71, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20007);
|
||||
if (barType == 6 || barType == 7) {
|
||||
SpriteSystem_LoadPaletteBufferFromOpenNarc(plttData, PLTTBUF_MAIN_OBJ, renderer, gfxHandler, narc, 81, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20008);
|
||||
SpriteSystem_LoadPaletteBufferFromOpenNarc(plttData, PLTTBUF_MAIN_OBJ, spriteSystem, spriteManager, narc, 81, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20008);
|
||||
}
|
||||
}
|
||||
|
||||
static void ov12_022648EC(SpriteSystem *renderer, SpriteManager *gfxHandler, NARC *narc, PaletteData *plttData, int barType) {
|
||||
static void ov12_022648EC(SpriteSystem *spriteSystem, SpriteManager *spriteManager, NARC *narc, PaletteData *plttData, int barType) {
|
||||
const ManagedSpriteTemplate *pRes = BattleHpBar_Util_GetArrowSpriteTemplate(barType);
|
||||
|
||||
if (pRes != NULL) {
|
||||
SpriteSystem_LoadCharResObjFromOpenNarc(renderer, gfxHandler, narc, pRes->resIdList[GF_GFX_RES_TYPE_CHAR], TRUE, NNS_G2D_VRAM_TYPE_2DMAIN, pRes->resIdList[GF_GFX_RES_TYPE_CHAR]);
|
||||
SpriteSystem_LoadPaletteBufferFromOpenNarc(plttData, PLTTBUF_MAIN_OBJ, renderer, gfxHandler, narc, 71, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20006);
|
||||
SpriteSystem_LoadCellResObjFromOpenNarc(renderer, gfxHandler, narc, pRes->resIdList[GF_GFX_RES_TYPE_CELL], TRUE, pRes->resIdList[GF_GFX_RES_TYPE_CELL]);
|
||||
SpriteSystem_LoadAnimResObjFromOpenNarc(renderer, gfxHandler, narc, pRes->resIdList[GF_GFX_RES_TYPE_ANIM], TRUE, pRes->resIdList[GF_GFX_RES_TYPE_ANIM]);
|
||||
SpriteSystem_LoadCharResObjFromOpenNarc(spriteSystem, spriteManager, narc, pRes->resIdList[GF_GFX_RES_TYPE_CHAR], TRUE, NNS_G2D_VRAM_TYPE_2DMAIN, pRes->resIdList[GF_GFX_RES_TYPE_CHAR]);
|
||||
SpriteSystem_LoadPaletteBufferFromOpenNarc(plttData, PLTTBUF_MAIN_OBJ, spriteSystem, spriteManager, narc, 71, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20006);
|
||||
SpriteSystem_LoadCellResObjFromOpenNarc(spriteSystem, spriteManager, narc, pRes->resIdList[GF_GFX_RES_TYPE_CELL], TRUE, pRes->resIdList[GF_GFX_RES_TYPE_CELL]);
|
||||
SpriteSystem_LoadAnimResObjFromOpenNarc(spriteSystem, spriteManager, narc, pRes->resIdList[GF_GFX_RES_TYPE_ANIM], TRUE, pRes->resIdList[GF_GFX_RES_TYPE_ANIM]);
|
||||
}
|
||||
}
|
||||
|
||||
static ManagedSprite *ov12_02264968(SpriteSystem *renderer, SpriteManager *gfxHandler, int barType) {
|
||||
static ManagedSprite *ov12_02264968(SpriteSystem *spriteSystem, SpriteManager *spriteManager, int barType) {
|
||||
const ManagedSpriteTemplate *pRes = BattleHpBar_Util_GetHpBoxSpriteTemplate(barType);
|
||||
|
||||
ManagedSprite *ret = SpriteSystem_NewSprite(renderer, gfxHandler, pRes);
|
||||
ManagedSprite *ret = SpriteSystem_NewSprite(spriteSystem, spriteManager, pRes);
|
||||
Sprite_TickFrame(ret->sprite);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -603,44 +603,44 @@ static void ov12_02264B4C(BattleHpBar *hpBar) {
|
|||
|
||||
static void ov12_02264B60(BattleHpBar *hpBar) {
|
||||
const ManagedSpriteTemplate *tmplate = BattleHpBar_Util_GetHpBoxSpriteTemplate(hpBar->type);
|
||||
SpriteSystem *renderer = BattleSystem_GetSpriteSystem(hpBar->battleSystem);
|
||||
SpriteManager *gfxHandler = BattleSystem_GetSpriteManager(hpBar->battleSystem);
|
||||
SpriteManager_UnloadCharObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_CHAR]);
|
||||
SpriteManager_UnloadCellObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_CELL]);
|
||||
SpriteManager_UnloadAnimObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_ANIM]);
|
||||
SpriteSystem *spriteSystem = BattleSystem_GetSpriteSystem(hpBar->battleSystem);
|
||||
SpriteManager *spriteManager = BattleSystem_GetSpriteManager(hpBar->battleSystem);
|
||||
SpriteManager_UnloadCharObjById(spriteManager, tmplate->resIdList[GF_GFX_RES_TYPE_CHAR]);
|
||||
SpriteManager_UnloadCellObjById(spriteManager, tmplate->resIdList[GF_GFX_RES_TYPE_CELL]);
|
||||
SpriteManager_UnloadAnimObjById(spriteManager, tmplate->resIdList[GF_GFX_RES_TYPE_ANIM]);
|
||||
}
|
||||
|
||||
static void ov12_02264B94(BattleHpBar *hpBar) {
|
||||
const ManagedSpriteTemplate *tmplate = BattleHpBar_Util_GetArrowSpriteTemplate(hpBar->type);
|
||||
if (tmplate != NULL) {
|
||||
SpriteSystem *renderer = BattleSystem_GetSpriteSystem(hpBar->battleSystem);
|
||||
SpriteManager *gfxHandler = BattleSystem_GetSpriteManager(hpBar->battleSystem);
|
||||
SpriteManager_UnloadCharObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_CHAR]);
|
||||
SpriteManager_UnloadCellObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_CELL]);
|
||||
SpriteManager_UnloadAnimObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_ANIM]);
|
||||
SpriteSystem *spriteSystem = BattleSystem_GetSpriteSystem(hpBar->battleSystem);
|
||||
SpriteManager *spriteManager = BattleSystem_GetSpriteManager(hpBar->battleSystem);
|
||||
SpriteManager_UnloadCharObjById(spriteManager, tmplate->resIdList[GF_GFX_RES_TYPE_CHAR]);
|
||||
SpriteManager_UnloadCellObjById(spriteManager, tmplate->resIdList[GF_GFX_RES_TYPE_CELL]);
|
||||
SpriteManager_UnloadAnimObjById(spriteManager, tmplate->resIdList[GF_GFX_RES_TYPE_ANIM]);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void BattleHpBar_LoadResources(BattleHpBar *hpBar) {
|
||||
const ManagedSpriteTemplate *tmplate;
|
||||
SpriteSystem *renderer;
|
||||
SpriteManager *gfxHandler;
|
||||
SpriteSystem *spriteSystem;
|
||||
SpriteManager *spriteManager;
|
||||
PaletteData *plttData;
|
||||
NARC *narc;
|
||||
|
||||
narc = NARC_New(NARC_a_0_0_8, HEAP_ID_BATTLE);
|
||||
|
||||
renderer = BattleSystem_GetSpriteSystem(hpBar->battleSystem);
|
||||
gfxHandler = BattleSystem_GetSpriteManager(hpBar->battleSystem);
|
||||
spriteSystem = BattleSystem_GetSpriteSystem(hpBar->battleSystem);
|
||||
spriteManager = BattleSystem_GetSpriteManager(hpBar->battleSystem);
|
||||
plttData = BattleSystem_GetPaletteData(hpBar->battleSystem);
|
||||
|
||||
tmplate = BattleHpBar_Util_GetHpBoxSpriteTemplate(hpBar->type);
|
||||
|
||||
ov12_02264824(renderer, gfxHandler, narc, plttData, hpBar->type);
|
||||
hpBar->boxObj = ov12_02264968(renderer, gfxHandler, hpBar->type);
|
||||
ov12_02264824(spriteSystem, spriteManager, narc, plttData, hpBar->type);
|
||||
hpBar->boxObj = ov12_02264968(spriteSystem, spriteManager, hpBar->type);
|
||||
|
||||
ov12_022648EC(renderer, gfxHandler, narc, plttData, hpBar->type);
|
||||
ov12_022648EC(spriteSystem, spriteManager, narc, plttData, hpBar->type);
|
||||
if (hpBar->arrowObj != NULL) {
|
||||
Sprite_SetPositionXY(hpBar->arrowObj->sprite, tmplate->x - sHpBarArrowXOffsets[hpBar->type], tmplate->y + 0);
|
||||
}
|
||||
|
|
@ -1687,13 +1687,13 @@ SysTask *BattleHpBar_BeginExpBarFullFlashEffect(BattleHpBar *hpBar, u8 *a1) {
|
|||
|
||||
static void Task_ExpBarFullFlash(SysTask *task, void *data) {
|
||||
BattleHpBarExpBarFullFlashEffectTaskData *taskData = data;
|
||||
SpriteManager *gfxHandler = BattleSystem_GetSpriteManager(taskData->hpBar->battleSystem);
|
||||
SpriteManager *spriteManager = BattleSystem_GetSpriteManager(taskData->hpBar->battleSystem);
|
||||
int plttNum;
|
||||
PaletteData *plttData = BattleSystem_GetPaletteData(taskData->hpBar->battleSystem);
|
||||
|
||||
switch (taskData->state) {
|
||||
case 0:
|
||||
plttNum = SpriteManager_FindPlttResourceOffset(gfxHandler, 20007, NNS_G2D_VRAM_TYPE_2DMAIN);
|
||||
plttNum = SpriteManager_FindPlttResourceOffset(spriteManager, 20007, NNS_G2D_VRAM_TYPE_2DMAIN);
|
||||
ManagedSprite_SetPaletteOverride(taskData->hpBar->boxObj, plttNum);
|
||||
taskData->plttNum = plttNum;
|
||||
++taskData->state;
|
||||
|
|
@ -1715,7 +1715,7 @@ static void Task_ExpBarFullFlash(SysTask *task, void *data) {
|
|||
PaletteData_BlendPalette(plttData, PLTTBUF_MAIN_OBJ, 16 * taskData->plttNum, 0x10, taskData->ev, RGB(5, 29, 28));
|
||||
break;
|
||||
default:
|
||||
plttNum = SpriteManager_FindPlttResourceOffset(gfxHandler, 20006, NNS_G2D_VRAM_TYPE_2DMAIN);
|
||||
plttNum = SpriteManager_FindPlttResourceOffset(spriteManager, 20006, NNS_G2D_VRAM_TYPE_2DMAIN);
|
||||
ManagedSprite_SetPaletteOverride(taskData->hpBar->boxObj, plttNum);
|
||||
*taskData->pDoneFlag = 1;
|
||||
Heap_Free(taskData);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -13,7 +13,6 @@
|
|||
#include "battle/battle_hp_bar.h"
|
||||
#include "battle/battle_input.h"
|
||||
#include "battle/overlay_12_0224E4FC.h"
|
||||
#include "battle/overlay_12_02266024.h"
|
||||
#include "battle/overlay_12_0226BEC4.h"
|
||||
#include "msgdata/msg/msg_0197.h"
|
||||
|
||||
|
|
@ -254,10 +253,10 @@ u32 BattleSystem_GetTrainerGender(BattleSystem *battleSystem, int battlerId) {
|
|||
return PlayerProfile_GetTrainerGender(battleSystem->playerProfile[battlerId]);
|
||||
}
|
||||
|
||||
int BattleSystem_GetBattlerFromBattlerType(BattleSystem *battleSystem, int a1) {
|
||||
int BattleSystem_GetBattlerFromBattlerType(BattleSystem *battleSystem, int battlerType) {
|
||||
int battlerId;
|
||||
for (battlerId = 0; battlerId < battleSystem->maxBattlers; battlerId++) {
|
||||
if (ov12_02261258(battleSystem->opponentData[battlerId]) == a1) {
|
||||
if (ov12_02261258(battleSystem->opponentData[battlerId]) == battlerType) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -291,7 +290,7 @@ Terrain BattleSystem_GetTerrainId(BattleSystem *battleSystem) {
|
|||
}
|
||||
|
||||
int BattleSystem_GetBgId(BattleSystem *battleSystem) {
|
||||
return battleSystem->unk2404;
|
||||
return battleSystem->backgroundId;
|
||||
}
|
||||
|
||||
int BattleSystem_GetLocation(BattleSystem *battleSystem) {
|
||||
|
|
@ -650,7 +649,7 @@ int BattleSystem_GetTimezone(BattleSystem *battleSystem) {
|
|||
int ov12_0223B52C(BattleSystem *battleSystem) {
|
||||
int ret;
|
||||
|
||||
switch (battleSystem->unk2404) {
|
||||
switch (battleSystem->backgroundId) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
@ -1246,7 +1245,7 @@ u8 BattleSystem_GetChatotVoiceParam(BattleSystem *battleSystem, int battlerId) {
|
|||
}
|
||||
|
||||
Pokemon *BattleSystem_GetBugContestCaughtMon(BattleSystem *battleSystem) {
|
||||
return battleSystem->unk2488;
|
||||
return battleSystem->bugContestCaughtMon;
|
||||
}
|
||||
|
||||
u8 ov12_0223C140(BattleSystem *battleSystem, u32 battlerId) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "battle/battle_input.h"
|
||||
#include "battle/battle_system.h"
|
||||
#include "battle/overlay_12_02266024.h"
|
||||
|
||||
#include "heap.h"
|
||||
#include "sys_task.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user