mirror of
https://github.com/zeldaret/ss
synced 2026-09-03 01:54:18 -04:00
d_a_obj_chest 93%
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
#include "nw4r/ut/ut_Color.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "toBeSorted/actor_event.h"
|
||||
#include "toBeSorted/dowsing_target.h"
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/dowsing_target.h"
|
||||
|
||||
class dAcItem_0xB34 {
|
||||
public:
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
|
||||
static void spawnItem(u16 item, u32 room, const mVec3_c &pos, const mAng3_c &rot, u32 params, u32 arg);
|
||||
static void spawnDrop(u16 item, u32 room, const mVec3_c &pos, const mAng3_c &rot);
|
||||
static void giveItem(ITEM_ID, int, int);
|
||||
static u32 checkFlag(u32 flag);
|
||||
static bool hasItem(u32 flag) {
|
||||
return checkFlag(flag);
|
||||
|
||||
@@ -1,22 +1,80 @@
|
||||
#ifndef D_A_OBJ_CHEST_H
|
||||
#define D_A_OBJ_CHEST_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "d/col/bg/d_bg_w.h"
|
||||
#include "m/m3d/m_smdl.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
#include "toBeSorted/actor_event.h"
|
||||
#include "toBeSorted/attention.h"
|
||||
#include "toBeSorted/d_d3d.h"
|
||||
#include "toBeSorted/dowsing_target.h"
|
||||
|
||||
class dAcOChest_c : public dAcObjBase_c {
|
||||
public:
|
||||
dAcOChest_c() : mStateMgr(*this, sStateID::null) {}
|
||||
dAcOChest_c()
|
||||
: mStateMgr(*this, sStateID::null), mEvent(*this, nullptr), mDowsingTarget(this, DowsingTarget::SLOT_NONE) {}
|
||||
virtual ~dAcOChest_c() {}
|
||||
|
||||
static void changeStateOpenCallback(dAcOChest_c *);
|
||||
static void changeStateWaitCallback(dAcOChest_c *);
|
||||
static void changeStateFailCallback(dAcOChest_c *);
|
||||
static void changeStateWait2Callback(dAcOChest_c *);
|
||||
|
||||
virtual bool createHeap() override;
|
||||
virtual int create() override;
|
||||
virtual int draw() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int actorExecute() override;
|
||||
|
||||
STATE_FUNC_DECLARE(dAcOChest_c, Wait);
|
||||
STATE_FUNC_DECLARE(dAcOChest_c, OpenEvent);
|
||||
STATE_FUNC_DECLARE(dAcOChest_c, FailEvent);
|
||||
STATE_FUNC_DECLARE(dAcOChest_c, OrderOpenEventAfter);
|
||||
|
||||
virtual void doInteraction(s32) override;
|
||||
|
||||
void fn_326_C90();
|
||||
void changeStateOpen();
|
||||
void changeStateWait();
|
||||
void changeStateFail();
|
||||
void changeStateWait2();
|
||||
char *getName();
|
||||
char *getSubtypeName();
|
||||
char *getModelName();
|
||||
char *getOpenOrClose(u8);
|
||||
char *getDzbPlcName();
|
||||
s32 getSubtype();
|
||||
bool hasBeenOpened();
|
||||
void stateOpenUpdate2();
|
||||
void stateOpenEventEnter2();
|
||||
void fn_326_1440();
|
||||
bool hasInsideModel();
|
||||
void fn_326_1470();
|
||||
void fn_326_14A0();
|
||||
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dAcOChest_c);
|
||||
/* 0x330 */ nw4r::g3d::ResFile mResFile;
|
||||
/* 0x334 */ d3d::AnmMdlWrapper mAnmMdl;
|
||||
/* 0x3A4 */ m3d::smdl_c mMdl;
|
||||
/* 0x3C0 */ dBgW mBgW;
|
||||
/* 0x5D0 */ STATE_MGR_DECLARE(dAcOChest_c);
|
||||
/* 0x60C */ ActorEventRelated mEvent;
|
||||
/* 0x65C */ bool mGaveItem;
|
||||
/* 0x65D */ bool mField_0x65D;
|
||||
/* 0x65E */ bool mHasInsideModel;
|
||||
/* 0x65F */ bool mIsLinksCloset;
|
||||
/* 0x660 */ DowsingTarget mDowsingTarget;
|
||||
|
||||
static const float OPEN_WARDROBE_INTERACTION_FIELD_0x24;
|
||||
static const char *CHEST_OPEN;
|
||||
static const char *CHEST_OPEN_AFTER;
|
||||
static const char *CHEST_FAIL;
|
||||
static InteractionTargetDef OPEN_WARDROBE_INTERACTION;
|
||||
static char *INSIDE_MODEL_NAMES[4];
|
||||
static const u32 unused;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -235,6 +235,10 @@ public:
|
||||
f32 squareMagXZ() const {
|
||||
return x * x + z * z;
|
||||
}
|
||||
f32 squareDistanceToXZ(const mVec3_c &other) const {
|
||||
return (*this - other).squareMagXZ();
|
||||
}
|
||||
|
||||
void rotX(const mAng &angle);
|
||||
void rotY(const mAng &angle);
|
||||
void rotZ(const mAng &angle);
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
void advanceNext();
|
||||
bool isAdvance();
|
||||
|
||||
int getSingleIntData(int *result, u32 code, u32);
|
||||
int getSingleFloatData(f32 *result, u32 code, u32);
|
||||
int getSingleVecData(mVec3_c *result, u32 code, u32);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user