Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
MapReader.cpp File Reference
#include "precompiled.h"
#include "MapReader.h"
#include "graphics/Camera.h"
#include "graphics/CinemaManager.h"
#include "graphics/Entity.h"
#include "graphics/GameView.h"
#include "graphics/MapGenerator.h"
#include "graphics/Patch.h"
#include "graphics/Terrain.h"
#include "graphics/TerrainTextureEntry.h"
#include "graphics/TerrainTextureManager.h"
#include "lib/timer.h"
#include "maths/MathUtil.h"
#include "ps/CLogger.h"
#include "ps/Loader.h"
#include "ps/Profiler2.h"
#include "ps/TaskManager.h"
#include "ps/World.h"
#include "ps/XML/Xeromyces.h"
#include "renderer/PostprocManager.h"
#include "renderer/SkyManager.h"
#include "renderer/WaterManager.h"
#include "scriptinterface/Object.h"
#include "scriptinterface/ScriptContext.h"
#include "scriptinterface/ScriptInterface.h"
#include "scriptinterface/ScriptRequest.h"
#include "scriptinterface/JSON.h"
#include "simulation2/Simulation2.h"
#include "simulation2/components/ICmpCinemaManager.h"
#include "simulation2/components/ICmpGarrisonHolder.h"
#include "simulation2/components/ICmpObstruction.h"
#include "simulation2/components/ICmpOwnership.h"
#include "simulation2/components/ICmpPlayer.h"
#include "simulation2/components/ICmpPlayerManager.h"
#include "simulation2/components/ICmpPosition.h"
#include "simulation2/components/ICmpTerrain.h"
#include "simulation2/components/ICmpTurretHolder.h"
#include "simulation2/components/ICmpVisual.h"
#include "simulation2/components/ICmpWaterManager.h"
#include <boost/algorithm/string/predicate.hpp>
Include dependency graph for MapReader.cpp:

Classes

class  CXMLReader
 
struct  CMapReader::GeneratorState
 

Macros

#define EL(x)   int el_##x = xmb_file.GetElementID(#x)
 
#define AT(x)   int at_##x = xmb_file.GetAttributeID(#x)
 
#define EL(x)   el_##x = xmb_file.GetElementID(#x)
 
#define AT(x)   at_##x = xmb_file.GetAttributeID(#x)
 
#define AT(x)   int at_##x = xmb_file.GetAttributeID(#x)
 
#define EL(x)   int el_##x = xmb_file.GetElementID(#x)
 
#define AT(x)   int at_##x = xmb_file.GetAttributeID(#x)
 
#define READ_COLOR(el, out)
 
#define READ_FLOAT(el, out)
 
#define EL(x)   int el_##x = xmb_file.GetElementID(#x)
 
#define AT(x)   int at_##x = xmb_file.GetAttributeID(#x)
 
#define EL(x)   int el_##x = xmb_file.GetElementID(#x)
 
#define AT(x)   int at_##x = xmb_file.GetAttributeID(#x)
 
#define GET_TERRAIN_PROPERTY(val, prop, out)
 
#define GET_ENVIRONMENT_PROPERTY(val, prop, out)
 
#define GET_CAMERA_PROPERTY(val, prop, out)
 

Functions

void ThrowMapGenerationError ()
 

Variables

constexpr int MAP_GENERATION_CONTEXT_SIZE {96 * MiB}
 

Macro Definition Documentation

◆ AT [1/6]

#define AT (   x)    int at_##x = xmb_file.GetAttributeID(#x)

◆ AT [2/6]

#define AT (   x)    at_##x = xmb_file.GetAttributeID(#x)

◆ AT [3/6]

#define AT (   x)    int at_##x = xmb_file.GetAttributeID(#x)

◆ AT [4/6]

#define AT (   x)    int at_##x = xmb_file.GetAttributeID(#x)

◆ AT [5/6]

#define AT (   x)    int at_##x = xmb_file.GetAttributeID(#x)

◆ AT [6/6]

#define AT (   x)    int at_##x = xmb_file.GetAttributeID(#x)

◆ EL [1/5]

#define EL (   x)    int el_##x = xmb_file.GetElementID(#x)

◆ EL [2/5]

#define EL (   x)    el_##x = xmb_file.GetElementID(#x)

◆ EL [3/5]

#define EL (   x)    int el_##x = xmb_file.GetElementID(#x)

◆ EL [4/5]

#define EL (   x)    int el_##x = xmb_file.GetElementID(#x)

◆ EL [5/5]

#define EL (   x)    int el_##x = xmb_file.GetElementID(#x)

◆ GET_CAMERA_PROPERTY

#define GET_CAMERA_PROPERTY (   val,
  prop,
  out 
)
Value:
if (!Script::GetProperty(rq, val, #prop, out))\
LOGWARNING("CMapReader::ParseCamera() failed to get '%s' property", #prop);
bool GetProperty(const ScriptRequest &rq, JS::HandleValue obj, PropType name, JS::MutableHandleValue out)
Get the named property on the given object.
Definition: Object.h:37
static void out(const wchar_t *fmt,...)
Definition: wdbg_sym.cpp:407

◆ GET_ENVIRONMENT_PROPERTY

#define GET_ENVIRONMENT_PROPERTY (   val,
  prop,
  out 
)
Value:
if (!Script::GetProperty(rq, val, #prop, out))\
LOGWARNING("CMapReader::ParseEnvironment() failed to get '%s' property", #prop);

◆ GET_TERRAIN_PROPERTY

#define GET_TERRAIN_PROPERTY (   val,
  prop,
  out 
)
Value:
if (!Script::GetProperty(rq, val, #prop, out))\
{ LOGERROR("CMapReader::ParseTerrain() failed to get '%s' property", #prop);\
throw PSERROR_Game_World_MapLoadFailed("Error parsing terrain data.\nCheck application log for details"); }
#define LOGERROR(...)
Definition: CLogger.h:37
Definition: Errors.cpp:37

◆ READ_COLOR

#define READ_COLOR (   el,
  out 
)
Value:
else if (water_element_name == el) \
{ \
XMBAttributeList colorAttrs = waterelement.GetAttributes(); \
out = CColor( \
colorAttrs.GetNamedItem(at_r).ToFloat(), \
colorAttrs.GetNamedItem(at_g).ToFloat(), \
colorAttrs.GetNamedItem(at_b).ToFloat(), \
1.f); \
}
Definition: Color.h:43

◆ READ_FLOAT

#define READ_FLOAT (   el,
  out 
)
Value:
else if (water_element_name == el) \
{ \
out = waterelement.GetText().ToFloat(); \
} \

Function Documentation

◆ ThrowMapGenerationError()

void ThrowMapGenerationError ( )

Variable Documentation

◆ MAP_GENERATION_CONTEXT_SIZE

constexpr int MAP_GENERATION_CONTEXT_SIZE {96 * MiB}
constexpr