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
Hide 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 @@
=============================================================================
*/
#define MAXMOUSETURN 10
#define MOVESCALE 150l
#define BACKMOVESCALE 100l
#define ANGLESCALE 20
...
...
@@ -25,8 +22,6 @@
=============================================================================
*/
//
// player state info
//
...
...
@@ -54,9 +49,6 @@ void T_Attack (objtype *ob);
statetype
s_player
=
{
false
,
0
,
0
,
T_Player
,
NULL
,
NULL
};
statetype
s_attack
=
{
false
,
0
,
0
,
T_Attack
,
NULL
,
NULL
};
long
playerxmove
,
playerymove
;
struct
atkinf
{
char
tics
,
attack
,
frame
;
// attack is 1 for gun, 2 for knife
...
...
@@ -69,9 +61,6 @@ struct atkinf
{
{
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
GiveWeapon
(
int
weapon
);
void
GiveAmmo
(
int
ammo
);
...
...
@@ -145,16 +134,11 @@ void CheckWeaponChange (void)
void
ControlMovement
(
objtype
*
ob
)
{
long
oldx
,
oldy
;
int
angle
,
maxxmove
;
int
angleunits
;
long
speed
;
thrustspeed
=
0
;
oldx
=
player
->
x
;
oldy
=
player
->
y
;
//
// side to side move
//
...
...
@@ -213,12 +197,6 @@ void ControlMovement (objtype *ob)
if
(
gamestate
.
victoryflag
)
// watching the BJ actor
return
;
//
// calculate total move
//
playerxmove
=
player
->
x
-
oldx
;
playerymove
=
player
->
y
-
oldy
;
}
/*
...
...
src/wl_def.h
View file @
3665f119
...
...
@@ -70,6 +70,8 @@
#define PLAYERSIZE MINDIST // player radius
#define MINACTORDIST 0x10000l // minimum dist from player center
// to any actor center
#undef PI
#define PI 3.141592657
#define GLOBAL1 (1l<<16)
...
...
@@ -83,8 +85,8 @@
#define MINDIST (0x5800l)
#define MAXSCALEHEIGHT
256 // largest scale on largest view
/* xwolf code needs max height to double */
#define MAXSCALEHEIGHT
512
/* largest scale on largest view */
#define MAXVIEWWIDTH 320
...
...
@@ -559,7 +561,7 @@ typedef struct statestruct
int
tictime
;
void
(
*
think
)
(),(
*
action
)
();
struct
statestruct
*
next
;
}
statetype
;
}
PACKED
statetype
;
//---------------------
...
...
@@ -575,7 +577,7 @@ typedef struct statstruct
int
shapenum
;
/* if shapenum == -1 the obj has been removed */
byte
flags
;
byte
itemnumber
;
}
statobj_t
;
}
PACKED
statobj_t
;
//---------------------
//
...
...
@@ -590,7 +592,7 @@ typedef struct doorstruct
byte
lock
;
enum
{
dr_open
,
dr_closed
,
dr_opening
,
dr_closing
}
action
;
int
ticcount
;
}
doorobj_t
;
}
PACKED
doorobj_t
;
//--------------------
//
...
...
@@ -624,7 +626,7 @@ typedef struct objstruct
int
temp1
,
temp2
,
temp3
;
struct
objstruct
*
next
,
*
prev
;
}
objtype
;
}
PACKED
objtype
;
#define NUMBUTTONS 8
...
...
@@ -682,7 +684,7 @@ typedef struct
long
TimeCount
;
long
killx
,
killy
;
boolean
victoryflag
;
// set during victory animations
}
gametype
;
}
PACKED
gametype
;
typedef
enum
{
...
...
@@ -935,9 +937,7 @@ void ClearScreen (void);
int
CalcRotate
(
objtype
*
ob
);
void
DrawScaleds
(
void
);
void
CalcTics
(
void
);
void
FixOfs
(
void
);
void
ThreeDRefresh
(
void
);
void
FarScalePost
(
void
);
/*
=============================================================================
...
...
src/wl_draw.c
View file @
3665f119
/
/ WL_DRAW.C
/
* wl_draw.c */
#include "wl_def.h"
...
...
src/wl_main.c
View file @
3665f119
...
...
@@ -556,6 +556,8 @@ void BuildTables (void)
====================
*/
#include <sys/mman.h>
void
CalcProjection
(
long
focal
)
{
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