metaforce/Runtime/World/CWorld.hpp

71 lines
1.5 KiB
C++
Raw Normal View History

#ifndef __URDE_CWORLD_HPP__
#define __URDE_CWORLD_HPP__
2016-04-19 00:17:49 +00:00
#include "RetroTypes.hpp"
2016-04-23 18:04:49 +00:00
#include "ScriptObjectSupport.hpp"
2016-04-19 00:17:49 +00:00
namespace urde
{
2016-04-19 00:17:49 +00:00
class CGameArea;
2016-04-23 18:04:49 +00:00
class IObjectStore;
class CResFactory;
class CWorld
{
2016-05-03 08:27:28 +00:00
public:
class CRelay
{
TEditorId x0_relay = kInvalidEditorId;
TEditorId x4_target = kInvalidEditorId;
s16 x8_msg = -1;
bool xa_active = false;
public:
CRelay() = default;
CRelay(CInputStream& in);
TEditorId GetRelayId() const { return x0_relay; }
TEditorId GetTargetId() const { return x4_target; }
s16 GetMessage() const { return x8_msg; }
bool GetActive() const { return xa_active; }
};
private:
2016-04-23 18:04:49 +00:00
ResId xc_worldId = -1;
ResId x10_ = -1;
2016-04-19 00:17:49 +00:00
std::vector<std::unique_ptr<CGameArea>> x18_areas;
2016-05-03 08:27:28 +00:00
ResId x24_ = -1;
std::vector<CRelay> x2c_relays;
2016-04-23 18:04:49 +00:00
std::unique_ptr<u8[]> x40_;
std::unique_ptr<u8[]> x44_;
IObjectStore* x60_objectStore;
CResFactory* x64_resFactory;
2016-05-03 08:27:28 +00:00
TAreaId x68_ = kInvalidAreaId;
u32 x6c_ = 0;
2016-04-23 18:04:49 +00:00
union
{
struct
{
bool x70_24_ : 1;
bool x70_25_ : 1;
bool x70_26_ : 1;
2016-05-03 08:27:28 +00:00
bool x70_27_ : 1;
2016-04-23 18:04:49 +00:00
};
};
2016-05-03 08:27:28 +00:00
u32 x78_;
u32 x7c_;
2016-04-23 18:04:49 +00:00
2016-05-03 08:27:28 +00:00
public:
2016-04-23 18:04:49 +00:00
CWorld(IObjectStore& objStore, CResFactory& resFactory, ResId);
2016-04-24 02:46:13 +00:00
bool DoesAreaExist(TAreaId area) const;
2016-04-19 00:17:49 +00:00
std::vector<std::unique_ptr<CGameArea>>& GetGameAreas() {return x18_areas;}
};
}
#endif // __URDE_CWORLD_HPP__
2016-04-23 18:04:49 +00:00