From 02e632b5e22d091a5cbba701af15d8cdb8457322 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 30 Sep 2008 17:27:23 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1085 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/mmulti.c | 2 +- polymer/eduke32/Makefile | 3 ++- polymer/eduke32/source/astub.c | 8 +++++++ polymer/eduke32/source/game.c | 2 +- polymer/eduke32/source/gameexec.c | 38 +++++++++++++++++-------------- 5 files changed, 33 insertions(+), 20 deletions(-) diff --git a/polymer/build/src/mmulti.c b/polymer/build/src/mmulti.c index df7941fc4..966ebee39 100644 --- a/polymer/build/src/mmulti.c +++ b/polymer/build/src/mmulti.c @@ -959,7 +959,7 @@ int getversionfromwebsite(char *buffer) // FIXME: this probably belongs in game initprintf("update: socket() error in getversionfromwebsite() (%d)\n",errno); return(0); } - + initprintf("Connecting to \"http://%s\"\n",host); if (connect(mysock, (struct sockaddr *)&dest_addr, sizeof(struct sockaddr)) == SOCKET_ERROR) { initprintf("update: connect() error in getversionfromwebsite() (%d)\n",errno); diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index 1cedc293c..b83d90004 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -9,6 +9,7 @@ DXROOT=../sdk/dx ALROOT = AL SDLROOT = +SDLCONFIG = sdl-config # Engine options SUPERBUILD = 1 @@ -189,7 +190,7 @@ endif ifeq ($(RENDERTYPE),SDL) ifeq (0,$(SDL_FRAMEWORK)) - OURCFLAGS+= $(subst -Dmain=SDL_main,,$(shell sdl-config --cflags)) + OURCFLAGS+= $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags)) else OURCFLAGS += -DSDL_FRAMEWORK endif diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index a7b4c6117..36371f999 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -7320,10 +7320,14 @@ static void addgroup(const char *buffer) CommandGrps = s; } +#ifdef _WIN32 #define COPYARG(i) \ Bmemcpy(&testplay_addparam[j], argv[i], lengths[i]); \ j += lengths[i]; \ testplay_addparam[j++] = ' '; +#else +#define COPYARG(i) +#endif static void checkcommandline(int argc, const char **argv) { @@ -7334,8 +7338,10 @@ static void checkcommandline(int argc, const char **argv) { lengths = Bmalloc(argc*sizeof(int)); for (j=1; j 0) { testplay_addparam[j-1] = 0; @@ -7498,6 +7505,7 @@ static void checkcommandline(int argc, const char **argv) } else Bfree(testplay_addparam); +#endif } } #undef COPYARG diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index fe51143f9..738835efe 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10839,9 +10839,9 @@ void app_main(int argc,const char **argv) if (ud.config.CheckForUpdates == 1) { - initprintf("Checking for updates...\n"); if (time(NULL) - ud.config.LastUpdateCheck > UPDATEINTERVAL) { + initprintf("Checking for updates...\n"); if (getversionfromwebsite(tempbuf)) { initprintf("Current version is %d",atol(tempbuf)); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 18d522e2a..e11ca9fce 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -1630,25 +1630,29 @@ static int parse(void) } if (sprite[i].statnum == j) break; - /* initialize actor pointers when changing to an actor statnum because they usually - have garbage left over from being handled as a hard coded object */ + /* initialize actor data when changing to an actor statnum because there's usually + garbage left over from being handled as a hard coded object */ - hittype[i].lastvx = 0; - hittype[i].lastvy = 0; - hittype[i].timetosleep = 0; - hittype[i].cgg = 0; - hittype[i].movflag = 0; - hittype[i].tempang = 0; - hittype[i].dispicnum = 0; - T1=T2=T3=T4=T5=T6=T7=T8=T9=0; - hittype[i].flags = 0; - sprite[i].hitag = 0; - - if ((j == 1 || j == 2) && actorscrptr[sprite[i].picnum]) + if (j == 1 || j == 2) { - T5 = *(actorscrptr[sprite[i].picnum]+1); - T2 = *(actorscrptr[sprite[i].picnum]+2); - sprite[i].hitag = *(actorscrptr[sprite[i].picnum]+3); + hittype[i].lastvx = 0; + hittype[i].lastvy = 0; + hittype[i].timetosleep = 0; + hittype[i].cgg = 0; + hittype[i].movflag = 0; + hittype[i].tempang = 0; + hittype[i].dispicnum = 0; + T1=T2=T3=T4=T5=T6=T7=T8=T9=0; + hittype[i].flags = 0; + sprite[i].hitag = 0; + + // pointers + if (actorscrptr[sprite[i].picnum]) + { + T5 = *(actorscrptr[sprite[i].picnum]+1); + T2 = *(actorscrptr[sprite[i].picnum]+2); + sprite[i].hitag = *(actorscrptr[sprite[i].picnum]+3); + } } changespritestat(i,j); break;