From ac91ea6827e5c411f9d211907033342b60aa7305 Mon Sep 17 00:00:00 2001 From: NepDisk <16447892+NepDisk@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:58:13 -0400 Subject: [PATCH] Readd flats support (i think?) --- src/p_setup.c | 7 +++++++ src/p_spec.c | 9 --------- src/r_textures.c | 2 +- src/r_textures.h | 2 ++ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 66010552d..81b4ea20f 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -579,7 +579,14 @@ or NULL if we want to allocate it now. static INT32 Ploadflat (levelflat_t *levelflat, const char *flatname, boolean resize) { +#ifndef NO_PNG_LUMPS + UINT8 buffer[8]; +#endif + + lumpnum_t flatnum; int texturenum; + UINT8 *flatpatch; + size_t lumplength; size_t i; // Scan through the already found flats, return if it matches. diff --git a/src/p_spec.c b/src/p_spec.c index 942e72fb6..c0e8ce10a 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -218,14 +218,6 @@ void P_InitPicAnims(void) lastanim->basepic = R_TextureNumForName(animdefs[i].startname); } else - { - if (animdefs[i].istexture == 2) - { - CONS_Alert(CONS_WARNING, "ANIMDEFS flats are disabled; flat support in general will be removed soon! (%s, %s)\n", animdefs[i].startname, animdefs[i].endname); - } - continue; - } -#if 0 { if ((W_CheckNumForName(animdefs[i].startname)) == LUMPERROR) continue; @@ -233,7 +225,6 @@ void P_InitPicAnims(void) lastanim->picnum = R_GetFlatNumForName(animdefs[i].endname); lastanim->basepic = R_GetFlatNumForName(animdefs[i].startname); } -#endif lastanim->istexture = animdefs[i].istexture; lastanim->numpics = lastanim->picnum - lastanim->basepic + 1; diff --git a/src/r_textures.c b/src/r_textures.c index d04935b3e..39976a3c8 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -1712,7 +1712,7 @@ INT32 R_TextureNumForName(const char *name) static INT32 redwall = -2; CONS_Debug(DBG_SETUP, "WARNING: R_TextureNumForName: %.8s not found\n", name); if (redwall == -2) - redwall = R_CheckTextureNumForName("REDWALL"); + redwall = R_CheckTextureNumForName(MISSING_TEXTURE); if (redwall != -1) return redwall; return 1; diff --git a/src/r_textures.h b/src/r_textures.h index 007da38ac..d4c9302e5 100644 --- a/src/r_textures.h +++ b/src/r_textures.h @@ -23,6 +23,8 @@ #pragma interface #endif +#define MISSING_TEXTURE "AASMELLY" // Replacement for invalid textures + // A single patch from a texture definition, // basically a rectangular area within // the texture rectangle.