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
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
// sprite constants // sprite constants
// //
enum { enum {
SPR_DEMO, SPR_DEMO,
SPR_DEATHCAM, SPR_DEATHCAM,
// //
...@@ -404,9 +404,8 @@ enum { ...@@ -404,9 +404,8 @@ enum {
SPR_MACHINEGUNATK4, SPR_MACHINEGUNATK4,
SPR_CHAINREADY,SPR_CHAINATK1,SPR_CHAINATK2,SPR_CHAINATK3, SPR_CHAINREADY,SPR_CHAINATK1,SPR_CHAINATK2,SPR_CHAINATK3,
SPR_CHAINATK4, SPR_NULLSPRITE SPR_CHAINATK4, SPR_NULLSPRITE, SPR_TOTAL
};
};
/* /*
...@@ -437,7 +436,6 @@ typedef enum { ...@@ -437,7 +436,6 @@ typedef enum {
ac_badobject = -1, ac_badobject = -1,
ac_no, ac_no,
ac_yes, ac_yes,
ac_allways
} activetype; } activetype;
typedef enum { typedef enum {
...@@ -931,16 +929,8 @@ boolean CheckSight (objtype *ob); ...@@ -931,16 +929,8 @@ boolean CheckSight (objtype *ob);
============================================================================= =============================================================================
*/ */
typedef struct void ScaleShape(int xcenter, int shapenum, unsigned height);
{ void SimpleScaleShape(int xcenter, int shapenum, unsigned height);
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);
/* /*
============================================================================= =============================================================================
......
...@@ -36,7 +36,7 @@ static long xstep, ystep; ...@@ -36,7 +36,7 @@ static long xstep, ystep;
static unsigned postx; static unsigned postx;
static void AsmRefresh(); static void AsmRefresh();
void xBuildCompScale(int height, byte *source, int x); void ScaleLine(int height, byte *source, int x);
#define NOASM #define NOASM
...@@ -241,7 +241,7 @@ static void ScalePost(byte *wall, int texture) ...@@ -241,7 +241,7 @@ static void ScalePost(byte *wall, int texture)
height = (wallheight[postx] & 0xfff8) >> 1; height = (wallheight[postx] & 0xfff8) >> 1;
source = wall+texture; source = wall+texture;
xBuildCompScale(height/2, source, postx); ScaleLine(height/2, source, postx);
} }
/* /*
......
...@@ -1119,12 +1119,8 @@ boolean SetViewSize(unsigned width, unsigned height) ...@@ -1119,12 +1119,8 @@ boolean SetViewSize(unsigned width, unsigned height)
// //
// calculate trace angles and projection constants // calculate trace angles and projection constants
// //
CalcProjection (FOCALLENGTH); CalcProjection(FOCALLENGTH);
//
// build all needed compiled scalers
//
SetupScaling(viewwidth*1.5);
return true; 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