2016-07-29 17:00:23 +00:00
|
|
|
#ifndef __URDE_CMAPAREA_HPP__
|
|
|
|
#define __URDE_CMAPAREA_HPP__
|
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
2016-07-31 01:43:34 +00:00
|
|
|
#include "CResFactory.hpp"
|
2016-07-29 17:00:23 +00:00
|
|
|
#include "zeus/CAABox.hpp"
|
|
|
|
#include "zeus/CVector3f.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
2017-03-20 05:09:53 +00:00
|
|
|
class CWorld;
|
2016-07-29 17:00:23 +00:00
|
|
|
class CMapArea
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
class CMapAreaSurface
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void PostConstruct(const void*);
|
|
|
|
void Draw(const zeus::CVector3f*, const zeus::CColor&, const zeus::CColor&, float) const;
|
|
|
|
const zeus::CVector3f& GetNormal() const;
|
|
|
|
const zeus::CVector3f& GetCenterPosition() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
2016-07-31 01:43:34 +00:00
|
|
|
u32 x0_magic;
|
|
|
|
u32 x4_version;
|
|
|
|
u32 x8_;
|
|
|
|
u32 xc_;
|
|
|
|
zeus::CAABox x10_box;
|
|
|
|
u32 x28_mappableObjCount;
|
|
|
|
u32 x2c_vertexCount;
|
|
|
|
u32 x30_surfaceCount;
|
|
|
|
u32 x34_size;
|
|
|
|
u8* x38_moStart;
|
|
|
|
u8* x3c_vertexStart;
|
2016-12-11 01:54:08 +00:00
|
|
|
u8* x40_surfaceStart;
|
2016-07-31 01:43:34 +00:00
|
|
|
std::unique_ptr<u8[]> x44_buf;
|
2016-07-29 17:00:23 +00:00
|
|
|
public:
|
2016-07-31 01:43:34 +00:00
|
|
|
CMapArea(CInputStream&, u32);
|
2016-07-29 17:00:23 +00:00
|
|
|
void PostConstruct();
|
|
|
|
bool GetIsVisibleToAutoMapper(bool, bool) const;
|
2017-03-20 05:09:53 +00:00
|
|
|
zeus::CVector3f GetAreaCenterPoint() const { return x10_box.center(); }
|
2016-07-29 17:00:23 +00:00
|
|
|
zeus::CAABox GetBoundingBox() const;
|
|
|
|
const zeus::CVector3f& GetVertices() const;
|
|
|
|
void GetMappableObject(s32) const;
|
|
|
|
void GetSurface(s32) const;
|
|
|
|
u32 GetNumMappableObjects() const;
|
|
|
|
u32 GetNumSurfaces() const;
|
2017-03-20 05:09:53 +00:00
|
|
|
zeus::CTransform GetAreaPostTransform(const CWorld& world, TAreaId aid) const;
|
2016-07-29 17:00:23 +00:00
|
|
|
};
|
2016-07-31 01:43:34 +00:00
|
|
|
|
2017-03-24 05:30:16 +00:00
|
|
|
CFactoryFnReturn FMapAreaFactory(const SObjectTag& objTag, CInputStream& in, const CVParamTransfer&,
|
|
|
|
CObjectReference*);
|
2016-07-29 17:00:23 +00:00
|
|
|
}
|
|
|
|
#endif // __URDE_CMAPAREA_HPP__
|