android-native: auto hunt, in-client account registration, mobile UI polish

- Auto hunt (client-only): PythonPlayerAutoHunt.cpp + AutoHuntScript.inc as the
  embedded mt_autohunt module, AUTO touch button, F9/F8.
- Account registration: tools/40250/register_server.py (rc.d mt_register, :11080)
  inserts into account.account; net.RegisterAccount/GetRegisterAccountResult
  (PythonAccountRegister.cpp) and the mt_register login-window dialog
  (RegisterScript.inc).
- --py-exec also runs in --login-screen mode for scripted login-screen tests.
- Touch controller, window manager and render command updates for the
  Android native client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-29 16:15:04 +09:00
co-authored by Claude Opus 5.5
parent 53d06c3c26
commit 3e3708ef06
31 changed files with 2975 additions and 140 deletions
+29 -4
View File
@@ -59,6 +59,10 @@ bool Evaluate(const char* expression, std::string* result, std::string* error);
// Forward physical Godot input to the original 40250 window manager. Coordinates
// are viewport pixels; SetUISize also establishes its logical resolution.
void SetUISize(int width, int height);
// Mobile safe area: the 40250 windows are laid out width - 2 * inset wide and drawn inset pixels
// right of the screen edge (clear of rounded corners and cutouts) while the 3D world keeps the whole
// screen. Input coordinates stay screen pixels. Takes effect at the next SetUISize; 0 = off.
void SetUISafeInset(int inset);
void UIMouseMove(int x, int y);
void UIMouseButton(int button, bool pressed, int x, int y);
void UIMouseWheel(int nLen);
@@ -68,11 +72,32 @@ void SetMoveDirection(float angleDeg, bool moving);
void SetAttackKey(bool pressed);
void UseLocalQuickSlot(int localSlotIndex);
bool TryAssignAttachedObjectToLocalQuickSlot(int localSlotIndex);
std::string LocalQuickSlotSkillIcon(int localSlotIndex);
void CameraBeginDrag(int x, int y);
void CameraDrag(int x, int y);
void CameraEndDrag();
// PORT: auto hunt (CPythonPlayer::AutoHunt_*, window in AutoHuntScript.inc): start/stop, the settings
// window, and whether it runs / a character is in the world to run it.
void AutoHuntToggle();
void AutoHuntOpenSettings();
bool AutoHuntIsEnabled();
bool AutoHuntAvailable();
// The skill or inventory item in the local quick slot: its UI texture name, the icon's (su, sv, eu, ev)
// inside it and the item count (0 for a skill).
bool LocalQuickSlotIcon(int localSlotIndex, std::string* texture, float uv[4], int* count);
// Touch gestures: a Win32 WM_LBUTTONDBLCLK (40250 CPythonApplication::OnMouseLeftButtonDoubleClick),
// whether an icon hangs on the cursor (CWindowManager::IsAttaching) and mouseController.DeattachObject().
void UIMouseDoubleClick(int x, int y);
bool UIIsAttaching();
void UIDeattachObject();
// Turns the camera around the player immediately, without CCamera::Drag's decaying velocity.
void CameraRotateBy(float rollDeg, float pitchDeg);
bool IsPointInsideActiveUI(int x, int y);
// Touch hosts: hide 40250's on-screen login keypad (the system keyboard types instead).
// Also drops the mouse arrow: touch hosts run 40250's hardware-cursor mode with no OS cursor, so
// mouseModule draws only the attached icon.
void SetTouchInput(bool touch);
bool TouchInput();
// An EditLine has focus (40250 ui.EditLine.OnSetFocus -> ime.EnableCaptureInput).
bool TextInputFocused();
// (x, y) hits the focused window, i.e. the tap landed on the focused EditLine.
bool IsPointInsideFocusedWindow(int x, int y);
struct PlayerStatusInfo {
int level = 1;