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>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
64d25e3571
commit
f973b24abc
@@ -75,7 +75,7 @@
|
||||
```
|
||||
|
||||
最终都调用原版已有的移动和攻击接口,游戏逻辑不感知输入设备差异。多指同时操作(摇杆 + 攻击 + 镜头)由此支持。
|
||||
- `app_loop` 从 `main.cpp` 抽出,便于 iOS 改用 SDL 回调式主循环;可在做 iOS 时再拆。
|
||||
- `app_loop` 从 `main.cpp` 抽出,便于 iOS 改用 SDL 回调式主循环;可在做 iOS 时再拆。(已完成:`src/app/app_loop.{h,cpp}`,主体为每帧挂起一次的协程;`main.cpp` 只选择 SDL 回调或经典循环。)
|
||||
|
||||
### Python 界面层
|
||||
|
||||
|
||||
Reference in New Issue
Block a user