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
+45
View File
@@ -0,0 +1,45 @@
import sys
import tempfile
import unittest
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tools'))
from pack_assets import package_assets, verify_assets
class PackagingTests(unittest.TestCase):
def test_virtual_patch_paths_and_required_files(self):
with tempfile.TemporaryDirectory() as tmp:
base = Path(tmp)
source = base / 'client'
source.mkdir()
scripts = source / 'upstream/python-root'
scripts.mkdir(parents=True)
(scripts / 'uiCommon.py').write_text('class Dialog: pass\n')
(scripts / 'pack_maker').symlink_to(base / 'outside')
packs = base / 'pack_maker'
packs.mkdir()
loose = base / 'svside/empty.jpg'
loose.parent.mkdir()
loose.write_bytes(b'loose UI texture')
data = packs / 'patch_design_wa/rework_inv/new_equipment_bg.tga'
data.parent.mkdir(parents=True)
data.write_bytes(b'patch texture')
xml = packs / 'patch_design_wa_create.xml'
xml.write_text('<File ArchivedPath="rework_inv/new_equipment_bg.tga"><![CDATA[pack_maker/patch_design_wa/rework_inv/new_equipment_bg.tga]]></File>')
output = base / 'bundle'
manifest = package_assets(source, output, pack_maker=packs)
self.assertIn('root/uiCommon.py', manifest['files'])
self.assertTrue((output / 'root/uiCommon.py').is_file())
self.assertFalse((output / 'root/pack_maker').exists())
self.assertEqual((output / 'svside/empty.jpg').read_bytes(), loose.read_bytes())
self.assertIn('rework_inv/new_equipment_bg.tga', manifest['files'])
self.assertEqual((output / 'rework_inv/new_equipment_bg.tga').read_bytes(), data.read_bytes())
self.assertTrue(verify_assets(output / 'asset_manifest.json', output))
data.unlink()
with self.assertRaises(FileNotFoundError):
package_assets(source, base / 'broken', pack_maker=packs)
xml.write_text('<File ArchivedPath="../escape"><![CDATA[pack_maker/patch_design_wa/rework_inv/new_equipment_bg.tga]]></File>')
with self.assertRaises(ValueError):
package_assets(source, base / 'unsafe', pack_maker=packs)
if __name__ == '__main__':
unittest.main()