diff --git a/CMakeLists.txt b/CMakeLists.txt index 04c313b..29f3dee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,10 @@ string(REGEX REPLACE "^// " "" SOTS_ADDR_PROVENANCE "${_addr_provenance}") add_library(sots_addresses INTERFACE) target_include_directories(sots_addresses INTERFACE ${CMAKE_SOURCE_DIR}/include) +# ---- engine modules (host + cross): pure, oracle-verified code accrues here ---- +add_subdirectory(src/mars/parse) # brace-block + .effect readers (lib mars_parse) +add_subdirectory(src/mars/text) # flat-kv, id-manifest, csv (lib mars_text) + if(WIN32) # ---- shim: proxy binkw32.dll that the original game loads (Phase 2 frontend) ---- add_library(minhook STATIC @@ -34,9 +38,14 @@ if(WIN32) # Must be exactly binkw32.dll (no "lib" prefix); export names come solely from the .def. set_target_properties(binkw32 PROPERTIES PREFIX "" OUTPUT_NAME "binkw32") else() - # ---- host: nothing to build yet; keep the preset alive with a header smoke test ---- + # ---- host: engine module tests (ctest) + a header smoke test ---- enable_testing() add_executable(addr_smoke tests/addr_smoke.cpp) target_link_libraries(addr_smoke PRIVATE sots_addresses) add_test(NAME addr_smoke COMMAND addr_smoke) + foreach(_t mars_parse mars_text) + if(EXISTS ${CMAKE_SOURCE_DIR}/tests/${_t}/CMakeLists.txt) + add_subdirectory(tests/${_t}) + endif() + endforeach() endif() diff --git a/README.md b/README.md index 453b290..6d054f5 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,14 @@ the original binaries are never included; tests and tools read an owner-supplied `$SOTS_DATA_DIR`. See `CONTRIBUTING.md` for the clean-room rules. ## Status -Phase 2 / M0 — the shim frontend (`src/shim/`): a proxy DLL the original game loads, used to -verify each reimplemented function against the original before it displaces it. Engine code -accrues under `src/mars/` (engine) and `src/game/` (game logic) as milestones land. +Phase 2. **M0 done** — the shim frontend (`src/shim/`, a proxy `binkw32.dll` the original game +loads) builds, deploys, hooks, and logs from a real game launch. Engine code accrues under +`src/mars/` and `src/game/`; each module is oracle-verified against the owner's game data before merge: +- `mars/parse` — brace-block + `.effect` readers (1,531/1,531 files agree with the reference) +- `mars/text` — flat key/value tables, id manifests, CSV (64/64 files agree) + +Build: `cmake --preset host && cmake --build --preset host && ctest --preset host` (Linux); +`tools/sync-build.sh` cross-builds the shim on the lab box and stages it for deployment. ## Layout (grows with the work) - `src/shim/` — binkw32 proxy + hooks + old-vs-new compare harness (frontend #1)