2016-04-17 22:38:05 +00:00
|
|
|
#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
|
|
|
|
2016-04-17 22:38:05 +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;
|
2016-04-17 22:38:05 +00:00
|
|
|
|
|
|
|
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;}
|
2016-04-17 22:38:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CWORLD_HPP__
|
2016-04-23 18:04:49 +00:00
|
|
|
|