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
b9b752ed
Commit
b9b752ed
authored
May 06, 2002
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Intel C Compiler cleanups.
parent
4ad2885f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
30 deletions
+60
-30
id_heads.h
src/id_heads.h
+0
-1
sd_oss.c
src/sd_oss.c
+4
-0
wl_act2.c
src/wl_act2.c
+6
-6
wl_agent.c
src/wl_agent.c
+1
-1
wl_def.h
src/wl_def.h
+15
-1
wl_draw.c
src/wl_draw.c
+28
-19
wl_main.c
src/wl_main.c
+5
-1
wl_play.c
src/wl_play.c
+1
-1
No files found.
src/id_heads.h
View file @
b9b752ed
...
...
@@ -5,7 +5,6 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <inttypes.h>
#include <glob.h>
#include <ctype.h>
...
...
src/sd_oss.c
View file @
b9b752ed
...
...
@@ -7,6 +7,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
/* TODO: this code is seriously braindead. Needs to be rewritten.
Debug adlib sound issue with intel compiler
*/
#include "fmopl.h"
...
...
src/wl_act2.c
View file @
b9b752ed
...
...
@@ -160,7 +160,7 @@ void A_Smoke(objtype *ob)
new
->
x
=
ob
->
x
;
new
->
y
=
ob
->
y
;
new
->
obclass
=
inertobj
;
new
->
active
=
true
;
new
->
active
=
ac_yes
;
new
->
flags
=
FL_NEVERMARK
;
}
...
...
@@ -433,7 +433,7 @@ void SpawnPatrol (enemy_t which, int tilex, int tiley, int dir)
new
->
hitpoints
=
starthitpoints
[
gamestate
.
difficulty
][
which
];
new
->
distance
=
TILEGLOBAL
;
new
->
flags
|=
FL_SHOOTABLE
;
new
->
active
=
true
;
new
->
active
=
ac_yes
;
actorat
[
new
->
tilex
][
new
->
tiley
]
=
0
;
// don't use original spot
...
...
@@ -1087,7 +1087,7 @@ void T_Launch(objtype *ob)
new
->
angle
=
iangle
;
new
->
speed
=
0x2000l
;
new
->
flags
=
FL_NONMARK
;
new
->
active
=
true
;
new
->
active
=
ac_yes
;
}
void
A_Slurpie
(
objtype
*
ob
)
...
...
@@ -1442,7 +1442,7 @@ void T_SchabbThrow (objtype *ob)
new
->
speed
=
0x2000l
;
new
->
flags
=
FL_NONMARK
;
new
->
active
=
true
;
new
->
active
=
ac_yes
;
PlaySoundLocActor
(
SCHABBSTHROWSND
,
new
);
}
...
...
@@ -1481,7 +1481,7 @@ void T_GiftThrow(objtype *ob)
new
->
angle
=
iangle
;
new
->
speed
=
0x2000l
;
new
->
flags
=
FL_NONMARK
;
new
->
active
=
true
;
new
->
active
=
ac_yes
;
PlaySoundLocActor
(
MISSILEFIRESND
,
new
);
}
...
...
@@ -1906,7 +1906,7 @@ void T_FakeFire (objtype *ob)
new
->
obclass
=
fireobj
;
new
->
speed
=
0x1200l
;
new
->
flags
=
FL_NEVERMARK
;
new
->
active
=
true
;
new
->
active
=
ac_yes
;
PlaySoundLocActor
(
FLAMETHROWERSND
,
new
);
}
...
...
src/wl_agent.c
View file @
b9b752ed
...
...
@@ -1011,7 +1011,7 @@ void Cmd_Use()
void
SpawnPlayer
(
int
tilex
,
int
tiley
,
int
dir
)
{
player
->
obclass
=
playerobj
;
player
->
active
=
true
;
player
->
active
=
ac_yes
;
player
->
tilex
=
tilex
;
player
->
tiley
=
tiley
;
player
->
areanumber
=
...
...
src/wl_def.h
View file @
b9b752ed
...
...
@@ -8,6 +8,8 @@
extern
int
vwidth
,
vheight
;
/* size of screen */
#define NOASM
/*
=============================================================================
...
...
@@ -853,7 +855,7 @@ extern fixed viewsin, viewcos;
extern
int
horizwall
[],
vertwall
[];
fixed
FixedByFrac
(
fixed
a
,
fixed
b
);
void
BuildTables
();
void
CalcTics
();
void
ThreeDRefresh
();
...
...
@@ -1005,4 +1007,16 @@ extern void EndText();
#include "wl_act3.h"
/* FixedByFrac */
fixed
FixedByFrac
(
fixed
a
,
fixed
b
);
#ifndef NOASM
#define FixedByFrac(x, y) \
__extension__ \
({ unsigned long z; \
asm("imull %2; shrdl $16, %%edx, %%eax" : "=a" (z) : "a" (x), "q" (y) : "%edx"); \
z; \
})
#endif
#endif
src/wl_draw.c
View file @
b9b752ed
...
...
@@ -29,17 +29,6 @@ static long heightnumerator;
static
void
AsmRefresh
();
#define NOASM
#ifndef NOASM
#define FixedByFrac(x, y) \
__extension__ \
({ unsigned long z; \
asm("imull %2; shrdl $16, %%edx, %%eax" : "=a" (z) : "a" (x), "q" (y) : "%edx"); \
z; \
})
#endif
void
ScaleShape
(
int
xcenter
,
int
shapenum
,
unsigned
height
);
void
SimpleScaleShape
(
int
xcenter
,
int
shapenum
,
unsigned
height
);
...
...
@@ -335,7 +324,7 @@ static void DrawScaleds()
||
(
*
(
visspot
+
64
)
&&
!*
(
tilespot
+
64
))
||
(
*
(
visspot
+
63
)
&&
!*
(
tilespot
+
63
)))
{
obj
->
active
=
true
;
obj
->
active
=
ac_yes
;
TransformActor
(
obj
);
if
(
!
obj
->
viewheight
)
continue
;
// too close or far away
...
...
@@ -803,14 +792,25 @@ static void DeCompileSprite(int shapenum)
void
ScaleShape
(
int
xcenter
,
int
shapenum
,
unsigned
height
)
{
unsigned
int
scaler
=
(
64
<<
16
)
/
(
height
>>
2
);
unsigned
int
x
,
p
;
unsigned
int
x
;
int
p
;
if
(
spritegfx
[
shapenum
]
==
NULL
)
DeCompileSprite
(
shapenum
);
for
(
p
=
xcenter
-
(
height
>>
3
),
x
=
0
;
x
<
(
64
<<
16
);
x
+=
scaler
,
p
++
)
{
if
((
p
<
0
)
||
(
p
>=
viewwidth
)
||
(
wallheight
[
p
]
>=
height
))
p
=
xcenter
-
(
height
>>
3
);
if
(
p
<
0
)
{
x
=
(
-
p
)
*
scaler
;
p
=
0
;
}
else
{
x
=
0
;
}
for
(;
x
<
(
64
<<
16
);
x
+=
scaler
,
p
++
)
{
if
(
p
>=
viewwidth
)
break
;
if
(
wallheight
[
p
]
>=
height
)
continue
;
ScaleLineTrans
(
height
>>
2
,
spritegfx
[
shapenum
]
+
((
x
>>
16
)
<<
6
),
p
);
}
}
...
...
@@ -818,14 +818,23 @@ void ScaleShape(int xcenter, int shapenum, unsigned height)
void
SimpleScaleShape
(
int
xcenter
,
int
shapenum
,
unsigned
height
)
{
unsigned
int
scaler
=
(
64
<<
16
)
/
height
;
unsigned
int
x
,
p
;
unsigned
int
x
;
int
p
;
if
(
spritegfx
[
shapenum
]
==
NULL
)
DeCompileSprite
(
shapenum
);
for
(
p
=
xcenter
-
(
height
/
2
),
x
=
0
;
x
<
(
64
<<
16
);
x
+=
scaler
,
p
++
)
{
if
((
p
<
0
)
||
(
p
>=
viewwidth
))
continue
;
p
=
xcenter
-
(
height
/
2
);
if
(
p
<
0
)
{
x
=
(
-
p
)
*
scaler
;
p
=
0
;
}
else
{
x
=
0
;
}
for
(;
x
<
(
64
<<
16
);
x
+=
scaler
,
p
++
)
{
if
(
p
>=
viewwidth
)
break
;
ScaleLineTrans
(
height
,
spritegfx
[
shapenum
]
+
((
x
>>
16
)
<<
6
),
p
);
}
}
...
...
src/wl_main.c
View file @
b9b752ed
...
...
@@ -52,7 +52,10 @@ char **_argv;
=
========================
*/
#ifdef NOASM
#if defined(__INTEL_COMPILER)
typedef
_int64
int64_t
;
#endif
fixed
FixedByFrac
(
fixed
a
,
fixed
b
)
{
int64_t
ra
=
a
;
...
...
@@ -63,6 +66,7 @@ fixed FixedByFrac(fixed a, fixed b)
r
>>=
TILESHIFT
;
return
(
fixed
)
r
;
}
#endif
/*
=====================
...
...
src/wl_play.c
View file @
b9b752ed
...
...
@@ -778,7 +778,7 @@ void GetNewActor()
lastobj
->
next
=
new
;
new
->
prev
=
lastobj
;
// new->next is already NULL from memset
new
->
active
=
false
;
new
->
active
=
ac_no
;
lastobj
=
new
;
}
...
...
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