From 75e6a000c8b6f8db0e9db896e215969b3ff47bc7 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sun, 23 Jan 2022 14:02:24 +0100 Subject: [PATCH] Add per-texture offsets to P_WriteTextmap --- src/p_setup.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/p_setup.c b/src/p_setup.c index 68883bca2..de251915e 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2441,6 +2441,18 @@ static void P_WriteTextmap(void) fprintf(f, "offsetx = %d;\n", wsides[i].textureoffset >> FRACBITS); if (wsides[i].rowoffset != 0) fprintf(f, "offsety = %d;\n", wsides[i].rowoffset >> FRACBITS); + if (wsides[i].offsetx_top != 0) + fprintf(f, "offsetx_top = %d;\n", wsides[i].offsetx_top >> FRACBITS); + if (wsides[i].offsety_top != 0) + fprintf(f, "offsety_top = %d;\n", wsides[i].offsety_top >> FRACBITS); + if (wsides[i].offsetx_mid != 0) + fprintf(f, "offsetx_mid = %d;\n", wsides[i].offsetx_mid >> FRACBITS); + if (wsides[i].offsety_mid != 0) + fprintf(f, "offsety_mid = %d;\n", wsides[i].offsety_mid >> FRACBITS); + if (wsides[i].offsetx_bot != 0) + fprintf(f, "offsetx_bottom = %d;\n", wsides[i].offsetx_bot >> FRACBITS); + if (wsides[i].offsety_bot != 0) + fprintf(f, "offsety_bottom = %d;\n", wsides[i].offsety_bot >> FRACBITS); if (wsides[i].toptexture > 0 && wsides[i].toptexture < numtextures) fprintf(f, "texturetop = \"%.*s\";\n", 8, textures[wsides[i].toptexture]->name); if (wsides[i].bottomtexture > 0 && wsides[i].bottomtexture < numtextures)