Fix cross-platform rendering and optimize frame performance

Correct selection orientation, game-entry lifecycle, mounted NPCs, labels and skill panels. Add the native GPU scene path, resident geometry, bounded texture and Python caches, and collision broad phase.

Pin the independently maintained Metin2 SDK through a submodule and document reproducible setup. Include rendering regressions and macOS packaging improvements.

Validation: client Debug build and 12 targeted client tests passed; SDK build and all 14 SDK tests passed.
This commit is contained in:
shen
2026-10-11 17:55:53 -07:00
parent 08cc8865be
commit 281418f351
101 changed files with 6244 additions and 1877 deletions
+20
View File
@@ -124,6 +124,26 @@ int main(int argc,char** argv) {
"chr.Update()\n"
"print 'chr script ok'\n");
const auto beforeCompile=python.compilation_count();
const std::string cachedDispatch="__cache_result=__cache_callback()\n";
python.execute("__cache_callback=lambda: 17\n");
python.execute(cachedDispatch);
const auto cachedCompile=python.compilation_count();
python.execute("assert __cache_result==17\n__cache_callback=lambda: 29\n");
const auto rebindCompile=python.compilation_count();
python.execute(cachedDispatch);
require(python.compilation_count()==rebindCompile,"repeated dispatch reuses code but reads current globals");
python.execute("assert __cache_result==29\n");
require(cachedCompile>beforeCompile,"first dispatch compiles");
bool failed=false;
try {python.execute("raise ValueError('cache regression')\n");}catch(const std::runtime_error&){failed=true;}
require(failed,"cached runtime exceptions retain error behavior");
python.execute("assert 1+1==2\n");
for(int i=0;i<100;++i)python.execute("__cache_counter="+std::to_string(i)+"\n");
require(python.compiled_code_count()<=64 && python.compiled_code_bytes()<=128u*1024u,"code cache is bounded");
python.execute(cachedDispatch);
python.execute("assert __cache_result==29\n");
const auto* hidden=mgr.GetActorData(10);
require(hidden && hidden->m_isHidden,"chr.Hide marks the selected instance hidden");
require(RaceManager::Instance().GetFullPathFileName("a.msa")!="c:/other/a.msa","SetPathName ignores paths without d:/ymir");