Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion config/GZ2E01/rels/d_a_obj_magne_arm/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ __vt__11daObjMarm_c = .data:0x000003BC; // type:object size:0x28 scope:global
@1012 = .bss:0x00000034; // type:object size:0x1 scope:local
@1010 = .bss:0x00000038; // type:object size:0x1 scope:local
@1009 = .bss:0x0000003C; // type:object size:0x1 scope:local
lbl_105_bss_3D = .bss:0x0000003D; // type:object size:0x7 data:byte
init$1932 = .bss:0x0000003D; // type:object size:0x1 scope:local data:byte
init$2022 = .bss:0x0000003E; // type:object size:0x1 scope:local data:byte
init$2031 = .bss:0x0000003F; // type:object size:0x1 scope:local data:byte
init$2040 = .bss:0x00000040; // type:object size:0x1 scope:local data:byte
init$2049 = .bss:0x00000041; // type:object size:0x1 scope:local data:byte
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000044; // type:object size:0x4 scope:global
sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x00000048; // type:object size:0x4 scope:global
sInstance__27JASGlobalInstance<7Z2SeMgr> = .bss:0x0000004C; // type:object size:0x4 scope:global
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ def MatchingFor(*versions) -> bool:
ActorRel(NonMatching, "d_a_obj_ktOnFire"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_ladder"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_lv2Candle"),
ActorRel(NonMatching, "d_a_obj_magne_arm"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_magne_arm"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_metalbox"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_mgate"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_nameplate"),
Expand Down
104 changes: 90 additions & 14 deletions include/d/actor/d_a_obj_magne_arm.h
Original file line number Diff line number Diff line change
@@ -1,32 +1,59 @@
#ifndef D_A_OBJ_MAGNE_ARM_H
#define D_A_OBJ_MAGNE_ARM_H

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

