18 #include "precompiled.h"
39 m_HasBaseColor(false),
40 m_TextureAngle((float)
M_PI / 4.f),
42 m_MovementClass(
"default")
58 if (rootName !=
"Terrains")
61 L
"TerrainProperties: Loading %ls: Root node is not terrains (found \"%hs\")",
67 #define ELMT(x) int el_##x = XeroFile.GetElementID(#x)
77 if (child.GetNodeName() == el_terrain)
80 ret->LoadXml(child, &XeroFile, pathname);
86 L
"TerrainProperties: Loading %ls: Unexpected node %hs\n",
98 #define ELMT(x) int elmt_##x = pFile->GetElementID(#x)
99 #define ATTR(x) int attr_##x = pFile->GetAttributeID(#x)
111 if (attr.Name == attr_groups)
131 else if (attr.Name == attr_mmap)
139 baseColor[0] = (
u8)(col.
b*255);
140 baseColor[1] = (
u8)(col.
g*255);
141 baseColor[2] = (
u8)(col.
r*255);
142 baseColor[3] = (
u8)(col.
a*255);
145 else if (attr.Name == attr_angle)
149 else if (attr.Name == attr_size)
153 else if (attr.Name == attr_movementclass)
shared_ptr< CTerrainProperties > CTerrainPropertiesPtr
CTerrainPropertiesPtr m_pParent
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
PSRETURN Load(const PIVFS &vfs, const VfsPath &filename)
Load from an XML file (with invisible XMB caching).
#define XERO_ITER_ATTR(parent_element, attribute)
const PSRETURN PSRETURN_OK
#define XERO_ITER_EL(parent_element, child_element)
void LoadXml(XMBElement node, CXeromyces *pFile, const VfsPath &pathname)
bool ParseString(const CStr8 &Value, float DefaultAlpha)
static CTerrainPropertiesPtr FromXML(const CTerrainPropertiesPtr &parent, const VfsPath &pathname)
CTerrainProperties(CTerrainPropertiesPtr parent)
void * mmap(void *start, size_t len, int prot, int flags, int fd, off_t ofs)
const String & string() const
std::string GetElementString(const int ID) const
bool ParseString(const CParser &parser, const std::string &line)
bool GetArgString(size_t arg, std::string &ret)
XMBElement GetRoot() const
size_t GetArgCount() const
bool InputTaskType(const std::string &strName, const std::string &strSyntax)