载入中...
搜索中...
未找到
eve::map 命名空间参考

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

类

struct  DualGridMaskAtlas
 Owning CPU result containing all 16 dual-grid masks and their signed-distance fields. 更多...
 
struct  DualGridMaskConfig
 Deterministic settings for the reusable 16-frame procedural transition-mask atlas. 更多...
 
struct  DualGridOptions
 Dual-grid autotile (Oskar Stålberg style). 更多...
 
struct  DualGridRgbaImage
 Owning RGBA8 image used by the renderer-neutral transition-atlas baker. 更多...
 
class  FlowField
 Integration + direction field for group pathfinding to a single goal. nextX/nextY point to the neighboring cell with lower cost (toward goal). At the goal, next points to itself. 更多...
 
class  Fov
 Dynamic field-of-view / fog-of-war facade. Phase A: 2D shadowcast + multi-revealer + explored memory. Phase B: raycast/permissive, heightmap, volume, dirty-skip, CPU masks. Phase C: hex topology FOV, rectangle-based FOV, perception/stealth detection helpers, GPU mask Texture upload. 更多...
 
class  ITileCollisionSink
 Optional sink implemented by a physics or project adapter. 更多...
 
class  Map
 Map module — factory + script binding for 2D tilemaps. Per-frame: TileConfigSystem (hot reload) → unified sprite+tile render. Pathfinding: newPathfinder / newPathfinderSize → A* + Flow Field group paths. FOV: newFov / newFovSize → shadowcast visibility + explored memory. 更多...
 
struct  MapArtifactHandleTag
 Owner tag for map artifact runtime handles. 更多...
 
class  MapArtifactProvider
 Real map-module provider for generated grid publication. 更多...
 
struct  MapArtifactRecord
 Queryable map record containing the copied semantic topology. 更多...
 
class  MapArtifactStage
 
struct  MapObject
 A named, typed rectangle object from a Tiled objectgroup layer. Used by Map::setObjects / getObject* for gameplay spawn points, triggers, etc. 更多...
 
class  Path
 Ordered tile-index waypoints from start to goal (inclusive). 更多...
 
class  Pathfinder
 Pathfinding facade. Single-agent: A*. Group (same goal): Flow Field + follow. Grid/topology internals stay out of the public ABI (Windows export limit). 更多...
 
struct  RpgMakerImportReceipt
 Transactional RPG Maker MV/MZ import receipt. 更多...
 
struct  TileCollisionRect
 One greedily merged solid tile rectangle in world coordinates. 更多...
 
class  TileConfigSystem
 Polls bound config files (Resource.path) and hot-reloads when modtime changes. Returns number of layers reloaded. 更多...
 
class  TileLayer
 ECS tile layer entity. Script mutates tile GIDs / tileset / draw; TileRenderSystem batch-draws atlas quads (or solid debug colors when no texture). 更多...
 
class  TileRenderSystem
 Draws all visible TileLayer entities via Graphics batch path (UV atlas quads). 更多...
 

类型定义

using MapArtifactHandle = eve::RuntimeHandle< MapArtifactHandleTag >
 Generation-qualified handle for a map artifact record.
 

枚举

enum class  MapOrientation { Orthogonal , Isometric , Staggered , Hexagonal }
 Tile map layout: orthogonal, isometric, staggered, or hexagonal. 更多...
 
enum class  StaggerAxis { X , Y }
 Stagger axis for staggered/hex maps (shift every other row/column). 更多...
 
enum class  StaggerIndex { Odd , Even }
 Which rows/columns are offset by half a tile. 更多...
 

函数

const eve::Value * member (const eve::Value::Object &object, const char *name) noexcept
 
bool readString (const eve::Value::Object &object, const char *name, std::string &output)
 
bool readU64 (const eve::Value::Object &object, const char *name, std::uint64_t &output)
 
bool readI64 (const eve::Value::Object &object, const char *name, std::int64_t &output)
 
bool hasSupportedVersion (const eve::Value::Object &object) noexcept
 
MapArtifactProvider & mapArtifactProvider () noexcept
 Return the process-owned map artifact provider singleton.
 
