mirror of
https://github.com/zeldaret/tp
synced 2026-07-29 15:43:25 -04:00
add a lot of dComIfGs inlines (#65)
* item_func inlines * some getcheck func inlines * remove asm * format * format Co-authored-by: Pheenoh <pheenoh@gmail.com>
This commit is contained in:
@@ -14,24 +14,24 @@
|
||||
#include "d/d_vibration/d_vibration.h"
|
||||
|
||||
struct item_func {
|
||||
float hearts; // bf80
|
||||
u32 rupees; // bf84
|
||||
s16 small_keys; // bf88
|
||||
s16 kakera_heart; // bf8a
|
||||
s16 magic; // bf8c
|
||||
u16 unk; // bf8e
|
||||
s16 magic_lv; // bf90
|
||||
u8 unk2[2]; // bf92/93 // removed stuff?
|
||||
u32 unk3; // bf94 //related to lantern?
|
||||
u32 unk4; // bf98 //related to lantern?
|
||||
u32 unk5; // bf9c //related to lantern?
|
||||
u32 unk6; // bfa0 //related to oxygen?
|
||||
u32 unk7; // bfa4 //related to oxygen?
|
||||
u32 unk8; // bfa8 //related to oxygen?
|
||||
u32 unk9; // bfac //related to oxygen?
|
||||
u32 unk10; // bfb0 //related to oxygen?
|
||||
s16 arrows; // bfb4
|
||||
s16 seeds; // bfb6
|
||||
float hearts; // bf80
|
||||
u32 rupees; // bf84
|
||||
s16 small_keys; // bf88
|
||||
s16 max_life; // bf8a
|
||||
s16 magic; // bf8c
|
||||
u16 unk; // bf8e
|
||||
s16 magic_lv; // bf90
|
||||
u8 unk2[2]; // bf92/93 // removed stuff?
|
||||
u32 unk3; // bf94 //related to lantern?
|
||||
u32 unk4; // bf98 //related to lantern?
|
||||
u32 unk5; // bf9c //related to lantern?
|
||||
int oxygen; // bfa0
|
||||
u32 unk7; // bfa4 //related to oxygen?
|
||||
int max_oxygen; // bfa8
|
||||
u32 unk9; // bfac //related to oxygen?
|
||||
u32 unk10; // bfb0 //related to oxygen?
|
||||
s16 arrows; // bfb4
|
||||
s16 seeds; // bfb6
|
||||
};
|
||||
|
||||
class dComIfG_camera_info_class {
|
||||
@@ -72,6 +72,19 @@ public:
|
||||
field_0x4ec0[0x3B] = status;
|
||||
field_0x4ec0[0x56] = unk;
|
||||
}
|
||||
void setItemLifeCount(float hearts, u8 unk) {
|
||||
give_item.hearts += hearts;
|
||||
unk_heart = unk;
|
||||
}
|
||||
void setItemRupeeCount(long rupees) { give_item.rupees += rupees; }
|
||||
void setItemMagicCount(short magic) { give_item.magic += magic; }
|
||||
void setItemMaxMagicCount(short max) { give_item.magic_lv += max; }
|
||||
void setItemArrowNumCount(short arrows) { give_item.arrows += arrows; }
|
||||
void setItemPachinkoNumCount(short seeds) { give_item.seeds += seeds; }
|
||||
void setItemKeyNumCount(short keys) { give_item.small_keys += keys; }
|
||||
void setItemMaxLifeCount(short max) { give_item.max_life += max; }
|
||||
void setOxygen(long oxygen) { give_item.oxygen = oxygen; }
|
||||
void setMaxOxygen(long max) { give_item.max_oxygen = max; }
|
||||
|
||||
private:
|
||||
/* 0x00000 */ dBgS dbgs;
|
||||
@@ -132,6 +145,8 @@ public:
|
||||
dDlst_peekZ_c& getdlstPeekZ() { return draw_list_list.dlstPeekZ; }
|
||||
dComIfG_play_c& getPlay() { return play; }
|
||||
dSv_memory_c& getMemory() { return info.getMemory(); }
|
||||
dSv_event_c& getEvent() { return info.getEvent(); }
|
||||
dSv_info_c& getInfo() { return info; }
|
||||
|
||||
private:
|
||||
/* 0x00000 */ dSv_info_c info;
|
||||
@@ -166,6 +181,151 @@ private:
|
||||
|
||||
extern dComIfG_inf_c g_dComIfG_gameInfo;
|
||||
|
||||
int dComIfGs_isItemFirstBit(u8);
|
||||
|
||||
inline void dComIfGp_setZStatus(u8 status, u8 unk) {
|
||||
g_dComIfG_gameInfo.getPlay().setZStatus(status, unk);
|
||||
}
|
||||
inline void dComIfGp_setItemLifeCount(float amount, u8 unk) {
|
||||
g_dComIfG_gameInfo.getPlay().setItemLifeCount(amount, unk);
|
||||
}
|
||||
inline void dComIfGp_setItemRupeeCount(long amount) {
|
||||
g_dComIfG_gameInfo.getPlay().setItemRupeeCount(amount);
|
||||
}
|
||||
inline void dComIfGp_setItemMagicCount(short amount) {
|
||||
g_dComIfG_gameInfo.getPlay().setItemMagicCount(amount);
|
||||
}
|
||||
inline void dComIfGp_setItemMaxMagicCount(short max) {
|
||||
g_dComIfG_gameInfo.getPlay().setItemMaxMagicCount(max);
|
||||
}
|
||||
inline void dComIfGp_setItemArrowNumCount(short amount) {
|
||||
g_dComIfG_gameInfo.getPlay().setItemArrowNumCount(amount);
|
||||
}
|
||||
inline void dComIfGp_setItemPachinkoNumCount(short amount) {
|
||||
g_dComIfG_gameInfo.getPlay().setItemPachinkoNumCount(amount);
|
||||
}
|
||||
inline void dComIfGp_setItemKeyNumCount(short amount) {
|
||||
g_dComIfG_gameInfo.getPlay().setItemKeyNumCount(amount);
|
||||
}
|
||||
inline void dComIfGp_setItemMaxLifeCount(short max) {
|
||||
g_dComIfG_gameInfo.getPlay().setItemMaxLifeCount(max);
|
||||
}
|
||||
inline void dComIfGs_onDungeonItemMap(void) {
|
||||
g_dComIfG_gameInfo.getMemory().getTempFlags().onDungeonItemMap();
|
||||
}
|
||||
inline void dComIfGs_onDungeonItemCompass(void) {
|
||||
g_dComIfG_gameInfo.getMemory().getTempFlags().onDungeonItemCompass();
|
||||
}
|
||||
inline void dComIfGs_onDungeonItemWarp(void) {
|
||||
g_dComIfG_gameInfo.getMemory().getTempFlags().onDungeonItemWarp();
|
||||
}
|
||||
inline void dComIfGs_setItem(int slot, u8 i_no) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItem().setItem(slot, i_no);
|
||||
}
|
||||
inline void dComIfGs_setOxygen(long amount) {
|
||||
g_dComIfG_gameInfo.getPlay().setOxygen(amount);
|
||||
}
|
||||
inline void dComIfGs_setMaxOxygen(long max) {
|
||||
g_dComIfG_gameInfo.getPlay().setMaxOxygen(max);
|
||||
}
|
||||
inline void dComIfGs_setOil(u16 amount) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerStatusA().setOil(amount);
|
||||
}
|
||||
inline void dComIfGs_setMaxOil(u16 max) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerStatusA().setMaxOil(max);
|
||||
}
|
||||
inline void dComIfGs_setWalletSize(u8 size) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerStatusA().setWalletSize(size);
|
||||
}
|
||||
inline void dComIfGs_setMagic(u8 amount) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerStatusA().setMagic(amount);
|
||||
}
|
||||
inline void dComIfGs_setMaxMagic(u8 max) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerStatusA().setMaxMagic(max);
|
||||
}
|
||||
inline void dComIfGs_setRupee(u16 amount) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerStatusA().setRupee(amount);
|
||||
}
|
||||
inline void dComIfGs_setLife(u16 amount) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerStatusA().setLife(amount);
|
||||
}
|
||||
inline void dComIfGs_setMaxLife(u8 max) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerStatusA().setMaxLife(max);
|
||||
}
|
||||
inline void dComIfGs_onDungeonItemBossKey(void) {
|
||||
g_dComIfG_gameInfo.getMemory().getTempFlags().onDungeonItemBossKey();
|
||||
}
|
||||
inline void dComIfGs_setCollectSword(u8 sword_id) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerCollect().setCollect(SWORD_BITFIELD, sword_id);
|
||||
}
|
||||
inline void dComIfGs_setCollectShield(u8 shield_id) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerCollect().setCollect(SHIELD_BITFIELD, shield_id);
|
||||
}
|
||||
inline void dComIfGs_setCollectClothes(u8 clothes_id) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerCollect().setCollect(CLOTHING_BITFIELD, clothes_id);
|
||||
}
|
||||
inline void dComIfGs_setRodTypeLevelUp(void) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItem().setRodTypeLevelUp();
|
||||
}
|
||||
inline void dComIfGs_setArrowNum(u8 amount) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItemRecord().setArrowNum(amount);
|
||||
}
|
||||
inline void dComIfGs_setArrowMax(u8 max) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItemMax().setArrowNum(max);
|
||||
}
|
||||
inline u8 dComIfGs_getPachinkoMax(void) {
|
||||
return 50;
|
||||
}
|
||||
inline void dComIfGs_setEmptyBombBag(void) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItem().setEmptyBombBag();
|
||||
}
|
||||
inline void dComIfGs_setEmptyBombBag(u8 type, u8 amount) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItem().setEmptyBombBag(type, amount);
|
||||
}
|
||||
inline void dComIfGs_setEmptyBombBagItemIn(u8 type, bool unk) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItem().setEmptyBombBagItemIn(type, unk);
|
||||
}
|
||||
inline void dComIfGs_setEmptyBottle(void) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItem().setEmptyBottle();
|
||||
}
|
||||
inline void dComIfGs_setEmptyBottle(u8 type) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItem().setEmptyBottle(type);
|
||||
}
|
||||
inline void dComIfGs_setEmptyBottleItemIn(u8 type) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getPlayerItem().setEmptyBottleItemIn(type);
|
||||
}
|
||||
inline void dComIfGs_onEventBit(u16 id) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getEventFlags().onEventBit(id);
|
||||
}
|
||||
inline void dComIfGs_onLightDropFlag(u8 area_id) {
|
||||
g_dComIfG_gameInfo.getSaveFile().getLightDrop().onLightDropGetFlag(area_id);
|
||||
}
|
||||
inline void dComIfGs_onSwitch(int param1, int param2) {
|
||||
g_dComIfG_gameInfo.getInfo().onSwitch(param1, param2);
|
||||
}
|
||||
inline bool dComIfGs_isDungeonItemMap(void) {
|
||||
return g_dComIfG_gameInfo.getMemory().getTempFlags().isDungeonItemMap();
|
||||
}
|
||||
inline bool dComIfGs_isDungeonItemBossKey(void) {
|
||||
return g_dComIfG_gameInfo.getMemory().getTempFlags().isDungeonItemBossKey();
|
||||
}
|
||||
inline u8 dComIfGs_getItem(int slot, bool unk) {
|
||||
return g_dComIfG_gameInfo.getSaveFile().getPlayerItem().getItem(slot, unk);
|
||||
}
|
||||
inline BOOL dComIfGs_isCollectSword(u8 sword_id) {
|
||||
return g_dComIfG_gameInfo.getSaveFile().getPlayerCollect().isCollect(SWORD_BITFIELD, sword_id);
|
||||
}
|
||||
inline BOOL dComIfGs_isCollectClothing(u8 clothing_id) {
|
||||
return g_dComIfG_gameInfo.getSaveFile().getPlayerCollect().isCollect(CLOTHING_BITFIELD,
|
||||
clothing_id);
|
||||
}
|
||||
inline u8 dComIfGs_checkBottle(u8 type) {
|
||||
return g_dComIfG_gameInfo.getSaveFile().getPlayerItem().checkBottle(type);
|
||||
}
|
||||
inline BOOL dComIfGs_isLightDropGetFlag(u8 area_id) {
|
||||
return g_dComIfG_gameInfo.getSaveFile().getLightDrop().isLightDropGetFlag(area_id);
|
||||
}
|
||||
|
||||
// int dComIfGp_roomControl_getZoneNo(int zone_no) {
|
||||
// return g_dComIfG_gameInfo.play.getRoomControl().getZoneNo(zone_no);
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user