Commit Graph
8 Commits
Author SHA1 Message Date
西风逍遥游 703b5e5353 feat(dialogue): procedural dialogue generation v1
Add data-driven procedural dialogue to eve.Dialogue:

- Variables: setVar/getVar*/hasVar/clearVar/clearVars with global and
  scene scopes; the scene scope auto-clears when the selected Scene host
  changes (polled in update()).
- Conditions: structured tables ({var,op,value} with eq/ne/gt/ge/lt/le/
  has/missing, all/any/not, script predicates) + evalCondition().
- Line pools: loadPoolsFromTable() with weight/when/meta/tags, seeded
  weighted selection (setRandomSeed), per-pool no-repeat history, and
  playLine()/playPool() that resolve {var} interpolation or i18n keys and
  auto-apply meta.expression/motion to bound avatars.
- .dnut authoring format compiled by a new C++ parser (DnutParser):
  loadPoolsFromDnut(source, path) / loadPoolsFromDnutFile(path); parse
  errors surface path:line via getLastPoolsError(). The previous Squirrel
  compiler script and its engine wiring are removed.
- Example (examples/dialogue) uses pools.dnut with mood/hour variables,
  scene-scope auto-clear demo, and hot reload via eve_asset_reload.
- Tests: C++ unit tests (dialogue_proc.cpp) covering variables,
  conditions, pools, selection/dedupe, meta, i18n, scene auto-clear and
  the .dnut parser; Squirrel integration test for the script-facing API.
- Docs: design doc updated with the new content model / API / format.
2026-08-18 21:08:19 +08:00
sunxfancy b954ac9fd5 feat(i18n): add game localization module
Add an i18n module (eve.I18n) for game localization:
- Load per-language JSON locale tables from VFS or raw JSON.
- Dot-path key lookup with {name} placeholder substitution.
- CLDR-style plural rules (en/fr/ru/pl/cs/zh and more).
- Fall back to default language, then to the raw key.
- Optional file auto-reload via update(dt).

Self-contained JSON parser (no Poco) so it builds on WASM too.
Includes C++ + Squirrel script tests, user/module docs, an
examples/i18n demo, and i18n integration in the dialogue example.
2026-08-17 14:54:50 +08:00
西风逍遥游 dd3541750f feat: enhance event handling and graphics functionality
- Added new methods for event polling and handling in the Event module, including `pollName` for retrieving message names.
- Introduced new graphics functions for clearing the screen and drawing solid rectangles with RGBA support.
- Updated the Window module to expose new settings and graphics functionalities.
- Refactored the main script to utilize the new graphics and event features, improving the example game structure.
2026-08-05 17:17:50 +08:00
西风逍遥游 2e04aaa815 update test 2024-06-22 11:38:07 -07:00
西风逍遥游 412ec4ddcb update 2022-07-16 22:00:44 -07:00
西风逍遥游 3445b18b1f update module structure 2021-10-21 20:54:07 -07:00
西风逍遥游 debcc2428e add test cases and impl window 2021-10-03 00:23:57 -07:00
西风逍遥游 966298d0b7 add unit test 2021-09-30 14:29:12 -07:00