From 97e7b5f71dae2755e7391036e799b13cbee1b92a Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 22 Nov 2014 20:35:28 +0100 Subject: games/md: fix interlace at scale 2 --- sys/src/games/md/md.c | 10 +++++++--- sys/src/games/md/vdp.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'sys/src') diff --git a/sys/src/games/md/md.c b/sys/src/games/md/md.c index 9c3a801ad..27e292274 100644 --- a/sys/src/games/md/md.c +++ b/sys/src/games/md/md.c @@ -131,10 +131,11 @@ screeninit(void) 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 @@ screenproc(void *) 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; } diff --git a/sys/src/games/md/vdp.c b/sys/src/games/md/vdp.c index b6fcaae9d..e87306559 100644 --- 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; -- cgit v1.2.3