diff options
Diffstat (limited to 'games/apricots/files')
-rw-r--r-- | games/apricots/files/apricots.in | 16 | ||||
-rw-r--r-- | games/apricots/files/patch-apricots-init.cpp | 29 | ||||
-rw-r--r-- | games/apricots/files/patch-apricots-sampleio.cpp | 45 | ||||
-rw-r--r-- | games/apricots/files/patch-apricots_all.cpp | 11 | ||||
-rw-r--r-- | games/apricots/files/patch-apricots_init.cpp | 20 | ||||
-rw-r--r-- | games/apricots/files/patch-configure.ac | 11 |
6 files changed, 42 insertions, 90 deletions
diff --git a/games/apricots/files/apricots.in b/games/apricots/files/apricots.in deleted file mode 100644 index 839cd66a45d2..000000000000 --- a/games/apricots/files/apricots.in +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ -z "$XDG_CONFIG_HOME" ]; then - XDG_CONFIG_HOME=$HOME/.config -fi - -DOTDIR="$XDG_CONFIG_HOME/apricots" - -mkdir -p "$DOTDIR" -cd "$DOTDIR" || exit 1 - -if [ ! -f apricots.cfg ]; then - cp %%DATADIR%%/apricots.cfg . -fi - -exec %%PREFIX%%/libexec/apricots "$@" diff --git a/games/apricots/files/patch-apricots-init.cpp b/games/apricots/files/patch-apricots-init.cpp deleted file mode 100644 index a55634717a59..000000000000 --- a/games/apricots/files/patch-apricots-init.cpp +++ /dev/null @@ -1,29 +0,0 @@ ---- apricots/init.cpp.orig 2015-08-19 14:00:09 UTC -+++ apricots/init.cpp -@@ -218,7 +218,7 @@ void init_gameconstants(gamedata &g){ - string getConfig(string config, string name, string defval) - { - // Pull out just the name line -- unsigned int ndx = config.find(name); -+ size_t ndx = config.find(name); - - if (ndx == string::npos) - { -@@ -241,7 +241,7 @@ string getConfig(string config, string n - int getConfig(string config, string name, int defval, int min, int max) - { - // Pull out just the name line -- unsigned int ndx = config.find(name); -+ size_t ndx = config.find(name); - - if (ndx == string::npos) - { -@@ -275,7 +275,7 @@ int getConfig(string config, string name - void init_gamedata(gamedata &g){ - - //--JAM: Read from config file -- string filename(AP_PATH); -+ string filename; - filename += "apricots.cfg"; - ifstream config_stream(filename.c_str()); - string config; diff --git a/games/apricots/files/patch-apricots-sampleio.cpp b/games/apricots/files/patch-apricots-sampleio.cpp deleted file mode 100644 index 0671c664f0ca..000000000000 --- a/games/apricots/files/patch-apricots-sampleio.cpp +++ /dev/null @@ -1,45 +0,0 @@ ---- apricots/sampleio.cpp.orig 2015-08-19 14:00:09 UTC -+++ apricots/sampleio.cpp -@@ -74,28 +74,21 @@ void sampleio :: init(int nsamples, char - alListenerfv(AL_ORIENTATION, front ); - - // Load in samples -- ALvoid* data = malloc(5 * (512 * 3) * 1024); -+ ALvoid* data; - alGenBuffers(numsamples, samples); - - for (int i = 0; i < numsamples; i++){ -- ALsizei freq; -+ ALfloat freq; - ALboolean fileok; - // Evil OpenAL portability fix done here --#ifdef _WIN32 - ALenum format; -- ALboolean trash; -- alutLoadWAVFile(filenames[i],&format,&data,&filelen,&freq,&trash); -- fileok = (alGetError() == AL_NO_ERROR); --#else -- ALsizei format; -- ALsizei trash; -- fileok = alutLoadWAV(filenames[i],&data,&format,&filelen,&trash,&freq); --#endif -- if (!fileok){ -+ data = alutLoadMemoryFromFile(filenames[i], &format, &filelen, &freq); -+ if (!data){ - cerr << "sampleio: could not open " << filenames[i] << endl; - exit(1); - } - alBufferData(samples[i], format, data, filelen, freq); -+ free(data); - } - - // Generate Sources -@@ -107,8 +100,6 @@ void sampleio :: init(int nsamples, char - alSourcefv(sources[j], AL_ORIENTATION, back ); - } - -- free(data); -- - } - - // Clearup routine diff --git a/games/apricots/files/patch-apricots_all.cpp b/games/apricots/files/patch-apricots_all.cpp new file mode 100644 index 000000000000..78fd8236158e --- /dev/null +++ b/games/apricots/files/patch-apricots_all.cpp @@ -0,0 +1,11 @@ +--- apricots/all.cpp.orig 2021-02-12 23:45:58 UTC ++++ apricots/all.cpp +@@ -18,7 +18,7 @@ int wrap(int n, int min, int max) { return ((((n - min + + // Sign function + +-inline int sign(int n) { return (0 < n) - (n < 0); } ++int sign(int n) { return (0 < n) - (n < 0); } + + // Error message for switch statements that shouldn't ever get to default + diff --git a/games/apricots/files/patch-apricots_init.cpp b/games/apricots/files/patch-apricots_init.cpp new file mode 100644 index 000000000000..8e6e3353ef0f --- /dev/null +++ b/games/apricots/files/patch-apricots_init.cpp @@ -0,0 +1,20 @@ +--- apricots/init.cpp.orig 2021-02-12 23:45:58 UTC ++++ apricots/init.cpp +@@ -219,7 +219,7 @@ void init_gameconstants(gamedata &g) { + + string getConfig(string config, string name, string defval) { + // Pull out just the name line +- unsigned int ndx = config.find(name); ++ size_t ndx = config.find(name); + + if (ndx == string::npos) { + return defval; +@@ -240,7 +240,7 @@ string getConfig(string config, string name, string de + + int getConfig(string config, string name, int defval, int min, int max) { + // Pull out just the name line +- unsigned int ndx = config.find(name); ++ size_t ndx = config.find(name); + + if (ndx == string::npos) { + return defval; diff --git a/games/apricots/files/patch-configure.ac b/games/apricots/files/patch-configure.ac new file mode 100644 index 000000000000..168c49c7a892 --- /dev/null +++ b/games/apricots/files/patch-configure.ac @@ -0,0 +1,11 @@ +--- configure.ac.orig 2021-02-12 23:45:58 UTC ++++ configure.ac +@@ -6,7 +6,7 @@ AC_INIT([apricots], [0.2.7], [moggers87+git@moggers87. + AC_CONFIG_SRCDIR([apricots/game.cpp]) + AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_MACRO_DIR([m4]) +-AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects]) ++AM_INIT_AUTOMAKE([-Wall subdir-objects]) + AX_IS_RELEASE([git-directory]) + AX_CHECK_ENABLE_DEBUG() + AX_GENERATE_CHANGELOG |