2016-08-09 03:58:19 +00:00
|
|
|
#include "CMapWorld.hpp"
|
2017-04-16 05:52:43 +00:00
|
|
|
#include "CMapWorldInfo.hpp"
|
2016-08-09 03:58:19 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
2016-10-08 20:32:36 +00:00
|
|
|
|
|
|
|
CMapWorld::CMapWorld(CInputStream& in)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-04-15 05:32:25 +00:00
|
|
|
void CMapWorld::IsMapAreaInBFSInfoVector(const CMapWorld::CMapAreaData*, const std::vector<CMapWorld::CMapAreaBFSInfo>&) const
|
2016-08-09 03:58:19 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-04-15 05:32:25 +00:00
|
|
|
void CMapWorld::SetWhichMapAreasLoaded(const IWorld&, int start, int count)
|
2016-08-09 03:58:19 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CMapWorld::IsMapAreasStreaming() const
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-04-15 05:32:25 +00:00
|
|
|
void CMapWorld::MoveMapAreaToList(CMapWorld::CMapAreaData*, CMapWorld::EMapAreaList)
|
2016-08-09 03:58:19 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-04-15 05:32:25 +00:00
|
|
|
s32 CMapWorld::GetCurrentMapAreaDepth(const IWorld& wld, TAreaId aid) const
|
2016-08-09 03:58:19 +00:00
|
|
|
{
|
2017-04-15 05:32:25 +00:00
|
|
|
ClearTraversedFlags();
|
|
|
|
std::vector<CMapAreaBFSInfo> info;
|
|
|
|
info.reserve(x0_areas.size());
|
|
|
|
DoBFS(wld, aid, 9999, 9999.f, 9999.f, false, info);
|
|
|
|
if (info.empty())
|
|
|
|
return 0;
|
|
|
|
return info.back().GetDepth();
|
2016-08-09 03:58:19 +00:00
|
|
|
}
|
|
|
|
|
2017-04-16 05:52:43 +00:00
|
|
|
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;
|
2016-08-09 03:58:19 +00:00
|
|
|
}
|
|
|
|
|
2017-04-15 05:32:25 +00:00
|
|
|
void CMapWorld::Draw(const CMapWorld::CMapWorldDrawParms&, int, int, float, float, bool) const
|
2016-08-09 03:58:19 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-04-15 05:32:25 +00:00
|
|
|
void CMapWorld::DoBFS(const IWorld&, TAreaId, int, float, float, bool, std::vector<CMapAreaBFSInfo>&) const
|
2016-08-09 03:58:19 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CMapWorld::IsMapAreaValid(const IWorld &, int, bool) const
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-04-15 05:32:25 +00:00
|
|
|
void CMapWorld::DrawAreas(const CMapWorld::CMapWorldDrawParms&, int, const std::vector<CMapWorld::CMapAreaBFSInfo>&, bool) const
|
2016-08-09 03:58:19 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-04-15 05:32:25 +00:00
|
|
|
void CMapWorld::RecalculateWorldSphere(const CMapWorldInfo&, const IWorld&) const
|
2016-08-09 03:58:19 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-04-15 05:32:25 +00:00
|
|
|
zeus::CVector3f CMapWorld::ConstrainToWorldVolume(const zeus::CVector3f&, const zeus::CVector3f&) const
|
2016-08-09 03:58:19 +00:00
|
|
|
{
|
2017-04-15 05:32:25 +00:00
|
|
|
return {};
|
2016-08-09 03:58:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CMapWorld::ClearTraversedFlags() const
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-10-08 20:32:36 +00:00
|
|
|
CFactoryFnReturn FMapWorldFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& param,
|
|
|
|
CObjectReference* selfRef)
|
|
|
|
{
|
|
|
|
return TToken<CMapWorld>::GetIObjObjectFor(std::make_unique<CMapWorld>(in));
|
|
|
|
}
|
|
|
|
|
2016-08-09 03:58:19 +00:00
|
|
|
}
|