mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-03-21 17:55:13 -05:00
Document the Battle Hall battle selection app (Overlay 106) (#911)
Some checks failed
build / build (push) Has been cancelled
Some checks failed
build / build (push) Has been cancelled
This commit is contained in:
parent
9ea364138a
commit
2cf3f02191
|
|
@ -766,7 +766,7 @@
|
|||
.short 0x08D
|
||||
.endm
|
||||
|
||||
.macro FrontierScrCmd_8E
|
||||
.macro OpenBattleHallApp
|
||||
.short 0x08E
|
||||
.endm
|
||||
|
||||
|
|
|
|||
13
include/applications/frontier/battle_hall/main.h
Normal file
13
include/applications/frontier/battle_hall/main.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef POKEPLATINUM_APPLICATIONS_BATTLE_HALL_MAIN_H
|
||||
#define POKEPLATINUM_APPLICATIONS_BATTLE_HALL_MAIN_H
|
||||
|
||||
#include "overlay_manager.h"
|
||||
|
||||
BOOL BattleHallApp_Init(ApplicationManager *appMan, int *state);
|
||||
BOOL BattleHallApp_Main(ApplicationManager *appMan, int *state);
|
||||
BOOL BattleHallApp_Exit(ApplicationManager *appMan, int *state);
|
||||
void BattleHall_DummyCommCommand(int netID, int unused, void *unused2, void *unused3);
|
||||
void BattleHall_HandleTypeSelectionMsg(int netID, int unused, void *data, void *context);
|
||||
void BattleHall_HandlePartnerDecisionCmd(int netID, int unused, void *data, void *context);
|
||||
|
||||
#endif // POKEPLATINUM_APPLICATIONS_BATTLE_HALL_MAIN_H
|
||||
21
include/applications/frontier/battle_hall/sprite_manager.h
Normal file
21
include/applications/frontier/battle_hall/sprite_manager.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef POKEPLATINUM_APPLIcATIONS_BATTLE_HALL_SPRITE_MANAGER_H
|
||||
#define POKEPLATINUM_APPLIcATIONS_BATTLE_HALL_SPRITE_MANAGER_H
|
||||
|
||||
#include "struct_defs/pokemon.h"
|
||||
|
||||
#include "sprite.h"
|
||||
#include "sprite_resource.h"
|
||||
#include "sprite_util.h"
|
||||
|
||||
typedef struct BattleHallAppSpriteManager {
|
||||
SpriteList *spriteList;
|
||||
G2dRenderer renderer;
|
||||
SpriteResourceCollection *resourceCollection[4];
|
||||
SpriteResource *resources[2][4];
|
||||
} BattleHallAppSpriteManager;
|
||||
|
||||
void BattleHallApp_InitSpriteManager(BattleHallAppSpriteManager *sprites, Pokemon *mon);
|
||||
Sprite *BattleHallApp_InitSprite(BattleHallAppSpriteManager *spriteMan, u32 resourceID, u32 animID, u32 priority, u8 onSubScreen);
|
||||
void BattleHallApp_FreeSprites(BattleHallAppSpriteManager *spriteMan);
|
||||
|
||||
#endif // POKEPLATINUM_APPLIcATIONS_BATTLE_HALL_SPRITE_MANAGER_H
|
||||
21
include/applications/frontier/battle_hall/sprites.h
Normal file
21
include/applications/frontier/battle_hall/sprites.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef POKEPLATINUM_APPLICATIONS_BATTLE_HALL_SPRITES_H
|
||||
#define POKEPLATINUM_APPLICATIONS_BATTLE_HALL_SPRITES_H
|
||||
|
||||
#include "struct_defs/pokemon.h"
|
||||
|
||||
#include "applications/frontier/battle_hall/sprite_manager.h"
|
||||
|
||||
typedef struct BattleHallAppSprite {
|
||||
u32 unused[3];
|
||||
const u8 *isAlwaysNull;
|
||||
Sprite *sprite;
|
||||
} BattleHallAppSprite;
|
||||
|
||||
BattleHallAppSprite *BattleHallAppSprite_New(BattleHallAppSpriteManager *spriteMan, u32 resourceID, u32 animID, u16 x, u16 y, const u8 *null);
|
||||
void *BattleHallAppSprite_Free(BattleHallAppSprite *sprite);
|
||||
void BattleHallAppSprite_SetDrawFlag(BattleHallAppSprite *sprite, BOOL draw);
|
||||
void BattleHallAppSprite_SetPosition(BattleHallAppSprite *sprite, u16 x, u16 y);
|
||||
void BattleHallAppSprite_SetAnim(BattleHallAppSprite *sprite, u32 animID);
|
||||
void BattleHallAppSprite_UpdatePalette(BattleHallAppSprite *sprite, Pokemon *mon);
|
||||
|
||||
#endif // POKEPLATINUM_APPLICATIONS_BATTLE_HALL_SPRITES_H
|
||||
11
include/applications/frontier/battle_hall/windows.h
Normal file
11
include/applications/frontier/battle_hall/windows.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef POKEPLATINUM_APPLICATIONS_BATTLE_HALL_WINDOWS_H
|
||||
#define POKEPLATINUM_APPLICATIONS_BATTLE_HALL_WINDOWS_H
|
||||
|
||||
#include "bg_window.h"
|
||||
|
||||
void BattleHallApp_InitWindows(BgConfig *bgConfig, Window *windows);
|
||||
void BattleHallApp_FreeWindows(Window *windows);
|
||||
void BattleHallApp_DrawWindow(BgConfig *bgConfig, Window *window);
|
||||
void BattleHallApp_DrawMessageBox(Window *window, int frame);
|
||||
|
||||
#endif // POKEPLATINUM_APPLICATIONS_BATTLE_HALL_WINDOWS_H
|
||||
|
|
@ -100,7 +100,7 @@ enum HeapID {
|
|||
HEAP_ID_95,
|
||||
HEAP_ID_96,
|
||||
HEAP_ID_97,
|
||||
HEAP_ID_98,
|
||||
HEAP_ID_BATTLE_HALL_APP,
|
||||
HEAP_ID_99,
|
||||
HEAP_ID_100,
|
||||
HEAP_ID_101,
|
||||
|
|
@ -134,6 +134,7 @@ enum HeapSize {
|
|||
HEAP_SIZE_DEBUG = 0x10,
|
||||
HEAP_SIZE_APPLICATION = 0x10D800,
|
||||
|
||||
HEAP_SIZE_BATTLE_HALL_APP = 0x20000,
|
||||
HEAP_SIZE_BAG = 0x30000,
|
||||
|
||||
HEAP_SIZE_PRE_POKETCH_SUBSCREEN = 0x18000,
|
||||
|
|
|
|||
52
include/narc_frontier_bg.h
Normal file
52
include/narc_frontier_bg.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#ifndef POKEPLATINUM_NARC_FRONTIER_BG_H
|
||||
#define POKEPLATINUM_NARC_FRONTIER_BG_H
|
||||
// TODO This is a temporary header file for recording NARC indexes of
|
||||
// frontier_bg.narc. This file should eventually be deleted and the constants
|
||||
// replaced with those from a naix.h file once the NARC is unpacked.
|
||||
|
||||
#define BATTLE_FACTORY_TILES 0
|
||||
#define BATTLE_FACTORY_BATTLE_ROOM_TILEMAP 1
|
||||
#define BATTLE_FACTORY_CORRIDOR_TILEMAP 2
|
||||
#define BATTLE_FACTORY_CORRIDOR_FLOOR_TILEMAP 3
|
||||
#define BATTLE_HALL_BATTLE_ROOM_TILES 14
|
||||
#define BATTLE_HALL_CORRIDOR_TILES 16
|
||||
#define BATTLE_HALL_CORRIDOR_TILEMAP 17
|
||||
#define BATTLE_HALL_BATTLE_ROOM_LIGHTS_TILES 19
|
||||
#define BATTLE_HALL_BATTLE_ROOM_TILEMAP 20
|
||||
#define BATTLE_HALL_BATTLE_ROOM_LIGHTS_TILEMAP 22
|
||||
#define BATTLE_HALL_APP_TILES 23
|
||||
#define BATTLE_HALL_APP_TILEMAP 24
|
||||
#define BATTLE_CASTLE_CORRIDOR_TILES 25
|
||||
#define BATTLE_CASTLE_CORRIDOR_TILEMAP 26
|
||||
#define BATTLE_CASTLE_BATTLE_ROOM_TILES 29
|
||||
#define BATTLE_CASTLE_BATTLE_ROOM_TILEMAP 30
|
||||
#define BATTLE_CASTLE_BATTLE_ROOM_CURTAINS_TILEMAP 33
|
||||
#define BATTLE_TOWER_TILES 45
|
||||
#define BATTLE_TOWER_MULTI_BATTLE_ROOM_TILEMAP 46
|
||||
#define BATTLE_TOWER_MULTI_CORRIDOR_TILEMAP 47
|
||||
#define BATTLE_TOWER_MULTI_CORRIDOR_FG_TILEMAP 48
|
||||
#define BATTLE_TOWER_BATTLE_ROOM_TILEMAP 49
|
||||
#define BATTLE_TOWER_CORRIDOR_TILEMAP 50
|
||||
#define BATTLE_TOWER_CORRIDOR_FG_TILEMAP 51
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_TILEMAP 52
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_TILES 54
|
||||
#define BATTLE_ARCADE_CORRIDOR_TILEMAP 55
|
||||
#define BATTLE_ARCADE_CORRIDOR_TILES 56
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_HP_SCREEN_TILEMAP 57
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_HP_SCREEN_TILES 89
|
||||
#define BATTLE_FRONTIER_APP_SUB_SCREEN_TILES 125
|
||||
#define BATTLE_FRONTIER_APP_SUB_SCREEN_TILEMAP 126
|
||||
#define BATTLE_FACTORY_PLTT 129
|
||||
#define BATTLE_HALL_BATTLE_ROOM_PLTT 131
|
||||
#define BATTLE_HALL_CORRIDOR_PLTT 132
|
||||
#define BATTLE_HALL_BATTLE_ROOM_LIGHTS_PLTT 133
|
||||
#define BATTLE_HALL_APP_PLTT 134
|
||||
#define BATTLE_CASTLE_CORRIDOR_PLTT 135
|
||||
#define BATTLE_CASTLE_BATTLE_ROOM_PLTT 140
|
||||
#define BATTLE_TOWER_PLTT 141
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_PLTT 142
|
||||
#define BATTLE_ARCADE_CORRIDOR_PLTT 143
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_HP_SCREEN_PLTT 169
|
||||
#define BATTLE_FRONTIER_APP_SUB_SCREEN_PLTT 171
|
||||
|
||||
#endif
|
||||
12
include/narc_frontier_obj.h
Normal file
12
include/narc_frontier_obj.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef POKEPLATINUM_NARC_FRONTIER_OBJ_H
|
||||
#define POKEPLATINUM_NARC_FRONTIER_OBJ_H
|
||||
// TODO This is a temporary header file for recording NARC indexes of
|
||||
// frontier_obj.narc. This file should eventually be deleted and the constants
|
||||
// replaced with those from a naix.h file once the NARC is unpacked.
|
||||
|
||||
#define BATTLE_HALL_APP_CURSOR_BOX_NCGR 12
|
||||
#define BATTLE_HALL_APP_CURSOR_BOX_NANR 13
|
||||
#define BATTLE_HALL_APP_CURSOR_BOX_NCER 14
|
||||
#define BATTLE_HALL_APP_CURSOR_BOX_PLTT 38
|
||||
|
||||
#endif
|
||||
|
|
@ -32,7 +32,7 @@ void ov104_0222E330(FrontierPokemonDataDTO *param0, u16 param1[], u8 param2[], u
|
|||
u8 ov104_0222E3A8(u16 param0);
|
||||
BOOL ov104_0222E3E4(BattleFrontierTrainerData *param0, const u16 param1[], const u16 param2[], int param3, int param4, u16 param5[], int param6);
|
||||
void ov104_0222E4BC(u8 param0, u16 param1, u16 param2, u16 *param3, FrontierPokemonDataDTO *param4, u8 *param5, u32 *param6, u8 param7);
|
||||
void ov104_0222E5D0(StringTemplate *param0, u32 param1);
|
||||
void BattleFrontier_SetPartnerInStrTemplate(StringTemplate *template, u32 idx);
|
||||
int ov104_0222E5F0(const TrainerInfo *param0);
|
||||
void ov104_0222E630(SaveData *saveData);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
BOOL FrontierScrCmd_8B(FrontierScriptContext *param0);
|
||||
BOOL FrontierScrCmd_8C(FrontierScriptContext *param0);
|
||||
BOOL FrontierScrCmd_8D(FrontierScriptContext *param0);
|
||||
BOOL FrontierScrCmd_8E(FrontierScriptContext *param0);
|
||||
BOOL FrontierScrCmd_OpenBattleHallApp(FrontierScriptContext *ctx);
|
||||
BOOL FrontierScrCmd_8F(FrontierScriptContext *param0);
|
||||
BOOL FrontierScrCmd_90(FrontierScriptContext *param0);
|
||||
BOOL FrontierScrCmd_91(FrontierScriptContext *param0);
|
||||
|
|
|
|||
|
|
@ -6,14 +6,16 @@
|
|||
|
||||
#include "field_battle_data_transfer.h"
|
||||
|
||||
#define BATTLE_HALL_MON_SUMMARY 0xfe
|
||||
|
||||
void ov104_0223AF58(u8 param0, u8 param1, u8 param2, u8 param3, u16 param4[]);
|
||||
void ov104_0223AFB4(u8 param0, u8 param1, int param2, u8 param3, u8 param4, u16 param5[]);
|
||||
void ov104_0223B0C8(u8 param0, u8 param1, u8 param2, u8 param3, u16 param4, u16 param5[], u8 param6);
|
||||
FieldBattleDTO *ov104_0223B250(UnkStruct_ov104_0223B5C0 *param0, UnkStruct_ov104_02230BE4 *param1);
|
||||
u8 ov104_0223B500(u8 param0);
|
||||
u8 ov104_0223B50C(u8 param0);
|
||||
u8 ov104_0223B5A4(u8 param0);
|
||||
BOOL ov104_0223B5B0(u8 param0);
|
||||
u8 BattleHall_CursorPosToType(u8 cursorPos);
|
||||
BOOL BattleFrontier_IsMultiPlayerChallenge(u8 challengeMode);
|
||||
u8 ov104_0223B5C0(UnkStruct_ov104_0223B5C0 *param0);
|
||||
u16 ov104_0223B64C(UnkStruct_ov104_0223B5C0 *param0);
|
||||
fx32 ov104_0223B6C4(u32 param0);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ typedef struct {
|
|||
u8 unk_05;
|
||||
u16 unk_06;
|
||||
u8 *unk_08;
|
||||
Party *unk_0C;
|
||||
Party *party;
|
||||
void *unk_10;
|
||||
u16 *unk_14;
|
||||
u16 unk_18;
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
#ifndef POKEPLATINUM_OV106_02241AE0_H
|
||||
#define POKEPLATINUM_OV106_02241AE0_H
|
||||
|
||||
#include "overlay106/struct_ov106_02243118_decl.h"
|
||||
|
||||
#include "overlay_manager.h"
|
||||
|
||||
int ov106_02241AE0(ApplicationManager *appMan, int *param1);
|
||||
int ov106_02241B9C(ApplicationManager *appMan, int *param1);
|
||||
int ov106_02241CF0(ApplicationManager *appMan, int *param1);
|
||||
void ov106_02243118(UnkStruct_ov106_02243118 *param0, u16 param1);
|
||||
void ov106_02243130(int param0, int param1, void *param2, void *param3);
|
||||
void ov106_0224313C(UnkStruct_ov106_02243118 *param0, u16 param1, u16 param2);
|
||||
void ov106_02243180(int param0, int param1, void *param2, void *param3);
|
||||
void ov106_022431D4(UnkStruct_ov106_02243118 *param0, u16 param1, u16 param2);
|
||||
void ov106_022431E0(int param0, int param1, void *param2, void *param3);
|
||||
|
||||
#endif // POKEPLATINUM_OV106_02241AE0_H
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
#ifndef POKEPLATINUM_OV106_02243310_H
|
||||
#define POKEPLATINUM_OV106_02243310_H
|
||||
|
||||
#include "overlay106/struct_ov106_02243310.h"
|
||||
|
||||
#include "pokemon.h"
|
||||
#include "sprite.h"
|
||||
|
||||
void ov106_02243310(UnkStruct_ov106_02243310 *param0, Pokemon *param1);
|
||||
Sprite *ov106_022434BC(UnkStruct_ov106_02243310 *param0, u32 param1, u32 param2, u32 param3, u8 param4);
|
||||
void ov106_02243570(UnkStruct_ov106_02243310 *param0);
|
||||
|
||||
#endif // POKEPLATINUM_OV106_02243310_H
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#ifndef POKEPLATINUM_OV106_022435FC_H
|
||||
#define POKEPLATINUM_OV106_022435FC_H
|
||||
|
||||
#include "overlay106/struct_ov106_02243310.h"
|
||||
#include "overlay106/struct_ov106_02243650_decl.h"
|
||||
|
||||
#include "pokemon.h"
|
||||
|
||||
UnkStruct_ov106_02243650 *ov106_022435FC(UnkStruct_ov106_02243310 *param0, u32 param1, u32 param2, u16 param3, u16 param4, const u8 *param5);
|
||||
void *ov106_02243650(UnkStruct_ov106_02243650 *param0);
|
||||
void ov106_02243664(UnkStruct_ov106_02243650 *param0, int param1);
|
||||
void ov106_02243670(UnkStruct_ov106_02243650 *param0, u16 param1, u16 param2);
|
||||
void ov106_022436B0(UnkStruct_ov106_02243650 *param0, u32 param1);
|
||||
void ov106_022436CC(UnkStruct_ov106_02243650 *param0, Pokemon *param1);
|
||||
|
||||
#endif // POKEPLATINUM_OV106_022435FC_H
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef POKEPLATINUM_OV106_022436E0_H
|
||||
#define POKEPLATINUM_OV106_022436E0_H
|
||||
|
||||
#include "bg_window.h"
|
||||
|
||||
void ov106_022436E0(BgConfig *param0, Window *param1);
|
||||
void ov106_02243710(Window *param0);
|
||||
void ov106_0224372C(BgConfig *param0, Window *param1);
|
||||
void ov106_02243758(Window *param0, int param1);
|
||||
|
||||
#endif // POKEPLATINUM_OV106_022436E0_H
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#ifndef POKEPLATINUM_STRUCT_OV106_02243118_DECL_H
|
||||
#define POKEPLATINUM_STRUCT_OV106_02243118_DECL_H
|
||||
|
||||
typedef struct UnkStruct_ov106_02243118_t UnkStruct_ov106_02243118;
|
||||
|
||||
#endif // POKEPLATINUM_STRUCT_OV106_02243118_DECL_H
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
#ifndef POKEPLATINUM_STRUCT_OV106_02243310_H
|
||||
#define POKEPLATINUM_STRUCT_OV106_02243310_H
|
||||
|
||||
#include "sprite.h"
|
||||
#include "sprite_resource.h"
|
||||
#include "sprite_util.h"
|
||||
|
||||
typedef struct {
|
||||
SpriteList *unk_00;
|
||||
G2dRenderer unk_04;
|
||||
SpriteResourceCollection *unk_190[4];
|
||||
SpriteResource *unk_1A0[2][4];
|
||||
} UnkStruct_ov106_02243310;
|
||||
|
||||
#endif // POKEPLATINUM_STRUCT_OV106_02243310_H
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#ifndef POKEPLATINUM_STRUCT_OV106_02243650_DECL_H
|
||||
#define POKEPLATINUM_STRUCT_OV106_02243650_DECL_H
|
||||
|
||||
typedef struct UnkStruct_ov106_02243650_t UnkStruct_ov106_02243650;
|
||||
|
||||
#endif // POKEPLATINUM_STRUCT_OV106_02243650_DECL_H
|
||||
|
|
@ -12,7 +12,7 @@ BOOL sub_02030124(UnkStruct_02030114 *param0);
|
|||
void sub_0203012C(UnkStruct_02030114 *param0, BOOL param1);
|
||||
void sub_02030140(UnkStruct_02030114 *param0, u8 param1, u8 param2, u8 param3, const void *param4);
|
||||
u32 sub_02030198(UnkStruct_02030114 *param0, u8 param1, u8 param2, u8 param3, void *param4);
|
||||
u8 sub_020301E0(u8 param0, u8 *param1);
|
||||
u8 BattleHall_GetRankOfType(u8 idx, u8 *typeRanks);
|
||||
void sub_02030204(u8 param0, u8 *param1, u8 param2);
|
||||
void sub_02030244(u8 *param0);
|
||||
void sub_02030260(UnkStruct_0203026C *param0);
|
||||
|
|
|
|||
|
|
@ -1588,13 +1588,13 @@ Overlay overlay105
|
|||
Object main.nef.p/src_overlay105_ov105_02246214.c.o
|
||||
}
|
||||
|
||||
Overlay overlay106
|
||||
Overlay battle_hall_app
|
||||
{
|
||||
After overlay104
|
||||
Object main.nef.p/src_overlay106_ov106_02241AE0.c.o
|
||||
Object main.nef.p/src_overlay106_ov106_02243310.c.o
|
||||
Object main.nef.p/src_overlay106_ov106_022435FC.c.o
|
||||
Object main.nef.p/src_overlay106_ov106_022436E0.c.o
|
||||
Object main.nef.p/src_applications_frontier_battle_hall_main.c.o
|
||||
Object main.nef.p/src_applications_frontier_battle_hall_sprite_manager.c.o
|
||||
Object main.nef.p/src_applications_frontier_battle_hall_sprites.c.o
|
||||
Object main.nef.p/src_applications_frontier_battle_hall_windows.c.o
|
||||
}
|
||||
|
||||
Overlay overlay107
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ e93f9eb3382856feb76c8b0ba400b7d2593db5c5 *overlay99.sbin
|
|||
de8a847bff8c343d69b853a215e6ee775ef2ef96 *overlay103.sbin
|
||||
a3f4dcf6634992ff3367fe5a377825fb913a39f6 *overlay104.sbin
|
||||
0e6e923a1a359b9482646b3dd0a7a2562e140672 *overlay105.sbin
|
||||
c3a66997e55fb3e761d521136a42f07f4761f5da *overlay106.sbin
|
||||
c3a66997e55fb3e761d521136a42f07f4761f5da *battle_hall_app.sbin
|
||||
f8d3fd65261098ff45b3a31319c904b520814fa2 *overlay107.sbin
|
||||
901f6afe6c1b0b54dc42af812f13560758814d2b *overlay108.sbin
|
||||
5acaa19b61120f72d546a83e36c361b2e383c0bd *overlay109.sbin
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ _0611:
|
|||
CloseMessage
|
||||
FrontierScrCmd_91 30, 0, 0, 0x8008
|
||||
CallIfEq 0x8008, 1, _065B
|
||||
FrontierScrCmd_8E
|
||||
OpenBattleHallApp
|
||||
FrontierScrCmd_91 31, 0, 0, 0x8008
|
||||
FrontierScrCmd_91 36, 0, 0, 0x8008
|
||||
FadeScreenIn
|
||||
|
|
|
|||
1547
src/applications/frontier/battle_hall/main.c
Normal file
1547
src/applications/frontier/battle_hall/main.c
Normal file
File diff suppressed because it is too large
Load Diff
123
src/applications/frontier/battle_hall/sprite_manager.c
Normal file
123
src/applications/frontier/battle_hall/sprite_manager.c
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
#include "applications/frontier/battle_hall/sprite_manager.h"
|
||||
|
||||
#include <nitro.h>
|
||||
|
||||
#include "char_transfer.h"
|
||||
#include "gx_layers.h"
|
||||
#include "narc.h"
|
||||
#include "narc_frontier_obj.h"
|
||||
#include "pltt_transfer.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "render_oam.h"
|
||||
#include "sprite.h"
|
||||
#include "sprite_resource.h"
|
||||
#include "sprite_transfer.h"
|
||||
#include "sprite_util.h"
|
||||
|
||||
static void InitCharPlttTransferBuffers(void);
|
||||
|
||||
static const u8 sCapacities[4] = { 2, 2, 2, 2 };
|
||||
|
||||
void BattleHallApp_InitSpriteManager(BattleHallAppSpriteManager *sprites, Pokemon *mon)
|
||||
{
|
||||
InitCharPlttTransferBuffers();
|
||||
NNS_G2dInitOamManagerModule();
|
||||
RenderOam_Init(0, 128, 0, 32, 0, 128, 0, 32, HEAP_ID_BATTLE_HALL_APP);
|
||||
|
||||
sprites->spriteList = SpriteList_InitRendering(2, &sprites->renderer, HEAP_ID_BATTLE_HALL_APP);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
sprites->resourceCollection[i] = SpriteResourceCollection_New(sCapacities[i], i, HEAP_ID_BATTLE_HALL_APP);
|
||||
}
|
||||
|
||||
sprites->resources[0][0] = SpriteResourceCollection_AddTiles(sprites->resourceCollection[SPRITE_RESOURCE_CHAR], NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_OBJ, BATTLE_HALL_APP_CURSOR_BOX_NCGR, TRUE, 0, NNS_G2D_VRAM_TYPE_2DMAIN, HEAP_ID_BATTLE_HALL_APP);
|
||||
sprites->resources[0][1] = SpriteResourceCollection_AddPalette(sprites->resourceCollection[SPRITE_RESOURCE_PLTT], NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_OBJ, BATTLE_HALL_APP_CURSOR_BOX_PLTT, FALSE, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 1, HEAP_ID_BATTLE_HALL_APP);
|
||||
sprites->resources[0][2] = SpriteResourceCollection_Add(sprites->resourceCollection[SPRITE_RESOURCE_CELL], NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_OBJ, BATTLE_HALL_APP_CURSOR_BOX_NCER, TRUE, 0, SPRITE_RESOURCE_CELL, HEAP_ID_BATTLE_HALL_APP);
|
||||
sprites->resources[0][3] = SpriteResourceCollection_Add(sprites->resourceCollection[SPRITE_RESOURCE_ANIM], NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_OBJ, BATTLE_HALL_APP_CURSOR_BOX_NANR, TRUE, 0, SPRITE_RESOURCE_ANIM, HEAP_ID_BATTLE_HALL_APP);
|
||||
|
||||
NARC *narc = NARC_ctor(NARC_INDEX_POKETOOL__ICONGRA__PL_POKE_ICON, HEAP_ID_BATTLE_HALL_APP);
|
||||
|
||||
sprites->resources[1][0] = SpriteResourceCollection_AddTilesFrom(sprites->resourceCollection[SPRITE_RESOURCE_CHAR], narc, Pokemon_IconSpriteIndex(mon), FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, HEAP_ID_BATTLE_HALL_APP);
|
||||
sprites->resources[1][1] = SpriteResourceCollection_AddPalette(sprites->resourceCollection[SPRITE_RESOURCE_PLTT], NARC_INDEX_POKETOOL__ICONGRA__PL_POKE_ICON, PokeIconPalettesFileIndex(), FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 3, HEAP_ID_BATTLE_HALL_APP);
|
||||
sprites->resources[1][2] = SpriteResourceCollection_AddFrom(sprites->resourceCollection[SPRITE_RESOURCE_CELL], narc, PokeIcon32KCellsFileIndex(), FALSE, 1, SPRITE_RESOURCE_CELL, HEAP_ID_BATTLE_HALL_APP);
|
||||
sprites->resources[1][3] = SpriteResourceCollection_AddFrom(sprites->resourceCollection[SPRITE_RESOURCE_ANIM], narc, PokeIcon32KAnimationFileIndex(), FALSE, 1, SPRITE_RESOURCE_ANIM, HEAP_ID_BATTLE_HALL_APP);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
SpriteTransfer_RequestChar(sprites->resources[i][0]);
|
||||
SpriteTransfer_RequestPlttWholeRange(sprites->resources[i][1]);
|
||||
}
|
||||
|
||||
GXLayers_EngineBToggleLayers(GX_PLANEMASK_OBJ, TRUE);
|
||||
GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, TRUE);
|
||||
NARC_dtor(narc);
|
||||
}
|
||||
|
||||
Sprite *BattleHallApp_InitSprite(BattleHallAppSpriteManager *spriteMan, u32 resourceID, u32 animID, u32 priority, u8 onSubScreen)
|
||||
{
|
||||
SpriteResourcesHeader resourceHeader;
|
||||
SpriteResourcesHeader_Init(&resourceHeader, resourceID, resourceID, resourceID, resourceID, -1, -1, FALSE, 1, spriteMan->resourceCollection[SPRITE_RESOURCE_CHAR], spriteMan->resourceCollection[SPRITE_RESOURCE_PLTT], spriteMan->resourceCollection[SPRITE_RESOURCE_CELL], spriteMan->resourceCollection[SPRITE_RESOURCE_ANIM], NULL, NULL);
|
||||
|
||||
AffineSpriteListTemplate spriteTemplate;
|
||||
|
||||
spriteTemplate.list = spriteMan->spriteList;
|
||||
spriteTemplate.resourceData = &resourceHeader;
|
||||
|
||||
spriteTemplate.position.x = 0;
|
||||
spriteTemplate.position.y = 0;
|
||||
spriteTemplate.position.z = 0;
|
||||
spriteTemplate.affineScale.x = FX32_ONE;
|
||||
spriteTemplate.affineScale.y = FX32_ONE;
|
||||
spriteTemplate.affineScale.z = FX32_ONE;
|
||||
spriteTemplate.affineZRotation = 0;
|
||||
spriteTemplate.priority = priority;
|
||||
|
||||
if (!onSubScreen) {
|
||||
spriteTemplate.vramType = NNS_G2D_VRAM_TYPE_2DMAIN;
|
||||
} else {
|
||||
spriteTemplate.vramType = NNS_G2D_VRAM_TYPE_2DSUB;
|
||||
}
|
||||
|
||||
spriteTemplate.heapID = HEAP_ID_BATTLE_HALL_APP;
|
||||
|
||||
if (onSubScreen == TRUE) {
|
||||
spriteTemplate.position.y += FX32_CONST(192);
|
||||
}
|
||||
|
||||
Sprite *sprite = SpriteList_AddAffine(&spriteTemplate);
|
||||
|
||||
Sprite_SetAnimateFlag(sprite, TRUE);
|
||||
Sprite_SetAnimSpeed(sprite, FX32_ONE);
|
||||
Sprite_SetAnim(sprite, animID);
|
||||
|
||||
return sprite;
|
||||
}
|
||||
|
||||
void BattleHallApp_FreeSprites(BattleHallAppSpriteManager *spriteMan)
|
||||
{
|
||||
for (u8 i = 0; i < 2; i++) {
|
||||
SpriteTransfer_ResetCharTransfer(spriteMan->resources[i][SPRITE_RESOURCE_CHAR]);
|
||||
SpriteTransfer_ResetPlttTransfer(spriteMan->resources[i][SPRITE_RESOURCE_PLTT]);
|
||||
}
|
||||
|
||||
for (u8 i = 0; i < 4; i++) {
|
||||
SpriteResourceCollection_Delete(spriteMan->resourceCollection[i]);
|
||||
}
|
||||
|
||||
SpriteList_Delete(spriteMan->spriteList);
|
||||
RenderOam_Free();
|
||||
CharTransfer_Free();
|
||||
PlttTransfer_Free();
|
||||
}
|
||||
|
||||
static void InitCharPlttTransferBuffers(void)
|
||||
{
|
||||
CharTransferTemplate transferTemplate = {
|
||||
3, 2048, 2048, HEAP_ID_BATTLE_HALL_APP
|
||||
};
|
||||
|
||||
CharTransfer_InitWithVramModes(&transferTemplate, GX_OBJVRAMMODE_CHAR_1D_32K, GX_OBJVRAMMODE_CHAR_1D_32K);
|
||||
|
||||
PlttTransfer_Init(4, HEAP_ID_BATTLE_HALL_APP);
|
||||
CharTransfer_ClearBuffers();
|
||||
PlttTransfer_Clear();
|
||||
}
|
||||
63
src/applications/frontier/battle_hall/sprites.c
Normal file
63
src/applications/frontier/battle_hall/sprites.c
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
#include "applications/frontier/battle_hall/sprites.h"
|
||||
|
||||
#include <nitro.h>
|
||||
|
||||
#include "applications/frontier/battle_hall/sprite_manager.h"
|
||||
|
||||
#include "heap.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "sprite.h"
|
||||
|
||||
BattleHallAppSprite *BattleHallAppSprite_New(BattleHallAppSpriteManager *spriteMan, u32 resourceID, u32 animID, u16 x, u16 y, const u8 *null)
|
||||
{
|
||||
BattleHallAppSprite *sprite = Heap_Alloc(HEAP_ID_BATTLE_HALL_APP, sizeof(BattleHallAppSprite));
|
||||
memset(sprite, 0, sizeof(BattleHallAppSprite));
|
||||
|
||||
sprite->isAlwaysNull = null;
|
||||
sprite->sprite = BattleHallApp_InitSprite(spriteMan, resourceID, animID, 0, FALSE);
|
||||
|
||||
VecFx32 position;
|
||||
position.x = x * FX32_ONE;
|
||||
position.y = y * FX32_ONE;
|
||||
|
||||
Sprite_SetPosition(sprite->sprite, &position);
|
||||
|
||||
return sprite;
|
||||
}
|
||||
|
||||
void *BattleHallAppSprite_Free(BattleHallAppSprite *sprite)
|
||||
{
|
||||
Sprite_Delete(sprite->sprite);
|
||||
Heap_Free(sprite);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void BattleHallAppSprite_SetDrawFlag(BattleHallAppSprite *sprite, BOOL draw)
|
||||
{
|
||||
Sprite_SetDrawFlag(sprite->sprite, draw);
|
||||
}
|
||||
|
||||
void BattleHallAppSprite_SetPosition(BattleHallAppSprite *sprite, u16 x, u16 y)
|
||||
{
|
||||
if (sprite->isAlwaysNull != NULL) {
|
||||
Sprite_SetAnimNoRestart(sprite->sprite, sprite->isAlwaysNull[0]);
|
||||
}
|
||||
|
||||
VecFx32 position = *Sprite_GetPosition(sprite->sprite);
|
||||
|
||||
position.x = x * FX32_ONE;
|
||||
position.y = y * FX32_ONE;
|
||||
|
||||
Sprite_SetPosition(sprite->sprite, &position);
|
||||
}
|
||||
|
||||
void BattleHallAppSprite_SetAnim(BattleHallAppSprite *sprite, u32 animID)
|
||||
{
|
||||
Sprite_SetAnimSpeed(sprite->sprite, FX32_ONE);
|
||||
Sprite_SetAnimNoRestart(sprite->sprite, animID);
|
||||
}
|
||||
|
||||
void BattleHallAppSprite_UpdatePalette(BattleHallAppSprite *sprite, Pokemon *mon)
|
||||
{
|
||||
Sprite_SetExplicitPaletteOffsetAutoAdjust(sprite->sprite, Pokemon_IconPaletteIndex(mon));
|
||||
}
|
||||
41
src/applications/frontier/battle_hall/windows.c
Normal file
41
src/applications/frontier/battle_hall/windows.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#include "applications/frontier/battle_hall/windows.h"
|
||||
|
||||
#include <nitro.h>
|
||||
|
||||
#include "bg_window.h"
|
||||
#include "render_window.h"
|
||||
|
||||
void BattleHallApp_InitWindows(BgConfig *bgConfig, Window *windows)
|
||||
{
|
||||
static const WindowTemplate sWinTemplates[] = {
|
||||
{ BG_LAYER_MAIN_0, 2, 19, 27, 4, 12, 1 },
|
||||
{ BG_LAYER_MAIN_0, 24, 13, 7, 4, 13, 109 },
|
||||
{ BG_LAYER_MAIN_0, 10, 20, 9, 2, 13, 137 },
|
||||
{ BG_LAYER_MAIN_1, 1, 0, 31, 22, 13, 1 }
|
||||
};
|
||||
|
||||
for (u8 i = 0; i < 4; i++) {
|
||||
Window_AddFromTemplate(bgConfig, &windows[i], &sWinTemplates[i]);
|
||||
Window_FillTilemap(&windows[i], 0);
|
||||
}
|
||||
}
|
||||
|
||||
void BattleHallApp_FreeWindows(Window *windows)
|
||||
{
|
||||
for (u16 i = 0; i < 4; i++) {
|
||||
Window_Remove(&windows[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void BattleHallApp_DrawWindow(BgConfig *bgConfig, Window *window)
|
||||
{
|
||||
LoadStandardWindowGraphics(bgConfig, BG_LAYER_MAIN_0, 1015, 11, STANDARD_WINDOW_SYSTEM, HEAP_ID_BATTLE_HALL_APP);
|
||||
Window_DrawStandardFrame(window, TRUE, 1015, 11);
|
||||
}
|
||||
|
||||
void BattleHallApp_DrawMessageBox(Window *window, int frame)
|
||||
{
|
||||
LoadMessageBoxGraphics(window->bgConfig, Window_GetBgLayer(window), 985, 10, frame, HEAP_ID_BATTLE_HALL_APP);
|
||||
Window_FillTilemap(window, 15);
|
||||
Window_DrawMessageBoxWithScrollCursor(window, FALSE, 985, 10);
|
||||
}
|
||||
|
|
@ -965,10 +965,10 @@ pokeplatinum_c = files(
|
|||
'overlay105/ov105_02245E54.c',
|
||||
'overlay105/ov105_02245FB8.c',
|
||||
'overlay105/ov105_02246214.c',
|
||||
'overlay106/ov106_02241AE0.c',
|
||||
'overlay106/ov106_02243310.c',
|
||||
'overlay106/ov106_022435FC.c',
|
||||
'overlay106/ov106_022436E0.c',
|
||||
'applications/frontier/battle_hall/main.c',
|
||||
'applications/frontier/battle_hall/sprite_manager.c',
|
||||
'applications/frontier/battle_hall/sprites.c',
|
||||
'applications/frontier/battle_hall/windows.c',
|
||||
'overlay107/ov107_02241AE0.c',
|
||||
'overlay107/ov107_02245EB0.c',
|
||||
'overlay107/ov107_02249604.c',
|
||||
|
|
|
|||
|
|
@ -580,9 +580,9 @@ void ov104_0222E4BC(u8 param0, u16 param1, u16 param2, u16 *param3, FrontierPoke
|
|||
return;
|
||||
}
|
||||
|
||||
void ov104_0222E5D0(StringTemplate *param0, u32 param1)
|
||||
void BattleFrontier_SetPartnerInStrTemplate(StringTemplate *template, u32 idx)
|
||||
{
|
||||
StringTemplate_SetPlayerName(param0, param1, CommInfo_TrainerInfo(CommSys_CurNetId() ^ 1));
|
||||
StringTemplate_SetPlayerName(template, idx, CommInfo_TrainerInfo(CommSys_CurNetId() ^ 1));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,49 +12,10 @@
|
|||
#include "bg_window.h"
|
||||
#include "gx_layers.h"
|
||||
#include "heap.h"
|
||||
#include "narc_frontier_bg.h"
|
||||
|
||||
#include "res/field/frontier_scripts/fr_script.naix.h"
|
||||
|
||||
// TODO Replace and remove these once frontier_bg.narc is unpacked
|
||||
#define BATTLE_FACTORY_TILES 0
|
||||
#define BATTLE_FACTORY_BATTLE_ROOM_TILEMAP 1
|
||||
#define BATTLE_FACTORY_CORRIDOR_TILEMAP 2
|
||||
#define BATTLE_FACTORY_CORRIDOR_FLOOR_TILEMAP 3
|
||||
#define BATTLE_HALL_BATTLE_ROOM_TILES 14
|
||||
#define BATTLE_HALL_CORRIDOR_TILES 16
|
||||
#define BATTLE_HALL_CORRIDOR_TILEMAP 17
|
||||
#define BATTLE_HALL_BATTLE_ROOM_LIGHTS_TILES 19
|
||||
#define BATTLE_HALL_BATTLE_ROOM_TILEMAP 20
|
||||
#define BATTLE_HALL_BATTLE_ROOM_LIGHTS_TILEMAP 22
|
||||
#define BATTLE_CASTLE_CORRIDOR_TILES 25
|
||||
#define BATTLE_CASTLE_CORRIDOR_TILEMAP 26
|
||||
#define BATTLE_CASTLE_BATTLE_ROOM_TILES 29
|
||||
#define BATTLE_CASTLE_BATTLE_ROOM_TILEMAP 30
|
||||
#define BATTLE_CASTLE_BATTLE_ROOM_CURTAINS_TILEMAP 33
|
||||
#define BATTLE_TOWER_TILES 45
|
||||
#define BATTLE_TOWER_MULTI_BATTLE_ROOM_TILEMAP 46
|
||||
#define BATTLE_TOWER_MULTI_CORRIDOR_TILEMAP 47
|
||||
#define BATTLE_TOWER_MULTI_CORRIDOR_FG_TILEMAP 48
|
||||
#define BATTLE_TOWER_BATTLE_ROOM_TILEMAP 49
|
||||
#define BATTLE_TOWER_CORRIDOR_TILEMAP 50
|
||||
#define BATTLE_TOWER_CORRIDOR_FG_TILEMAP 51
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_TILEMAP 52
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_TILES 54
|
||||
#define BATTLE_ARCADE_CORRIDOR_TILEMAP 55
|
||||
#define BATTLE_ARCADE_CORRIDOR_TILES 56
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_HP_SCREEN_TILEMAP 57
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_HP_SCREEN_TILES 89
|
||||
#define BATTLE_FACTORY_PLTT 129
|
||||
#define BATTLE_HALL_BATTLE_ROOM_PLTT 131
|
||||
#define BATTLE_HALL_CORRIDOR_PLTT 132
|
||||
#define BATTLE_HALL_BATTLE_ROOM_LIGHTS_PLTT 133
|
||||
#define BATTLE_CASTLE_CORRIDOR_PLTT 135
|
||||
#define BATTLE_CASTLE_BATTLE_ROOM_PLTT 140
|
||||
#define BATTLE_TOWER_PLTT 141
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_PLTT 142
|
||||
#define BATTLE_ARCADE_CORRIDOR_PLTT 143
|
||||
#define BATTLE_ARCADE_BATTLE_ROOM_HP_SCREEN_PLTT 169
|
||||
|
||||
typedef void (*UnkFuncPtr_ov104_0223F394)(UnkStruct_ov104_0223C4CC *, void **);
|
||||
|
||||
typedef struct FrontierScene {
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ const FrontierScrCmdFunc Unk_ov104_0223F674[] = {
|
|||
FrontierScrCmd_8B,
|
||||
FrontierScrCmd_8C,
|
||||
FrontierScrCmd_8D,
|
||||
FrontierScrCmd_8E,
|
||||
FrontierScrCmd_OpenBattleHallApp,
|
||||
FrontierScrCmd_8F,
|
||||
FrontierScrCmd_90,
|
||||
FrontierScrCmd_91,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "struct_decls/struct_0202440C_decl.h"
|
||||
|
||||
#include "applications/frontier/battle_hall/main.h"
|
||||
#include "overlay104/frontier_script_context.h"
|
||||
#include "overlay104/ov104_0222DCE0.h"
|
||||
#include "overlay104/ov104_0222FBE4.h"
|
||||
|
|
@ -13,7 +14,6 @@
|
|||
#include "overlay104/struct_ov104_022320B4_t.h"
|
||||
#include "overlay104/struct_ov104_02235208.h"
|
||||
#include "overlay104/struct_ov104_0223B5C0.h"
|
||||
#include "overlay106/ov106_02241AE0.h"
|
||||
#include "savedata/save_table.h"
|
||||
|
||||
#include "field_battle_data_transfer.h"
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include "constdata/const_020EA358.h"
|
||||
|
||||
FS_EXTERN_OVERLAY(overlay106);
|
||||
FS_EXTERN_OVERLAY(battle_hall_app);
|
||||
|
||||
#include <nitro/code16.h>
|
||||
|
||||
|
|
@ -72,26 +72,21 @@ BOOL FrontierScrCmd_8D(FrontierScriptContext *param0)
|
|||
return 0;
|
||||
}
|
||||
|
||||
BOOL FrontierScrCmd_8E(FrontierScriptContext *param0)
|
||||
BOOL FrontierScrCmd_OpenBattleHallApp(FrontierScriptContext *ctx)
|
||||
{
|
||||
int v0;
|
||||
Party *v1;
|
||||
Pokemon *v2;
|
||||
UnkStruct_ov104_0223B5C0 *v3;
|
||||
UnkStruct_ov104_02235208 *v4;
|
||||
UnkStruct_ov104_02230BE4 *v5 = sub_0209B970(param0->unk_00->unk_00);
|
||||
UnkStruct_ov104_02230BE4 *v5 = sub_0209B970(ctx->unk_00->unk_00);
|
||||
|
||||
FS_EXTERN_OVERLAY(overlay106);
|
||||
FS_EXTERN_OVERLAY(battle_hall_app);
|
||||
|
||||
static const ApplicationManagerTemplate v6 = {
|
||||
ov106_02241AE0,
|
||||
ov106_02241B9C,
|
||||
ov106_02241CF0,
|
||||
FS_OVERLAY_ID(overlay106)
|
||||
static const ApplicationManagerTemplate sBattleHallAppTemplate = {
|
||||
BattleHallApp_Init,
|
||||
BattleHallApp_Main,
|
||||
BattleHallApp_Exit,
|
||||
FS_OVERLAY_ID(battle_hall_app)
|
||||
};
|
||||
|
||||
v3 = sub_0209B978(param0->unk_00->unk_00);
|
||||
v4 = Heap_Alloc(HEAP_ID_FIELD2, sizeof(UnkStruct_ov104_02235208));
|
||||
UnkStruct_ov104_0223B5C0 *v3 = sub_0209B978(ctx->unk_00->unk_00);
|
||||
UnkStruct_ov104_02235208 *v4 = Heap_Alloc(HEAP_ID_FIELD2, sizeof(UnkStruct_ov104_02235208));
|
||||
|
||||
MI_CpuClear8(v4, sizeof(UnkStruct_ov104_02235208));
|
||||
|
||||
|
|
@ -99,27 +94,27 @@ BOOL FrontierScrCmd_8E(FrontierScriptContext *param0)
|
|||
v4->unk_04 = v3->unk_04;
|
||||
v4->unk_10 = v3;
|
||||
v4->unk_08 = &v3->unk_704[v3->unk_04][0];
|
||||
v4->unk_0C = v3->unk_264;
|
||||
v4->party = v3->unk_264;
|
||||
v4->unk_18 = v3->unk_08;
|
||||
v4->unk_05 = v3->unk_6F5;
|
||||
v4->unk_14 = &v3->unk_D84[0];
|
||||
|
||||
Party_Init(v4->unk_0C);
|
||||
Party_Init(v4->party);
|
||||
|
||||
v1 = SaveData_GetParty(v5->saveData);
|
||||
v2 = Party_GetPokemonBySlotIndex(v1, v3->unk_260[0]);
|
||||
Party *party = SaveData_GetParty(v5->saveData);
|
||||
Pokemon *mon = Party_GetPokemonBySlotIndex(party, v3->unk_260[0]);
|
||||
|
||||
Party_AddPokemon(v4->unk_0C, v2);
|
||||
Party_AddPokemon(v4->party, mon);
|
||||
|
||||
if (v4->unk_04 == 1) {
|
||||
v2 = Party_GetPokemonBySlotIndex(v1, v3->unk_260[1]);
|
||||
Party_AddPokemon(v4->unk_0C, v2);
|
||||
mon = Party_GetPokemonBySlotIndex(party, v3->unk_260[1]);
|
||||
Party_AddPokemon(v4->party, mon);
|
||||
} else if ((v4->unk_04 == 2) || (v4->unk_04 == 3)) {
|
||||
Party_AddPokemon(v4->unk_0C, v3->unk_D8C);
|
||||
Party_AddPokemon(v4->party, v3->unk_D8C);
|
||||
}
|
||||
|
||||
sub_0209B988(param0->unk_00->unk_00, &v6, v4, 0, ov104_02234A08);
|
||||
return 1;
|
||||
sub_0209B988(ctx->unk_00->unk_00, &sBattleHallAppTemplate, v4, 0, ov104_02234A08);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL FrontierScrCmd_8F(FrontierScriptContext *param0)
|
||||
|
|
@ -238,7 +233,7 @@ BOOL FrontierScrCmd_91(FrontierScriptContext *param0)
|
|||
}
|
||||
break;
|
||||
case 28:
|
||||
v4 = sub_020301E0(v3->unk_6F5, &v3->unk_704[v3->unk_04][0]);
|
||||
v4 = BattleHall_GetRankOfType(v3->unk_6F5, &v3->unk_704[v3->unk_04][0]);
|
||||
|
||||
if (v4 < 10) {
|
||||
sub_02030204(v3->unk_6F5, &v3->unk_704[v3->unk_04][0], v4 + 1);
|
||||
|
|
@ -248,7 +243,7 @@ BOOL FrontierScrCmd_91(FrontierScriptContext *param0)
|
|||
sub_0209BA80(v3);
|
||||
break;
|
||||
case 30:
|
||||
*v11 = ov104_0223B5B0(v3->unk_04);
|
||||
*v11 = BattleFrontier_IsMultiPlayerChallenge(v3->unk_04);
|
||||
break;
|
||||
case 17:
|
||||
*v11 = v3->unk_04;
|
||||
|
|
@ -265,7 +260,7 @@ BOOL FrontierScrCmd_91(FrontierScriptContext *param0)
|
|||
ov104_0222E278(&(v3->unk_40[1]), v3->unk_18[v3->unk_05 * 2 + 1], HEAP_ID_FIELD2, 178);
|
||||
break;
|
||||
case 33:
|
||||
*v11 = sub_020301E0(v3->unk_6F5, &v3->unk_704[v3->unk_04][0]);
|
||||
*v11 = BattleHall_GetRankOfType(v3->unk_6F5, &v3->unk_704[v3->unk_04][0]);
|
||||
break;
|
||||
case 34:
|
||||
*v11 = ov104_02235578(v3);
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ UnkStruct_ov104_0223B5C0 *ov104_02234DB4(SaveData *saveData, u16 param1, u8 para
|
|||
}
|
||||
}
|
||||
|
||||
if (ov104_0223B5B0(v10->unk_04) == 1) {
|
||||
if (BattleFrontier_IsMultiPlayerChallenge(v10->unk_04) == 1) {
|
||||
ov104_0222E630(v10->saveData);
|
||||
}
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ static void ov104_022350B8(UnkStruct_ov104_0223B5C0 *param0)
|
|||
v1 = 2;
|
||||
}
|
||||
|
||||
v0 = sub_020301E0(param0->unk_6F5, ¶m0->unk_704[param0->unk_04][0]);
|
||||
v0 = BattleHall_GetRankOfType(param0->unk_6F5, ¶m0->unk_704[param0->unk_04][0]);
|
||||
param0->unk_07 = ov104_02235704(param0);
|
||||
|
||||
ov104_0223AF58(param0->unk_6F5, v1, v0, param0->unk_05, param0->unk_18);
|
||||
|
|
@ -215,7 +215,7 @@ void ov104_022351CC(UnkStruct_ov104_0223B5C0 *param0, void *param1)
|
|||
|
||||
param0->unk_6F2 = ov104_02235208(param1, 0);
|
||||
param0->unk_6F5 = param0->unk_6F2;
|
||||
param0->unk_6F4 = ov104_0223B5A4(param0->unk_6F2);
|
||||
param0->unk_6F4 = BattleHall_CursorPosToType(param0->unk_6F2);
|
||||
|
||||
if (param0->unk_6F5 >= 17) {
|
||||
param0->unk_6F5 = 18 - 1;
|
||||
|
|
@ -300,7 +300,7 @@ void ov104_0223526C(UnkStruct_ov104_0223B5C0 *param0, u8 param1)
|
|||
}
|
||||
|
||||
for (v0 = 0; v0 < 18; v0++) {
|
||||
v1[0] = sub_020301E0(v0, ¶m0->unk_704[param0->unk_04][0]);
|
||||
v1[0] = BattleHall_GetRankOfType(v0, ¶m0->unk_704[param0->unk_04][0]);
|
||||
ov104_02235620(param0->saveData, param0->unk_04, v0, v1[0]);
|
||||
}
|
||||
|
||||
|
|
@ -464,7 +464,7 @@ void ov104_022356A0(UnkStruct_ov104_0223B5C0 *param0)
|
|||
|
||||
if (param0->unk_04 != 2) {
|
||||
for (v1 = 0; v1 < (18 - 1); v1++) {
|
||||
v0 = sub_020301E0(v1, ¶m0->unk_704[param0->unk_04][0]);
|
||||
v0 = BattleHall_GetRankOfType(v1, ¶m0->unk_704[param0->unk_04][0]);
|
||||
|
||||
if (v0 < 10) {
|
||||
break;
|
||||
|
|
@ -497,7 +497,7 @@ static u16 ov104_02235704(UnkStruct_ov104_0223B5C0 *param0)
|
|||
u8 v5;
|
||||
float v6, v7;
|
||||
|
||||
v5 = sub_020301E0(param0->unk_6F5, ¶m0->unk_704[param0->unk_04][0]);
|
||||
v5 = BattleHall_GetRankOfType(param0->unk_6F5, ¶m0->unk_704[param0->unk_04][0]);
|
||||
v2 = ov104_0223B64C(param0);
|
||||
|
||||
if (param0->unk_04 == 2) {
|
||||
|
|
@ -521,7 +521,7 @@ static u16 ov104_02235704(UnkStruct_ov104_0223B5C0 *param0)
|
|||
if (v3 == param0->unk_6F5) {
|
||||
v7 += 1.0;
|
||||
} else {
|
||||
if (sub_020301E0(v3, ¶m0->unk_704[param0->unk_04][0]) > 0) {
|
||||
if (BattleHall_GetRankOfType(v3, ¶m0->unk_704[param0->unk_04][0]) > 0) {
|
||||
v7 += 1.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,14 +38,12 @@ FieldBattleDTO *ov104_0223B250(UnkStruct_ov104_0223B5C0 *param0, UnkStruct_ov104
|
|||
static u32 ov104_0223B4D4(u8 param0);
|
||||
static void ov104_0223B518(FrontierPokemonDataDTO *param0, u8 param1, u16 param2, u16 param3[], int param4, int param5, int param6);
|
||||
static u32 ov104_0223B57C(UnkStruct_ov104_0223B5C0 *param0, u8 param1);
|
||||
u8 ov104_0223B5A4(u8 param0);
|
||||
u8 ov104_0223B5C0(UnkStruct_ov104_0223B5C0 *param0);
|
||||
static u8 ov104_0223B5F0(u8 param0);
|
||||
static u16 ov104_0223B604(UnkStruct_ov104_0223B5C0 *param0, u8 param1, u8 param2);
|
||||
static u16 ov104_0223B644(u8 param0);
|
||||
u16 ov104_0223B64C(UnkStruct_ov104_0223B5C0 *param0);
|
||||
static BOOL ov104_0223B4A4(UnkStruct_ov104_0223B5C0 *param0, u8 param1);
|
||||
BOOL ov104_0223B5B0(u8 param0);
|
||||
|
||||
static const u16 Unk_ov104_0224041C[10][8] = {
|
||||
{ 0x2, 0x3, 0x14, 0x15, 0x25, 0x24, 0x16, 0x1C },
|
||||
|
|
@ -1596,7 +1594,7 @@ FieldBattleDTO *ov104_0223B250(UnkStruct_ov104_0223B5C0 *param0, UnkStruct_ov104
|
|||
ov104_0222E284(v8, &v10, v5, 1, 11);
|
||||
Party_InitWithCapacity(v8->parties[1], v5);
|
||||
|
||||
v7 = sub_020301E0(param0->unk_6F5, ¶m0->unk_704[param0->unk_04][0]);
|
||||
v7 = BattleHall_GetRankOfType(param0->unk_6F5, ¶m0->unk_704[param0->unk_04][0]);
|
||||
|
||||
if (param0->unk_04 == 2) {
|
||||
v7 = (10 - 1);
|
||||
|
|
@ -1743,43 +1741,37 @@ static u32 ov104_0223B57C(UnkStruct_ov104_0223B5C0 *param0, u8 param1)
|
|||
return v1;
|
||||
}
|
||||
|
||||
static const u8 Unk_ov104_02241244[20] = {
|
||||
0x0,
|
||||
0xA,
|
||||
0xB,
|
||||
0xD,
|
||||
0xC,
|
||||
0xF,
|
||||
0x1,
|
||||
0x3,
|
||||
0x4,
|
||||
0x2,
|
||||
0xE,
|
||||
0x6,
|
||||
0x5,
|
||||
0x7,
|
||||
0x10,
|
||||
0x11,
|
||||
0x8,
|
||||
0xfe,
|
||||
0xfe,
|
||||
0x9
|
||||
static const u8 sBattleHallAppGridOrder[20] = {
|
||||
TYPE_NORMAL,
|
||||
TYPE_FIRE,
|
||||
TYPE_WATER,
|
||||
TYPE_ELECTRIC,
|
||||
TYPE_GRASS,
|
||||
TYPE_ICE,
|
||||
TYPE_FIGHTING,
|
||||
TYPE_POISON,
|
||||
TYPE_GROUND,
|
||||
TYPE_FLYING,
|
||||
TYPE_PSYCHIC,
|
||||
TYPE_BUG,
|
||||
TYPE_ROCK,
|
||||
TYPE_GHOST,
|
||||
TYPE_DRAGON,
|
||||
TYPE_DARK,
|
||||
TYPE_STEEL,
|
||||
BATTLE_HALL_MON_SUMMARY,
|
||||
BATTLE_HALL_MON_SUMMARY,
|
||||
TYPE_MYSTERY
|
||||
};
|
||||
|
||||
u8 ov104_0223B5A4(u8 param0)
|
||||
u8 BattleHall_CursorPosToType(u8 cursorPos)
|
||||
{
|
||||
return Unk_ov104_02241244[param0];
|
||||
return sBattleHallAppGridOrder[cursorPos];
|
||||
}
|
||||
|
||||
BOOL ov104_0223B5B0(u8 param0)
|
||||
BOOL BattleFrontier_IsMultiPlayerChallenge(u8 challengeMode)
|
||||
{
|
||||
switch (param0) {
|
||||
case 2:
|
||||
case 3:
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return challengeMode == 2 || challengeMode == 3;
|
||||
}
|
||||
|
||||
u8 ov104_0223B5C0(UnkStruct_ov104_0223B5C0 *param0)
|
||||
|
|
@ -1857,7 +1849,7 @@ u16 ov104_0223B64C(UnkStruct_ov104_0223B5C0 *param0)
|
|||
return v3;
|
||||
}
|
||||
} else {
|
||||
if (ov104_0223B5B0(param0->unk_04) == 1) {
|
||||
if (BattleFrontier_IsMultiPlayerChallenge(param0->unk_04) == 1) {
|
||||
if (v2 > param0->unk_D84[0]) {
|
||||
return v2;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2076,7 +2076,7 @@ static BOOL ov105_02244424(UnkStruct_ov105_02241FF4 *param0)
|
|||
param0->unk_310 = NULL;
|
||||
}
|
||||
|
||||
ov104_0222E5D0(param0->unk_20, 0);
|
||||
BattleFrontier_SetPartnerInStrTemplate(param0->unk_20, 0);
|
||||
|
||||
v1 = Party_GetPokemonBySlotIndex(param0->unk_31C, 2 + param0->unk_324[0]);
|
||||
v2 = Pokemon_GetBoxPokemon(v1);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,152 +0,0 @@
|
|||
#include "overlay106/ov106_02243310.h"
|
||||
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "overlay106/struct_ov106_02243310.h"
|
||||
|
||||
#include "char_transfer.h"
|
||||
#include "gx_layers.h"
|
||||
#include "narc.h"
|
||||
#include "pltt_transfer.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "render_oam.h"
|
||||
#include "sprite.h"
|
||||
#include "sprite_resource.h"
|
||||
#include "sprite_transfer.h"
|
||||
#include "sprite_util.h"
|
||||
|
||||
void ov106_02243310(UnkStruct_ov106_02243310 *param0, Pokemon *param1);
|
||||
Sprite *ov106_022434BC(UnkStruct_ov106_02243310 *param0, u32 param1, u32 param2, u32 param3, u8 param4);
|
||||
void ov106_02243570(UnkStruct_ov106_02243310 *param0);
|
||||
static void ov106_022435C8(void);
|
||||
|
||||
static const u8 Unk_ov106_0224384C[4] = {
|
||||
0x2,
|
||||
0x2,
|
||||
0x2,
|
||||
0x2
|
||||
};
|
||||
|
||||
void ov106_02243310(UnkStruct_ov106_02243310 *param0, Pokemon *param1)
|
||||
{
|
||||
int v0;
|
||||
NARC *v1;
|
||||
|
||||
ov106_022435C8();
|
||||
NNS_G2dInitOamManagerModule();
|
||||
RenderOam_Init(0, 128, 0, 32, 0, 128, 0, 32, 98);
|
||||
|
||||
param0->unk_00 = SpriteList_InitRendering(2, ¶m0->unk_04, HEAP_ID_98);
|
||||
|
||||
for (v0 = 0; v0 < 4; v0++) {
|
||||
param0->unk_190[v0] = SpriteResourceCollection_New(Unk_ov106_0224384C[v0], v0, HEAP_ID_98);
|
||||
}
|
||||
|
||||
param0->unk_1A0[0][0] = SpriteResourceCollection_AddTiles(param0->unk_190[0], 151, 12, 1, 0, NNS_G2D_VRAM_TYPE_2DMAIN, HEAP_ID_98);
|
||||
param0->unk_1A0[0][1] = SpriteResourceCollection_AddPalette(param0->unk_190[1], 151, 38, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 1, HEAP_ID_98);
|
||||
param0->unk_1A0[0][2] = SpriteResourceCollection_Add(param0->unk_190[2], 151, 14, 1, 0, 2, HEAP_ID_98);
|
||||
|
||||
param0->unk_1A0[0][3] = SpriteResourceCollection_Add(param0->unk_190[3], 151, 13, 1, 0, 3, HEAP_ID_98);
|
||||
v1 = NARC_ctor(NARC_INDEX_POKETOOL__ICONGRA__PL_POKE_ICON, HEAP_ID_98);
|
||||
|
||||
param0->unk_1A0[1][0] = SpriteResourceCollection_AddTilesFrom(param0->unk_190[0], v1, Pokemon_IconSpriteIndex(param1), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, HEAP_ID_98);
|
||||
param0->unk_1A0[1][1] = SpriteResourceCollection_AddPalette(param0->unk_190[1], 19, PokeIconPalettesFileIndex(), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 3, HEAP_ID_98);
|
||||
param0->unk_1A0[1][2] = SpriteResourceCollection_AddFrom(param0->unk_190[2], v1, PokeIcon32KCellsFileIndex(), 0, 1, 2, HEAP_ID_98);
|
||||
param0->unk_1A0[1][3] = SpriteResourceCollection_AddFrom(param0->unk_190[3], v1, PokeIcon32KAnimationFileIndex(), 0, 1, 3, HEAP_ID_98);
|
||||
|
||||
for (v0 = 0; v0 < 2; v0++) {
|
||||
SpriteTransfer_RequestChar(param0->unk_1A0[v0][0]);
|
||||
SpriteTransfer_RequestPlttWholeRange(param0->unk_1A0[v0][1]);
|
||||
}
|
||||
|
||||
GXLayers_EngineBToggleLayers(GX_PLANEMASK_OBJ, 1);
|
||||
GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 1);
|
||||
NARC_dtor(v1);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Sprite *ov106_022434BC(UnkStruct_ov106_02243310 *param0, u32 param1, u32 param2, u32 param3, u8 param4)
|
||||
{
|
||||
int v0;
|
||||
SpriteResourcesHeader v1;
|
||||
Sprite *v2;
|
||||
|
||||
SpriteResourcesHeader_Init(&v1, param1, param1, param1, param1, 0xffffffff, 0xffffffff, 0, 1, param0->unk_190[0], param0->unk_190[1], param0->unk_190[2], param0->unk_190[3], NULL, NULL);
|
||||
|
||||
{
|
||||
AffineSpriteListTemplate v3;
|
||||
|
||||
v3.list = param0->unk_00;
|
||||
v3.resourceData = &v1;
|
||||
|
||||
v3.position.x = 0;
|
||||
v3.position.y = 0;
|
||||
v3.position.z = 0;
|
||||
v3.affineScale.x = FX32_ONE;
|
||||
v3.affineScale.y = FX32_ONE;
|
||||
v3.affineScale.z = FX32_ONE;
|
||||
v3.affineZRotation = 0;
|
||||
v3.priority = param3;
|
||||
|
||||
if (param4 == 0) {
|
||||
v3.vramType = NNS_G2D_VRAM_TYPE_2DMAIN;
|
||||
} else {
|
||||
v3.vramType = NNS_G2D_VRAM_TYPE_2DSUB;
|
||||
}
|
||||
|
||||
v3.heapID = HEAP_ID_98;
|
||||
|
||||
if (param4 == 1) {
|
||||
v3.position.y += (192 << FX32_SHIFT);
|
||||
}
|
||||
|
||||
v2 = SpriteList_AddAffine(&v3);
|
||||
|
||||
Sprite_SetAnimateFlag(v2, 1);
|
||||
Sprite_SetAnimSpeed(v2, FX32_ONE);
|
||||
Sprite_SetAnim(v2, param2);
|
||||
}
|
||||
|
||||
return v2;
|
||||
}
|
||||
|
||||
void ov106_02243570(UnkStruct_ov106_02243310 *param0)
|
||||
{
|
||||
u8 v0;
|
||||
|
||||
for (v0 = 0; v0 < 2; v0++) {
|
||||
SpriteTransfer_ResetCharTransfer(param0->unk_1A0[v0][0]);
|
||||
SpriteTransfer_ResetPlttTransfer(param0->unk_1A0[v0][1]);
|
||||
}
|
||||
|
||||
for (v0 = 0; v0 < 4; v0++) {
|
||||
SpriteResourceCollection_Delete(param0->unk_190[v0]);
|
||||
}
|
||||
|
||||
SpriteList_Delete(param0->unk_00);
|
||||
RenderOam_Free();
|
||||
CharTransfer_Free();
|
||||
PlttTransfer_Free();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void ov106_022435C8(void)
|
||||
{
|
||||
{
|
||||
CharTransferTemplate v0 = {
|
||||
3, 2048, 2048, 98
|
||||
};
|
||||
|
||||
CharTransfer_InitWithVramModes(&v0, GX_OBJVRAMMODE_CHAR_1D_32K, GX_OBJVRAMMODE_CHAR_1D_32K);
|
||||
}
|
||||
|
||||
PlttTransfer_Init((1 + 3), HEAP_ID_98);
|
||||
CharTransfer_ClearBuffers();
|
||||
PlttTransfer_Clear();
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
#include "overlay106/ov106_022435FC.h"
|
||||
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "overlay106/ov106_02243310.h"
|
||||
#include "overlay106/struct_ov106_02243310.h"
|
||||
#include "overlay106/struct_ov106_02243650_decl.h"
|
||||
|
||||
#include "heap.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "sprite.h"
|
||||
|
||||
struct UnkStruct_ov106_02243650_t {
|
||||
u32 unk_00;
|
||||
u32 unk_04;
|
||||
u32 unk_08;
|
||||
const u8 *unk_0C;
|
||||
Sprite *unk_10;
|
||||
};
|
||||
|
||||
UnkStruct_ov106_02243650 *ov106_022435FC(UnkStruct_ov106_02243310 *param0, u32 param1, u32 param2, u16 param3, u16 param4, const u8 *param5);
|
||||
void *ov106_02243650(UnkStruct_ov106_02243650 *param0);
|
||||
void ov106_02243664(UnkStruct_ov106_02243650 *param0, int param1);
|
||||
void ov106_02243670(UnkStruct_ov106_02243650 *param0, u16 param1, u16 param2);
|
||||
void ov106_022436B0(UnkStruct_ov106_02243650 *param0, u32 param1);
|
||||
void ov106_022436CC(UnkStruct_ov106_02243650 *param0, Pokemon *param1);
|
||||
|
||||
UnkStruct_ov106_02243650 *ov106_022435FC(UnkStruct_ov106_02243310 *param0, u32 param1, u32 param2, u16 param3, u16 param4, const u8 *param5)
|
||||
{
|
||||
UnkStruct_ov106_02243650 *v0;
|
||||
VecFx32 v1;
|
||||
|
||||
v0 = Heap_Alloc(HEAP_ID_98, sizeof(UnkStruct_ov106_02243650));
|
||||
memset(v0, 0, sizeof(UnkStruct_ov106_02243650));
|
||||
|
||||
v0->unk_0C = param5;
|
||||
|
||||
if (param5 != NULL) {
|
||||
v0->unk_10 = ov106_022434BC(param0, param1, param2, 0, 0);
|
||||
} else {
|
||||
v0->unk_10 = ov106_022434BC(param0, param1, param2, 0, 0);
|
||||
}
|
||||
|
||||
v1.x = (param3 * FX32_ONE);
|
||||
v1.y = (param4 * FX32_ONE);
|
||||
|
||||
Sprite_SetPosition(v0->unk_10, &v1);
|
||||
|
||||
return v0;
|
||||
}
|
||||
|
||||
void *ov106_02243650(UnkStruct_ov106_02243650 *param0)
|
||||
{
|
||||
Sprite_Delete(param0->unk_10);
|
||||
Heap_Free(param0);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void ov106_02243664(UnkStruct_ov106_02243650 *param0, int param1)
|
||||
{
|
||||
Sprite_SetDrawFlag(param0->unk_10, param1);
|
||||
return;
|
||||
}
|
||||
|
||||
void ov106_02243670(UnkStruct_ov106_02243650 *param0, u16 param1, u16 param2)
|
||||
{
|
||||
VecFx32 v0;
|
||||
|
||||
if (param0->unk_0C != NULL) {
|
||||
Sprite_SetAnimNoRestart(param0->unk_10, param0->unk_0C[0]);
|
||||
}
|
||||
|
||||
v0 = *(Sprite_GetPosition(param0->unk_10));
|
||||
|
||||
v0.x = (param1 * FX32_ONE);
|
||||
v0.y = (param2 * FX32_ONE);
|
||||
|
||||
Sprite_SetPosition(param0->unk_10, &v0);
|
||||
return;
|
||||
}
|
||||
|
||||
void ov106_022436B0(UnkStruct_ov106_02243650 *param0, u32 param1)
|
||||
{
|
||||
Sprite_SetAnimSpeed(param0->unk_10, FX32_ONE);
|
||||
Sprite_SetAnimNoRestart(param0->unk_10, param1);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ov106_022436CC(UnkStruct_ov106_02243650 *param0, Pokemon *param1)
|
||||
{
|
||||
Sprite_SetExplicitPaletteOffsetAutoAdjust(param0->unk_10, Pokemon_IconPaletteIndex(param1));
|
||||
return;
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
#include "overlay106/ov106_022436E0.h"
|
||||
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "bg_window.h"
|
||||
#include "render_window.h"
|
||||
|
||||
void ov106_022436E0(BgConfig *param0, Window *param1);
|
||||
void ov106_02243710(Window *param0);
|
||||
void ov106_0224372C(BgConfig *param0, Window *param1);
|
||||
void ov106_02243758(Window *param0, int param1);
|
||||
|
||||
static const WindowTemplate Unk_ov106_02243860[] = {
|
||||
{ 0x0, 0x2, 0x13, 0x1B, 0x4, 0xC, 0x1 },
|
||||
{ 0x0, 0x18, 0xD, 0x7, 0x4, 0xD, 0x6D },
|
||||
{ 0x0, 0xA, 0x14, 0x9, 0x2, 0xD, 0x89 },
|
||||
{ 0x1, 0x1, 0x0, 0x1F, 0x16, 0xD, 0x1 }
|
||||
};
|
||||
|
||||
void ov106_022436E0(BgConfig *param0, Window *param1)
|
||||
{
|
||||
u8 v0;
|
||||
const WindowTemplate *v1 = Unk_ov106_02243860;
|
||||
|
||||
for (v0 = 0; v0 < 4; v0++) {
|
||||
Window_AddFromTemplate(param0, ¶m1[v0], &v1[v0]);
|
||||
Window_FillTilemap(¶m1[v0], 0);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ov106_02243710(Window *param0)
|
||||
{
|
||||
u16 v0;
|
||||
|
||||
for (v0 = 0; v0 < 4; v0++) {
|
||||
Window_Remove(¶m0[v0]);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ov106_0224372C(BgConfig *param0, Window *param1)
|
||||
{
|
||||
LoadStandardWindowGraphics(param0, BG_LAYER_MAIN_0, (1024 - 9), 11, 0, HEAP_ID_98);
|
||||
Window_DrawStandardFrame(param1, 1, (1024 - 9), 11);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ov106_02243758(Window *param0, int param1)
|
||||
{
|
||||
LoadMessageBoxGraphics(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - 9) - (18 + 12)), 10, param1, HEAP_ID_98);
|
||||
Window_FillTilemap(param0, 15);
|
||||
Window_DrawMessageBoxWithScrollCursor(param0, 0, ((1024 - 9) - (18 + 12)), 10);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -511,7 +511,7 @@ int ov107_02241BD4(ApplicationManager *appMan, int *param1)
|
|||
}
|
||||
|
||||
ov107_02249DBC(&v0->unk_50[6], Options_Frame(v0->options));
|
||||
ov104_0222E5D0(v0->unk_24, 0);
|
||||
BattleFrontier_SetPartnerInStrTemplate(v0->unk_24, 0);
|
||||
|
||||
v0->unk_0A = ov107_02243918(v0, 8, FONT_MESSAGE);
|
||||
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ int ov107_02245FD0(ApplicationManager *appMan, int *param1)
|
|||
}
|
||||
|
||||
ov107_02249DBC(&v0->unk_50[7], Options_Frame(v0->options));
|
||||
ov104_0222E5D0(v0->unk_24, 0);
|
||||
BattleFrontier_SetPartnerInStrTemplate(v0->unk_24, 0);
|
||||
v0->unk_0A = ov107_022477CC(v0, 7, FONT_MESSAGE);
|
||||
ov107_02248350(v0, param1, 3);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ BOOL sub_02030124(UnkStruct_02030114 *param0);
|
|||
void sub_0203012C(UnkStruct_02030114 *param0, BOOL param1);
|
||||
void sub_02030140(UnkStruct_02030114 *param0, u8 param1, u8 param2, u8 param3, const void *param4);
|
||||
u32 sub_02030198(UnkStruct_02030114 *param0, u8 param1, u8 param2, u8 param3, void *param4);
|
||||
u8 sub_020301E0(u8 param0, u8 *param1);
|
||||
void sub_02030204(u8 param0, u8 *param1, u8 param2);
|
||||
void sub_02030244(u8 *param0);
|
||||
void sub_02030260(UnkStruct_0203026C *param0);
|
||||
|
|
@ -95,17 +94,13 @@ u32 sub_02030198(UnkStruct_02030114 *param0, u8 param1, u8 param2, u8 param3, vo
|
|||
return 0;
|
||||
}
|
||||
|
||||
u8 sub_020301E0(u8 param0, u8 *param1)
|
||||
u8 BattleHall_GetRankOfType(u8 idx, u8 *typeRanks)
|
||||
{
|
||||
u8 v0;
|
||||
u8 v1;
|
||||
u8 v2;
|
||||
u8 byte = idx / 2;
|
||||
u8 nybble = idx % 2;
|
||||
u8 rank = (typeRanks[byte] >> (4 * nybble)) & 0xf;
|
||||
|
||||
v0 = (param0 / 2);
|
||||
v1 = (param0 % 2);
|
||||
v2 = (param1[v0] >> (4 * v1)) & 0xf;
|
||||
|
||||
return v2;
|
||||
return rank;
|
||||
}
|
||||
|
||||
void sub_02030204(u8 param0, u8 *param1, u8 param2)
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
#include "struct_defs/struct_02039A58.h"
|
||||
#include "struct_defs/struct_0209BBA4.h"
|
||||
|
||||
#include "applications/frontier/battle_hall/main.h"
|
||||
#include "overlay104/ov104_0222ECE8.h"
|
||||
#include "overlay104/ov104_0223C164.h"
|
||||
#include "overlay105/ov105_02241AE0.h"
|
||||
#include "overlay106/ov106_02241AE0.h"
|
||||
#include "overlay107/ov107_02241AE0.h"
|
||||
#include "overlay107/ov107_02245EB0.h"
|
||||
#include "overlay108/ov108_02241AE0.h"
|
||||
|
|
@ -57,9 +57,9 @@ static const CommCmdTable Unk_020F8BF0[] = {
|
|||
{ ov104_0222EDDC, CommPacketSizeOf_Variable, NULL },
|
||||
{ ov104_0222EE38, CommPacketSizeOf_Variable, NULL },
|
||||
{ ov104_0222EEA8, CommPacketSizeOf_Variable, ov104_0222EED8 },
|
||||
{ ov106_02243130, CommPacketSizeOf_Variable, NULL },
|
||||
{ ov106_02243180, CommPacketSizeOf_Variable, NULL },
|
||||
{ ov106_022431E0, CommPacketSizeOf_Variable, NULL },
|
||||
{ BattleHall_DummyCommCommand, CommPacketSizeOf_Variable, NULL },
|
||||
{ BattleHall_HandleTypeSelectionMsg, CommPacketSizeOf_Variable, NULL },
|
||||
{ BattleHall_HandlePartnerDecisionCmd, CommPacketSizeOf_Variable, NULL },
|
||||
{ ov104_0222F418, CommPacketSizeOf_Variable, NULL },
|
||||
{ ov104_0222F480, CommPacketSizeOf_Variable, NULL },
|
||||
{ ov104_0222F530, CommPacketSizeOf_Variable, NULL },
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user