Commit Graph
33 Commits
Author SHA1 Message Date
shenleiandClaude Opus 5.5 8f96e7a143 Android device verification: forced landscape, fullscreen, data layering
- Ava2Activity passes the "args" intent extra as the command line
  (build.sh forwards AVA2_ARGS); it also always requests sensor landscape.
- app_loop sets SDL_HINT_ORIENTATIONS to landscape and creates the window
  fullscreen on Android/iOS (SDL requested FULL_USER for the resizable
  window, overriding the manifest; the status bar drew over the HUD).
- push_assets.py: pack-manifest test-rundir now wins over assets/loose
  (~1000 differing files; half-size tree atlases broke SpeedTree UVs),
  pushes in batches of <=20k files, and chmods shell-owned files so the
  app can read them on Android 17.
- PORT-PLAN: device verification results and outstanding gaps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:53:56 +09:00
shenleiandClaude Opus 5.5 6244b1d860 Mobile gestures: item tap/drag/double-tap/long-press on original windows
Port the EterPythonLib CSlotWindow/CGridSlotWindow mouse handlers
(select, drop, use, right click, tooltips, grid picking/CheckMoving) and
CWindowManager IsDragging/right button, which were missing so item
interaction did not work on desktop either. app.SetMouseHandler now
renders the attached icon, app.IsPressed reads real key state, desktop
double clicks reach the window manager.

The touch router maps UI touches to the original mouse: tap = click at
the touch-down point, drag = press-and-drag, double tap = double click,
long press on an item slot = touch.SetLongPressEvent, which opens the
ui_mobile_actions item sheet (use / split / quick slot via virtual
Shift/Ctrl). New ava2.inventory_touch test drives uiinventory.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 05:16:12 +09:00
shenleiandClaude Opus 5.5 908838c8f9 Mobile step 7b: iOS packaging (simulator verified to the game scene)
- ios/build.sh builds static SDL3 + FreeType, then the .app (code only,
  embedded Python); signs ad hoc and runs on a simulator, or signs with a
  development profile and installs with devicectl (device path untested).
  Simulator-only SDL patch: accept the simulator Metal device for SDL_GPU.
- ios/Info.plist.in: landscape, full screen, launch screen, file sharing.
- Data dir is Documents on iOS; ios/push_assets.py stages the client root
  lower-cased (iOS is case-sensitive, the client opens lower-cased paths)
  and copies it into the app container.
