blob: 3256717f911a0756e7a3fa75c17bd8405f18dbbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef TPLYINVENTORY_H
#define TPLYINVENTORY_H
#include <global_types.h>
#include <pso/macros.h>
#include <pso/protocol.h>
struct TItemData {
void init();
void bswap();
TItemData &assign(const TItemData &src);
union {
u8 data_u8[12];
u16 data_u16[6];
u32 data_u32[3];
} data1;
u32 id;
union {
u8 data_u8[4];
u8 data_u16[2];
u32 data_u32;
} data2;
};
class TPlyInventoryItem {
public:
void init();
void bswap();
TPlyInventoryItem &assign(const TPlyInventoryItem &src);
public:
u8 m_present[4];
u32 m_flags;
TItemData m_data;
};
class TPlyInventory {
public:
void bswap();
TPlyInventory &assign(const TPlyInventory &src);
public:
u8 m_num_items;
u8 m_hp_materials_used;
u8 m_tp_materials_used;
u8 m_language;
TPlyInventoryItem m_items[30];
};
#endif
|