AVA2 Windows parity passes 26-29: background, grp/net/player/app complete port, 0 placeholders, portable assets
This commit is contained in:
@@ -723,3 +723,52 @@ Remaining:
|
||||
- DeleteInstanceByFade removes at once; with no dead list GetVIDInfo's isDead is always 0.
|
||||
- SetDirection has a null guard (Windows crashes without a selection). SetRotationAll ignores X/Y. MoveToDestPosition does not recompute the direction. testSetRideMan keys the actor as VID 1 (Windows leaves the graphic VID 0).
|
||||
- chr.Update is only called by scripts in the intro phases; in game the main loop updates actors.
|
||||
|
||||
### 2026-10-07 (pass 26): background module
|
||||
Ported 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.
|
||||
- Test: ava2.background. 40/40 tests passing.
|
||||
|
||||
### 2026-10-07 (pass 27): grp, grpImage, grpText, grpThing, item, net
|
||||
Ported 146 placeholders across graphics, item, and networking:
|
||||
- **grpImage (15 methods), grpText (21 methods), grpThing (8 methods), grp (44 methods)** 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 methods)** in `src/python_gameplay_modules.cpp`:
|
||||
Implemented `GroundItemStore` singleton managing ground items, text tail registration/deletion, distance picking, and ownership. Implemented drop info cache, icon instance handle lifecycle, item name prefix search, and rarity calculation.
|
||||
- **net (44 methods)** in `src/python_net.cpp`:
|
||||
Implemented CatchKing, OfflineShop, MatrixCard, GuildSymbol/Mark, 67Attr, Calendar, and buffer/error logging bindings.
|
||||
|
||||
### 2026-10-07 (pass 28): player and app modules — 0 placeholders achieved
|
||||
Ported remaining 134 placeholders across `player` (67 methods) and `app` (67 methods):
|
||||
- **player (67 methods)** in `src/python_gameplay_modules.cpp`:
|
||||
Implemented 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`:
|
||||
Implemented 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`).
|
||||
|
||||
Validation:
|
||||
- Audit check (`python3 tools/audit_ava2_python_interfaces.py`):
|
||||
**46 Windows modules compared; 0 missing methods; 0 overlapping placeholder methods.**
|
||||
- CTest suite: **40/40 tests passed (100%)**.
|
||||
- Clean build across all targets on macOS arm64.
|
||||
|
||||
### 2026-10-07 (pass 29): 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.
|
||||
- **Validation**:
|
||||
- `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.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user