foxygit / doom Log in
commit 512f850d914cc753359b702d085677715cd94d39
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sun May 22 22:36:44 2016 +0200
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Sun May 22 22:36:44 2016 +0200

    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.
---
 src/v_diskicon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/v_diskicon.c b/src/v_diskicon.c
index 6b097026..78cb9024 100644
--- a/src/v_diskicon.c
+++ b/src/v_diskicon.c
@@ -86,8 +86,8 @@ static byte *DiskRegionPointer(void)
 {
     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;
 }