diff --git a/games/quake2max/files/patch-client__menu.c b/games/quake2max/files/patch-client__menu.c index 80ba71b96d75..8c98a9c1da89 100644 --- a/games/quake2max/files/patch-client__menu.c +++ b/games/quake2max/files/patch-client__menu.c @@ -1,20 +1,20 @@ ---- client/menu.c.orig Tue Dec 27 10:06:52 2005 -+++ client/menu.c Thu Mar 22 00:36:51 2007 -@@ -898,7 +898,7 @@ +--- client/menu.c.orig 2005-12-27 13:06:52 UTC ++++ client/menu.c +@@ -898,7 +898,7 @@ static void StartNetworkServerFunc( void *unused ) void Multiplayer_MenuInit( void ) { - static qboolean PlayerConfig_ScanDirectories(void); + qboolean PlayerConfig_ScanDirectories(void); if (!server_menu) server_menu = Cvar_Get ("server_menu", "1", 0); -@@ -4784,7 +4784,7 @@ +@@ -4784,7 +4784,7 @@ static qboolean IconOfSkinExists( char *skin, char **f return false; } -static qboolean PlayerConfig_ScanDirectories( void ) +qboolean PlayerConfig_ScanDirectories( void ) { char findname[1024]; char scratch[1024]; diff --git a/games/quake2max/files/patch-client__ref.h b/games/quake2max/files/patch-client__ref.h index 8587e4b6feff..9f23d725f693 100644 --- a/games/quake2max/files/patch-client__ref.h +++ b/games/quake2max/files/patch-client__ref.h @@ -1,11 +1,11 @@ ---- ./client/ref.h.orig Sun Jan 1 15:05:04 2006 -+++ ./client/ref.h Sat Dec 30 17:36:46 2006 -@@ -36,7 +36,7 @@ +--- client/ref.h.orig 2006-01-01 18:05:04 UTC ++++ client/ref.h +@@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, #define MAX_LIGHTSTYLES 256 #define MAX_DECAL_VERTS 128 -#define MAX_DECAL_FRAGMENTS 64 +#define MAX_DECAL_FRAGMENTS 32 #define POWERSUIT_SCALE 4.0F diff --git a/games/quake2max/files/patch-game__g_items.c b/games/quake2max/files/patch-game__g_items.c index 11cdcc957b72..914731483728 100644 --- a/games/quake2max/files/patch-game__g_items.c +++ b/games/quake2max/files/patch-game__g_items.c @@ -1,15 +1,15 @@ ---- game/g_items.c.orig Sat Dec 22 12:32:24 2001 -+++ game/g_items.c Thu Mar 22 00:34:42 2007 -@@ -40,9 +40,9 @@ +--- game/g_items.c.orig 2001-12-22 15:32:24 UTC ++++ game/g_items.c +@@ -40,9 +40,9 @@ gitem_armor_t jacketarmor_info = { 25, 50, .30, .00, gitem_armor_t combatarmor_info = { 50, 100, .60, .30, ARMOR_COMBAT}; gitem_armor_t bodyarmor_info = {100, 200, .80, .60, ARMOR_BODY}; -static int jacket_armor_index; -static int combat_armor_index; -static int body_armor_index; +int jacket_armor_index; +int combat_armor_index; +int body_armor_index; static int power_screen_index; static int power_shield_index; diff --git a/games/quake2max/files/patch-qcommon__files.c b/games/quake2max/files/patch-qcommon__files.c index 45ed64ae7ab2..604260b49ddf 100644 --- a/games/quake2max/files/patch-qcommon__files.c +++ b/games/quake2max/files/patch-qcommon__files.c @@ -1,42 +1,42 @@ ---- qcommon/files.c.orig Wed Jan 4 07:33:05 2006 -+++ qcommon/files.c Sat Dec 30 02:02:16 2006 -@@ -775,6 +775,9 @@ +--- qcommon/files.c.orig 2006-01-04 10:33:05 UTC ++++ qcommon/files.c +@@ -775,6 +775,9 @@ void FS_SetGamedir (char *dir) if (fs_cddir->string[0]) FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) ); +#ifdef DATADIR + FS_AddGameDirectory(va("%s/%s", DATADIR, dir)); +#endif #ifdef LIBDIR FS_AddGameDirectory(va("%s/%s", LIBDIR, dir)); #endif -@@ -999,16 +1002,7 @@ +@@ -999,16 +1002,7 @@ void FS_InitFilesystem (void) // basedir // allows the game to run from outside the data tree // -#if defined __unix__ -#ifdef DATADIR - fs_basedir = Cvar_Get("basedir", DATADIR, CVAR_NOSET); -#else fs_basedir = Cvar_Get("basedir", ".", CVAR_NOSET); -#endif -#endif -#ifdef _WIN32 - fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET); -#endif sv_defaultpaks = Cvar_Get ("sv_defaultpaks", "0", CVAR_ARCHIVE); -@@ -1024,8 +1018,11 @@ +@@ -1024,8 +1018,11 @@ void FS_InitFilesystem (void) // // start up with baseq2 by default // +#ifdef DATADIR + FS_AddGameDirectory (va("%s/"BASEDIRNAME, DATADIR) ); +#endif #ifdef LIBDIR - FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) ); + FS_AddGameDirectory (va("%s/"BASEDIRNAME, LIBDIR) ); #endif FS_AddGameDirectory(va("%s/"BASEDIRNAME, fs_basedir->string)); #ifdef DATADIR diff --git a/games/quake2max/files/patch-ref_gl__gl_model.c b/games/quake2max/files/patch-ref_gl__gl_model.c index 9d2fd4530009..49ca0f473133 100644 --- a/games/quake2max/files/patch-ref_gl__gl_model.c +++ b/games/quake2max/files/patch-ref_gl__gl_model.c @@ -1,38 +1,38 @@ ---- ref_gl/gl_model.c.orig Sun Jan 1 15:07:39 2006 -+++ ref_gl/gl_model.c Thu Mar 22 00:33:43 2007 -@@ -227,7 +227,7 @@ +--- ref_gl/gl_model.c.orig 2006-01-01 18:07:39 UTC ++++ ref_gl/gl_model.c +@@ -227,7 +227,7 @@ static void R_GetTexSize (char *name, mtexinfo_t *out) } - out->script = rs = (struct rscript_s *)out->script = RS_FindScript(va("textures/%s",name) ); + out->script = rs = out->script = RS_FindScript(va("textures/%s",name) ); if (rs && rs->picsize.enable) { if (r_numTexSizes < MAX_IMAGES) -@@ -459,7 +459,7 @@ +@@ -459,7 +459,7 @@ model_t *Mod_ForName (const char *name, qboolean crash while (img != NULL) { strcpy(rs,mod->skins[i]->name); rs[strlen(rs)-4]=0; - (struct rscript_s *)mod->script[i] = RS_FindScript(rs); + mod->script[i] = RS_FindScript(rs); if (mod->script[i]) RS_ReadyScript((rscript_t *)mod->script[i]); i++; -@@ -1374,7 +1374,7 @@ +@@ -1374,7 +1374,7 @@ void Mod_LoadAliasModel (model_t *mod, void *buffer) strcpy(rs,(char *)pheader + pheader->ofs_skins + i*MAX_SKINNAME); rs[strlen(rs)-4]=0; - (struct rscript_s *)mod->script[i] = RS_FindScript(rs); + mod->script[i] = RS_FindScript(rs); if (mod->script[i]) RS_ReadyScript((rscript_t *)mod->script[i]); } -@@ -1465,7 +1465,7 @@ +@@ -1465,7 +1465,7 @@ void R_BeginRegistration (char *model) } -signed int *Mod_GetTris(short p1, short p2, dtriangle_t *side1, dmdl_t *hdr) +static signed int Mod_GetTris(short p1, short p2, dtriangle_t *side1, dmdl_t *hdr) { dtriangle_t *tris = (dtriangle_t *)((unsigned char*)hdr + hdr->ofs_tris); int i; diff --git a/games/quake2max/files/patch-ref_gl__sul_png.c b/games/quake2max/files/patch-ref_gl__sul_png.c index 9061bd5a9a32..0343c095892a 100644 --- a/games/quake2max/files/patch-ref_gl__sul_png.c +++ b/games/quake2max/files/patch-ref_gl__sul_png.c @@ -1,11 +1,11 @@ ---- ref_gl/sul_png.c.orig 2005-12-27 10:57:45.000000000 +0100 -+++ ref_gl/sul_png.c 2012-04-29 06:53:31.000000000 +0200 -@@ -177,7 +177,7 @@ +--- ref_gl/sul_png.c.orig 2005-12-27 09:57:45 UTC ++++ ref_gl/sul_png.c +@@ -177,7 +177,7 @@ void GL_ScreenShot_PNG (void) return; } - if (setjmp(png_ptr->jmpbuf)) + if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_write_struct(&png_ptr, &info_ptr); free(rgbdata); diff --git a/games/quake2max/files/patch-unix__gl_glx.c b/games/quake2max/files/patch-unix__gl_glx.c index cd6f071d8b1f..2b6c2b6df653 100644 --- a/games/quake2max/files/patch-unix__gl_glx.c +++ b/games/quake2max/files/patch-unix__gl_glx.c @@ -1,30 +1,30 @@ ---- unix/gl_glx.c.orig Wed Jan 11 10:04:12 2006 -+++ unix/gl_glx.c Sat Dec 30 18:21:42 2006 -@@ -475,7 +475,6 @@ +--- unix/gl_glx.c.orig 2006-01-11 13:04:12 UTC ++++ unix/gl_glx.c +@@ -475,7 +475,6 @@ static void HandleEvents(void) while (XPending(dpy)) { XNextEvent(dpy, &event); - mx = my = 0; switch(event.type) { case KeyPress: myxtime = event.xkey.time; -@@ -490,15 +489,13 @@ +@@ -490,15 +489,13 @@ static void HandleEvents(void) case MotionNotify: if (mouse_active) { if (dgamouse) { - mx += (event.xmotion.x + win_x) * 2; - my += (event.xmotion.y + win_y) * 2; + mx += (event.xmotion.x + win_x); + my += (event.xmotion.y + win_y); } else { - mx += ((int)event.xmotion.x - mwx) * 2; - my += ((int)event.xmotion.y - mwy) * 2; - mwx = event.xmotion.x; - mwy = event.xmotion.y; + mx += ((int)event.xmotion.x - mwx); + my += ((int)event.xmotion.y - mwy); if (mx || my) dowarp = true; diff --git a/games/quake2max/files/patch-unix__snd_unix.c b/games/quake2max/files/patch-unix__snd_unix.c index d05e65df0785..5f5eddbebaa1 100644 --- a/games/quake2max/files/patch-unix__snd_unix.c +++ b/games/quake2max/files/patch-unix__snd_unix.c @@ -1,29 +1,29 @@ ---- unix/snd_unix.c.orig 2006-01-01 20:46:30.000000000 +0800 -+++ unix/snd_unix.c 2013-09-05 13:28:24.000000000 +0800 +--- unix/snd_unix.c.orig 2006-01-01 12:46:30 UTC ++++ unix/snd_unix.c @@ -59,7 +59,7 @@ qboolean SNDDMA_Init(void) extern uid_t saved_euid; if (snd_inited) - return; + return 1; if (!snddevice) { sndbits = Cvar_Get("sndbits", "16", CVAR_ARCHIVE); @@ -115,7 +115,7 @@ qboolean SNDDMA_Init(void) if (dma.samplebits != 16 && dma.samplebits != 8) { ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &fmt); - if (fmt & AFMT_S16_LE) dma.samplebits = 16; + if (fmt & AFMT_S16_NE) dma.samplebits = 16; else if (fmt & AFMT_U8) dma.samplebits = 8; } @@ -157,7 +157,7 @@ qboolean SNDDMA_Init(void) if (dma.samplebits == 16) { - rc = AFMT_S16_LE; + rc = AFMT_S16_NE; rc = ioctl(audio_fd, SNDCTL_DSP_SETFMT, &rc); if (rc < 0) { diff --git a/games/quake2max/files/patch-unix__sys_unix.c b/games/quake2max/files/patch-unix__sys_unix.c index a060ec7feefc..cb2cc06e213b 100644 --- a/games/quake2max/files/patch-unix__sys_unix.c +++ b/games/quake2max/files/patch-unix__sys_unix.c @@ -1,48 +1,48 @@ ---- unix/sys_unix.c.orig Wed Jan 11 10:06:28 2006 -+++ unix/sys_unix.c Sat Dec 30 02:03:37 2006 -@@ -36,10 +36,6 @@ +--- unix/sys_unix.c.orig 2006-01-11 13:06:28 UTC ++++ unix/sys_unix.c +@@ -36,10 +36,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, #include #include -#ifdef __linux__ -#include -#endif - #include #include "../qcommon/qcommon.h" -@@ -220,15 +216,8 @@ +@@ -220,15 +216,8 @@ void *Sys_GetGameAPI (void *parms) void *(*GetGameAPI) (void *); char name[MAX_OSPATH]; - char curpath[MAX_OSPATH]; char *path; -#ifdef __i386__ - const char *gamename = "gamei386.so"; -#elif defined __alpha__ - const char *gamename = "gameaxp.so"; -#else -#error Unknown arch -#endif + const char *gamename = "game.so"; setreuid(getuid(), getuid()); setegid(getgid()); -@@ -236,8 +225,6 @@ +@@ -236,8 +225,6 @@ void *Sys_GetGameAPI (void *parms) if (game_library) Com_Error (ERR_FATAL, "Sys_GetGameAPI without Sys_UnloadingGame"); - getcwd(curpath, sizeof(curpath)); - Com_Printf("------- Loading %s -------\n", gamename); // now run through the search paths -@@ -247,7 +234,7 @@ +@@ -247,7 +234,7 @@ void *Sys_GetGameAPI (void *parms) path = FS_NextPath (path); if (!path) return NULL; // couldn't find one anywhere - sprintf (name, "%s/%s/%s", curpath, path, gamename); + sprintf (name, "%s/%s", path, gamename); game_library = dlopen (name, RTLD_LAZY ); if (game_library) { diff --git a/games/quake2max/files/patch-unix__vid_menu.c b/games/quake2max/files/patch-unix__vid_menu.c index d680bd2df549..0df5fdc152e5 100644 --- a/games/quake2max/files/patch-unix__vid_menu.c +++ b/games/quake2max/files/patch-unix__vid_menu.c @@ -1,11 +1,11 @@ ---- unix/vid_menu.c.orig Wed Dec 28 10:23:32 2005 -+++ unix/vid_menu.c Thu Mar 22 00:37:42 2007 -@@ -37,7 +37,7 @@ +--- unix/vid_menu.c.orig 2005-12-28 13:23:32 UTC ++++ unix/vid_menu.c +@@ -37,7 +37,7 @@ static cvar_t *gl_driver; static cvar_t *gl_picmip; static cvar_t *gl_texturemode; static cvar_t *gl_anisotropic; -static cvar_t *con_font_size; +cvar_t *con_font_size; static cvar_t *_windowed_mouse;