Files
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

47 lines
2.3 KiB
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# oracle —— 独立 Windows 工程(不在主 CMake 树内)。见 ../docs/steps/00-oracle.md、RUNBOOK.md
#
# cmake -S oracle -B oracle/build -DGRANNY_SDK=<泄露 SDK 根>
# cmake --build oracle/build --config Release
#
# GRANNY_SDK 默认指向本仓库同级的 MobileSource 里的 Granny-3D-SDK-main。
# 链 granny2_x64.libimport lib);运行时需要对应的 granny2_x64.dll 在 PATH / exe 目录。
# ⚠ 这个 DLL 是 SDK 2.9.12。资产由 2.4.0.7 导出(M0 T2 实测)。容器 + 组合公式在 2.4–2.11
# 稳定,但 B 样条边界 / 少数曲线细节可能有差异 —— 先跑 selfcheck(T7)确认坐标约定,
# 再决定是否要换成 2.4.x 的 runtime DLL(见 GRANNY-VERSION.md)。
cmake_minimum_required(VERSION 3.20)
project(xrender_oracle C)
set(CMAKE_C_STANDARD 11)
set(GRANNY_SDK "${CMAKE_SOURCE_DIR}/../../MobileSource/Cross Platform/Granny-3D-SDK-main"
CACHE PATH "泄露 Granny SDK 根(含 include/ 和 lib/win64/")
if(NOT EXISTS "${GRANNY_SDK}/include/granny.h")
message(FATAL_ERROR "找不到 ${GRANNY_SDK}/include/granny.h —— 传 -DGRANNY_SDK=<SDK 根>")
endif()
add_executable(oracle oracle.c)
target_include_directories(oracle PRIVATE "${GRANNY_SDK}/include")
if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
target_link_libraries(oracle PRIVATE "${GRANNY_SDK}/lib/win64/granny2_x64.lib")
set(_dll "${GRANNY_SDK}/lib/win64/granny2_x64.dll")
else()
target_link_libraries(oracle PRIVATE "${GRANNY_SDK}/lib/win32/granny2.lib")
set(_dll "${GRANNY_SDK}/lib/win32/granny2.dll")
endif()
# 把 DLL 拷到 exe 旁边,方便直接跑 / Wine
add_custom_command(TARGET oracle POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_dll}" "$<TARGET_FILE_DIR:oracle>")
else()
message(WARNING
"非 WindowsSDK 只提供 win32/win64/wii/ps3/xenon 的 granny2 预编译库。\n"
" 选项 A:在 Windows 机器 / VM 上 build+run。\n"
" 选项 BWineoracle 只做文件 IO + 数学 + 写二进制,不碰 GPUWine 够用)——\n"
" 用 MinGW 交叉编译或直接在 Wine 里跑 MSVC,链 granny2_x64.lib。\n"
" 选项 Cstretch):从 SDK source/ 移植 winxx/ 平台层出一个 POSIX libgranny。\n"
" 见 RUNBOOK.md。")
endif()