void registerMapArtifactProvider ()
 Register the map provider in the common capability registry.
 
eve::Result< DualGridMaskAtlas > generateDualGridMaskAtlas (const DualGridMaskConfig &config)
 Generate the complete reusable 16-frame dual-grid mask atlas.
 
eve::Result< DualGridRgbaImage > bakeDualGridTransitionAtlas (const DualGridRgbaImage &terrainA, const DualGridRgbaImage &terrainB, const DualGridMaskConfig &config)
 Bake two ordinary same-size RGBA8 tiles into a row-major 4x4 transition atlas.
 
const std::array< int, 16 > & dualGridDefaultFrameTable ()
 Copy of the default frame table (16 entries).
 
int dualGridDefaultFrame (int mask)
 Default 4x4 atlas frame index for mask 0..15. -1 means draw nothing. Matches the SpriteCook / common dual-grid sheet layout.
 
void dualGridHalfOffset (const TileLayer::Config &cfg, float &offX, float &offY)
 Half-step origin delta for the display layer (added to logic origin). Orthogonal: (-tileW/2, -tileH/2) Isometric: (0, -tileH/2) — equivalent to logic coords (tx-0.5, ty-0.5) Staggered/Hex Y: (-tileW/2, -pitchY/2) Staggered/Hex X: (-pitchX/2, -tileH/2)
 
bool dualGridLogicFilled (TileLayer &logic, int tx, int ty, int filledGid)
 Whether logic cell (tx,ty) is filled under options. Out of bounds → false.
 
int dualGridMaskAt (TileLayer &logic, int dx, int dy, int filledGid=0)
 4-bit corner mask for display cell (dx,dy) on a (logicW+1)×(logicH+1) grid. Samples logic (dx-1,dy-1), (dx,dy-1), (dx-1,dy), (dx,dy) in index space (orientation-independent topology).
 
bool resolveDualGrid (TileLayer *logic, TileLayer *display, const DualGridOptions &opts, std::string *error=nullptr)
 Resolve logic → display dual-grid tiles. Resizes display to (logicW+1)×(logicH+1), copies tile size / orientation / stagger / hex from logic, optionally applies projection-correct half-step origin offset, writes GIDs. Returns false and sets error on invalid args.
 
bool resolveDualGrid (TileLayer *logic, TileLayer *display, std::string *error=nullptr)
 Convenience: any non-zero filled, default frame table, half offset, hide logic.
 
int dualGridMaskFromCorners (bool tl, bool tr, bool bl, bool br)
 Pack four corner occupancy bits: TL=1, TR=2, BL=4, BR=8.
 
 Module_IMPL (Map, new Map())
 
eve::Result< void > validateMapObjects (std::span< const MapObject > objects, std::string_view contractJson)
 Validate map objects against an owning JSON content contract.
 
eve::Result< void > applyConfigDocument (TileLayer *layer, eve::json::Value root)
 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 applyConfigText (TileLayer *layer, const std::string &json, std::string *error=nullptr)
 Parse JSON text and apply onto one layer.
 
bool 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 reloadConfigFile (TileLayer *layer, std::string *error=nullptr)
 Reloads config file.
 
bool loadTilesetManifestFile (TileLayer *layer, const std::string &path, std::string *error=nullptr)
 Load a composable TileSet manifest onto an existing layer.
 
std::vector< TileLayer * > 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 * > loadMapFile (const std::string &path, std::vector< MapObject > *objects, std::string *error=nullptr)
 Loads map file.
 
std::vector< TileLayer * > 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.
 
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. @ownership Returned layer entities are owned by the ECS world, as with loadMapFile. @thread Main-thread affine and non-reentrant.
 
EVENGINE_API_WORLD TileLayer::Tileset::Visual decodeRpgMakerTileVisual (int tileId)
 Decodes one MV/MZ tile id into normal or quarter-tile atlas projections.
 
uint32_t tileGid (uint32_t raw)
 Strip Tiled flip / rotate flags; keep low 28 bits.
 
void tileToWorld (const TileLayer::Config &cfg, int tx, int ty, float &wx, float &wy)
 Converts a tile index to world pixels using the layer's projection.
 
