Skip to content

Commit

Permalink
d_a_alldie ready-ish, f_op_actor fill-out
Browse files Browse the repository at this point in the history
  • Loading branch information
magcius committed Sep 10, 2023
1 parent 95fdc41 commit 3831945
Show file tree
Hide file tree
Showing 4 changed files with 900 additions and 84 deletions.
9 changes: 9 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,15 @@ def NonMatching(obj_path, **kwargs):
Matching("f_pc/f_pc_profile_lst.cpp"),
],
},
{
"lib": "d_a_alldie",
"mw_version": "GC/1.3.2",
"cflags": CFLAGS_REL,
"host": True,
"objects": [
NonMatching("d/actor/d_a_alldie.cpp"),
],
},
]

# Tool versions
Expand Down
99 changes: 37 additions & 62 deletions include/f_op/f_op_actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

#include "SSystem/SComponent/c_sxyz.h"
#include "SSystem/SComponent/c_xyz.h"
#include "d/d_kankyo.h"
#include "f_pc/f_pc_leaf.h"
#include "global.h"

class J3DModel;

struct actor_method_class {
/* 0x00 */ leafdraw_method_class base;
Expand Down Expand Up @@ -94,8 +96,7 @@ struct actor_place {
struct actor_attention_types {
void setFlag(u32 flags) { mFlags |= flags; }

/* 0x00 */ u8 field_0x0[9];
/* 0x0A */ s16 field_0xa;
/* 0x00 */ u8 mDistances[8];
/* 0x0C */ cXyz mPosition;
/* 0x18 */ u32 mFlags;
}; // Size = 0x1C
Expand All @@ -121,40 +122,39 @@ class fopAc_ac_c : public leafdraw_class {
/* 0x0F0 */ JKRSolidHeap* mHeap;
/* 0x0F4 */ dEvt_info_c mEvtInfo;
/* 0x10C */ dKy_tevstr_c mTevStr;
/* 0x494 */ u16 mSetID;
/* 0x496 */ u8 mGroup;
/* 0x497 */ s8 mCullType;
/* 0x498 */ u8 mDemoActorId;
/* 0x499 */ s8 mSubtype;
/* 0x49A */ u8 mCarryType;
/* 0x49C */ u32 mStatus;
/* 0x4A0 */ u32 mCondition;
/* 0x4A4 */ u32 mParentPcId;
/* 0x4A8 */ actor_place orig;
/* 0x4BC */ actor_place next;
/* 0x4D0 */ actor_place current;
/* 0x4E4 */ csXyz shape_angle;
/* 0x4EC */ cXyz mScale;
/* 0x4F8 */ cXyz speed;
/* 0x504 */ MtxP mCullMtx;
/* 0x1BC */ u16 mSetID;
/* 0x1BE */ u8 mGroup;
/* 0x1BF */ s8 mCullType;
/* 0x1C0 */ u8 mDemoActorId;
/* 0x1C1 */ s8 mSubtype;
/* 0x1C2 */ u8 mCarryType;
/* 0x1C4 */ u32 mStatus;
/* 0x1C8 */ u32 mCondition;
/* 0x1CC */ u32 mParentPcId;
/* 0x1D0 */ actor_place orig;
/* 0x1E4 */ actor_place next;
/* 0x1F8 */ actor_place current;
/* 0x20C */ csXyz shape_angle;
/* 0x214 */ cXyz mScale;
/* 0x220 */ cXyz speed;
/* 0x22C */ MtxP mCullMtx;
union {
/* 0x508 */ cull_box mBox;
/* 0x508 */ cull_sphere mSphere;
/* 0x230 */ cull_box mBox;
/* 0x230 */ cull_sphere mSphere;
} mCull;
/* 0x520 */ f32 mCullSizeFar;
/* 0x524 */ J3DModel* model;
/* 0x528 */ dJntCol_c* mJntCol;
/* 0x52C */ f32 speedF;
/* 0x530 */ f32 mGravity;
/* 0x534 */ f32 mMaxFallSpeed;
/* 0x538 */ cXyz mEyePos;
/* 0x544 */ actor_attention_types mAttentionInfo;
/* 0x560 */ s16 field_0x560;
/* 0x562 */ s16 mHealth;
/* 0x564 */ u8 field_0x564;
/* 0x565 */ u8 field_0x565;
/* 0x566 */ u8 field_0x566;
/* 0x567 */ s8 field_0x567;
/* 0x248 */ f32 mCullSizeFar;
/* 0x24C */ J3DModel* model;
/* 0x250 */ dJntCol_c* mJntCol;
/* 0x254 */ f32 speedF;
/* 0x258 */ f32 mGravity;
/* 0x25C */ f32 mMaxFallSpeed;
/* 0x260 */ cXyz mEyePos;
/* 0x26C */ actor_attention_types mAttentionInfo;
/* 0x284 */ s8 mMaxHealth;
/* 0x285 */ s8 mHealth;
/* 0x288 */ s32 mItemTableIdx;
/* 0x28C */ u8 mItemStealNum;
/* 0x28D */ u8 mItemStealLeft;

fopAc_ac_c();
~fopAc_ac_c();
Expand All @@ -164,36 +164,11 @@ class fopAc_ac_c : public leafdraw_class {
const cXyz& getPosition() const { return current.pos; }
const csXyz& getAngle() const { return current.angle; }
s8 getRoomNo() const { return current.roomNo; }
}; // Size: 0x568
}; // Size: 0x290

STATIC_ASSERT(sizeof(fopAc_ac_c) == 0x568);
STATIC_ASSERT(sizeof(fopAc_ac_c) == 0x290);

class fopEn_enemy_c : public fopAc_ac_c {
public:
bool initBallModel();
bool checkBallModelDraw();
void setBallModelEffect(dKy_tevstr_c*);
void drawBallModel(dKy_tevstr_c*);

bool checkWolfNoLock() const { return mFlags & 0x200; }
bool checkHeadLockFlg() const { return mFlags & 0x80; }
bool checkDownFlg() const { return mFlags & 0x1; }
cXyz& getDownPos() { return mDownPos; }

/* 0x568 */ cXyz mDownPos;
/* 0x574 */ cXyz mHeadLockPos;
/* 0x580 */ J3DModel* mBallModel;
/* 0x584 */ J3DAnmTextureSRTKey* mBtk;
/* 0x588 */ J3DAnmTevRegKey* mBrk;
/* 0x58C */ u8 field_0x58c;
/* 0x58D */ u8 mThrowMode;
/* 0x58E */ u16 mFlags;
/* 0x590 */ f32 field_0x590;
/* 0x594 */ u32 mEffectID1;
/* 0x598 */ u32 mEffectID2;
/* 0x59C */ u32 mMidnaBindID[3];
/* 0x5A8 */ u8 field_0x5a8;
}; // Size: 0x5AC
class fopEn_enemy_c;

s32 fopAc_IsActor(void* actor);

Expand Down
Loading

0 comments on commit 3831945

Please sign in to comment.