diff --git a/polymer/eduke32/build/include/compat.h b/polymer/eduke32/build/include/compat.h index 99a888478..32051d951 100644 --- a/polymer/eduke32/build/include/compat.h +++ b/polymer/eduke32/build/include/compat.h @@ -20,6 +20,13 @@ # define ATTRIBUTE(attrlist) #endif +#ifndef min +#define min(x,y) ((x) < (y) ? (x) : (y)) +#endif +#ifndef max +#define max(x,y) ((x) > (y) ? (x) : (y)) +#endif + // This gives us access to 'intptr_t' and 'uintptr_t', which are // abstractions to the size of a pointer on a given platform // (ie, they're guaranteed to be the same size as a pointer) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 4ba61eb4e..fb6cb3fe4 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10405,7 +10405,7 @@ int32_t app_main(int32_t argc, const char **argv) if (g_networkMode != NET_DEDICATED_SERVER) { - if (CONTROL_Startup(1, &GetTime, TICRATE)) + if (CONTROL_Startup(controltype_keyboardandmouse, &GetTime, TICRATE)) { ERRprintf("There was an error initializing the CONTROL system.\n"); uninitengine(); diff --git a/polymer/eduke32/source/mapster32.h b/polymer/eduke32/source/mapster32.h index 5cf6ef736..b182ef178 100644 --- a/polymer/eduke32/source/mapster32.h +++ b/polymer/eduke32/source/mapster32.h @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //#define NUMOPTIONS 9 //char option[NUMOPTIONS] = {0,0,0,0,0,0,1,0,0}; -uint8_t default_buildkeys[NUMBUILDKEYS] = +char default_buildkeys[NUMBUILDKEYS] = { 0xc8,0xd0,0xcb,0xcd,0x2a,0x9d,0x1d,0x39, 0x1e,0x2c,0xd1,0xc9,0x47,0x49, diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index d12127ecc..46d6a21e2 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -661,7 +661,7 @@ static void M_DrawBackground(void) } -static void M_DrawTopBar(char *caption) +static void M_DrawTopBar(const char *caption) { rotatesprite_fs(160<<16,19<<16,65536L,0,MENUBAR,16,0,10); menutext(160,24,0,0,caption); @@ -2669,7 +2669,7 @@ cheat_for_port_credits2: #ifdef POLYMER else { - float ratios[] = { 0.0, 1.33, 1.66, 1.78, 1.85, 2.35 }; + double ratios[] = { 0.0, 1.33, 1.66, 1.78, 1.85, 2.35 }; int32_t j = (sizeof(ratios)/sizeof(ratios[0])); diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index 9811492e8..33dae8d34 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -627,7 +627,7 @@ static void docmpsd(const void *ptr, void *dump, uint32_t size, uint32_t cnt, ui { \ if (*p!=*op) \ { \ - *op = *p; \ + *op = *p; \ VAL(Idxbits, retdiff) = i; \ retdiff += BYTES(Idxbits); \ VAL(Datbits, retdiff) = *p; \