Skip to content

Commit

Permalink
d_a_obj_cwall almost matching (#2270)
Browse files Browse the repository at this point in the history
* d_a_obj_cwall almost matching

* d_a_obj_pdoor OK
  • Loading branch information
hatal175 authored Dec 28, 2024
1 parent ad2badc commit c429ce2
Show file tree
Hide file tree
Showing 8 changed files with 1,034 additions and 1,209 deletions.
20 changes: 10 additions & 10 deletions config/GZ2E01/rels/d_a_obj_pdoor/symbols.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_prolog = .text:0x00000000; // type:function size:0x2C scope:global
_epilog = .text:0x0000002C; // type:function size:0x2C scope:global
_unresolved = .text:0x00000058; // type:function size:0x20 scope:global
PPCallBack__FP10fopAc_ac_cP10fopAc_ac_csQ29dBgW_Base13PushPullLabel = .text:0x00000078; // type:function size:0x104 scope:global
PPCallBack__FP10fopAc_ac_cP10fopAc_ac_csQ29dBgW_Base13PushPullLabel = .text:0x00000078; // type:function size:0x104 scope:local
initBaseMtx__12daObjPDoor_cFv = .text:0x0000017C; // type:function size:0x3C scope:global
setBaseMtx__12daObjPDoor_cFv = .text:0x000001B8; // type:function size:0x64 scope:global
Create__12daObjPDoor_cFv = .text:0x0000021C; // type:function size:0x110 scope:global
Expand All @@ -15,10 +15,10 @@ init_modeRotate__12daObjPDoor_cFv = .text:0x00000878; // type:function size:0x1C
modeRotate__12daObjPDoor_cFv = .text:0x00000894; // type:function size:0x2B4 scope:global
Draw__12daObjPDoor_cFv = .text:0x00000B48; // type:function size:0xA4 scope:global
Delete__12daObjPDoor_cFv = .text:0x00000BEC; // type:function size:0x40 scope:global
daObjPDoor_create1st__FP12daObjPDoor_c = .text:0x00000C2C; // type:function size:0x60 scope:global
daObjPDoor_MoveBGDelete__FP12daObjPDoor_c = .text:0x00000C8C; // type:function size:0x20 scope:global
daObjPDoor_MoveBGExecute__FP12daObjPDoor_c = .text:0x00000CAC; // type:function size:0x20 scope:global
daObjPDoor_MoveBGDraw__FP12daObjPDoor_c = .text:0x00000CCC; // type:function size:0x2C scope:global
daObjPDoor_create1st__FP12daObjPDoor_c = .text:0x00000C2C; // type:function size:0x60 scope:local
daObjPDoor_MoveBGDelete__FP12daObjPDoor_c = .text:0x00000C8C; // type:function size:0x20 scope:local
daObjPDoor_MoveBGExecute__FP12daObjPDoor_c = .text:0x00000CAC; // type:function size:0x20 scope:local
daObjPDoor_MoveBGDraw__FP12daObjPDoor_c = .text:0x00000CCC; // type:function size:0x2C scope:local
_ctors = .ctors:0x00000000; // type:label scope:global
_dtors = .dtors:0x00000000; // type:label scope:global
...rodata.0 = .rodata:0x00000000; // type:label scope:local
Expand All @@ -31,14 +31,14 @@ _dtors = .dtors:0x00000000; // type:label scope:global
@4054 = .rodata:0x0000001C; // type:object size:0x4 scope:local
@stringBase0 = .rodata:0x00000020; // type:object size:0xA 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_cull_box = .data:0x00000024; // type:object size:0x18 scope:global data:float
l_arcName = .data:0x00000020; // type:object size:0x4 scope:local data:4byte
l_cull_box = .data:0x00000024; // type:object size:0x18 scope:local data:float
@3781 = .data:0x0000003C; // type:object size:0xC scope:local
@3782 = .data:0x00000048; // type:object size:0xC scope:local
l_func$3780 = .data:0x00000054; // type:object size:0x18 scope:local
daObjPDoor_METHODS = .data:0x0000006C; // type:object size:0x20 scope:global
daObjPDoor_METHODS = .data:0x0000006C; // type:object size:0x20 scope:local
g_profile_Obj_PushDoor = .data:0x0000008C; // type:object size:0x30 scope:global
__vt__12daObjPDoor_c = .data:0x000000BC; // type:object size:0x28 scope:global
lbl_589_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
lbl_589_bss_0 = .bss:0x00000000; // type:object size:0x1 scope:local data:byte
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ def MatchingFor(*versions):
ActorRel(NonMatching, "d_a_obj_crvlh_up"),
ActorRel(Matching, "d_a_obj_crvsteel"),
ActorRel(Matching, "d_a_obj_crystal"),
ActorRel(NonMatching, "d_a_obj_cwall"),
ActorRel(Equivalent, "d_a_obj_cwall"),
ActorRel(Matching, "d_a_obj_damCps"),
ActorRel(Matching, "d_a_obj_dan"),
ActorRel(Matching, "d_a_obj_digholl"),
Expand Down Expand Up @@ -1954,7 +1954,7 @@ def MatchingFor(*versions):
ActorRel(Matching, "d_a_obj_onsen"),
ActorRel(Matching, "d_a_obj_onsenFire"),
ActorRel(Matching, "d_a_obj_onsenTaru"),
ActorRel(NonMatching, "d_a_obj_pdoor"),
ActorRel(Matching, "d_a_obj_pdoor"),
ActorRel(Matching, "d_a_obj_pdtile"),
ActorRel(NonMatching, "d_a_obj_pdwall"),
ActorRel(NonMatching, "d_a_obj_picture"),
Expand Down
73 changes: 62 additions & 11 deletions include/d/actor/d_a_obj_cwall.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef D_A_OBJ_CWALL_H
#define D_A_OBJ_CWALL_H

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

/**
Expand All @@ -11,21 +13,30 @@
* @details
*
*/
class daObjCwall_c : public fopAc_ac_c {
class daObjCwall_c : public dBgS_MoveBgActor {
public:
struct chain_s {
public:
/* 80BD6E94 */ ~chain_s();
/* 80BD6ED0 */ chain_s();

J3DModel* mModel;
cXyz mPos;
};

enum Type {
TYPE_0,
TYPE_1,
};

typedef void (daObjCwall_c::*modeFunc)();

/* 80BD6A4C */ void initBaseMtx();
/* 80BD6A88 */ void setBaseMtx();
/* 80BD6AEC */ void Create();
/* 80BD6D08 */ void CreateHeap();
/* 80BD6ED4 */ void create1st();
/* 80BD6F80 */ void Execute(f32 (**)[3][4]);
/* 80BD6AEC */ int Create();
/* 80BD6D08 */ int CreateHeap();
/* 80BD6ED4 */ int create1st();
/* 80BD6F80 */ int Execute(Mtx**);
/* 80BD7288 */ void setTension();
/* 80BD7718 */ void calcSePos();
/* 80BD7788 */ void getChainBasePos(cXyz*);
Expand All @@ -40,14 +51,54 @@ class daObjCwall_c : public fopAc_ac_c {
/* 80BD8BC8 */ void initClose();
/* 80BD8BF0 */ void modeClose();
/* 80BD935C */ void setPower(f32, s16*);
/* 80BD9414 */ void checkWall();
/* 80BD95A0 */ void checkPullNow();
/* 80BD977C */ void checkPull();
/* 80BD9848 */ void Draw();
/* 80BD9948 */ void Delete();
/* 80BD9414 */ BOOL checkWall();
/* 80BD95A0 */ BOOL checkPullNow();
/* 80BD977C */ BOOL checkPull();
/* 80BD9848 */ int Draw();
/* 80BD9948 */ int Delete();

u8 getArg0() { return fopAcM_GetParamBit(this, 0, 4); }
u8 getType() { return fopAcM_GetParamBit(this, 4, 4); }
u8 getSwbit() { return fopAcM_GetParamBit(this, 8, 8); }

private:
/* 0x568 */ u8 field_0x568[0xf5c - 0x568];
/* 0x5A0 */ request_of_phase_process_class mPhase;
/* 0x5A8 */ J3DModel* mWallModel;
/* 0x5AC */ dCcD_Stts mStts;
/* 0x5E8 */ dCcD_Cyl mCyl;
/* 0x724 */ dCcD_Sph mSph;
/* 0x85C */ dCcD_Cyl mCyls[4];
/* 0xD4C */ dCcD_Cyl mCyl2;
/* 0xE88 */ J3DModel* mHandleModel;
/* 0xE8C */ chain_s* mChains;
/* 0xE90 */ u8 field_0xe90;
/* 0xE91 */ u8 field_0xe91;
/* 0xE92 */ u8 field_0xe92;
/* 0xE93 */ u8 field_0xe93;
/* 0xE94 */ cXyz field_0xe94[7];
/* 0xEE8*/ f32 field_0xee8[7];
/* 0xF04 */ u8 field_0xf04[7];
/* 0xF0B */ u8 field_0xf0b;
/* 0xF0C */ u8 field_0xf0c;
/* 0xF0D */ u8 field_0xf0d;
/* 0xF0E */ u8 field_0xf0e;
/* 0xF0F */ u8 field_0xf0f;
/* 0xF10 */ u8 field_0xf10;
/* 0xF11 */ u8 mType;
/* 0xF12 */ u8 field_0xf12;
/* 0xF14 */ s16 field_0xf14;
/* 0xF16 */ s16 field_0xf16;
/* 0xF18 */ s16 field_0xf18;
/* 0xF1A */ s16 field_0xf1a;
/* 0xF1C */ s16 field_0xf1c;
/* 0xF20 */ cXyz field_0xf20;
/* 0xF2C */ cXyz field_0xf2c;
/* 0xF38 */ cXyz field_0xf38;
/* 0xF44 */ cXyz field_0xf44;
/* 0xF50 */ f32 field_0xf50;
/* 0xF54 */ f32 field_0xf54;
/* 0xF58 */ u8 field_0xf58;
/* 0xF58 */ u8 field_0xf59;
};

STATIC_ASSERT(sizeof(daObjCwall_c) == 0xf5c);
Expand Down
39 changes: 30 additions & 9 deletions include/d/actor/d_a_obj_pdoor.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef D_A_OBJ_PDOOR_H
#define D_A_OBJ_PDOOR_H

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

/**
Expand All @@ -11,24 +12,44 @@
* @details
*
*/
class daObjPDoor_c : public fopAc_ac_c {
class daObjPDoor_c : public dBgS_MoveBgActor {
public:
typedef void (daObjPDoor_c::*modeFunc)();

enum Mode {
MODE_WAIT,
MODE_ROTATE,
};

/* 80CA9F9C */ void initBaseMtx();
/* 80CA9FD8 */ void setBaseMtx();
/* 80CAA03C */ void Create();
/* 80CAA14C */ void CreateHeap();
/* 80CAA1BC */ void create1st();
/* 80CAA23C */ void Execute(f32 (**)[3][4]);
/* 80CAA03C */ int Create();
/* 80CAA14C */ int CreateHeap();
/* 80CAA1BC */ int create1st();
/* 80CAA23C */ int Execute(Mtx**);
/* 80CAA290 */ void mode_proc_call();
/* 80CAA31C */ void init_modeWait();
/* 80CAA354 */ void modeWait();
/* 80CAA698 */ void init_modeRotate();
/* 80CAA6B4 */ void modeRotate();
/* 80CAA968 */ void Draw();
/* 80CAAA0C */ void Delete();
/* 80CAA968 */ int Draw();
/* 80CAAA0C */ int Delete();

u8 getSwbit() { return fopAcM_GetParamBit(this, 0, 8); }
u8 getSwbit2() { return fopAcM_GetParamBit(this, 8, 8); }

private:
/* 0x568 */ u8 field_0x568[0x5c4 - 0x568];
/* 0x5A0 */ request_of_phase_process_class mPhase;
/* 0x5A8 */ J3DModel* mModel;
/* 0x5AC */ s8 mDoorDirection;
/* 0x5AD */ u8 mMode;
/* 0x5B0 */ int field_0x5b0;
/* 0x5B4 */ u8 field_0x5b4;
/* 0x5B5 */ u8 field_0x5b5;
/* 0x5B6 */ u8 field_0x5b6[2];
/* 0x5B8 */ s16 field_0x5b8;
/* 0x5BA */ s16 field_0x5ba;
/* 0x5BC */ s16 field_0x5bc;
/* 0x5C0 */ dBgW_Base::PushPullLabel mPushPullLabel;
};

STATIC_ASSERT(sizeof(daObjPDoor_c) == 0x5c4);
Expand Down
4 changes: 2 additions & 2 deletions include/d/actor/d_a_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ class daPy_py_c : public fopAc_ac_c {
static f32 getAttentionOffsetY();
static int checkNowWolfEyeUp();
static void forceRestartRoom(int, u32, int);
static void setFmChainPos(fopAc_ac_c*, cXyz*, int);
static BOOL setFmChainPos(fopAc_ac_c*, cXyz*, int);
static void cancelFmChainGrab();
static void setLookPos(cXyz*);
static void setPlayerSe(u32);
Expand Down Expand Up @@ -698,7 +698,7 @@ class daPy_py_c : public fopAc_ac_c {
cXyz* getLeftFootPosP() { return &mLeftFootPos; }
BOOL checkCopyRodThrowAfter() const { return checkNoResetFlg3(FLG3_COPY_ROD_THROW_AFTER); }
BOOL checkRide() const { return checkHorseRide() || checkBoarRide() || checkSpinnerRide() || checkCanoeRide() || checkBoardRide(); }
const cXyz& getRightHandPos() const { return mRightHandPos; }
cXyz getRightHandPos() const { return mRightHandPos; }
const cXyz getLeftHandPos() const { return mLeftHandPos; }
const cXyz getItemPos() const { return mItemPos; }

Expand Down
Loading

0 comments on commit c429ce2

Please sign in to comment.