diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index eafea43ce..4b74e5ed0 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -56,7 +56,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # include "lunatic_m32.h" #endif -static const char *s_buildRev; +static const char * + #include "rev.h" #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN @@ -8873,8 +8874,6 @@ int32_t ExtPreInit(int32_t argc,const char **argv) //chdir(tempbuf); #endif - #include "rev.h" - OSD_SetLogFile("mapster32.log"); OSD_SetVersion("Mapster32" " " VERSION,0,2); initprintf("Mapster32 %s %s\n", VERSION, s_buildRev); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index e2373b4aa..2efa125e6 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -9972,8 +9972,6 @@ int32_t app_main(int32_t argc, const char **argv) Bassert(sizeof(actor_t)==128); Bassert(sizeof(DukePlayer_t)%4 == 0); - initialize_globals(); - #ifdef GEKKO L2Enhance(); CON_EnableGecko(1, 1); diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index 19944b680..64c7ac2f3 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -26,72 +26,65 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. user_defs ud; -void initialize_globals(void) -{ +const char * #include "rev.h" - s_buildDate = "20120522"; - // JBF: g_spriteGravity modified to default to Atomic ed. default when using 1.3d CONs - g_spriteGravity = 176; +const char *s_buildDate = "20120522"; - g_spriteDeleteQueueSize = 64; +// JBF: g_spriteGravity modified to default to Atomic ed. default when using 1.3d CONs +int32_t g_spriteGravity=176; - strcpy(EpisodeNames[0], "L.A. Meltdown"); - strcpy(EpisodeNames[1], "Lunar Apocalypse"); - strcpy(EpisodeNames[2], "Shrapnel City"); +int16_t g_spriteDeleteQueueSize = 64; - strcpy(SkillNames[0], "Piece Of Cake"); - strcpy(SkillNames[1], "Let's Rock"); - strcpy(SkillNames[2], "Come Get Some"); - strcpy(SkillNames[3], "Damn I'm Good"); +char EpisodeNames[MAXVOLUMES][33] = { "L.A. Meltdown", "Lunar Apocalypse", "Shrapnel City" }; +char SkillNames[MAXSKILLS][33] = { "Piece Of Cake", "Let's Rock", "Come Get Some", "Damn I'm Good" }; - strcpy(GametypeNames[0], "DukeMatch (Spawn)"); - strcpy(GametypeNames[1], "Cooperative Play"); - strcpy(GametypeNames[2], "DukeMatch (No Spawn)"); - strcpy(GametypeNames[3], "Team DM (Spawn)"); - strcpy(GametypeNames[4], "Team DM (No Spawn)"); +char GametypeNames[MAXGAMETYPES][33] = { "DukeMatch (Spawn)", "Cooperative Play", "DukeMatch (No Spawn)", "Team DM (Spawn)", "Team DM (No Spawn)" }; - GametypeFlags[0] = /*4+*/8+16+1024+2048+16384; - GametypeFlags[1] = 1+2+32+64+128+256+512+4096+8192+32768; - GametypeFlags[2] = 2+/*4+*/8+16+16384; - GametypeFlags[3] = /*4+*/8+16+1024+2048+16384+65536+131072; - GametypeFlags[4] = 2+/*4+*/8+16+16384+65536+131072; +int32_t GametypeFlags[MAXGAMETYPES] = +{ + /*4+*/8+16+1024+2048+16384, + 1+2+32+64+128+256+512+4096+8192+32768, + 2+/*4+*/8+16+16384, + /*4+*/8+16+1024+2048+16384+65536+131072, + 2+/*4+*/8+16+16384+65536+131072 +}; +char g_numGametypes = 5; - g_numGametypes = 5; +char g_numVolumes = 3; - g_numVolumes = 3; +int32_t g_timerTicsPerSecond = TICRATE; - g_timerTicsPerSecond = TICRATE; +int32_t g_actorRespawnTime = 768; +int32_t g_itemRespawnTime = 768; - g_actorRespawnTime = 768; - g_itemRespawnTime = 768; +int32_t g_scriptSize = 1048576; - g_scriptSize = 1048576; +int16_t BlimpSpawnSprites[15] = +{ + RPGSPRITE__STATIC, + CHAINGUNSPRITE__STATIC, + DEVISTATORAMMO__STATIC, + RPGAMMO__STATIC, + RPGAMMO__STATIC, + JETPACK__STATIC, + SHIELD__STATIC, + FIRSTAID__STATIC, + STEROIDS__STATIC, + RPGAMMO__STATIC, + RPGAMMO__STATIC, + RPGSPRITE__STATIC, + RPGAMMO__STATIC, + FREEZESPRITE__STATIC, + FREEZEAMMO__STATIC +}; - BlimpSpawnSprites[0] = RPGSPRITE__STATIC; - BlimpSpawnSprites[1] = CHAINGUNSPRITE__STATIC; - BlimpSpawnSprites[2] = DEVISTATORAMMO__STATIC; - BlimpSpawnSprites[3] = RPGAMMO__STATIC; - BlimpSpawnSprites[4] = RPGAMMO__STATIC; - BlimpSpawnSprites[5] = JETPACK__STATIC; - BlimpSpawnSprites[6] = SHIELD__STATIC; - BlimpSpawnSprites[7] = FIRSTAID__STATIC; - BlimpSpawnSprites[8] = STEROIDS__STATIC; - BlimpSpawnSprites[9] = RPGAMMO__STATIC; - BlimpSpawnSprites[10] = RPGAMMO__STATIC; - BlimpSpawnSprites[11] = RPGSPRITE__STATIC; - BlimpSpawnSprites[12] = RPGAMMO__STATIC; - BlimpSpawnSprites[13] = FREEZESPRITE__STATIC; - BlimpSpawnSprites[14] = FREEZEAMMO__STATIC; +int32_t g_playerFriction = 0xcc00; - g_playerFriction = 0xcc00; +int32_t g_numFreezeBounces = 3; - g_numFreezeBounces=3; +int32_t g_lastSaveSlot = -1; - g_lastSaveSlot = -1; +char CheatKeys[2] = { sc_D, sc_N }; - CheatKeys[0] = sc_D; - CheatKeys[1] = sc_N; - - strcpy(setupfilename, SETUPFILENAME); -} +char setupfilename[BMAX_PATH] = SETUPFILENAME; diff --git a/polymer/eduke32/source/global.h b/polymer/eduke32/source/global.h index 6a050e53a..506155627 100644 --- a/polymer/eduke32/source/global.h +++ b/polymer/eduke32/source/global.h @@ -49,11 +49,8 @@ G_EXTERN int32_t connectpoint2[MAXPLAYERS]; #include "sector.h" #include "quotes.h" -void initialize_globals(void); - G_EXTERN int32_t myconnectindex, numplayers; -G_EXTERN const char *s_buildRev; G_EXTERN DukeStatus_t sbar; G_EXTERN actor_t actor[MAXSPRITES]; // g_tile: tile-specific data THAT DOES NOT CHANGE during the course of a game @@ -61,30 +58,21 @@ G_EXTERN tiledata_t g_tile[MAXTILES]; G_EXTERN animwalltype animwall[MAXANIMWALLS]; G_EXTERN char *ScriptQuotes[MAXQUOTES],*ScriptQuoteRedefinitions[MAXQUOTES]; G_EXTERN char *label; -G_EXTERN char CheatKeys[2]; G_EXTERN char EnvMusicFilename[MAXVOLUMES+1][BMAX_PATH]; -G_EXTERN char EpisodeNames[MAXVOLUMES][33]; -G_EXTERN char GametypeNames[MAXGAMETYPES][33]; -G_EXTERN char SkillNames[MAXSKILLS][33]; G_EXTERN char g_RTSPlaying; G_EXTERN int32_t g_musicIndex; -G_EXTERN char g_numGametypes; G_EXTERN char g_loadFromGroupOnly; -G_EXTERN char g_numVolumes; G_EXTERN char g_numSkills; G_EXTERN char myjumpingtoggle,myonground,myhardlanding,myreturntocenter; G_EXTERN char pus,pub; G_EXTERN char ready2send; -G_EXTERN char setupfilename[BMAX_PATH]; G_EXTERN char szPlayerName[32]; G_EXTERN char tempbuf[MAXSECTORS<<1],packbuf[PACKBUF_SIZE],menutextbuf[128],buf[1024]; G_EXTERN char typebuflen,typebuf[141]; -G_EXTERN const char *s_buildDate; G_EXTERN input_t avg; G_EXTERN input_t loc; G_EXTERN input_t recsync[RECSYNCBUFSIZ]; -G_EXTERN int16_t BlimpSpawnSprites[15]; -G_EXTERN int16_t SpriteDeletionQueue[1024],g_spriteDeleteQueuePos,g_spriteDeleteQueueSize; +G_EXTERN int16_t SpriteDeletionQueue[1024],g_spriteDeleteQueuePos; G_EXTERN int16_t animatesect[MAXANIMATES]; G_EXTERN int16_t camsprite; G_EXTERN int16_t cyclers[MAXCYCLERS][6],g_numCyclers; @@ -96,7 +84,6 @@ G_EXTERN int16_t myang,omyang,mycursectnum,myjumpingcounter; G_EXTERN int16_t myhoriz,omyhoriz,myhorizoff,omyhorizoff; G_EXTERN int16_t neartagsector,neartagwall,neartagsprite; G_EXTERN int32_t *animateptr[MAXANIMATES]; -G_EXTERN int32_t GametypeFlags[MAXGAMETYPES]; G_EXTERN int32_t animategoal[MAXANIMATES],animatevel[MAXANIMATES],g_animateCount; G_EXTERN int32_t cloudtotalclock; G_EXTERN int32_t fricxv,fricyv; @@ -108,17 +95,11 @@ G_EXTERN char g_earthquakeTime; G_EXTERN int32_t g_gameQuit; G_EXTERN int32_t g_groupFileHandle; G_EXTERN int32_t g_impactDamage,g_maxPlayerHealth; -G_EXTERN int32_t g_lastSaveSlot; G_EXTERN int32_t g_musicSize; -G_EXTERN int32_t g_numFreezeBounces; G_EXTERN int32_t g_numLabels,g_numDefaultLabels; G_EXTERN int32_t g_numRealPalettes; -G_EXTERN int32_t g_playerFriction; G_EXTERN int32_t g_scriptDebug; -G_EXTERN int32_t g_scriptSize; G_EXTERN int32_t g_showShareware; -G_EXTERN int32_t g_spriteGravity; -G_EXTERN int32_t g_timerTicsPerSecond; G_EXTERN int8_t g_numPlayerSprites; G_EXTERN int32_t g_tripbombLaserMode; G_EXTERN int32_t msx[2048],msy[2048]; @@ -126,7 +107,7 @@ G_EXTERN int32_t neartaghitdist,lockclock,g_startArmorAmount; G_EXTERN int32_t playerswhenstarted; G_EXTERN int32_t screenpeek; G_EXTERN int32_t startofdynamicinterpolations; -G_EXTERN int32_t vel,svel,angvel,horiz,ototalclock,g_actorRespawnTime; +G_EXTERN int32_t vel,svel,angvel,horiz,ototalclock; G_EXTERN intptr_t *g_parsingActorPtr; G_EXTERN intptr_t *g_scriptPtr,*insptr; G_EXTERN int32_t *labelcode,*labeltype; @@ -151,9 +132,31 @@ G_EXTERN int32_t g_shrinkerBlastRadius; G_EXTERN int32_t g_morterBlastRadius; G_EXTERN int32_t g_bouncemineBlastRadius; G_EXTERN int32_t g_seenineBlastRadius; -G_EXTERN int32_t g_itemRespawnTime; G_EXTERN int32_t g_restorePalette; G_EXTERN int32_t g_screenCapture; G_EXTERN int32_t g_noEnemies; +#ifndef __global_c__ +G_EXTERN const char *s_buildRev; +G_EXTERN const char *s_buildDate; +G_EXTERN int32_t g_spriteGravity; +G_EXTERN int16_t g_spriteDeleteQueueSize; +G_EXTERN char EpisodeNames[MAXVOLUMES][33]; +G_EXTERN char SkillNames[MAXSKILLS][33]; +G_EXTERN char GametypeNames[MAXGAMETYPES][33]; +G_EXTERN int32_t GametypeFlags[MAXGAMETYPES]; +G_EXTERN char g_numGametypes; +G_EXTERN char g_numVolumes; +G_EXTERN int32_t g_timerTicsPerSecond; +G_EXTERN int32_t g_actorRespawnTime; +G_EXTERN int32_t g_itemRespawnTime; +G_EXTERN int32_t g_scriptSize; +G_EXTERN int16_t BlimpSpawnSprites[15]; +G_EXTERN int32_t g_playerFriction; +G_EXTERN int32_t g_numFreezeBounces; +G_EXTERN int32_t g_lastSaveSlot; +G_EXTERN char CheatKeys[2]; +G_EXTERN char setupfilename[BMAX_PATH]; +#endif + #endif