shithub: choc

Download patch

ref: 512f850d914cc753359b702d085677715cd94d39
parent: ced40ce2c44caca11be2b33060f8283c12ef0d7b
author: Simon Howard <fraggle@soulsphere.org>
date: Sun May 22 18:36:44 EDT 2016

Fix STDISK patch offset calculation.

Directions were backwards for these offsets; the STDISK lump has a -1
y offset, so we were grabbing and restoring the background from the
wrong location in the video buffer.

--- a/src/v_diskicon.c
+++ b/src/v_diskicon.c
@@ -86,8 +86,8 @@
 {
     int x, y;
 
-    x = loading_disk_xoffs + SHORT(disk->leftoffset);
-    y = loading_disk_yoffs + SHORT(disk->topoffset);
+    x = loading_disk_xoffs - SHORT(disk->leftoffset);
+    y = loading_disk_yoffs - SHORT(disk->topoffset);
     return I_VideoBuffer + y * SCREENWIDTH + x;
 }