X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fmike.c;h=fda18fee5e0da1fad2928a8d995e66ae95160d50;hp=4f920118f8035500fe174d2c7ea6a6bcf0ee6ce1;hb=95e7797c2bb32a62fada629877a75b86bcf1aba9;hpb=0b797aadead4fb9baa4a215ef4f21eb8f6b36f92 diff --git a/src/mike.c b/src/mike.c index 4f92011..fda18fe 100644 --- a/src/mike.c +++ b/src/mike.c @@ -121,6 +121,7 @@ static void draw(void) *dst++ = src[i + scroll + d]; } src += backgroundW; + disp += backgroundW; } } @@ -156,7 +157,7 @@ static void processNormal() { scrollModTable[scanline] = (int) (backgroundW / scale + 0.5f); for (i = 0; i < backgroundW; i++) { x = (int)(i * scale + 0.5f); - if (x < background) { + if (x < backgroundW) { *dst = (unsigned short)normalmap[x] & 0xFF; if ((short)*dst > maxDisplacement) maxDisplacement = (short)(*dst); if ((short)*dst < minDisplacement) minDisplacement = (short)(*dst);