float tileToDepthY (const TileLayer::Config &cfg, int tx, int ty)
 Painter's-algorithm depth for the tile under the layer's projection.
 
void worldToTile (const TileLayer::Config &cfg, float wx, float wy, int &tx, int &ty)
 Converts world pixels back to the containing tile index.
 

详细描述

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

类型定义说明

◆ MapArtifactHandle

Generation-qualified handle for a map artifact record.

在文件 ArtifactProvider.h 第 22 行定义.

枚举类型说明

◆ MapOrientation

enum class eve::map::MapOrientation
strong

Tile map layout: orthogonal, isometric, staggered, or hexagonal.

枚举值
Orthogonal 
Isometric 
Staggered 
Hexagonal 

在文件 TileOrientation.h 第 6 行定义.

◆ StaggerAxis

enum class eve::map::StaggerAxis
strong

Stagger axis for staggered/hex maps (shift every other row/column).

枚举值
X 
Y 

在文件 TileOrientation.h 第 8 行定义.

◆ StaggerIndex

enum class eve::map::StaggerIndex
strong

Which rows/columns are offset by half a tile.

枚举值
Odd 
Even 

在文件 TileOrientation.h 第 10 行定义.

函数说明

◆ applyConfigDocument()

eve::Result< void > eve::map::applyConfigDocument ( TileLayer *  layer,
eve::json::Value  root 
)

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.

返回
Success, or InvalidArgument / Failed when the root is unusable or layer data fails.

在文件 TileConfig.cpp 第 981 行定义.

引用了 code, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::map::TileLayer::getMapHeight(), eve::map::TileLayer::getMapWidth(), eve::InvalidArgument, layer, message, root , 以及 eve::Result< T >::success().

◆ applyConfigText()

EVENGINE_API_WORLD bool eve::map::applyConfigText ( TileLayer *  layer,
const std::string &  json,
std::string *  error 
)

Parse JSON text and apply onto one layer.

在文件 TileConfig.cpp 第 1011 行定义.

引用了 error, eve::map::TileLayer::getMapHeight(), eve::map::TileLayer::getMapWidth(), layer, eve::json::Document::parse() , 以及 root.

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

◆ bakeDualGridTransitionAtlas()

EVENGINE_API_WORLD eve::Result< DualGridRgbaImage > eve::map::bakeDualGridTransitionAtlas ( const DualGridRgbaImage &  terrainA,
const DualGridRgbaImage &  terrainB,
const DualGridMaskConfig &  config 
)

Bake two ordinary same-size RGBA8 tiles into a row-major 4x4 transition atlas.

Frame mask contains mix(terrainA, terrainB, generatedCoverage(mask)); mask 0 is terrain A and mask 15 is terrain B. The result can be uploaded as one normal tile atlas, so no authored autotile sprites or runtime custom shader are required.

参数
terrainAOwning/view snapshot whose byte count must be width*height*4.
terrainBSame dimensions and color space as terrainA.
configMask dimensions; these must match both input tiles.
返回
Owning 4*width by 4*height RGBA8 atlas, or a structured diagnostic. @cost O(16 * width * height), intended for import/load time and cacheable by content hash.

在文件 DualGrid.cpp 第 160 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), frameX, frameY, generateDualGridMaskAtlas(), eve::map::DualGridMaskConfig::height, eve::map::DualGridRgbaImage::height, eve::InvalidArgument, mask, eve::map::DualGridRgbaImage::pixels, source, eve::Result< T >::success(), target, eve::map::DualGridMaskConfig::width, eve::map::DualGridRgbaImage::width, x , 以及 y.

◆ decodeRpgMakerTileVisual()

EVENGINE_API_WORLD TileLayer::Tileset::Visual eve::map::decodeRpgMakerTileVisual ( int  tileId)

Decodes one MV/MZ tile id into normal or quarter-tile atlas projections.

◆ dualGridDefaultFrame()

EVENGINE_API_WORLD int eve::map::dualGridDefaultFrame ( int  mask)

Default 4x4 atlas frame index for mask 0..15. -1 means draw nothing. Matches the SpriteCook / common dual-grid sheet layout.

