Skip to content

Commit

Permalink
d_a_obj_swturn OK (#2278)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatal175 authored Jan 1, 2025
1 parent 477cbf1 commit ad5b89f
Show file tree
Hide file tree
Showing 4 changed files with 445 additions and 327 deletions.
30 changes: 15 additions & 15 deletions config/GZ2E01/rels/d_a_obj_swturn/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:0x100 scope:global
PPCallBack__FP10fopAc_ac_cP10fopAc_ac_csQ29dBgW_Base13PushPullLabel = .text:0x00000078; // type:function size:0x100 scope:local
initBaseMtx__13daObjSwTurn_cFv = .text:0x00000178; // type:function size:0x3C scope:global
setBaseMtx__13daObjSwTurn_cFv = .text:0x000001B4; // type:function size:0x64 scope:global
Create__13daObjSwTurn_cFv = .text:0x00000218; // type:function size:0x16C scope:global
Expand All @@ -17,19 +17,19 @@ rotate_sub_0__13daObjSwTurn_cFv = .text:0x00000DF8; // type:function size:0x208
rotate_sub_1__13daObjSwTurn_cFv = .text:0x00001000; // type:function size:0x350 scope:global
Draw__13daObjSwTurn_cFv = .text:0x00001350; // type:function size:0xA8 scope:global
Delete__13daObjSwTurn_cFv = .text:0x000013F8; // type:function size:0x40 scope:global
daObjSwTurn_create1st__FP13daObjSwTurn_c = .text:0x00001438; // type:function size:0x60 scope:global
daObjSwTurn_MoveBGDelete__FP13daObjSwTurn_c = .text:0x00001498; // type:function size:0x20 scope:global
daObjSwTurn_MoveBGExecute__FP13daObjSwTurn_c = .text:0x000014B8; // type:function size:0x20 scope:global
daObjSwTurn_MoveBGDraw__FP13daObjSwTurn_c = .text:0x000014D8; // type:function size:0x2C scope:global
daObjSwTurn_create1st__FP13daObjSwTurn_c = .text:0x00001438; // type:function size:0x60 scope:local
daObjSwTurn_MoveBGDelete__FP13daObjSwTurn_c = .text:0x00001498; // type:function size:0x20 scope:local
daObjSwTurn_MoveBGExecute__FP13daObjSwTurn_c = .text:0x000014B8; // type:function size:0x20 scope:local
daObjSwTurn_MoveBGDraw__FP13daObjSwTurn_c = .text:0x000014D8; // 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
l_bmd = .rodata:0x00000000; // type:object size:0x8 scope:global
l_dzb = .rodata:0x00000008; // type:object size:0x8 scope:global
l_heap_size = .rodata:0x00000010; // type:object size:0x8 scope:global
l_rot_time = .rodata:0x00000018; // type:object size:0x4 scope:global
l_tame_time_1st = .rodata:0x0000001C; // type:object size:0x2 scope:global data:string
l_tame_time_cnt = .rodata:0x00000020; // type:object size:0x2 scope:global data:string
l_bmd = .rodata:0x00000000; // type:object size:0x8 scope:local
l_dzb = .rodata:0x00000008; // type:object size:0x8 scope:local
l_heap_size = .rodata:0x00000010; // type:object size:0x8 scope:local
l_rot_time = .rodata:0x00000018; // type:object size:0x4 scope:local
l_tame_time_1st = .rodata:0x0000001C; // type:object size:0x2 scope:local data:string
l_tame_time_cnt = .rodata:0x00000020; // type:object size:0x2 scope:local data:string
@3698 = .rodata:0x00000024; // type:object size:0x4 scope:local data:float
@4098 = .rodata:0x00000028; // type:object size:0x4 scope:local data:float
@4099 = .rodata:0x0000002C; // type:object size:0x4 scope:local data:float
Expand All @@ -40,13 +40,13 @@ l_tame_time_cnt = .rodata:0x00000020; // type:object size:0x2 scope:global data:
@4304 = .rodata:0x00000048; // type:object size:0x4 scope:local
@stringBase0 = .rodata:0x0000004C; // type:object size:0x13 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:0x8 scope:global
l_arcName = .data:0x00000020; // type:object size:0x8 scope:local
@3813 = .data:0x00000028; // type:object size:0xC scope:local
@3814 = .data:0x00000034; // type:object size:0xC scope:local
l_func$3812 = .data:0x00000040; // type:object size:0x18 scope:local
daObjSwTurn_METHODS = .data:0x00000058; // type:object size:0x20 scope:global
daObjSwTurn_METHODS = .data:0x00000058; // type:object size:0x20 scope:local
g_profile_Obj_SwTurn = .data:0x00000078; // type:object size:0x30 scope:global
__vt__13daObjSwTurn_c = .data:0x000000A8; // type:object size:0x28 scope:global
lbl_647_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
lbl_647_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 @@ -2012,7 +2012,7 @@ def MatchingFor(*versions):
ActorRel(NonMatching, "d_a_obj_sword"),
ActorRel(NonMatching, "d_a_obj_swpush2"),
ActorRel(Matching, "d_a_obj_swspinner"),
ActorRel(NonMatching, "d_a_obj_swturn"),
ActorRel(Matching, "d_a_obj_swturn"),
ActorRel(NonMatching, "d_a_obj_syRock"),
ActorRel(NonMatching, "d_a_obj_szbridge"),
ActorRel(NonMatching, "d_a_obj_taFence"),
Expand Down
65 changes: 49 additions & 16 deletions include/d/actor/d_a_obj_swturn.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef D_A_OBJ_SWTURN_H
#define D_A_OBJ_SWTURN_H

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

/**
Expand All @@ -11,39 +12,71 @@
* @details
*
*/
class daObjSwTurn_c : public fopAc_ac_c {
class daObjSwTurn_c : public dBgS_MoveBgActor {
public:
typedef void (daObjSwTurn_c::*modeFunc)();

enum Mode {
MODE_WAIT,
MODE_ROTATE,
};

enum Kind {
KIND_0,
KIND_1,
};

/* 80D00CD8 */ void initBaseMtx();
/* 80D00D14 */ void setBaseMtx();
/* 80D00D78 */ void Create();
/* 80D00EE4 */ void CreateHeap();
/* 80D00F64 */ void create1st();
/* 80D01074 */ void Execute(f32 (**)[3][4]);
/* 80D00D78 */ int Create();
/* 80D00EE4 */ int CreateHeap();
/* 80D00F64 */ int create1st();
/* 80D01074 */ int Execute(Mtx**);
/* 80D010D4 */ void mode_proc_call();
/* 80D01160 */ void init_modeWait();
/* 80D01198 */ void modeWait();
/* 80D01770 */ void init_modeRotate();
/* 80D018B4 */ void modeRotate();
/* 80D01958 */ void rotate_sub_0();
/* 80D01B60 */ void rotate_sub_1();
/* 80D01EB0 */ void Draw();
/* 80D01F58 */ void Delete();
/* 80D01EB0 */ int Draw();
/* 80D01F58 */ int Delete();

int getSwNo() { return fopAcM_GetParamBit(this, 0, 8); }
int getSwNo2() { return fopAcM_GetParamBit(this, 0x14, 8); }
u8 getSwNo() { return fopAcM_GetParamBit(this, 0, 8); }
u8 getModelType() { return fopAcM_GetParamBit(this, 8, 4); }
u8 getCount() { return fopAcM_GetParamBit(this, 12, 8); }
u8 getSwNo2() { return fopAcM_GetParamBit(this, 20, 8); }
u8 getKind() { return fopAcM_GetParamBit(this, 28, 4); }
u16 getRevCount() { return mRevCount; }
int getRotateAngle() {
return (field_0x5ad == NULL) ? field_0x5ba + field_0x5c4 * 0x4000 :
return (mKind == 0) ? field_0x5ba + field_0x5c4 * 0x4000 :
field_0x5ba + (field_0x5c4 << 0xe) / 3;
}

private:
/* 0x568 */ u8 field_0x568[0x5ad - 0x568];
/* 0x5AD */ bool field_0x5ad;
/* 0x5AE */ u8 field_0x5ae[0x5ba - 0x5ae];
/* 0x5A0 */ request_of_phase_process_class mPhase;
/* 0x5A8 */ J3DModel* mModel;
/* 0x5AC */ u8 mModelType;
/* 0x5AD */ u8 mKind;
/* 0x5AE */ u8 mMode;
/* 0x5AF */ u8 field_0x5af;
/* 0x5B0 */ u8 field_0x5b0[2];
/* 0x5B4 */ f32 field_0x5b4;
/* 0x5B8 */ s16 field_0x5b8;
/* 0x5BA */ s16 field_0x5ba;
/* 0x5BC */ u8 field_0x5bc[0x5c4 - 0x5bc];
/* 0x5BC */ s16 field_0x5bc;
/* 0x5C0 */ int field_0x5c0;
/* 0x5C4 */ s16 field_0x5c4;
/* 0x5C6 */ u8 field_0x5c6[0x5e0 - 0x5c6];
/* 0x5C6 */ u8 field_0x5c6;
/* 0x5C8 */ int field_0x5c8;
/* 0x5CC */ u16 field_0x5cc;
/* 0x5CE */ u8 field_0x5ce;
/* 0x5CF */ u8 field_0x5cf;
/* 0x5D0 */ u8 field_0x5d0;
/* 0x5D1 */ u8 field_0x5d1;
/* 0x5D2 */ u16 mRevCount;
/* 0x5D4 */ u16 field_0x5d4;
/* 0x5D8 */ dBgW_Base::PushPullLabel mPushPullLabel;
/* 0x5DC */ s16 field_0x5dc;
};

STATIC_ASSERT(sizeof(daObjSwTurn_c) == 0x5e0);
Expand Down
Loading

0 comments on commit ad5b89f

Please sign in to comment.