Commit Graph
121 Commits
Author SHA1 Message Date
shenleiandClaude Opus 5.5 b497fce393 port: UserInterface.cpp entry unit — ApplicationSetErrorString/StringTable_Initialize verbatim, Main ADAPTED to PythonBoot, Win32 entry N_A
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:08:00 +09:00
shenleiandClaude Opus 5.5 fd4d9a39df port: GrpDetector verbatim 40250 over a host IDirect3D8 (Direct3DCreate8); GrpDevice::Create verbatim
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:02:12 +09:00
shenleiandClaude Opus 5.5 65c43a84cd port: GrpDevice verbatim 40250 (Create over the recording device, declaration vertex shaders -> stream-0 FVF)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:50:21 +09:00
shenleiandClaude Opus 5.5 b5d413afa6 port: GrpScreen verbatim 40250 (2d draws via UIRender, D3D8 shim device-lost/Present/ID3DXMesh)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:40:57 +09:00
shenleiandClaude Opus 5.5 d73f5ea4bd port: SkyBox verbatim 40250 (native-terrain gate, qualified pure-virtual Destroy)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:31:07 +09:00
shenleiandClaude Opus 5.5 cfae658b6a audit: GrpTextInstance port-map (verbatim, Render draws via UI commands)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:21:57 +09:00
shenleiandClaude Opus 5.5 6f32387567 audit: GrpFontTexture port-map (40250 bodies, HiDPI oversample adaptations)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:21:37 +09:00
shenleiandClaude Opus 5.5 65777331f7 port: GrpImageInstance/GrpExpandedImageInstance verbatim; fix SCREEN blend factor
Both units are the 40250 bodies; only the PDT-stream draw becomes
UIRenderAddImage (with the rendering mode). SCREEN/COLOR_DODGE were packed as
0x28 (INVDESTALPHA+ONE); 40250 uses INVDESTCOLOR+ONE (0x2A). OnIsType calls the
base OnIsType instead of 40250's recursing IsType. port.grp_resource covers the
quads, UVs, colour and blend mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:21:13 +09:00
shenleiandClaude Opus 5.5 010e99f070 port: Grp texture/image/buffer units toward 40250 (+ port.grp_resource)
GrpImage/GrpSubImage verbatim; GrpImageTexture DDS path through CDXTCImage
header + low-texture-memory mip bias, CreateDeviceObjects/CreateFromDiskFile
verbatim; GrpTexture::SetTextureStage via STATEMANAGER. Port-map entries for
GrpTexture/Image/SubImage/ImageTexture/IndexBuffer/VertexBuffer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:15:45 +09:00
shenleiandClaude Opus 5.5 75ea2703c6 port: EterImageLib Image/TGAImage/DXTCImage verbatim (+ d3d.h ddraw shim)
-fno-strict-aliasing on the port targets: 40250 relies on MSVC's lack of
type-based alias analysis (DXTCImage reads Color8888 through DWORD*).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:31:21 +09:00
shenleiandClaude Opus 5.5 32c5a09d6e port: EterLib/Input over host key events (DirectInput polling adapted)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:21:25 +09:00
shenleiandClaude Opus 5.5 5d64311a4d port: MSWindow/MSApplication verbatim over a winuser.h shim (Win32User.cpp)
Host-side window records + message queue; WM_SIZE/WM_MOVE/WM_DESTROY sent
synchronously as Win32 does; PostQuitMessage also queues WM_QUIT. 64-bit
pointer casts ADAPTED. port.ms_window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:19:36 +09:00
shenleiandClaude Opus 5.5 80c5a1e39f port: ProcessCRC verbatim (module introspection adapted) + XTrap mapped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:10:54 +09:00
shenleiandClaude Opus 5.5 6d2d262de8 port(EterLib): TextBar/DibBar/BlockTexture for uiTip TipBoard/BigBoard
TextBar and DibBar verbatim over the FreeType GDI shim (+GetTextExtentPoint32A);
BlockTexture verbatim except Render, which records the clipped quad as a UI
image of the device CPU texture (UIRenderAddImageNamed). Notices now render;
port.text_bar covers block split, pixels, colour, ClearBar and TipBoard clip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:07:24 +09:00
shenleiandClaude Opus 5.5 c7bcb9bbbe port(EterLib): GrpMath/GrpColor/GrpColorInstance verbatim
port.grp_math pins the 40250 conventions: D3DXVec3Rotation applies the
inverse rotation, GetRotationFromMatrix returns negated Z*X*Y angles, and
CGraphicColor defaults to opaque white.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:59:44 +09:00
shenleiandClaude Opus 5.5 042bddf195 port(EterLib): Mutex/Thread/FileLoaderThread/GrpVertexBufferDynamic verbatim over Win32Crt kernel-object shims
Adds CreateSemaphore/ReleaseSemaphore/WaitForSingleObject/CloseHandle/
SetThreadPriority/_beginthreadex to Win32Crt; port.file_loader_thread covers
the shims, CThread and both the un-Created (40250 live) and Created loader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:56:24 +09:00
shenleiandClaude Opus 5.5 e0cdcee2e6 port: EterBase/Debug.cpp log functions verbatim (log.txt, syserr.txt)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:49:20 +09:00
shenleiandClaude Opus 5.5 f9b1044a4a audit: EterBase CRC32/FileBase/MappedFile mapped, with port.utils checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:46:43 +09:00
shenleiandClaude Opus 5.5 290a331aef port: CPythonGraphic::Destroy; audit the last PythonGraphic units
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:44:41 +09:00
shenleiandClaude Opus 5.5 f96b339309 audit: EterBase/error.cpp N_A (Win32 SEH crash log)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:43:38 +09:00
shenleiandClaude Opus 5.5 bda85eea50 port: grp.SaveScreenShot via next-frame swapchain readback + JPEG
CPythonGraphic::SaveScreenShot queues a readback of the next presented
frame (ScreenShotHost -> VulkanWindow::request_frame); WriteScreenShot runs
the rest of 40250's function verbatim (X8R8G8B8 rows, SaveJPEG, EXIF tag).
jpeg_save is encoded with stb_image_write. SHGetSpecialFolderPath returns
$HOME/Documents (else cwd); CreateDirectory/_access/jpeg_save accept '\\'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:43:03 +09:00
shenleiandClaude Opus 5.5 c21e012965 Port map: correct the WebPage/Logo/MovieMan evidence (scripts grepped with LC_ALL=C)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:32:49 +09:00
shenleiandClaude Opus 5.5 ff71726ff0 Port PythonExceptionSender and install it at boot as 40250 Main does
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:31:04 +09:00
shenleiandClaude Opus 5.5 3dfb09df92 Port map: mark the platform units the 40250 SINGAPORE build never reaches N_A
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:27:25 +09:00
shenleiandClaude Opus 5.5 549e12db7c Mark GrpDIB, GrpText, CullingManager and FileLoader PORTED; test the text file loader
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:25:28 +09:00
shenleiandClaude Opus 5.5 3c2ef81536 SphereLib: mark the verbatim sphere tree PORTED with a query test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:24:24 +09:00
shenleiandClaude Opus 5.5 ed61b2d20f SpeedTree: read the .spt collision and composite texcoord blocks
The CSpeedTreeRT stand-in now returns the collision objects stored in
the .spt (12000 section: spheres and cylinders) instead of one fixed trunk
cylinder, and takes leaf texture rects from the 10000 section instead of
hand-picked atlas rects (trees without leaf maps use the frond rect).
SpeedGrass/BoundaryShapeManager are N_A (no 40250 caller).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:20:34 +09:00
shenleiandClaude Opus 5.5 11991d4d1f MilesLib: run the 40250 sound sources verbatim over an AIL software mixer
Copy SoundBase/SoundData/SoundInstance*/SoundManager*/Type from 40250 and
implement the AIL_* calls they make in MilesAil.cpp (2D pan, 3D distance and
listener pan, threaded stream decode, loop counts). The SDL host drains the
mixer. CSoundManager is created/updated/destroyed where 40250 does it and the
old AudioCommands bridge is removed. Port-map MilesLib 142/142 PORTED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:07:37 +09:00
shenleiandClaude Opus 5.5 22d534c5eb Split vulkan_window.cpp by responsibility and render() into phases
VulkanWindow's 3000-line TU becomes sdl_window.cpp (window, events,
cursor, screenshot BMP), vk_device.cpp (device, swapchain, MSAA,
framebuffers), vk_pipelines.cpp (render passes, pipelines),
vk_resources.cpp (buffers, render targets, geometry), vk_textures.cpp
(textures, samplers, descriptors), vk_frame.cpp (render) and
ui_batches.cpp; vulkan_window.cpp keeps construction and timing stats.
Function bodies move verbatim.

