mirror of
https://github.com/zeldaret/tp
synced 2026-07-08 14:36:36 -04:00
d_a_demo00 OK (#2817)
* Misc small matches * Add J3DFrameCtrl::EMode_NULL enum * Improve weak bss fakematch and remove a functionvalue fakematch * demo00 OK
This commit is contained in:
@@ -919,11 +919,12 @@ public:
|
||||
class J3DFrameCtrl {
|
||||
public:
|
||||
enum Attribute_e {
|
||||
EMode_NONE,
|
||||
EMode_RESET,
|
||||
EMode_LOOP,
|
||||
EMode_REVERSE,
|
||||
EMode_LOOP_REVERSE,
|
||||
/* -1 */ EMode_NULL = -1,
|
||||
/* 0x0 */ EMode_NONE,
|
||||
/* 0x1 */ EMode_RESET,
|
||||
/* 0x2 */ EMode_LOOP,
|
||||
/* 0x3 */ EMode_REVERSE,
|
||||
/* 0x4 */ EMode_LOOP_REVERSE,
|
||||
};
|
||||
|
||||
J3DFrameCtrl() { this->init(0); }
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
static J3DMtxCalc* mCurrentMtxCalc;
|
||||
|
||||
u8 getKind() { return mKind & 15; }
|
||||
u8 getKind() const { return mKind & 15; }
|
||||
|
||||
private:
|
||||
friend struct J3DJointFactory;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
|
||||
class TFunctionValueAttribute_refer : public JGadget::TVector_pointer<TFunctionValue*> {
|
||||
public:
|
||||
inline TFunctionValueAttribute_refer();
|
||||
TFunctionValueAttribute_refer() : JGadget::TVector_pointer<TFunctionValue*>(JGadget::TAllocator<void*>()) {}
|
||||
~TFunctionValueAttribute_refer() {}
|
||||
|
||||
/* 802816E8 */ void refer_initialize();
|
||||
|
||||
@@ -7,13 +7,10 @@
|
||||
|
||||
struct demo_s1_ke_s {
|
||||
public:
|
||||
/* 804A4420 */ ~demo_s1_ke_s();
|
||||
/* 804A86B4 */ demo_s1_ke_s();
|
||||
|
||||
/* 0x000 */ cXyz field_0x0[16];
|
||||
/* 0x0C0 */ cXyz field_0xc0[16];
|
||||
/* 0x180 */ cXyz field_0x180;
|
||||
};
|
||||
}; // Size: 0x18C
|
||||
|
||||
class daDemo00_resID_c {
|
||||
public:
|
||||
@@ -28,20 +25,12 @@ public:
|
||||
/* 0x18 */ u32 field_0x18;
|
||||
/* 0x1C */ u32 field_0x1c;
|
||||
/* 0x20 */ u32 field_0x20;
|
||||
};
|
||||
|
||||
class daDemo00_model_c {
|
||||
public:
|
||||
/* 804A4338 */ void reset();
|
||||
|
||||
/* 0x00 */ daDemo00_resID_c field_0x0;
|
||||
/* 0x24 */ daDemo00_resID_c mID;
|
||||
};
|
||||
}; // Size: 0x24
|
||||
|
||||
struct daDemo00_bgc_c {
|
||||
/* 0x00 */ dBgS_GndChk mGndChk;
|
||||
/* 0x54 */ f32 field_0x54;
|
||||
};
|
||||
}; // Size: 0x58
|
||||
|
||||
struct daDemo00_shadow_c {
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
@@ -49,7 +38,25 @@ struct daDemo00_shadow_c {
|
||||
/* 0x10 */ cXyz field_0x10;
|
||||
/* 0x1C */ f32 field_0x1c;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
};
|
||||
}; // Size: 0x24
|
||||
|
||||
class daDemo00_model_c {
|
||||
public:
|
||||
/* 804A4338 */ void reset();
|
||||
|
||||
/* 0x00 */ daDemo00_resID_c mID;
|
||||
/* 0x24 */ mDoExt_McaMorfSO* mpModelMorf;
|
||||
/* 0x28 */ J3DModel* field_0x5d4;
|
||||
/* 0x2C */ mDoExt_invisibleModel* field_0x5d8;
|
||||
/* 0x30 */ mDoExt_bpkAnm* mpBpkAnm;
|
||||
/* 0x34 */ mDoExt_btpAnm* mpBtpAnm;
|
||||
/* 0x38 */ mDoExt_btkAnm* mpBtkAnm;
|
||||
/* 0x3C */ mDoExt_brkAnm* mpBrkAnm;
|
||||
/* 0x40 */ daDemo00_shadow_c* mShadow;
|
||||
/* 0x44 */ J3DDeformData* mDeformData;
|
||||
/* 0x48 */ mDoExt_blkAnm* mpBlkAnm;
|
||||
/* 0x4C */ daDemo00_bgc_c* mBgc;
|
||||
}; // Size: 0x50
|
||||
|
||||
/**
|
||||
* @ingroup actors-unsorted
|
||||
@@ -73,34 +80,20 @@ public:
|
||||
/* 804A6F94 */ int draw();
|
||||
/* 804A7BA8 */ int execute();
|
||||
|
||||
int create() {
|
||||
dKy_tevstr_init(&tevStr, dComIfGp_roomControl_getStayNo(), 0xFF);
|
||||
tevStr.field_0x384 = 1;
|
||||
mSound.init(&eyePos, NULL, 10, 1);
|
||||
setAction(&daDemo00_c::actStandby);
|
||||
mModel.field_0x0.reset();
|
||||
field_0x6a0 = -1;
|
||||
return 4;
|
||||
}
|
||||
int create();
|
||||
|
||||
void setAction(actionFunc action) { field_0x57c = action; }
|
||||
void action(dDemo_actor_c* actor) { (this->*field_0x57c)(actor); }
|
||||
|
||||
/* 0x0568 */ cXyz field_0x568;
|
||||
/* 0x0574 */ csXyz field_0x574;
|
||||
#ifdef DEBUG
|
||||
cXyz debug_field_0x570;
|
||||
csXyz debug_field_0x57c;
|
||||
#endif
|
||||
/* 0x057C */ actionFunc field_0x57c;
|
||||
/* 0x0584 */ daDemo00_model_c mModel;
|
||||
/* 0x05D0 */ mDoExt_McaMorfSO* mpModelMorf;
|
||||
/* 0x05D4 */ J3DModel* field_0x5d4;
|
||||
/* 0x05D8 */ mDoExt_invisibleModel* field_0x5d8;
|
||||
/* 0x05DC */ mDoExt_bpkAnm* mpBpkAnm;
|
||||
/* 0x05E0 */ mDoExt_btpAnm* mpBtpAnm;
|
||||
/* 0x05E4 */ mDoExt_btkAnm* mpBtkAnm;
|
||||
/* 0x05E8 */ mDoExt_brkAnm* mpBrkAnm;
|
||||
/* 0x05EC */ daDemo00_shadow_c* mShadow;
|
||||
/* 0x05F0 */ J3DDeformData* mDeformData;
|
||||
/* 0x05F4 */ mDoExt_blkAnm* mpBlkAnm;
|
||||
/* 0x05F8 */ daDemo00_bgc_c* mBgc;
|
||||
/* 0x0588 */ daDemo00_resID_c field_0x588;
|
||||
/* 0x05AC */ daDemo00_model_c mModel;
|
||||
/* 0x05FC */ Z2Creature mSound;
|
||||
/* 0x068C */ u32 field_0x68c;
|
||||
/* 0x0690 */ u8 field_0x690[0x694 - 0x690];
|
||||
@@ -123,9 +116,9 @@ public:
|
||||
/* 0x06AC */ u8 field_0x6ac;
|
||||
/* 0x06AD */ u8 field_0x6ad;
|
||||
/* 0x06AE */ u8 field_0x6ae;
|
||||
/* 0x06AF */ s8 field_0x6af;
|
||||
/* 0x06B0 */ s8 field_0x6b0;
|
||||
/* 0x06B1 */ s8 field_0x6b1;
|
||||
/* 0x06AF */ u8 field_0x6af;
|
||||
/* 0x06B0 */ u8 field_0x6b0;
|
||||
/* 0x06B1 */ u8 field_0x6b1;
|
||||
/* 0x06B2 */ u8 field_0x6b2;
|
||||
/* 0x06B3 */ s8 field_0x6b3;
|
||||
/* 0x06B4 */ s8 field_0x6b4;
|
||||
@@ -143,5 +136,4 @@ public:
|
||||
|
||||
STATIC_ASSERT(sizeof(daDemo00_c) == 0x292c);
|
||||
|
||||
|
||||
#endif /* D_A_DEMO00_H */
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
/* 80841084 */ void setBoarHit(fopAc_ac_c*, int);
|
||||
/* 8084116C */ void savePos();
|
||||
/* 808411D0 */ int callHorseSubstance(cXyz const*);
|
||||
/* 80841468 */ int setHorsePosAndAngleSubstance(cXyz const*, s16);
|
||||
/* 80841468 */ void setHorsePosAndAngleSubstance(cXyz const*, s16);
|
||||
/* 808415B4 */ BOOL checkPlayerHeavy();
|
||||
/* 80841628 */ void setTgCoGrp(u32, u32);
|
||||
/* 80841698 */ void onRideFlgSubstance();
|
||||
@@ -468,7 +468,7 @@ public:
|
||||
/* 0x18BC */ void (daHorse_c::*m_setReinPosHand)(int);
|
||||
/* 0x18C8 */ void (daHorse_c::*m_setReinPosNormal)();
|
||||
/* 0x18D4 */ int (daHorse_c::*m_callHorse)(const cXyz*);
|
||||
/* 0x18E0 */ int (daHorse_c::*m_setHorsePosAngle)(const cXyz* i_pos, s16 i_angle);
|
||||
/* 0x18E0 */ void (daHorse_c::*m_setHorsePosAngle)(const cXyz* i_pos, s16 i_angle);
|
||||
/* 0x18EC */ void (daHorse_c::*m_onRideFlg)();
|
||||
/* 0x18F8 */ void (daHorse_c::*m_offRideFlg)();
|
||||
};
|
||||
|
||||
@@ -112,9 +112,9 @@ public:
|
||||
|
||||
static char* mCutNameList[2];
|
||||
static cutFunc mCutList[2];
|
||||
static u16 mEvtBitLabels[6];
|
||||
static u16 mTmpBitLabels[6];
|
||||
static int mSceneChangeNoTable[48];
|
||||
static const u16 mEvtBitLabels[6];
|
||||
static const u16 mTmpBitLabels[6];
|
||||
static const int mSceneChangeNoTable[48];
|
||||
static queryFunc mQueries[48];
|
||||
|
||||
private:
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ public:
|
||||
void setModel(J3DModel* p_model) { mModel = p_model; }
|
||||
BOOL checkEnable(u16 flag) { return mFlags & flag; }
|
||||
void onEnable(u16 flag) { mFlags |= flag; }
|
||||
void offEnable(u16 flag) { mFlags &= ~flag; }
|
||||
void offEnable(u16 flag) { mFlags &= (u16)~flag; }
|
||||
cXyz& getTrans() { return mTrans; }
|
||||
cXyz& getScale() { return mScale; }
|
||||
csXyz& getRatate() { return mRotate; }
|
||||
|
||||
@@ -1,23 +1,36 @@
|
||||
#ifndef WEAK_BSS_1109_TO_1009_H
|
||||
#define WEAK_BSS_1109_TO_1009_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
// Fake header.
|
||||
// These are some kind of weak objects that get included in the .bss sections of several TUs.
|
||||
// They each have size 1, and alignment 1 in TWW's debug maps, but alignment 4 in the non-debug maps.
|
||||
// Their true source is currently unknown, so include this header in TUs that need them to match for now.
|
||||
|
||||
static u8 lit_1009[1];
|
||||
static u8 lit_1010[1];
|
||||
static u8 lit_1012[1];
|
||||
static u8 lit_1014[1];
|
||||
static u8 lit_1052[1];
|
||||
static u8 lit_1053[1];
|
||||
static u8 lit_1055[1];
|
||||
static u8 lit_1057[1];
|
||||
static u8 lit_1094[1];
|
||||
static u8 lit_1095[1];
|
||||
static u8 lit_1097[1];
|
||||
static u8 lit_1099[1];
|
||||
static u8 lit_1104[1];
|
||||
static u8 lit_1105[1];
|
||||
static u8 lit_1107[1];
|
||||
static u8 lit_1109[1];
|
||||
// A possible origin for one of these could be the constructor of TFunctionValueAttribute_refer in
|
||||
// functionvalue.h. That constructor includes `JGadget::TAllocator<void*>()` in it, which produces
|
||||
// one weak bss object that has the correct size and alignment. However, we need 16 of them, while
|
||||
// that only creates one.
|
||||
|
||||
#include "JSystem/JStudio/JStudio/functionvalue.h" // IWYU pragma: keep
|
||||
|
||||
// They each have size 1, and alignment 1 in TWW's debug maps, but alignment 4 in the non-debug maps.
|
||||
static inline void dummy_bss_1009_to_1109() {
|
||||
// JGadget::TAllocator<void*>(); // @1109 // Already covered by TFunctionValueAttribute_refer's ctor
|
||||
JGadget::TAllocator<void*>(); // @1107
|
||||
JGadget::TAllocator<void*>(); // @1105
|
||||
JGadget::TAllocator<void*>(); // @1104
|
||||
JGadget::TAllocator<void*>(); // @1099
|
||||
JGadget::TAllocator<void*>(); // @1097
|
||||
JGadget::TAllocator<void*>(); // @1095
|
||||
JGadget::TAllocator<void*>(); // @1094
|
||||
JGadget::TAllocator<void*>(); // @1057
|
||||
JGadget::TAllocator<void*>(); // @1055
|
||||
JGadget::TAllocator<void*>(); // @1053
|
||||
JGadget::TAllocator<void*>(); // @1052
|
||||
JGadget::TAllocator<void*>(); // @1014
|
||||
JGadget::TAllocator<void*>(); // @1012
|
||||
JGadget::TAllocator<void*>(); // @1010
|
||||
JGadget::TAllocator<void*>(); // @1009
|
||||
}
|
||||
|
||||
#endif // WEAK_BSS_1109_TO_1009_H
|
||||
|
||||
Reference in New Issue
Block a user