mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 11:50:49 +00:00
- do not statically initialize DukeGameInfo.
Since this structure contains several large arrays it will inflate the EXE size with 800kb of empty space.
This commit is contained in:
parent
9a345bdfa7
commit
a51b77b95b
2 changed files with 40 additions and 25 deletions
|
@ -3146,7 +3146,22 @@ void ConCompiler::setmusic()
|
|||
|
||||
void loadcons()
|
||||
{
|
||||
memset(&gs.actorinfo, 0, sizeof(gs.actorinfo));
|
||||
gs = {};
|
||||
gs.respawnactortime = 768;
|
||||
gs.bouncemineblastradius = 2500;
|
||||
gs.respawnitemtime = 768;
|
||||
gs.morterblastradius = 2500;
|
||||
gs.numfreezebounces = 3;
|
||||
gs.pipebombblastradius = 2500;
|
||||
gs.playerfriction = 0xCFD0;
|
||||
gs.rpgblastradius = 1780;
|
||||
gs.seenineblastradius = 2048;
|
||||
gs.shrinkerblastradius = 650;
|
||||
gs.gravity = 176;
|
||||
gs.tripbombblastradius = 3880;
|
||||
gs.playerheight = PHEIGHT_DUKE;
|
||||
gs.displayflags = DUKE3D_NO_WIDESCREEN_PINNING;
|
||||
|
||||
|
||||
ScriptCode.Clear();
|
||||
labels.Clear();
|
||||
|
|
|
@ -17,31 +17,31 @@ extern user_defs ud;
|
|||
struct DukeGameInfo
|
||||
{
|
||||
// Static constant global state
|
||||
int respawnactortime = 768;
|
||||
int bouncemineblastradius = 2500;
|
||||
int respawnitemtime = 768;
|
||||
int morterblastradius = 2500;
|
||||
int numfreezebounces = 3;
|
||||
int pipebombblastradius = 2500;
|
||||
int playerfriction = 0xCFD0;
|
||||
int rpgblastradius = 1780;
|
||||
int seenineblastradius = 2048;
|
||||
int shrinkerblastradius = 650;
|
||||
int gravity = 176;
|
||||
int tripbombblastradius = 3880;
|
||||
int camerashitable = 0;
|
||||
int max_player_health = 0;
|
||||
int max_armour_amount = 0;
|
||||
int lasermode = 0;
|
||||
int freezerhurtowner = 0;
|
||||
int impact_damage = 0;
|
||||
int respawnactortime;
|
||||
int bouncemineblastradius;
|
||||
int respawnitemtime;
|
||||
int morterblastradius;
|
||||
int numfreezebounces;
|
||||
int pipebombblastradius;
|
||||
int playerfriction;
|
||||
int rpgblastradius;
|
||||
int seenineblastradius;
|
||||
int shrinkerblastradius;
|
||||
int gravity;
|
||||
int tripbombblastradius;
|
||||
int camerashitable;
|
||||
int max_player_health;
|
||||
int max_armour_amount;
|
||||
int lasermode;
|
||||
int freezerhurtowner;
|
||||
int impact_damage;
|
||||
|
||||
TileInfo tileinfo[MAXTILES] = {}; // This is not from EDuke32.
|
||||
ActorInfo actorinfo[MAXTILES] = {};
|
||||
int16_t max_ammo_amount[MAX_WEAPONS] = {};
|
||||
int16_t weaponsandammosprites[15] = {};
|
||||
int playerheight = PHEIGHT_DUKE;
|
||||
int displayflags = DUKE3D_NO_WIDESCREEN_PINNING;
|
||||
TileInfo tileinfo[MAXTILES]; // This is not from EDuke32.
|
||||
ActorInfo actorinfo[MAXTILES];
|
||||
int16_t max_ammo_amount[MAX_WEAPONS];
|
||||
int16_t weaponsandammosprites[15];
|
||||
int playerheight;
|
||||
int displayflags;
|
||||
};
|
||||
|
||||
extern DukeGameInfo gs;
|
||||
|
|
Loading…
Reference in a new issue