载入中...
搜索中...
未找到
TileConfig.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include "common/Json.h"
6#include "common/Result.h"
7#include "map/MapObject.h"
8#include "map/TileLayer.h"
9
10#include <string>
11#include <vector>
12
13namespace eve::map {
14
17 std::vector<TileLayer *> layers;
20 std::string sourceEngine;
21 int tilesetId = 0;
22};
23
30
32EVENGINE_API_WORLD bool applyConfigText(TileLayer *layer, const std::string &json, std::string *error = nullptr);
33
38bool loadConfigFile(TileLayer *layer, const std::string &path, std::string *error = nullptr);
39
41bool reloadConfigFile(TileLayer *layer, std::string *error = nullptr);
42
48bool loadTilesetManifestFile(TileLayer *layer, const std::string &path,
49 std::string *error = nullptr);
50
56EVENGINE_API_WORLD std::vector<TileLayer *> loadMapFile(const std::string &path, std::string *error = nullptr);
58EVENGINE_API_WORLD std::vector<TileLayer *> loadMapFile(const std::string &path, std::vector<MapObject> *objects,
59 std::string *error = nullptr);
60
62EVENGINE_API_WORLD std::vector<TileLayer *> loadMapText(const std::string &json, std::vector<MapObject> *objects,
63 std::string *error = nullptr);
64
71 const std::string &mapPath, const std::string &tilesetsPath, const std::string &sourceEngine = "RPG Maker MV/MZ");
72
75
76} // namespace eve::map
int root
Definition AnimSmr.cpp:119
#define EVENGINE_API_WORLD
Definition Export.h:109
std::string error
Definition Package.cpp:60
TileLayer * layer
std::string path
Definition PlayHost.cpp:110
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
EVENGINE_API_FOUNDATION public API.
Definition Json.h:38
ECS tile layer entity. Script mutates tile GIDs / tileset / draw; TileRenderSystem batch-draws atlas ...
Definition TileLayer.h:32
放置世界:格子占用(多通道)+ 地形语义 + 已放置建筑实例。 行为由 PlacementSystem 提供;本类暴露便于脚本绑定的薄封装方法。 坐标换算统一走 eve::grid(支持 rectang...
eve::Result< void > applyConfigDocument(TileLayer *layer, eve::json::Value root)
Apply map/layer JSON onto an existing TileLayer (Config + Tiles + Tileset + Draw)....
std::vector< TileLayer * > loadMapText(const std::string &json, std::vector< MapObject > *objects, std::string *error)
Parse map JSON text (no filesystem). Same semantics as loadMapFile.
bool loadTilesetManifestFile(TileLayer *layer, const std::string &path, std::string *error)
Load a composable TileSet manifest onto an existing layer.
bool reloadConfigFile(TileLayer *layer, std::string *error)
Reloads config file.
bool applyConfigText(TileLayer *layer, const std::string &json, std::string *error)
Parse JSON text and apply onto one layer.
std::vector< TileLayer * > loadMapFile(const std::string &path, std::vector< MapObject > *objects, std::string *error)
Loads map file.
EVENGINE_API_WORLD TileLayer::Tileset::Visual decodeRpgMakerTileVisual(int tileId)
Decodes one MV/MZ tile id into normal or quarter-tile atlas projections.
bool loadConfigFile(TileLayer *layer, const std::string &path, std::string *error)
Read path via Filesystem, apply onto layer, bind Resource.path + modtime for hot reload....
EVENGINE_API_WORLD eve::Result< RpgMakerImportReceipt > importRpgMakerMap(const std::string &mapPath, const std::string &tilesetsPath, const std::string &sourceEngine="RPG Maker MV/MZ")
Imports RPG Maker MV/MZ MapXXX.json plus Tilesets.json without modifying the project....
Transactional RPG Maker MV/MZ import receipt.
Definition TileConfig.h:16
std::vector< TileLayer * > layers
Definition TileConfig.h:17
Per-GID visual metadata emitted by a project-defined asset pipeline.
Definition TileLayer.h:109