From 0a4ff21a9d4720512900630052d25a84655224cb Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 2 Oct 2008 17:45:44 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1087 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/winlayer.c | 9 ++++++--- polymer/eduke32/source/astub.c | 2 +- polymer/eduke32/source/duke3d.h | 2 +- polymer/eduke32/source/game.c | 28 +++++++++++++++------------- polymer/eduke32/source/osdcmds.c | 1 - polymer/eduke32/source/player.c | 2 +- 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/polymer/build/src/winlayer.c b/polymer/build/src/winlayer.c index b6dd62719..0f640c26c 100644 --- a/polymer/build/src/winlayer.c +++ b/polymer/build/src/winlayer.c @@ -2646,7 +2646,7 @@ static int setgammaramp(WORD gt[3][256]) ReleaseDC(hWindow, hDC); return i; } - else + else if (appactive) { // fullscreen uses DirectX LPDIRECTDRAWGAMMACONTROL gam; @@ -2657,7 +2657,8 @@ static int setgammaramp(WORD gt[3][256]) hr = IDirectDrawSurface_QueryInterface(lpDDSPrimary, &IID_IDirectDrawGammaControl, (LPVOID)&gam); if (hr != DD_OK) { - ShowDDrawErrorBox("Error querying gamma control", hr); +// ShowDDrawErrorBox("Error querying gamma control", hr); + initprintf("Error querying gamma control: %s\n",GetDDrawError(hr)); return -1; } @@ -2665,13 +2666,15 @@ static int setgammaramp(WORD gt[3][256]) if (hr != DD_OK) { IDirectDrawGammaControl_Release(gam); - ShowDDrawErrorBox("Error setting gamma ramp", hr); + initprintf("Error setting gamma ramp: %s\n",GetDDrawError(hr)); +// ShowDDrawErrorBox("Error setting gamma ramp", hr); return -1; } IDirectDrawGammaControl_Release(gam); return 0; } + else return 0; } int setgamma(void) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 36371f999..0256da821 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#define BUILDDATE " 20080928" +#define BUILDDATE " 20081002" #define VERSION " 1.2.0devel" static int floor_over_floor; diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index d26ad9497..782fdfcc7 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define APPNAME "EDuke32" #define VERSION " 1.5.0devel" // this is checked against http://eduke32.com/VERSION -#define BUILDDATE " 20080928" +#define BUILDDATE " 20081002" #define HEAD2 APPNAME VERSION BUILDDATE #ifdef __cplusplus diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 2adda3be2..3ed54f022 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -347,13 +347,13 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i { smallbuf[0] = *(t); smallbuf[1] = '\0'; - p = atol(smallbuf); + p = atoi(smallbuf); continue; } smallbuf[0] = *(t++); smallbuf[1] = *(t); smallbuf[2] = '\0'; - p = atol(smallbuf); + p = atoi(smallbuf); continue; } if (*t == 32) @@ -444,13 +444,13 @@ int minitext_(int x,int y,const char *t,int s,int p,int sb) { smallbuf[0] = *(t); smallbuf[1] = '\0'; - p = atol(smallbuf); + p = atoi(smallbuf); continue; } smallbuf[0] = *(t++); smallbuf[1] = *(t); smallbuf[2] = '\0'; - p = atol(smallbuf); + p = atoi(smallbuf); continue; } ch = Btoupper(*t); @@ -812,7 +812,7 @@ void getpackets(void) for (i=connectpoint2[connecthead];i>=0;i=connectpoint2[i]) if (i != other) sendpacket(i,packbuf,packbufleng); - if (packbuf[2] != BYTEVERSION) + if (packbuf[2] != (char)atoi(BUILDDATE)) gameexit("\nYou cannot play Duke with different versions."); other = packbuf[1]; @@ -9676,7 +9676,7 @@ static void checkcommandline(int argc, const char **argv) case 'L': ud.warp_on = 1; c++; - ud.m_level_number = ud.level_number = (atol(c)-1)%MAXLEVELS; + ud.m_level_number = ud.level_number = (atoi(c)-1)%MAXLEVELS; break; case 'm': case 'M': @@ -9718,7 +9718,7 @@ static void checkcommandline(int argc, const char **argv) case 'Q': initprintf("Fake multiplayer mode.\n"); if (*(++c) == 0) ud.multimode = 1; - else ud.multimode = atol(c)%17; + else ud.multimode = atoi(c)%17; ud.m_coop = ud.coop = 0; ud.m_marker = ud.marker = 1; ud.m_respawn_monsters = ud.respawn_monsters = 1; @@ -9733,7 +9733,7 @@ static void checkcommandline(int argc, const char **argv) case 's': case 'S': c++; - ud.m_player_skill = ud.player_skill = (atol(c)%5); + ud.m_player_skill = ud.player_skill = (atoi(c)%5); if (ud.m_player_skill == 4) ud.m_respawn_monsters = ud.respawn_monsters = 1; break; @@ -9794,7 +9794,7 @@ static void checkcommandline(int argc, const char **argv) case 'V': c++; ud.warp_on = 1; - ud.m_volume_number = ud.volume_number = atol(c)-1; + ud.m_volume_number = ud.volume_number = atoi(c)-1; break; case 'w': case 'W': @@ -9825,7 +9825,7 @@ static void checkcommandline(int argc, const char **argv) case 'z': case 'Z': c++; - g_ScriptDebug = atol(c); + g_ScriptDebug = atoi(c); if (!g_ScriptDebug) g_ScriptDebug = 1; break; @@ -10494,7 +10494,7 @@ static void sendplayerupdate(void) buf[0] = 6; buf[1] = myconnectindex; - buf[2] = BYTEVERSION; + buf[2] = (char)atoi(BUILDDATE); l = 3; //null terminated player name to send @@ -10840,6 +10840,8 @@ void app_main(int argc,const char **argv) if (i) ud.config.CheckForUpdates = 1; } +// initprintf("build %d\n",(char)atoi(BUILDDATE)); + if (ud.config.CheckForUpdates == 1) { if (time(NULL) - ud.config.LastUpdateCheck > UPDATEINTERVAL) @@ -10847,10 +10849,10 @@ void app_main(int argc,const char **argv) initprintf("Checking for updates...\n"); if (getversionfromwebsite(tempbuf)) { - initprintf("Current version is %d",atol(tempbuf)); + initprintf("Current version is %d",atoi(tempbuf)); ud.config.LastUpdateCheck = time(NULL); - if (atol(tempbuf) > atol(BUILDDATE)) + if (atoi(tempbuf) > atoi(BUILDDATE)) { if (wm_ynbox("EDuke32","A new version of EDuke32 is available. " "Browse to http://eduke32.sourceforge.net now?")) diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 1ed00752d..c53108a9a 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -1404,7 +1404,6 @@ static int osdcmd_visibility(const osdfuncparm_t *parm) static int osdcmd_maxfps(const osdfuncparm_t *parm) { - int i; extern int g_FrameDelay; if (parm->numparms != 1) diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index e8f30d074..a7b01b9ee 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -2750,13 +2750,13 @@ void displayweapon(int snum) int myaimmode = 0, myaimstat = 0, omyaimstat = 0; int32 mouseyaxismode = -1; -static ControlInfo lastinfo = { 0,0,0,0,0,0 }; int jump_input = 0; void getinput(int snum) { int j, daang; static ControlInfo info; + static ControlInfo lastinfo = { 0,0,0,0,0,0 }; int32 tics; boolean running; int32 turnamount;