Commit 219c11c0 authored by Steven Fuller's avatar Steven Fuller

wl_scale.c: Rewrote the sprite drawing code (now works similar to wall

drawing).
parent 3d16d302
......@@ -404,9 +404,8 @@ enum {
SPR_MACHINEGUNATK4,
SPR_CHAINREADY,SPR_CHAINATK1,SPR_CHAINATK2,SPR_CHAINATK3,
SPR_CHAINATK4, SPR_NULLSPRITE
};
SPR_CHAINATK4, SPR_NULLSPRITE, SPR_TOTAL
};
/*
......@@ -437,7 +436,6 @@ typedef enum {
ac_badobject = -1,
ac_no,
ac_yes,
ac_allways
} activetype;
typedef enum {
......@@ -931,16 +929,8 @@ boolean CheckSight (objtype *ob);
=============================================================================
*/
typedef struct
{
word leftpix,rightpix;
word dataofs[64];
/* table data after dataofs[rightpix-leftpix+1] */
} PACKED t_compshape;
void SetupScaling (int maxscaleheight);
void ScaleShape (int xcenter, int shapenum, unsigned height);
void SimpleScaleShape (int xcenter, int shapenum, unsigned height);
void ScaleShape(int xcenter, int shapenum, unsigned height);
void SimpleScaleShape(int xcenter, int shapenum, unsigned height);
/*
=============================================================================
......
......@@ -36,7 +36,7 @@ static long xstep, ystep;
static unsigned postx;
static void AsmRefresh();
void xBuildCompScale(int height, byte *source, int x);
void ScaleLine(int height, byte *source, int x);
#define NOASM
......@@ -241,7 +241,7 @@ static void ScalePost(byte *wall, int texture)
height = (wallheight[postx] & 0xfff8) >> 1;
source = wall+texture;
xBuildCompScale(height/2, source, postx);
ScaleLine(height/2, source, postx);
}
/*
......
......@@ -1119,12 +1119,8 @@ boolean SetViewSize(unsigned width, unsigned height)
//
// calculate trace angles and projection constants
//
CalcProjection (FOCALLENGTH);
CalcProjection(FOCALLENGTH);
//
// build all needed compiled scalers
//
SetupScaling(viewwidth*1.5);
return true;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment