Merge pull request #209 from TrainerRiley/poketch_system_part_2

Poketch System Part 2
This commit is contained in:
Rachel 2024-06-21 07:53:20 -07:00 committed by GitHub
commit 310478f899
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
66 changed files with 617 additions and 573 deletions

View File

@ -15,7 +15,7 @@ BOOL sub_0203CD74(FieldSystem * fieldSystem);
void sub_0203CD84(FieldSystem * fieldSystem, const OverlayManagerTemplate * param1, void * param2);
void sub_0203D128(void);
void sub_0203D140(void);
PoketchSystem * sub_0203D158(void);
PoketchSystem * FieldSystem_GetPoketchSystem(void);
BGL * sub_0203D170(void * param0);
SaveData * FieldSystem_SaveData(void * param0);

View File

@ -11,9 +11,9 @@ typedef void (* PoketchButtonCallback)(u32, u32, u32, void *);
enum ButtonManagerState {
BUTTON_MANAGER_STATE_NULL = 0,
BUTTON_MANAGER_STATE_TOUCH,
BUTTON_MANAGER_STATE_OUT,
BUTTON_MANAGER_STATE_DRAGGING,
BUTTON_MANAGER_STATE_TAP,
BUTTON_MANAGER_STATE_DOUBLETAP,
BUTTON_MANAGER_STATE_DOUBLE_TAP,
BUTTON_MANAGER_STATE_TIMER0,
BUTTON_MANAGER_STATE_TIMER1,
BUTTON_MANAGER_STATE_REPEAT,
@ -30,8 +30,8 @@ enum ButtonTouchState {
enum ButtonEventState {
BUTTON_STATE_IDLE = 0,
BUTTON_STATE_TAP,
BUTTON_STATE_CHECK_DOUBLETAP,
BUTTON_STATE_DOUBLETAP,
BUTTON_STATE_CHECK_DOUBLE_TAP,
BUTTON_STATE_DOUBLE_TAP,
BUTTON_STATE_RESET,
};

View File

@ -1,5 +1,5 @@
#ifndef POKEPLATINUM_OV25_02253CE0_H
#define POKEPLATINUM_OV25_02253CE0_H
#ifndef POKEPLATINUM_POKETCH_SYSTEM_H
#define POKEPLATINUM_POKETCH_SYSTEM_H
#include "struct_decls/struct_02018340_decl.h"
#include "field/field_system_decl.h"
@ -13,73 +13,130 @@
#include <nnsys.h>
enum ButtonDir{
#define POKETCH_PEDOMETER_MAX 99999
#define POKETCH_SCREEN_MIN_X 16
#define POKETCH_SCREEN_MAX_X 207
#define POKETCH_SCREEN_MIN_Y 16
#define POKETCH_SCREEN_MAX_Y 175
#define POKETCH_BUTTON_TOP_MIN_X 224
#define POKETCH_BUTTON_TOP_MAX_X 255
#define POKETCH_BUTTON_TOP_MIN_Y 32
#define POKETCH_BUTTON_TOP_MAX_Y 96
#define POKETCH_BUTTON_BOTTOM_MIN_X 224
#define POKETCH_BUTTON_BOTTOM_MAX_X 255
#define POKETCH_BUTTON_BOTTOM_MIN_Y 96
#define POKETCH_BUTTON_BOTTOM_MAX_Y 160
enum ButtonDir {
BUTTON_UP,
BUTTON_DOWN,
};
enum PoketchMainButton {
POKETCH_SYSTEM_MAIN_BUTTON_UP = 0,
POKETCH_SYSTEM_MAIN_BUTTON_DOWN,
POKETCH_SYSTEM_MAIN_BUTTON_SCREEN,
};
enum PoketchSystemState {
POKETCH_SYSTEM_INIT = 0,
POKETCH_SYSTEM_UPDATE,
POKETCH_SYSTEM_CHANGE_APP,
POKETCH_SYSTEM_SHUTDOWN,
POKETCH_SYSTEM_UNLOAD
};
enum PoketchAppState {
POKETCH_APP_STATE_NONE = 0,
POKETCH_APP_STATE_INIT,
POKETCH_APP_STATE_UPDATE,
POKETCH_APP_STATE_SHUTDOWN
};
enum PoketchBorderColor {
POKETCH_BORDER_PINK = 0,
POKETCH_BORDER_BLUE
};
enum PoketchEventID {
POKETCH_EVENT_SLEEP = 0,
POKETCH_EVENT_PLAYER_MOVED,
POKETCH_EVENT_SAVE = 4,
POKETCH_EVENT_PEDOMETER,
};
typedef struct PoketchSystem PoketchSystem;
typedef BOOL (* UnkFuncPtr_ov25_02254238)(void **, PoketchSystem *, BGL *, u32);
typedef void (* UnkFuncPtr_ov25_02254238_1)(void *);
typedef void (* UnkFuncPtr_ov25_02254274)(void *);
typedef BOOL (* PoketchAppInitFunction)(void **app, PoketchSystem *poketchSys, BGL *bgl, u32 appID);
typedef void (* PoketchAppShutdownFunction)(void *app);
typedef void (* PoketchAppSaveFunction)(void *app);
struct PoketchSystem {
u8 unk_00;
u8 unk_01;
u8 unk_02;
u8 unk_03;
u8 unk_04;
u8 unk_05;
u8 systemState;
u8 subState; // each systemState has its own sub-state machine, they all share this variable
u8 appState;
u8 touchingScreen;
u8 playerMoving;
u8 appChanging;
u8 unk_06;
u8 pedometerUpdated;
u32 unk_08;
BOOL unk_0C;
u32 unk_10;
u32 buttonState;
BOOL skipApp;
u32 appSkipTimer;
enum PoketchAppID loadedAppID;
FSOverlayID loadedAppOverlayID;
UnkStruct_ov25_02254560 * unk_1C;
UnkStruct_ov25_02254560_1 unk_20;
void * unk_24;
PoketchButtonManager * unk_28;
PoketchButtonManager *buttonManager;
u32 unk_2C;
u32 unk_30;
PoketchSystem ** poketchSysPtr;
SysTask * unk_38;
UnkFuncPtr_ov25_02254238 unk_3C;
UnkFuncPtr_ov25_02254238_1 unk_40;
UnkFuncPtr_ov25_02254274 unk_44;
void * unk_48;
PoketchAppInitFunction currAppInit;
PoketchAppShutdownFunction currAppShutdown;
PoketchAppSaveFunction currAppSave;
void * appSaveData;
BGL *bgl;
NNSG2dOamManagerInstance * unk_50;
SaveData * saveData;
PoketchData * poketchData;
FieldSystem * fieldSystem;
NNSG2dOamManagerInstance * oamManager;
SaveData *saveData;
PoketchData *poketchData;
FieldSystem *fieldSystem;
enum ButtonDir buttonDir;
};
void PoketchSystem_Create(FieldSystem *fieldSystem, PoketchSystem **poketchSys, SaveData *saveData, BGL *bgl, NNSG2dOamManagerInstance *oamManager);
void ov25_02253D5C(PoketchSystem *poketchSys);
BOOL ov25_02253D70(PoketchSystem *poketchSys);
void ov25_02253D7C(PoketchSystem *poketchSys, int param1, u32 param2);
BOOL ov25_02253DD4(PoketchSystem *poketchSys);
void PoketchSystem_StartShutdown(PoketchSystem *poketchSys);
BOOL PoketchSystem_IsSystemShutdown(PoketchSystem *poketchSys);
void PoketchSystem_SendEvent(PoketchSystem *poketchSys, enum PoketchEventID eventID, u32);
BOOL PoketchSystem_IsTapped(PoketchSystem *poketchSys);
enum PoketchAppID PoketchSystem_CurrentAppID(PoketchSystem *poketchSys);
void ov25_02254238(UnkFuncPtr_ov25_02254238 param0, UnkFuncPtr_ov25_02254238_1 param1);
void ov25_0225424C(PoketchSystem *poketchSys);
void ov25_02254260(PoketchSystem *poketchSys);
void ov25_02254274(UnkFuncPtr_ov25_02254274 param0, void * param1);
void PoketchSystem_SetAppFunctions(PoketchAppInitFunction initFunction, PoketchAppShutdownFunction shutdownFunction);
void PoketchSystem_NotifyAppLoaded(PoketchSystem *poketchSys);
void PoketchSystem_NotifyAppUnloaded(PoketchSystem *poketchSys);
void PoketchSystem_SetSaveFunction(PoketchAppSaveFunction saveFunction, void *saveData);
UnkStruct_ov25_02254560 * ov25_02254418(void);
void ov25_02254424(u32 param0);
void PoketchSystem_PlaySoundEffect(u32 soundID);
void ov25_02254444(u32 param0, u32 param1);
BOOL ov25_0225446C(u32 * param0, u32 * param1);
BOOL ov25_022544BC(u32 * param0, u32 * param1);
BOOL PoketchSystem_GetDisplayHeldCoords(u32 *x, u32 *y);
BOOL PoketchSystem_GetDisplayTappedCoords(u32 *x, u32 *y);
BOOL ov25_0225450C(const PoketchSystem *poketchSys);
void ov25_02254518(const PoketchSystem *poketchSys, PoketchButtonManager * param1);
BOOL ov25_02254534(const PoketchSystem *poketchSys);
BOOL PoketchSystem_IsPlayerMoving(const PoketchSystem *poketchSys);
BOOL PoketchSystem_PedometerUpdated(const PoketchSystem *poketchSys);
FieldSystem * PoketchSystem_FieldSystem(const PoketchSystem *poketchSys);
PoketchData * PoketchSystem_PoketchData(const PoketchSystem *poketchSys);
SaveData * PoketchSystem_SaveData(const PoketchSystem *poketchSys);
int ov25_02254548(const PoketchSystem *poketchSys);
FieldSystem * PoketchSystem_GetFieldSystem(const PoketchSystem *poketchSys);
PoketchData * PoketchSystem_GetPoketchData(const PoketchSystem *poketchSys);
SaveData * PoketchSystem_GetSaveData(const PoketchSystem *poketchSys);
int PoketchSystem_GetBorderColor(const PoketchSystem *poketchSys);
#endif // POKEPLATINUM_OV25_02253CE0_H
#endif // POKEPLATINUM_POKETCH_SYSTEM_H

View File

@ -39,8 +39,8 @@ BOOL TouchScreen_Touched(void);
* @return TRUE if the touch screen is tapped, FALSE otherwise.
*/
BOOL TouchScreen_Tapped(void);
BOOL sub_020227A4(u32 * param0, u32 * param1);
BOOL sub_020227C0(u32 * param0, u32 * param1);
BOOL TouchScreen_GetHoldState(u32 *x, u32 *y);
BOOL TouchScreen_GetTapState(u32 *x, u32 *y);
int sub_020227DC(const TouchScreenHitTable *hitTable, u32 param1, u32 param2);
BOOL sub_02022830(const TouchScreenHitTable *hitTable, u32 param1, u32 param2);

View File

@ -315,10 +315,10 @@ void FieldSystem_Control (FieldSystem * fieldSystem)
{
BOOL v3 = 0;
PoketchSystem * v4 = sub_0203D158();
PoketchSystem * v4 = FieldSystem_GetPoketchSystem();
if (v4 != NULL) {
v3 = ov25_02253DD4(v4);
v3 = PoketchSystem_IsTapped(v4);
}
PlayerAvatar_MoveControl(fieldSystem->playerAvatar, fieldSystem->unk_28, -1, v1.pressedKeys, v1.heldKeys, v3);
@ -341,10 +341,10 @@ void FieldSystem_Control (FieldSystem * fieldSystem)
{
BOOL v5 = 0;
PoketchSystem * v6 = sub_0203D158();
PoketchSystem * v6 = FieldSystem_GetPoketchSystem();
if (v6 != NULL) {
v5 = ov25_02253DD4(v6);
v5 = PoketchSystem_IsTapped(v6);
}
PlayerAvatar_MoveControl(fieldSystem->playerAvatar, fieldSystem->unk_28, -1, v1.pressedKeys, v1.heldKeys, v5);
@ -367,7 +367,7 @@ void sub_0203D140 (void)
CommSys_EnableSendMovementData();
}
struct PoketchSystem * sub_0203D158 (void)
struct PoketchSystem * FieldSystem_GetPoketchSystem (void)
{
if (sFieldSystem->unk_04 == NULL) {
return NULL;

View File

@ -19,7 +19,7 @@ FS_EXTERN_OVERLAY(overlay25);
void ov5_021EA714 (FieldSystem * fieldSystem, int param1, u32 param2)
{
if ((fieldSystem->unk_04 != NULL) && (fieldSystem->unk_04->unk_14 != NULL)) {
ov25_02253D7C(fieldSystem->unk_04->unk_14, param1, param2);
PoketchSystem_SendEvent(fieldSystem->unk_04->unk_14, param1, param2);
}
}
@ -46,7 +46,7 @@ void ov5_021EA790 (FieldSystem * fieldSystem)
if (PoketchData_IsEnabled(v0)
&& (sub_0206AE2C(v1) == 0)) {
ov25_02253D5C(fieldSystem->unk_04->unk_14);
PoketchSystem_StartShutdown(fieldSystem->unk_04->unk_14);
} else {
ov24_02253DA4(fieldSystem->unk_08);
}
@ -59,7 +59,7 @@ u8 ov5_021EA7CC (FieldSystem * fieldSystem)
if (PoketchData_IsEnabled(v0)
&& (sub_0206AE2C(v1) == 0)) {
if (ov25_02253D70(fieldSystem->unk_04->unk_14)) {
if (PoketchSystem_IsSystemShutdown(fieldSystem->unk_04->unk_14)) {
fieldSystem->unk_04->unk_14 = NULL;
Overlay_UnloadByID(FS_OVERLAY_ID(overlay25));
return 1;

View File

@ -48,7 +48,7 @@ int ov19_021D60A8 (UnkStruct_ov19_021D6104 * param0)
v0 = 1;
v1 = (param0->unk_1C == 0);
if (sub_020227A4(&v2, &v3)) {
if (TouchScreen_GetHoldState(&v2, &v3)) {
param0->unk_14 = v2;
param0->unk_18 = v3;
}

View File

@ -87,7 +87,7 @@ static void ov25_02254F40(UnkStruct_ov25_02254DD8 * param0);
static void ov25_02254F68(SysTask * param0, void * param1);
static void ov25_02255004(SysTask * param0, void * param1);
static void ov25_02255064(SysTask * param0, void * param1);
struct PoketchSystem * sub_0203D158(void);
struct PoketchSystem * FieldSystem_GetPoketchSystem(void);
SysTask * CoreSys_ExecuteAfterVBlank(SysTaskFunc param0, void * param1, u32 param2);
BOOL ov25_02254560 (UnkStruct_ov25_02254560 ** param0, const UnkStruct_ov25_02254560_1 * param1, NNSG2dOamManagerInstance * param2, PoketchSystem * param3)
@ -166,7 +166,7 @@ static void ov25_02254684 (UnkStruct_ov25_02254560 * param0)
void ov25_022546B8 (u32 param0, u32 param1)
{
UnkStruct_ov25_02254560 * v0 = ov25_02254418();
PoketchData * v1 = PoketchSystem_PoketchData(v0->unk_1FC);
PoketchData * v1 = PoketchSystem_GetPoketchData(v0->unk_1FC);
u32 v2 = PoketchData_CurrentScreenColor(v1);
GXS_LoadBGPltt(&v0->unk_200[v2 * 32], param0 * 0x20, 0x20);
@ -176,7 +176,7 @@ void ov25_022546B8 (u32 param0, u32 param1)
void ov25_022546F0 (u32 param0, u32 param1)
{
UnkStruct_ov25_02254560 * v0 = ov25_02254418();
PoketchData * v1 = PoketchSystem_PoketchData(v0->unk_1FC);
PoketchData * v1 = PoketchSystem_GetPoketchData(v0->unk_1FC);
u32 v2 = PoketchData_CurrentScreenColor(v1);
GXS_LoadBGPltt(&v0->unk_200[v2 * 32 + 16], 0, 0x20);
@ -186,7 +186,7 @@ void ov25_022546F0 (u32 param0, u32 param1)
void ov25_02254728 (u16 * param0)
{
UnkStruct_ov25_02254560 * v0 = ov25_02254418();
PoketchData * v1 = PoketchSystem_PoketchData(v0->unk_1FC);
PoketchData * v1 = PoketchSystem_GetPoketchData(v0->unk_1FC);
u32 v2 = PoketchData_CurrentScreenColor(v1);
MI_CpuCopy16(&v0->unk_200[v2 * 32], param0, 0x20);
@ -324,7 +324,7 @@ static void ov25_02254820 (SysTask * param0, void * param1)
sub_02006E3C(12, 14, v2->unk_1F8, 4, 64, 0, 1, 7);
sub_02006E60(12, 15, v2->unk_1F8, 4, 0, 0, 1, 7);
sub_02006E9C(12, 13, 4, ov25_02254548(v2->unk_1FC) * 0x20, 15 * 0x20, 0x20, 7);
sub_02006E9C(12, 13, 4, PoketchSystem_GetBorderColor(v2->unk_1FC) * 0x20, 15 * 0x20, 0x20, 7);
sub_02019CB8(v2->unk_1F8, 5, 64 + 164, 0, 0, 32, 24, 15);
sub_02019448(v2->unk_1F8, 5);
@ -608,7 +608,7 @@ static void ov25_02254DE0 (UnkStruct_ov25_02254560 * param0, UnkStruct_ov25_0225
static void ov25_02254E84 (UnkStruct_ov25_02254560 * param0, u32 param1)
{
PoketchData * v1 = PoketchSystem_PoketchData(param0->unk_1FC);
PoketchData * v1 = PoketchSystem_GetPoketchData(param0->unk_1FC);
u32 v2 = PoketchData_CurrentScreenColor(v1);
ov25_02254728(param0->unk_400);

View File

@ -205,11 +205,11 @@ static u32 Button_OnPressed(PoketchButton *button, BOOL touched, BOOL tapped)
}
} else if (touched) {
PoketchButton_ChangeState(button, BUTTON_STATE_IDLE);
return BUTTON_MANAGER_STATE_OUT;
return BUTTON_MANAGER_STATE_DRAGGING;
} else {
// We don't reset the timer because we want to check for double tap with the same timer
if (button->doubleTapTime) {
PoketchButton_ChangeState_NoReset(button, BUTTON_STATE_CHECK_DOUBLETAP);
PoketchButton_ChangeState_NoReset(button, BUTTON_STATE_CHECK_DOUBLE_TAP);
} else {
PoketchButton_ChangeState(button, BUTTON_STATE_IDLE);
return BUTTON_MANAGER_STATE_TAP;
@ -230,8 +230,8 @@ static u32 Button_OnCheckDoubleTap(PoketchButton *button, BOOL touched, BOOL tap
}
if (button->screenTouched && tapped) {
PoketchButton_ChangeState(button, BUTTON_STATE_DOUBLETAP);
return BUTTON_MANAGER_STATE_DOUBLETAP;
PoketchButton_ChangeState(button, BUTTON_STATE_DOUBLE_TAP);
return BUTTON_MANAGER_STATE_DOUBLE_TAP;
}
return BUTTON_MANAGER_STATE_NULL;

View File

@ -21,10 +21,13 @@
#include "heap.h"
#include "unk_0201E3D8.h"
#include "unk_02025E08.h"
#include "field_system.h"
#include "trainer_info.h"
#include "unk_020508D4.h"
#include "unk_02099D44.h"
#include "overlay025/ov25_02254560.h"
#include "consts/sdat.h"
#include "gender.h"
FS_EXTERN_OVERLAY(overlay26);
FS_EXTERN_OVERLAY(overlay27);
@ -56,29 +59,28 @@ FS_EXTERN_OVERLAY(overlay53);
FS_EXTERN_OVERLAY(overlay54);
FS_EXTERN_OVERLAY(overlay55);
static PoketchSystem * ov25_02253CE0(void);
static PoketchSystem *PoketchSystem_GetFromFieldSystem(void);
static BOOL PoketchSystem_InitInternal(PoketchSystem *poketchSys);
static void ov25_02253E20(PoketchSystem *poketchSys);
static void PoketchSystem_MainTask(SysTask *param0, void * param1);
static void ov25_02253E94(SysTask *param0, void * param1);
static void ov25_02253E9C(PoketchSystem *poketchSys, u32 param1);
static void ov25_02253EA4(PoketchSystem *poketchSys);
static void ov25_02253F2C(PoketchSystem *poketchSys);
static void ov25_0225406C(PoketchSystem *poketchSys);
static void ov25_022540D8(PoketchSystem *poketchSys);
static void PoketchSystem_LoadApp(PoketchSystem *poketchSys, int param1);
static void PoketchSystem_Shutdown(PoketchSystem *poketchSys);
static void PoketchSystem_MainTask(SysTask *task, void *system);
static void PoketchSystem_PostRender(SysTask *, void *system);
static void PoketchSystem_SetState(PoketchSystem *poketchSys, u32 state);
static void PoketchEvent_InitApp(PoketchSystem *poketchSys);
static void PoketchEvent_UpdateApp(PoketchSystem *poketchSys);
static void PoketchEvent_OnAppChange(PoketchSystem *poketchSys);
static void PoketchEvent_OnShutdown(PoketchSystem *poketchSys);
static void PoketchSystem_LoadApp(PoketchSystem *poketchSys, int appID);
static void PoketchSystem_UnloadApp(PoketchSystem *poketchSys);
static void ov25_022541D8(PoketchSystem *poketchSys, u32 param1);
static BOOL ov25_022541FC(PoketchSystem *poketchSys);
static void ov25_0225420C(PoketchSystem *poketchSys);
static BOOL ov25_02254228(PoketchSystem *poketchSys);
static BOOL ov25_02254284(PoketchSystem *poketchSys);
static void ov25_022542C8(PoketchSystem *poketchSys);
static void ov25_022542D4(PoketchSystem *poketchSys);
static void ov25_022542E4(u32 param0, u32 param1, u32 param2, void * param3);
static void PoketchSystem_InitApp(PoketchSystem *poketchSys, u32 param1);
static BOOL PoketchSystem_IsAppInitialized(PoketchSystem *poketchSys);
static void PoketchSystem_ShutdownApp(PoketchSystem *poketchSys);
static BOOL PoketchSystem_IsAppShutdown(PoketchSystem *poketchSys);
static BOOL PoketchSystem_ButtonInit(PoketchSystem *poketchSys);
static void PoketchSystem_ButtonShutdown(PoketchSystem *poketchSys);
static void PoketchSystem_ButtonUpdate(PoketchSystem *poketchSys);
static void PoketchSystem_OnButtonEvent(u32 buttonID, u32 buttonEvent, u32 touchEvent, void *system);
static BOOL ov25_022543EC(UnkStruct_ov25_02254560 * param0, u32 param1);
static inline BOOL inline_ov25_0225446C(u32 param0, u32 param1);
struct PoketchSystem * sub_0203D158(void);
static inline BOOL PoketchSystem_InsideScreenBounds(u32 x, u32 y);
// the order of this array determines the app order in the poketch.
static const struct {
@ -112,9 +114,9 @@ static const struct {
{POKETCH_APPID_POKEMONHISTORY, FS_OVERLAY_ID(overlay54)}
};
static PoketchSystem * ov25_02253CE0 (void)
static PoketchSystem* PoketchSystem_GetFromFieldSystem(void)
{
return sub_0203D158();
return FieldSystem_GetPoketchSystem();
}
@ -132,44 +134,44 @@ void PoketchSystem_Create(FieldSystem *fieldSystem, PoketchSystem **poketchSys,
new_system->saveData = saveData;
new_system->poketchData = SaveData_PoketchData(saveData);
new_system->bgl = bgl;
new_system->unk_50 = oamManager;
new_system->oamManager = oamManager;
if (PoketchSystem_InitInternal(new_system)) {
sub_0201E3D8();
sub_0201E450(4);
new_system->poketchSysPtr = poketchSys;
new_system->unk_38 = SysTask_Start(ov25_02253E94, new_system, 4);
new_system->unk_38 = SysTask_Start(PoketchSystem_PostRender, new_system, 4);
SysTask_Start(PoketchSystem_MainTask, new_system, 0);
}
}
}
void ov25_02253D5C (PoketchSystem *poketchSys)
void PoketchSystem_StartShutdown (PoketchSystem *poketchSys)
{
if ((poketchSys->unk_00 != 3) && (poketchSys->unk_00 != 4)) {
ov25_02253E9C(poketchSys, 3);
if (poketchSys->systemState != POKETCH_SYSTEM_SHUTDOWN && poketchSys->systemState != POKETCH_SYSTEM_UNLOAD) {
PoketchSystem_SetState(poketchSys, POKETCH_SYSTEM_SHUTDOWN);
}
}
BOOL ov25_02253D70 (PoketchSystem *poketchSys)
BOOL PoketchSystem_IsSystemShutdown(PoketchSystem *poketchSys)
{
return poketchSys == NULL;
}
void ov25_02253D7C (PoketchSystem *poketchSys, int param1, u32 param2)
void PoketchSystem_SendEvent(PoketchSystem *poketchSys, enum PoketchEventID eventID, u32)
{
switch (param1) {
case 0:
switch (eventID) {
case POKETCH_EVENT_SLEEP:
break;
case 1:
poketchSys->unk_04 = 1;
case POKETCH_EVENT_PLAYER_MOVED:
poketchSys->playerMoving = TRUE;
break;
case 5:{
case POKETCH_EVENT_PEDOMETER:{
u32 step_count = PoketchData_StepCount(poketchSys->poketchData);
if (++step_count > 99999) {
if (++step_count > POKETCH_PEDOMETER_MAX) {
step_count = 0;
}
@ -177,19 +179,17 @@ void ov25_02253D7C (PoketchSystem *poketchSys, int param1, u32 param2)
poketchSys->pedometerUpdated = TRUE;
}
break;
case 4:
if (poketchSys->unk_02 == 2) {
if (poketchSys->unk_44) {
poketchSys->unk_44(poketchSys->unk_48);
}
case POKETCH_EVENT_SAVE:
if (poketchSys->appState == POKETCH_APP_STATE_UPDATE && poketchSys->currAppSave) {
poketchSys->currAppSave(poketchSys->appSaveData);
}
break;
}
}
BOOL ov25_02253DD4 (PoketchSystem *poketchSys)
BOOL PoketchSystem_IsTapped(PoketchSystem *poketchSys)
{
return poketchSys->unk_03;
return poketchSys->touchingScreen;
}
enum PoketchAppID PoketchSystem_CurrentAppID(PoketchSystem *poketchSys)
@ -199,20 +199,20 @@ enum PoketchAppID PoketchSystem_CurrentAppID(PoketchSystem *poketchSys)
static BOOL PoketchSystem_InitInternal(PoketchSystem *poketchSys)
{
if (ov25_02254560(&(poketchSys->unk_1C), &(poketchSys->unk_20), poketchSys->unk_50, poketchSys)) {
poketchSys->unk_00 = 0;
poketchSys->unk_01 = 0;
poketchSys->unk_03 = 0;
poketchSys->unk_04 = 0;
if (ov25_02254560(&(poketchSys->unk_1C), &(poketchSys->unk_20), poketchSys->oamManager, poketchSys)) {
poketchSys->systemState = POKETCH_SYSTEM_INIT;
poketchSys->subState = 0;
poketchSys->touchingScreen = FALSE;
poketchSys->playerMoving = 0;
poketchSys->pedometerUpdated = FALSE;
poketchSys->unk_05 = 0;
poketchSys->appChanging = FALSE;
poketchSys->unk_06 = 0;
poketchSys->loadedAppID = POKETCH_APPID_NONE;
poketchSys->unk_02 = 0;
poketchSys->unk_08 = 0;
poketchSys->appState = POKETCH_APP_STATE_NONE;
poketchSys->buttonState = BUTTON_MANAGER_STATE_NULL;
poketchSys->buttonDir = BUTTON_UP;
if (ov25_02254284(poketchSys)) {
if (PoketchSystem_ButtonInit(poketchSys)) {
return TRUE;
}
}
@ -220,111 +220,111 @@ static BOOL PoketchSystem_InitInternal(PoketchSystem *poketchSys)
return FALSE;
}
static void ov25_02253E20 (PoketchSystem * poketchSys)
static void PoketchSystem_Shutdown(PoketchSystem *poketchSys)
{
SysTask_Done(poketchSys->unk_38);
ov25_022542C8(poketchSys);
PoketchSystem_ButtonShutdown(poketchSys);
PoketchSystem_UnloadApp(poketchSys);
ov25_02254754(poketchSys->unk_1C);
}
typedef void (*const PoketchEvent)(PoketchSystem *poketchSys);
static PoketchEvent sPoketchEvents[] = {
PoketchEvent_InitApp,
PoketchEvent_UpdateApp,
PoketchEvent_OnAppChange,
PoketchEvent_OnShutdown
};
static void PoketchSystem_MainTask(SysTask *task, void *system)
{
typedef void(*const PoketchEvent)(PoketchSystem *);
static PoketchEvent sPoketchEvents[] = {
ov25_02253EA4,
ov25_02253F2C,
ov25_0225406C,
ov25_022540D8
};
PoketchSystem *poketchSys = (PoketchSystem *)system;
if (poketchSys->unk_00 < NELEMS(sPoketchEvents)) {
if (poketchSys->unk_00 != 0) {
ov25_022542D4(poketchSys);
if (poketchSys->systemState < NELEMS(sPoketchEvents)) {
if (poketchSys->systemState != POKETCH_SYSTEM_INIT) {
PoketchSystem_ButtonUpdate(poketchSys);
}
sPoketchEvents[poketchSys->unk_00](poketchSys);
sPoketchEvents[poketchSys->systemState](poketchSys);
} else {
GF_ASSERT(poketchSys->unk_00 == 4);
GF_ASSERT(poketchSys->systemState == POKETCH_SYSTEM_UNLOAD);
*(poketchSys->poketchSysPtr) = NULL;
ov25_02253E20(poketchSys);
PoketchSystem_Shutdown(poketchSys);
Heap_FreeToHeap(poketchSys);
SysTask_Done(task);
Heap_Destroy(7);
Heap_Destroy(8);
Heap_Destroy(HEAP_ID_POKETCH_MAIN);
Heap_Destroy(HEAP_ID_POKETCH_APP);
}
}
static void ov25_02253E94 (SysTask * param0, void * param1)
static void PoketchSystem_PostRender(SysTask *, void *system)
{
PoketchSystem * v0 = param1;
PoketchSystem *poketchSys = system;
v0->unk_04 = 0;
v0->pedometerUpdated = FALSE;
poketchSys->playerMoving = FALSE;
poketchSys->pedometerUpdated = FALSE;
}
static void ov25_02253E9C (PoketchSystem *poketchSys, u32 param1)
static void PoketchSystem_SetState(PoketchSystem *poketchSys, u32 state)
{
poketchSys->unk_00 = param1;
poketchSys->unk_01 = 0;
poketchSys->systemState = state;
poketchSys->subState = 0;
}
static void ov25_02253EA4 (PoketchSystem *poketchSys)
static void PoketchEvent_InitApp(PoketchSystem *poketchSys)
{
switch (poketchSys->unk_01) {
switch (poketchSys->subState) {
case 0:
ov25_022547D0(poketchSys->unk_1C, 0);
poketchSys->unk_01++;
poketchSys->subState++;
break;
case 1:
if (ov25_022547F4(poketchSys->unk_1C, 0)) {
u32 app_ID = PoketchData_CurrentAppID(poketchSys->poketchData);
PoketchSystem_LoadApp(poketchSys, app_ID);
ov25_022541D8(poketchSys, app_ID);
PoketchSystem_InitApp(poketchSys, app_ID);
poketchSys->unk_01++;
poketchSys->subState++;
}
break;
case 2:
if (ov25_022541FC(poketchSys) == 0) {
if (PoketchSystem_IsAppInitialized(poketchSys) == FALSE) {
break;
}
ov25_022547D0(poketchSys->unk_1C, 1);
poketchSys->unk_01++;
poketchSys->subState++;
case 3:
if (ov25_022547F4(poketchSys->unk_1C, 1)) {
ov25_02253E9C(poketchSys, 1);
PoketchSystem_SetState(poketchSys, POKETCH_SYSTEM_UPDATE);
}
}
}
static void ov25_02253F2C (PoketchSystem *poketchSys)
static void PoketchEvent_UpdateApp(PoketchSystem *poketchSys)
{
switch (poketchSys->unk_01) {
switch (poketchSys->subState) {
case 0:
if (ov25_0225450C(poketchSys)) {
return;
}
switch (poketchSys->unk_08) {
case 3:
case 5:
poketchSys->unk_0C = 0;
poketchSys->unk_05 = 1;
switch (poketchSys->buttonState) {
case BUTTON_MANAGER_STATE_TAP:
case BUTTON_MANAGER_STATE_TIMER0:
poketchSys->skipApp = FALSE;
poketchSys->appChanging = TRUE;
ov25_022547D0(poketchSys->unk_1C, 4);
poketchSys->unk_01++;
poketchSys->subState++;
break;
}
break;
case 1:
if ((poketchSys->unk_08 == 3) || (poketchSys->unk_08 == 5)) {
poketchSys->unk_0C = 1;
if (poketchSys->buttonState == BUTTON_MANAGER_STATE_TAP || poketchSys->buttonState == BUTTON_MANAGER_STATE_TIMER0) {
poketchSys->skipApp = TRUE;
}
if (ov25_02254800(poketchSys->unk_1C)) {
@ -334,67 +334,67 @@ static void ov25_02253F2C (PoketchSystem *poketchSys)
poketchSys->unk_20.unk_00 = PoketchData_IncrementAppID(poketchSys->poketchData);
}
if (poketchSys->unk_0C) {
if (poketchSys->skipApp) {
ov25_022547D0(poketchSys->unk_1C, 12);
poketchSys->unk_10 = 30;
poketchSys->unk_0C = 0;
poketchSys->unk_01 = 4;
poketchSys->appSkipTimer = 30;
poketchSys->skipApp = FALSE;
poketchSys->subState = 4;
} else {
poketchSys->unk_10 = 3;
poketchSys->unk_01 = 2;
poketchSys->appSkipTimer = 3;
poketchSys->subState = 2;
}
}
break;
case 2:
if ((poketchSys->unk_08 == 3) || (poketchSys->unk_08 == 5)) {
if (poketchSys->buttonState == BUTTON_MANAGER_STATE_TAP || poketchSys->buttonState == BUTTON_MANAGER_STATE_TIMER0) {
ov25_022547D0(poketchSys->unk_1C, 12);
poketchSys->unk_10 = 30;
poketchSys->unk_0C = 0;
poketchSys->unk_01 = 4;
poketchSys->appSkipTimer = 30;
poketchSys->skipApp = FALSE;
poketchSys->subState = 4;
break;
}
if (poketchSys->unk_10) {
poketchSys->unk_10--;
if (poketchSys->appSkipTimer) {
poketchSys->appSkipTimer--;
} else {
ov25_0225420C(poketchSys);
poketchSys->unk_01 = 3;
PoketchSystem_ShutdownApp(poketchSys);
poketchSys->subState = 3;
}
break;
case 3:
if (ov25_02254228(poketchSys)) {
if (PoketchSystem_IsAppShutdown(poketchSys)) {
PoketchSystem_UnloadApp(poketchSys);
sub_02099D44();
ov25_02253E9C(poketchSys, 2);
PoketchSystem_SetState(poketchSys, POKETCH_SYSTEM_CHANGE_APP);
}
break;
case 4:
if ((poketchSys->unk_08 == 3) || (poketchSys->unk_08 == 5)) {
if (poketchSys->buttonState == BUTTON_MANAGER_STATE_TAP || poketchSys->buttonState == BUTTON_MANAGER_STATE_TIMER0) {
if (poketchSys->buttonDir == BUTTON_UP) {
poketchSys->unk_20.unk_00 = PoketchData_DecrementAppID(poketchSys->poketchData);
} else {
poketchSys->unk_20.unk_00 = PoketchData_IncrementAppID(poketchSys->poketchData);
}
poketchSys->unk_10 = 30;
poketchSys->appSkipTimer = 30;
ov25_022547D0(poketchSys->unk_1C, 13);
break;
}
if (poketchSys->unk_10) {
poketchSys->unk_10--;
if (poketchSys->appSkipTimer) {
poketchSys->appSkipTimer--;
} else {
ov25_022547D0(poketchSys->unk_1C, 14);
ov25_0225420C(poketchSys);
poketchSys->unk_01 = 3;
PoketchSystem_ShutdownApp(poketchSys);
poketchSys->subState = 3;
}
break;
}
}
static void ov25_0225406C (PoketchSystem *poketchSys)
static void PoketchEvent_OnAppChange(PoketchSystem *poketchSys)
{
switch (poketchSys->unk_01) {
switch (poketchSys->subState) {
case 0:
{
u32 v0;
@ -403,62 +403,62 @@ static void ov25_0225406C (PoketchSystem *poketchSys)
v0 = PoketchData_CurrentAppID(poketchSys->poketchData);
PoketchSystem_LoadApp(poketchSys, v0);
ov25_022541D8(poketchSys, v0);
PoketchSystem_InitApp(poketchSys, v0);
poketchSys->unk_01++;
poketchSys->subState++;
}
break;
case 1:
if (ov25_022541FC(poketchSys)) {
if (PoketchSystem_IsAppInitialized(poketchSys)) {
ov25_022547D0(poketchSys->unk_1C, 2);
poketchSys->unk_01++;
poketchSys->subState++;
}
break;
case 2:
if (ov25_022547F4(poketchSys->unk_1C, 2)) {
poketchSys->unk_05 = 0;
poketchSys->appChanging = FALSE;
poketchSys->unk_06 = 0;
ov25_02253E9C(poketchSys, 1);
PoketchSystem_SetState(poketchSys, POKETCH_SYSTEM_UPDATE);
}
break;
}
}
static void ov25_022540D8 (PoketchSystem *poketchSys)
static void PoketchEvent_OnShutdown(PoketchSystem *poketchSys)
{
switch (poketchSys->unk_01) {
switch (poketchSys->subState) {
case 0:
switch (poketchSys->unk_02) {
switch (poketchSys->appState) {
case 1:
poketchSys->unk_01 = 1;
poketchSys->subState = 1;
break;
case 2:
ov25_0225420C(poketchSys);
poketchSys->unk_01 = 2;
PoketchSystem_ShutdownApp(poketchSys);
poketchSys->subState = 2;
break;
case 3:
case 0:
poketchSys->unk_01 = 2;
poketchSys->subState = 2;
break;
}
break;
case 1:
if (ov25_022541FC(poketchSys)) {
ov25_0225420C(poketchSys);
poketchSys->unk_01 = 2;
if (PoketchSystem_IsAppInitialized(poketchSys)) {
PoketchSystem_ShutdownApp(poketchSys);
poketchSys->subState = 2;
}
break;
case 2:
if (ov25_02254228(poketchSys)) {
if (PoketchSystem_IsAppShutdown(poketchSys)) {
ov25_022547D0(poketchSys->unk_1C, 17);
poketchSys->unk_01 = 3;
poketchSys->subState = 3;
}
break;
case 3:
if (ov25_02254800(poketchSys->unk_1C)) {
PoketchSystem_UnloadApp(poketchSys);
sub_0201E530();
ov25_02253E9C(poketchSys, 4);
PoketchSystem_SetState(poketchSys, POKETCH_SYSTEM_UNLOAD);
}
break;
}
@ -489,248 +489,235 @@ static void PoketchSystem_UnloadApp(PoketchSystem *poketchSys)
}
}
static void ov25_022541D8 (PoketchSystem *poketchSys, u32 param1)
static void PoketchSystem_InitApp(PoketchSystem *poketchSys, u32)
{
GF_ASSERT(poketchSys->unk_02 == 0);
GF_ASSERT(poketchSys->appState == POKETCH_APP_STATE_NONE);
poketchSys->unk_3C(&(poketchSys->unk_24), poketchSys, poketchSys->bgl, poketchSys->loadedAppID);
poketchSys->unk_02 = 1;
poketchSys->currAppInit(&(poketchSys->unk_24), poketchSys, poketchSys->bgl, poketchSys->loadedAppID);
poketchSys->appState = POKETCH_APP_STATE_INIT;
}
static BOOL ov25_022541FC (PoketchSystem *poketchSys)
static BOOL PoketchSystem_IsAppInitialized(PoketchSystem *poketchSys)
{
if (poketchSys->unk_02 == 2) {
return 1;
}
return 0;
return poketchSys->appState == POKETCH_APP_STATE_UPDATE;
}
static void ov25_0225420C (PoketchSystem *poketchSys)
static void PoketchSystem_ShutdownApp(PoketchSystem *poketchSys)
{
GF_ASSERT(poketchSys->unk_02 == 2);
GF_ASSERT(poketchSys->appState == POKETCH_APP_STATE_UPDATE);
poketchSys->unk_40(poketchSys->unk_24);
poketchSys->unk_02 = 3;
poketchSys->currAppShutdown(poketchSys->unk_24);
poketchSys->appState = POKETCH_APP_STATE_SHUTDOWN;
}
static BOOL ov25_02254228 (PoketchSystem *poketchSys)
static BOOL PoketchSystem_IsAppShutdown(PoketchSystem *poketchSys)
{
if (poketchSys->unk_02 == 0) {
return poketchSys->appState == POKETCH_APP_STATE_NONE;
}
void PoketchSystem_SetAppFunctions(PoketchAppInitFunction appInit, PoketchAppShutdownFunction appShutdown)
{
PoketchSystem *poketchSys = PoketchSystem_GetFromFieldSystem();
poketchSys->currAppInit = appInit;
poketchSys->currAppShutdown = appShutdown;
poketchSys->currAppSave = NULL;
}
void PoketchSystem_NotifyAppLoaded(PoketchSystem *poketchSys)
{
GF_ASSERT(poketchSys->appState == POKETCH_APP_STATE_INIT);
poketchSys->appState = POKETCH_APP_STATE_UPDATE;
}
void PoketchSystem_NotifyAppUnloaded(PoketchSystem *poketchSys)
{
GF_ASSERT(poketchSys->appState == POKETCH_APP_STATE_SHUTDOWN);
poketchSys->appState = POKETCH_APP_STATE_NONE;
}
void PoketchSystem_SetSaveFunction(PoketchAppSaveFunction saveFunction, void *saveData)
{
PoketchSystem *poketchSys = PoketchSystem_GetFromFieldSystem();
poketchSys->currAppSave = saveFunction;
poketchSys->appSaveData = saveData;
}
static const TouchScreenHitTable sMainPoketchButtons[] = {
[POKETCH_SYSTEM_MAIN_BUTTON_UP] = {POKETCH_BUTTON_TOP_MIN_Y, POKETCH_BUTTON_TOP_MAX_Y, POKETCH_BUTTON_TOP_MIN_X, POKETCH_BUTTON_TOP_MAX_X}, // Top button
[POKETCH_SYSTEM_MAIN_BUTTON_DOWN] = {POKETCH_BUTTON_BOTTOM_MIN_Y, POKETCH_BUTTON_BOTTOM_MAX_Y, POKETCH_BUTTON_BOTTOM_MIN_X, POKETCH_BUTTON_BOTTOM_MAX_X}, // Bottom Button
[POKETCH_SYSTEM_MAIN_BUTTON_SCREEN] = {POKETCH_SCREEN_MIN_Y, POKETCH_SCREEN_MAX_Y, POKETCH_SCREEN_MIN_X, POKETCH_SCREEN_MAX_X} // Screen
};
static BOOL PoketchSystem_ButtonInit(PoketchSystem *poketchSys)
{
poketchSys->buttonManager = PoketchButtonManager_New(sMainPoketchButtons, NELEMS(sMainPoketchButtons), PoketchSystem_OnButtonEvent, poketchSys, HEAP_ID_POKETCH_MAIN);
if (poketchSys->buttonManager != NULL) {
PoketchButtonManager_SetButtonTimer(poketchSys->buttonManager, POKETCH_SYSTEM_MAIN_BUTTON_UP, 0, 7);
poketchSys->unk_2C = 0xffffffff;
poketchSys->unk_30 = 0xffffffff;
return TRUE;
}
return FALSE;
}
void ov25_02254238 (UnkFuncPtr_ov25_02254238 param0, UnkFuncPtr_ov25_02254238_1 param1)
static void PoketchSystem_ButtonShutdown(PoketchSystem *poketchSys)
{
PoketchSystem * v0 = ov25_02253CE0();
v0->unk_3C = param0;
v0->unk_40 = param1;
v0->unk_44 = NULL;
PoketchButtonManager_Free(poketchSys->buttonManager);
}
void ov25_0225424C (PoketchSystem *poketchSys)
static void PoketchSystem_ButtonUpdate(PoketchSystem *poketchSys)
{
GF_ASSERT(poketchSys->unk_02 == 1);
poketchSys->unk_02 = 2;
poketchSys->buttonState = 0;
PoketchButtonManager_Update(poketchSys->buttonManager);
}
void ov25_02254260 (PoketchSystem *poketchSys)
static void PoketchSystem_OnButtonEvent(u32 buttonID, u32 buttonEvent, u32 touchEvent, void *system)
{
GF_ASSERT(poketchSys->unk_02 == 3);
poketchSys->unk_02 = 0;
}
PoketchSystem *poketchSys = (PoketchSystem *)system;
void ov25_02254274 (UnkFuncPtr_ov25_02254274 param0, void * param1)
{
PoketchSystem * v0 = ov25_02253CE0();
v0->unk_44 = param0;
v0->unk_48 = param1;
}
static BOOL ov25_02254284 (PoketchSystem *poketchSys)
{
static const TouchScreenHitTable v0[] = {
{4 * 8, 12 * 8, 28 * 8, 255},
{12 * 8, 20 * 8, 28 * 8, 255},
{16, 175, 16, 207}
};
poketchSys->unk_28 = PoketchButtonManager_New(v0, NELEMS(v0), ov25_022542E4, poketchSys, 7);
if (poketchSys->unk_28 != NULL) {
PoketchButtonManager_SetButtonTimer(poketchSys->unk_28, 0, 0, 7);
poketchSys->unk_2C = 0xffffffff;
poketchSys->unk_30 = 0xffffffff;
return 1;
}
return 0;
}
static void ov25_022542C8 (PoketchSystem *poketchSys)
{
PoketchButtonManager_Free(poketchSys->unk_28);
}
static void ov25_022542D4 (PoketchSystem *poketchSys)
{
poketchSys->unk_08 = 0;
PoketchButtonManager_Update(poketchSys->unk_28);
}
static void ov25_022542E4 (u32 param0, u32 param1, u32 param2, void * param3)
{
PoketchSystem * v0 = (PoketchSystem *)param3;
if (ov25_0225450C(v0) == 0) {
switch (param2) {
case 1:
v0->unk_03 = 1;
if (ov25_0225450C(poketchSys) == FALSE) {
switch (touchEvent) {
case BUTTON_TOUCH_RELEASED:
poketchSys->touchingScreen = TRUE;
break;
case 0:
v0->unk_03 = 0;
case BUTTON_TOUCH_PRESSED:
poketchSys->touchingScreen = FALSE;
break;
}
} else {
v0->unk_03 = 0;
poketchSys->touchingScreen = FALSE;
}
if (param0 == 2) {
if (ov25_0225450C(v0)) {
if (param2 == 1) {
Sound_PlayEffect(1646);
}
if (buttonID == POKETCH_SYSTEM_MAIN_BUTTON_SCREEN) {
if (ov25_0225450C(poketchSys) && touchEvent == BUTTON_TOUCH_RELEASED) {
Sound_PlayEffect(SEQ_SE_DP_BEEP);
}
} else {
u32 v1 = 0xffffffff;
switch (param2) {
case 0:
v1 = (param0 == 0) ? 8 : 11;
switch (touchEvent) {
case BUTTON_TOUCH_PRESSED:
v1 = (buttonID == POKETCH_SYSTEM_MAIN_BUTTON_UP) ? 8 : 11;
break;
case 1:
if (ov25_0225450C(v0) || v0->unk_06) {
v1 = (param0 == 0) ? 6 : 9;
param1 = 0;
case BUTTON_TOUCH_RELEASED:
if (ov25_0225450C(poketchSys) || poketchSys->unk_06) {
v1 = (buttonID == POKETCH_SYSTEM_MAIN_BUTTON_UP) ? 6 : 9;
buttonEvent = 0;
} else {
v1 = (param0 == 0) ? 7 : 10;
v1 = (buttonID == POKETCH_SYSTEM_MAIN_BUTTON_UP) ? 7 : 10;
}
break;
}
if (v0->unk_2C != 0xffffffff) {
if (poketchSys->unk_2C != 0xffffffff) {
u32 v2 = v1;
v1 = v0->unk_2C;
v0->unk_2C = v2;
v1 = poketchSys->unk_2C;
poketchSys->unk_2C = v2;
}
if (v1 != 0xffffffff) {
if (ov25_022543EC(v0->unk_1C, v1)) {
if (ov25_022543EC(poketchSys->unk_1C, v1)) {
if ((v1 == 6) || (v1 == 7) || (v1 == 9) || (v1 == 10)) {
v0->unk_30 = v1;
poketchSys->unk_30 = v1;
}
}
}
switch (param1) {
case 5:
PoketchButtonManager_ResetButtonState(v0->unk_28, 0);
switch (buttonEvent) {
case BUTTON_MANAGER_STATE_TIMER0:
PoketchButtonManager_ResetButtonState(poketchSys->buttonManager, 0);
break;
case 3:
if ((v0->unk_30 == 6) || (v0->unk_30 == 9)) {
param1 = 0;
case BUTTON_MANAGER_STATE_TAP:
if (poketchSys->unk_30 == 6 || poketchSys->unk_30 == 9) {
buttonEvent = BUTTON_MANAGER_STATE_NULL;
}
break;
case 2:
if ((v0->unk_30 == 7) || (v0->unk_30 == 10)) {
param1 = 3;
case BUTTON_MANAGER_STATE_DRAGGING:
if (poketchSys->unk_30 == 7 || poketchSys->unk_30 == 10) {
buttonEvent = BUTTON_MANAGER_STATE_TAP;
}
break;
}
v0->unk_08 = param1;
v0->buttonDir = (param0 == 0) ? BUTTON_UP : BUTTON_DOWN;
poketchSys->buttonState = buttonEvent;
poketchSys->buttonDir = (buttonID == POKETCH_SYSTEM_MAIN_BUTTON_UP) ? BUTTON_UP : BUTTON_DOWN;
}
}
static BOOL ov25_022543EC (UnkStruct_ov25_02254560 * param0, u32 param1)
{
u32 v0;
for (v0 = 0; v0 < 6; v0++) {
if (ov25_022547F4(param0, param1) == 0) {
return 0;
for (u32 i = 0; i < 6; i++) {
if (ov25_022547F4(param0, param1) == FALSE) {
return FALSE;
}
}
ov25_022547D0(param0, param1);
return 1;
return TRUE;
}
UnkStruct_ov25_02254560 * ov25_02254418 (void)
{
PoketchSystem * v0 = ov25_02253CE0();
return v0->unk_1C;
PoketchSystem *poketchSys = PoketchSystem_GetFromFieldSystem();
return poketchSys->unk_1C;
}
void ov25_02254424 (u32 param0)
void PoketchSystem_PlaySoundEffect(u32 soundID)
{
PoketchSystem * v0 = ov25_02253CE0();
PoketchSystem *poketchSys = PoketchSystem_GetFromFieldSystem();
if ((v0->unk_05 == 0) && (ov25_0225450C(v0) == 0)) {
Sound_PlayEffect(param0);
if ((poketchSys->appChanging == FALSE) && (ov25_0225450C(poketchSys) == FALSE)) {
Sound_PlayEffect(soundID);
}
}
void ov25_02254444 (u32 param0, u32 param1)
{
PoketchSystem * v0 = ov25_02253CE0();
PoketchSystem *poketchSys = PoketchSystem_GetFromFieldSystem();
if ((v0->unk_05 == 0) && (ov25_0225450C(v0) == 0)) {
if (poketchSys->appChanging == FALSE && ov25_0225450C(poketchSys) == 0) {
sub_02005844(param0, param1);
}
}
static inline BOOL inline_ov25_0225446C (u32 param0, u32 param1)
static inline BOOL PoketchSystem_InsideScreenBounds(u32 x, u32 y)
{
if (((u32)(param0 - 16) < (u32)(207 - 16)) & ((u32)(param1 - 16) < (u32)(175 - 16))) {
return 1;
if ((u32)(x - POKETCH_SCREEN_MIN_X) < (u32)(POKETCH_SCREEN_MAX_X - POKETCH_SCREEN_MIN_X) & (u32)(y - POKETCH_SCREEN_MIN_Y) < (u32)(POKETCH_SCREEN_MAX_Y - POKETCH_SCREEN_MIN_Y)) {
return TRUE;
}
return 0;
return FALSE;
}
BOOL ov25_0225446C (u32 * param0, u32 * param1)
BOOL PoketchSystem_GetDisplayHeldCoords(u32 *x, u32 *y)
{
PoketchSystem * v0 = ov25_02253CE0();
PoketchSystem *poketchSys = PoketchSystem_GetFromFieldSystem();
if ((v0->unk_05 == 0) && (ov25_0225450C(v0) == 0)) {
if (sub_020227A4(param0, param1)) {
return inline_ov25_0225446C(*param0, *param1);
}
if (!poketchSys->appChanging
&& !ov25_0225450C(poketchSys)
&& TouchScreen_GetHoldState(x, y)) {
return PoketchSystem_InsideScreenBounds(*x, *y);
}
return 0;
return FALSE;
}
BOOL ov25_022544BC (u32 * param0, u32 * param1)
BOOL PoketchSystem_GetDisplayTappedCoords(u32 *x, u32 *y)
{
PoketchSystem * v0 = ov25_02253CE0();
PoketchSystem *poketchSys = PoketchSystem_GetFromFieldSystem();
if ((v0->unk_05 == 0) && (ov25_0225450C(v0) == 0)) {
if (sub_020227C0(param0, param1)) {
return inline_ov25_0225446C(*param0, *param1);
}
if (!poketchSys->appChanging
&& !ov25_0225450C(poketchSys)
&& TouchScreen_GetTapState(x, y)) {
return PoketchSystem_InsideScreenBounds(*x, *y);
}
return 0;
return FALSE;
}
BOOL ov25_0225450C (const PoketchSystem *poketchSys)
@ -738,16 +725,16 @@ BOOL ov25_0225450C (const PoketchSystem *poketchSys)
return sub_020509A4(poketchSys->fieldSystem);
}
void ov25_02254518 (const PoketchSystem *poketchSys, PoketchButtonManager * param1)
void ov25_02254518 (const PoketchSystem *poketchSys, PoketchButtonManager *buttonManager)
{
if ((ov25_0225450C(poketchSys) == 0) && (poketchSys->unk_05 == 0)) {
PoketchButtonManager_Update(param1);
if (ov25_0225450C(poketchSys) == 0 && poketchSys->appChanging == FALSE) {
PoketchButtonManager_Update(buttonManager);
}
}
BOOL ov25_02254534 (const PoketchSystem *poketchSys)
BOOL PoketchSystem_IsPlayerMoving(const PoketchSystem *poketchSys)
{
return poketchSys->unk_04;
return poketchSys->playerMoving;
}
BOOL PoketchSystem_PedometerUpdated(const PoketchSystem *poketchSys)
@ -755,28 +742,28 @@ BOOL PoketchSystem_PedometerUpdated(const PoketchSystem *poketchSys)
return poketchSys->pedometerUpdated;
}
FieldSystem* PoketchSystem_FieldSystem(const PoketchSystem *poketchSys)
FieldSystem* PoketchSystem_GetFieldSystem(const PoketchSystem *poketchSys)
{
return poketchSys->fieldSystem;
}
PoketchData* PoketchSystem_PoketchData(const PoketchSystem *poketchSys)
PoketchData* PoketchSystem_GetPoketchData(const PoketchSystem *poketchSys)
{
return poketchSys->poketchData;
}
SaveData* PoketchSystem_SaveData(const PoketchSystem *poketchSys)
SaveData* PoketchSystem_GetSaveData(const PoketchSystem *poketchSys)
{
return poketchSys->saveData;
}
int ov25_02254548 (const PoketchSystem *poketchSys)
int PoketchSystem_GetBorderColor(const PoketchSystem *poketchSys)
{
TrainerInfo * v0 = SaveData_GetTrainerInfo(poketchSys->saveData);
TrainerInfo *trainerInfo = SaveData_GetTrainerInfo(poketchSys->saveData);
if (TrainerInfo_Gender(v0) == 1) {
return 0;
if (TrainerInfo_Gender(trainerInfo) == GENDER_FEMALE) {
return POKETCH_BORDER_PINK;
} else {
return 1;
return POKETCH_BORDER_BLUE;
}
}

View File

@ -52,7 +52,7 @@ static const TouchScreenHitTable Unk_ov26_02256718[] = {
static void NitroStaticInit (void)
{
ov25_02254238(ov26_022561D4, ov26_022562F8);
PoketchSystem_SetAppFunctions(ov26_022561D4, ov26_022562F8);
}
static BOOL ov26_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -130,7 +130,7 @@ static void ov26_022562BC (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov26_022562A4(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_28);
PoketchSystem_NotifyAppUnloaded(v1->unk_28);
}
} else {
}
@ -177,7 +177,7 @@ static BOOL ov26_02256330 (UnkStruct_ov26_0225621C * param0)
break;
case 1:
if (ov26_022564CC(param0->unk_24, 0)) {
ov25_0225424C(param0->unk_28);
PoketchSystem_NotifyAppLoaded(param0->unk_28);
ov26_0225631C(param0, 1);
}
break;

View File

@ -68,7 +68,7 @@ static void ov27_022566D8(UnkStruct_ov27_0225621C * param0, UnkStruct_ov27_02256
static void NitroStaticInit (void)
{
ov25_02254238(ov27_022561D4, ov27_02256358);
PoketchSystem_SetAppFunctions(ov27_022561D4, ov27_02256358);
}
static BOOL ov27_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -172,7 +172,7 @@ static void ov27_022562FC (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov27_022562AC(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_64);
PoketchSystem_NotifyAppUnloaded(v1->unk_64);
}
} else {
}
@ -206,7 +206,7 @@ static BOOL ov27_0225637C (UnkStruct_ov27_0225621C * param0)
break;
case 1:
if (ov27_022569EC(param0->unk_60, 0)) {
ov25_0225424C(param0->unk_64);
PoketchSystem_NotifyAppLoaded(param0->unk_64);
if (param0->unk_1C.unk_00) {
ov27_02256360(param0, 2);

View File

@ -61,7 +61,7 @@ static BOOL ov27_02256E90(UnkStruct_ov27_02256E90 * param0, u32 param1);
static void ov27_02256EC4(BGL * param0, u32 param1);
static void ov27_02256F24(SysTask * param0, void * param1);
static void ov27_02256F7C(UnkStruct_ov27_0225680C * param0);
struct PoketchSystem * sub_0203D158(void);
struct PoketchSystem * FieldSystem_GetPoketchSystem(void);
BOOL ov27_0225680C (UnkStruct_ov27_0225680C ** param0, const UnkStruct_ov27_0225680C_1 * param1, BGL * param2)
{
@ -358,7 +358,7 @@ static void ov27_02256BE8 (SysTask * param0, void * param1)
sub_02019448(v0->unk_04, 6);
ov25_02254424(1641);
PoketchSystem_PlaySoundEffect(1641);
ov27_02256A04(param1);
}
@ -409,7 +409,7 @@ static void ov27_02256C80 (SysTask * param0, void * param1)
ov25_0225524C(param1);
case 1:
if (ov27_02256E90(v2, 6)) {
ov25_02254424(1641);
PoketchSystem_PlaySoundEffect(1641);
ov27_02256EC4(v1->unk_04, v2->unk_03);
sub_02019448(v1->unk_04, 6);
}
@ -442,7 +442,7 @@ static void ov27_02256D00 (SysTask * param0, void * param1)
ov25_0225524C(param1);
case 1:
if (ov27_02256E90(v2, 3)) {
ov25_02254424(1641);
PoketchSystem_PlaySoundEffect(1641);
ov27_02256EC4(v1->unk_04, v2->unk_03);
sub_02019448(v1->unk_04, 6);
}
@ -472,7 +472,7 @@ static void ov27_02256D80 (SysTask * param0, void * param1)
ov25_022558C4(v1->unk_60[8], 15);
ov27_02256EC4(v1->unk_04, 5);
sub_02019448(v1->unk_04, 6);
ov25_02254424(1638);
PoketchSystem_PlaySoundEffect(1638);
ov25_0225524C(param1);
case 1:
if (++(v2->unk_00) > 2) {

View File

@ -78,7 +78,7 @@ static const TouchScreenHitTable Unk_ov28_02257658[] = {
static void NitroStaticInit (void)
{
ov25_02254238(ov28_022561D4, ov28_02256324);
PoketchSystem_SetAppFunctions(ov28_022561D4, ov28_02256324);
}
static BOOL ov28_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -175,7 +175,7 @@ static void ov28_022562CC (SysTask * param0, void * param1)
ov28_02256298(v1);
Heap_FreeToHeap(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_10);
PoketchSystem_NotifyAppUnloaded(v1->unk_10);
}
} else {
}
@ -227,7 +227,7 @@ static BOOL ov28_02256374 (UnkStruct_ov28_02256210 * param0)
break;
case 1:
if (ov28_022569DC(param0->unk_14, 0)) {
ov25_0225424C(param0->unk_10);
PoketchSystem_NotifyAppLoaded(param0->unk_10);
ov28_0225632C(param0, 1);
}
break;
@ -634,7 +634,7 @@ static void ov28_02256914 (UnkStruct_ov28_02256210 * param0, const UnkStruct_ov2
PokedexData * v1;
u16 v2;
v1 = SaveData_Pokedex(PoketchSystem_SaveData(param0->unk_10));
v1 = SaveData_Pokedex(PoketchSystem_GetSaveData(param0->unk_10));
if (sub_02027474(v1)) {
v2 = v0;

View File

@ -43,7 +43,7 @@ static void ov28_02256D90(BGL * param0, const UnkStruct_ov28_0225697C_1 * param1
static void ov28_02256DCC(BGL * param0);
static void ov28_02256DF0(SysTask * param0, void * param1);
static void ov28_02256E0C(BGL * param0, const u16 * param1);
struct PoketchSystem * sub_0203D158(void);
struct PoketchSystem * FieldSystem_GetPoketchSystem(void);
static const u16 Unk_ov28_022578F8[32] = {
0xFB,
@ -586,7 +586,7 @@ static void ov28_02256B24 (SysTask * param0, void * param1)
v1 = ov25_0225523C(param1);
v2 = v0->unk_00;
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
sub_020198C0(v1->unk_04, 6, Unk_ov28_0225797C[v2], Unk_ov28_02257938[v2].unk_00, Unk_ov28_02257938[v2].unk_01, Unk_ov28_02257938[v2].unk_02, Unk_ov28_02257938[v2].unk_03);
sub_02019448(v1->unk_04, 6);

View File

@ -50,7 +50,7 @@ static const TouchScreenHitTable Unk_ov29_02256B3C[] = {
static void NitroStaticInit (void)
{
ov25_02254238(ov29_022561D4, ov29_02256324);
PoketchSystem_SetAppFunctions(ov29_022561D4, ov29_02256324);
}
static BOOL ov29_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -117,7 +117,7 @@ static void ov29_022562AC (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov29_02256288(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_16F8);
PoketchSystem_NotifyAppUnloaded(v1->unk_16F8);
}
} else {
}
@ -160,7 +160,7 @@ static BOOL ov29_02256340 (UnkStruct_ov29_0225621C * param0)
break;
case 1:
if (ov29_022567D8(param0->unk_16F4, 0)) {
ov25_0225424C(param0->unk_16F8);
PoketchSystem_NotifyAppLoaded(param0->unk_16F8);
ov29_0225632C(param0, 1);
}
break;
@ -208,7 +208,7 @@ static BOOL ov29_02256404 (UnkStruct_ov29_0225621C * param0)
{
u32 v0, v1;
if (ov25_0225446C(&v0, &v1)) {
if (PoketchSystem_GetDisplayHeldCoords(&v0, &v1)) {
if (((u32)(v0 - 16) < (u32)(172 - 16)) & ((u32)(v1 - 16) < (u32)(166 - 16))) {
v0 = (v0 - 16) >> 1;
v1 = (v1 - 16) >> 1;
@ -228,7 +228,7 @@ static BOOL ov29_02256460 (UnkStruct_ov29_0225621C * param0)
{
u32 v0, v1;
if (ov25_0225446C(&v0, &v1)) {
if (PoketchSystem_GetDisplayHeldCoords(&v0, &v1)) {
if (((u32)(v0 - 16) < (u32)(172 - 16)) & ((u32)(v1 - 16) < (u32)(166 - 16))) {
v0 = (v0 - 16) >> 1;
v1 = (v1 - 16) >> 1;

View File

@ -217,7 +217,7 @@ static void ov29_02256908 (SysTask * param0, void * param1)
ov25_022558C4(v0->unk_68[1], 2);
}
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov29_022567F0(param1);
}

View File

@ -51,7 +51,7 @@ static const TouchScreenHitTable Unk_ov30_02256678[] = {
static void NitroStaticInit (void)
{
ov25_02254238(ov30_022561D4, ov30_022562EC);
PoketchSystem_SetAppFunctions(ov30_022561D4, ov30_022562EC);
}
static BOOL ov30_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -129,7 +129,7 @@ static void ov30_022562B0 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov30_02256298(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_28);
PoketchSystem_NotifyAppUnloaded(v1->unk_28);
}
} else {
}
@ -176,7 +176,7 @@ static BOOL ov30_02256324 (UnkStruct_ov30_0225621C * param0)
break;
case 1:
if (ov30_02256488(param0->unk_24, 0)) {
ov25_0225424C(param0->unk_28);
PoketchSystem_NotifyAppLoaded(param0->unk_28);
ov30_02256310(param0, 1);
}
break;

View File

@ -50,7 +50,7 @@ static BOOL ov31_02256518(UnkStruct_ov31_02256228 * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov31_022561D4, ov31_02256404);
PoketchSystem_SetAppFunctions(ov31_022561D4, ov31_02256404);
}
static BOOL ov31_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -61,7 +61,7 @@ static BOOL ov31_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2,
if (ov31_02256228(v0, param1, param2, param3)) {
if (SysTask_Start(ov31_022563CC, v0, 1) != NULL) {
*param0 = v0;
ov25_02254274(ov31_022563B0, v0);
PoketchSystem_SetSaveFunction(ov31_022563B0, v0);
return 1;
}
}
@ -92,7 +92,7 @@ static BOOL ov31_02256228 (UnkStruct_ov31_02256228 * param0, PoketchSystem * par
static void ov31_02256268 (UnkStruct_ov31_02256228 * param0, UnkStruct_ov31_02256554_1 * param1)
{
PoketchData * v0 = PoketchSystem_PoketchData(param0->unk_1F0);
PoketchData * v0 = PoketchSystem_GetPoketchData(param0->unk_1F0);
if (PoketchData_DotArtModified(v0)) {
ov31_02256298(param0, param1, v0);
@ -178,7 +178,7 @@ static void ov31_0225635C (UnkStruct_ov31_02256554_1 * param0)
static void ov31_02256384 (UnkStruct_ov31_02256228 * param0)
{
ov31_022562EC(param0, &param0->unk_0C, PoketchSystem_PoketchData(param0->unk_1F0));
ov31_022562EC(param0, &param0->unk_0C, PoketchSystem_GetPoketchData(param0->unk_1F0));
ov31_02256584(param0->unk_1EC);
Heap_FreeToHeap(param0);
@ -187,7 +187,7 @@ static void ov31_02256384 (UnkStruct_ov31_02256228 * param0)
static void ov31_022563B0 (void * param0)
{
UnkStruct_ov31_02256228 * v0 = param0;
ov31_022562EC(v0, &v0->unk_0C, PoketchSystem_PoketchData(v0->unk_1F0));
ov31_022562EC(v0, &v0->unk_0C, PoketchSystem_GetPoketchData(v0->unk_1F0));
}
static void ov31_022563CC (SysTask * param0, void * param1)
@ -204,7 +204,7 @@ static void ov31_022563CC (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov31_02256384(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_1F0);
PoketchSystem_NotifyAppUnloaded(v1->unk_1F0);
}
} else {
}
@ -235,7 +235,7 @@ static BOOL ov31_02256420 (UnkStruct_ov31_02256228 * param0)
break;
case 1:
if (ov31_022565B4(param0->unk_1EC, 0)) {
ov25_0225424C(param0->unk_1F0);
PoketchSystem_NotifyAppLoaded(param0->unk_1F0);
ov31_0225640C(param0, 1);
}
break;
@ -254,7 +254,7 @@ static BOOL ov31_0225646C (UnkStruct_ov31_02256228 * param0)
if (ov31_022565B4(param0->unk_1EC, 1)) {
u32 v0, v1;
if (ov25_0225446C(&v0, &v1)) {
if (PoketchSystem_GetDisplayHeldCoords(&v0, &v1)) {
if ((v0 >= 16) && (v1 >= 16)) {
v0 = (v0 - 16) / 8;
v1 = (v1 - 16) / 8;

View File

@ -43,7 +43,7 @@ static void ov32_022563C8(UnkStruct_ov32_02256470_1 * param0, Party * param1);
static void NitroStaticInit (void)
{
ov25_02254238(ov32_022561D4, ov32_022562AC);
PoketchSystem_SetAppFunctions(ov32_022561D4, ov32_022562AC);
}
static BOOL ov32_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -71,7 +71,7 @@ static BOOL ov32_0225621C (UnkStruct_ov32_0225621C * param0, PoketchSystem * par
param0->unk_01 = 0;
param0->unk_02 = 0;
ov32_022563C8(&param0->unk_04, Party_GetFromSavedata(PoketchSystem_SaveData(param1)));
ov32_022563C8(&param0->unk_04, Party_GetFromSavedata(PoketchSystem_GetSaveData(param1)));
param0->unk_04.unk_64 = 0;
param0->unk_04.unk_66 = 0;
@ -105,7 +105,7 @@ static void ov32_02256278 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov32_02256264(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_78);
PoketchSystem_NotifyAppUnloaded(v1->unk_78);
}
} else {
}
@ -136,7 +136,7 @@ static BOOL ov32_022562C8 (UnkStruct_ov32_0225621C * param0)
break;
case 1:
if (ov32_0225655C(param0->unk_74, 0)) {
ov25_0225424C(param0->unk_78);
PoketchSystem_NotifyAppLoaded(param0->unk_78);
ov32_022562B4(param0, 1);
}
break;
@ -153,7 +153,7 @@ static BOOL ov32_02256308 (UnkStruct_ov32_0225621C * param0)
}
if (ov32_0225655C(param0->unk_74, 2)) {
param0->unk_04.unk_64 = ov25_0225446C(&(param0->unk_04.unk_68), &(param0->unk_04.unk_6C));
param0->unk_04.unk_64 = PoketchSystem_GetDisplayHeldCoords(&(param0->unk_04.unk_68), &(param0->unk_04.unk_6C));
if (param0->unk_04.unk_64) {
param0->unk_04.unk_66 = TouchScreen_Tapped();
@ -162,7 +162,7 @@ static BOOL ov32_02256308 (UnkStruct_ov32_0225621C * param0)
u32 v0 = ov32_02256B78(param0->unk_04.unk_68, param0->unk_04.unk_6C, param0->unk_04.unk_00);
if (v0 >= param0->unk_04.unk_00) {
ov32_022563C8(&param0->unk_04, Party_GetFromSavedata(PoketchSystem_SaveData(param0->unk_78)));
ov32_022563C8(&param0->unk_04, Party_GetFromSavedata(PoketchSystem_GetSaveData(param0->unk_78)));
ov32_02256538(param0->unk_74, 2);
}
}

View File

@ -478,6 +478,6 @@ static void ov32_02256C54 (SysTask * param0, void * param1)
sub_02019448(v0->unk_04, 6);
ov25_02254424(1641);
PoketchSystem_PlaySoundEffect(1641);
ov32_02256574(param1);
}

View File

@ -44,7 +44,7 @@ static BOOL ov33_02256440(UnkStruct_ov33_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov33_022561D4, ov33_02256374);
PoketchSystem_SetAppFunctions(ov33_022561D4, ov33_02256374);
}
static BOOL ov33_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -163,7 +163,7 @@ static void ov33_02256340 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov33_0225632C(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_60);
PoketchSystem_NotifyAppUnloaded(v1->unk_60);
}
} else {
}
@ -194,7 +194,7 @@ static BOOL ov33_02256390 (UnkStruct_ov33_0225621C * param0)
break;
case 1:
if (ov33_0225656C(param0->unk_5C, 0)) {
ov25_0225424C(param0->unk_60);
PoketchSystem_NotifyAppLoaded(param0->unk_60);
ov33_0225637C(param0, 1);
}
break;
@ -210,7 +210,7 @@ static BOOL ov33_022563D0 (UnkStruct_ov33_0225621C * param0)
return 0;
}
param0->unk_04.unk_4C = ov25_0225446C(&param0->unk_04.unk_50, &param0->unk_04.unk_54);
param0->unk_04.unk_4C = PoketchSystem_GetDisplayHeldCoords(&param0->unk_04.unk_50, &param0->unk_04.unk_54);
if (param0->unk_04.unk_4C) {
if (((u32)(param0->unk_04.unk_50 - 16) < (u32)(207 - 16)) & ((u32)(param0->unk_04.unk_54 - 16) < (u32)(175 - 16))) {

View File

@ -776,7 +776,7 @@ static void ov33_0225718C (UnkStruct_ov33_02256474 * param0, const UnkStruct_ov3
case 0:
VEC_Set(&v0->unk_08, 0, 0, 0);
ov33_02256C98(param0, param2);
ov25_02254424(1641);
PoketchSystem_PlaySoundEffect(1641);
v0->unk_34_val3[0]++;
case 1:
v0->unk_34_val3[1] += 8;

View File

@ -43,7 +43,7 @@ static BOOL ov34_0225650C(UnkStruct_ov34_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov34_022561D4, ov34_02256294);
PoketchSystem_SetAppFunctions(ov34_022561D4, ov34_02256294);
}
static BOOL ov34_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -103,7 +103,7 @@ static void ov34_02256260 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov34_02256244(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_4C);
PoketchSystem_NotifyAppUnloaded(v1->unk_4C);
}
} else {
}
@ -134,7 +134,7 @@ static BOOL ov34_022562B0 (UnkStruct_ov34_0225621C * param0)
break;
case 1:
if (ov34_02256664(param0->unk_48, 0)) {
ov25_0225424C(param0->unk_4C);
PoketchSystem_NotifyAppLoaded(param0->unk_4C);
ov34_0225629C(param0, 1);
}
break;
@ -157,7 +157,7 @@ static BOOL ov34_022562F0 (UnkStruct_ov34_0225621C * param0)
case 0:
if (ov34_022563E4(param0, &v0, &v1)) {
ov34_02256428(param0, v0, v1);
ov25_02254424(1640);
PoketchSystem_PlaySoundEffect(1640);
ov34_02256640(param0->unk_48, 2);
param0->unk_01 = 1;
}
@ -168,7 +168,7 @@ static BOOL ov34_022562F0 (UnkStruct_ov34_0225621C * param0)
break;
}
if ((ov25_02254534(param0->unk_4C) == 1) || (ov25_0225450C(param0->unk_4C))) {
if ((PoketchSystem_IsPlayerMoving(param0->unk_4C) == 1) || (ov25_0225450C(param0->unk_4C))) {
ov34_02256A0C(param0->unk_48);
param0->unk_01 = 2;
break;
@ -188,7 +188,7 @@ static BOOL ov34_022562F0 (UnkStruct_ov34_0225621C * param0)
break;
case 3:
if (ov34_02256664(param0->unk_48, 2)) {
ov25_02254424(1640);
PoketchSystem_PlaySoundEffect(1640);
ov34_02256640(param0->unk_48, 2);
param0->unk_01 = 1;
}
@ -201,7 +201,7 @@ static BOOL ov34_022562F0 (UnkStruct_ov34_0225621C * param0)
static BOOL ov34_022563E4 (UnkStruct_ov34_0225621C * param0, u32 * param1, u32 * param2)
{
if (ov25_0225450C(param0->unk_4C) == 0) {
if (sub_020227C0(param1, param2)) {
if (TouchScreen_GetTapState(param1, param2)) {
if (((u32)((*param1) - 24) < (u32)(200 - 24)) & ((u32)((*param2) - 24) < (u32)(168 - 24))) {
return 1;
}
@ -216,7 +216,7 @@ static void ov34_02256428 (UnkStruct_ov34_0225621C * param0, int param1, int par
static const fx32 v0[] = {
8 << FX32_SHIFT, 24 << FX32_SHIFT, 48 << FX32_SHIFT,
};
UnkStruct_0203F478 * v1 = sub_0203F478(PoketchSystem_FieldSystem(param0->unk_4C), 8);
UnkStruct_0203F478 * v1 = sub_0203F478(PoketchSystem_GetFieldSystem(param0->unk_4C), 8);
UnkStruct_ov34_02256540_1 * v2 = &(param0->unk_04);
v2->unk_08 = 0;

View File

@ -43,7 +43,7 @@ static BOOL ov35_022563DC(UnkStruct_ov35_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov35_022561D4, ov35_022562EC);
PoketchSystem_SetAppFunctions(ov35_022561D4, ov35_022562EC);
}
static BOOL ov35_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -128,7 +128,7 @@ static void ov35_022562B0 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov35_0225628C(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_14);
PoketchSystem_NotifyAppUnloaded(v1->unk_14);
}
} else {
}
@ -159,7 +159,7 @@ static BOOL ov35_02256308 (UnkStruct_ov35_0225621C * param0)
break;
case 1:
if (ov35_0225656C(param0->unk_10, 0)) {
ov25_0225424C(param0->unk_14);
PoketchSystem_NotifyAppLoaded(param0->unk_14);
ov35_022562F4(param0, 1);
}
break;

View File

@ -194,7 +194,7 @@ static void ov35_02256644 (SysTask * param0, void * param1)
switch (v0->unk_00->unk_04) {
case 0:
ov25_02254424(1641);
PoketchSystem_PlaySoundEffect(1641);
ov25_022558C4(v0->unk_24, 1);
break;
case 1:

View File

@ -41,7 +41,7 @@ static BOOL ov36_022563D0(UnkStruct_ov36_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov36_022561D4, ov36_022562D4);
PoketchSystem_SetAppFunctions(ov36_022561D4, ov36_022562D4);
}
static BOOL ov36_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -74,7 +74,7 @@ static BOOL ov36_0225621C (UnkStruct_ov36_0225621C * param0, PoketchSystem * par
};
param0->unk_10 = param1;
param0->unk_1C = PoketchSystem_PoketchData(param1);
param0->unk_1C = PoketchSystem_GetPoketchData(param1);
param0->unk_04.unk_04 = 1;
param0->unk_04.unk_00 = PoketchData_StepCount(param0->unk_1C);
@ -124,7 +124,7 @@ static void ov36_02256298 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov36_02256280(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_10);
PoketchSystem_NotifyAppUnloaded(v1->unk_10);
}
} else {
}
@ -155,7 +155,7 @@ static BOOL ov36_022562F0 (UnkStruct_ov36_0225621C * param0)
break;
case 1:
if (ov36_02256560(param0->unk_0C, 0)) {
ov25_0225424C(param0->unk_10);
PoketchSystem_NotifyAppLoaded(param0->unk_10);
ov36_022562DC(param0, 1);
}
break;

View File

@ -198,7 +198,7 @@ static void ov36_02256638 (SysTask * param0, void * param1)
switch (v0->unk_00->unk_04) {
case 0:
ov25_02254424(1641);
PoketchSystem_PlaySoundEffect(1641);
ov25_022558C4(v0->unk_24, 1);
break;
case 1:

View File

@ -42,7 +42,7 @@ static BOOL ov37_022563A0(UnkStruct_ov37_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov37_022561D4, ov37_022562DC);
PoketchSystem_SetAppFunctions(ov37_022561D4, ov37_022562DC);
}
static BOOL ov37_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -119,7 +119,7 @@ static void ov37_022562A0 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov37_02256280(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_0C);
PoketchSystem_NotifyAppUnloaded(v1->unk_0C);
}
} else {
}
@ -150,7 +150,7 @@ static BOOL ov37_022562F8 (UnkStruct_ov37_0225621C * param0)
break;
case 1:
if (ov37_022564AC(param0->unk_08, 0)) {
ov25_0225424C(param0->unk_0C);
PoketchSystem_NotifyAppLoaded(param0->unk_0C);
ov37_022562E4(param0, 1);
}
break;

View File

@ -172,7 +172,7 @@ static void ov37_02256588 (SysTask * param0, void * param1)
UnkStruct_ov37_022563D4 * v0 = ov25_0225523C(param1);
const UnkStruct_ov37_022563D4_1 * v1 = ov25_02255240(param1);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
if (v1->unk_00) {
ov25_022558C4(v0->unk_24, 0);

View File

@ -36,7 +36,7 @@ static BOOL ov38_022562F8(UnkStruct_ov38_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov38_022561D4, ov38_02256288);
PoketchSystem_SetAppFunctions(ov38_022561D4, ov38_02256288);
}
static BOOL ov38_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -91,7 +91,7 @@ static void ov38_02256254 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov38_02256240(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_0C);
PoketchSystem_NotifyAppUnloaded(v1->unk_0C);
}
} else {
}
@ -122,7 +122,7 @@ static BOOL ov38_022562A4 (UnkStruct_ov38_0225621C * param0)
break;
case 1:
if (ov38_0225638C(param0->unk_08, 0)) {
ov25_0225424C(param0->unk_0C);
PoketchSystem_NotifyAppLoaded(param0->unk_0C);
ov38_02256290(param0, 1);
}
break;

View File

@ -42,7 +42,7 @@ static BOOL ov39_022563A8(UnkStruct_ov39_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov39_022561D4, ov39_022562C8);
PoketchSystem_SetAppFunctions(ov39_022561D4, ov39_022562C8);
}
static BOOL ov39_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -127,7 +127,7 @@ static void ov39_0225628C (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov39_02256268(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_28);
PoketchSystem_NotifyAppUnloaded(v1->unk_28);
}
} else {
}
@ -158,7 +158,7 @@ static BOOL ov39_022562E4 (UnkStruct_ov39_0225621C * param0)
break;
case 1:
if (ov39_0225643C(param0->unk_24, 0)) {
ov25_0225424C(param0->unk_28);
PoketchSystem_NotifyAppLoaded(param0->unk_28);
ov39_022562D0(param0, 1);
}
break;
@ -180,10 +180,10 @@ static BOOL ov39_02256324 (UnkStruct_ov39_0225621C * param0)
if (param0->unk_04.unk_04[param0->unk_34]) {
param0->unk_04.unk_1C = param0->unk_34;
ov39_02256418(param0->unk_24, 2);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
param0->unk_01++;
} else {
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
}
}
break;

View File

@ -47,7 +47,7 @@ static void ov40_022563D0(UnkStruct_ov40_0225645C_1 * param0, UnkStruct_02026310
static void NitroStaticInit (void)
{
ov25_02254238(ov40_022561D4, ov40_022562A4);
PoketchSystem_SetAppFunctions(ov40_022561D4, ov40_022562A4);
}
static BOOL ov40_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -70,7 +70,7 @@ static BOOL ov40_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2,
static BOOL ov40_0225621C (UnkStruct_ov40_0225621C * param0, PoketchSystem * param1, BGL * param2, u32 param3)
{
param0->unk_30 = sub_02026310(PoketchSystem_SaveData(param1));
param0->unk_30 = sub_02026310(PoketchSystem_GetSaveData(param1));
ov40_022563D0(&param0->unk_04, param0->unk_30);
@ -106,7 +106,7 @@ static void ov40_02256270 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov40_0225625C(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_2C);
PoketchSystem_NotifyAppUnloaded(v1->unk_2C);
}
} else {
}
@ -137,7 +137,7 @@ static BOOL ov40_022562C0 (UnkStruct_ov40_0225621C * param0)
break;
case 1:
if (ov40_022565EC(param0->unk_28, 0)) {
ov25_0225424C(param0->unk_2C);
PoketchSystem_NotifyAppLoaded(param0->unk_2C);
ov40_022562AC(param0, 1);
}
break;
@ -193,7 +193,7 @@ static BOOL ov40_02256388 (UnkStruct_ov40_0225621C * param0)
if (ov25_0225450C(param0->unk_2C) == 0) {
u32 v0, v1;
if (sub_020227C0(&v0, &v1)) {
if (TouchScreen_GetTapState(&v0, &v1)) {
if (((u32)(v0 - 16) < (u32)(207 - 16)) & ((u32)(v1 - 16) < (u32)(175 - 16))) {
return 1;
}

View File

@ -319,7 +319,7 @@ static void ov40_02256704 (SysTask * param0, void * param1)
v0->unk_80 = 0;
v0->unk_7C = 10;
ov40_022567D8(v0);
ov25_02254424(1656);
PoketchSystem_PlaySoundEffect(1656);
ov25_0225524C(param1);
break;
case 1:

View File

@ -47,7 +47,7 @@ static void ov41_02256790(UnkStruct_ov41_022567B0_1 * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov41_022561D4, ov41_02256310);
PoketchSystem_SetAppFunctions(ov41_022561D4, ov41_02256310);
}
static BOOL ov41_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -122,7 +122,7 @@ static void ov41_022562B8 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov41_02256294(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_5B80);
PoketchSystem_NotifyAppUnloaded(v1->unk_5B80);
}
} else {
}
@ -161,7 +161,7 @@ static BOOL ov41_0225632C (UnkStruct_ov41_02256220 * param0)
break;
case 1:
if (ov41_022568B0(param0->unk_5B7C, 0)) {
ov25_0225424C(param0->unk_5B80);
PoketchSystem_NotifyAppLoaded(param0->unk_5B80);
ov41_02256318(param0, 1);
}
break;
@ -190,16 +190,16 @@ static BOOL ov41_02256378 (UnkStruct_ov41_02256220 * param0)
param0->unk_04.unk_5B76 = 1;
ov41_0225688C(param0->unk_5B7C, 5);
ov41_0225688C(param0->unk_5B7C, 7);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
param0->unk_01 = 1;
break;
case 1:
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
break;
case 2:
param0->unk_04.unk_5B76 = 1;
ov41_0225688C(param0->unk_5B7C, 5);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
param0->unk_01 = 3;
break;
}
@ -231,7 +231,7 @@ static BOOL ov41_02256378 (UnkStruct_ov41_02256220 * param0)
switch (param0->unk_5B8C) {
case 2:
case 0:
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
break;
case 1:
param0->unk_04.unk_5B74 = 1;
@ -239,7 +239,7 @@ static BOOL ov41_02256378 (UnkStruct_ov41_02256220 * param0)
param0->unk_04.unk_5B76 = 1;
ov41_0225688C(param0->unk_5B7C, 5);
ov41_0225688C(param0->unk_5B7C, 8);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
param0->unk_01 = 2;
break;
}
@ -283,7 +283,7 @@ static BOOL ov41_02256564 (UnkStruct_ov41_02256220 * param0)
{
u32 v0, v1;
if (ov25_0225446C(&v0, &v1)) {
if (PoketchSystem_GetDisplayHeldCoords(&v0, &v1)) {
if (((u32)(v0 - 16) < (u32)(171 - 16)) & ((u32)(v1 - 16) < (u32)(165 - 16))) {
v0 = (v0 - 16) >> 1;
v1 = (v1 - 16) >> 1;
@ -304,7 +304,7 @@ static BOOL ov41_022565C4 (UnkStruct_ov41_02256220 * param0)
{
u32 v0, v1;
if (ov25_0225446C(&v0, &v1)) {
if (PoketchSystem_GetDisplayHeldCoords(&v0, &v1)) {
if (((u32)(v0 - 16) < (u32)(171 - 16)) & ((u32)(v1 - 16) < (u32)(165 - 16))) {
v0 = (v0 - 16) >> 1;
v1 = (v1 - 16) >> 1;

View File

@ -418,7 +418,7 @@ static void ov41_02256D1C (SysTask * param0, void * param1)
break;
case 1:
if (ov41_022568B0(v0, 7)) {
ov25_02254424(1642);
PoketchSystem_PlaySoundEffect(1642);
ov41_022568C8(param1);
}
break;

View File

@ -40,7 +40,7 @@ static BOOL ov42_02256398(void);
static void NitroStaticInit (void)
{
ov25_02254238(ov42_022561D4, ov42_022562B4);
PoketchSystem_SetAppFunctions(ov42_022561D4, ov42_022562B4);
}
static BOOL ov42_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -101,7 +101,7 @@ static void ov42_02256280 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov42_02256260(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_10);
PoketchSystem_NotifyAppUnloaded(v1->unk_10);
}
} else {
}
@ -132,7 +132,7 @@ static BOOL ov42_022562D0 (UnkStruct_ov42_0225621C * param0)
break;
case 1:
if (ov42_022564C4(param0->unk_0C, 0)) {
ov25_0225424C(param0->unk_10);
PoketchSystem_NotifyAppLoaded(param0->unk_10);
ov42_022562BC(param0, 1);
}
break;
@ -187,7 +187,7 @@ static BOOL ov42_02256398 (void)
{
u32 x, y;
if (ov25_022544BC(&x, &y)) {
if (PoketchSystem_GetDisplayTappedCoords(&x, &y)) {
x = (112 - x) * (112 - x);
y = (144 - y) * (144 - y);

View File

@ -190,7 +190,7 @@ static void ov42_022565C4 (SysTask * param0, void * param1)
switch (ov25_02255248(param1)) {
case 0:
ov25_02254424(1653);
PoketchSystem_PlaySoundEffect(1653);
ov25_022558C4(v0->unk_24, 0);
v0->unk_3C = 144 << FX32_SHIFT;
v0->unk_40 = Unk_ov42_02256720;
@ -209,10 +209,10 @@ static void ov42_022565C4 (SysTask * param0, void * param1)
v0->unk_40 = -((v0->unk_40 * 56) / 100);
if (v0->unk_40 < (-2 * FX32_ONE)) {
ov25_02254424(1654);
PoketchSystem_PlaySoundEffect(1654);
v0->unk_3C = 144 << FX32_SHIFT;
} else {
ov25_02254424(1654);
PoketchSystem_PlaySoundEffect(1654);
ov25_022558C4(v0->unk_24, (v1->unk_00) ? 1 : 2);
v0->unk_3C = 144 << FX32_SHIFT;
ov25_0225524C(param1);

View File

@ -46,7 +46,7 @@ static u32 ov43_022564EC(s32 param0, s32 param1, BOOL param2);
static void NitroStaticInit (void)
{
ov25_02254238(ov43_022561D4, ov43_02256310);
PoketchSystem_SetAppFunctions(ov43_022561D4, ov43_02256310);
}
static BOOL ov43_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -131,7 +131,7 @@ static void ov43_022562CC (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov43_022562A8(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_18);
PoketchSystem_NotifyAppUnloaded(v1->unk_18);
}
} else {
}
@ -170,7 +170,7 @@ static BOOL ov43_0225632C (UnkStruct_ov43_0225621C * param0)
break;
case 1:
if (ov43_022566D4(param0->unk_14, 0)) {
ov25_0225424C(param0->unk_18);
PoketchSystem_NotifyAppLoaded(param0->unk_18);
ov43_02256318(param0, 1);
}
break;

View File

@ -308,7 +308,7 @@ static void ov43_022568B4 (SysTask * param0, void * param1)
v2 = (v1->unk_00 & 1) ? 3 : 1;
ov25_022558C4(v0->unk_34[v1->unk_00], v2);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov43_022566EC(param1);
}

View File

@ -52,7 +52,7 @@ static BOOL ov44_02256588(UnkStruct_ov44_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov44_022561D4, ov44_02256374);
PoketchSystem_SetAppFunctions(ov44_022561D4, ov44_02256374);
}
static BOOL ov44_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -75,7 +75,7 @@ static BOOL ov44_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2,
static BOOL ov44_0225621C (UnkStruct_ov44_0225621C * param0, PoketchSystem * param1, BGL * param2, u32 param3)
{
Party * v0 = Party_GetFromSavedata(PoketchSystem_SaveData(param1));
Party * v0 = Party_GetFromSavedata(PoketchSystem_GetSaveData(param1));
Pokemon * v1;
int v2;
int v3 = 0;
@ -149,7 +149,7 @@ static void ov44_02256338 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov44_02256314(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_3C);
PoketchSystem_NotifyAppUnloaded(v1->unk_3C);
}
} else {
}
@ -180,7 +180,7 @@ static BOOL ov44_02256390 (UnkStruct_ov44_0225621C * param0)
break;
case 1:
if (ov44_02256768(param0->unk_38, 0)) {
ov25_0225424C(param0->unk_3C);
PoketchSystem_NotifyAppLoaded(param0->unk_3C);
ov44_0225637C(param0, 1);
}
break;
@ -217,7 +217,7 @@ static BOOL ov44_022563D0 (UnkStruct_ov44_0225621C * param0)
ov44_02256744(param0->unk_38, 2);
param0->unk_01 = 2;
} else {
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
}
break;
}

View File

@ -279,7 +279,7 @@ static void ov44_0225686C (SysTask * param0, void * param1)
v0 = ov25_0225523C(param1);
v1 = ov25_02255240(param1);
ov25_02254424(1641);
PoketchSystem_PlaySoundEffect(1641);
ov25_022558C4(v0->unk_24[0], 10);
ov44_02256780(param1);
}
@ -508,7 +508,7 @@ static BOOL ov44_02256AC8 (UnkStruct_ov44_022565BC * param0, const UnkStruct_ov4
param0->unk_70 = 2;
break;
case -5:
ov25_02254424(param0->unk_6C[(param0->unk_74)++]);
PoketchSystem_PlaySoundEffect(param0->unk_6C[(param0->unk_74)++]);
break;
case -6:
ov25_022558C4(param0->unk_24[2], 6);

View File

@ -55,7 +55,7 @@ static BOOL ov45_022566CC(UnkStruct_ov45_022566EC_1 * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov45_022561D4, ov45_02256354);
PoketchSystem_SetAppFunctions(ov45_022561D4, ov45_02256354);
}
static BOOL ov45_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -88,7 +88,7 @@ static BOOL ov45_0225621C (UnkStruct_ov45_022561D4 * param0, PoketchSystem * par
};
u32 v1, v2;
param0->unk_10 = PoketchSystem_PoketchData(param1);
param0->unk_10 = PoketchSystem_GetPoketchData(param1);
param0->unk_03.unk_00 = PoketchData_IsAlarmSet(param0->unk_10);
PoketchData_AlarmTime(param0->unk_10, &v1, &v2);
@ -172,7 +172,7 @@ static void ov45_02256318 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov45_022562F8(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_0C);
PoketchSystem_NotifyAppUnloaded(v1->unk_0C);
}
} else {
}
@ -203,7 +203,7 @@ static BOOL ov45_02256370 (UnkStruct_ov45_022561D4 * param0)
break;
case 1:
if (ov45_0225693C(param0->unk_08, 0)) {
ov25_0225424C(param0->unk_0C);
PoketchSystem_NotifyAppLoaded(param0->unk_0C);
if (param0->unk_03.unk_00) {
ov45_0225635C(param0, 2);
@ -238,7 +238,7 @@ static BOOL ov45_022563C0 (UnkStruct_ov45_022561D4 * param0)
if ((param0->unk_1C == 1) && (param0->unk_18 == 1)) {
param0->unk_1C = 0;
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
break;
}
@ -304,7 +304,7 @@ static BOOL ov45_022564D0 (UnkStruct_ov45_022561D4 * param0)
}
if ((param0->unk_1C == 1) && (param0->unk_18 == 0)) {
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
break;
}

View File

@ -333,7 +333,7 @@ static void ov45_02256A40 (SysTask * param0, void * param1)
UnkStruct_ov45_022566EC * v0 = ov25_0225523C(param1);
const UnkStruct_ov45_022566EC_1 * v1 = ov25_02255240(param1);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov25_022558C4(v0->unk_34[0], 3);
ov25_022558C4(v0->unk_34[3], 5);
@ -354,7 +354,7 @@ static void ov45_02256ABC (SysTask * param0, void * param1)
UnkStruct_ov45_022566EC * v0 = ov25_0225523C(param1);
const UnkStruct_ov45_022566EC_1 * v1 = ov25_02255240(param1);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov25_022558C4(v0->unk_34[0], 2);
ov25_022558C4(v0->unk_34[3], 5);
@ -396,7 +396,7 @@ static void ov45_02256B78 (SysTask * param0, void * param1)
ov25_022558C4(v0->unk_34[4], 4);
ov25_022558C4(v0->unk_34[1], 1);
ov25_022558C4(v0->unk_34[2], 1);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov25_02254444(294, 0);
v0->unk_94 = 0;
v0->unk_98 = 0;

View File

@ -87,7 +87,7 @@ static void ov46_02256B10(UnkStruct_ov46_0225621C * param0, u64 param1);
static void NitroStaticInit (void)
{
ov25_02254238(ov46_022561D4, ov46_02256458);
PoketchSystem_SetAppFunctions(ov46_022561D4, ov46_02256458);
}
static BOOL ov46_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -265,7 +265,7 @@ static void ov46_02256408 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov46_022563B8(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_0C);
PoketchSystem_NotifyAppUnloaded(v1->unk_0C);
}
} else {
}
@ -328,7 +328,7 @@ static BOOL ov46_022564D8 (UnkStruct_ov46_0225621C * param0)
break;
case 1:
if (ov46_02256D48(param0->unk_08, 0)) {
ov25_0225424C(param0->unk_0C);
PoketchSystem_NotifyAppLoaded(param0->unk_0C);
ov46_02256460(param0, param0->unk_48.unk_44);
}
break;
@ -355,10 +355,10 @@ static BOOL ov46_02256518 (UnkStruct_ov46_0225621C * param0)
case 2:
ov46_02256AF0(param0);
ov46_02256D24(param0->unk_08, 5);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
break;
case 0:
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
if (ov46_022569CC(param0)) {
ov46_0225623C(param0, 0, 0);
@ -368,7 +368,7 @@ static BOOL ov46_02256518 (UnkStruct_ov46_0225621C * param0)
}
break;
case 1:
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
break;
}
@ -451,10 +451,10 @@ static BOOL ov46_022566A0 (UnkStruct_ov46_0225621C * param0)
switch (param0->unk_14) {
case 0:
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
break;
case 1:
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov46_0225623C(param0, 1, 0);
ov46_0225623C(param0, 0, 1);
ov46_02256A3C(param0);
@ -462,7 +462,7 @@ static BOOL ov46_022566A0 (UnkStruct_ov46_0225621C * param0)
ov46_02256460(param0, 3);
break;
case 2:
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov46_0225623C(param0, 0, 1);
ov46_0225623C(param0, 1, 0);
ov46_02256AF0(param0);
@ -489,17 +489,17 @@ static BOOL ov46_0225678C (UnkStruct_ov46_0225621C * param0)
switch (param0->unk_14) {
case 0:
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov46_0225623C(param0, 1, 1);
ov46_0225623C(param0, 0, 0);
ov46_02256A50(param0);
ov46_02256460(param0, 2);
break;
case 1:
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
break;
case 2:
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov46_0225623C(param0, 0, 1);
ov46_0225623C(param0, 1, 0);
ov46_02256AF0(param0);
@ -526,10 +526,10 @@ static BOOL ov46_02256838 (UnkStruct_ov46_0225621C * param0)
switch (param0->unk_14) {
case 0:
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
break;
case 1:
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov46_0225623C(param0, 0, 1);
ov46_0225623C(param0, 1, 0);
ov46_02256D24(param0->unk_08, 7);
@ -537,7 +537,7 @@ static BOOL ov46_02256838 (UnkStruct_ov46_0225621C * param0)
param0->unk_01++;
break;
case 2:
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov46_0225623C(param0, 0, 1);
ov46_0225623C(param0, 1, 0);
ov46_02256D24(param0->unk_08, 7);
@ -562,17 +562,17 @@ static BOOL ov46_022568E0 (UnkStruct_ov46_0225621C * param0)
switch (param0->unk_14) {
case 0:
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov46_0225623C(param0, 0, 0);
ov46_0225623C(param0, 1, 1);
ov46_02256D24(param0->unk_08, 6);
ov46_02256460(param0, 4);
break;
case 1:
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
break;
case 2:
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov46_0225623C(param0, 0, 1);
ov46_0225623C(param0, 1, 0);
ov46_02256AF0(param0);

View File

@ -435,7 +435,7 @@ static void ov46_02256F54 (SysTask * param0, void * param1)
ov25_022558C4(v0->unk_34[1], 0);
}
ov25_02254424(1655);
PoketchSystem_PlaySoundEffect(1655);
v0->unk_A4 = 0;
}
break;

View File

@ -51,7 +51,7 @@ static BOOL ov47_02256584(UnkStruct_ov47_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov47_022561D4, ov47_022563B8);
PoketchSystem_SetAppFunctions(ov47_022561D4, ov47_022563B8);
}
static BOOL ov47_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -76,7 +76,7 @@ static BOOL ov47_0225621C (UnkStruct_ov47_0225621C * param0, PoketchSystem * par
{
int v0;
param0->unk_78 = PoketchSystem_PoketchData(param1);
param0->unk_78 = PoketchSystem_GetPoketchData(param1);
for (v0 = 0; v0 < 6; v0++) {
param0->unk_04.unk_0C[v0].unk_03 = 1;
@ -95,7 +95,7 @@ static BOOL ov47_0225621C (UnkStruct_ov47_0225621C * param0, PoketchSystem * par
param0->unk_04.unk_08 = 0;
{
VarsFlags * v1 = SaveData_GetVarsFlags(PoketchSystem_SaveData(param1));
VarsFlags * v1 = SaveData_GetVarsFlags(PoketchSystem_GetSaveData(param1));
for (v0 = 0; v0 < 4; v0++) {
param0->unk_04.unk_2C[v0] = sub_0206B1F0(v1, v0);
@ -103,7 +103,7 @@ static BOOL ov47_0225621C (UnkStruct_ov47_0225621C * param0, PoketchSystem * par
}
{
UnkStruct_0202D7B0 * v2 = sub_0202D834(PoketchSystem_SaveData(param1));
UnkStruct_0202D7B0 * v2 = sub_0202D834(PoketchSystem_GetSaveData(param1));
for (v0 = 0; v0 < 6; v0++) {
param0->unk_7C[v0] = sub_0202D924(v2, v0);
@ -112,7 +112,7 @@ static BOOL ov47_0225621C (UnkStruct_ov47_0225621C * param0, PoketchSystem * par
}
}
inline_ov47_0225621C(PoketchSystem_FieldSystem(param1), &(param0->unk_04.unk_00), &(param0->unk_04.unk_04));
inline_ov47_0225621C(PoketchSystem_GetFieldSystem(param1), &(param0->unk_04.unk_00), &(param0->unk_04.unk_04));
if (ov47_02256634(&(param0->unk_70), &(param0->unk_04), param2)) {
param0->unk_00 = 0;
@ -152,7 +152,7 @@ static void ov47_02256384 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov47_0225634C(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_74);
PoketchSystem_NotifyAppUnloaded(v1->unk_74);
}
} else {
}
@ -183,7 +183,7 @@ static BOOL ov47_022563D4 (UnkStruct_ov47_0225621C * param0)
break;
case 1:
if (ov47_02256890(param0->unk_70, 0)) {
ov25_0225424C(param0->unk_74);
PoketchSystem_NotifyAppLoaded(param0->unk_74);
ov47_022563C0(param0, 1);
}
break;
@ -204,7 +204,7 @@ static BOOL ov47_02256414 (UnkStruct_ov47_0225621C * param0)
param0->unk_04.unk_08 = ov47_02256584(param0);
param0->unk_04.unk_28 = 0;
if (ov25_022544BC(&v0, &v1)) {
if (PoketchSystem_GetDisplayTappedCoords(&v0, &v1)) {
int v2, v3, v4, v5;
for (v2 = 0; v2 < 6; v2++) {
@ -242,7 +242,7 @@ static BOOL ov47_022564A8 (UnkStruct_ov47_0225621C * param0)
param0->unk_04.unk_08 = ov47_02256584(param0);
if (ov25_0225446C(&v0, &v1)) {
if (PoketchSystem_GetDisplayHeldCoords(&v0, &v1)) {
param0->unk_04.unk_0C[param0->unk_04.unk_24].unk_00 = v0;
param0->unk_04.unk_0C[param0->unk_04.unk_24].unk_01 = v1;
} else {
@ -299,10 +299,10 @@ static BOOL ov47_02256584 (UnkStruct_ov47_0225621C * param0)
{
BOOL v0 = 0;
if (ov25_02254534(param0->unk_74)) {
if (PoketchSystem_IsPlayerMoving(param0->unk_74)) {
int v1, v2;
inline_ov47_0225621C(PoketchSystem_FieldSystem(param0->unk_74), &v1, &v2);
inline_ov47_0225621C(PoketchSystem_GetFieldSystem(param0->unk_74), &v1, &v2);
if ((v1 != param0->unk_04.unk_00) || (v2 != param0->unk_04.unk_04)) {
param0->unk_04.unk_00 = v1;

View File

@ -170,7 +170,7 @@ static void ov48_022564E0(UnkStruct_ov48_0225621C * param0, PoketchSystem * para
static void NitroStaticInit (void)
{
ov25_02254238(ov48_022561D4, ov48_022562F0);
PoketchSystem_SetAppFunctions(ov48_022561D4, ov48_022562F0);
}
static BOOL ov48_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -196,7 +196,7 @@ static BOOL ov48_0225621C (UnkStruct_ov48_0225621C * param0, PoketchSystem * par
param0->unk_AC = param1;
param0->unk_04.unk_08 = ov48_02256408(param0);
inline_ov47_0225621C(PoketchSystem_FieldSystem(param0->unk_AC), &(param0->unk_04.unk_00), &(param0->unk_04.unk_04));
inline_ov47_0225621C(PoketchSystem_GetFieldSystem(param0->unk_AC), &(param0->unk_04.unk_00), &(param0->unk_04.unk_04));
ov48_022564E0(param0, param1);
@ -230,7 +230,7 @@ static void ov48_022562BC (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov48_022562A8(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_AC);
PoketchSystem_NotifyAppUnloaded(v1->unk_AC);
}
} else {
}
@ -261,7 +261,7 @@ static BOOL ov48_0225630C (UnkStruct_ov48_0225621C * param0)
break;
case 1:
if (ov48_0225657C(param0->unk_A8, 0)) {
ov25_0225424C(param0->unk_AC);
PoketchSystem_NotifyAppLoaded(param0->unk_AC);
ov48_022562F8(param0, 1);
}
break;
@ -282,7 +282,7 @@ static BOOL ov48_02256358 (UnkStruct_ov48_0225621C * param0)
if (ov48_0225657C(param0->unk_A8, 2)) {
u32 v0, v1;
if (ov25_022544BC(&v0, &v1)) {
if (PoketchSystem_GetDisplayTappedCoords(&v0, &v1)) {
if (((u32)(v0 - 16) < (u32)192) & ((u32)(v1 - 16) < (u32)192)) {
param0->unk_04.unk_08 = ov48_02256408(param0);
ov48_02256558(param0->unk_A8, 2);
@ -312,7 +312,7 @@ static BOOL ov48_022563D0 (UnkStruct_ov48_0225621C * param0)
static int ov48_02256408 (UnkStruct_ov48_0225621C * param0)
{
UnkStruct_02027854 * v0 = sub_02027854(PoketchSystem_SaveData(param0->unk_AC));
UnkStruct_02027854 * v0 = sub_02027854(PoketchSystem_GetSaveData(param0->unk_AC));
int v1, v2;
for (v1 = 0, v2 = 0; v1 < (NELEMS(Unk_ov48_02256A38)); v1++) {
@ -337,10 +337,10 @@ static BOOL ov48_02256478 (UnkStruct_ov48_0225621C * param0)
{
BOOL v0 = 0;
if (ov25_02254534(param0->unk_AC)) {
if (PoketchSystem_IsPlayerMoving(param0->unk_AC)) {
int v1, v2;
inline_ov47_0225621C(PoketchSystem_FieldSystem(param0->unk_AC), &v1, &v2);
inline_ov47_0225621C(PoketchSystem_GetFieldSystem(param0->unk_AC), &v1, &v2);
if ((v1 != param0->unk_04.unk_00) || (v2 != param0->unk_04.unk_04)) {
param0->unk_04.unk_00 = v1;
@ -354,7 +354,7 @@ static BOOL ov48_02256478 (UnkStruct_ov48_0225621C * param0)
static void ov48_022564E0 (UnkStruct_ov48_0225621C * param0, PoketchSystem * param1)
{
VarsFlags * v0 = SaveData_GetVarsFlags(PoketchSystem_SaveData(param1));
VarsFlags * v0 = SaveData_GetVarsFlags(PoketchSystem_GetSaveData(param1));
int v1;
for (v1 = 0; v1 < 4; v1++) {

View File

@ -206,7 +206,7 @@ static void ov48_0225672C (SysTask * param0, void * param1)
G2S_SetBGMosaicSize(v0->unk_154, v0->unk_154);
G2S_SetOBJMosaicSize(v0->unk_154, v0->unk_154);
ov25_02254424(1656);
PoketchSystem_PlaySoundEffect(1656);
ov25_0225524C(param1);
break;
case 1:

View File

@ -41,7 +41,7 @@ static BOOL ov49_022563A0(UnkStruct_ov49_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov49_022561D4, ov49_022562A0);
PoketchSystem_SetAppFunctions(ov49_022561D4, ov49_022562A0);
}
static BOOL ov49_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -64,7 +64,7 @@ static BOOL ov49_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2,
static BOOL ov49_0225621C (UnkStruct_ov49_0225621C * param0, PoketchSystem * param1, BGL * param2, u32 param3)
{
param0->unk_10 = PoketchSystem_PoketchData(param1);
param0->unk_10 = PoketchSystem_GetPoketchData(param1);
param0->unk_04.unk_00 = PoketchData_CurrentScreenColor(param0->unk_10);
param0->unk_03 = param0->unk_04.unk_00;
@ -99,7 +99,7 @@ static void ov49_0225626C (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov49_02256258(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_0C);
PoketchSystem_NotifyAppUnloaded(v1->unk_0C);
}
} else {
}
@ -130,7 +130,7 @@ static BOOL ov49_022562BC (UnkStruct_ov49_0225621C * param0)
break;
case 1:
if (ov49_022564B8(param0->unk_08, 0)) {
ov25_0225424C(param0->unk_0C);
PoketchSystem_NotifyAppLoaded(param0->unk_0C);
ov49_022562A8(param0, 1);
}
break;
@ -168,7 +168,7 @@ static BOOL ov49_02256348 (UnkStruct_ov49_0225621C * param0)
if (ov25_0225450C(param0->unk_0C) == 0) {
u32 v0, v1;
if (sub_020227A4(&v0, &v1)) {
if (TouchScreen_GetHoldState(&v0, &v1)) {
if ((136 <= v1) && (v1 < 160) && (48 <= v0) && (v0 < 184)) {
u32 v2 = (v0 - 48) / 16;

View File

@ -174,7 +174,7 @@ static void ov49_02256594 (SysTask * param0, void * param1)
UnkStruct_ov49_022563D4 * v0 = ov25_0225523C(param1);
const UnkStruct_ov49_022563D4_1 * v1 = ov25_02255240(param1);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov25_022546B8(0, 0);
ov25_02255900(v0->unk_24, (56 + (16 * v1->unk_00)) << FX32_SHIFT, (148 << FX32_SHIFT));
ov49_022564D0(param1);

View File

@ -48,7 +48,7 @@ static BOOL ov50_022564D8(UnkStruct_ov50_022561D4 * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov50_022561D4, ov50_022563B0);
PoketchSystem_SetAppFunctions(ov50_022561D4, ov50_022563B0);
}
static BOOL ov50_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -113,7 +113,7 @@ static BOOL ov50_0225621C (UnkStruct_ov50_022561D4 * param0, PoketchSystem * par
RTCDate v1;
GetCurrentDate(&v1);
param0->unk_98 = PoketchSystem_PoketchData(param1);
param0->unk_98 = PoketchSystem_GetPoketchData(param1);
ov50_022562AC(&(param0->unk_04), param0, &v1);
param0->unk_A8 = param0->unk_04.unk_0C[0].unk_02;
@ -195,7 +195,7 @@ static void ov50_0225636C (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov50_02256340(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_94);
PoketchSystem_NotifyAppUnloaded(v1->unk_94);
}
} else {
}
@ -226,7 +226,7 @@ static BOOL ov50_022563CC (UnkStruct_ov50_022561D4 * param0)
break;
case 1:
if (ov50_02256620(param0->unk_90, 0)) {
ov25_0225424C(param0->unk_94);
PoketchSystem_NotifyAppLoaded(param0->unk_94);
ov50_022563B8(param0, 1);
}
break;

View File

@ -36,7 +36,7 @@ static BOOL ov51_022562F8(UnkStruct_ov51_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov51_022561D4, ov51_02256288);
PoketchSystem_SetAppFunctions(ov51_022561D4, ov51_02256288);
}
static BOOL ov51_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -91,7 +91,7 @@ static void ov51_02256254 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov51_02256240(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_0C);
PoketchSystem_NotifyAppUnloaded(v1->unk_0C);
}
} else {
}
@ -122,7 +122,7 @@ static BOOL ov51_022562A4 (UnkStruct_ov51_0225621C * param0)
break;
case 1:
if (ov51_0225638C(param0->unk_08, 0)) {
ov25_0225424C(param0->unk_0C);
PoketchSystem_NotifyAppLoaded(param0->unk_0C);
ov51_02256290(param0, 1);
}
break;

View File

@ -56,7 +56,7 @@ static BOOL ov52_02256684(UnkStruct_ov52_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov52_022561D4, ov52_0225629C);
PoketchSystem_SetAppFunctions(ov52_022561D4, ov52_0225629C);
}
static BOOL ov52_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -118,7 +118,7 @@ static void ov52_02256260 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov52_0225624C(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_18);
PoketchSystem_NotifyAppUnloaded(v1->unk_18);
}
} else {
}
@ -149,7 +149,7 @@ static BOOL ov52_022562B8 (UnkStruct_ov52_0225621C * param0)
break;
case 1:
if (ov52_022567C8(param0->unk_14, 0)) {
ov25_0225424C(param0->unk_18);
PoketchSystem_NotifyAppLoaded(param0->unk_18);
ov52_022562A4(param0, 1);
}
break;
@ -169,7 +169,7 @@ static BOOL ov52_022562F8 (UnkStruct_ov52_0225621C * param0)
case 0:
if (ov52_02256554(param0)) {
if (ov52_02256684(param0)) {
FieldSystem * fieldSystem = PoketchSystem_FieldSystem(param0->unk_18);
FieldSystem * fieldSystem = PoketchSystem_GetFieldSystem(param0->unk_18);
ov52_022567A4(param0->unk_14, 3);
@ -179,7 +179,7 @@ static BOOL ov52_022562F8 (UnkStruct_ov52_0225621C * param0)
ov52_022562A4(param0, 2);
}
} else {
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
}
}
break;
@ -245,7 +245,7 @@ static BOOL ov52_02256430 (UnkStruct_ov52_0225621C * param0)
return 1;
}
if (ov25_02254534(param0->unk_18)) {
if (PoketchSystem_IsPlayerMoving(param0->unk_18)) {
return 1;
}
@ -331,7 +331,7 @@ static BOOL ov52_02256554 (UnkStruct_ov52_0225621C * param0)
if (ov25_0225450C(param0->unk_18) == 0) {
u32 v0, v1;
if (sub_020227C0(&v0, &v1)) {
if (TouchScreen_GetTapState(&v0, &v1)) {
if (((u32)(v0 - 16) < (u32)(207 - 16)) & ((u32)(v1 - 16) < (u32)(175 - 16))) {
return 1;
}
@ -409,7 +409,7 @@ static void ov52_022565EC (UnkStruct_ov52_0225621C * param0)
static void ov52_0225664C (UnkStruct_ov52_0225621C * param0)
{
if (param0->unk_20 == 0) {
sub_02037BC0(PoketchSystem_SaveData(param0->unk_18));
sub_02037BC0(PoketchSystem_GetSaveData(param0->unk_18));
param0->unk_20 = 1;
}
}

View File

@ -250,7 +250,7 @@ static void ov52_022568D8 (SysTask * param0, void * param1)
ov25_02255914(v0->unk_34[3], 1);
ov52_02256A7C(v0);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov52_022567E0(param1);
}
@ -265,7 +265,7 @@ static void ov52_0225691C (SysTask * param0, void * param1)
ov25_022558C4(v0->unk_34[1], 1);
ov52_02256B10(v0);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov52_022567E0(param1);
}
@ -279,7 +279,7 @@ static void ov52_02256968 (SysTask * param0, void * param1)
ov25_02255914(v0->unk_34[3], 1);
ov25_022558C4(v0->unk_34[2], 2);
ov52_02256B64(v0);
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
ov52_022567E0(param1);
}
@ -293,7 +293,7 @@ static void ov52_022569B4 (SysTask * param0, void * param1)
ov25_02255914(v0->unk_34[3], 1);
ov25_022558C4(v0->unk_34[2], 2);
ov52_02256BDC(v0);
ov25_02254424(1646);
PoketchSystem_PlaySoundEffect(1646);
ov52_022567E0(param1);
}
@ -309,7 +309,7 @@ static void ov52_02256A00 (SysTask * param0, void * param1)
ov25_022558C4(v0->unk_34[3], 0);
ov52_02256C64(v0, v1);
ov25_02254424(1635);
PoketchSystem_PlaySoundEffect(1635);
ov52_022567E0(param1);
}

View File

@ -44,7 +44,7 @@ static BOOL ov53_022563EC(UnkStruct_ov53_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov53_022561D4, ov53_0225630C);
PoketchSystem_SetAppFunctions(ov53_022561D4, ov53_0225630C);
}
static BOOL ov53_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -90,7 +90,7 @@ static BOOL ov53_0225621C (UnkStruct_ov53_0225621C * param0, PoketchSystem * par
FieldSystem * fieldSystem;
int v2;
fieldSystem = PoketchSystem_FieldSystem(param1);
fieldSystem = PoketchSystem_GetFieldSystem(param1);
param0->unk_04.unk_04 = ov6_02243140(fieldSystem);
if (param0->unk_04.unk_04) {
@ -145,7 +145,7 @@ static void ov53_022562D0 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov53_022562B8(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_30);
PoketchSystem_NotifyAppUnloaded(v1->unk_30);
}
} else {
}
@ -184,7 +184,7 @@ static BOOL ov53_02256330 (UnkStruct_ov53_0225621C * param0)
break;
case 1:
if (ov53_02256484(param0->unk_2C, 0)) {
ov25_0225424C(param0->unk_30);
PoketchSystem_NotifyAppLoaded(param0->unk_30);
ov53_0225631C(param0, 1);
}
break;
@ -204,7 +204,7 @@ static BOOL ov53_02256370 (UnkStruct_ov53_0225621C * param0)
FieldSystem * fieldSystem;
int v1;
fieldSystem = PoketchSystem_FieldSystem(param0->unk_30);
fieldSystem = PoketchSystem_GetFieldSystem(param0->unk_30);
param0->unk_04.unk_04 = ov6_02243140(fieldSystem);
if (param0->unk_04.unk_04 == 0) {

View File

@ -43,7 +43,7 @@ static BOOL ov54_022563F4(UnkStruct_ov54_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov54_022561D4, ov54_02256338);
PoketchSystem_SetAppFunctions(ov54_022561D4, ov54_02256338);
}
static BOOL ov54_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -143,7 +143,7 @@ static BOOL ov54_0225621C (UnkStruct_ov54_0225621C * param0, PoketchSystem * par
PoketchData * v1;
int v2;
v1 = PoketchSystem_PoketchData(param1);
v1 = PoketchSystem_GetPoketchData(param1);
param0->unk_04.unk_90 = PoketchData_PokemonHistorySize(v1);
for (v2 = 0; v2 < param0->unk_04.unk_90; v2++) {
@ -190,7 +190,7 @@ static void ov54_022562F4 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov54_022562D4(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_9C);
PoketchSystem_NotifyAppUnloaded(v1->unk_9C);
}
} else {
}
@ -229,7 +229,7 @@ static BOOL ov54_02256360 (UnkStruct_ov54_0225621C * param0)
break;
case 1:
if (ov54_02256490(param0->unk_98, 0)) {
ov25_0225424C(param0->unk_9C);
PoketchSystem_NotifyAppLoaded(param0->unk_9C);
ov54_0225634C(param0, 1);
}
break;

View File

@ -36,7 +36,7 @@ static BOOL ov55_022562F8(UnkStruct_ov55_0225621C * param0);
static void NitroStaticInit (void)
{
ov25_02254238(ov55_022561D4, ov55_02256288);
PoketchSystem_SetAppFunctions(ov55_022561D4, ov55_02256288);
}
static BOOL ov55_022561D4 (void ** param0, PoketchSystem * param1, BGL * param2, u32 param3)
@ -92,7 +92,7 @@ static void ov55_02256254 (SysTask * param0, void * param1)
if (v0[v1->unk_00](v1)) {
ov55_02256240(v1);
SysTask_Done(param0);
ov25_02254260(v1->unk_0C);
PoketchSystem_NotifyAppUnloaded(v1->unk_0C);
}
} else {
}
@ -123,7 +123,7 @@ static BOOL ov55_022562A4 (UnkStruct_ov55_0225621C * param0)
break;
case 1:
if (ov55_0225639C(param0->unk_08, 0)) {
ov25_0225424C(param0->unk_0C);
PoketchSystem_NotifyAppLoaded(param0->unk_0C);
ov55_02256290(param0, 1);
}
break;

View File

@ -656,7 +656,7 @@ static int ov56_02256BC0 (UnkStruct_ov56_02256468 * param0)
switch (v0) {
case 0:
ov56_0225717C(param0, 0);
sub_020227A4(&v1, &v2);
TouchScreen_GetHoldState(&v1, &v2);
ov56_02256994(param0->unk_1FC[2], v2);
if (param0->unk_2D8.unk_00 > 3) {

View File

@ -2462,7 +2462,7 @@ void ov62_02233664 (UnkStruct_ov62_0223359C * param0)
BOOL v3;
BOOL v4 = 0;
v3 = sub_020227A4(&v0, &v1);
v3 = TouchScreen_GetHoldState(&v0, &v1);
if (param0->unk_14) {
sub_0200D33C(param0->unk_18[0]);
@ -3290,7 +3290,7 @@ static void ov62_02234440 (UnkStruct_0208C06C * param0)
param0->unk_41D8.unk_00 = 1;
param0->unk_41D8.unk_04 = 0;
sub_020227C0(&v0, &v1);
TouchScreen_GetTapState(&v0, &v1);
sub_0208BA30(param0->unk_41D8.unk_08);
sub_0208B8B0(param0->unk_41D8.unk_08, 1);
sub_0208B9E0(param0->unk_41D8.unk_08, 1);

View File

@ -676,7 +676,7 @@ static BOOL ov62_02237AC0 (UnkStruct_0208C06C * param0)
u32 v1, v2;
BOOL v3 = 0;
v3 = sub_020227C0(&v1, &v2);
v3 = TouchScreen_GetTapState(&v1, &v2);
if (v3) {
if ((v1 > 10 * 8) && (v1 < 22 * 8) && (v2 > 19 * 8) && (v2 < 22 * 8)) {

View File

@ -116,7 +116,7 @@ int ov76_0223B278 (UnkStruct_ov76_0223DE00 * param0, u8 param1)
param0->unk_324[v0].unk_05 = 190;
param0->unk_324[v0].unk_06 = 70;
sub_020227A4(&v1, &v2);
TouchScreen_GetHoldState(&v1, &v2);
param0->unk_324[v0].unk_05 = v1;
param0->unk_324[v0].unk_06 = v2;

View File

@ -1166,7 +1166,7 @@ static BOOL ov76_0223DF94 (UnkStruct_ov76_0223DE00 * param0)
BOOL v14;
v13 = param0->unk_D4.unk_00;
v14 = sub_020227A4(&v11, &v12);
v14 = TouchScreen_GetHoldState(&v11, &v12);
if (v14) {
int v15;

View File

@ -535,7 +535,7 @@ static BOOL ov111_021D10B8 (UnkStruct_ov111_021D0F7C * param0)
param0->unk_15[param0->unk_0E] = v3;
param0->unk_0E++;
sub_020227A4(&v0, &v1);
TouchScreen_GetHoldState(&v0, &v1);
sub_0200E084(&param0->unk_5C[15], 0);
GXLayers_EngineBToggleLayers((GX_PLANEMASK_BG0), 0);
param0->unk_08 = 2;

View File

@ -1008,7 +1008,7 @@ void ov116_02263BA0 (UnkStruct_ov116_02262A8C * param0)
u32 v0, v1;
s16 v2, v3;
BOOL v4;
BOOL v5 = sub_020227A4(&v0, &v1);
BOOL v5 = TouchScreen_GetHoldState(&v0, &v1);
TouchScreenHitTable * v6;
int v7;

View File

@ -139,26 +139,26 @@ BOOL TouchScreen_Tapped(void)
return gCoreSys.touchPressed;
}
BOOL sub_020227A4 (u32 * param0, u32 * param1)
BOOL TouchScreen_GetHoldState(u32 *x, u32 *y)
{
if (gCoreSys.touchHeld) {
*param0 = gCoreSys.touchX;
*param1 = gCoreSys.touchY;
return 1;
*x = gCoreSys.touchX;
*y = gCoreSys.touchY;
return TRUE;
}
return 0;
return FALSE;
}
BOOL sub_020227C0 (u32 * param0, u32 * param1)
BOOL TouchScreen_GetTapState(u32 * x, u32 * y)
{
if (gCoreSys.touchPressed) {
*param0 = gCoreSys.touchX;
*param1 = gCoreSys.touchY;
return 1;
*x = gCoreSys.touchX;
*y = gCoreSys.touchY;
return TRUE;
}
return 0;
return FALSE;
}
int sub_020227DC (const TouchScreenHitTable *hitTable, u32 param1, u32 param2)