在文件 DualGrid.cpp 第 197 行定义.

引用了 mask.

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

◆ dualGridDefaultFrameTable()

EVENGINE_API_WORLD const std::array< int, 16 > & eve::map::dualGridDefaultFrameTable ( )

Copy of the default frame table (16 entries).

在文件 DualGrid.cpp 第 195 行定义.

◆ dualGridHalfOffset()

EVENGINE_API_WORLD void eve::map::dualGridHalfOffset ( const TileLayer::Config &  cfg,
float &  offX,
float &  offY 
)

Half-step origin delta for the display layer (added to logic origin). Orthogonal: (-tileW/2, -tileH/2) Isometric: (0, -tileH/2) — equivalent to logic coords (tx-0.5, ty-0.5) Staggered/Hex Y: (-tileW/2, -pitchY/2) Staggered/Hex X: (-pitchX/2, -tileH/2)

在文件 DualGrid.cpp 第 202 行定义.

引用了 Hexagonal, Isometric, eve::map::TileLayer::Config::orientation, Orthogonal, eve::map::TileLayer::Config::staggerAxis, Staggered, eve::map::TileLayer::Config::tileH, eve::map::TileLayer::Config::tileW , 以及 Y.

被这些函数引用 eve::map::Map::dualGridOffsetX(), eve::map::Map::dualGridOffsetY() , 以及 resolveDualGrid().

◆ dualGridLogicFilled()

bool eve::map::dualGridLogicFilled ( TileLayer &  logic,
int  tx,
int  ty,
int  filledGid 
)

Whether logic cell (tx,ty) is filled under options. Out of bounds → false.

在文件 DualGrid.cpp 第 227 行定义.

引用了 eve::map::TileLayer::getTile() , 以及 tileGid().

被这些函数引用 dualGridMaskAt().

◆ dualGridMaskAt()

EVENGINE_API_WORLD int eve::map::dualGridMaskAt ( TileLayer &  logic,
int  dx,
int  dy,
int  filledGid 
)

4-bit corner mask for display cell (dx,dy) on a (logicW+1)×(logicH+1) grid. Samples logic (dx-1,dy-1), (dx,dy-1), (dx-1,dy), (dx,dy) in index space (orientation-independent topology).

在文件 DualGrid.cpp 第 236 行定义.

引用了 dualGridLogicFilled(), dualGridMaskFromCorners(), dx, dy , 以及 tr.

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

◆ dualGridMaskFromCorners()

int eve::map::dualGridMaskFromCorners ( bool  tl,
bool  tr,
bool  bl,
bool  br 
)
inline

Pack four corner occupancy bits: TL=1, TR=2, BL=4, BR=8.

在文件 DualGrid.h 第 128 行定义.

引用了 tr.

被这些函数引用 dualGridMaskAt().

◆ generateDualGridMaskAtlas()

EVENGINE_API_WORLD eve::Result< DualGridMaskAtlas > eve::map::generateDualGridMaskAtlas ( const DualGridMaskConfig &  config)

Generate the complete reusable 16-frame dual-grid mask atlas.

返回
Owning atlas, or a structured InvalidArgument diagnostic. @cost O(16 * width * height), intended for import/load time and cacheable by config.
  • @thread Pure CPU work; safe on worker threads. No callbacks are invoked. @determinism Bit-stable for the same config on IEEE-754 implementations.

在文件 DualGrid.cpp 第 100 行定义.

引用了 bottom, eve::map::DualGridMaskAtlas::coverage, eve::map::DualGridMaskConfig::edgeWidth, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::map::DualGridMaskConfig::height, eve::map::DualGridMaskAtlas::height, eve::InvalidArgument, left, mask, eve::map::DualGridMaskConfig::noiseScale, eve::map::DualGridMaskConfig::noiseStrength, right, eve::map::DualGridMaskConfig::seed, eve::map::DualGridMaskAtlas::signedDistance, eve::Result< T >::success(), top, u, v, eve::map::DualGridMaskConfig::width, eve::map::DualGridMaskAtlas::width, x , 以及 y.

被这些函数引用 bakeDualGridTransitionAtlas().

