diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-11-22 20:35:28 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-11-22 20:35:28 +0100 |
commit | 97e7b5f71dae2755e7391036e799b13cbee1b92a (patch) | |
tree | 95f0509a1c383097879f9a5b778d64bb16755dd9 /sys/src/games | |
parent | 41ef4524abb81254169a47898572547c0db5a666 (diff) |
games/md: fix interlace at scale 2
Diffstat (limited to 'sys/src/games')
-rw-r--r-- | sys/src/games/md/md.c | 10 | ||||
-rw-r--r-- | sys/src/games/md/vdp.c | 2 |
2 files changed, 8 insertions, 4 deletions
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; |