Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
a9dba0ff
Commit
a9dba0ff
authored
9 years ago
by
RedEnchilada
Browse files
Options
Downloads
Patches
Plain Diff
Condense GetFloor/CeilingZ into fewer functions, and use macros for the rest
parent
e0d97e4b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!22
Slopes and stuff
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/p_local.h
+16
-9
16 additions, 9 deletions
src/p_local.h
src/p_mobj.c
+237
-799
237 additions, 799 deletions
src/p_mobj.c
with
253 additions
and
808 deletions
src/p_local.h
+
16
−
9
View file @
a9dba0ff
...
@@ -217,15 +217,22 @@ boolean P_RailThinker(mobj_t *mobj);
...
@@ -217,15 +217,22 @@ boolean P_RailThinker(mobj_t *mobj);
void
P_PushableThinker
(
mobj_t
*
mobj
);
void
P_PushableThinker
(
mobj_t
*
mobj
);
void
P_SceneryThinker
(
mobj_t
*
mobj
);
void
P_SceneryThinker
(
mobj_t
*
mobj
);
fixed_t
P_GetFloorZ
(
mobj_t
*
mobj
,
sector_t
*
sector
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
);
fixed_t
P_GetCeilingZ
(
mobj_t
*
mobj
,
sector_t
*
sector
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
);
fixed_t
P_MobjFloorZ
(
mobj_t
*
mobj
,
sector_t
*
sector
,
sector_t
*
boundsec
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
,
boolean
lowest
,
boolean
perfect
);
fixed_t
P_GetFOFTopZ
(
mobj_t
*
mobj
,
sector_t
*
sector
,
ffloor_t
*
fof
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
);
fixed_t
P_MobjCeilingZ
(
mobj_t
*
mobj
,
sector_t
*
sector
,
sector_t
*
boundsec
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
,
boolean
lowest
,
boolean
perfect
);
fixed_t
P_GetFOFBottomZ
(
mobj_t
*
mobj
,
sector_t
*
sector
,
ffloor_t
*
fof
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
);
#define P_GetFloorZ(mobj, sector, x, y, line) P_MobjFloorZ(mobj, sector, NULL, x, y, line, false, false)
#define P_GetCeilingZ(mobj, sector, x, y, line) P_MobjCeilingZ(mobj, sector, NULL, x, y, line, true, false)
fixed_t
P_CameraGetFloorZ
(
camera_t
*
mobj
,
sector_t
*
sector
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
);
#define P_GetFOFTopZ(mobj, sector, fof, x, y, line) P_MobjCeilingZ(mobj, sectors + fof->secnum, sector, x, y, line, false, false)
fixed_t
P_CameraGetCeilingZ
(
camera_t
*
mobj
,
sector_t
*
sector
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
);
#define P_GetFOFBottomZ(mobj, sector, fof, x, y, line) P_MobjFloorZ(mobj, sectors + fof->secnum, sector, x, y, line, true, false)
fixed_t
P_CameraGetFOFTopZ
(
camera_t
*
mobj
,
sector_t
*
sector
,
ffloor_t
*
fof
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
);
#define P_GetSpecialBottomZ(mobj, src, bound) P_MobjFloorZ(mobj, src, bound, mobj->x, mobj->y, NULL, src != bound, true)
fixed_t
P_CameraGetFOFBottomZ
(
camera_t
*
mobj
,
sector_t
*
sector
,
ffloor_t
*
fof
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
);
#define P_GetSpecialTopZ(mobj, src, bound) P_MobjCeilingZ(mobj, src, bound, mobj->x, mobj->y, NULL, src == bound, true)
fixed_t
P_CameraFloorZ
(
camera_t
*
mobj
,
sector_t
*
sector
,
sector_t
*
boundsec
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
,
boolean
lowest
,
boolean
perfect
);
fixed_t
P_CameraCeilingZ
(
camera_t
*
mobj
,
sector_t
*
sector
,
sector_t
*
boundsec
,
fixed_t
x
,
fixed_t
y
,
line_t
*
line
,
boolean
lowest
,
boolean
perfect
);
#define P_CameraGetFloorZ(mobj, sector, x, y, line) P_CameraFloorZ(mobj, sector, NULL, x, y, line, false, false)
#define P_CameraGetCeilingZ(mobj, sector, x, y, line) P_CameraCeilingZ(mobj, sector, NULL, x, y, line, true, false)
#define P_CameraGetFOFTopZ(mobj, sector, fof, x, y, line) P_CameraCeilingZ(mobj, sectors + fof->secnum, sector, x, y, line, false, false)
#define P_CameraGetFOFBottomZ(mobj, sector, fof, x, y, line) P_CameraFloorZ(mobj, sectors + fof->secnum, sector, x, y, line, true, false)
boolean
P_InsideANonSolidFFloor
(
mobj_t
*
mobj
,
ffloor_t
*
rover
);
boolean
P_InsideANonSolidFFloor
(
mobj_t
*
mobj
,
ffloor_t
*
rover
);
boolean
P_CheckDeathPitCollide
(
mobj_t
*
mo
);
boolean
P_CheckDeathPitCollide
(
mobj_t
*
mo
);
...
...
This diff is collapsed.
Click to expand it.
src/p_mobj.c
+
237
−
799
View file @
a9dba0ff
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment