games/md: fix interlace at scale 2

This commit is contained in:
cinap_lenrek 2014-11-22 20:35:28 +01:00
parent 41ef4524ab
commit 97e7b5f71d
2 changed files with 8 additions and 4 deletions

View file

@ -131,10 +131,11 @@ screeninit(void)
void void
screenproc(void *) screenproc(void *)
{ {
extern u8int pic[320*224*4*3]; extern u8int pic[320*224*4*4];
extern int intla;
Rectangle r; Rectangle r;
uchar *s; uchar *s;
int w; int w, h;
enum { AMOUSE, ARESIZE, AFLUSH, AEND }; enum { AMOUSE, ARESIZE, AFLUSH, AEND };
Alt a[AEND+1] = { Alt a[AEND+1] = {
@ -159,10 +160,13 @@ screenproc(void *)
s = pic; s = pic;
r = picr; r = picr;
w = 320*4*scale; w = 320*4*scale;
h = scale;
if(intla && (h & 1) == 0)
h >>= 1;
while(r.min.y < picr.max.y){ while(r.min.y < picr.max.y){
loadimage(tmp, tmp->r, s, w); loadimage(tmp, tmp->r, s, w);
s += w; s += w;
r.max.y = r.min.y+scale; r.max.y = r.min.y+h;
draw(screen, r, tmp, nil, ZP); draw(screen, r, tmp, nil, ZP);
r.min.y = r.max.y; r.min.y = r.max.y;
} }

View file

@ -4,7 +4,7 @@
#include "dat.h" #include "dat.h"
#include "fns.h" #include "fns.h"
u8int pic[320*224*4*3]; u8int pic[320*224*4*4];
u16int vdpstat = 0x3400; u16int vdpstat = 0x3400;
int vdpx, vdpy, vdpyy, frame, intla; int vdpx, vdpy, vdpyy, frame, intla;
u16int hctr; u16int hctr;