mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
A few f_pc files (#26)
* f_pc_base, one non matching * some of f_pc_manager * f_pc_node OK * f_pc_pause partly * started node_req * more progress * most of node req * delete unused asm * node req header and param names * param renaming * header for manager * review comment struct names * fpcM_Management OK * int -> s32 * merge master * most of f_pc_create_iter * f_pc_stdcreate_req OK * f_pc_fstcreate OK * f_pc_leaf OK * f_pc_draw OK * f_pc_deletor partly * fix parameter type in f_pc_pause * review * review, use cPh enum and fix process_profile_definition struct * convert f_pc files to C * matched more functions * fix global.h * fix variable types * format * mpre Phs enum * fix merge errors * fix gamepad stopPatternedRumble * format * delete leftover files from merge * move asm to correct folder * revert f_pc from C to CPP * remove C hacks and format * format * OK
This commit is contained in:
@@ -23,6 +23,7 @@ public:
|
||||
void assign();
|
||||
void checkResetCallback(OSTime unk); // todo: weird arg
|
||||
void update();
|
||||
void stopPatternedRumble() { this->rumble.stopPatternedRumble(this->pad_port); }
|
||||
static void checkResetSwitch();
|
||||
static void clearForReset();
|
||||
static JUTGamePad* getGamePad(s32 pad_index);
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#include "SComponent/c_node.h"
|
||||
|
||||
struct node_list_class {
|
||||
typedef struct node_list_class {
|
||||
node_class* mpHead;
|
||||
node_class* mpTail;
|
||||
int mSize;
|
||||
};
|
||||
} node_list_class;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "SComponent/c_list.h"
|
||||
#include "SComponent/c_node_iter.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
#ifndef SCOMPONENT_C_NODE_H
|
||||
#define SCOMPONENT_C_NODE_H
|
||||
|
||||
struct node_class {
|
||||
node_class* mpPrevNode;
|
||||
#include "global.h"
|
||||
|
||||
typedef struct node_class {
|
||||
struct node_class* mpPrevNode;
|
||||
void* mpData;
|
||||
node_class* mpNextNode;
|
||||
};
|
||||
struct node_class* mpNextNode;
|
||||
} node_class;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ enum cPhs__Step {
|
||||
cPhs_NEXT_e = 0x06,
|
||||
};
|
||||
|
||||
struct request_of_phase_process_class {
|
||||
typedef struct request_of_phase_process_class {
|
||||
cPhs__Handler* mpHandlerTable;
|
||||
int mPhaseStep;
|
||||
};
|
||||
} request_of_phase_process_class;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
#include "SComponent/c_tree.h"
|
||||
#include "global.h"
|
||||
|
||||
struct create_tag_class {
|
||||
typedef struct create_tag_class {
|
||||
node_class mpNode;
|
||||
void* mpTagData;
|
||||
s8 mbIsUse;
|
||||
};
|
||||
} create_tag_class;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -4,16 +4,17 @@
|
||||
|
||||
#include "SComponent/c_node_iter.h"
|
||||
#include "SComponent/c_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
struct method_filter {
|
||||
typedef struct method_filter {
|
||||
cNdIt_MethodFunc mpMethodFunc;
|
||||
void* mpUserData;
|
||||
};
|
||||
} method_filter;
|
||||
|
||||
struct judge_filter {
|
||||
typedef struct judge_filter {
|
||||
cNdIt_JudgeFunc mpJudgeFunc;
|
||||
void* mpUserData;
|
||||
};
|
||||
} judge_filter;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
|
||||
#include "SComponent/c_list.h"
|
||||
#include "SComponent/c_node.h"
|
||||
#include "global.h"
|
||||
|
||||
struct node_lists_tree_class {
|
||||
typedef struct node_lists_tree_class {
|
||||
node_list_class* mpLists;
|
||||
int mNumLists;
|
||||
};
|
||||
} node_lists_tree_class;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "SComponent/c_node_iter.h"
|
||||
#include "SComponent/c_tree.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef __C_XYZ_H_
|
||||
#define __C_XYZ_H_
|
||||
|
||||
#include "global.h"
|
||||
|
||||
class cXyz : public Vec {};
|
||||
|
||||
#endif
|
||||
@@ -11,6 +11,10 @@ public:
|
||||
private:
|
||||
};
|
||||
|
||||
class dDlst_peekZ_c {
|
||||
u8 unk[4];
|
||||
}; // actual size unknown!!!
|
||||
|
||||
class dDlst_list_c {
|
||||
public:
|
||||
static u32 mWipeColor;
|
||||
@@ -18,8 +22,10 @@ public:
|
||||
static u32 mWipeRate;
|
||||
static u32 mWipeSpeed;
|
||||
|
||||
private:
|
||||
u8 unk[0x161A0];
|
||||
};
|
||||
// private:
|
||||
/* 0x00000 */ u8 unk[0x16180];
|
||||
/* 0x16180 */ dDlst_peekZ_c dlstPeekZ;
|
||||
/* 0x16184 */ u8 unk_0x16194[0x1C];
|
||||
}; // Size: 0x161A0
|
||||
|
||||
#endif D_DRAWLIST_H_
|
||||
#endif D_DRAWLIST_H_
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "JSystem/JKernel/JKRAramArchive/JKRAramArchive.h"
|
||||
#include "SComponent/c_xyz.h"
|
||||
#include "global.h"
|
||||
|
||||
struct STControl_vtable {
|
||||
@@ -67,12 +68,6 @@ u32 dLib_getEventSwitchNo(int param_1);
|
||||
|
||||
struct fopAc_ac_c;
|
||||
|
||||
struct cXyz {
|
||||
f32 x;
|
||||
f32 y;
|
||||
f32 z;
|
||||
};
|
||||
|
||||
bool dLib_checkActorInRectangle(fopAc_ac_c* param_1, fopAc_ac_c* param_2, cXyz const* param_3,
|
||||
cXyz const* param_4);
|
||||
|
||||
@@ -81,6 +76,6 @@ u32 dLib_getExpandSizeFromAramArchive(JKRAramArchive* param_1, char const* param
|
||||
class dLib_time_c {
|
||||
public:
|
||||
s64 getTime(void);
|
||||
void stopTime(void);
|
||||
void startTime(void);
|
||||
static void stopTime(void);
|
||||
static void startTime(void);
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef __D_SAVE_H_
|
||||
#define __D_SAVE_H_
|
||||
|
||||
#include "SComponent/c_xyz.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "global.h"
|
||||
|
||||
@@ -375,12 +376,6 @@ private:
|
||||
u8 padding[3];
|
||||
};
|
||||
|
||||
// move to SComponent later
|
||||
class cXyz {
|
||||
public:
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
class dSv_horse_place_c {
|
||||
public:
|
||||
void init(void);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/* 80020A40 0001D980 94 21 FF F0 */ stwu r1, -0x10(r1)
|
||||
/* 80020A44 0001D984 7C 08 02 A6 */ mflr r0
|
||||
/* 80020A48 0001D988 90 01 00 14 */ stw r0, 0x14(r1)
|
||||
/* 80020A4C 0001D98C 7C 85 23 78 */ mr r5, r4
|
||||
/* 80020A50 0001D990 80 83 00 0C */ lwz r4, 0xc(r3)
|
||||
/* 80020A54 0001D994 80 64 00 44 */ lwz r3, 0x44(r4)
|
||||
/* 80020A58 0001D998 80 63 00 0C */ lwz r3, 0xc(r3)
|
||||
/* 80020A5C 0001D99C 80 05 00 00 */ lwz r0, 0(r5)
|
||||
/* 80020A60 0001D9A0 7C 03 00 40 */ cmplw r3, r0
|
||||
/* 80020A64 0001D9A4 40 82 00 1C */ bne lbl_80020A80
|
||||
/* 80020A68 0001D9A8 80 64 00 40 */ lwz r3, 0x40(r4)
|
||||
/* 80020A6C 0001D9AC 80 85 00 08 */ lwz r4, 8(r5)
|
||||
/* 80020A70 0001D9B0 81 85 00 04 */ lwz r12, 4(r5)
|
||||
/* 80020A74 0001D9B4 7D 89 03 A6 */ mtctr r12
|
||||
/* 80020A78 0001D9B8 4E 80 04 21 */ bctrl
|
||||
/* 80020A7C 0001D9BC 48 00 00 08 */ b lbl_80020A84
|
||||
lbl_80020A80:
|
||||
/* 80020A80 0001D9C0 38 60 00 00 */ li r3, 0
|
||||
lbl_80020A84:
|
||||
/* 80020A84 0001D9C4 80 01 00 14 */ lwz r0, 0x14(r1)
|
||||
/* 80020A88 0001D9C8 7C 08 03 A6 */ mtlr r0
|
||||
/* 80020A8C 0001D9CC 38 21 00 10 */ addi r1, r1, 0x10
|
||||
/* 80020A90 0001D9D0 4E 80 00 20 */ blr
|
||||
@@ -0,0 +1,9 @@
|
||||
/* 80023844 00020784 54 84 06 3E */ clrlwi r4, r4, 0x18
|
||||
/* 80023848 00020788 88 03 00 0B */ lbz r0, 0xb(r3)
|
||||
/* 8002384C 0002078C 7C 80 00 38 */ and r0, r4, r0
|
||||
/* 80023850 00020790 7C 64 00 50 */ subf r3, r4, r0
|
||||
/* 80023854 00020794 30 03 FF FF */ addic r0, r3, -1
|
||||
/* 80023858 00020798 7C 00 19 10 */ subfe r0, r0, r3
|
||||
/* 8002385C 0002079C 7C 00 00 34 */ cntlzw r0, r0
|
||||
/* 80023860 000207A0 54 03 D9 7E */ srwi r3, r0, 5
|
||||
/* 80023864 000207A4 4E 80 00 20 */ blr
|
||||
@@ -3,40 +3,49 @@
|
||||
#define F_PC_BASE_H
|
||||
|
||||
#include "SComponent/c_tag.h"
|
||||
#include "global.h"
|
||||
// #include "f/f_pc/f_pc_method.h"
|
||||
#include "f/f_pc/f_pc_delete_tag.h"
|
||||
#include "f/f_pc/f_pc_layer_tag.h"
|
||||
#include "f/f_pc/f_pc_line_tag.h"
|
||||
#include "f/f_pc/f_pc_priority.h"
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_profile.h"
|
||||
|
||||
struct create_request;
|
||||
struct profile_method_class;
|
||||
|
||||
struct base_process_class {
|
||||
typedef struct base_process_class {
|
||||
u32 mBsType;
|
||||
u32 mBsPcId;
|
||||
s16 mProcName;
|
||||
u8 mUnk0;
|
||||
s8 mUnk0;
|
||||
u8 mPauseFlag;
|
||||
s8 mInitState;
|
||||
u8 mUnk2;
|
||||
s16 mBsTypeId;
|
||||
void* mpProf;
|
||||
create_request* mpCtRq;
|
||||
process_profile_definition* mpProf;
|
||||
struct create_request* mpCtRq;
|
||||
layer_management_tag_class mLyTg;
|
||||
line_tag mLnTg;
|
||||
delete_tag_class mDtTg;
|
||||
process_priority_class mPi;
|
||||
profile_method_class* mpPcMtd;
|
||||
process_method_class* mpPcMtd;
|
||||
void* mpUserData;
|
||||
u32 mParameters;
|
||||
u32 mSubType;
|
||||
};
|
||||
} base_process_class;
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcBs_Is_JustOfType(int a, int b);
|
||||
int fpcBs_Execute(base_process_class* pProc);
|
||||
BOOL fpcBs_Is_JustOfType(s32 pType1, s32 pType2);
|
||||
s32 fpcBs_MakeOfType(s32* pType);
|
||||
s32 fpcBs_MakeOfId(void);
|
||||
s32 fpcBs_Execute(base_process_class* pProc);
|
||||
void fpcBs_DeleteAppend(base_process_class* pProc);
|
||||
s32 fpcBs_IsDelete(base_process_class* pProc);
|
||||
s32 fpcBs_Delete(base_process_class* pProc);
|
||||
base_process_class* fpcBs_Create(s16 pProcTypeID, u32 pProcID, void* pData);
|
||||
s32 fpcBs_SubCreate(base_process_class* pProc);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,12 +2,33 @@
|
||||
#ifndef F_PC_CREATE_ITER_H
|
||||
#define F_PC_CREATE_ITER_H
|
||||
|
||||
#include "SComponent/c_node_iter.h"
|
||||
#include "SComponent/c_list_iter.h"
|
||||
#include "SComponent/c_tag_iter.h"
|
||||
#include "f/f_pc/f_pc_create_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
typedef struct node_method_data {
|
||||
cNdIt_MethodFunc mFunc;
|
||||
void* mpUserData;
|
||||
} node_method_data;
|
||||
|
||||
typedef struct node_judge_data {
|
||||
cNdIt_JudgeFunc mFunc;
|
||||
void* mpUserData;
|
||||
} node_judge_data;
|
||||
|
||||
typedef struct fpcCtIt_jilprm_c {
|
||||
u32 mUnk0;
|
||||
cNdIt_JudgeFunc mFunc;
|
||||
void* mpUserData;
|
||||
} fpcCtIt_jilprm_c;
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcCtIt_Method(cNdIt_MethodFunc pJudge, void* pUserData);
|
||||
s32 fpcCtIt_Method(cNdIt_MethodFunc pJudge, void* pUserData);
|
||||
void* fpcCtIt_Judge(cNdIt_JudgeFunc pJudge, void* pUserData);
|
||||
void* fpcCtIt_filter_JudgeInLayer(create_tag*, fpcCtIt_jilprm_c*);
|
||||
void* fpcCtIt_JudgeInLayer(u32 pUnk0, cNdIt_JudgeFunc pFunc, void* pUserData);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,41 +5,42 @@
|
||||
#include "SComponent/c_phase.h"
|
||||
#include "SComponent/c_tag.h"
|
||||
#include "f/f_pc/f_pc_create_tag.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_method.h"
|
||||
#include "f/f_pc/f_pc_method_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
struct base_process_class;
|
||||
struct layer_class;
|
||||
|
||||
struct create_request_method_class {
|
||||
typedef struct create_request_method_class {
|
||||
cPhs__Handler mpHandler;
|
||||
process_method_func mpCancel;
|
||||
process_method_func mpDelete;
|
||||
};
|
||||
} create_request_method_class;
|
||||
|
||||
struct create_request : public create_tag {
|
||||
typedef struct create_request {
|
||||
create_tag mBase;
|
||||
s8 mbIsCreating;
|
||||
s8 mbIsCancelling;
|
||||
process_method_tag_class mMtdTg;
|
||||
create_request_method_class* mpCtRqMtd;
|
||||
void* mpUnk1;
|
||||
int mBsPcId;
|
||||
base_process_class* mpRes;
|
||||
s32 mBsPcId;
|
||||
struct base_process_class* mpRes;
|
||||
layer_class* mpLayer;
|
||||
};
|
||||
} create_request; // Size: 0x48
|
||||
|
||||
extern "C" {
|
||||
|
||||
bool fpcCtRq_isCreatingByID(create_tag* pTag, int* pId);
|
||||
bool fpcCtRq_IsCreatingByID(unsigned int id);
|
||||
BOOL fpcCtRq_isCreatingByID(create_tag* pTag, s32* pId);
|
||||
BOOL fpcCtRq_IsCreatingByID(u32 id);
|
||||
void fpcCtRq_CreateQTo(create_request* pReq);
|
||||
void fpcCtRq_ToCreateQ(create_request* pReq);
|
||||
bool fpcCtRq_Delete(create_request* pReq);
|
||||
bool fpcCtRq_Cancel(create_request* pReq);
|
||||
int fpcCtRq_IsDoing(create_request* pReq);
|
||||
BOOL fpcCtRq_Delete(create_request* pReq);
|
||||
BOOL fpcCtRq_Cancel(create_request* pReq);
|
||||
s32 fpcCtRq_IsDoing(create_request* pReq);
|
||||
void fpcCtRq_Handler(void);
|
||||
create_request* fpcCtRq_Create(layer_class* pLayer, unsigned long size,
|
||||
create_request* fpcCtRq_Create(layer_class* pLayer, u32 size,
|
||||
create_request_method_class* pCtRqMtd);
|
||||
};
|
||||
|
||||
|
||||
@@ -5,13 +5,15 @@
|
||||
#include "SComponent/c_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
struct create_tag : public create_tag_class {};
|
||||
typedef struct create_tag {
|
||||
create_tag_class mBase;
|
||||
} create_tag;
|
||||
|
||||
extern "C" {
|
||||
|
||||
void fpcCtTg_ToCreateQ(create_tag_class* pTag);
|
||||
void fpcCtTg_CreateQTo(create_tag_class* pTag);
|
||||
int fpcCtTg_Init(create_tag* pTag, void* pUserData);
|
||||
s32 fpcCtTg_Init(create_tag* pTag, void* pUserData);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,9 +8,9 @@ struct base_process_class;
|
||||
|
||||
extern "C" {
|
||||
|
||||
bool fpcCt_IsCreatingByID(unsigned int id);
|
||||
int fpcCt_IsDoing(base_process_class* pProc);
|
||||
void fpcCt_Abort(base_process_class* pProc);
|
||||
BOOL fpcCt_IsCreatingByID(u32 id);
|
||||
s32 fpcCt_IsDoing(struct base_process_class* pProc);
|
||||
BOOL fpcCt_Abort(struct base_process_class* pProc);
|
||||
void fpcCt_Handler(void);
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user