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
3665f119
Commit
3665f119
authored
Apr 21, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now to find a different bug with the player position
parent
f0d81dbd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
32 deletions
+12
-32
wl_agent.c
src/wl_agent.c
+0
-22
wl_def.h
src/wl_def.h
+9
-9
wl_draw.c
src/wl_draw.c
+1
-1
wl_main.c
src/wl_main.c
+2
-0
No files found.
src/wl_agent.c
View file @
3665f119
...
@@ -10,9 +10,6 @@
...
@@ -10,9 +10,6 @@
=============================================================================
=============================================================================
*/
*/
#define MAXMOUSETURN 10
#define MOVESCALE 150l
#define MOVESCALE 150l
#define BACKMOVESCALE 100l
#define BACKMOVESCALE 100l
#define ANGLESCALE 20
#define ANGLESCALE 20
...
@@ -25,8 +22,6 @@
...
@@ -25,8 +22,6 @@
=============================================================================
=============================================================================
*/
*/
//
//
// player state info
// player state info
//
//
...
@@ -54,9 +49,6 @@ void T_Attack (objtype *ob);
...
@@ -54,9 +49,6 @@ void T_Attack (objtype *ob);
statetype
s_player
=
{
false
,
0
,
0
,
T_Player
,
NULL
,
NULL
};
statetype
s_player
=
{
false
,
0
,
0
,
T_Player
,
NULL
,
NULL
};
statetype
s_attack
=
{
false
,
0
,
0
,
T_Attack
,
NULL
,
NULL
};
statetype
s_attack
=
{
false
,
0
,
0
,
T_Attack
,
NULL
,
NULL
};
long
playerxmove
,
playerymove
;
struct
atkinf
struct
atkinf
{
{
char
tics
,
attack
,
frame
;
// attack is 1 for gun, 2 for knife
char
tics
,
attack
,
frame
;
// attack is 1 for gun, 2 for knife
...
@@ -69,9 +61,6 @@ struct atkinf
...
@@ -69,9 +61,6 @@ struct atkinf
{
{
6
,
0
,
1
},{
6
,
1
,
2
},{
6
,
4
,
3
},{
6
,
-
1
,
4
}
},
{
{
6
,
0
,
1
},{
6
,
1
,
2
},{
6
,
4
,
3
},{
6
,
-
1
,
4
}
},
};
};
int
strafeangle
[
9
]
=
{
0
,
90
,
180
,
270
,
45
,
135
,
225
,
315
,
0
};
void
DrawWeapon
(
void
);
void
DrawWeapon
(
void
);
void
GiveWeapon
(
int
weapon
);
void
GiveWeapon
(
int
weapon
);
void
GiveAmmo
(
int
ammo
);
void
GiveAmmo
(
int
ammo
);
...
@@ -145,16 +134,11 @@ void CheckWeaponChange (void)
...
@@ -145,16 +134,11 @@ void CheckWeaponChange (void)
void
ControlMovement
(
objtype
*
ob
)
void
ControlMovement
(
objtype
*
ob
)
{
{
long
oldx
,
oldy
;
int
angle
,
maxxmove
;
int
angle
,
maxxmove
;
int
angleunits
;
int
angleunits
;
long
speed
;
long
speed
;
thrustspeed
=
0
;
thrustspeed
=
0
;
oldx
=
player
->
x
;
oldy
=
player
->
y
;
//
//
// side to side move
// side to side move
//
//
...
@@ -213,12 +197,6 @@ void ControlMovement (objtype *ob)
...
@@ -213,12 +197,6 @@ void ControlMovement (objtype *ob)
if
(
gamestate
.
victoryflag
)
// watching the BJ actor
if
(
gamestate
.
victoryflag
)
// watching the BJ actor
return
;
return
;
//
// calculate total move
//
playerxmove
=
player
->
x
-
oldx
;
playerymove
=
player
->
y
-
oldy
;
}
}
/*
/*
...
...
src/wl_def.h
View file @
3665f119
...
@@ -70,6 +70,8 @@
...
@@ -70,6 +70,8 @@
#define PLAYERSIZE MINDIST // player radius
#define PLAYERSIZE MINDIST // player radius
#define MINACTORDIST 0x10000l // minimum dist from player center
#define MINACTORDIST 0x10000l // minimum dist from player center
// to any actor center
// to any actor center
#undef PI
#define PI 3.141592657
#define PI 3.141592657
#define GLOBAL1 (1l<<16)
#define GLOBAL1 (1l<<16)
...
@@ -83,8 +85,8 @@
...
@@ -83,8 +85,8 @@
#define MINDIST (0x5800l)
#define MINDIST (0x5800l)
/* xwolf code needs max height to double */
#define MAXSCALEHEIGHT
256 // largest scale on largest view
#define MAXSCALEHEIGHT
512
/* largest scale on largest view */
#define MAXVIEWWIDTH 320
#define MAXVIEWWIDTH 320
...
@@ -559,7 +561,7 @@ typedef struct statestruct
...
@@ -559,7 +561,7 @@ typedef struct statestruct
int
tictime
;
int
tictime
;
void
(
*
think
)
(),(
*
action
)
();
void
(
*
think
)
(),(
*
action
)
();
struct
statestruct
*
next
;
struct
statestruct
*
next
;
}
statetype
;
}
PACKED
statetype
;
//---------------------
//---------------------
...
@@ -575,7 +577,7 @@ typedef struct statstruct
...
@@ -575,7 +577,7 @@ typedef struct statstruct
int
shapenum
;
/* if shapenum == -1 the obj has been removed */
int
shapenum
;
/* if shapenum == -1 the obj has been removed */
byte
flags
;
byte
flags
;
byte
itemnumber
;
byte
itemnumber
;
}
statobj_t
;
}
PACKED
statobj_t
;
//---------------------
//---------------------
//
//
...
@@ -590,7 +592,7 @@ typedef struct doorstruct
...
@@ -590,7 +592,7 @@ typedef struct doorstruct
byte
lock
;
byte
lock
;
enum
{
dr_open
,
dr_closed
,
dr_opening
,
dr_closing
}
action
;
enum
{
dr_open
,
dr_closed
,
dr_opening
,
dr_closing
}
action
;
int
ticcount
;
int
ticcount
;
}
doorobj_t
;
}
PACKED
doorobj_t
;
//--------------------
//--------------------
//
//
...
@@ -624,7 +626,7 @@ typedef struct objstruct
...
@@ -624,7 +626,7 @@ typedef struct objstruct
int
temp1
,
temp2
,
temp3
;
int
temp1
,
temp2
,
temp3
;
struct
objstruct
*
next
,
*
prev
;
struct
objstruct
*
next
,
*
prev
;
}
objtype
;
}
PACKED
objtype
;
#define NUMBUTTONS 8
#define NUMBUTTONS 8
...
@@ -682,7 +684,7 @@ typedef struct
...
@@ -682,7 +684,7 @@ typedef struct
long
TimeCount
;
long
TimeCount
;
long
killx
,
killy
;
long
killx
,
killy
;
boolean
victoryflag
;
// set during victory animations
boolean
victoryflag
;
// set during victory animations
}
gametype
;
}
PACKED
gametype
;
typedef
enum
{
typedef
enum
{
...
@@ -935,9 +937,7 @@ void ClearScreen (void);
...
@@ -935,9 +937,7 @@ void ClearScreen (void);
int
CalcRotate
(
objtype
*
ob
);
int
CalcRotate
(
objtype
*
ob
);
void
DrawScaleds
(
void
);
void
DrawScaleds
(
void
);
void
CalcTics
(
void
);
void
CalcTics
(
void
);
void
FixOfs
(
void
);
void
ThreeDRefresh
(
void
);
void
ThreeDRefresh
(
void
);
void
FarScalePost
(
void
);
/*
/*
=============================================================================
=============================================================================
...
...
src/wl_draw.c
View file @
3665f119
/
/ WL_DRAW.C
/
* wl_draw.c */
#include "wl_def.h"
#include "wl_def.h"
...
...
src/wl_main.c
View file @
3665f119
...
@@ -556,6 +556,8 @@ void BuildTables (void)
...
@@ -556,6 +556,8 @@ void BuildTables (void)
====================
====================
*/
*/
#include <sys/mman.h>
void
CalcProjection
(
long
focal
)
void
CalcProjection
(
long
focal
)
{
{
int
i
;
int
i
;
...
...
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