Match most of d_attention (#2016)

* Make decompctx work with MSL includes

* Match most of d_attention
This commit is contained in:
hatal175
2023-12-29 21:59:33 +02:00
committed by GitHub
parent 402666242b
commit 68e857b4da
5 changed files with 320 additions and 111 deletions
@@ -628,6 +628,11 @@ public:
void setRate(f32 rate) { mRate = rate; }
f32 getFrame() const { return mFrame; }
void setFrame(f32 frame) { mFrame = frame; }
void reset() {
mFrame = mStart;
mRate = 1.0f;
mState = 0;
}
private:
/* 0x04 */ u8 mAttribute;
+5 -5
View File
@@ -27,7 +27,7 @@ public:
fopAc_ac_c* convPId(unsigned int);
void init();
void proc();
void request(fopAc_ac_c*, u8, f32, f32, f32, s16, int);
int request(fopAc_ac_c*, u8, f32, f32, f32, s16, int);
fopAc_ac_c* getCatghTarget() { return convPId(mCatghTargetID); }
u8 getChangeItem() { return mChangeItem; }
@@ -80,11 +80,11 @@ public:
/* 80073CA4 */ fopAc_ac_c* convPId(unsigned int);
/* 80073CD4 */ void init();
/* 80073CEC */ void proc();
/* 80073D08 */ void request(fopAc_ac_c*, f32, f32, f32, s16, int);
/* 80073D08 */ int request(fopAc_ac_c*, f32, f32, f32, s16, int);
private:
u32 field_0x0;
u32 field_0x4;
s32 field_0x4;
f32 field_0x8;
u32 mLookTargetID;
}; // Size: 0x10
@@ -137,7 +137,7 @@ STATIC_ASSERT(sizeof(dAttDraw_c) == 0x178);
class dAttDraw_CallBack_c : public mDoExt_McaMorfCallBack1_c {
public:
/* 80070178 */ virtual void execute(u16, J3DTransformInfo*);
/* 80070178 */ virtual int execute(u16, J3DTransformInfo*);
};
struct dist_entry {
@@ -243,7 +243,7 @@ public:
/* 0x004 */ u32 mLockTargetID;
/* 0x008 */ dAttDraw_CallBack_c mpDrawCallback;
/* 0x00C */ u32 mPadNo;
/* 0x010 */ u32 field_0x10;
/* 0x010 */ u32 mPlayerAttentionFlags;
/* 0x014 */ u8 field_0x14[4];
/* 0x018 */ JKRSolidHeap* heap;
/* 0x01C */ cXyz mDrawAttnPos;
+2 -1
View File
@@ -38,6 +38,7 @@ public:
}
return stopped;
}
void reset() { mFrameCtrl.reset(); }
private:
/* 0x0 */ J3DFrameCtrl mFrameCtrl;
@@ -254,7 +255,7 @@ public:
class mDoExt_McaMorfCallBack1_c {
public:
virtual void execute(u16, J3DTransformInfo*) = 0;
virtual int execute(u16, J3DTransformInfo*) = 0;
};
class mDoExt_McaMorfCallBack2_c {
+292 -99
View File
File diff suppressed because it is too large Load Diff
+16 -6
View File
@@ -7,7 +7,15 @@ import re
script_dir = os.path.dirname(os.path.realpath(__file__))
root_dir = os.path.abspath(os.path.join(script_dir, ".."))
src_dir = os.path.join(root_dir, "src")
include_dir = os.path.join(root_dir, "include")
include_dirs = [
os.path.join(root_dir, "include"),
os.path.join(root_dir, "include/dolphin"),
os.path.join(root_dir, "libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include"),
os.path.join(root_dir, "libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include"),
os.path.join(root_dir, "libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include"),
os.path.join(root_dir, "libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include"),
os.path.join(root_dir, "libs/PowerPC_EABI_Support/Runtime/Inc"),
]
include_pattern = re.compile(r'^#include\s*[<"](.+?)[>"]$')
guard_pattern = re.compile(r'^#ifndef\s+(.*)$')
@@ -16,14 +24,16 @@ defines = set()
def import_h_file(in_file: str, r_path: str) -> str:
rel_path = os.path.join(root_dir, r_path, in_file)
inc_path = os.path.join(include_dir, in_file)
if os.path.exists(rel_path):
return import_c_file(rel_path)
elif os.path.exists(inc_path):
return import_c_file(inc_path)
else:
print("Failed to locate", in_file)
exit(1)
for inc_dir in include_dirs:
inc_path = os.path.join(inc_dir, in_file)
if os.path.exists(inc_path):
return import_c_file(inc_path)
else:
print("Failed to locate", in_file)
exit(1)
def import_c_file(in_file) -> str:
in_file = os.path.relpath(in_file, root_dir)