Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/MapWriter.cpp
Show All 21 Lines | |||||
#include "GameView.h" | #include "GameView.h" | ||||
#include "LightEnv.h" | #include "LightEnv.h" | ||||
#include "MapReader.h" | #include "MapReader.h" | ||||
#include "MapWriter.h" | #include "MapWriter.h" | ||||
#include "Patch.h" | #include "Patch.h" | ||||
#include "Terrain.h" | #include "Terrain.h" | ||||
#include "TerrainTextureEntry.h" | #include "TerrainTextureEntry.h" | ||||
#include "TerrainTextureManager.h" | #include "TerrainTextureManager.h" | ||||
#include "Unit.h" | |||||
#include "maths/MathUtil.h" | #include "maths/MathUtil.h" | ||||
#include "maths/NUSpline.h" | #include "maths/NUSpline.h" | ||||
#include "ps/CLogger.h" | #include "ps/CLogger.h" | ||||
#include "ps/Loader.h" | #include "ps/Loader.h" | ||||
#include "ps/Filesystem.h" | #include "ps/Filesystem.h" | ||||
#include "ps/XML/XMLWriter.h" | #include "ps/XML/XMLWriter.h" | ||||
#include "renderer/PostprocManager.h" | #include "renderer/PostprocManager.h" | ||||
▲ Show 20 Lines • Show All 344 Lines • ▼ Show 20 Lines | if (!sim.GetStartupScript().empty()) | ||||
obstructionTag.Attribute("group2", group2); | obstructionTag.Attribute("group2", group2); | ||||
} | } | ||||
} | } | ||||
CmpPtr<ICmpVisual> cmpVisual(sim, ent); | CmpPtr<ICmpVisual> cmpVisual(sim, ent); | ||||
if (cmpVisual) | if (cmpVisual) | ||||
{ | { | ||||
entity_id_t seed = static_cast<entity_id_t>(cmpVisual->GetActorSeed()); | entity_id_t seed = static_cast<entity_id_t>(cmpVisual->GetActorSeed()); | ||||
XMLWriter_Element actorTag(xmlMapFile, "Actor"); | |||||
if (seed != ent) | if (seed != ent) | ||||
{ | { | ||||
XMLWriter_Element actorTag(xmlMapFile, "Actor"); | |||||
actorTag.Attribute("seed",seed); | actorTag.Attribute("seed",seed); | ||||
Silier: please remove { } | |||||
} | } | ||||
// TODO: variation/selection strings | |||||
CUnit* unit = cmpVisual->GetUnit(); | |||||
if (unit) | |||||
{ | |||||
const std::set<CStr>& selections = unit->GetActorSelections(); | |||||
if (!selections.empty()) | |||||
{ | |||||
std::string sSelections; | |||||
for (const CStr& selection : selections) | |||||
{ | |||||
if (!sSelections.empty()) | |||||
{ | |||||
Done Inline Actionsremove { } Silier: remove { } | |||||
sSelections += "|"; | |||||
} | |||||
sSelections += selection; | |||||
} | |||||
actorTag.Attribute("variation", sSelections); | |||||
} | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } | ||||
CmpPtr<ICmpCinemaManager> cmpCinemaManager(sim, SYSTEM_ENTITY); | CmpPtr<ICmpCinemaManager> cmpCinemaManager(sim, SYSTEM_ENTITY); | ||||
if (cmpCinemaManager) | if (cmpCinemaManager) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
please remove { }