mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-15 12:08:37 -04:00
initial item service implementation
This commit is contained in:
@@ -96,6 +96,9 @@ public:
|
||||
/* 0xDE0 */ cXyz field_0xde0;
|
||||
/* 0xDEC */ u8 field_0xdec[0xdf9 - 0xdec];
|
||||
/* 0xDF9 */ u8 field_0xdf9;
|
||||
#if TARGET_PC
|
||||
bool mItemCheckOverridden;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daE_HP_c) == 0xdfc);
|
||||
|
||||
@@ -88,6 +88,11 @@ private:
|
||||
/* 0x99C */ dPa_followEcallBack mEffect2;
|
||||
/* 0x9B0 */ Z2SoundObjSimple mSound;
|
||||
/* 0x9D0 */ u8 mIsHookCarry;
|
||||
#if TARGET_PC
|
||||
u8 mOriginalItemNo;
|
||||
bool mItemOverridden;
|
||||
bool mOverrideHover;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daObjLife_c) == 0x9d4);
|
||||
|
||||
@@ -194,6 +194,9 @@ private:
|
||||
/* 0x9FC */ u8 field_0x9fc;
|
||||
/* 0x9FD */ u8 field_0x9fd;
|
||||
/* 0xA00 */ Mtx mDrawMtx;
|
||||
#if TARGET_PC
|
||||
u8 mOriginalItemNo;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daTbox_c) == 0xA30);
|
||||
|
||||
@@ -145,6 +145,10 @@ public:
|
||||
/* 0x9BC */ u8 field_0x9bc[4];
|
||||
/* 0x9C0 */ u8 field_0x9c0;
|
||||
/* 0x9C1 */ u8 field_0x9c1;
|
||||
#if TARGET_PC
|
||||
u8 mOriginalItemNo;
|
||||
bool mItemOverridden;
|
||||
#endif
|
||||
}; // Size: 0x9C4
|
||||
|
||||
#endif /* D_A_D_A_ITEM_STATIC_H */
|
||||
|
||||
@@ -50,6 +50,9 @@ public:
|
||||
csXyz* getRotateP();
|
||||
cXyz* getPosP();
|
||||
const char* getShopArcname();
|
||||
#if TARGET_PC
|
||||
const ResourceData& getResourceData() const;
|
||||
#endif
|
||||
u16 getHeapSize();
|
||||
void CreateInit();
|
||||
void set_mtx();
|
||||
@@ -110,6 +113,10 @@ private:
|
||||
/* 0x960 */ s16 mAngleX;
|
||||
/* 0x962 */ s16 mAngleY;
|
||||
/* 0x964 */ u8 mShopItemID;
|
||||
#if TARGET_PC
|
||||
ResourceData mOverrideData;
|
||||
bool mItemOverridden;
|
||||
#endif
|
||||
};
|
||||
|
||||
int CheckShopItemCreateHeap(fopAc_ac_c* i_this);
|
||||
|
||||
+3
-1
@@ -11,7 +11,9 @@ public:
|
||||
static DUSK_GAME_DATA u8* mData;
|
||||
};
|
||||
|
||||
void execItemGet(u8 item_id);
|
||||
class fopAc_ac_c;
|
||||
void execItemGet(
|
||||
u8 item_id IF_DUSK_ARG(u32 item_give_tag = 0) IF_DUSK_ARG(fopAc_ac_c* giver = NULL));
|
||||
|
||||
void item_func_HEART();
|
||||
void item_func_GREEN_RUPEE();
|
||||
|
||||
@@ -318,6 +318,11 @@ public:
|
||||
/* 0x566 */ s8 field_0x566;
|
||||
/* 0x567 */ s8 field_0x567;
|
||||
|
||||
#if TARGET_PC
|
||||
u32 mItemGiveTag;
|
||||
u8 mItemGiveOriginalNo;
|
||||
#endif
|
||||
|
||||
#if !__MWERKS__
|
||||
s8 actor_last_base_field;
|
||||
#endif
|
||||
|
||||
@@ -79,6 +79,10 @@ struct fopAcM_prm_class {
|
||||
/* 0x1C */ fpc_ProcID parent_id;
|
||||
/* 0x20 */ s8 argument;
|
||||
/* 0x21 */ s8 room_no;
|
||||
#if TARGET_PC
|
||||
u32 mItemGiveTag;
|
||||
u8 mItemGiveOriginalNo;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct fopAcM_search4ev_prm {
|
||||
@@ -516,8 +520,9 @@ s32 fopAcM_SearchByName(s16 i_procName, fopAc_ac_c** i_outActor);
|
||||
fopAcM_prm_class* fopAcM_CreateAppend();
|
||||
|
||||
fopAcM_prm_class* createAppend(u16 i_setId, u32 i_parameters, const cXyz* i_pos, int i_roomNo,
|
||||
const csXyz* i_angle, const cXyz* i_scale, s8 i_argument,
|
||||
fpc_ProcID i_parentId);
|
||||
const csXyz* i_angle, const cXyz* i_scale, s8 i_argument,
|
||||
fpc_ProcID i_parentId IF_DUSK_ARG(u32 i_itemGiveTag = 0)
|
||||
IF_DUSK_ARG(u8 i_itemOriginalNo = 0xFF));
|
||||
|
||||
void fopAcM_Log(fopAc_ac_c const* i_actor, char const* i_message);
|
||||
|
||||
@@ -526,19 +531,20 @@ s32 fopAcM_delete(fopAc_ac_c* i_actor);
|
||||
s32 fopAcM_delete(fpc_ProcID i_actorID);
|
||||
|
||||
fpc_ProcID fopAcM_create(s16 i_procName, u16 i_setId, u32 i_parameters, const cXyz* i_pos,
|
||||
int i_roomNo, const csXyz* i_angle, const cXyz* i_scale, s8 i_argument,
|
||||
createFunc i_createFunc);
|
||||
int i_roomNo, const csXyz* i_angle, const cXyz* i_scale, s8 i_argument,
|
||||
createFunc i_createFunc IF_DUSK_ARG(u32 i_itemGiveTag = 0));
|
||||
|
||||
fpc_ProcID fopAcM_create(s16 i_procName, u32 i_parameters, const cXyz* i_pos, int i_roomNo,
|
||||
const csXyz* i_angle, const cXyz* i_scale, s8 i_argument);
|
||||
const csXyz* i_angle, const cXyz* i_scale, s8 i_argument IF_DUSK_ARG(u32 i_itemGiveTag = 0));
|
||||
|
||||
inline fpc_ProcID fopAcM_Create(s16 i_procName, createFunc i_createFunc, void* params) {
|
||||
return fpcM_Create(i_procName, i_createFunc,params);
|
||||
}
|
||||
|
||||
fopAc_ac_c* fopAcM_fastCreate(s16 i_procName, u32 i_parameters, const cXyz* i_pos, int i_roomNo,
|
||||
const csXyz* i_angle, const cXyz* i_scale, s8 i_argument,
|
||||
createFunc i_createFunc, void* i_createFuncData);
|
||||
const csXyz* i_angle, const cXyz* i_scale, s8 i_argument, createFunc i_createFunc,
|
||||
void* i_createFuncData IF_DUSK_ARG(u32 i_itemGiveTag = 0)
|
||||
IF_DUSK_ARG(u8 i_itemOriginalNo = 0xFF));
|
||||
|
||||
fopAc_ac_c* fopAcM_fastCreate(const char* i_actorname, u32 i_parameters, const cXyz* i_pos,
|
||||
int i_roomNo, const csXyz* i_angle, const cXyz* i_scale,
|
||||
@@ -623,11 +629,11 @@ fopAc_ac_c* fopAcM_getItemEventPartner(const fopAc_ac_c*);
|
||||
fopAc_ac_c* fopAcM_getEventPartner(const fopAc_ac_c*);
|
||||
|
||||
fpc_ProcID fopAcM_createItemForPresentDemo(cXyz const* i_pos, int i_itemNo, u8 param_2,
|
||||
int i_itemBitNo, int i_roomNo, csXyz const* i_angle,
|
||||
cXyz const* i_scale);
|
||||
int i_itemBitNo, int i_roomNo, csXyz const* i_angle,
|
||||
cXyz const* i_scale IF_DUSK_ARG(u32 i_itemGiveTag = 0));
|
||||
|
||||
fpc_ProcID fopAcM_createItemForTrBoxDemo(cXyz const* i_pos, int i_itemNo, int i_itemBitNo,
|
||||
int i_roomNo, csXyz const* i_angle, cXyz const* i_scale);
|
||||
int i_roomNo, csXyz const* i_angle, cXyz const* i_scale IF_DUSK_ARG(u32 i_itemGiveTag = 0));
|
||||
|
||||
u8 fopAcM_getItemNoFromTableNo(u8 i_tableNo);
|
||||
|
||||
@@ -641,11 +647,12 @@ fpc_ProcID fopAcM_createItemFromTable(cXyz const* i_pos, int i_tableNo, int i_it
|
||||
bool i_createDirect);
|
||||
|
||||
fpc_ProcID fopAcM_createDemoItem(const cXyz* i_pos, int i_itemNo, int i_itemBitNo,
|
||||
const csXyz* i_angle, int i_roomNo, const cXyz* scale, u8 param_7);
|
||||
const csXyz* i_angle, int i_roomNo, const cXyz* scale,
|
||||
u8 param_7 IF_DUSK_ARG(u32 i_itemGiveTag = 0));
|
||||
|
||||
fpc_ProcID fopAcM_createItemForBoss(const cXyz* i_pos, int i_itemNo, int i_roomNo,
|
||||
const csXyz* i_angle, const cXyz* i_scale, f32 i_speedF,
|
||||
f32 i_speedY, int param_8);
|
||||
const csXyz* i_angle, const cXyz* i_scale, f32 i_speedF, f32 i_speedY,
|
||||
int param_8 IF_DUSK_ARG(const char* i_itemCheckName = NULL));
|
||||
|
||||
fpc_ProcID fopAcM_createItemForMidBoss(const cXyz* i_pos, int i_itemNo, int i_roomNo,
|
||||
const csXyz* i_angle, const cXyz* i_scale, int param_6,
|
||||
|
||||
@@ -256,4 +256,17 @@ using std::isnan;
|
||||
#define DUSK_CONST IF_DUSK(const)
|
||||
#define DUSK_CONSTEXPR IF_DUSK(constexpr)
|
||||
|
||||
#if TARGET_PC && defined(DUSK_BUILDING_GAME)
|
||||
#include "dusk/mods/item.hpp"
|
||||
#define DUSK_ITEM_CHECK(name, item_no, giver) \
|
||||
(item_no) = ::dusk::mods::item_check(name, (item_no), giver)
|
||||
#define DUSK_ITEM_CHECK_EXPR(name, item_no, giver) \
|
||||
(::dusk::mods::item_check(name, (item_no), giver))
|
||||
#define DUSK_GIVE_TAG(name) IF_DUSK_ARG(::dusk::mods::item_give_tag(name))
|
||||
#else
|
||||
#define DUSK_ITEM_CHECK(name, item_no, giver)
|
||||
#define DUSK_ITEM_CHECK_EXPR(name, item_no, giver) (item_no)
|
||||
#define DUSK_GIVE_TAG(name)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user