2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 15:47:46 +00:00

CAutoMapper work

This commit is contained in:
Jack Andersen
2017-04-15 19:52:43 -10:00
parent 6056857cab
commit c3f04bcbaa
14 changed files with 662 additions and 75 deletions

View File

@@ -1,4 +1,5 @@
#include "CMapWorld.hpp"
#include "CMapWorldInfo.hpp"
namespace urde
{
@@ -38,9 +39,21 @@ s32 CMapWorld::GetCurrentMapAreaDepth(const IWorld& wld, TAreaId aid) const
return info.back().GetDepth();
}
void CMapWorld::GetVisibleAreas(const IWorld&, const CMapWorldInfo&) const
std::vector<TAreaId> CMapWorld::GetVisibleAreas(const IWorld& wld, const CMapWorldInfo& mwInfo) const
{
std::vector<TAreaId> ret;
ret.reserve(x0_areas.size());
for (int i=0 ; i<x0_areas.size() ; ++i)
{
if (!IsMapAreaValid(wld, i, true))
continue;
const CMapArea* area = GetMapArea(i);
bool areaVis = mwInfo.IsAreaVisible(i);
bool worldVis = mwInfo.IsWorldVisible(i);
if (area->GetIsVisibleToAutoMapper(worldVis, areaVis))
ret.push_back(i);
}
return ret;
}
void CMapWorld::Draw(const CMapWorld::CMapWorldDrawParms&, int, int, float, float, bool) const