D343 M2: GE-styled options panel on file select; D344 docs

The file-select Options label opens a panel drawn in the same hook:
sections as tabs, rows from the F10 overlay's table via an exported row
API, the game's crosshair as pointer (input.c passes the stick, hands the
buttons to the panel). Quit to desktop now goes through videoRequestQuit.
Also repairs two escaped-newline typos in the D343 docs.
This commit is contained in:
James Dansereau committed 2026-09-27 10:38:16 -04:00
1 parent 461ea871c2
commit fd82dda717
9 files changed
+728 -92

No files matched your search

+11 -4
View File
@@ -81,6 +81,7 @@
#include "input.h"
#include "envflag.h"
#include "optionsoverlay.h"
#include "frontoptions.h"
/* D194 absolute aim: read-only access to the live camera (struct player).
* Game header pulled in through the same shim path every other compiled game
* file uses; we only READ vv_theta/vv_verta/speedtheta/speedverta/aspect. */
@@ -121,6 +122,7 @@ extern s32 g_ClockTimer;
* MENU_INVALID (-1) means the front end never ran (bare -level_XX boot):
* treat that as in-game so direct-launch mouse-look is unaffected. */
extern int current_menu;
#define GE_MENU_FILE_SELECT 5
#define GE_MENU_RUN_STAGE 11
#define GE_MENU_INVALID (-1)
/* D169: the front-end cursor lives in the game's virtual-screen field, which
@@ -933,10 +935,6 @@ unsigned inputComputePad(int idx, signed char *stick_x, signed char *stick_y)
return 0;
}
/* D343: apply a pending open from the file-select "Options" label (posted
* on the game thread; the overlay's open flag belongs to this thread). */
if (idx == 0) optionsOverlayPollRequests();
/* F10 options overlay: while it is open, controller 0 is fully swallowed
* (neutral pad, no stick) and the nav keys / wheel / gamepad drive the
* overlay instead. Mirrors the WI-1 "cursor free in a stage -> withhold
@@ -949,6 +947,7 @@ unsigned inputComputePad(int idx, signed char *stick_x, signed char *stick_y)
SDL_CONTROLLER_BUTTON_BACK) : 0;
if (selNow && !padSelectPrev) optionsOverlayToggle();
padSelectPrev = selNow;
frontOptionsFeedPad(0); /* D343: the options panel gets nothing meanwhile */
optionsOverlayHandleInput();
if (stick_x) *stick_x = 0;
if (stick_y) *stick_y = 0;
@@ -1482,6 +1481,14 @@ unsigned inputComputePad(int idx, signed char *stick_x, signed char *stick_y)
sy = scriptCurSY;
}
/* D343: the file-select options panel is open. The stick still reaches
* the game (it moves front.c's crosshair, which is the panel's pointer);
* the buttons go to the panel instead, so front.c sees no presses. */
if (idx == 0 && current_menu == GE_MENU_FILE_SELECT && frontOptionsIsOpen()) {
frontOptionsFeedPad(button);
button = 0;
}
if (sx > STICK_MAX) sx = STICK_MAX;
if (sx < -STICK_MAX) sx = -STICK_MAX;
if (sy > STICK_MAX) sy = STICK_MAX;