render() now reads fence/acquire -> prepare_draws -> prepare_ui ->
write_draw_states -> record_passes -> record_readbacks -> submit ->
finish_readbacks -> present, with FrameDraws / Readback carrying the
locals that used to live across 500 lines.

Verified: login-screen screenshot byte-identical to HEAD; game-world
draw/vertex/index/UI counts identical; ctest, port_gate macos+android,
Android build pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:54:36 +09:00
shenleiandClaude Opus 5.5 75d2dd8545 host: split src/host/main.cpp into translation units
main.cpp (4.5k lines) -> main.cpp (entry, args, synthetic benchmark) plus
vulkan_window, live_client, frame_policy, native_audio, texture_decode,
render_state, input_keymap, host_util. Bodies are moved verbatim; multi-line
VulkanWindow / NativeAudioEngine / FrameRatePolicy members are defined out of
line; one-line accessors stay inline. Anonymous namespace -> mt_host.

No behavior change: ctest 15/15, port_gate macos+android PASS, desktop
--live-client login screen and synthetic --draws runs unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:30:44 +09:00
shenleiandClaude Opus 5.5 a46093104c layout: restructure into src/ tests/ android/ scripts/ tools/
- extension/src/{port,platform,codepage} -> src/; native_render -> src/host
  (+ dxt, shaders/); libgr2 -> src/gr2; extension/third_party -> third_party
