载入中...
搜索中...
未找到
TileConfig.cpp 文件参考
#include "map/TileConfig.h"
#include "map/TileOrientation.h"
#include "common/Module.h"
#include "data/DataModule.h"
#include "data/JsonDocument.h"
#include "filesystem/Filesystem.h"
#include "filesystem/FileData.h"
#include "filesystem/HotReload.h"
#include "graphics/Graphics.h"
#include <Poco/Dynamic/Var.h>
#include <Poco/JSON/Array.h>
#include <Poco/JSON/Object.h>
#include <algorithm>
#include <memory>

浏览源代码.

命名空间

namespace  eve
 
namespace  eve::map
 放置世界:格子占用(多通道)+ 地形语义 + 已放置建筑实例。 行为由 PlacementSystem 提供;本类暴露便于脚本绑定的薄封装方法。 坐标换算统一走 eve::grid(支持 rectangle / iso / staggered / hex 与 XY/XZ 平面轴)。
 

函数

bool eve::map::applyConfigDocument (TileLayer *layer, data::JsonDocument *doc)
 Apply map/layer JSON onto an existing TileLayer (Config + Tiles + Tileset + Draw). Multi-layer documents only apply the first tile layer when called on one entity.
 
bool eve::map::applyConfigText (TileLayer *layer, const std::string &json, std::string *error=nullptr)
 Parse JSON text and apply onto one layer.
 
bool eve::map::loadConfigFile (TileLayer *layer, const std::string &path, std::string *error=nullptr)
 Read path via Filesystem, apply onto layer, bind Resource.path + modtime for hot reload. If the document has multiple tile layers, only the first is applied to layer.
 
bool eve::map::reloadConfigFile (TileLayer *layer, std::string *error)
 
std::vector< TileLayer * > eve::map::loadMapText (const std::string &json, std::vector< MapObject > *objects, std::string *error=nullptr)
 Parse map JSON text (no filesystem). Same semantics as loadMapFile.
 
std::vector< TileLayer * > eve::map::loadMapFile (const std::string &path, std::vector< MapObject > *objects, std::string *error)
 
std::vector< TileLayer * > eve::map::loadMapFile (const std::string &path, std::string *error=nullptr)
 Load a (possibly multi-layer) map JSON. Creates one TileLayer per tile layer. Optionally fills objects from objectgroup layers. Returns created layers (empty on failure). All share the same Resource.path for reload.
 

变量说明

◆ columns

◆ firstGid

int firstGid = 1

在文件 TileConfig.cpp112 行定义.

被这些函数引用 eve::map::resolveDualGrid() , 以及 eve::map::TileLayer::setTileset().

◆ image

std::string image

在文件 TileConfig.cpp111 行定义.

被这些函数引用 eve::ui::UI::addImage() , 以及 eve::ui::image().

◆ margin

◆ spacing

◆ tileH

◆ tileW