diff --git a/polymer/eduke32/source/anim.c b/polymer/eduke32/source/anim.c index ff8bf1b3c..adf268578 100644 --- a/polymer/eduke32/source/anim.c +++ b/polymer/eduke32/source/anim.c @@ -198,7 +198,8 @@ void endanimvol43(long fr) void playanm(char *fn,char t) { - char *animbuf, *palptr; + char *animbuf; + unsigned char *palptr; long i, j, length=0, numframes=0; int32 handle=-1; diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 824571bc5..36dd0205a 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -50,11 +50,13 @@ extern int conversion, shareware, gametype; #define GAMEDUKE 0 #define GAMENAM 1 +#define GAMEWW2 3 #define VOLUMEALL (shareware==0) #define PLUTOPAK (conversion==14) #define VOLUMEONE (shareware==1) -#define NAM (gametype==1) +#define NAM (gametype&1) +#define WW2GI (gametype&2) #define MAXSLEEPDIST 16384 #define SLEEPTIME 24*64 diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 473ea073a..de1259ee5 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -8362,6 +8362,14 @@ void checkcommandline(int argc,char **argv) if (!Bstrcasecmp(c+1,"nam")) { strcpy(defaultduke3dgrp, "nam.grp"); + strcpy(confilename, "nam.con"); + i++; + continue; + } + if (!Bstrcasecmp(c+1,"ww2gi")) + { + strcpy(defaultduke3dgrp, "ww2gi.grp"); + strcpy(confilename, "ww2gi.con"); i++; continue; } @@ -9014,7 +9022,7 @@ void Logo(void) void loadtmb(void) { - char tmb[8000]; + unsigned char tmb[8000]; long fil, l; fil = kopen4load("d3dtimbr.tmb",0); @@ -9623,7 +9631,16 @@ void app_main(int argc,char **argv) FreeGroups(); - if (NAM) + if (WW2GI) + { + // overwrite the default GRP and CON so that if the user chooses + // something different, they get what they asked for + Bsprintf(defaultduke3dgrp,"ww2gi.grp"); + Bsprintf(confilename, "ww2gi.con"); + Bsprintf(gametype_names[0],"GRUNTMATCH (SPAWN)"); + Bsprintf(gametype_names[2],"GRUNTMATCH (NO SPAWN)"); + } + else if (NAM) { // overwrite the default GRP and CON so that if the user chooses // something different, they get what they asked for diff --git a/polymer/eduke32/source/grpscan.c b/polymer/eduke32/source/grpscan.c index 5c2014986..b981a190f 100755 --- a/polymer/eduke32/source/grpscan.c +++ b/polymer/eduke32/source/grpscan.c @@ -18,6 +18,7 @@ struct grpfile grpfiles[numgrpfiles] = { "Duke Nukem 3D Mac", 0x00000000, 0, GAMEDUKE, NULL }, { "NAM", 0x75C1F07B, 43448927, GAMENAM, NULL }, { "Napalm", 0x3DE1589A, 44365728, GAMENAM, NULL }, + { "WW2GI (limited support)", 0x907B82BF, 77939508, GAMEWW2, NULL }, }; struct grpfile *foundgrps = NULL; diff --git a/polymer/eduke32/source/grpscan.h b/polymer/eduke32/source/grpscan.h index a9fc72e69..d73dbe490 100755 --- a/polymer/eduke32/source/grpscan.h +++ b/polymer/eduke32/source/grpscan.h @@ -2,7 +2,7 @@ #define __grpscan_h__ // List of internally-known GRP files -#define numgrpfiles 8 +#define numgrpfiles 9 struct grpfile { const char *name; int crcval; diff --git a/polymer/eduke32/source/jaudiolib/dsl.c b/polymer/eduke32/source/jaudiolib/dsl.c index 92385c9bf..5e880b670 100755 --- a/polymer/eduke32/source/jaudiolib/dsl.c +++ b/polymer/eduke32/source/jaudiolib/dsl.c @@ -31,7 +31,7 @@ Adapted to work with JonoF's port by James Bentler (bentler@cs.umn.edu) extern int MV_MixPage; -static int DSL_ErrorCode = DSL_Ok; +int DSL_ErrorCode = DSL_Ok; static int mixer_initialized; @@ -257,10 +257,10 @@ unsigned DSL_GetPlaybackRate(void) return _SampleRate; } -unsigned long DisableInterrupts(void) +int DisableInterrupts(void) { return 0; } -void RestoreInterrupts(unsigned long flags) +int RestoreInterrupts(int flags) {} diff --git a/polymer/eduke32/source/jaudiolib/dsl.h b/polymer/eduke32/source/jaudiolib/dsl.h index 23c7f24fe..cb0e29985 100755 --- a/polymer/eduke32/source/jaudiolib/dsl.h +++ b/polymer/eduke32/source/jaudiolib/dsl.h @@ -38,7 +38,12 @@ enum DSL_ERRORS DSL_MixerInitFailure }; +extern int DSL_ErrorCode; char *DSL_ErrorString( int ErrorNumber ); + +int DisableInterrupts(void); // simulated using critical sections +int RestoreInterrupts(int); + int DSL_Init( void ); void DSL_StopPlayback( void ); unsigned DSL_GetPlaybackRate( void ); diff --git a/polymer/eduke32/source/jaudiolib/multivoc.c b/polymer/eduke32/source/jaudiolib/multivoc.c index 96e00b6b2..4ecbe71a7 100644 --- a/polymer/eduke32/source/jaudiolib/multivoc.c +++ b/polymer/eduke32/source/jaudiolib/multivoc.c @@ -180,11 +180,14 @@ char *MV_ErrorString( int ErrorNumber) ErrorString = "No voice with matching handle found."; break; -#if defined(_WIN32) case MV_BlasterError : +#if defined(_WIN32) ErrorString = DSOUND_ErrorString(DSOUND_ErrorCode); - break; +#else + ErrorString = DSL_ErrorString(DSL_ErrorCode); #endif + break; + case MV_DPMI_Error : ErrorString = "DPMI Error in Multivoc."; diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index c279257fb..5e686b51f 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -1714,6 +1714,7 @@ cheat_for_port_credits: "", "Adam Fazakerley", "Ed Coolidge", + "James Bentler", "Javier Martinez", "Jeff Hart", "Jonathan Smith", @@ -1721,6 +1722,7 @@ cheat_for_port_credits: "Lachlan McDonald", "Matthew Palmer", "Peter Green", + "Ryan C. Gordon", "", "EDuke originally by Matt Saettler", "",