- extension/tests -> tests/port, libgr2/tests -> tests/gr2
- android-native -> android (build.sh, push-client.sh moved in)
- script -> scripts; tools/40250 -> tools/server; oracle -> tools/granny-oracle;
  perf tools -> tools/perf
- all build trees under build/ (native, release, android, port-gate)
- xrender:: CMake aliases -> mt::; port-map ledger impl paths rewritten

No code changes. ctest 15/15, port_gate macos+android PASS, port_map check 0 errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:08:19 +09:00
shenleiandClaude Opus 5.5 9c6e3d6d9e render parity: close SpeedTree .spt 0x4E25 follow-up (billboard rect, not leaf texcoords)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 14:33:22 +09:00
shenleiandClaude Opus 5.5 d2356d59c3 render parity unit K: 40250 DDS mip levels
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>
2026-09-28 14:29:30 +09:00
shenleiandClaude Opus 5.5 dda885a17a render parity unit J: 40250 automatic sight range in CPythonApplication::Process
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>
2026-09-28 14:22:41 +09:00
shenleiandClaude Opus 5.5 0e8a1574cb render parity unit I: 40250 PythonGraphic SetGamma, cooldown fan, up/down buttons
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>
2026-09-28 14:17:27 +09:00
shenleiandClaude Opus 5.5 3e270dccc1 render parity unit H2: verbatim 40250 water
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 14:03:12 +09:00
shenleiandClaude Opus 5.5 6dffd1572a render parity unit H1: verbatim 40250 HTP terrain
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>
2026-09-28 13:57:55 +09:00
shenleiandClaude Opus 5.5 863f3771af render parity unit G: 40250 tiling selection + verbatim STP terrain
- PythonApplication::Create mirrors 40250 :1196-1251 (SOFTWARE_TILING cfg,
  auto tiling IsFastTNL ? HTP : STP, MinLOD on !IsFastTNL)
