Skip to content

Commit

Permalink
d_a_alink work / lv4digsand done / e_s1 matched (#2224)
Browse files Browse the repository at this point in the history
* d_a_alink work / d_a_obj_lv4digsand done

* d_a_e_s1 matched, not linked

* d_a_e_s1 documentation
  • Loading branch information
TakaRikka authored Oct 25, 2024
1 parent 5650c7f commit 8a08025
Show file tree
Hide file tree
Showing 31 changed files with 4,640 additions and 2,638 deletions.
16 changes: 8 additions & 8 deletions config/GZ2E01/rels/d_a_obj_lv4digsand/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ mode_init_end__16daObjL4DigSand_cFv = .text:0x0000060C; // type:function size:0x
mode_end__16daObjL4DigSand_cFv = .text:0x00000660; // type:function size:0x4 scope:global
Draw__16daObjL4DigSand_cFv = .text:0x00000664; // type:function size:0xA4 scope:global
Delete__16daObjL4DigSand_cFv = .text:0x00000708; // type:function size:0x34 scope:global
daObjL4DigSand_create1st__FP16daObjL4DigSand_c = .text:0x0000073C; // type:function size:0x12C scope:global
daObjL4DigSand_create1st__FP16daObjL4DigSand_c = .text:0x0000073C; // type:function size:0x12C scope:local
__dt__8cM3dGCylFv = .text:0x00000868; // type:function size:0x48 scope:global
__dt__8cM3dGAabFv = .text:0x000008B0; // type:function size:0x48 scope:global
__dt__10dCcD_GSttsFv = .text:0x000008F8; // type:function size:0x5C scope:global
__dt__12dBgS_AcchCirFv = .text:0x00000954; // type:function size:0x70 scope:global
__dt__12dBgS_ObjAcchFv = .text:0x000009C4; // type:function size:0x70 scope:global
daObjL4DigSand_MoveBGDelete__FP16daObjL4DigSand_c = .text:0x00000A34; // type:function size:0x20 scope:global
daObjL4DigSand_MoveBGExecute__FP16daObjL4DigSand_c = .text:0x00000A54; // type:function size:0x20 scope:global
daObjL4DigSand_MoveBGDraw__FP16daObjL4DigSand_c = .text:0x00000A74; // type:function size:0x2C scope:global
daObjL4DigSand_MoveBGDelete__FP16daObjL4DigSand_c = .text:0x00000A34; // type:function size:0x20 scope:local
daObjL4DigSand_MoveBGExecute__FP16daObjL4DigSand_c = .text:0x00000A54; // type:function size:0x20 scope:local
daObjL4DigSand_MoveBGDraw__FP16daObjL4DigSand_c = .text:0x00000A74; // type:function size:0x2C scope:local
__dt__10cCcD_GSttsFv = .text:0x00000AA0; // type:function size:0x48 scope:global
cLib_calcTimer<Uc>__FPUc = .text:0x00000AE8; // type:function size:0x1C scope:global
@20@__dt__14dBgS_ObjGndChkFv = .text:0x00000B04; // type:function size:0x8 scope:local
Expand All @@ -42,14 +42,14 @@ _dtors = .dtors:0x00000000; // type:label scope:global
@3767 = .rodata:0x0000000C; // type:object size:0x4 scope:local
@stringBase0 = .rodata:0x00000010; // type:object size:0x8 scope:local data:string_table
...data.0 = .data:0x00000000; // type:label scope:local
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:local
@1787 = .data:0x0000000C; // type:object size:0x4 scope:local
l_arcName = .data:0x00000020; // type:object size:0x4 scope:global data:4byte
l_arcName = .data:0x00000020; // type:object size:0x4 scope:local data:4byte
@3715 = .data:0x00000024; // type:object size:0xC scope:local
@3716 = .data:0x00000030; // type:object size:0xC scope:local
@3717 = .data:0x0000003C; // type:object size:0xC scope:local
l_func$3714 = .data:0x00000048; // type:object size:0x24 scope:local
daObjL4DigSand_METHODS = .data:0x0000006C; // type:object size:0x20 scope:global
daObjL4DigSand_METHODS = .data:0x0000006C; // type:object size:0x20 scope:local
g_profile_Obj_Lv4DigSand = .data:0x0000008C; // type:object size:0x30 scope:global
__vt__12dBgS_AcchCir = .data:0x000000BC; // type:object size:0xC scope:global
__vt__10cCcD_GStts = .data:0x000000C8; // type:object size:0xC scope:global
Expand All @@ -59,4 +59,4 @@ __vt__8cM3dGAab = .data:0x000000EC; // type:object size:0xC scope:global
__vt__12dBgS_ObjAcch = .data:0x000000F8; // type:object size:0x24 scope:global
__vt__14dBgS_ObjGndChk = .data:0x0000011C; // type:object size:0x30 scope:global
__vt__16daObjL4DigSand_c = .data:0x0000014C; // type:object size:0x28 scope:global
lbl_533_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
lbl_533_bss_0 = .bss:0x00000000; // type:object size:0x1 scope:local data:byte
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ def MatchingFor(*versions):
ActorRel(NonMatching, "d_a_obj_lv4SlideWall"),
ActorRel(NonMatching, "d_a_obj_lv4bridge"),
ActorRel(NonMatching, "d_a_obj_lv4chandelier"),
ActorRel(NonMatching, "d_a_obj_lv4digsand"),
ActorRel(Matching, "d_a_obj_lv4digsand"),
ActorRel(Matching, "d_a_obj_lv4floor"),
ActorRel(Matching, "d_a_obj_lv4gear"),
ActorRel(NonMatching, "d_a_obj_lv4prelvtr"),
Expand Down
22 changes: 14 additions & 8 deletions include/d/actor/d_a_alink.h
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ class daAlink_c : public daPy_py_c {
FTANM_UNK_7B = 0x7B,
FTANM_UNK_7C = 0x7C,
FTANM_UNK_8A = 0x8A,
FTANM_UNK_8B = 0x8B,
FTANM_UNK_8D = 0x8D,
FTANM_UNK_8E = 0x8E,
FTANM_UNK_8F = 0x8F,
Expand All @@ -682,6 +683,7 @@ class daAlink_c : public daPy_py_c {
FTANM_UNK_95 = 0x95,
FTANM_UNK_96 = 0x96,
FTANM_UNK_97 = 0x97,
FTANM_UNK_99 = 0x99,
FTANM_UNK_9A = 0x9A,
FTANM_UNK_9B = 0x9B,
FTANM_UNK_9C = 0x9C,
Expand Down Expand Up @@ -1309,7 +1311,7 @@ class daAlink_c : public daPy_py_c {
/* 800A39B8 */ void handBgCheck();
/* 800A3C8C */ JKRHeap* setItemHeap();
/* 800A3CE4 */ void setIdxMask(u16*, u16*);
/* 800A3D0C */ void* getAnimeResource(daPy_anmHeap_c*, u16, u32);
/* 800A3D0C */ J3DAnmTransform* getAnimeResource(daPy_anmHeap_c*, u16, u32);
/* 800A3D7C */ J3DModel* initModel(J3DModelData*, u32, u32);
/* 800A3E30 */ J3DModel* initModel(u16, u32);
/* 800A3E98 */ J3DModel* initModelEnv(u16, u32);
Expand Down Expand Up @@ -2001,7 +2003,7 @@ class daAlink_c : public daPy_py_c {
/* 800E7460 */ int procPickUp();
/* 800E75EC */ int procPickPutInit(int);
/* 800E76E0 */ int procPickPut();
/* 800E7894 */ void checkSetChainPullAnime(s16);
/* 800E7894 */ BOOL checkSetChainPullAnime(s16);
/* 800E794C */ s16 getChainStickAngleY(s16) const;
/* 800E7994 */ u8 checkChainEmphasys();
/* 800E79F8 */ BOOL searchFmChainPos();
Expand Down Expand Up @@ -2361,8 +2363,8 @@ class daAlink_c : public daPy_py_c {
/* 80102B1C */ int checkSwimAction(int);
/* 80103058 */ int checkSwimUpAction();
/* 801032C8 */ void swimOutAfter(int);
/* 80103398 */ bool checkSwimFall();
/* 801033CC */ void checkSwimOutAction();
/* 80103398 */ BOOL checkSwimFall();
/* 801033CC */ int checkSwimOutAction();
/* 80103698 */ void setSwimMoveAnime();
/* 80103EE0 */ bool checkSwimButtonAccept();
/* 80103F08 */ bool checkUpSwimButtonAccept();
Expand Down Expand Up @@ -2743,12 +2745,12 @@ class daAlink_c : public daPy_py_c {
/* 80128F5C */ void setWolfAtnMoveDirection();
/* 80129114 */ void setBlendWolfAtnMoveAnime(f32);
/* 8012933C */ void setBlendWolfAtnBackMoveAnime(f32);
/* 8012948C */ void setDoubleAnimeWolf(f32, f32, f32, daAlink_c::daAlink_WANM,
/* 8012948C */ int setDoubleAnimeWolf(f32, f32, f32, daAlink_c::daAlink_WANM,
daAlink_c::daAlink_WANM, int, f32);
/* 80129678 */ void setSingleAnimeWolfBase(daAlink_c::daAlink_WANM);
/* 801296A8 */ void setSingleAnimeWolfBaseMorf(daAlink_c::daAlink_WANM, f32);
/* 801296D8 */ void setSingleAnimeWolfBaseSpeed(daAlink_c::daAlink_WANM, f32, f32);
/* 80129704 */ void setSingleAnimeWolf(daAlink_c::daAlink_WANM, f32, f32, s16, f32);
/* 80129704 */ int setSingleAnimeWolf(daAlink_c::daAlink_WANM, f32, f32, s16, f32);
/* 80129848 */ void setSingleAnimeWolfParam(daAlink_c::daAlink_WANM, daAlinkHIO_anm_c const*);
/* 8012987C */ int checkWolfLandAction(int);
/* 80129958 */ BOOL checkMidnaUseAbility() const;
Expand All @@ -2758,7 +2760,7 @@ class daAlink_c : public daPy_py_c {
/* 8012A02C */ BOOL wolfSideBgCheck(s16);
/* 8012A228 */ BOOL checkWolfAttackReverse(int);
/* 8012A330 */ int checkWolfBarrierHitReverse();
/* 8012A41C */ bool checkWolfBarrierWallHit(cBgS_PolyInfo&);
/* 8012A41C */ BOOL checkWolfBarrierWallHit(cBgS_PolyInfo&);
/* 8012A498 */ void wolfBgCheck();
/* 8012ACCC */ void changeWolfBlendRate(int);
/* 8012AD1C */ void setWolfFootMatrix();
Expand Down Expand Up @@ -3572,7 +3574,7 @@ class daAlink_c : public daPy_py_c {
/* 0x02154 */ J3DAnmTexPattern* field_0x2154;
/* 0x02158 */ J3DAnmTextureSRTKey* mpFaceBtk;
/* 0x0215C */ daPy_frameCtrl_c* field_0x215c;
/* 0x02160 */ s8* field_0x2160;
/* 0x02160 */ u16* field_0x2160;
/* 0x02164 */ mDoExt_bckAnm field_0x2164;
/* 0x02180 */ daAlink_matAnm_c* field_0x2180[2];
/* 0x02188 */ dEyeHL_c mEyeHL1;
Expand Down Expand Up @@ -3750,16 +3752,20 @@ class daAlink_c : public daPy_py_c {
union {
s16 field_0x300a;
s16 mBoardSwordChargeTime;
s16 mDigActorName;
} /* 0x0300A */ mProcVar1;
union {
s16 field_0x300c;
s16 mPuzzleAimAngle;
s16 mDigType;
} /* 0x0300C */ mProcVar2;
union {
s16 field_0x300e;
s16 mDigChangeArea;
} /* 0x0300E */ mProcVar3;
union {
s16 field_0x3010;
s16 mDigExitID;
} /* 0x03010 */ mProcVar4;
union {
s16 field_0x3012;
Expand Down
93 changes: 84 additions & 9 deletions include/d/actor/d_a_e_s1.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#ifndef D_A_E_S1_H
#define D_A_E_S1_H

#include "f_op/f_op_actor_mng.h"
#include "Z2AudioLib/Z2Creature.h"
#include "d/d_jnt_col.h"
#include "d/d_bg_s_acch.h"
#include "d/d_cc_d.h"
#include "d/d_cc_uty.h"

struct dPath;

struct s1_ke_s {
/* 0x000 */ cXyz field_0x0[16];
/* 0x0C0 */ cXyz field_0xc0[16];
/* 0x180 */ cXyz field_0x180;
};

/**
* @ingroup actors-enemies
Expand All @@ -11,22 +25,83 @@
*
*/
class e_s1_class : public fopEn_enemy_c {
private:
/* 0x5ac */ u8 field_0x5ac[0x3084 - 0x5ac];
public:
/* 0x05AC */ request_of_phase_process_class mPhase;
/* 0x05B4 */ u8 mRoofSpawn;
/* 0x05B5 */ u8 mPrm1;
/* 0x05B6 */ u8 mGroupID;
/* 0x05B7 */ u8 mSwBit;
/* 0x05B8 */ u8 field_0x5B8[0x05BC - 0x05B8];
/* 0x05BC */ dPath* mpPath;
/* 0x05C0 */ s8 mCurrentPathPointNo;
/* 0x05C1 */ s8 mPathDirection;
/* 0x05C4 */ cXyz mPathTargetPos;
/* 0x05D0 */ s16 mTargetAngle;
/* 0x05D4 */ mDoExt_McaMorfSO* mpMorf;
/* 0x05D8 */ int mAnm;
/* 0x05DC */ u8 field_0x5DC[0x05E0 - 0x05DC];
/* 0x05E0 */ Z2CreatureEnemy mSound;
/* 0x0684 */ dJntCol_c mJntCol;
/* 0x0694 */ s16 mCounter;
/* 0x0696 */ s16 mAction;
/* 0x0698 */ s16 mMode;
/* 0x069A */ s8 mDrawShadow;
/* 0x069C */ u32 mShadowKey;
/* 0x06A0 */ s16 mTimers[4];
/* 0x06A8 */ s16 mHitInvincibilityTimer;
/* 0x06AA */ s16 field_0x6aa;
/* 0x06AC */ f32 field_0x6ac;
/* 0x06B0 */ s16 field_0x6b0;
/* 0x06B2 */ s16 field_0x6b2;
/* 0x06B4 */ u8 field_0x6B4[0x06B6 - 0x06B4];
/* 0x06B6 */ s16 field_0x6b6;
/* 0x06B8 */ s8 mIsSlowAttack;
/* 0x06B9 */ s8 field_0x6b9;
/* 0x06BA */ s8 field_0x6ba;
/* 0x06BB */ s8 field_0x6bb;
/* 0x06BC */ dBgS_AcchCir mAcchCir;
/* 0x06FC */ dBgS_ObjAcch mAcch;
/* 0x08D4 */ dCcD_Stts mCcStts;
/* 0x0910 */ dCcD_Sph mCcSph[3];
/* 0x0CB8 */ dCcD_Sph mCcAtSph;
/* 0x0DF0 */ dCcU_AtInfo mAtInfo;
/* 0x0E14 */ s1_ke_s mKe[22];
/* 0x301C */ mDoExt_3DlineMat0_c mLineMat;
/* 0x3038 */ s16 mDemoMode;
/* 0x303A */ s16 mDemoTimer;
/* 0x303C */ cXyz mDemoCamEye;
/* 0x3048 */ cXyz mDemoCamCenter;
/* 0x3054 */ f32 field_0x3054;
/* 0x3058 */ f32 field_0x3058;
/* 0x305C */ f32 mDemoCamBank;
/* 0x3060 */ f32 field_0x3060;
/* 0x3064 */ f32 mSearchRange;
/* 0x3068 */ f32 field_0x3068;
/* 0x306C */ s8 field_0x306c;
/* 0x306D */ u8 field_0x306D[0x307C - 0x306D];
/* 0x307C */ u32 mBodyEffEmtrID;
/* 0x3080 */ u8 mInitHIO;
};

STATIC_ASSERT(sizeof(e_s1_class) == 0x3084);

class daE_S1_HIO_c {
public:
/* 8077AB8C */ daE_S1_HIO_c();
/* 80780840 */ ~daE_S1_HIO_c();
};
/* 80780840 */ virtual ~daE_S1_HIO_c() {}

struct s1_ke_s {
/* 807803F4 */ ~s1_ke_s();
/* 80780470 */ s1_ke_s();
/* 0x04 */ s8 field_0x4;
/* 0x08 */ f32 mBaseSize;
/* 0x0C */ f32 mMoveSpeed;
/* 0x10 */ u8 field_0x10[0x14 - 0x10];
/* 0x14 */ f32 mDashSpeed;
/* 0x18 */ f32 field_0x18;
/* 0x1C */ s16 mFallSEWaitTime;
/* 0x1E */ s16 mAllDeadWaitTime;
/* 0x20 */ f32 mReactionDist;
/* 0x24 */ f32 mReactionAngle;
/* 0x28 */ s16 mReactionTime;
/* 0x2A */ u8 mInvincible;
};



#endif /* D_A_E_S1_H */
6 changes: 6 additions & 0 deletions include/d/actor/d_a_midna.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class daMidna_c : public fopAc_ac_c {
FLG0_UNK_8000000 = 0x8000000,
FLG0_NPC_NEAR = 0x100000,
FLG0_NPC_FAR = 0x40000,
FLG0_UNK_20000 = 0x20000,
FLG0_NO_INPUT = 0x4000,
FLG0_NO_DRAW = 0x2000,
FLG0_UNK_400 = 0x400,
Expand Down Expand Up @@ -118,6 +119,11 @@ class daMidna_c : public fopAc_ac_c {
BOOL checkWolfNoPos() const { return checkStateFlg0(FLG0_UNK_800); }
int checkMetamorphoseEnable() { return (this->*mpFunc)(); }
int checkShadowModelDrawDemoForce() const { return checkStateFlg1(FLG1_SHADOW_MODEL_DRAW_DEMO_FORCE); }

void setForceNeckAimPos(const cXyz& i_pos) {
onStateFlg0(FLG0_UNK_20000);
field_0x9c4 = i_pos;
}

void onTagWaitPosWarp(const cXyz* param_0) {
field_0x9ac = *param_0;
Expand Down
6 changes: 5 additions & 1 deletion include/d/actor/d_a_npc_moi.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ class daNpc_Moi_c : public fopAc_ac_c {
static void* mCutNameList[5];
static u8 mCutList[60];

bool chkSFight() { return field_0x166b == 1; }

private:
/* 0x568 */ u8 field_0x568[0x1674 - 0x568];
/* 0x0568 */ u8 field_0x568[0x166B - 0x568];
/* 0x166B */ u8 field_0x166b;
/* 0x166C */ u8 field_0x166c[0x1674 - 0x166C];
};

STATIC_ASSERT(sizeof(daNpc_Moi_c) == 0x1674);
Expand Down
1 change: 1 addition & 0 deletions include/d/actor/d_a_npc_tk.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class daNPC_TK_c : public fopAc_ac_c {
void setEventWolf() { mFlags |= 0x80; }
void setEvent() { mFlags |= 0x8; }
void setAway() { mFlags |= 2; }
void setAttack() { mFlags |= 1; }

void setHawkPath(u8 i_pathNo) {
if (i_pathNo != 0xFF) {
Expand Down
3 changes: 3 additions & 0 deletions include/d/actor/d_a_obj_digholl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class daObjDigholl_c : public fopAc_ac_c {
/* 80BDC7D8 */ int execute();
/* 80BDCB0C */ int draw();

void onDigStart() { field_0x568 = 1; }
s16 getSceneNum() const { return field_0x56c; }

private:
/* 0x568 */ u8 field_0x568;
/* 0x569 */ u8 field_0x569;
Expand Down
2 changes: 2 additions & 0 deletions include/d/actor/d_a_obj_digplace.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class daObjDigpl_c : public fopAc_ac_c {

u8 getSceneNum() { return (fopAcM_GetParam(this) >> 0xC) & 0xFF; }
int getItemNum() { return getSceneNum(); }
u8 getType() const { return mType; }
void onDigFlg() { mDigFlg = true; }
};

STATIC_ASSERT(sizeof(daObjDigpl_c) == 0x5C0);
Expand Down
4 changes: 2 additions & 2 deletions include/d/actor/d_a_obj_digsnow.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class daObjDigSnow_c : public dBgS_MoveBgActor {
/* 80BDD2B8 */ virtual int Delete();

u8 getSwNo() { return fopAcM_GetParamBit(this, 0, 8); }
void startDig() { mAction = ACTION_DIG_e; }
void endDig() { mAction = ACTION_END_e; }
void startDig() { mMode = ACTION_DIG_e; }
void endDig() { mMode = ACTION_END_e; }

private:
/* 0x5A0 */ request_of_phase_process_class mPhaseReq;
Expand Down
34 changes: 25 additions & 9 deletions include/d/actor/d_a_obj_lv4digsand.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define D_A_OBJ_LV4DIGSAND_H

#include "f_op/f_op_actor_mng.h"
#include "d/d_bg_s_movebg_actor.h"
#include "d/d_bg_s_acch.h"
#include "d/d_cc_d.h"

/**
* @ingroup actors-objects
Expand All @@ -11,26 +14,39 @@
* @details
*
*/
class daObjL4DigSand_c : public fopAc_ac_c {
class daObjL4DigSand_c : public dBgS_MoveBgActor {
public:
/* 80C66B18 */ void initBaseMtx();
/* 80C66B54 */ void setBaseMtx();
/* 80C66BC8 */ void Create();
/* 80C66C24 */ void CreateHeap();
/* 80C66C94 */ void create1st();
/* 80C66D40 */ void Execute(f32 (**)[3][4]);
/* 80C66C94 */ int create1st();
/* 80C66DD0 */ void action();
/* 80C66E74 */ void mode_init_wait();
/* 80C66E80 */ void mode_wait();
/* 80C66EAC */ void mode_init_dig();
/* 80C66FFC */ void mode_dig();
/* 80C670AC */ void mode_init_end();
/* 80C67100 */ void mode_end();
/* 80C67104 */ void Draw();
/* 80C671A8 */ void Delete();

private:
/* 0x568 */ u8 field_0x568[0x944 - 0x568];
/* 80C66C24 */ virtual int CreateHeap();
/* 80C66BC8 */ virtual int Create();
/* 80C66D40 */ virtual int Execute(f32 (**)[3][4]);
/* 80C67104 */ virtual int Draw();
/* 80C671A8 */ virtual int Delete();

u8 getSwNo() { return fopAcM_GetParamBit(this, 0, 8); }
void startDig() { field_0x941 = 1; }
void endDig() { field_0x941 = 2; }

/* 0x5A0 */ request_of_phase_process_class mPhase;
/* 0x5A8 */ J3DModel* mpModel;
/* 0x5AC */ dBgS_ObjAcch mAcch;
/* 0x784 */ dBgS_AcchCir mAcchCir;
/* 0x7C4 */ dCcD_Stts mCcStts;
/* 0x800 */ dCcD_Cyl mCcCyl;
/* 0x93C */ f32 mGroundY;
/* 0x940 */ u8 mMode;
/* 0x941 */ u8 field_0x941;
/* 0x942 */ u8 mTimer;
};

STATIC_ASSERT(sizeof(daObjL4DigSand_c) == 0x944);
Expand Down
Loading

0 comments on commit 8a08025

Please sign in to comment.