From 8ec6018ba22907cdd64d1d714dde27b49d5e67e6 Mon Sep 17 00:00:00 2001 From: MotoLegacy Date: Thu, 28 Nov 2024 20:23:54 -0800 Subject: [PATCH] CTR/PSP: Bump MAX_LIGHTMAPS to 128 --- source/ctr/gl/gl_rsurf.c | 17 +++++++++++++---- source/psp/gu/gu_psp.h | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/source/ctr/gl/gl_rsurf.c b/source/ctr/gl/gl_rsurf.c index 4899df6..f45dc7b 100644 --- a/source/ctr/gl/gl_rsurf.c +++ b/source/ctr/gl/gl_rsurf.c @@ -35,7 +35,7 @@ unsigned blocklights[3*18*18]; // LordHavoc: .lit support (*3 for RGB) to the d #define BLOCK_WIDTH 128 #define BLOCK_HEIGHT 128 -#define MAX_LIGHTMAPS 64 +#define MAX_LIGHTMAPS 128 int active_lightmaps; typedef struct glRect_s { @@ -1516,15 +1516,23 @@ void R_MarkLeaves (void) ============================================================================= */ -// returns a texture number and the position inside it +/* +======================== +AllocBlock -- returns a texture number and the position inside it +======================== +*/ int AllocBlock (int w, int h, int *x, int *y) { int i, j; int best, best2; - int bestx; int texnum; - for (texnum=0 ; texnum