diff --git a/r_local.h b/r_local.h index 1fccb3a8..893157ff 100644 --- a/r_local.h +++ b/r_local.h @@ -35,7 +35,6 @@ typedef struct mip_s mip_t; typedef int fixed8_t; typedef int fixed16_t; - #define offsetof(s,m) (size_t)&(((s *)0)->m) #define ASSERT(x) if(!( x )) gEngfuncs.Host_Error( "assert failed at %s:%i\n", __FILE__, __LINE__ ) @@ -62,10 +61,16 @@ extern byte *r_temppool; #define BLOCK_SIZE_MAX 1024 #define MAX_TEXTURES 4096 +#define MAX_DECAL_SURFS 4096 + +#if XASH_LOW_MEMORY + #define MAX_TEXTURES 1024 + #define MAX_DECAL_SURFS 256 +#endif + #define MAX_DETAIL_TEXTURES 256 #define MAX_LIGHTMAPS 256 #define SUBDIVIDE_SIZE 64 -#define MAX_DECAL_SURFS 4096 #define MAX_DRAW_STACK 2 // normal view and menu view #define SHADEDOT_QUANT 16 // precalculated dot products for quantized angles diff --git a/r_studio.c b/r_studio.c index 227bde87..807bcab3 100644 --- a/r_studio.c +++ b/r_studio.c @@ -56,6 +56,10 @@ typedef struct sortedmesh_s int flags; // face flags } sortedmesh_t; +#if XASH_LOW_MEMORY + #define MAXSTUDIOVERTS 1024 +#endif + typedef struct { double time;