diff options
author | qwx <qwx@sciops.net> | 2022-08-22 22:39:47 +0000 |
---|---|---|
committer | qwx <qwx@sciops.net> | 2022-08-22 22:39:47 +0000 |
commit | 119f35bc702aded0bd57488c275b54872d290bc3 (patch) | |
tree | 84b4b7734d7b95052c56e4649339ef286adbfce2 /sys/src/games | |
parent | 02ec9f06e426c6b19d4d9368dbe959845aef6928 (diff) |
games/doom: raise static limits
makes very large/detailed maps work; raising max intercepts and
spechits may break demos and cause desynchronizations, so they're left
alone despite their potential issues; savegame buffer overflows can
happen for stupidly huge maps with tons of entities
Diffstat (limited to 'sys/src/games')
-rw-r--r-- | sys/src/games/doom/g_game.c | 6 | ||||
-rw-r--r-- | sys/src/games/doom/i_system.c | 2 | ||||
-rw-r--r-- | sys/src/games/doom/p_spec.c | 4 | ||||
-rw-r--r-- | sys/src/games/doom/r_bsp.c | 2 | ||||
-rw-r--r-- | sys/src/games/doom/r_defs.h | 2 | ||||
-rw-r--r-- | sys/src/games/doom/r_plane.c | 4 | ||||
-rw-r--r-- | sys/src/games/doom/r_things.h | 2 |
7 files changed, 12 insertions, 10 deletions
diff --git a/sys/src/games/doom/g_game.c b/sys/src/games/doom/g_game.c index 0b0112a46..f88d03f33 100644 --- a/sys/src/games/doom/g_game.c +++ b/sys/src/games/doom/g_game.c @@ -68,7 +68,7 @@ rcsid[] = "$Id: g_game.c,v 1.8 1997/02/03 22:45:09 b1 Exp $"; #include "g_game.h" -#define SAVEGAMESIZE 0x2c000 +#define SAVEGAMESIZE 0x200000 #define SAVESTRINGSIZE 24 @@ -1203,7 +1203,8 @@ void G_DoSaveGame (void) sprintf (name,SAVEGAMENAME"%d.dsg",savegameslot); description = savedescription; - save_p = savebuffer = screens[1]+0x4000; + savebuffer = Z_Malloc(SAVEGAMESIZE, PU_STATIC, 0); + save_p = savebuffer; memcpy (save_p, description, SAVESTRINGSIZE); save_p += SAVESTRINGSIZE; @@ -1239,6 +1240,7 @@ void G_DoSaveGame (void) // draw the pattern into the back screen R_FillBackScreen (); + Z_Free(savebuffer); } diff --git a/sys/src/games/doom/i_system.c b/sys/src/games/doom/i_system.c index 81dd62241..638d2dcd3 100644 --- a/sys/src/games/doom/i_system.c +++ b/sys/src/games/doom/i_system.c @@ -11,7 +11,7 @@ #include "g_game.h" #include "m_misc.h" -int mb_used = 6; /* 6MB heap */ +int mb_used = 32; /* 32MB heap */ void I_Init (void) { diff --git a/sys/src/games/doom/p_spec.c b/sys/src/games/doom/p_spec.c index 2f74958ee..c91efb47f 100644 --- a/sys/src/games/doom/p_spec.c +++ b/sys/src/games/doom/p_spec.c @@ -78,7 +78,7 @@ typedef struct -#define MAXANIMS 32 +#define MAXANIMS 256 extern anim_t anims[MAXANIMS]; extern anim_t* lastanim; @@ -321,7 +321,7 @@ fixed_t P_FindHighestFloorSurrounding(sector_t *sec) // Note: this should be doable w/o a fixed array. // 20 adjoining sectors max! -#define MAX_ADJOINING_SECTORS 20 +#define MAX_ADJOINING_SECTORS 128 fixed_t P_FindNextHighestFloor diff --git a/sys/src/games/doom/r_bsp.c b/sys/src/games/doom/r_bsp.c index adc9f75a9..759b75e40 100644 --- a/sys/src/games/doom/r_bsp.c +++ b/sys/src/games/doom/r_bsp.c @@ -85,7 +85,7 @@ typedef struct } cliprange_t; -#define MAXSEGS 32 +#define MAXSEGS SCREENWIDTH/2+1 // newend is one past the last valid seg cliprange_t* newend; diff --git a/sys/src/games/doom/r_defs.h b/sys/src/games/doom/r_defs.h index 6c842a519..898270731 100644 --- a/sys/src/games/doom/r_defs.h +++ b/sys/src/games/doom/r_defs.h @@ -52,7 +52,7 @@ #define SIL_TOP 2 #define SIL_BOTH 3 -#define MAXDRAWSEGS 256 +#define MAXDRAWSEGS 4096 diff --git a/sys/src/games/doom/r_plane.c b/sys/src/games/doom/r_plane.c index f6c83727b..0508eb3f2 100644 --- a/sys/src/games/doom/r_plane.c +++ b/sys/src/games/doom/r_plane.c @@ -47,14 +47,14 @@ planefunction_t ceilingfunc; // // Here comes the obnoxious "visplane". -#define MAXVISPLANES 128 +#define MAXVISPLANES 1024 visplane_t visplanes[MAXVISPLANES]; visplane_t* lastvisplane; visplane_t* floorplane; visplane_t* ceilingplane; // ? -#define MAXOPENINGS SCREENWIDTH*64 +#define MAXOPENINGS SCREENWIDTH*200 short openings[MAXOPENINGS]; short* lastopening; diff --git a/sys/src/games/doom/r_things.h b/sys/src/games/doom/r_things.h index fc633e388..30b22295c 100644 --- a/sys/src/games/doom/r_things.h +++ b/sys/src/games/doom/r_things.h @@ -24,7 +24,7 @@ #define __R_THINGS__ -#define MAXVISSPRITES 128 +#define MAXVISSPRITES 4096 extern vissprite_t vissprites[MAXVISSPRITES]; extern vissprite_t* vissprite_p; |