- Untrack build-debug/ and build-asan/ (CMake trees committed by mistake in
c9389431) and ignore them.
- Remove extension/src/net and extension/src/pack (m2dev protocol and XChaCha
pack format, superseded by the ported 40250 code), their 18 unregistered tests
and the net/pack tools, the MT_BUILD_NET_TOOLS probe, and the libsodium and zstd
submodules they alone used.
- The fake login server's classic cipher, sequence table and wire layouts move to
extension/tests/classic/ (still used by port.login_flow, port.packet and the
native client's offline mode).
- Archive Godot/m2dev-era plans under docs/archive/; THIRD-PARTY.md updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- MtFrameRate setting (30 / 60 default / display max) as app.Get/SetFrameRateMode,
with a "画面帧率" row injected into the system option dialog (mt_framerate); saved
in the SDL pref path.
- FrameRatePolicy in the live loop: 30 fps after 15 s without input (not while auto
hunting), display switched to 60 Hz unless the highest mode, ADPF
setPreferPowerEfficiency, vsync pacing when the display already runs at the target.
--fps-mode / --idle-fps / --idle-after; --fps-cap / --refresh-rate still pin a test run.
- Perf log: battery current/voltage/power, plugged, fps_mode, idle columns;
perf_summary groups power by mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Auto hunt (client-only): PythonPlayerAutoHunt.cpp + AutoHuntScript.inc as the
embedded mt_autohunt module, AUTO touch button, F9/F8.
- Account registration: tools/40250/register_server.py (rc.d mt_register, :11080)
inserts into account.account; net.RegisterAccount/GetRegisterAccountResult
(PythonAccountRegister.cpp) and the mt_register login-window dialog
(RegisterScript.inc).
- --py-exec also runs in --login-screen mode for scripted login-screen tests.
- Touch controller, window manager and render command updates for the
Android native client.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- FreeType: add the cff/psaux/pshinter modules (from the pinned 2.13.3
tarball, same sha256). Android's only CJK font is the CFF2
NotoSansCJK-Regular.ttc, which the TrueType-only build could not open,
so every Chinese glyph drew as a box.
- Font oversample rounds the UI density up: Android's 1760x800 UI on a
2376x1080 screen is 1.35, which rounded to 1x bilevel glyphs stretched
1.35x. Now 2x anti-aliased glyphs are scaled down. macOS 2.0 unchanged.
- MainActivity: a launcher start (no intent args) opens the login screen
against 192.168.21.203 instead of auto-logging into the in-process fake
server; explicit args still select the fake-server smoke flow.
- build-android-native.sh: ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON for SDL3
and libmain (LOAD alignment 0x1000 -> 0x4000), with a stamp that
rebuilds a cached pre-flag SDL3. Clears Android's 16 KB compat warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eterpack_pack writes locale packs in the original format (COMPRESS
entries, LZO+TEA index), and build_zh_locale.py packs locale/zh into
locale_zh.eix/.epk registered in pack/Index instead of leaving loose
files.
The reviewed translations for names and keys still in English are
kept apart from the server snapshot in data/zh_40250/*_zh_overlay.txt
(1,607 items, 231 mobs/NPCs, 45 locale_game keys) and override it at
build time. Only YMIR, the coordinate-named warp markers and the empty
TOOLTIP_UNSEAL_LEFT_TIME remain English.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build-android-native.sh downloads SDL 3.4.16 (sha256-checked), builds
libSDL3.so and libmain.so (native_render + port_platform + embedded
Python) at API 24, and wraps them in the SDLActivity shell under
android-native/ (package org.metin2port.client). push-android-client.sh
copies the 40250 Client directory into the app's files/ with run-as
(--locale XX selects locale_XX.cfg). port_logic links with
--no-dependent-libraries on ELF targets so the verbatim
`#pragma comment(lib, ...)` lines do not break lld.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mt_codepage implements code pages 874/932/936/949/950/1250-1258 from
Microsoft's bestfit<cp>.txt sources (script/gen_codepage_tables.py,
SHA-256 pinned). Win32Crt's MultiByteToWideChar/WideCharToMultiByte/
IsDBCSLeadByteEx and net/text_codec use it, so the Android API 24 build
no longer depends on iconv. port.codepage checks every table against
its source file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- CGraphicFontTexture rasterises glyph pages at the swapchain density
(UISetFontOversample, MT_FONT_OVERSAMPLE) with anti-aliased coverage;
metrics, packing and UVs stay the 40250 1x values. Default 1 keeps the
verbatim bilevel path (Godot unchanged).
- native.frag: sharp-bilinear sampling for magnified UI textures.
- Multisampled colour/depth with a resolve into the swapchain (MT_MSAA,
default 4); stats line reports msaa=N.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 40250 wire structs hold Win32 long (4 bytes) sockets; on LP64 `long`
is 8, so each TShopItemData was too wide and SHOP_SUBHEADER_GC_START/_EX
misread every item after the first. Pin the wire size with a static_assert.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DXT DDS textures upload the file's own mip levels like 40250
CGraphicImageTexture::CreateDDSTexture (max(1, dwMipMapCount), level i read
at sum(dwLinearSize>>2k), Copy of dwLinearSize>>2i bytes) instead of a
regenerated chain. Non-DDS images keep the D3DX_DEFAULT full chain and mem:
textures get one level. The invented is_ui_tex no-mip rule (icon/, ui/,
locale/, <=128px) is deleted. dxt_decode_test is registered in ctest with
mip-level cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Process now runs 40250's render-time / face-count block and sets view
distance set 0 each frame (25600 under 5000 faces, else scaled by render
time, or the forced range). SetForceSightRange and SkipRenderBuffering are
ported from stubs; the invented SetCursorPosition in UpdateGame is removed.
Port-map boilerplate notes replaced; Destroy recorded as DIVERGENT.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SetGamma, RenderCoolTimeBox, RenderUp/DownButton and GetAvailableMemory are
transliterated from 40250 in place of stubs. The cooldown fan is emitted as
untextured polygon UI commands (native_render + python_ui_surface.gd draw
Bar+quad as a polygon); D3D8 shim gains SetGammaRamp/D3DGAMMARAMP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 0.1 s wall-clock waits could fit a single frame under ctest -j3, so the
shopkeeper pick missed about one run in four.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MapOutdoorRenderHTP.cpp is the full 40250 source behind the native-terrain
gate: no invented texture-0 fallback, first-splat stage-1 ALPHAOP DISABLE,
GetNumTextures() bound, 40250 shadow-pass states (FOGCOLOR white, CLAMP,
TEXTURE1 m_matDynamicShadow). Fixes the white far-terrain band.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the platform_stub skeleton (every member unimplemented) with the 40250 source, so
guild marks in text tails and mark boxes load and draw.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Delete the platform proxy tree renderer and copy SpeedTreeWrapper, SpeedTreeForest,
SpeedTreeForestDirectX8, SpeedTreeConfig.h and VertexShaders.h from 40250. The SDK
SpeedTreeRT.h public API becomes the shim; the closed CSpeedTreeRT is reimplemented in
platform/SpeedTreeLib/SpeedTreeRT.cpp (procedural geometry, static lighting, single LOD,
DIVERGENT). Shims gain the D3D8 vertex shader declaration tokens, D3D_OK,
CreateVertexShader/DeleteVertexShader, ID3DXBuffer/D3DXAssembleShader, MessageBox and
__min/__max.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the platform_stub skeleton with the 40250 source and mirrors
m_LightManager.Initialize() from 40250 PythonApplication.cpp:1263.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Texture coordinates: TEXCOORDINDEX generation (camera-space normal /
position / reflection vector, LOCALVIEWER) and D3DTS_TEXTUREn under
TEXTURETRANSFORMFLAGS (incl. PROJECTED) now run in native.vert; the
RecordingDevice CPU uv baking and the sphere-map / multiplicative-shadow
shader hacks are removed. Godot consumer uses Render3DStageTexcoords.
- Lighting: 8 D3D lights in camera space, 1/(a0+a1d+a2d^2) without clamp,
spot cone theta/2 phi/2 with falloff, diffuse/ambient/emissive material
sources, NORMALIZENORMALS, inverse-transpose normal matrix.
- Alpha test compares 8-bit alpha against ALPHAREF with ALPHAFUNC.
- Back-buffer Clear() is recorded in draw order and executed with
vkCmdClearAttachments; render pass clears to 0xff000000.
- D3DVIEWPORT8 (incl. MinZ/MaxZ) is dynamic per-draw state.
- Missing vertex diffuse is opaque white; alpha blend mirrors SRC/DESTBLEND.
- CScreen::ms_clearDepth / ms_diffuseColor initialised to 40250's
1.0f / 0xffffffff (were zero; exposed once clears were executed).
- Capture format v8; --screenshot-out FILE.bmp swapchain readback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Purged 66 obsolete GDScript UI components and mobile prototype UI from project/ui/ (retaining ui_assets.gd)
- Purged deprecated GDScript game scene, flow state machines, and local gameplay controllers (app_flow, game_scene, player_controller, net_world, etc.)
- Purged deprecated local system simulation scripts (consumable_system, chest_system, equip_rules, etc.) and project/fx/
- Purged legacy GDScript unit tests targeting obsolete classes
- Unified viewport back buffer sizing in CGraphicBase/CGraphicDevice/PythonBoot
- Cleaned up client_main.gd and python_host_check.gd for pure native port architecture
- Verified all port tests passing: port_map.py check (0 errors), port_gate.sh macos PASS (19/19 suites), python_game_render_test PASS
- UserInterface/PythonShop.cpp ported verbatim (shop module, initshop after initfly);
pending stub and module stubs removed.
- 40250 PythonApplicationCursor.cpp and SetMouseHandler moved into the platform
CPythonApplication on file-static members; GetCursorNum out of line, since uishop's
app.GetCursor() dereferenced the missing application object.
- Fake server: general store (npclist 9003) answers CG_ON_CLICK with GC_SHOP START,
CG_SHOP BUY/SELL2/END like CShop::Buy / CShopManager::Sell.
- port.login_flow step 10: click the shopkeeper, right-click buy, drag-sell, ESC close.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fake server spawns a stray dog outside the village's BANPK safe disc
and answers CG_TARGET/CG_ATTACK with GC_TARGET/GC_DAMAGE_INFO/GC_DEAD.
port.login_flow and python_game_render_test hold the left button on it
(MBF_SMART -> __OnPressActor) until it dies. Adds the host/test helper
PythonBoot::Evaluate / Metin2PythonHost.evaluate.
python_3d_surface: emission is now multiplied by the texture, like
D3D's emissive-then-MODULATE, which removes the grey click-glow quad and
the grey wash on characters. Damage numbers wait on CPythonSystem (4-g).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- UserInterface/PythonIME(+Module) ported verbatim; ime module stubs removed, initime() after initdbg()
- EterLib/IME.cpp in platform/: 40250 buffer/WMChar bodies, IMM/TSF processors no-op; committed
multi-byte text via PythonBoot::UIChar emulating GCS_RESULTSTR
- GameApplicationAdapter RunIME* -> CWindowManager; Godot keys -> ui_ime_key/ui_char
- port.login_flow/login_live type the account through the IME; chat CG_CHAT round-trip on the fake server
- python_game_render_test logs in with Godot key events
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without MT_PORT_PATH the app runs 40250 system.py on the Python UI and
3D surfaces; MT_PORT_PATH=legacy keeps the GDScript AppFlow. The
smoke/playable live tests stay on legacy, MT_TEST_MODE=python_ui remains
a port alias, and an unset switch falls back to legacy (with a warning)
when the Python host or the 40250 pack is missing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GameLib map/area/terrain units, PRTerrainLib Terrain/TextureSet,
PythonBackground(+Module) and ColorTransitionHelper ported verbatim;
pending stand-ins and background module stubs removed. Hand edits:
BeginEnvironment's pointer tag via uintptr_t, LoadWaterMap reads the
file's 32-bit longs. Terrain draw passes stay platform no-ops (Godot
draws the terrain). RecordingDevice gains textures, buffers and render
targets; orthographic draws become UI commands so CPythonMiniMap's
masked tiles show through minimap_image_filter in python_ui_surface.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EffectLib's 18 units are copied verbatim (Type.h: drop a comment backslash
that clang splices into the next enum line). The remaining Utils stubs get
the 40250 bodies, so .msf fly data resolve relative .mse attachments, and
CPythonResource registers mde/mdatr as 40250 does. login_flow spawns
level_up.mse and sees its particle draws.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy PythonSkill.cpp and the EterBase/Poly formula parser verbatim, drop the
pending stand-in and the skill module stub, register initskill() after
initfly() and build CPythonSkill in m_pySkill's place. LoadLocaleData now
loads skilldesc/skilltable. Skill and item icon handles go through
Py_BuildPointer/PyTuple_GetPointer (ILP32 ints truncate 64-bit pointers).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>