metaforce/Runtime/CSaveWorld.hpp

53 lines
1.4 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-06-23 19:40:09 +00:00
2016-07-24 01:51:15 +00:00
#include "RetroTypes.hpp"
2016-07-24 07:39:58 +00:00
#include "DNACommon/SAVWCommon.hpp"
#include "CFactoryMgr.hpp"
2016-07-24 01:51:15 +00:00
2016-06-23 19:40:09 +00:00
namespace urde
{
2016-07-24 07:39:58 +00:00
2016-06-23 19:40:09 +00:00
class CSaveWorld
{
2016-07-24 07:39:58 +00:00
public:
using EScanCategory = DataSpec::SAVWCommon::EScanCategory;
struct SScanState
{
2017-08-13 05:26:14 +00:00
CAssetId x0_id;
2016-07-24 07:39:58 +00:00
EScanCategory x4_category;
};
struct SLayerState
{
TAreaId x0_area;
u32 x4_layer;
};
private:
u32 x0_areaCount;
std::vector<TEditorId> x4_cinematics;
std::vector<TEditorId> x14_relays;
std::vector<SLayerState> x24_layers;
std::vector<TEditorId> x34_doors;
std::vector<SScanState> x44_scans;
public:
2016-06-23 19:40:09 +00:00
CSaveWorld(CInputStream& in);
2016-07-24 07:39:58 +00:00
u32 GetAreaCount() const;
u32 GetCinematicCount() const;
s32 GetCinematicIndex(const TEditorId& id) const;
2016-09-25 01:58:20 +00:00
const std::vector<TEditorId>& GetCinematics() const { return x4_cinematics; }
2017-02-08 06:48:43 +00:00
const std::vector<TEditorId>& GetDoors() const { return x34_doors; }
const std::vector<SScanState>& GetScans() const { return x44_scans; }
2016-07-24 07:39:58 +00:00
u32 GetRelayCount() const;
s32 GetRelayIndex(const TEditorId& id) const;
2016-07-24 23:14:58 +00:00
TEditorId GetRelayEditorId(u32 idx) const;
2016-07-24 07:39:58 +00:00
u32 GetDoorCount() const;
s32 GetDoorIndex(const TEditorId &id) const;
2016-06-23 19:40:09 +00:00
};
CFactoryFnReturn FSaveWorldFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& param,
CObjectReference* selfRef);
2016-06-23 19:40:09 +00:00
}