2016-04-19 00:17:49 +00:00
|
|
|
#ifndef __URDE_IGAMEAREA_HPP__
|
|
|
|
#define __URDE_IGAMEAREA_HPP__
|
|
|
|
|
2016-04-23 18:04:49 +00:00
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "zeus/CTransform.hpp"
|
|
|
|
|
2016-04-19 00:17:49 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
2016-07-23 00:26:17 +00:00
|
|
|
class CEntity;
|
2016-04-19 00:17:49 +00:00
|
|
|
|
|
|
|
class IGameArea
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
class Dock
|
|
|
|
{
|
2016-04-23 18:04:49 +00:00
|
|
|
public:
|
|
|
|
struct SDockReference
|
|
|
|
{
|
2017-01-04 04:08:30 +00:00
|
|
|
u32 x0_area = 0;
|
|
|
|
s16 x4_dock = 0;
|
|
|
|
bool x6_loadOther = false;
|
2016-04-23 18:04:49 +00:00
|
|
|
SDockReference() = default;
|
|
|
|
};
|
|
|
|
private:
|
2016-12-22 02:48:22 +00:00
|
|
|
u32 x0_referenceCount = 0;
|
2016-04-23 18:04:49 +00:00
|
|
|
std::vector<SDockReference> x4_dockReferences;
|
|
|
|
rstl::reserved_vector<zeus::CVector3f, 4> x14_planeVertices;
|
2017-01-04 04:08:30 +00:00
|
|
|
bool x48_isReferenced;
|
2016-04-23 18:04:49 +00:00
|
|
|
public:
|
|
|
|
|
2016-07-23 03:07:07 +00:00
|
|
|
const rstl::reserved_vector<zeus::CVector3f, 4>& GetPlaneVertices() const {return x14_planeVertices;}
|
2016-12-22 02:48:22 +00:00
|
|
|
u32 GetReferenceCount() const { return x0_referenceCount; }
|
2016-08-14 03:00:58 +00:00
|
|
|
const std::vector<SDockReference>& GetDockRefs() const { return x4_dockReferences; }
|
2016-04-23 18:04:49 +00:00
|
|
|
Dock(CInputStream& in, const zeus::CTransform& xf);
|
|
|
|
TAreaId GetConnectedAreaId(s32 other) const;
|
|
|
|
s16 GetOtherDockNumber(s32 other) const;
|
|
|
|
bool GetShouldLoadOther(s32 other) const;
|
|
|
|
void SetShouldLoadOther(s32 other, bool should);
|
|
|
|
bool ShouldLoadOtherArea(s32 other) const;
|
|
|
|
zeus::CVector3f GetPoint(s32 idx) const;
|
2017-01-04 04:08:30 +00:00
|
|
|
bool IsReferenced() const { return x48_isReferenced; }
|
|
|
|
void SetReferenceCount(s32 v) { x0_referenceCount = v; x48_isReferenced = true; }
|
2016-04-19 00:17:49 +00:00
|
|
|
};
|
2016-07-23 00:26:17 +00:00
|
|
|
|
|
|
|
virtual bool IGetScriptingMemoryAlways() const=0;
|
|
|
|
virtual TAreaId IGetAreaId() const=0;
|
|
|
|
virtual ResId IGetAreaAssetId() const=0;
|
|
|
|
virtual bool IIsActive() const=0;
|
|
|
|
virtual TAreaId IGetAttachedAreaId(int) const=0;
|
|
|
|
virtual u32 IGetNumAttachedAreas() const=0;
|
|
|
|
virtual ResId IGetStringTableAssetId() const=0;
|
|
|
|
virtual const zeus::CTransform& IGetTM() const=0;
|
2016-04-19 00:17:49 +00:00
|
|
|
};
|
2016-08-14 03:00:58 +00:00
|
|
|
|
|
|
|
enum class EChain
|
|
|
|
{
|
|
|
|
Invalid = -1,
|
|
|
|
Zero,
|
|
|
|
One,
|
|
|
|
Two,
|
2017-03-04 04:31:08 +00:00
|
|
|
Alive,
|
2016-08-14 03:00:58 +00:00
|
|
|
Four
|
|
|
|
};
|
|
|
|
|
2016-04-19 00:17:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_IGAMEAREA_HPP__
|