/**
* @ingroup actors-objects
* @class daObjMarm_c
* @brief Magnetic Arm
*
* @details
*
* @details Magnetic Arm Cranes in Goron Mines.
* The model is split into 6 parts labeled A through F.
* A Parts is the unmoving crane base.
* B Parts is the vertical gear moving the crane.
* C Parts is the main crane body.
* D Parts are the vertical gears at the top where the crane bends.
* E Parts is the wheel at the end of the crane.
* F Parts is the magnetic crane head accessible to Link.
* The ropes connecting the crane head is identified separately.
*/
class daObjMarm_c : public fopAc_ac_c {

class daObjMarm_c : public dBgS_MoveBgActor {
public:
enum MOVETYPE_e {
MOVETYPE_A_e,
MOVETYPE_B_e,
MOVETYPE_C_e,
MOVETYPE_D_e
};

enum MODE_e {
MODE_WAIT_e,
MODE_MHOLE_ON_e,
MODE_LIFT_UP_e,
MODE_LIFT_DOWN_e,
MODE_ROTATE_e,
MODE_END_e
};

/* 8058F358 */ void getBpartsOffset(cXyz*);
/* 8058F3D4 */ void getDpartsOffset(cXyz*);
/* 8058F46C */ void getEpartsOffset(cXyz*);
/* 8058F504 */ void getFpartsOffset(cXyz*);
/* 8058F610 */ void getRopeStartPos(cXyz*);
/* 8058F6B4 */ void initBaseMtx();
/* 8058F77C */ void setBaseMtx();
/* 8058FA50 */ void Create();
/* 8058FCF8 */ void CreateHeap();
/* 80590244 */ void phase_0();
/* 805902D8 */ void phase_1();
/* 80590364 */ void phase_2();
/* 80590460 */ void create1st();
/* 80590504 */ void Execute(f32 (**)[3][4]);
/* 8058FA50 */ int Create();
/* 8058FCF8 */ int CreateHeap();
/* 80590244 */ cPhs__Step phase_0();
/* 805902D8 */ cPhs__Step phase_1();
/* 80590364 */ cPhs__Step phase_2();
/* 80590460 */ int create1st();
/* 80590504 */ int Execute(Mtx**);
/* 80590818 */ void action();
/* 80590B7C */ void init_typeA_modeWait();
/* 80590B8C */ void typeA_modeWait();
Expand Down Expand Up @@ -78,12 +105,61 @@ class daObjMarm_c : public fopAc_ac_c {
/* 80591F50 */ void seStartLevel_UP();
/* 80591FB8 */ void seStartLevel_DOWN();
/* 80592020 */ void seStart_SWING();
/* 80592088 */ void Draw();
/* 80592088 */ int Draw();
/* 805923C4 */ void debugDraw();
/* 805923C8 */ void Delete();
/* 805923C8 */ int Delete();

u32 getMoveType() { return fopAcM_GetParamBit(this, 8, 4); }
u32 getSwNo() { return fopAcM_GetParamBit(this, 0, 8); }

private:
/* 0x568 */ u8 field_0x568[0xa6c - 0x568];
/* 0x5A0 */ request_of_phase_process_class mPhase;
/* 0x5A8 */ J3DModel* mpModel[6];
/* 0x5C0 */ mDoExt_brkAnm* mpBrkAnm;
/* 0x5C4 */ mDoExt_btkAnm* mpBtkAnm;
/* 0x5C8 */ JPABaseEmitter* mpEmitter;
/* 0x5CC */ dBgW* mpBgW1;
/* 0x5D0 */ Mtx mBgMtx1;
/* 0x600 */ Mtx mBgMtx2;
/* 0x630 */ dBgW* mpBgW2;
/* 0x634 */ Mtx mBgMtx3;
/* 0x664 */ dBgS_ObjAcch mAcch;
/* 0x83C */ dBgS_AcchCir mAcchCir;
/* 0x87C */ dCcD_Stts unused_0x87C; // Declaration needed to generate vtables
/* 0x8B8 */ dCcD_Cyl unused_0x8B8; // Declaration needed to generate vtables
/* 0x9F4 */ s32 mRotOffsetSwing; // Stop animation swing rotation
/* 0x9F8 */ u8 unused_0x9F8[0x4];
/* 0x9FC */ s16 mBPartsXRot;
/* 0x9FE */ s16 mCPartsYRot;
/* 0xA00 */ s16 mDPartsXRot;
/* 0xA02 */ s16 mEPartsXRot;
/* 0xA04 */ f32 mLiftTotal;
/* 0xA08 */ u8 mIsYRotForward;
/* 0xA09 */ s8 mYRotDirection;
/* 0xA0A */ s16 mRotationAngle;
/* 0xA0C */ s16 mLiftRotation;
/* 0xA10 */ s32 mRotationTotal;
/* 0xA14 */ u8 mMode;
/* 0xA15 */ u8 mMoveType;
/* 0xA16 */ u8 unused_0xA16;
/* 0xA17 */ u8 mStopTimer;
/* 0xA18 */ fpc_ProcID mID;
/* 0xA1C */ u8 mPhaseIndex;
/* 0xA1D */ u8 mPlayerRide;
/* 0xA20 */ mDoExt_3DlineMat1_c* mpRope1;
/* 0xA24 */ mDoExt_3DlineMat1_c* mpRope2;
/* 0xA28 */ u8 field_0xA28; // mpRope1 Segment Count?
/* 0xA29 */ u8 field_0xA29; // mpRope2 Segment Count?
/* 0xA2C */ f32 mRotOffsetForce; // Swing Force applied during stop animation
/* 0xA30 */ s16 mYRotOffset; // Y rot Offset on stop animation
/* 0xA32 */ s16 mFPartsZRot; // F Parts Z rot on stop animation
/* 0xA34 */ u8 unused_0xA34[0x4];
/* 0xA38 */ s16 mZRotOffset;
/* 0xA3C */ f32 mZRotForce; // Swing Force applied during stop animation
/* 0xA40 */ s16 mZRotSwing; // Stop animation swing rotation
/* 0xA44 */ Vec mSeMarmPos;
/* 0xA50 */ Vec mSeMarmLiftPos;
/* 0xA5C */ Vec mSeMarmSwingPos;
/* 0xA68 */ u32 mShadowKey;
};

STATIC_ASSERT(sizeof(daObjMarm_c) == 0xa6c);
Expand Down
6 changes: 5 additions & 1 deletion include/d/actor/d_a_obj_mhole.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ class daObjMHole_c : public fopAc_ac_c {
/* 80C93ADC */ void draw();
/* 80C93CAC */ void _delete();

void setOn() { mIsOn = TRUE; }

private:
/* 0x568 */ u8 field_0x568[0x734 - 0x568];
/* 0x568 */ u8 field_0x568[0x198];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you keep the 0x734 - 0x568 convention? makes it easier to add fields later. Same for field_0x701

/* 0x700 */ bool mIsOn;
/* 0x701 */ u8 field_0x701[0x33];
};

STATIC_ASSERT(sizeof(daObjMHole_c) == 0x734);
Expand Down
Loading