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

命名空间

namespace  animation
 
namespace  audio
 
namespace  avatar
 
namespace  building
 建筑放置模块入口:定义 / 放置世界 / 鬼影 / 变更事件的脚本绑定点。 设计文档:docs/dev/建筑放置系统设计.md
 
namespace  buildingfx
 
namespace  camera
 
namespace  cap
 
namespace  caps
 
namespace  card
 
namespace  cmd
 
namespace  cmdline
 Minimal streaming ZIP writer used by eve zip / eve package to produce a PhysFS-mountable game archive (.eve). Entries are DEFLATE-compressed (method 8) using zlib's raw deflate. The output is a standard ZIP readable by PhysFS.
 
namespace  data
 
namespace  database
 
namespace  daynight
 
namespace  debug
 
namespace  demo
 
namespace  dev
 
namespace  dialogue
 
namespace  editor
 
namespace  event
 
namespace  filesystem
 
namespace  font
 
namespace  gpgpu
 
namespace  graphics
 卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局参数。 数据模型与渲染/交互逻辑见 CardTypes.h。
 
namespace  grid
 
namespace  housegen
 
namespace  i18n
 
namespace  ik
 
namespace  image
 
namespace  inventory
 运行时容器:固定格数的背包 / 箱子 / 商店栏等。 行为由 InventorySystem 提供;本类暴露便于脚本绑定的薄封装方法。
 
namespace  joystick
 
namespace  json
 
namespace  keyboard
 
namespace  map
 放置世界:格子占用(多通道)+ 地形语义 + 已放置建筑实例。 行为由 PlacementSystem 提供;本类暴露便于脚本绑定的薄封装方法。 坐标换算统一走 eve::grid(支持 rectangle / iso / staggered / hex 与 XY/XZ 平面轴)。
 
namespace  math
 
namespace  model3d
 
namespace  mouse
 
namespace  network
 
namespace  particles
 
namespace  physics
 
namespace  plugins
 
namespace  procgen
 
namespace  rpg
 RPG 模块入口:属性 / 效果 / 状态 / 技能 / 结算五套系统的脚本绑定与帧调度点。
 
namespace  rx
 
namespace  scene
 
namespace  sceneloader
 
namespace  script
 
namespace  sound
 
namespace  spatial
 
namespace  spritestack
 
namespace  stylize
 
namespace  system
 
namespace  tensor
 
namespace  thread
 
namespace  timer
 
namespace  touch
 
namespace  ui
 
namespace  virtualgeometry
 
namespace  voxel
 方块类型定义:名字、各面图集纹理、方向性、组合声明。 方向性方块在注册时按 orientation 绕 Y 轴展开成多个"具体类型"变体, 每个变体持有旋转后的各面纹理;渲染端只消费纹理 id,不接触 orientation。
 
namespace  weather
 
namespace  window
 

class  Data
 
class  Exception
 
class  IAudioQuery
 Audio control surface (provided by the audio module). 更多...
 
class  IEditorHost
 Declarative editor-host control (provided by the ui module). 更多...
 
class  IParticlesQuery
 Particle system query surface (provided by the particles module). 更多...
 
class  IPhysicsQuery
 2D physics world query surface (provided by the physics module). 更多...
 
class  IProcgenQuery
 Procedural generation query surface (provided by the procgen module). 更多...
 
class  IRenderCapture
 Frame capture + camera + visible-entity inspection (graphics). 更多...
 
class  ISceneQuery
 Scene graph query/mutation surface (provided by the scene module). 更多...
 
class  IWindowSurfaceHost
 Render-surface host for the window module (provided by graphics). 更多...
 
class  Model
 Script-backed model: wraps a Squirrel object (table/class instance). 更多...
 
class  ModelClass
 Model with a list of Squirrel attribute objects. 更多...
 
class  ModelManager
 Registry tracking ModelObject relationships. 更多...
 
class  ModelMap
 Model that maps to a Squirrel table (key/value). 更多...
 
class  ModelVector
 Model that maps to a Squirrel array. 更多...
 
class  Module
 
class  ModuleManager
 
struct  ModuleRegister
 
class  Object
 Object is the base class for all game objects. It provides reference counting and dirty flag for update. 更多...
 
struct  RayHitInfo
 Ray-cast result (value type). 更多...
 
struct  Rect
 Axis-aligned integer rectangle (screen/tile space). 更多...
 
class  ref
 ref is a smart pointer that automatically calls ref() and unref() on the object. Type T must be a subclass of Object. 更多...
 
