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

Started work on items #7

Merged
merged 2 commits into from
Sep 11, 2023
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
5 changes: 5 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ def ActorRel(rel_name, status):
NonMatching("d/d_save.cpp"),
NonMatching("d/d_save_init.cpp"),

NonMatching("d/actor/d_a_itembase_static.cpp"),
NonMatching("d/actor/d_a_item_static.cpp"),
NonMatching("d/actor/d_a_item.cpp"),
NonMatching("d/actor/d_a_itembase.cpp"),

# ?
NonMatching("DynamicLink.cpp"),
],
Expand Down
58 changes: 58 additions & 0 deletions include/d/actor/d_a_item.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#ifndef D_A_ITEM_H
#define D_A_ITEM_H

#include "d/actor/d_a_itembase.h"

class daItem_c : public daItemBase_c {
public:
float getYOffset();
void set_mtx();
void set_mtx_base(J3DModel*, cXyz, csXyz);
void CreateInit();
s32 _daItem_create();
s32 _daItem_execute();
void mode_proc_call();
void execInitNormalDirection();
void execMainNormalDirection();
void execInitGetDemoDirection();
void execWaitGetDemoDirection();
void execMainGetDemoDirection();
void execBringNezumi();
void execWaitMain();
void execWaitMainFromBoss();
void scaleAnimFromBossItem();
s32 _daItem_draw();
void setTevStr();
s32 _daItem_delete();
void itemGetExecute();
void itemDefaultRotateY();
bool checkItemDisappear();
void setItemTimer(int);
bool checkPlayerGet();
void itemActionForRupee();
void itemActionForHeart();
void itemActionForKey();
void itemActionForEmono();
void itemActionForSword();
void itemActionForArrow();
void checkWall();
void set_bound_se();
s32 checkGetItem();
void timeCount();
void mode_wait_init();
void mode_water_init();
void mode_wait();
void mode_water();
void initAction();
s32 _daItem_isdelete();

public:
u8 temp1[0x20];
/* 0x668 */ u8 mItemAction;
/* 0x669 */ u8 mStatusFlags;
/* 0x66A */ u8 mMode;
/* 0x66B */ u8 mCurAction;
u8 temp2[0x54];
};

#endif /* D_A_ITEM_H */
86 changes: 86 additions & 0 deletions include/d/actor/d_a_itembase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#ifndef D_A_ITEMBASE_H
#define D_A_ITEMBASE_H

#include "f_op/f_op_actor.h"
#include "SSystem/SComponent/c_phase.h"
#include "d/d_bg_s.h"
#include "d/d_item_data.h"

struct daItemBase_c_m_data {
/* 0x00 */ float mFieldItemGravity;
/* 0x04 */ float field1_0x4;
/* 0x08 */ float field2_0x8;
/* 0x0C */ float mScaleAnimSpeed;
/* 0x10 */ float field4_0x10;
/* 0x14 */ short field5_0x14;
/* 0x16 */ short field6_0x16;
/* 0x18 */ short field7_0x18;
/* 0x1A */ u8 field8_0x1a;
/* 0x1B */ u8 field9_0x1b;
/* 0x1C */ short mNumFramesPerFullSpin;
u8 temp1[0x26];
/* 0x42 */ short field47_0x42;
u8 temp2[0x4];
/* 0x48 */ float mVelocityScale;
};

struct daItemBase_c : public fopAc_ac_c {
public:
s32 DeleteBase(const char*);
s32 CreateItemHeap(const char*, short, short, short, short, short, short, short);
virtual s32 DrawBase();
virtual void setListStart();
void setListEnd();
virtual void settingBeforeDraw();
virtual void setTevStr();
virtual void setShadow();
virtual void animEntry();
void animPlay(float, float, float, float, float);
virtual s32 clothCreate();

void getItemNo();
void getHeight();
void getR();
void hide();
void show();
void changeDraw();
void chkDraw();
void dead();
void chkDead();
void setLoadError();
void CheckItemCreateHeap(fopAc_ac_c*);
void CheckFieldItemCreateHeap(fopAc_ac_c*);

daItemBase_c_m_data* getData();

static daItemBase_c_m_data m_data;

public:
/* 0x294 */ struct request_of_phase_process_class mPhs;
/* 0x29C */ struct J3DModel* mModel;
/* 0x2A0 */ struct J3DModel* mModelArrow[2]; // Extra models for arrow bundles
/* 0x2A8 */ struct mDoExt_btkAnm* mBtkAnm1;
/* 0x2AC */ struct mDoExt_btkAnm* mBtkAnm2;
/* 0x2B0 */ struct mDoExt_brkAnm* mBrkAnm1;
/* 0x2B4 */ struct mDoExt_brkAnm* mBrkAnm2;
/* 0x2B8 */ struct mDoExt_bckAnm* mBckAnm;
LagoLunatic marked this conversation as resolved.
Show resolved Hide resolved
// /* 0x2BC */ struct dBgS_Acch mAcch;
// /* 0x480 */ struct dBgS_AcchCir mAcchCir;
// /* 0x4C0 */ struct dCcD_Stts mStts;
// /* 0x4FC */ struct dCcD_Cyl mCyl;
// /* 0x62C */ undefined field14_0x62c;
// /* 0x62D */ undefined field15_0x62d;
// /* 0x62E */ undefined field16_0x62e;
// /* 0x62F */ undefined field17_0x62f;
u8 temp[0x374];
/* 0x630 */ int mPickupFlag;
/* 0x634 */ int field19_0x634;
/* 0x638 */ short field20_0x638;
/* 0x63A */ u8 m_itemNo;
/* 0x63B */ u8 mDrawFlags;
/* 0x63C */ struct cXyz mScaleTarget;
};

STATIC_ASSERT(sizeof(daItemBase_c) == 0x648);

#endif /* D_A_ITEMBASE_H */
19 changes: 19 additions & 0 deletions include/d/actor/d_a_itembase_static.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef D_A_ITEMBASE_STATIC_H
#define D_A_ITEMBASE_STATIC_H

#include "d/actor/d_a_itembase.h"

void getItemNo();
void getHeight();
void getR();
void hide();
void show();
void changeDraw();
void chkDraw();
void dead();
void chkDead();
void setLoadError();
void CheckItemCreateHeap(fopAc_ac_c*);
void CheckFieldItemCreateHeap(fopAc_ac_c*);

#endif /* D_A_ITEMBASE_STATIC_H */
Loading