Repository navigation
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·83 lines (74 loc) · 2.67 KB
/
Copy pathrun.sh
File metadata and controls
executable file
·83 lines (74 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env sh
set -eu
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
BUILD="$ROOT/${DISRUPTOR_BUILD_DIRECTORY:-build}"
RUNTIME="$BUILD/DisruptorRecompiled"
DISC="$ROOT/input/Disruptor (USA).cue"
[ -x "$RUNTIME" ] || { echo "Run ./build.sh first." >&2; exit 1; }
[ -f "$DISC" ] || { echo "The full Disruptor BIN/CUE is required." >&2; exit 1; }
MOUSE_AIM=0
VERTICAL_LOOK=0
MODERN_CONTROLS=0
WIDESCREEN=0
GEOMETRY_CORRECTION=0
PERSPECTIVE_TEXTURES=0
for arg in "$@"; do
case "$arg" in
--mouse-aim) MOUSE_AIM=1 ;;
--vertical-look) VERTICAL_LOOK=1 ;;
--modern-controls) MODERN_CONTROLS=1; MOUSE_AIM=1 ;;
--widescreen) WIDESCREEN=1 ;;
--geometry-correction) GEOMETRY_CORRECTION=1 ;;
--perspective-textures) PERSPECTIVE_TEXTURES=1; GEOMETRY_CORRECTION=1 ;;
*)
echo "Usage: ./run.sh [--mouse-aim] [--vertical-look] [--modern-controls] [--widescreen] [--geometry-correction] [--perspective-textures]" >&2
exit 2
;;
esac
done
export PSX_DISRUPTOR_CONTROL_PROBE=0
if [ "$MOUSE_AIM" -eq 1 ] || [ "$VERTICAL_LOOK" -eq 1 ]; then
[ -f "$ROOT/mouse-aim.ini" ] || {
echo "mouse-aim.ini is missing." >&2
exit 1
}
export PSX_FPS_TELEMETRY=0
echo "Mouse camera input enabled: middle-click in gameplay to capture; middle-click or Esc releases."
fi
if [ "$MOUSE_AIM" -eq 1 ]; then
export PSX_DISRUPTOR_MOUSE_AIM=1
fi
if [ "$VERTICAL_LOOK" -eq 1 ]; then
export PSX_DISRUPTOR_VERTICAL_LOOK=1
echo "Experimental vertical camera and weapon aim enabled."
fi
if [ "$MODERN_CONTROLS" -eq 1 ]; then
export PSX_DISRUPTOR_MODERN_CONTROLS=1
fi
if [ "$GEOMETRY_CORRECTION" -eq 1 ]; then
export PSX_GEOMETRY_CORRECTION=1
fi
if [ "$PERSPECTIVE_TEXTURES" -eq 1 ]; then
export PSX_TEXTURE_CORRECTION=1
fi
if [ "$MODERN_CONTROLS" -eq 1 ]; then
cp "$ROOT/config/keybinds-modern.ini" "$BUILD/keybinds.ini"
echo "Modern controls enabled: WASD, LMB fire, RMB psionic, Space jump, E use."
else
cp "$ROOT/config/keybinds-original.ini" "$BUILD/keybinds.ini"
fi
GAME_CONFIG=game.toml
if [ "$WIDESCREEN" -eq 1 ]; then
GAME_CONFIG=game-widescreen.toml
export PSX_VIDEO_ASPECT=16:9
echo "Experimental native-wide 16:9 enabled; menus and movies remain 4:3."
fi
if [ "$GEOMETRY_CORRECTION" -eq 1 ]; then
echo 'Exact-provenance presentation geometry enabled.'
fi
if [ "$PERSPECTIVE_TEXTURES" -eq 1 ]; then
echo 'Perspective textures enabled for exact world polygons; canonical VRAM and UI remain affine.'
fi
echo 'OpenGL dev-menu builds: press the backquote (`) key; Escape closes it.'
cd "$ROOT"
exec "$RUNTIME" --game "$GAME_CONFIG" --disc "$DISC"