◆ hasSupportedVersion()

bool eve::map::hasSupportedVersion ( const eve::Value::Object &  object)
noexcept

在文件 ArtifactProvider.cpp 第 45 行定义.

引用了 member.

被这些函数引用 eve::map::MapArtifactProvider::restoreState().

◆ importRpgMakerMap()

EVENGINE_API_WORLD eve::Result< RpgMakerImportReceipt > eve::map::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. @ownership Returned layer entities are owned by the ECS world, as with loadMapFile. @thread Main-thread affine and non-reentrant.

◆ loadConfigFile()

bool eve::map::loadConfigFile ( TileLayer *  layer,
const std::string &  path,
std::string *  error 
)

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.

在文件 TileConfig.cpp 第 1057 行定义.

引用了 applyConfigText(), error, layer, eve::json::Document::parse(), path, root, text , 以及 eve::filesystem::Filesystem::watch().

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

◆ loadMapFile() [1/2]

EVENGINE_API_WORLD std::vector< TileLayer * > eve::map::loadMapFile ( const std::string &  path,
std::string *  error 
)

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.

在文件 TileConfig.cpp 第 1207 行定义.

引用了 error, loadMapFile() , 以及 path.

◆ loadMapFile() [2/2]

EVENGINE_API_WORLD std::vector< TileLayer * > eve::map::loadMapFile ( const std::string &  path,
std::vector< MapObject > *  objects,
std::string *  error 
)

◆ loadMapText()

EVENGINE_API_WORLD std::vector< TileLayer * > eve::map::loadMapText ( const std::string &  json,
std::vector< MapObject > *  objects,
std::string *  error 
)

Parse map JSON text (no filesystem). Same semantics as loadMapFile.

在文件 TileConfig.cpp 第 1171 行定义.

引用了 error , 以及 eve::json::Document::parse().

被这些函数引用 eve::map::Map::loadFromTextWithObjectContract().

◆ loadTilesetManifestFile()

bool eve::map::loadTilesetManifestFile ( TileLayer *  layer,
const std::string &  path,
std::string *  error = nullptr 
)

Load a composable TileSet manifest onto an existing layer.

The manifest only changes atlas/visual metadata; map dimensions and GIDs stay intact.

在文件 TileConfig.cpp 第 1126 行定义.

引用了 error, info, layer, eve::json::Document::parse(), path, eve::filesystem::Filesystem::read(), root, text , 以及 eve::filesystem::Filesystem::watch().

被这些函数引用 eve::map::TileLayer::loadTilesetManifest().

◆ mapArtifactProvider()

EVENGINE_API_WORLD MapArtifactProvider & eve::map::mapArtifactProvider ( )
noexcept

Return the process-owned map artifact provider singleton.

在文件 ArtifactProvider.cpp 第 231 行定义.

被这些函数引用 registerMapArtifactProvider().

◆ member()

const eve::Value * eve::map::member ( const eve::Value::Object &  object,
const char *  name 
)
noexcept

在文件 ArtifactProvider.cpp 第 15 行定义.

引用了 eve::Value::find(), found , 以及 name.

◆ Module_IMPL()

eve::map::Module_IMPL ( Map  ,
new   Map() 
)

◆ readI64()

bool eve::map::readI64 ( const eve::Value::Object &  object,
const char *  name,
std::int64_t &  output 
)

在文件 ArtifactProvider.cpp 第 35 行定义.

引用了 member, name, output , 以及 value.

被这些函数引用 eve::map::MapArtifactProvider::restoreState().

◆ readString()

bool eve::map::readString ( const eve::Value::Object &  object,
const char *  name,
std::string &  output 
)

在文件 ArtifactProvider.cpp 第 20 行定义.

引用了 member, name, output, text , 以及 value.

被这些函数引用 readU64() , 以及 eve::map::MapArtifactProvider::restoreState().

◆ readU64()

bool eve::map::readU64 ( const eve::Value::Object &  object,
const char *  name,
std::uint64_t &  output 
)

在文件 ArtifactProvider.cpp 第 28 行定义.

引用了 end, error, name, output, readString() , 以及 text.

