Rewrote some video code
This commit is contained in:
@@ -68,7 +68,7 @@ NEWSYM copy640x480x16bwin
|
|||||||
cmp byte[antienab],1
|
cmp byte[antienab],1
|
||||||
je near interpolate640x480x16bwin
|
je near interpolate640x480x16bwin
|
||||||
.nointerp
|
.nointerp
|
||||||
mov dl,224
|
mov dl,[resolutn]
|
||||||
dec dl
|
dec dl
|
||||||
dec dl
|
dec dl
|
||||||
cmp byte[scanlines],1
|
cmp byte[scanlines],1
|
||||||
@@ -825,7 +825,7 @@ Process2xSaIwin:
|
|||||||
mov [InterPtr],ebx
|
mov [InterPtr],ebx
|
||||||
|
|
||||||
; add edi,[VESAAddr]
|
; add edi,[VESAAddr]
|
||||||
mov dl,224
|
mov dl,[resolutn]
|
||||||
sub dl,2 ; Compensate for top/bottom line + 2 lines in 2xSaI
|
sub dl,2 ; Compensate for top/bottom line + 2 lines in 2xSaI
|
||||||
mov byte[lineleft],dl
|
mov byte[lineleft],dl
|
||||||
mov dword[esi+512],0
|
mov dword[esi+512],0
|
||||||
@@ -926,7 +926,7 @@ MMXInterpolwin:
|
|||||||
mov ebx,SpecialLine+1
|
mov ebx,SpecialLine+1
|
||||||
.loopab
|
.loopab
|
||||||
|
|
||||||
mov dl,224
|
mov dl,[resolutn]
|
||||||
dec dl
|
dec dl
|
||||||
dec dl
|
dec dl
|
||||||
dec dl
|
dec dl
|
||||||
@@ -1261,7 +1261,7 @@ NEWSYM interpolate640x480x16bwin
|
|||||||
.loopabi
|
.loopabi
|
||||||
mov [InterPtr],ebx
|
mov [InterPtr],ebx
|
||||||
|
|
||||||
mov dl,224
|
mov dl,[resolutn]
|
||||||
dec dl
|
dec dl
|
||||||
dec dl
|
dec dl
|
||||||
dec dl
|
dec dl
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ DWORD SurfaceY=0;
|
|||||||
|
|
||||||
BYTE IsActivated = 1;
|
BYTE IsActivated = 1;
|
||||||
BYTE AltTimer = 0;
|
BYTE AltTimer = 0;
|
||||||
|
RECT BlitArea;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
DWORD MouseButton;
|
DWORD MouseButton;
|
||||||
@@ -255,7 +256,7 @@ void DrawScreen()
|
|||||||
{
|
{
|
||||||
if (TripleBufferWin == 1)
|
if (TripleBufferWin == 1)
|
||||||
{
|
{
|
||||||
DD_BackBuffer->Blt(NULL, DD_CFB, NULL, DDBLT_WAIT, NULL);
|
DD_BackBuffer->Blt(NULL, DD_CFB, &BlitArea, DDBLT_WAIT, NULL);
|
||||||
DD_Primary->Flip(NULL, DDFLIP_WAIT);
|
DD_Primary->Flip(NULL, DDFLIP_WAIT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -267,7 +268,7 @@ void DrawScreen()
|
|||||||
DDrawError();
|
DDrawError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
|
DD_Primary->Blt(&rcWindow, DD_CFB, &BlitArea, DDBLT_WAIT, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -279,7 +280,7 @@ void DrawScreen()
|
|||||||
DDrawError();
|
DDrawError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
|
DD_Primary->Blt(&rcWindow, DD_CFB, &BlitArea, DDBLT_WAIT, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1503,7 +1504,7 @@ void initwinvideo(void)
|
|||||||
CurMode=cvidmode;
|
CurMode=cvidmode;
|
||||||
newmode=1;
|
newmode=1;
|
||||||
SurfaceX=256;
|
SurfaceX=256;
|
||||||
SurfaceY=224;
|
SurfaceY=240;
|
||||||
X=0;
|
X=0;
|
||||||
Y=0;
|
Y=0;
|
||||||
FullScreen=GUIWFVID[cvidmode];
|
FullScreen=GUIWFVID[cvidmode];
|
||||||
@@ -1528,7 +1529,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=512;
|
WindowWidth=512;
|
||||||
WindowHeight=448;
|
WindowHeight=448;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
WindowWidth=640;
|
WindowWidth=640;
|
||||||
@@ -1538,7 +1539,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=640;
|
WindowWidth=640;
|
||||||
WindowHeight=480;
|
WindowHeight=480;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=448+16;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
WindowWidth=640;
|
WindowWidth=640;
|
||||||
@@ -1550,7 +1551,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=640;
|
WindowWidth=640;
|
||||||
WindowHeight=480;
|
WindowHeight=480;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
WindowWidth=640;
|
WindowWidth=640;
|
||||||
@@ -1564,7 +1565,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=768;
|
WindowWidth=768;
|
||||||
WindowHeight=672;
|
WindowHeight=672;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
WindowWidth=800;
|
WindowWidth=800;
|
||||||
@@ -1574,7 +1575,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=800;
|
WindowWidth=800;
|
||||||
WindowHeight=600;
|
WindowHeight=600;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
WindowWidth=800;
|
WindowWidth=800;
|
||||||
@@ -1590,7 +1591,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=800;
|
WindowWidth=800;
|
||||||
WindowHeight=600;
|
WindowHeight=600;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
WindowWidth=1024;
|
WindowWidth=1024;
|
||||||
@@ -1600,7 +1601,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=1024;
|
WindowWidth=1024;
|
||||||
WindowHeight=768;
|
WindowHeight=768;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 18:
|
case 18:
|
||||||
WindowWidth=1024;
|
WindowWidth=1024;
|
||||||
@@ -1616,7 +1617,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=1024;
|
WindowWidth=1024;
|
||||||
WindowHeight=768;
|
WindowHeight=768;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 21:
|
case 21:
|
||||||
WindowWidth=1024;
|
WindowWidth=1024;
|
||||||
@@ -1626,7 +1627,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=1024;
|
WindowWidth=1024;
|
||||||
WindowHeight=896;
|
WindowHeight=896;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 23:
|
case 23:
|
||||||
WindowWidth=1280;
|
WindowWidth=1280;
|
||||||
@@ -1636,7 +1637,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=1280;
|
WindowWidth=1280;
|
||||||
WindowHeight=960;
|
WindowHeight=960;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 25:
|
case 25:
|
||||||
WindowWidth=1280;
|
WindowWidth=1280;
|
||||||
@@ -1652,7 +1653,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=1280;
|
WindowWidth=1280;
|
||||||
WindowHeight=960;
|
WindowHeight=960;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 28:
|
case 28:
|
||||||
WindowWidth=1280;
|
WindowWidth=1280;
|
||||||
@@ -1662,7 +1663,7 @@ void initwinvideo(void)
|
|||||||
WindowWidth=1280;
|
WindowWidth=1280;
|
||||||
WindowHeight=1024;
|
WindowHeight=1024;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
case 30:
|
case 30:
|
||||||
WindowWidth=1280;
|
WindowWidth=1280;
|
||||||
@@ -1678,13 +1679,19 @@ void initwinvideo(void)
|
|||||||
WindowWidth=1280;
|
WindowWidth=1280;
|
||||||
WindowHeight=1024;
|
WindowHeight=1024;
|
||||||
SurfaceX=512;
|
SurfaceX=512;
|
||||||
SurfaceY=448;
|
SurfaceY=464;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WindowWidth=256;
|
WindowWidth=256;
|
||||||
WindowHeight=224;
|
WindowHeight=224;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlitArea.top = 0;
|
||||||
|
BlitArea.left=0;
|
||||||
|
BlitArea.bottom=SurfaceY;
|
||||||
|
BlitArea.right=SurfaceX;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((PrevStereoSound!=StereoSound)||(PrevSoundQuality!=SoundQuality))&&FirstSound!=1)
|
if (((PrevStereoSound!=StereoSound)||(PrevSoundQuality!=SoundQuality))&&FirstSound!=1)
|
||||||
@@ -2069,12 +2076,13 @@ void drawscreenwin(void)
|
|||||||
ScreenPtr=vidbuffer;
|
ScreenPtr=vidbuffer;
|
||||||
ScreenPtr+=16*2+32*2+256*2;
|
ScreenPtr+=16*2+32*2+256*2;
|
||||||
|
|
||||||
if (resolutn == 239) ScreenPtr+=8*288*2;
|
if (resolutn == 239) BlitArea.bottom = 239;
|
||||||
|
if (resolutn == 224) BlitArea.bottom = 223;
|
||||||
|
|
||||||
SurfBufD=(DWORD) &SurfBuf[0];
|
SurfBufD=(DWORD) &SurfBuf[0];
|
||||||
SURFDW=(DWORD *) &SurfBuf[0];
|
SURFDW=(DWORD *) &SurfBuf[0];
|
||||||
|
|
||||||
if (SurfaceX==256&&SurfaceY==224)
|
if (SurfaceX==256&&SurfaceY==240)
|
||||||
{
|
{
|
||||||
switch (BitDepth)
|
switch (BitDepth)
|
||||||
{
|
{
|
||||||
@@ -2103,7 +2111,7 @@ void drawscreenwin(void)
|
|||||||
sub edi,512
|
sub edi,512
|
||||||
sub esi,512
|
sub esi,512
|
||||||
add esi,576
|
add esi,576
|
||||||
cmp eax,223
|
cmp eax,239
|
||||||
jne Copying3
|
jne Copying3
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@@ -2127,7 +2135,7 @@ void drawscreenwin(void)
|
|||||||
sub edi,512
|
sub edi,512
|
||||||
sub esi,512
|
sub esi,512
|
||||||
add esi,576
|
add esi,576
|
||||||
cmp eax,223
|
cmp eax,239
|
||||||
jne Copying
|
jne Copying
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@@ -2163,12 +2171,12 @@ void drawscreenwin(void)
|
|||||||
sub edi,1024
|
sub edi,1024
|
||||||
sub esi,512
|
sub esi,512
|
||||||
add esi,576
|
add esi,576
|
||||||
cmp eax,223
|
cmp eax,239
|
||||||
jne Copying32b
|
jne Copying32b
|
||||||
pop es
|
pop es
|
||||||
}
|
}
|
||||||
|
|
||||||
SURFDW=(DWORD *) &SurfBuf[222*Temp1];
|
SURFDW=(DWORD *) &SurfBuf[238*Temp1];
|
||||||
color32=0x7F000000;
|
color32=0x7F000000;
|
||||||
|
|
||||||
for(i=0;i<256;i++)
|
for(i=0;i<256;i++)
|
||||||
@@ -2176,7 +2184,7 @@ void drawscreenwin(void)
|
|||||||
SURFDW[i]=color32;
|
SURFDW[i]=color32;
|
||||||
}
|
}
|
||||||
|
|
||||||
SURFDW=(DWORD *) &SurfBuf[223*Temp1];
|
SURFDW=(DWORD *) &SurfBuf[239*Temp1];
|
||||||
color32=0x7F000000;
|
color32=0x7F000000;
|
||||||
|
|
||||||
for(i=0;i<256;i++)
|
for(i=0;i<256;i++)
|
||||||
@@ -2257,7 +2265,7 @@ void drawscreenwin(void)
|
|||||||
sub edi,640
|
sub edi,640
|
||||||
sub esi,512
|
sub esi,512
|
||||||
add esi,576
|
add esi,576
|
||||||
cmp ebx,223
|
cmp ebx,239
|
||||||
jne Copying2MMX
|
jne Copying2MMX
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@@ -2298,7 +2306,7 @@ void drawscreenwin(void)
|
|||||||
sub edi,640
|
sub edi,640
|
||||||
sub esi,512
|
sub esi,512
|
||||||
add esi,576
|
add esi,576
|
||||||
cmp ebx,223
|
cmp ebx,239
|
||||||
jne Copying2
|
jne Copying2
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ecx,128
|
mov ecx,128
|
||||||
@@ -2368,7 +2376,7 @@ void drawscreenwin(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SurfaceX==512&&SurfaceY==448)
|
if (SurfaceX==512&&SurfaceY==464)
|
||||||
{
|
{
|
||||||
switch (BitDepth)
|
switch (BitDepth)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user