struct  ReflectedAttribute
 
struct  ReflectedClass
 
struct  ReflectedMember
 
struct  RenderStatusInfo
 Render surface / frame state snapshot (value type). 更多...
 
class  Resource
 Resource is a game object that is managed by the ResourceManager. It can be loaded from a file or generated at runtime. If the resource is loaded from file, a monitor will be created to watch the file changes. When the file is modified, the resource will be reloaded. If the resource is generated at runtime, it can depend on a few other resources and the ResourceManager will update the resource when the dependencies are changed. 更多...
 
class  ResourceManager
 ResourceManager is a singleton that manages all resources in the game. It provides a way to load, reload, and unload resources. 更多...
 
class  Runtime
 
struct  SceneNodeInfo
 Serializable snapshot of one scene node (value type, no scene types). 更多...
 
class  ScriptException
 Exception raised at the public Runtime boundary. 更多...
 
struct  ScriptInfo
 
class  StartupStage
 
class  StateValue
 JSON-compatible state value tree used by state hot reload. 更多...
 

概念

concept  DerivedFromObject
 

类型定义

using CppEntityViewFn = std::function< void(ssq::Array &out)>
 C++ 实体 → 脚本 eve.view() 桥接。 用 registerCppEntityView(typeid(T*).hash_code(), fn) 登记 T 的收集函数; 脚本 eve.view(cls) 沿类链找到登记的 C++ 类型后调用 fn 填充输出数组。
 
using PostEcsHook = std::function< void(ssq::Table &table)>
 在脚本 ECS 基类(eve.Component / eve.Entity / eve.System)注入之后执行的回调。 模块用它注入"extends eve.Entity"的脚本基类(例如 eve.SceneEntity)。 在 exposeECS / exposeECSToVM 末尾运行,早于任何游戏脚本。
 

枚举

enum class  ScriptState {
  Compiled , Running , Loaded , Unloading ,
  Unloaded , Failed
}
 
enum class  ScriptStage {
  Compile , Execute , Reflect , Unload ,
  Shutdown
}
 

函数

char * b64_encode (const char *src, size_t srclen, size_t linelen, size_t &dstlen)
 Base64-encode data.
 
char * b64_decode (const char *src, size_t srclen, size_t &dstlen)
 Decode base64 encoded data.
 
void exposeECS (ssq::Table &table)
 脚本侧 ECS:Entity / Component / System / ShaderSystem / view(见 ECS.cpp)。 C++ 游戏实体仍直接用 ECS.hpp 的 ENTITY / COMPONENT / View。 GPU System:eve.ShaderSystem + gpgpu::ShaderSystem / EcsGpu.h。
 
void registerCppEntityView (size_t typeHash, CppEntityViewFn fn)
 
void registerPostEcsHook (PostEcsHook fn)
 
void exposeECSToVM (ssq::VM &vm)
 ModuleManager::expose 之后调用;保证 eve.Component 等不被其它模块覆盖。
 
size_t utf8_codepoint_count (const std::string &s)
 Count UTF-8 code points in a string. Invalid / truncated sequences stop the scan.
 
size_t utf8_byte_offset_for_codepoints (const std::string &s, size_t codepoints)
 Byte offset of the N-th UTF-8 code point (0-based count of code points). Returns s.size() if there are fewer than N code points.
 

变量

const char * boot_content
 嵌入式脚本 / 着色器源码常量(构建时由集成脚本生成)。
 
const char * load_content
 
const char * module_list_content
 
const char * async_content
 
const char * scene_director_content
 
const char * demo_content
 
const char * vertex_content
 
const char * fragment_content
 

类型定义说明

◆ CppEntityViewFn

using eve::CppEntityViewFn = typedef std::function<void(ssq::Array& out)>

C++ 实体 → 脚本 eve.view() 桥接。 用 registerCppEntityView(typeid(T*).hash_code(), fn) 登记 T 的收集函数; 脚本 eve.view(cls) 沿类链找到登记的 C++ 类型后调用 fn 填充输出数组。

在文件 ECS.h33 行定义.

◆ PostEcsHook

using eve::PostEcsHook = typedef std::function<void(ssq::Table& table)>

在脚本 ECS 基类(eve.Component / eve.Entity / eve.System)注入之后执行的回调。 模块用它注入"extends eve.Entity"的脚本基类(例如 eve.SceneEntity)。 在 exposeECS / exposeECSToVM 末尾运行,早于任何游戏脚本。