- RecordingDevice caps: VertexShaderVersion 1.1 + CLIPTLVERTS (fast T&L -> HTP)
- MapOutdoorRenderSTP.cpp replaced by the full 40250 source (native gate only)
- native_render XYZRHW: fix inverted screen->NDC Y, negative rhw clip,
  no texture transform on TL vertices, specular-alpha vertex fog (capture v9)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 13:54:11 +09:00
shenleiandClaude Opus 5.5 91ce13c3cf EterLib: port GrpMarkInstance.cpp verbatim
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>
2026-09-28 13:34:03 +09:00
shenleiandClaude Opus 5.5 d817bd7cab SpeedTreeLib: port 40250 wrapper/forest verbatim over a CSpeedTreeRT stand-in
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>
2026-09-28 13:31:57 +09:00
shenleiandClaude Opus 5.5 86e602cb32 port EterLib/GrpShadowTexture verbatim; D3D top-left fill rule for the shadow target (unit C/D)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 13:05:55 +09:00
shenleiandClaude Opus 5.5 5be37b6363 port EterLib LensFlare/ScreenFilter/Decal verbatim (unit C part 1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 13:02:40 +09:00
shenleiandClaude Opus 5.5 96ea03d0a0 port EterLib/GrpLightManager.cpp verbatim, initialise CLightManager (unit B)
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>
2026-09-28 12:59:31 +09:00
shenleiandClaude Opus 5.5 5285ca85fd native render: transliterate D3D8 fixed-function pipeline (unit A)
- 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>
2026-09-28 12:54:13 +09:00
shenandshen 25dd65f2ce feat: complete native client rendering parity updates 2026-09-27 19:44:41 -07:00
shenandshen 400973da11 Fix reached macOS UI primitives and audio fade behavior 2026-09-24 00:31:51 -07:00
shenandshen 330ec9745b port: verify root pack ledger and repair runtime adapters 2026-09-24 00:18:33 -07:00
shenandshen c84f913cfd port: complete python ledger mapping, audio commands bridge and platform stubs
- Added Client/root (74 modules, 3350 funcs) mapped to RUN_AS_IS
- Added UserInterface/PythonNetworkStreamModule.cpp.json mapped to PORTED
- Implemented AudioCommands queue bridging MilesLib SoundManager to Godot AudioDriver
- Implemented AudioDriver node for BGM crossfading, 2D UI SFX and 3D spatial sounds
- Implemented core platform stubs in PythonApplication, GrpScreen, and PythonGraphic
- Passed all 12 port tests (port_gate macos) and python_game_render_test
2026-09-23 23:44:48 -07:00
shenandshen 837c830182 port: complete 100% logic layer, eliminate pending dir, and unify client_main on port route
- Completed batch 4-f (Messenger, Guild, GuildMark), 4-g (PythonSystem, systemSetting), 4-h (PythonSoundManagerModule, MilesLib CSoundManager)
- Ported UserInterface/Locale.cpp, EterLocale/Japanese.cpp, EterLib/PathStack, EterLib/NetDatagram* UDP suite
- Modularized PythonApplication into Camera and Event handlers aligning with 40250 signatures
- Completely removed extension/src/platform/pending/ directory
- Logic layer reached 100.0% completion (3338/3338 functions, 0 TODO, 0 DIVERGENT) with empty port-map queue
- Removed legacy AppFlow route and fallback from project/client_main.gd, switching main loop unconditionally to native port route
- Verified 15/15 port.login_flow integration steps and 19/19 port_gate suites passing
2026-09-23 22:17:59 -07:00
shenlei ee7a9cd3e2 WIP port 4-d quest dialogue modules 2026-09-24 09:53:02 +09:00