2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2015-08-17 05:26:58 +00:00
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
|
|
|
|
2022-02-16 05:21:24 +00:00
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "IOStreams.hpp"
|
2016-04-22 20:22:45 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2021-06-05 05:27:52 +00:00
|
|
|
class CWorldSaveGameInfo;
|
2016-09-25 01:58:20 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMapWorldInfo {
|
2020-04-05 10:36:15 +00:00
|
|
|
mutable u32 x0_visitedAreasAllocated = 0;
|
|
|
|
mutable std::vector<u32> x4_visitedAreas;
|
|
|
|
mutable u32 x14_mappedAreasAllocated = 0;
|
|
|
|
mutable std::vector<u32> x18_mappedAreas;
|
2018-12-08 05:30:43 +00:00
|
|
|
std::map<TEditorId, bool> x28_visitedDoors;
|
|
|
|
bool x38_mapStationUsed = false;
|
|
|
|
|
2016-04-22 20:22:45 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMapWorldInfo() = default;
|
2021-06-05 05:27:52 +00:00
|
|
|
explicit CMapWorldInfo(CBitStreamReader& reader, const CWorldSaveGameInfo& saveWorld, CAssetId mlvlId);
|
|
|
|
void PutTo(CBitStreamWriter& writer, const CWorldSaveGameInfo& savw, CAssetId mlvlId) const;
|
2020-04-10 17:25:44 +00:00
|
|
|
bool IsMapped(TAreaId aid) const;
|
|
|
|
void SetIsMapped(TAreaId aid, bool mapped);
|
2018-12-08 05:30:43 +00:00
|
|
|
void SetDoorVisited(TEditorId eid, bool val);
|
|
|
|
bool IsDoorVisited(TEditorId eid) const;
|
2020-04-10 17:25:44 +00:00
|
|
|
bool IsAreaVisited(TAreaId aid) const;
|
|
|
|
void SetAreaVisited(TAreaId aid, bool visited);
|
|
|
|
bool IsWorldVisible(TAreaId aid) const;
|
|
|
|
bool IsAreaVisible(TAreaId aid) const;
|
2018-12-08 05:30:43 +00:00
|
|
|
bool IsAnythingSet() const;
|
2021-05-27 14:26:13 +00:00
|
|
|
bool GetMapStationUsed() const { return x38_mapStationUsed; }
|
2020-04-10 17:25:44 +00:00
|
|
|
void SetMapStationUsed(bool isUsed) { x38_mapStationUsed = isUsed; }
|
2015-08-17 05:26:58 +00:00
|
|
|
};
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|