AVA2 Windows parity passes 26-29: background, grp/net/player/app complete port, 0 placeholders, portable assets

This commit is contained in:
shen
2026-10-07 21:18:47 -07:00
parent 9077aa389a
commit d9a2ff3fca
19 changed files with 5457 additions and 3657 deletions
+43
View File
@@ -637,3 +637,46 @@ Validation: macOS build and Android arm64 libmain.so pass. Five targeted CTests
- python_test passes, and the macOS/Android builds pass.
- The 229 constants and 925 references are unchanged.
- Interfaces are 370/46/0 (was 557), and the inventory has 402 placeholder bindings (was 596).
## 2026-10-07 pass26 — background module
- **background.** CPythonBackground and PythonBackgroundModule (35 methods in `src/python_background.cpp`).
- Environment, skybox, fog, water, and shadow properties integrated.
- Map info, base coordinates, local to global conversions, atlas loading.
- Results: CTest 40/40.
## 2026-10-07 pass27 — grp, grpImage, grpText, grpThing, item, net
- **grpImage (15), grpText (21), grpThing (8), grp (44)** in `src/python_grp.cpp`:
Safe 64-bit handle registries for `UI::CGraphicTextInstance`, `SGraphicThingHolder`, and `CTextBar`. Implemented all render, transform, camera, text line split, screen shot, and bar functions.
- **item (14)** in `src/python_gameplay_modules.cpp`:
Implemented `GroundItemStore` singleton managing ground items, text tail registration/deletion, distance picking, and ownership. Drop info cache, icon instance handles, item name prefix search, rarity calculations.
- **net (44)** in `src/python_net.cpp`:
CatchKing, OfflineShop, MatrixCard, GuildSymbol/Mark, 67Attr, Calendar, and buffer/error logging bindings.
## 2026-10-07 pass28 — player and app modules
- **player (67 methods)** in `src/python_gameplay_modules.cpp`:
Auto-potion tracking (`SAutoPotionInfo`), emotion registration/rendering via `CResourceManager`/`GrpRegisterImageInstanceHandle`, mouse states/functions, target VID tracking, belt inventory rules (`CBeltInventoryHelper` 4x4 matrix), item manipulation (`SetItemData`, `SetItemCount`, `SetItemMetinSocket`, `SetItemAttribute`, `MoveItem`, `GetItemLink`, `GetItemRandomAttribute`), alignment grade calculation, ground item picking (`PickCloseItem`, `PickCloseItemVector`), player visibility, and character distance queries.
- **app (67 methods)** in `src/python_app.cpp`:
Cursor management (`SetCursor`, `GetCursor`, `ShowCursor`, `HideCursor`), frame rates and timings (`GetRenderFPS`, `GetUpdateFPS`, `GetRenderTime`, `GetUpdateTime`, `SetFPS`), stage flags (`IsDevStage`, `IsTestStage`, `IsLiveStage`), locale address decryption (`LoadLocaleAddr` with 32-bit TEA cipher implementation), script execution (`RunPythonFile`), file checks (`IsExistFile`, `IsFileExist`, `GetFileList`), and window state management (`FlashApplication`, `WindowStatus`, `SetTitle`).
- **Results:**
- Audit check: 46 Windows modules compared; 0 missing methods; 0 overlapping placeholder methods.
- CTest: 40/40 passed (100%).
## 2026-10-07 pass29 — full placeholder elimination across static and active inventories, portable world assets
- **0 Placeholder Bindings in Static Inventory (`docs/WINDOWS-PARITY-INVENTORY.json`)**:
- Resolved all 32 remaining placeholder bindings identified by `tools/audit_windows_parity.py`.
- **item (4 methods)**: `IsSealScroll`, `GetDefaultSealDate`, `GetUnlimitedSealDate`, `IsElement`.
- **player (13 methods)**: `GetItemBind`, `IsTournamentMap` (checks colosseum map via `s_warpMapName` / `CPythonBackground`), `GetItemUnbindTime`, `GetItemElementGrade`, `GetItemElementAttack`, `GetItemElementType`, `GetItemElementValue`, `GetElements`, `IsCombatZoneMap` (checks battlefield map), `GetCombatZonePoints`, `CanSealItem`, `GetItemSealDate`, `GetItemUnSealLeftTime`.
- **shop (2 methods)**: `GetOfflineShopItemTransmutation`, `GetItemElements`.
- **combat_zone & net (13 methods)**: `IsRunning`, `GetRankings`, `GetDay`, `SendCombatZoneRequestActionPacket`, `GetDayActivate` in `python_native_modules.cpp` and `python_net.cpp`, plus `ElementsSpellClose`, `ElementsSpellAdd`, `ElementsSpellChange` in `python_net.cpp`.
- Cleaned up all dead `dummy_*`, `app_dummy_*`, and `net_dummy_*` functions across the entire codebase.
- **Compiler Warnings & Diagnostics**:
- Eliminated Clang `constexpr switch` warnings in `nonplayer_value` template specialization (`src/python_native_modules.cpp`).
- **Portable Asset Loading**:
- Replaced developer absolute paths in `src/main.cpp` for `height.raw`, `tile.raw`, `attr.atr`, `metin2_map1.txt`, `property`, `water.wtr`, and `minimap.dds` with portable relative paths and safe fallbacks.
- **Results:**
- `python3 tools/audit_windows_parity.py`: **0 placeholder bindings**!
- `python3 tools/audit_ava2_python_interfaces.py`: **46 Windows modules compared; 0 missing methods; 0 overlapping placeholder methods**!
- CTest suite: **41/41 tests passed (100%)** including `ava2.render_3d`.
- Android arm64 `libmain.so`: builds cleanly with 0 warnings.
- macOS arm64 `ava2_client`: builds cleanly and runs 60fps game phase.