mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-11 22:23:59 +00:00
Start matching CScriptPlatform; more CScriptMazeNode
Former-commit-id: 135d63412c
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
class CInputStream;
|
||||
class COutputStream;
|
||||
|
||||
struct TAreaId;
|
||||
struct TEditorId;
|
||||
struct TUniqueId;
|
||||
@@ -26,9 +29,14 @@ CHECK_SIZEOF(TAreaId, 0x4)
|
||||
struct TEditorId {
|
||||
uint value;
|
||||
|
||||
TEditorId() : value(-1) {}
|
||||
TEditorId(uint value) : value(value) {}
|
||||
TEditorId(CInputStream& in);
|
||||
// TODO
|
||||
uint Value() const { return value; }
|
||||
uint Id() const { return value; }
|
||||
uint AreaNum() const { return value; }
|
||||
|
||||
void PutTo(COutputStream&) const;
|
||||
|
||||
bool operator==(const TEditorId& other) const { return value == other.value; }
|
||||
bool operator!=(const TEditorId& other) const { return value != other.value; }
|
||||
@@ -36,22 +44,19 @@ struct TEditorId {
|
||||
CHECK_SIZEOF(TEditorId, 0x4)
|
||||
|
||||
struct TUniqueId {
|
||||
union {
|
||||
struct {
|
||||
u16 version : 6;
|
||||
u16 id : 10;
|
||||
};
|
||||
u16 value;
|
||||
};
|
||||
u16 value;
|
||||
|
||||
TUniqueId() : value(-1) {}
|
||||
TUniqueId(u16 value) : value(value) {}
|
||||
u16 Value() const { return value; }
|
||||
TUniqueId(u16 version, u16 id) : value(((version & 0x3F) << 10) | (id & 0x3FF)) {}
|
||||
u16 Value() const { return value & 0x3FF; }
|
||||
u16 Version() const { return (value >> 10) & 0x3F; }
|
||||
|
||||
bool operator==(const TUniqueId& other) const { return value == other.value; }
|
||||
bool operator!=(const TUniqueId& other) const { return value != other.value; }
|
||||
bool operator<(const TUniqueId& other) const; // TODO
|
||||
|
||||
private:
|
||||
};
|
||||
CHECK_SIZEOF(TUniqueId, 0x2)
|
||||
// CHECK_SIZEOF(TUniqueId, 0x2)
|
||||
|
||||
typedef u16 TSfxId;
|
||||
static TSfxId InvalidSfxId = 0xFFFFu;
|
||||
|
||||
Reference in New Issue
Block a user