被这些函数引用 eve::map::MapArtifactProvider::restoreState().

◆ registerMapArtifactProvider()

EVENGINE_API_WORLD void eve::map::registerMapArtifactProvider ( )

Register the map provider in the common capability registry.

在文件 ArtifactProvider.cpp 第 236 行定义.

引用了 mapArtifactProvider().

被这些函数引用 eve::map::Map::Map().

◆ reloadConfigFile()

bool eve::map::reloadConfigFile ( TileLayer *  layer,
std::string *  error 
)

Reloads config file.

在文件 TileConfig.cpp 第 1116 行定义.

引用了 error, layer, loadConfigFile() , 以及 path.

被这些函数引用 eve::map::TileConfigSystem::poll() , 以及 eve::map::TileLayer::reloadConfig().

◆ resolveDualGrid() [1/2]

◆ resolveDualGrid() [2/2]

EVENGINE_API_WORLD bool eve::map::resolveDualGrid ( TileLayer *  logic,
TileLayer *  display,
std::string *  error 
)

Convenience: any non-zero filled, default frame table, half offset, hide logic.

在文件 DualGrid.cpp 第 310 行定义.

引用了 error , 以及 resolveDualGrid().

◆ tileGid()

uint32_t eve::map::tileGid ( uint32_t  raw)
inline

◆ tileToDepthY()

EVENGINE_API_WORLD float eve::map::tileToDepthY ( const TileLayer::Config &  cfg,
int  tx,
int  ty 
)

Painter's-algorithm depth for the tile under the layer's projection.

在文件 TileProjection.cpp 第 45 行定义.

引用了 eve::grid::cellToDepthY().

被这些函数引用 eve::map::TileRenderSystem::collect() , 以及 eve::map::TileLayer::depthY().

◆ tileToWorld()

EVENGINE_API_WORLD void eve::map::tileToWorld ( const TileLayer::Config &  cfg,
int  tx,
int  ty,
float &  wx,
float &  wy 
)

Converts a tile index to world pixels using the layer's projection.

在文件 TileProjection.cpp 第 41 行定义.

引用了 eve::grid::cellToWorld(), wx , 以及 wy.

被这些函数引用 eve::map::TileRenderSystem::collect() , 以及 eve::map::TileLayer::tileToWorld().

◆ validateMapObjects()

EVENGINE_API_WORLD eve::Result< void > eve::map::validateMapObjects ( std::span< const MapObject >  objects,
std::string_view  contractJson 
)

Validate map objects against an owning JSON content contract.

参数
objectsObjects borrowed for this call.
contractJsonJSON using schema eve.map.object-contract, version 1.
返回
Success when every object is admitted; otherwise a path-aware diagnostic.
备注
Version 1 supports object types, unknown-type/property policies, required properties, property kinds (string, int, number, bool), numeric bounds, and string enums. @thread Thread-safe when the borrowed objects are not concurrently mutated. @reentrancy No callbacks are invoked and no engine state is mutated.

在文件 MapObjectContract.cpp 第 111 行定义.

引用了 eve::AlreadyExists, eve::Value::asInt(), eve::Value::asString(), choices, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Value::fromJson(), eve::Value::getIf(), height, eve::InvalidArgument, eve::Value::isInt64(), eve::Value::isString(), kind, member, name, eve::NotFound, number, properties, root, eve::Result< T >::success(), type, eve::TypeMismatch, eve::UnknownVersion, eve::Unsupported, valid, value, width, x , 以及 y.

被这些函数引用 eve::map::Map::loadFromFileWithObjectContract() , 以及 eve::map::Map::loadFromTextWithObjectContract().

◆ worldToTile()

EVENGINE_API_WORLD void eve::map::worldToTile ( const TileLayer::Config &  cfg,
float  wx,
float  wy,
int &  tx,
int &  ty 
)

Converts world pixels back to the containing tile index.

在文件 TileProjection.cpp 第 49 行定义.

引用了 eve::map::TileLayer::Config::mapH, eve::map::TileLayer::Config::mapW, eve::grid::worldToCell(), wx , 以及 wy.

被这些函数引用 eve::map::TileLayer::worldToTile().