DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
userstatus.hpp
1#pragma once
2
3#include "common.h"
4
5#include "itemdata.hpp"
6
10// clang-format off
11enum ResLimitZone {
12 RES_LIMIT_ZONE_NONE = -1,
13 RES_LIMIT_ZONE_TOAN = 0,
14 RES_LIMIT_ZONE_XIAO = 1,
15 RES_LIMIT_ZONE_GORO = 2,
16 RES_LIMIT_ZONE_RUBY = 3,
17 RES_LIMIT_ZONE_UNGAGA = 4,
18 RES_LIMIT_ZONE_OSMOND = 5,
19 RES_LIMIT_ZONE_NO_WEAPON_CHANGE = 10,
20 RES_LIMIT_ZONE_THIRST = 11,
21};
22
23// clang-format on
24
28// clang-format off
29enum StatusAilment {
30 AILMENT_KNOCKED_OUT = 0x02,
31 AILMENT_FREEZE = 0x04,
32 AILMENT_STAMINA = 0x08,
33 AILMENT_POISON = 0x10,
34 AILMENT_CURSE = 0x20,
35 AILMENT_GOO = 0x40,
36};
37
38// clang-format on
39
44 s16 id;
45 char unk_02[30];
46};
47
48STATIC_ASSERT(sizeof(DNG_CONSUMABLE) == 0x20);
49
53struct ITEM_PACK {
54 s8 num;
58 s16 item[103];
59 s16 item_vol[103];
60};
61
62STATIC_ASSERT(sizeof(ITEM_PACK) == 0x1AA);
63
67struct ATRA_SAVE {
68 s32 id;
69 s32 floor;
71};
72
73STATIC_ASSERT(sizeof(ATRA_SAVE) == 0xC);
74
79public:
80 /* CDngStatusData extends this layout with its dungeon tail. The fields are
81 * public because retail reaches into them from outside both classes. */
83 char unk_01[1];
88 s16 max_hp[6];
89 s16 hp[6];
90 char unk_01E[0x25A];
91 s32 atra_grid[6][40][8];
93 s16 kills[6][100];
94 char unk_4148[200];
95 char res_limit_zone_id[6][25];
96 char unk_42A6[25];
98 char unk_42C6[2];
99 s32 ailments[6];
101 float water_max[6];
102 float water_now[6];
105 s32 skill_owned[6];
109 union {
110 u16 money;
112 };
113
114 s32 defense[6];
116 union {
124 };
125
126 char unk_450A[2];
129 s16 next_hp[6];
130 s16 life_step[6];
131 s32 unk_8A74[6];
132 s32 unk_8A8C[6];
133 s8 event_flags[50];
134 s16 drink_next[6];
135 s16 drink_step[6];
136 char unk_8AEE[2];
137 float thirst_damage[6];
148 int ChkEventFlag(int flag_no);
149
155 void ClearEventFlag();
156
162 void AddDrink(int chara_no, s16 amount, float ratio);
163
169 void AddNowLife(int chara_no, s16 amount, float ratio);
170
176 int CheckLife();
177
183 void SetNextLife(int chara_no, s16 value, float ratio);
184
192 void Step(int mode);
193
199 void Init();
200};
201
202STATIC_ASSERT(sizeof(CUserStatus) == 0x8B20);
s16 max_hp[6]
s32 atra_grid[6][40][8]
void SetNextLife(int chara_no, s16 value, float ratio)
void ClearEventFlag()
s16 kills[6][100]
ITEM_PACK item_pack
s32 water_drain_disable
s8 event_flags[50]
s32 ailments[6]
s16 active_item[3]
float water_max[6]
void AddDrink(int chara_no, s16 amount, float ratio)
char res_limit_zone_id[6][25]
s32 skill_owned[6]
float water_now[6]
DNG_CONSUMABLE consumable_items[43]
s16 life_step[6]
int ChkEventFlag(int flag_no)
s16 drink_next[6]
void AddNowLife(int chara_no, s16 amount, float ratio)
s8 floor_reached[7]
WEAPON_HAVE chara_weapons[6][11]
s16 ailment_frames[6]
s32 active_item_vol[3]
s8 equipped_weapon_slot[6]
s32 res_limit_zone_current
ATRA_SAVE atra_registry[6][100]
s16 drink_step[6]
float thirst_damage[6]
void Step(int mode)
s16 quick_item_slot[3]
s16 quick_item_qty[3]
s16 item_vol[103]
s16 item[103]