forked from Ports/goldeneye-pc-port
Compare commits
3
Commits
4bc46d3434
..
fixes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a336ab507e | ||
|
|
4e8ea4ea96 | ||
|
|
98cd3b6b22 |
No files matched your search
+7
-8
@@ -915,12 +915,11 @@ void inputApplyMouseRequests(void)
|
||||
* Controller input is entirely independent of all of this. */
|
||||
/* D594: on macOS the FOCUS_GAINED-driven click-to-lock is unreliable (AppKit
|
||||
* key-window; no focus events over ssh), so start armed like PD's MLOCK_ON --
|
||||
* the mouse is locked by default in-stage (see reconcileGrab()). */
|
||||
#ifdef PLATFORM_MACOS
|
||||
static int captureArmed = 1; /* D594: PD MLOCK_ON default (see reconcileGrab) */
|
||||
#else
|
||||
static int captureArmed = 0; /* user has clicked to lock (capture mode) */
|
||||
#endif
|
||||
* the mouse is locked by default in-stage (see reconcileGrab()). Every other
|
||||
* platform starts armed too: Steam Input's gyro (Steam Deck "Gamepad with Gyro"
|
||||
* template) arrives as mouse motion with no click, so click-to-lock never
|
||||
* captured it. Esc still releases (inputReleaseCapture), a click re-arms. */
|
||||
static int captureArmed = 1;
|
||||
static int windowFocused = 1;
|
||||
static int mouseAimSpeed = 16; /* aim-mode sensitivity, percent (B3: 50 -> 25 M-29 -> 16; still overshot at 25) */
|
||||
static int gepdSens = 38; /* D194 Input.GepdSens: GEPD SENSITIVITY setting, range 1..500
|
||||
@@ -1761,8 +1760,8 @@ int inputInit(void)
|
||||
sysLogPrintf(LOG_INFO, "input: PC bindings, crouch mode %s",
|
||||
crouchMode ? "toggle" : "hold");
|
||||
|
||||
/* Relative mouse mode for mouse-look. Click-to-lock: we start released
|
||||
* and wait for a click in the window (video.c -> inputNotifyClick). */
|
||||
/* Relative mouse mode for mouse-look. Armed by default (PD MLOCK_ON, see
|
||||
* captureArmed): the grab is taken once a stage runs, no click needed. */
|
||||
mouseGrabbed = 0;
|
||||
if (mouseEnabled) {
|
||||
if (mouseRawInput) {
|
||||
|
||||
@@ -301,6 +301,12 @@ static struct Row rows[] = {
|
||||
* vertical/pitch sensitivity, %); input.c already applies it. */
|
||||
{ .key="Input.MouseYScale", .label="Vertical sensitivity", .kind=ROW_SLIDER, .step=10,
|
||||
.uiMin=10, .uiMax=400 }, /* D506: shown as a multiplier like the horizontal row, raw 100 = 1.0x */
|
||||
/* Per-case scales on top of the two rows above: turning the camera vs moving the
|
||||
* crosshair while aiming. Shown as multipliers of their defaults (50 / 38). */
|
||||
{ .key="Input.MouseTurnSpeed", .label="Look speed", .kind=ROW_SLIDER, .step=5,
|
||||
.uiMin=5, .uiMax=250 },
|
||||
{ .key="Input.AimModeSens", .label="Aim speed", .kind=ROW_SLIDER, .step=4,
|
||||
.uiMin=2, .uiMax=190 },
|
||||
{ .key="Input.MouseInvertY", .label="Invert look", .kind=ROW_TOGGLE, .step=1, .names=kOnOff },
|
||||
{ .key="Input.MouseSmoothing", .label="Smoothing", .kind=ROW_SLIDER, .step=5, .unit="%" },
|
||||
{ .key="Input.MouseRawInput", .label="Raw input", .kind=ROW_TOGGLE, .step=1, .names=kOnOff },
|
||||
@@ -2082,6 +2088,8 @@ static const struct { const char *key; double def; } kResetDefaults[] = {
|
||||
{ "Input.CrosshairCursor", 1 }, /* = 1 (on, D555) */
|
||||
{ "Input.MouseSensitivity", 100 }, /* static int mouseSensitivity = 100 */
|
||||
{ "Input.MouseYScale", 100 }, /* = 100 (native), Wave A item 6 */
|
||||
{ "Input.MouseTurnSpeed", 50 }, /* static int mouseTurnSpeed = 50 */
|
||||
{ "Input.AimModeSens", 38 }, /* static int gepdSens = 38 */
|
||||
{ "Input.MouseInvertY", 0 }, /* = 0 */
|
||||
{ "Input.AimMode", 0 }, /* = AIMMODE_N64 (0) */
|
||||
{ "Input.AimRange", 0 }, /* = 0 (PC) */
|
||||
@@ -2997,6 +3005,14 @@ static void valueText(int i, char *out, int n)
|
||||
snprintf(out, n, "%.1fx", v / 100.0);
|
||||
return;
|
||||
}
|
||||
if (!strcmp(r->key, "Input.MouseTurnSpeed")) { /* default 50 = 1.0x */
|
||||
snprintf(out, n, "%.1fx", v / 50.0);
|
||||
return;
|
||||
}
|
||||
if (!strcmp(r->key, "Input.AimModeSens")) { /* default 38 = 1.0x */
|
||||
snprintf(out, n, "%.1fx", v / 38.0);
|
||||
return;
|
||||
}
|
||||
if (!strcmp(r->key, "Game.ScreenShakeIntensity")) { /* D181: shown as whole % */
|
||||
snprintf(out, n, "%d%%", (int)lround(v * 100.0));
|
||||
return;
|
||||
|
||||
@@ -5864,7 +5864,15 @@ s32 objTick(struct PropRecord *prop)
|
||||
{
|
||||
pad36C = (struct DoorRecord *) prop->obj;
|
||||
var_s2_6 = 1;
|
||||
#ifdef PORT
|
||||
/* The opaque distance is the N64 s32 at 0xC4, which the struct splits into CullDist/soundType/
|
||||
* fadeTime60 (Facility lab doors: 0x00000258 = 600). On PC that raw offset lands on openPosition,
|
||||
* so a closed door (0.0) read 0 and its glass stayed opaque until opened. Rebuild the word. */
|
||||
pad36C->calculatedopacity = glassCalculateOpacity(&obj->runtime_pos, pad36C->TintDist,
|
||||
(s32)(((u32)(u16)pad36C->CullDist << 16) | ((u32)(u8)pad36C->soundType << 8) | (u8)pad36C->fadeTime60), 0.0f);
|
||||
#else
|
||||
pad36C->calculatedopacity = glassCalculateOpacity(&obj->runtime_pos, pad36C->TintDist, *((s32 *) (((u8 *) pad36C) + 0xC4)), 0.0f);
|
||||
#endif
|
||||
if (playerCount == 1)
|
||||
{
|
||||
if ((pad36C->calculatedopacity != 0xFF) || (pad36C->openPosition > 0.0f))
|
||||
@@ -14735,3 +14743,4 @@ void drop_inventory(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user