- EffectData path normalisation folds A-Z like the effect cache key.
- android/push_assets.py: test-rundir base layer + svside/, which the game
  phase needs (also fixes Android); --lowercase (ASCII only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:21:07 +09:00
shenleiandClaude Opus 5.5 f973b24abc Split the frame loop out of main.cpp (app_loop) for SDL main callbacks
main.cpp moves to app_loop.cpp; its body becomes RunClient, a C++20
coroutine suspended at the top of each frame, driven by ava2::app::AppLoop
(Start/Iterate/QueueEvent/Finish/Run). The new main.cpp uses SDL main
callbacks (AVA2_MAIN_CALLBACKS, default on except Android) or the classic
loop. Screenshots are byte-identical through both drivers; 54/54 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:28:50 +09:00
shenleiandClaude Opus 5.5 64d25e3571 Mobile step 6: client-side auto hunt with AUTO button
Engine-free AutoHunt state machine (search/engage/loot/return/paused) driven
from the game loop through the existing manual paths: move target, target
packet, normal attack, quickslot skills, item pick-up and belt potions.
player.SetAutoHunt/GetAutoHuntState/SetAutoHuntOption with autohunt.cfg;
AUTO button on the combat wheel (tap toggles, long press opens settings).
Tests: ava2.auto_hunt, extended ava2.touch_game; 54/54.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:05:15 +09:00
shenleiandClaude Opus 5.5 ed2c185135 Mobile UI scaling and live safe-area relayout (mobile step 5)
Phones and tablets pick the logical UI size from the screen (height
600..768 from the dp height, width from the aspect ratio) instead of
letterboxing 1024x768; metin2.cfg is left untouched via a display-size
override. --phone/--safe-insets/--ui-height simulate on desktop. The
mobile HUD rebuilds and re-adopts the original windows when the safe
area changes. Keeps HUD gauge backgrounds alive and fixes the step-4
disc pixel check threshold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:39:58 +09:00
shenleiandClaude Opus 5.5 11bd94d1ce Mobile HUD layout: disc widgets, quickslot wheel and belt (mobile step 4)
Native CDisc window for procedural round frames; ui_mobile_widgets
(RoundButton, QuickSlotDisc); HUD laid out as the phone plan: player
panel, top-right entry row with minimap, left button column, attack disc
with two quickslot rings, potion belt on quickslot page 4, exp bar. The
PC taskbar and its tooltips are hidden in mobile mode. Adds global
quickslot use/add/move for the belt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:14:29 +09:00
shenleiandClaude Opus 5.5 b79fbce0b0 Add platform layer: lifecycle, data dirs, safe area (mobile step 2)
Move the macOS/Android data and config directory code out of main.cpp
into src/app/platform. Handle background/foreground: save config and
interface status, pause audio, cancel touch input and skip rendering
while keeping the network pumped. Map the window safe area through the
letterboxed presentation into TouchLayout and expose touch.GetSafeArea()
so the mobile HUD stays clear of notches and gesture bars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:45:07 +09:00
shenleiandClaude Opus 5.5 260d421bde Wire attack and combo execution (mobile step 3b)
Port the ActorInstanceBattle combo state machine, CRaceMotionData attack
data, player motion/combo tables, NEW_Attack + OnAttack/OnHit packets and
remote FUNC_ATTACK/FUNC_COMBO playback so keyboard and touch attacks swing
and hit on the real-server path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:30:57 +09:00
shenleiandClaude Opus 5.5 5597842d90 Add touch input router for mobile (step 3)
Route each finger to UI, the attack button, a floating lower-left joystick or
the camera (drag rotate, pinch zoom, tap = world click). Touch mode is default
on Android/iOS and available on desktop via --touch / AVA2_TOUCH=1; it disables
SDL touch-to-mouse and drives app.ENABLE_MOBILE_HUD. The joystick feeds the
original camera-relative movement path and the attack button sets the same
attack-key state as player.SetAttackKeyState. New `touch` Python module; the
mobile HUD joystick and combat wheel become display-only.

Tests: ava2.touch_router, ava2.touch_game (GameWindow + mobile HUD).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:46:24 +09:00
shenleiandClaude Opus 5.5 81bf7ae629 PORT-PLAN: record Android step 1 (APK packaging and game data)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:58:22 +09:00
shenleiandClaude Opus 5.5 043881f032 docs: add mobile architecture plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:30:23 +09:00
shenleiandClaude Opus 5.5 35f768b6ae PORT-PLAN: record helper attachments kept across rebinds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:18:14 +09:00
shenleiandClaude Opus 5.5 552f6c7df4 PORT-PLAN: record blended centre sort and sibling SDK default
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:09:32 +09:00
shenleiandClaude Opus 5.5 7236edf747 PORT-PLAN: record real-time clocks and LOD mesh swap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:56:56 +09:00
shenleiandClaude Opus 5.5 71f393bbd1 PORT-PLAN: record FPS optimization pass 2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:36:57 +09:00
shenleiandClaude Opus 5.5 b5a15871f4 docs: record the 2026-10-12 per-frame optimization pass
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:46:17 +09:00
shenandshen ff8667e3b9 refactor: 重构项目目录结构并纳入assets资源文件跟踪 2026-10-11 20:33:47 -07:00
shenandshen 281418f351 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.
2026-10-11 17:55:53 -07:00
shenandshen 08cc8865be Optimize rendering: frame pacing, UI culling, render scale and GPU scratch buffers 2026-10-08 17:06:17 -07:00
shenandshen d7adbb3014 pass39: complete exhaustive class-by-class and method-by-method rendering and display parity 2026-10-08 06:19:30 -07:00
shenandshen 83c7c5ad0b feat: pass38 - FlyingManager indexed fly data, CPythonManagerBank wire integration, renderTarget 1:1 parity, and dynamic module resolver 2026-10-08 05:33:31 -07:00
shenandshen 8d505c3d34 feat: pass37 - CPythonItem singleton, battle status math, and regen safe range parity 2026-10-08 04:05:06 -07:00
shenandshen 263c96aaa4 feat(parity): implement sash system, fishing raycasting, guild area events, packet subheaders, and item links (pass 36) 2026-10-08 03:07:36 -07:00
shenandshen efd3a44fa0 feat(parity): replicate batch items pickup, dragon soul refine packet, target sync, and attackability (pass35) 2026-10-08 02:11:08 -07:00
shenandshen 9a635932d6 feat(parity): replicate skill execution, affect sync, packet send methods, and monster color oracle (pass34) 2026-10-08 01:55:39 -07:00
shenandshen a7f55b29d5 feat(parity): implement Conqueror level text tail and ground item name resolution (pass33) 2026-10-08 00:07:33 -07:00
shenandshen a3674ee672 feat(parity): implement EterBase CTimer, image/slot cooldown geometry rendering (pass32) 2026-10-08 00:01:18 -07:00
shenandshen b70e9aa2d7 feat(parity): implement skill cooldown end, server emotions, target packets and render target parity (pass31) 2026-10-07 23:31:17 -07:00
shenandshen 6b8d40f894 feat(network): align ping/pong and observer packets with Windows reference (pass30) 2026-10-07 22:19:54 -07:00
shenandshen d9a2ff3fca AVA2 Windows parity passes 26-29: background, grp/net/player/app complete port, 0 placeholders, portable assets 2026-10-07 21:18:47 -07:00
shenleiandClaude Opus 5.5 9077aa389a AVA2 client Windows parity passes (gr2 BitKnit2/64-bit, GamePhase handlers, python modules)
- gr2: BitKnit2 decompression, 64-bit LE files, compressed curves
- net: remaining GamePhase handlers, generated GC packet table
- python: event/chat/chr/minimap/guild/quest/messenger/shop-search and
  other native modules ported against the AVA2 Windows client
- render: D3D8 fixed-function lighting in Gr2ModelRenderer, terrain
  without baked shade; cape/NPC equipment attachment
- tests + audits updated; docs/PORT-PLAN.md and WINDOWS-PARITY.md

Batch 4 (render pipeline: background.*, app.RenderGame/UpdateGame,
camera bindings, main.cpp fake-content removal) is still in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:43:01 +09:00
shen 9f748eb05a AVA2 cross-platform client parity baseline 2026-10-06 00:53:42 -07:00