Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wolf3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
wolf3d
Commits
219c11c0
Commit
219c11c0
authored
Dec 03, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wl_scale.c: Rewrote the sprite drawing code (now works similar to wall
drawing).
parent
3d16d302
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
140 additions
and
378 deletions
+140
-378
wl_def.h
src/wl_def.h
+5
-15
wl_draw.c
src/wl_draw.c
+2
-2
wl_main.c
src/wl_main.c
+1
-5
wl_scale.c
src/wl_scale.c
+132
-356
No files found.
src/wl_def.h
View file @
219c11c0
...
@@ -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
);
/*
/*
=============================================================================
=============================================================================
...
...
src/wl_draw.c
View file @
219c11c0
...
@@ -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
xBuildCompScal
e
(
int
height
,
byte
*
source
,
int
x
);
void
ScaleLin
e
(
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
;
xBuildCompScal
e
(
height
/
2
,
source
,
postx
);
ScaleLin
e
(
height
/
2
,
source
,
postx
);
}
}
/*
/*
...
...
src/wl_main.c
View file @
219c11c0
...
@@ -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
;
}
}
...
...
src/wl_scale.c
View file @
219c11c0
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment