ref: 06e34c23623d6f3a2f8140d723519001770bc74c
parent: 20c8a57d719d8cd9afd9bbcd1564d855a8c6de7c
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Nov 22 15:35:28 EST 2014
games/md: fix interlace at scale 2
--- a/sys/src/games/md/md.c
+++ b/sys/src/games/md/md.c
@@ -131,10 +131,11 @@
void
screenproc(void *)
{- extern u8int pic[320*224*4*3];
+ extern u8int pic[320*224*4*4];
+ extern int intla;
Rectangle r;
uchar *s;
- int w;
+ int w, h;
enum { AMOUSE, ARESIZE, AFLUSH, AEND }; Alt a[AEND+1] = {@@ -159,10 +160,13 @@
s = pic;
r = picr;
w = 320*4*scale;
+ h = scale;
+ if(intla && (h & 1) == 0)
+ h >>= 1;
while(r.min.y < picr.max.y){loadimage(tmp, tmp->r, s, w);
s += w;
- r.max.y = r.min.y+scale;
+ r.max.y = r.min.y+h;
draw(screen, r, tmp, nil, ZP);
r.min.y = r.max.y;
}
--- a/sys/src/games/md/vdp.c
+++ b/sys/src/games/md/vdp.c
@@ -4,7 +4,7 @@
#include "dat.h"
#include "fns.h"
-u8int pic[320*224*4*3];
+u8int pic[320*224*4*4];
u16int vdpstat = 0x3400;
int vdpx, vdpy, vdpyy, frame, intla;
u16int hctr;
--
⑨