2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 03:07:41 +00:00

CScriptTrigger work

This commit is contained in:
2017-01-14 19:59:37 -08:00
parent e2c671e9b4
commit 65fb75737f
39 changed files with 707 additions and 448 deletions

View File

@@ -36,9 +36,6 @@ struct SObjectTag
}
};
using TUniqueId = s16;
using TAreaId = s32;
struct TEditorId
{
TEditorId() = default;
@@ -46,13 +43,16 @@ struct TEditorId
u32 id = -1;
u8 LayerNum() const { return (id >> 26) & 0x3f; }
u16 AreaNum() const { return (id >> 16) & 0x3ff; }
TUniqueId Id() const { return id & 0xffff; }
u16 Id() const { return id & 0xffff; }
bool operator<(const TEditorId& other) const { return (id & 0x3ffffff) < (other.id & 0x3ffffff); }
bool operator!=(const TEditorId& other) const { return (id & 0x3ffffff) != (other.id & 0x3ffffff); }
bool operator==(const TEditorId& other) const { return (id & 0x3ffffff) == (other.id & 0x3ffffff); }
};
using TUniqueId = s16;
using TAreaId = s32;
#define kInvalidEditorId TEditorId()
#define kInvalidUniqueId TUniqueId(-1)
#define kInvalidAreaId TAreaId(-1)
@@ -107,7 +107,7 @@ public:
if (this->empty())
return {};
return {::GetAverage<T>(this->data(), this->size()) };
return {::GetAverage<T>(this->data(), this->size())};
}
void Clear() { this->clear(); }