metaforce/Runtime/AutoMapper/CMapWorldInfo.hpp

37 lines
1.2 KiB
C++
Raw Normal View History

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