2022-07-18 22:42:58 +00:00
|
|
|
#ifndef _TGAMETYPES_HPP
|
|
|
|
#define _TGAMETYPES_HPP
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-08-09 23:03:51 +00:00
|
|
|
struct TAreaId;
|
|
|
|
struct TEditorId;
|
|
|
|
struct TUniqueId;
|
2022-07-18 22:42:58 +00:00
|
|
|
|
|
|
|
extern TAreaId kInvalidAreaId;
|
|
|
|
extern TEditorId kInvalidEditorId;
|
|
|
|
extern TUniqueId kInvalidUniqueId;
|
|
|
|
|
2022-08-09 23:03:51 +00:00
|
|
|
struct TAreaId {
|
2022-09-05 04:01:13 +00:00
|
|
|
int value;
|
2022-08-09 23:03:51 +00:00
|
|
|
|
|
|
|
TAreaId() : value(-1) {}
|
2022-09-05 04:01:13 +00:00
|
|
|
TAreaId(int value) : value(value) {}
|
|
|
|
int Value() const { return value; }
|
2022-08-09 23:03:51 +00:00
|
|
|
|
|
|
|
bool operator==(const TAreaId& other) const { return value == other.value; }
|
|
|
|
bool operator!=(const TAreaId& other) const { return value != other.value; }
|
|
|
|
};
|
2022-08-13 01:26:00 +00:00
|
|
|
CHECK_SIZEOF(TAreaId, 0x4)
|
2022-08-11 02:33:46 +00:00
|
|
|
|
2022-08-09 23:03:51 +00:00
|
|
|
struct TEditorId {
|
2022-09-05 04:01:13 +00:00
|
|
|
uint value;
|
2022-08-09 23:03:51 +00:00
|
|
|
|
|
|
|
TEditorId() : value(-1) {}
|
2022-09-05 04:01:13 +00:00
|
|
|
TEditorId(uint value) : value(value) {}
|
|
|
|
uint Value() const { return value; }
|
2022-08-11 02:33:46 +00:00
|
|
|
|
|
|
|
bool operator==(const TEditorId& other) const { return value == other.value; }
|
|
|
|
bool operator!=(const TEditorId& other) const { return value != other.value; }
|
2022-08-09 23:03:51 +00:00
|
|
|
};
|
2022-08-13 01:26:00 +00:00
|
|
|
CHECK_SIZEOF(TEditorId, 0x4)
|
2022-08-11 02:33:46 +00:00
|
|
|
|
2022-08-09 23:03:51 +00:00
|
|
|
struct TUniqueId {
|
2022-08-11 02:33:46 +00:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
u16 version : 6;
|
|
|
|
u16 id : 10;
|
|
|
|
};
|
|
|
|
u16 value;
|
|
|
|
};
|
2022-08-09 23:03:51 +00:00
|
|
|
|
|
|
|
TUniqueId() : value(-1) {}
|
|
|
|
TUniqueId(u16 value) : value(value) {}
|
2022-08-11 02:33:46 +00:00
|
|
|
u16 Value() const { return value; }
|
|
|
|
|
|
|
|
bool operator==(const TUniqueId& other) const { return value == other.value; }
|
|
|
|
bool operator!=(const TUniqueId& other) const { return value != other.value; }
|
2022-08-09 23:03:51 +00:00
|
|
|
};
|
2022-08-13 01:26:00 +00:00
|
|
|
CHECK_SIZEOF(TUniqueId, 0x2)
|
|
|
|
|
|
|
|
typedef u16 TSfxId;
|
|
|
|
static TSfxId InvalidSfxId = 0xFFFFu;
|
2022-08-09 23:03:51 +00:00
|
|
|
|
2022-08-14 18:38:41 +00:00
|
|
|
class CSegId {
|
|
|
|
private:
|
|
|
|
u8 x0_id;
|
|
|
|
};
|
|
|
|
|
2022-07-18 22:42:58 +00:00
|
|
|
#endif
|