Files
goldeneye-pc-port/port/include/watchsettings.h
T
James Dansereau fe57d73924 optionsoverlay/watchsettings/frontoptions: D356 settings regroup — functional sections, save-file scoping, per-section reset-to-defaults (Gate E)
- 5 sections (INPUT/GAMEPLAY/GRAPHICS/AUDIO/VIDEO, all below MAX_PROWS):
  DISPLAY+GRAPHICS merged into GRAPHICS; AUDIO carries the watch music/FX
  sliders out of the Bond-file page; VIDEO keeps the pure video rows;
  __HdrMouse/__HdrPad merged into INPUT; __HdrBond/__BondFile retired for
  the front-only top save-file row (frontoptions.c)
- save-file scoping: per-file sections (GAMEPLAY, AUDIO) annotated
  '(File N)'/'(no file)' via the new Row.saveScoped flag +
  watchSettingsActiveFolder(); per-file rows in mixed sections carry a dim
  '(save)' tag; the D353 optionsRowIsBondChooser special-case is
  generalized (both UIs)
- N64-watch rows Bond.Look / Bond.AimControl commented out of the menu
  surface (D181/D216 style: keys + watch paths stay live)
- per-section 'Reset to defaults' replaces the Turok rows (plan Gate E):
  edge-triggered two-step arm->confirm within 3 s, one commit, disarm on
  timeout / navigate-away / close (optionsResetMaintain/Clear);
  rowResetSection walks the section's declared range: watch rows ->
  BLANKSAVEDATA through the D352 commit path (front direct, stage queue),
  ini rows -> kResetDefaults[] (the port's C initializers); __Resolution
  is a documented exclusion (action-backed)
- GE_WSPROBE_RESET probe: front tick-120 prepare/dispatch/verify, stage
  tick-120 dispatch / tick-121 verify; a direct -level_XX boot starts its
  timer from phase 0 (front prepare is front-only)
- docs: findings.md D356 + index + CSV, WATCH-SETTINGS-PLAN status,
  OPTIONS-MENU-PLAN pointer, plan doc status -> LANDED

Verified headless: GE_WSPROBE_RESET front (all 5 sections failures=0,
__Resolution untouched, file-2 scope isolation OK) and -level_33 (6
commands queued, all sections verified post-drain, saved music/sfx = 0xFF);
GE_WSPROBE / GE_WSPROBE_FRONT regressions clean; 248/248 build + link.
2026-09-27 14:49:08 -04:00

49 lines
2.2 KiB
C

#ifndef PORT_WATCHSETTINGS_H
#define PORT_WATCHSETTINGS_H
/* D349: one source of truth for Bond-file-backed GE settings. All GE state and
* EEPROM access runs on the game thread. F10 sends requests to that thread. */
enum WatchSettingField {
WATCH_SETTING_MUSIC,
WATCH_SETTING_FX,
WATCH_SETTING_LOOK,
WATCH_SETTING_AUTOAIM,
WATCH_SETTING_AIMCONTROL,
WATCH_SETTING_SIGHT,
WATCH_SETTING_LOOKAHEAD,
WATCH_SETTING_AMMO,
WATCH_SETTING_COUNT
};
int watchSettingsFieldForKey(const char *key); /* -1 for non-watch row */
int watchSettingsFolder(void); /* explicit front chooser; -1 = none */
/* D356: the chooser cycles folders only -- "none" is retired from the UI
* surface (plan §5.5): the front target is always a folder (frontFolder()
* resolves -1 to a valid folder lazily, D354; the auto-init fallback builds
* file 1 if none exists). The UI shows an unavailable state until the
* target's file actually exists instead of a number the write path cannot
* use. */
void watchSettingsChooseFile(int dir); /* game thread only */
int watchSettingsAvailable(void);
int watchSettingsRead(enum WatchSettingField field); /* front: saved file, F10: snapshot */
void watchSettingsSet(enum WatchSettingField field, int value, int commit);
void watchSettingsCommit(enum WatchSettingField field); /* slider release */
void watchSettingsGameTick(void); /* game thread; after gfxFrameMsgQ receive */
/* D356: context-aware, READ-ONLY active-file accessor (never mutates the
* stored front target): in stage -> the stage's active file; front
* contexts -> the resolved front target (frontFolder()'s lazy default).
* -1 when nothing usable (e.g. the auto-init fallback not yet applied).
* Drives the "(File N)" title annotations in the F10 overlay and the front
* options screen (plan §5.5). */
int watchSettingsActiveFolder(void);
/* D356: the BLANKSAVEDATA value of a field -- the per-file "default" the
* reset-to-defaults rows restore (plan §5.3/§5.6). */
int watchSettingsBlankValue(enum WatchSettingField field);
/* D352: queued field commands awaiting the game thread (0 in front
* contexts -- nothing is queued there). Drives the in-stage reset probe's
* dispatch check. */
int watchSettingsQueueCount(void);
#endif