foxygit / doom Log in
commit dce1f0b9505f5e411a69ab2b077831db22333270
Author:     Michael Day <contact@michaelcday.com>
AuthorDate: Tue Jun 7 21:38:25 2022 -0400
Commit:     Michael Day <contact@michaelcday.com>
CommitDate: Tue Jun 7 21:50:39 2022 -0400

    Restore correct Hexen "DrawFuzzPatch" behavior

    In the original Hexen source release, the V_DrawFuzzPatch() tinttable
    index has the *source value in the upper 8 bits and the *dest value in
    the lower 8 bits.
---
 src/v_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/v_video.c b/src/v_video.c
index e4fcbb01..8c5b4055 100644
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -315,7 +315,7 @@ void V_DrawTLPatch(int x, int y, patch_t * patch)

             while (count--)
             {
-                *dest = tinttable[((*dest) << 8) + *source++];
+                *dest = tinttable[*dest + ((*source++) << 8)];
                 dest += SCREENWIDTH;
             }
             column = (column_t *) ((byte *) column + column->length + 4);