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/md/md.c | |
parent | 41ef4524abb81254169a47898572547c0db5a666 (diff) |
games/md: fix interlace at scale 2
Diffstat (limited to 'sys/src/games/md/md.c')
-rw-r--r-- | sys/src/games/md/md.c | 10 |
1 files changed, 7 insertions, 3 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; } |