Files
mtgodot-poc/CMakeLists.txt
T
shenandClaude Sonnet 5 47baf6c0c6 Metin2 game client (P0–P11) + mobile asset pipeline
Networked client on the existing Godot 4.7 + libgr2 renderer:
- net: m2dev wire protocol (libsodium KX + XChaCha20), auth/select/game
  phases, EntityStore world model, ~all GC/CG headers. char create/delete,
  private shop / mall / cube, SHOP_GC_START_EX, guild, party (+ CG_PARTY_SET_STATE),
  quests, dragon soul, refine, safebox, exchange.
- UI: in-game windows migrated 1:1 from the reference uiscript/root .py —
  char status (/stat), inventory+equipment, select-item ([SELECT_ITEM] quest
  token), system-option + game-option + ESC system menu, private-shop 39-grid,
  party info board, shop tabs, atlas, minimap, quickbar, chat, …
- EterGrnLib polish: GR2 material blend/two-sided, LOD crossfade, motion-event
  dispatch, contact shadow, ray-AABB picking, weapon grip pre-transform.

Portable asset IO (A1) — all extension/libgr2/formats/mtproto reads routed
through godot::FileAccess (res:// PCK works on iOS/Android); standalone-lib
*_path() kept for the non-Godot CTests. AssetResolver + PropertyRegistry
switched to a baked index (bake_asset_index.gd) instead of std::filesystem.

Mobile builds: build-{android,ios}.sh, export-android.sh, pack-assets.sh,
gen-debug-keystore.sh. Assets ship as a zip mounted at runtime by
project/asset_pack.gd (adb push now; HTTP download is a drop-in later).

ctest 10/10, 34 GDScript suites, macOS/iOS/Android all build.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013EJxkHiNKS4kybHS3XKyAJ
2026-08-31 20:02:12 +09:00

49 lines
1.8 KiB
CMake

# mtgodot-poc — top level
# Phase 1 (macOS) scaffolding. See docs/GODOT-POC-PLAN.md §M0'.
#
# libgr2 / formats / oracle / tools were vendored in from the retired xrender-poc
# repo (2026-08-29). libgr2 is the shared core (gr2 v6/v7 reader, oracle-verified);
# formats = .msa/.msm parsers (needed M2 T2.2/T2.3); tools = libgr2 validation.
cmake_minimum_required(VERSION 3.20)
project(mtgodot_poc CXX C)
include(CTest)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 17)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(MTGODOT_BUILD_EXTENSION "Build the Godot GDExtension (pulls in godot-cpp)" ON)
option(MTGODOT_BUILD_TOOLS "Build libgr2 validation tools (gr2dump/gr2fuzz/oracle_diff)" OFF)
# --- shared, cross-platform core (no godot-cpp, no third-party) ---
add_subdirectory(libgr2)
add_subdirectory(formats)
if(MTGODOT_BUILD_TOOLS)
add_subdirectory(tools)
endif()
# --- the Godot extension ---
# Phase 1 was macOS-only; Phase 2 (BACKLOG F1/F2) adds iOS + Android. The three
# native deps are vendored (extension/third_party), so the only gate now is
# "is this a platform we've wired output naming + a toolchain for".
if(MTGODOT_BUILD_EXTENSION)
set(_mt_plat "${CMAKE_SYSTEM_NAME}")
if(_mt_plat STREQUAL "Darwin" OR _mt_plat STREQUAL "iOS" OR _mt_plat STREQUAL "Android")
message(STATUS "mtgodot extension: building for ${_mt_plat}")
else()
message(FATAL_ERROR
"MTGODOT_BUILD_EXTENSION: supported targets are macOS / iOS / Android "
"(got CMAKE_SYSTEM_NAME='${_mt_plat}'). See docs/PLATFORMS.md. "
"Use -DMTGODOT_BUILD_EXTENSION=OFF to build just libgr2/formats/tools.")
endif()
add_subdirectory(extension)
endif()