Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daMagLift_c work #2275

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
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
50 changes: 39 additions & 11 deletions include/d/actor/d_a_obj_magLift.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef D_A_OBJ_MAGLIFT_H
#define D_A_OBJ_MAGLIFT_H

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

/**
* @ingroup actors-objects
Expand All @@ -11,12 +12,22 @@
* @details
*
*/
class daMagLift_c : public fopAc_ac_c {
class daMagLift_c : public dBgS_MoveBgActor {
public:
enum Mode_e {
MODE_ACC_e,
MODE_MOVE_e,
MODE_BRK_e,
MODE_WAIT_e,
MODE_WAIT_INIT_e,
MODE_DEAD_e,
MODE_MOVE_WAIT_e
};

/* 80C8DAA0 */ void setBaseMtx();
/* 80C8DB28 */ void CreateHeap();
/* 80C8DB94 */ void create();
/* 80C8DD38 */ void Execute(f32 (**)[3][4]);
/* 80C8DB28 */ int CreateHeap();
/* 80C8DB94 */ int create();
/* 80C8DD38 */ int Execute(Mtx**);
/* 80C8DD88 */ void moveLift();
/* 80C8DE98 */ void modeAcc();
/* 80C8DF20 */ void init_modeMove();
Expand All @@ -31,21 +42,38 @@ class daMagLift_c : public fopAc_ac_c {
/* 80C8E2C4 */ void modeMoveWait();
/* 80C8E318 */ void modeDead();
/* 80C8E31C */ void setNextPoint();
/* 80C8E450 */ void Draw();
/* 80C8E4F4 */ void Delete();
/* 80C8E450 */ int Draw();
/* 80C8E4F4 */ int Delete();

int getMoveSpeed() { return fopAcM_GetParamBit(this, 0x8, 4); }

static u8 const mSpeed[64];
static f32 const mSpeed[16];

private:
/* 0x568 */ u8 field_0x568[0x5d4 - 0x568];
/* 0x5a0 */ request_of_phase_process_class mPhaseReq;
/* 0x5a8 */ J3DModel* mpModel;
/* 0x5ac */ u8 field_0x5ac [0x5ae - 0x5ac];
/* 0x5ae */ u8 field_0x5ae;
/* 0x5af */ s8 field_0x5af;
/* 0x5b0 */ s16 mPoint;
// two bytes of padding.
Copy link
Contributor

Choose a reason for hiding this comment

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

comments about padding aren't that necessary

/* 0x5b4 */ cXyz field_0x5b4;
/* 0x5c0 */ cXyz field_0x5c0;
/* 0x5cc */ float mMoveSpeed;
Copy link
Contributor

Choose a reason for hiding this comment

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

f32 is preferred for float types in game code

/* 0x5d0 */ u8 mMode;
/* 0x5d1 */ u8 is_switch;
// The rest is word padding.
Copy link
Contributor

Choose a reason for hiding this comment

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

same thing about comment being unnecessary

};

STATIC_ASSERT(sizeof(daMagLift_c) == 0x5d4);

class daMagLift_HIO_c {
class daMagLift_HIO_c : public mDoHIO_entry_c {
public:
/* 80C8DA2C */ daMagLift_HIO_c();
/* 80C8E5B0 */ ~daMagLift_HIO_c();
/* 80C8E5B0 */ virtual ~daMagLift_HIO_c() {}

/* 0x4 */ u8 field_0x4;
/* 0x5 */ u8 field_0x5;
};


Expand Down
Loading
Loading