在文件 ECS.h41 行定义.

枚举类型说明

◆ ScriptStage

enum class eve::ScriptStage
strong
枚举值
Compile 
Execute 
Reflect 
Unload 
Shutdown 

在文件 Runtime.h27 行定义.

◆ ScriptState

enum class eve::ScriptState
strong
枚举值
Compiled 
Running 
Loaded 
Unloading 
Unloaded 
Failed 

在文件 Runtime.h18 行定义.

函数说明

◆ b64_decode()

char * eve::b64_decode ( const char *  src,
size_t  srclen,
size_t &  dstlen 
)

Decode base64 encoded data.

参数
srcThe string containing the base64 data.
srclenThe length of the string.
dstlenThe size of the binary data is stored here.
返回
A chunk of memory containing the binary data (allocated with new[]).

在文件 b64.cpp102 行定义.

引用了 d , 以及 v.

被这些函数引用 eve::data::decode().

◆ b64_encode()

char * eve::b64_encode ( const char *  src,
size_t  srclen,
size_t  linelen,
size_t &  dstlen 
)

Base64-encode data.

参数
srcThe data to encode.
srclenThe size in bytes of the data.
linelenThe maximum length of each line in the encoded string. 0 indicates no maximum length.
dstlenThe length of the encoded string is stored here.
返回
A string containing the base64-encoded data (allocated with new[]).

在文件 b64.cpp28 行定义.

被这些函数引用 eve::data::encode().

◆ exposeECS()

void eve::exposeECS ( ssq::Table &  table)

脚本侧 ECS:Entity / Component / System / ShaderSystem / view(见 ECS.cpp)。 C++ 游戏实体仍直接用 ECS.hpp 的 ENTITY / COMPONENT / View。 GPU System:eve.ShaderSystem + gpgpu::ShaderSystem / EcsGpu.h。

在文件 ECS.cpp562 行定义.

引用了 cls , 以及 name.

被这些函数引用 exposeECSToVM() , 以及 eve::ModuleManager::exposeVM().

◆ exposeECSToVM()

void eve::exposeECSToVM ( ssq::VM &  vm)

ModuleManager::expose 之后调用;保证 eve.Component 等不被其它模块覆盖。

在文件 ECS.cpp598 行定义.

引用了 exposeECS() , 以及 vm.

◆ registerCppEntityView()

void eve::registerCppEntityView ( size_t  typeHash,
CppEntityViewFn  fn 
)

在文件 ECS.cpp590 行定义.

引用了 fn.

◆ registerPostEcsHook()

void eve::registerPostEcsHook ( PostEcsHook  fn)

在文件 ECS.cpp594 行定义.

引用了 fn.

◆ utf8_byte_offset_for_codepoints()

size_t eve::utf8_byte_offset_for_codepoints ( const std::string &  s,
size_t  codepoints 
)

Byte offset of the N-th UTF-8 code point (0-based count of code points). Returns s.size() if there are fewer than N code points.

在文件 utf8.cpp37 行定义.

引用了 n, s , 以及 step.

被这些函数引用 eve::dialogue::Dialogue::getVisibleText().

◆ utf8_codepoint_count()

size_t eve::utf8_codepoint_count ( const std::string &  s)

Count UTF-8 code points in a string. Invalid / truncated sequences stop the scan.

在文件 utf8.cpp23 行定义.

引用了 n, s , 以及 step.

被这些函数引用 eve::dialogue::Dialogue::getVisibleText(), eve::dialogue::Dialogue::skipTyping() , 以及 eve::dialogue::Dialogue::update().

变量说明

◆ async_content

const char* eve::async_content
extern

被这些函数引用 eve::cmd::Cmdline::Run().

◆ boot_content

const char* eve::boot_content
extern

嵌入式脚本 / 着色器源码常量(构建时由集成脚本生成)。

◆ demo_content

const char* eve::demo_content
extern

被这些函数引用 eve::cmd::Cmdline::Run().

◆ fragment_content

const char* eve::fragment_content
extern

◆ load_content

const char* eve::load_content
extern

被这些函数引用 eve::cmd::RunArgs::parse().

◆ module_list_content

const char* eve::module_list_content
extern

Generated slot -> class table for the modules in this build.

被这些函数引用 eve::cmd::Cmdline::Run().

◆ scene_director_content

const char* eve::scene_director_content
extern

被这些函数引用 eve::cmd::Cmdline::Run().

◆ vertex_content

const char* eve::vertex_content
extern