summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2021-05-07 20:09:32 +0000
committerneonloop2021-05-07 20:09:32 +0000
commit186c5c7f58b1b6b24f1f07990d278a10abe2add9 (patch)
treea5b46984a9bb2e23b760f530e09ab667fa120db6
parent7f6002caba3f0a6749820c2772161caf55b8d267 (diff)
downloaduqm-186c5c7f58b1b6b24f1f07990d278a10abe2add9.tar.gz
uqm-186c5c7f58b1b6b24f1f07990d278a10abe2add9.tar.bz2
uqm-186c5c7f58b1b6b24f1f07990d278a10abe2add9.zip
Initial trimui s support
-rwxr-xr-xbuild.trimui.sh17
-rw-r--r--build/unix/config_proginfo_build7
-rw-r--r--config/flight.cfg66
-rw-r--r--config/override.cfg86
-rw-r--r--src/libs/graphics/sdl/pure.c2
-rw-r--r--src/uqm.c2
6 files changed, 171 insertions, 9 deletions
diff --git a/build.trimui.sh b/build.trimui.sh
index ced5060..3136e7b 100755
--- a/build.trimui.sh
+++ b/build.trimui.sh
@@ -1,8 +1,15 @@
+#! /bin/sh
+
+# To build:
+# ./build.trimui.sh uqm config
+# Select "Optimised Release build"
+# Select "SDL1 without OpenGL"
+# ./build.trimui.sh uqm
+# To install:
+# On the SD card, create ~/.uqm and copy config/override.cfg and config/flight.cfg into it
+# Download uqm-0.8.0-content.uqm and copy it into ./content/packages, where '.' is the location of the uqm executable on the SD card
+
export CC=${CROSS_COMPILE}gcc
-export SYSROOT=$(${CROSS_COMPILE}gcc --print-sysroot)
-export CROSS_ROOT=$SYSROOT
+export SYSROOT=$($CC --print-sysroot)
export PATH=$SYSROOT/usr/bin/:$PATH
-export CFLAGS="$($SYSROOT/usr/bin/sdl-config --cflags) -I$SYSROOT/usr/include"
-export LDFLAGS="-L$SYSROOT/usr/lib"
-export PKG_CONFIG_PATH=$SYSROOT/usr/lib/pkgconfig/
./build.sh $1 $2
diff --git a/build/unix/config_proginfo_build b/build/unix/config_proginfo_build
index b01cf09..b300a15 100644
--- a/build/unix/config_proginfo_build
+++ b/build/unix/config_proginfo_build
@@ -22,6 +22,9 @@
# System specific build flags #
##############################################################################
+if [ -z "$CC" ]; then
+ CC=gcc
+fi
# CFLAGS
SYSTEM_BUILD_CFLAGS=""
@@ -182,9 +185,9 @@ esac
### gcc ###
PROG_gcc_NAME="GNU C compiler"
-PROG_gcc_FILE="gcc"
+PROG_gcc_FILE=$CC
PROG_gcc_ACTION=""
-PROG_gcc_VERSION='$(gcc --version)'
+PROG_gcc_VERSION='$($CC --version)'
### sed ###
diff --git a/config/flight.cfg b/config/flight.cfg
new file mode 100644
index 0000000..e304de6
--- /dev/null
+++ b/config/flight.cfg
@@ -0,0 +1,66 @@
+6.escape.1 = STRING:key Escape
+1.down.1 = STRING:key Down
+1.down.2 = STRING:key Keypad-2
+4.escape.1 = STRING:key Escape
+5.escape.1 = STRING:key Escape
+2.escape.1 = STRING:key Escape
+3.escape.1 = STRING:key Escape
+1.escape.1 = STRING:key Escape
+5.up.2 = STRING:joystick 0 hat 0 up
+5.up.1 = STRING:joystick 0 axis 1 negative
+1.up.2 = STRING:key Keypad-8
+3.up.1 = STRING:key Up
+3.up.2 = STRING:key Keypad-8
+1.up.1 = STRING:key Up
+1.left.2 = STRING:key Keypad-4
+1.left.1 = STRING:key Left
+2.name = STRING:WASD
+6.name = STRING:Joystick 2
+4.name = STRING:ESDF
+1.special.2 = STRING:key Keypad-0
+1.special.1 = STRING:key LeftControl
+3.down.1 = STRING:key Down
+3.down.2 = STRING:key Keypad-2
+3.left.2 = STRING:key Keypad-4
+3.left.1 = STRING:key Left
+2.special.1 = STRING:key b
+2.down.1 = STRING:key s
+2.left.1 = STRING:key a
+3.special.1 = STRING:key [
+5.down.1 = STRING:joystick 0 axis 1 positive
+5.down.2 = STRING:joystick 0 hat 0 down
+3.weapon.1 = STRING:key ]
+2.weapon.1 = STRING:key v
+1.weapon.1 = STRING:key Space
+1.weapon.2 = STRING:key Return
+6.weapon.1 = STRING:joystick 1 button 0
+5.weapon.1 = STRING:joystick 0 button 0
+6.up.1 = STRING:joystick 1 axis 1 negative
+4.up.1 = STRING:key e
+6.up.2 = STRING:joystick 1 hat 0 up
+4.weapon.1 = STRING:key q
+2.up.1 = STRING:key w
+5.left.2 = STRING:joystick 0 hat 0 left
+5.left.1 = STRING:joystick 0 axis 0 negative
+4.special.1 = STRING:key a
+4.down.1 = STRING:key d
+3.name = STRING:Arrows (2)
+1.name = STRING:Arrows
+5.name = STRING:Joystick 1
+4.left.1 = STRING:key s
+5.special.1 = STRING:joystick 0 button 1
+4.right.1 = STRING:key f
+5.right.1 = STRING:joystick 0 axis 0 positive
+6.right.2 = STRING:joystick 1 hat 0 right
+5.right.2 = STRING:joystick 0 hat 0 right
+6.right.1 = STRING:joystick 1 axis 0 positive
+3.right.2 = STRING:key Keypad-6
+1.right.1 = STRING:key Right
+2.right.1 = STRING:key d
+1.right.2 = STRING:key Keypad-6
+3.right.1 = STRING:key Right
+6.special.1 = STRING:joystick 1 button 1
+6.down.1 = STRING:joystick 1 axis 1 positive
+6.down.2 = STRING:joystick 1 hat 0 down
+6.left.2 = STRING:joystick 1 hat 0 left
+6.left.1 = STRING:joystick 1 axis 0 negative
diff --git a/config/override.cfg b/config/override.cfg
new file mode 100644
index 0000000..cd4be58
--- /dev/null
+++ b/config/override.cfg
@@ -0,0 +1,86 @@
+# Keyboard control definitions for the menus. Most keys can be
+# described in a straightforward manner; consult the name table in
+# src/sc2code/libs/input/sdl/keynames.c for the names of unusual keys.
+# Most keys can be named by just the symbol they produce.
+
+# Menu controls. Both sets of arrow keys, basically. Paging controls
+# moving quickly through the file lists in Super Melee. Zooming
+# controls zoom controls in the starmap. "Cancel" is also used to get
+# you into menu mode to begin with. There is a "Special" command
+# currently unused by the game. It seems to have been originally used
+# to call up details on starships in the Super Melee selection screen.
+
+# Arrow key controls...
+up.1 = STRING:key Up
+down.1 = STRING:key Down
+right.1 = STRING:key Right
+left.1 = STRING:key Left
+pageup.1 = STRING:key Tab
+pagedown.1 = STRING:key Backspace
+home.1 = STRING:key Home
+end.1 = STRING:key End
+zoomin.1 = STRING:key PageUp
+zoomout.1 = STRING:key PageDown
+select.1 = STRING:key Return
+select.2 = STRING:key Space
+cancel.1 = STRING:key RightControl
+cancel.2 = STRING:key RightShift
+cancel.3 = STRING:key LeftControl
+
+# ... and the number pad. Note that zoom controls on the starmap are
+# different from the paging controls in Super Melee.
+up.2 = STRING:key Keypad-8
+down.2 = STRING:key Keypad-2
+left.2 = STRING:key Keypad-4
+right.2 = STRING:key Keypad-6
+pageup.2 = STRING:key Keypad-9
+pagedown.2 = STRING:key Keypad-3
+home.2 = STRING:key Keypad-7
+end.2 = STRING:key Keypad-1
+zoomin.2 = STRING:key Keypad-+
+zoomout.2 = STRING:key Keypad--
+select.3 = STRING:key Keypad-Enter
+cancel.4 = STRING:key Keypad-0
+
+# System utility keys.
+delete.1 = STRING:key Delete
+delete.2 = STRING:key Keypad-.
+backspace.1 = STRING:key PageDown
+editcancel.1 = STRING:key F10
+search.1 = STRING:key /
+search.2 = STRING:key F6
+next.1 = STRING:key PageUp
+pause.1 = STRING:key Pause
+pause.2 = STRING:key F1
+exit.1 = STRING:key Escape
+fullscreen.1 = STRING:key F11
+special.1 = STRING:key LeftAlt
+special.2 = STRING:key RightAlt
+
+# Joystick controls, for both port 1 and 2.
+
+up.3 = STRING:joystick 0 axis 1 negative
+down.3 = STRING:joystick 0 axis 1 positive
+left.3 = STRING:joystick 0 axis 0 negative
+right.3 = STRING:joystick 0 axis 0 positive
+
+up.4 = STRING:joystick 0 hat 0 up
+down.4 = STRING:joystick 0 hat 0 down
+left.4 = STRING:joystick 0 hat 0 left
+right.4 = STRING:joystick 0 hat 0 right
+
+cancel.5 = STRING:joystick 0 button 1
+select.4 = STRING:joystick 0 button 0
+
+up.5 = STRING:joystick 1 axis 1 negative
+down.5 = STRING:joystick 1 axis 1 positive
+left.5 = STRING:joystick 1 axis 0 negative
+right.5 = STRING:joystick 1 axis 0 positive
+
+up.6 = STRING:joystick 1 hat 0 up
+down.6 = STRING:joystick 1 hat 0 down
+left.6 = STRING:joystick 1 hat 0 left
+right.6 = STRING:joystick 1 hat 0 right
+
+cancel.6 = STRING:joystick 1 button 1
+select.5 = STRING:joystick 1 button 0
diff --git a/src/libs/graphics/sdl/pure.c b/src/libs/graphics/sdl/pure.c
index df4a329..cfefb41 100644
--- a/src/libs/graphics/sdl/pure.c
+++ b/src/libs/graphics/sdl/pure.c
@@ -141,7 +141,7 @@ TFB_Pure_ConfigureVideo (int driver, int flags, int width, int height, int toggl
/* We'll ask for a 32bpp frame, but it doesn't really matter, because we've set
SDL_ANYFORMAT */
SDL_Video = SDL_SetVideoMode (ScreenWidthActual, ScreenHeightActual,
- 32, videomode_flags);
+ 16, videomode_flags);
if (SDL_Video == NULL)
{
diff --git a/src/uqm.c b/src/uqm.c
index 43c25d8..0053d43 100644
--- a/src/uqm.c
+++ b/src/uqm.c
@@ -241,7 +241,7 @@ main (int argc, char *argv[])
/* .graphicsBackend = */ NULL,
INIT_CONFIG_OPTION( opengl, false ),
- INIT_CONFIG_OPTION2( resolution, 640, 480 ),
+ INIT_CONFIG_OPTION2( resolution, 320, 240 ),
INIT_CONFIG_OPTION( fullscreen, false ),
INIT_CONFIG_OPTION( scanlines, false ),
INIT_CONFIG_OPTION( scaler, 0 ),