Fixed typos
authorMichael Georgoulopoulos <mgeorgoulopoulos@gmail.com>
Fri, 2 Sep 2016 22:51:30 +0000 (01:51 +0300)
committerMichael Georgoulopoulos <mgeorgoulopoulos@gmail.com>
Fri, 2 Sep 2016 22:51:30 +0000 (01:51 +0300)
src/mike.c

index 4f92011..fda18fe 100644 (file)
@@ -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);