ref: 11a1e7c30819d163e079c203f4bb22773d9a6acc
parent: 436cfb864dda2ccc388264e05ab5e67d41e32bd0
author: Marc-Alexandre Espiaut <marcalexandre@member.fsf.org>
date: Tue Jun 5 09:51:42 EDT 2018
Removing useless VGA* code
--- a/rott/cin_efct.c
+++ b/rott/cin_efct.c
@@ -355,8 +355,6 @@
buf=(byte *)bufferofs+ylookup[back->yoffset];
offset=(back->currentoffset>>FRACTIONBITS)+plane;
- VGAWRITEMAP(plane);
-
for (i=0; i<iGLOBAL_SCREENWIDTH; i++,offset++,buf++)
{
if (offset>=back->backdropwidth)
@@ -400,8 +398,6 @@
buf=(byte *)bufferofs+ylookup[back->yoffset];
offset=(back->currentoffset>>FRACTIONBITS)+plane;
- VGAWRITEMAP(plane);
-
for (i=0; i<iGLOBAL_SCREENWIDTH; i++,offset++,buf++)
{
if (offset>=back->backdropwidth)
@@ -447,8 +443,6 @@
buf=(byte *)bufferofs;
offset=(back->currentoffset>>FRACTIONBITS)+plane;
- VGAWRITEMAP(plane);
-
for (i=0; i<iGLOBAL_SCREENWIDTH; i++,offset++,buf++)
{
if (offset>=back->backdropwidth)
@@ -543,7 +537,6 @@
for (; x1<=x2 ; x1++, frac += cin_iscale)
{
- VGAWRITEMAP(x1&3);
ScaleFilmPost(((p->collumnofs[frac>>FRACTIONBITS])+shape),buf+x1);
}
}
@@ -849,7 +842,6 @@
{
buf=(byte *)bufferofs;
- VGAWRITEMAP(plane);
for (i=0; i<width; i++,buf++)
{
@@ -886,8 +878,6 @@
buf=(byte *)bufferofs;
src=&(pic->data) + (plane*pic->height);
-
- VGAWRITEMAP(plane);
for (i=0; i<width; i++,src+=pic->height,buf++)
{
--- a/rott/modexlib.h
+++ b/rott/modexlib.h
@@ -80,8 +80,4 @@
void WaitVBL( void );
void TurnOffTextCursor ( void );
-#define VGAMAPMASK(a)
-#define VGAREADMAP(a)
-#define VGAWRITEMAP(a)
-
#endif
--- a/rott/rt_build.c
+++ b/rott/rt_build.c
@@ -236,7 +236,6 @@
shadingtable=colormap+(16<<8);
{
- VGAWRITEMAP(plane);
buf=(char *)(bufferofs);
for (i=0; i<viewwidth; i++,buf++)
--- a/rott/rt_draw.c
+++ b/rott/rt_draw.c
@@ -1883,7 +1883,6 @@
if (doublestep>1)
{
{
- VGAMAPMASK((1<<plane)+(1<<(plane+1)));
buf=(byte *)(bufferofs);
for (post=&posts[plane]; post<&posts[viewwidth]; post+=2,buf+=2)
{
@@ -1898,7 +1897,6 @@
else
{
{
- VGAWRITEMAP(plane);
buf=(byte *)(bufferofs);
for (post=&posts[plane]; post<&posts[viewwidth]; post++,buf++)
{
@@ -2577,7 +2575,6 @@
CurrentFont=tinyfont;
whereami=20;
- VGAMAPMASK(15);
for (i=0; i<18; i++)
memset((byte *)bufferofs+(ylookup[i+PLY])+PLX,0,6);
px=PLX;
@@ -3371,7 +3368,6 @@
{
mr_yfrac=xct;
mr_xfrac=xst;
- VGAWRITEMAP(plane);
for (y=0; y<Yr; y++,mr_xfrac+=c,mr_yfrac-=s)
DrawRotRow(Xr,screen+ylookup[y],RotatedImage);
}
@@ -3381,7 +3377,6 @@
{
mr_yfrac=xct;
mr_xfrac=xst;
- VGAWRITEMAP(plane);
for (y=0; y<Yr; y++,mr_xfrac+=c,mr_yfrac-=s)
DrawMaskedRotRow(Xr,screen+ylookup[y],RotatedImage);
}
@@ -3406,7 +3401,6 @@
dc_texturemid=(((p->origsize>>1)+p->topoffset)<<SFRACBITS)+(SFRACUNIT>>1);
sprtopoffset=centeryfrac - FixedMul(dc_texturemid,dc_invscale);
shadingtable=colormap+(1<<12);
- VGAWRITEMAP(x&3);
ScaleMaskedPost(((p->collumnofs[offset])+src), (byte *)bufferofs+x);
}
@@ -3964,7 +3958,6 @@
currentmag=mag>>16;
for (x=0; x<320; x++,shape+=200)
{
- VGAWRITEMAP(x&3);
src=shape;
offset=(t+(x<<OSCXSHIFT))&(FINEANGLES-1);
yoffset=FixedMul(currentmag,sintable[offset]);
@@ -4050,7 +4043,6 @@
srcoffset=0;
for (x=0; x<320;)
{
- VGAWRITEMAP(x&3);
offset=(t+(FixedMul(x,ZOSCXSTEP)))&(FINEANGLES-1);
zoffset=FixedMul(currentmag,sintable[offset]);
@@ -4205,7 +4197,6 @@
size=linewidth*200;
{
- VGAWRITEMAP(plane);
memcpy((byte *)bufferofs,bkgnd,size);
bkgnd+=size;
}
@@ -4225,7 +4216,6 @@
size=linewidth*200;
{
- VGAREADMAP(plane);
memcpy(bkgnd,(byte *)bufferofs,size);
bkgnd+=size;
}
@@ -4497,7 +4487,6 @@
tmp=sky;
for (x=0; x<256; x++)
{
- VGAWRITEMAP(x&3);
for (y=0; y<200; y++)
{
*((byte *)bufferofs+ylookup[y]+x)=*tmp++;
@@ -4506,7 +4495,6 @@
tmp=sky;
for (x=256; x<320; x++)
{
- VGAWRITEMAP(x&3);
for (y=0; y<200; y++)
{
*((byte *)bufferofs+ylookup[y]+x)=*tmp++;
@@ -4569,7 +4557,6 @@
tmp=sky;
for (x=0; x<256; x++)
{
- VGAWRITEMAP(x&3);
for (y=0; y<200; y++)
{
*((byte *)bufferofs+ylookup[y]+x)=*tmp++;
@@ -4578,7 +4565,6 @@
tmp=sky;
for (x=256; x<320; x++)
{
- VGAWRITEMAP(x&3);
for (y=0; y<200; y++)
{
*((byte *)bufferofs+ylookup[y]+x)=*tmp++;
@@ -6457,7 +6443,6 @@
VL_ClearBuffer (bufferofs, 0);
{
- VGAWRITEMAP(plane);
for (i=0; i<numparticles; i++)
{
part=&Particle[i];
@@ -6502,7 +6487,6 @@
count=0;
{
- VGAREADMAP(plane);
for (a=0; a<200; a++)
{
for (b=0; b<320; b++)
@@ -6523,7 +6507,6 @@
part=&Particle[0];
{
- VGAREADMAP(plane);
for (a=0; a<200; a++)
{
for (b=0; b<320; b++)
--- a/rott/rt_game.c
+++ b/rott/rt_game.c
@@ -1889,8 +1889,6 @@
for (planes = 0; planes < 4; planes++)
{
- VGAMAPMASK (mask);
-
dest = olddest;
dest += planes;
@@ -2091,8 +2089,6 @@
for (planes = 0; planes < 4; planes++)
{
- VGAMAPMASK (mask);
-
dest = olddest;
dest += planes;
@@ -2565,8 +2561,6 @@
for (planes = 0; planes < 4; planes++)
{
- VGAMAPMASK (mask);
-
dest = olddest;
for (y = 0; y < height; y++)
@@ -2696,8 +2690,6 @@
for (plane = 0; plane<4; plane++)
{
- VGAMAPMASK (mask);
-
screen1 = dest1;
screen2 = dest2;
screen3 = dest3;
--- a/rott/rt_scale.c
+++ b/rott/rt_scale.c
@@ -487,7 +487,6 @@
{
{
frac=startfrac;
-// VGAWRITEMAP(plane&3);
for (x1=startx; x1<=x2; x1+=2, frac += (dc_iscale<<1))
{
if (
@@ -583,8 +582,6 @@
{
if (posts[x1].wallheight>sprite->viewheight)
continue;
- VGAWRITEMAP(x1&3);
- VGAREADMAP(x1&3);
ScaleTransparentPost(((p->collumnofs[frac>>SFRACBITS])+shape),(byte *)bufferofs+(x1>>2),sprite->h2);
}
#endif
@@ -744,7 +741,6 @@
{
frac=startfrac;
b=(byte *)bufferofs+startx;
- VGAWRITEMAP(plane&3);
for (x1=startx; x1<=x2 ; x1++, frac += dc_iscale,b++)
ScaleClippedPost(((p->collumnofs[frac>>SFRACBITS])+shape),b);
}
@@ -1074,7 +1070,6 @@
{
frac=startfrac;
b=(byte *)bufferofs+(plane>>2);
- VGAWRITEMAP(plane&3);
for (x1=plane; x1<=x2 ; x1+=4, frac += xdc_iscale<<2,b++)
ScaleClippedPost(((p->collumnofs[frac>>SFRACBITS])+shape),b);
}
--- a/rott/rt_str.c
+++ b/rott/rt_str.c
@@ -103,7 +103,6 @@
if ((x>=0) && (x<iGLOBAL_SCREENWIDTH))
{
y=oy;
- VGAWRITEMAP(x&3);
height = ht;
while (height--)
{
--- a/rott/rt_vid.c
+++ b/rott/rt_vid.c
@@ -193,8 +193,6 @@
plane = 4;
while( plane > 0 )
{
- VGAMAPMASK( mask );
-
origdest = start+(4-plane);
sourcey = offy;
@@ -1074,7 +1072,6 @@
for (plane=x; plane<x+4; plane++)
{
- VGAWRITEMAP((plane&3));
for (yy = 0; yy < p->height; yy++)
{
buf=buffer+ylookup[yy];