Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
SRB2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
264
Issues
264
List
Board
Labels
Milestones
Merge Requests
74
Merge Requests
74
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
STJr
SRB2
Commits
892a8dd6
Commit
892a8dd6
authored
Mar 20, 2020
by
LJ Sonic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make SRB2 flat like Earth
parent
37b70fe8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
59 additions
and
513 deletions
+59
-513
am_map.c
src/am_map.c
+1
-32
dehacked.c
src/dehacked.c
+1
-2
doomdef.h
src/doomdef.h
+0
-5
hw_main.c
src/hardware/hw_main.c
+0
-0
hw_trick.c
src/hardware/hw_trick.c
+0
-4
lua_baselib.c
src/lua_baselib.c
+0
-6
lua_libs.h
src/lua_libs.h
+0
-2
lua_maplib.c
src/lua_maplib.c
+0
-26
lua_mobjlib.c
src/lua_mobjlib.c
+0
-8
lua_script.c
src/lua_script.c
+0
-10
m_cheat.c
src/m_cheat.c
+0
-24
p_enemy.c
src/p_enemy.c
+0
-5
p_floor.c
src/p_floor.c
+0
-4
p_local.h
src/p_local.h
+0
-4
p_map.c
src/p_map.c
+6
-79
p_maputl.c
src/p_maputl.c
+0
-28
p_maputl.h
src/p_maputl.h
+0
-2
p_mobj.c
src/p_mobj.c
+0
-0
p_mobj.h
src/p_mobj.h
+0
-2
p_saveg.c
src/p_saveg.c
+2
-24
p_setup.c
src/p_setup.c
+0
-6
p_sight.c
src/p_sight.c
+0
-24
p_slopes.c
src/p_slopes.c
+0
-5
p_slopes.h
src/p_slopes.h
+0
-3
p_spec.c
src/p_spec.c
+1
-9
p_user.c
src/p_user.c
+0
-0
r_bsp.c
src/r_bsp.c
+28
-108
r_defs.h
src/r_defs.h
+0
-10
r_draw.c
src/r_draw.c
+0
-2
r_draw.h
src/r_draw.h
+0
-6
r_draw8.c
src/r_draw8.c
+0
-2
r_draw8_npo2.c
src/r_draw8_npo2.c
+0
-5
r_main.c
src/r_main.c
+0
-2
r_plane.c
src/r_plane.c
+9
-31
r_plane.h
src/r_plane.h
+1
-8
r_segs.c
src/r_segs.c
+0
-0
r_things.c
src/r_things.c
+10
-19
screen.c
src/screen.c
+0
-4
screen.h
src/screen.h
+0
-2
No files found.
src/am_map.c
View file @
892a8dd6
...
...
@@ -920,10 +920,8 @@ static inline void AM_drawWalls(void)
{
size_t
i
;
static
mline_t
l
;
#ifdef ESLOPE
fixed_t
frontf1
,
frontf2
,
frontc1
,
frontc2
;
// front floor/ceiling ends
fixed_t
backf1
=
0
,
backf2
=
0
,
backc1
=
0
,
backc2
=
0
;
// back floor ceiling ends
#endif
for
(
i
=
0
;
i
<
numlines
;
i
++
)
{
...
...
@@ -931,7 +929,7 @@ static inline void AM_drawWalls(void)
l
.
a
.
y
=
lines
[
i
].
v1
->
y
>>
FRACTOMAPBITS
;
l
.
b
.
x
=
lines
[
i
].
v2
->
x
>>
FRACTOMAPBITS
;
l
.
b
.
y
=
lines
[
i
].
v2
->
y
>>
FRACTOMAPBITS
;
#ifdef ESLOPE
#define SLOPEPARAMS(slope, end1, end2, normalheight) \
if (slope) { \
end1 = P_GetZAt(slope, lines[i].v1->x, lines[i].v1->y); \
...
...
@@ -946,7 +944,6 @@ static inline void AM_drawWalls(void)
SLOPEPARAMS
(
lines
[
i
].
backsector
->
c_slope
,
backc1
,
backc2
,
lines
[
i
].
backsector
->
ceilingheight
)
}
#undef SLOPEPARAMS
#endif
if
(
!
lines
[
i
].
backsector
)
// 1-sided
{
...
...
@@ -955,19 +952,11 @@ static inline void AM_drawWalls(void)
else
AM_drawMline
(
&
l
,
WALLCOLORS
);
}
#ifdef ESLOPE
else
if
((
backf1
==
backc1
&&
backf2
==
backc2
)
// Back is thok barrier
||
(
frontf1
==
frontc1
&&
frontf2
==
frontc2
))
// Front is thok barrier
{
if
(
backf1
==
backc1
&&
backf2
==
backc2
&&
frontf1
==
frontc1
&&
frontf2
==
frontc2
)
// BOTH are thok barriers
#else
else
if
(
lines
[
i
].
backsector
->
floorheight
==
lines
[
i
].
backsector
->
ceilingheight
// Back is thok barrier
||
lines
[
i
].
frontsector
->
floorheight
==
lines
[
i
].
frontsector
->
ceilingheight
)
// Front is thok barrier
{
if
(
lines
[
i
].
backsector
->
floorheight
==
lines
[
i
].
backsector
->
ceilingheight
&&
lines
[
i
].
frontsector
->
floorheight
==
lines
[
i
].
frontsector
->
ceilingheight
)
// BOTH are thok barriers
#endif
{
if
(
lines
[
i
].
flags
&
ML_NOCLIMB
)
AM_drawMline
(
&
l
,
NOCLIMBTSWALLCOLORS
);
...
...
@@ -985,20 +974,10 @@ static inline void AM_drawWalls(void)
else
{
if
(
lines
[
i
].
flags
&
ML_NOCLIMB
)
{
#ifdef ESLOPE
if
(
backf1
!=
frontf1
||
backf2
!=
frontf2
)
{
#else
if
(
lines
[
i
].
backsector
->
floorheight
!=
lines
[
i
].
frontsector
->
floorheight
)
{
#endif
AM_drawMline
(
&
l
,
NOCLIMBFDWALLCOLORS
);
// floor level change
}
#ifdef ESLOPE
else
if
(
backc1
!=
frontc1
||
backc2
!=
frontc2
)
{
#else
else
if
(
lines
[
i
].
backsector
->
ceilingheight
!=
lines
[
i
].
frontsector
->
ceilingheight
)
{
#endif
AM_drawMline
(
&
l
,
NOCLIMBCDWALLCOLORS
);
// ceiling level change
}
else
...
...
@@ -1006,20 +985,10 @@ static inline void AM_drawWalls(void)
}
else
{
#ifdef ESLOPE
if
(
backf1
!=
frontf1
||
backf2
!=
frontf2
)
{
#else
if
(
lines
[
i
].
backsector
->
floorheight
!=
lines
[
i
].
frontsector
->
floorheight
)
{
#endif
AM_drawMline
(
&
l
,
FDWALLCOLORS
);
// floor level change
}
#ifdef ESLOPE
else
if
(
backc1
!=
frontc1
||
backc2
!=
frontc2
)
{
#else
else
if
(
lines
[
i
].
backsector
->
ceilingheight
!=
lines
[
i
].
frontsector
->
ceilingheight
)
{
#endif
AM_drawMline
(
&
l
,
CDWALLCOLORS
);
// ceiling level change
}
else
...
...
src/dehacked.c
View file @
892a8dd6
...
...
@@ -9678,11 +9678,10 @@ struct {
// Node flags
{
"NF_SUBSECTOR"
,
NF_SUBSECTOR
},
// Indicate a leaf.
#endif
#ifdef ESLOPE
// Slope flags
{
"SL_NOPHYSICS"
,
SL_NOPHYSICS
},
{
"SL_DYNAMIC"
,
SL_DYNAMIC
},
#endif
// Angles
{
"ANG1"
,
ANG1
},
...
...
src/doomdef.h
View file @
892a8dd6
...
...
@@ -562,14 +562,9 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
// None of these that are disabled in the normal build are guaranteed to work perfectly
// Compile them at your own risk!
/// Kalaron/Eternity Engine slope code (SRB2CB ported)
#define ESLOPE
#ifdef ESLOPE
/// Backwards compatibility with SRB2CB's slope linedef types.
/// \note A simple shim that prints a warning.
#define ESLOPE_TYPESHIM
#endif
/// Allows the use of devmode in multiplayer. AKA "fishcake"
//#define NETGAME_DEVMODE
...
...
src/hardware/hw_main.c
View file @
892a8dd6
This diff is collapsed.
Click to expand it.
src/hardware/hw_trick.c
View file @
892a8dd6
...
...
@@ -610,10 +610,8 @@ static boolean isCeilingFloating(sector_t *thisSector)
if
(
!
adjSector
)
// assume floating sectors have surrounding sectors
return
false
;
#ifdef ESLOPE
if
(
adjSector
->
c_slope
)
// Don't bother with slopes
return
false
;
#endif
if
(
!
refSector
)
{
...
...
@@ -663,10 +661,8 @@ static boolean isFloorFloating(sector_t *thisSector)
if
(
!
adjSector
)
// assume floating sectors have surrounding sectors
return
false
;
#ifdef ESLOPE
if
(
adjSector
->
f_slope
)
// Don't bother with slopes
return
false
;
#endif
if
(
!
refSector
)
{
...
...
src/lua_baselib.c
View file @
892a8dd6
...
...
@@ -14,9 +14,7 @@
#include "fastcmp.h"
#include "p_local.h"
#include "p_setup.h" // So we can have P_SetupLevelSky
#ifdef ESLOPE
#include "p_slopes.h" // P_GetZAt
#endif
#include "z_zone.h"
#include "r_main.h"
#include "r_draw.h"
...
...
@@ -2175,7 +2173,6 @@ static int lib_evStartCrumble(lua_State *L)
return
0
;
}
#ifdef ESLOPE
// P_SLOPES
////////////
...
...
@@ -2191,7 +2188,6 @@ static int lib_pGetZAt(lua_State *L)
lua_pushfixed
(
L
,
P_GetZAt
(
slope
,
x
,
y
));
return
1
;
}
#endif
// R_DEFS
////////////
...
...
@@ -3222,10 +3218,8 @@ static luaL_Reg lib[] = {
{
"EV_CrumbleChain"
,
lib_evCrumbleChain
},
{
"EV_StartCrumble"
,
lib_evStartCrumble
},
#ifdef ESLOPE
// p_slopes
{
"P_GetZAt"
,
lib_pGetZAt
},
#endif
// r_defs
{
"R_PointToAngle"
,
lib_rPointToAngle
},
...
...
src/lua_libs.h
View file @
892a8dd6
...
...
@@ -43,11 +43,9 @@ extern lua_State *gL;
#define META_SEG "SEG_T*"
#define META_NODE "NODE_T*"
#endif
#ifdef ESLOPE
#define META_SLOPE "PSLOPE_T*"
#define META_VECTOR2 "VECTOR2_T"
#define META_VECTOR3 "VECTOR3_T"
#endif
#define META_MAPHEADER "MAPHEADER_T*"
#define META_CVAR "CONSVAR_T*"
...
...
src/lua_maplib.c
View file @
892a8dd6
...
...
@@ -15,9 +15,7 @@
#include "p_local.h"
#include "p_setup.h"
#include "z_zone.h"
#ifdef ESLOPE
#include "p_slopes.h"
#endif
#include "r_main.h"
#include "lua_script.h"
...
...
@@ -41,13 +39,9 @@ enum sector_e {
sector_heightsec
,
sector_camsec
,
sector_lines
,
#ifdef ESLOPE
sector_ffloors
,
sector_fslope
,
sector_cslope
#else
sector_ffloors
#endif
};
static
const
char
*
const
sector_opt
[]
=
{
...
...
@@ -64,10 +58,8 @@ static const char *const sector_opt[] = {
"camsec"
,
"lines"
,
"ffloors"
,
#ifdef ESLOPE
"f_slope"
,
"c_slope"
,
#endif
NULL
};
enum
subsector_e
{
...
...
@@ -180,10 +172,8 @@ enum ffloor_e {
ffloor_toplightlevel
,
ffloor_bottomheight
,
ffloor_bottompic
,
#ifdef ESLOPE
ffloor_tslope
,
ffloor_bslope
,
#endif
ffloor_sector
,
ffloor_flags
,
ffloor_master
,
...
...
@@ -200,10 +190,8 @@ static const char *const ffloor_opt[] = {
"toplightlevel"
,
"bottomheight"
,
"bottompic"
,
#ifdef ESLOPE
"t_slope"
,
"b_slope"
,
#endif
"sector"
,
// secnum pushed as control sector userdata
"flags"
,
"master"
,
// control linedef
...
...
@@ -289,7 +277,6 @@ static const char *const bbox_opt[] = {
"right"
,
NULL
};
#ifdef ESLOPE
enum
slope_e
{
slope_valid
=
0
,
slope_o
,
...
...
@@ -324,7 +311,6 @@ static const char *const vector_opt[] = {
"y"
,
"z"
,
NULL
};
#endif
static
const
char
*
const
array_opt
[]
=
{
"iterate"
,
NULL
};
static
const
char
*
const
valid_opt
[]
=
{
"valid"
,
NULL
};
...
...
@@ -570,14 +556,12 @@ static int sector_get(lua_State *L)
LUA_PushUserdata
(
L
,
sector
->
ffloors
,
META_FFLOOR
);
lua_pushcclosure
(
L
,
sector_iterate
,
2
);
// push lib_iterateFFloors and sector->ffloors as upvalues for the function
return
1
;
#ifdef ESLOPE
case
sector_fslope
:
// f_slope
LUA_PushUserdata
(
L
,
sector
->
f_slope
,
META_SLOPE
);
return
1
;
case
sector_cslope
:
// c_slope
LUA_PushUserdata
(
L
,
sector
->
c_slope
,
META_SLOPE
);
return
1
;
#endif
}
return
0
;
}
...
...
@@ -601,10 +585,8 @@ static int sector_set(lua_State *L)
case
sector_camsec
:
// camsec
case
sector_lines
:
// lines
case
sector_ffloors
:
// ffloors
#ifdef ESLOPE
case
sector_fslope
:
// f_slope
case
sector_cslope
:
// c_slope
#endif
default:
return
luaL_error
(
L
,
"sector_t field "
LUA_QS
" cannot be set."
,
sector_opt
[
field
]);
case
sector_floorheight
:
{
// floorheight
...
...
@@ -1692,14 +1674,12 @@ static int ffloor_get(lua_State *L)
lua_pushlstring
(
L
,
levelflat
->
name
,
i
);
return
1
;
}
#ifdef ESLOPE
case
ffloor_tslope
:
LUA_PushUserdata
(
L
,
*
ffloor
->
t_slope
,
META_SLOPE
);
return
1
;
case
ffloor_bslope
:
LUA_PushUserdata
(
L
,
*
ffloor
->
b_slope
,
META_SLOPE
);
return
1
;
#endif
case
ffloor_sector
:
LUA_PushUserdata
(
L
,
&
sectors
[
ffloor
->
secnum
],
META_SECTOR
);
return
1
;
...
...
@@ -1739,10 +1719,8 @@ static int ffloor_set(lua_State *L)
switch
(
field
)
{
case
ffloor_valid
:
// valid
#ifdef ESLOPE
case
ffloor_tslope
:
// t_slope
case
ffloor_bslope
:
// b_slope
#endif
case
ffloor_sector
:
// sector
case
ffloor_master
:
// master
case
ffloor_target
:
// target
...
...
@@ -1803,7 +1781,6 @@ static int ffloor_set(lua_State *L)
return
0
;
}
#ifdef ESLOPE
//////////////
// pslope_t //
//////////////
...
...
@@ -1976,7 +1953,6 @@ static int vector3_get(lua_State *L)
return
0
;
}
#endif
/////////////////////
// mapheaderinfo[] //
...
...
@@ -2225,7 +2201,6 @@ int LUA_MapLib(lua_State *L)
lua_setfield
(
L
,
-
2
,
"__index"
);
lua_pop
(
L
,
1
);
#ifdef ESLOPE
luaL_newmetatable
(
L
,
META_SLOPE
);
lua_pushcfunction
(
L
,
slope_get
);
lua_setfield
(
L
,
-
2
,
"__index"
);
...
...
@@ -2243,7 +2218,6 @@ int LUA_MapLib(lua_State *L)
lua_pushcfunction
(
L
,
vector3_get
);
lua_setfield
(
L
,
-
2
,
"__index"
);
lua_pop
(
L
,
1
);
#endif
luaL_newmetatable
(
L
,
META_MAPHEADER
);
lua_pushcfunction
(
L
,
mapheaderinfo_get
);
...
...
src/lua_mobjlib.c
View file @
892a8dd6
...
...
@@ -84,9 +84,7 @@ enum mobj_e {
mobj_extravalue2
,
mobj_cusval
,
mobj_cvmem
,
#ifdef ESLOPE
mobj_standingslope
,
#endif
mobj_colorized
,
mobj_shadowscale
};
...
...
@@ -152,9 +150,7 @@ static const char *const mobj_opt[] = {
"extravalue2"
,
"cusval"
,
"cvmem"
,
#ifdef ESLOPE
"standingslope"
,
#endif
"colorized"
,
"shadowscale"
,
NULL
};
...
...
@@ -383,11 +379,9 @@ static int mobj_get(lua_State *L)
case
mobj_cvmem
:
lua_pushinteger
(
L
,
mo
->
cvmem
);
break
;
#ifdef ESLOPE
case
mobj_standingslope
:
LUA_PushUserdata
(
L
,
mo
->
standingslope
,
META_SLOPE
);
break
;
#endif
case
mobj_colorized
:
lua_pushboolean
(
L
,
mo
->
colorized
);
break
;
...
...
@@ -716,10 +710,8 @@ static int mobj_set(lua_State *L)
case
mobj_cvmem
:
mo
->
cvmem
=
luaL_checkinteger
(
L
,
3
);
break
;
#ifdef ESLOPE
case
mobj_standingslope
:
return
NOSET
;
#endif
case
mobj_colorized
:
mo
->
colorized
=
luaL_checkboolean
(
L
,
3
);
break
;
...
...
src/lua_script.c
View file @
892a8dd6
...
...
@@ -23,9 +23,7 @@
#include "byteptr.h"
#include "p_saveg.h"
#include "p_local.h"
#ifdef ESLOPE
#include "p_slopes.h" // for P_SlopeById
#endif
#ifdef LUA_ALLOW_BYTECODE
#include "d_netfil.h" // for LUA_DumpFile
#endif
...
...
@@ -731,9 +729,7 @@ enum
ARCH_NODE
,
#endif
ARCH_FFLOOR
,
#ifdef ESLOPE
ARCH_SLOPE
,
#endif
ARCH_MAPHEADER
,
ARCH_TEND
=
0xFF
,
...
...
@@ -758,9 +754,7 @@ static const struct {
{
META_NODE
,
ARCH_NODE
},
#endif
{
META_FFLOOR
,
ARCH_FFLOOR
},
#ifdef ESLOPE
{
META_SLOPE
,
ARCH_SLOPE
},
#endif
{
META_MAPHEADER
,
ARCH_MAPHEADER
},
{
NULL
,
ARCH_NULL
}
};
...
...
@@ -1015,7 +1009,6 @@ static UINT8 ArchiveValue(int TABLESINDEX, int myindex)
}
break
;
}
#ifdef ESLOPE
case
ARCH_SLOPE
:
{
pslope_t
*
slope
=
*
((
pslope_t
**
)
lua_touserdata
(
gL
,
myindex
));
...
...
@@ -1027,7 +1020,6 @@ static UINT8 ArchiveValue(int TABLESINDEX, int myindex)
}
break
;
}
#endif
case
ARCH_MAPHEADER
:
{
mapheader_t
*
header
=
*
((
mapheader_t
**
)
lua_touserdata
(
gL
,
myindex
));
...
...
@@ -1249,11 +1241,9 @@ static UINT8 UnArchiveValue(int TABLESINDEX)
LUA_PushUserdata
(
gL
,
rover
,
META_FFLOOR
);
break
;
}
#ifdef ESLOPE
case
ARCH_SLOPE
:
LUA_PushUserdata
(
gL
,
P_SlopeById
(
READUINT16
(
save_p
)),
META_SLOPE
);
break
;
#endif
case
ARCH_MAPHEADER
:
LUA_PushUserdata
(
gL
,
mapheaderinfo
[
READUINT16
(
save_p
)],
META_MAPHEADER
);
break
;
...
...
src/m_cheat.c
View file @
892a8dd6
...
...
@@ -1025,13 +1025,9 @@ static boolean OP_HeightOkay(player_t *player, UINT8 ceiling)
if
(
ceiling
)
{
#ifdef ESLOPE
// Truncate position to match where mapthing would be when spawned
// (this applies to every further P_GetZAt call as well)
fixed_t
cheight
=
sec
->
c_slope
?
P_GetZAt
(
sec
->
c_slope
,
player
->
mo
->
x
&
0xFFFF0000
,
player
->
mo
->
y
&
0xFFFF0000
)
:
sec
->
ceilingheight
;
#else
fixed_t
cheight
=
sec
->
ceilingheight
;
#endif
if
(((
cheight
-
player
->
mo
->
z
-
player
->
mo
->
height
)
>>
FRACBITS
)
>=
(
1
<<
(
16
-
ZSHIFT
)))
{
...
...
@@ -1042,11 +1038,7 @@ static boolean OP_HeightOkay(player_t *player, UINT8 ceiling)
}
else
{
#ifdef ESLOPE
fixed_t
fheight
=
sec
->
f_slope
?
P_GetZAt
(
sec
->
f_slope
,
player
->
mo
->
x
&
0xFFFF0000
,
player
->
mo
->
y
&
0xFFFF0000
)
:
sec
->
floorheight
;
#else
fixed_t
fheight
=
sec
->
floorheight
;
#endif
if
(((
player
->
mo
->
z
-
fheight
)
>>
FRACBITS
)
>=
(
1
<<
(
16
-
ZSHIFT
)))
{
CONS_Printf
(
M_GetText
(
"Sorry, you're too %s to place this object (max: %d %s).
\n
"
),
M_GetText
(
"high"
),
...
...
@@ -1093,20 +1085,12 @@ static mapthing_t *OP_CreateNewMapThing(player_t *player, UINT16 type, boolean c
mt
->
y
=
(
INT16
)(
player
->
mo
->
y
>>
FRACBITS
);
if
(
ceiling
)
{
#ifdef ESLOPE
fixed_t
cheight
=
sec
->
c_slope
?
P_GetZAt
(
sec
->
c_slope
,
mt
->
x
<<
FRACBITS
,
mt
->
y
<<
FRACBITS
)
:
sec
->
ceilingheight
;
#else
fixed_t
cheight
=
sec
->
ceilingheight
;
#endif
mt
->
z
=
(
UINT16
)((
cheight
-
player
->
mo
->
z
-
player
->
mo
->
height
)
>>
FRACBITS
);
}
else
{
#ifdef ESLOPE
fixed_t
fheight
=
sec
->
f_slope
?
P_GetZAt
(
sec
->
f_slope
,
mt
->
x
<<
FRACBITS
,
mt
->
y
<<
FRACBITS
)
:
sec
->
floorheight
;
#else
fixed_t
fheight
=
sec
->
floorheight
;
#endif
mt
->
z
=
(
UINT16
)((
player
->
mo
->
z
-
fheight
)
>>
FRACBITS
);
}
mt
->
angle
=
(
INT16
)(
FixedInt
(
AngleFixed
(
player
->
mo
->
angle
)));
...
...
@@ -1352,20 +1336,12 @@ void OP_ObjectplaceMovement(player_t *player)
if
(
!!
(
mobjinfo
[
op_currentthing
].
flags
&
MF_SPAWNCEILING
)
^
!!
(
cv_opflags
.
value
&
MTF_OBJECTFLIP
))
{
#ifdef ESLOPE
fixed_t
cheight
=
sec
->
c_slope
?
P_GetZAt
(
sec
->
c_slope
,
player
->
mo
->
x
&
0xFFFF0000
,
player
->
mo
->
y
&
0xFFFF0000
)
:
sec
->
ceilingheight
;
#else
fixed_t
cheight
=
sec
->
ceilingheight
;
#endif
op_displayflags
=
(
UINT16
)((
cheight
-
player
->
mo
->
z
-
mobjinfo
[
op_currentthing
].
height
)
>>
FRACBITS
);
}
else
{
#ifdef ESLOPE
fixed_t
fheight
=
sec
->
f_slope
?
P_GetZAt
(
sec
->
f_slope
,
player
->
mo
->
x
&
0xFFFF0000
,
player
->
mo
->
y
&
0xFFFF0000
)
:
sec
->
floorheight
;
#else
fixed_t
fheight
=
sec
->
floorheight
;
#endif
op_displayflags
=
(
UINT16
)((
player
->
mo
->
z
-
fheight
)
>>
FRACBITS
);
}
op_displayflags
<<=
ZSHIFT
;
...
...
src/p_enemy.c
View file @
892a8dd6
...
...
@@ -6764,13 +6764,8 @@ void A_MixUp(mobj_t *actor)
P_SetThingPosition
(
players
[
i
].
mo
);
#ifdef ESLOPE
players
[
i
].
mo
->
floorz
=
P_GetFloorZ
(
players
[
i
].
mo
,
players
[
i
].
mo
->
subsector
->
sector
,
players
[
i
].
mo
->
x
,
players
[
i
].
mo
->
y
,
NULL
);
players
[
i
].
mo
->
ceilingz
=
P_GetCeilingZ
(
players
[
i
].
mo
,
players
[
i
].
mo
->
subsector
->
sector
,
players
[
i
].
mo
->
x
,
players
[
i
].
mo
->
y
,
NULL
);
#else
players
[
i
].
mo
->
floorz
=
players
[
i
].
mo
->
subsector
->
sector
->
floorheight
;
players
[
i
].
mo
->
ceilingz
=
players
[
i
].
mo
->
subsector
->
sector
->
ceilingheight
;
#endif
P_CheckPosition
(
players
[
i
].
mo
,
players
[
i
].
mo
->
x
,
players
[
i
].
mo
->
y
);
}
...
...
src/p_floor.c
View file @
892a8dd6
...
...
@@ -15,9 +15,7 @@
#include "doomstat.h"
#include "m_random.h"
#include "p_local.h"
#ifdef ESLOPE
#include "p_slopes.h"
#endif
#include "r_state.h"
#include "s_sound.h"
#include "z_zone.h"
...
...
@@ -3178,12 +3176,10 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
if
(
R_PointInSubsector
(
a
,
b
)
->
sector
==
sec
)
{
mobj_t
*
spawned
=
NULL
;
#ifdef ESLOPE
if
(
*
rover
->
t_slope
)
topz
=
P_GetZAt
(
*
rover
->
t_slope
,
a
,
b
)
-
(
spacing
>>
1
);
if
(
*
rover
->
b_slope
)
bottomz
=
P_GetZAt
(
*
rover
->
b_slope
,
a
,
b
);
#endif
for
(
c
=
topz
;
c
>
bottomz
;
c
-=
spacing
)
{
...
...
src/p_local.h
View file @
892a8dd6
...
...
@@ -66,9 +66,7 @@ typedef enum
THINK_POLYOBJ
,
THINK_MAIN
,
THINK_MOBJ
,
#ifdef ESLOPE
THINK_DYNSLOPE
,
#endif
THINK_PRECIP
,
NUM_THINKERLISTS
}
thinklistnum_t
;
/**< Thinker lists. */
...
...
@@ -383,9 +381,7 @@ extern mobj_t *tmfloorthing, *tmhitthing, *tmthing;
extern
camera_t
*
mapcampointer
;
extern
fixed_t
tmx
;
extern
fixed_t
tmy
;
#ifdef ESLOPE
extern
pslope_t
*
tmfloorslope
,
*
tmceilingslope
;
#endif
/* cphipps 2004/08/30 */
extern
void
P_MapStart
(
void
);
...
...
src/p_map.c
View file @
892a8dd6
This diff is collapsed.
Click to expand it.
src/p_maputl.c
View file @
892a8dd6
...
...
@@ -277,9 +277,7 @@ fixed_t P_InterceptVector(divline_t *v2, divline_t *v1)
// OPTIMIZE: keep this precalculated
//
fixed_t
opentop
,
openbottom
,
openrange
,
lowfloor
,
highceiling
;
#ifdef ESLOPE
pslope_t
*
opentopslope
,
*
openbottomslope
;
#endif
ffloor_t
*
openfloorrover
,
*
openceilingrover
;
// P_CameraLineOpening
...
...
@@ -307,24 +305,20 @@ void P_CameraLineOpening(line_t *linedef)
{
frontfloor
=
sectors
[
front
->
camsec
].
floorheight
;
frontceiling
=
sectors
[
front
->
camsec
].
ceilingheight
;
#ifdef ESLOPE
if
(
sectors
[
front
->
camsec
].
f_slope
)
// SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope)
frontfloor
=
P_GetZAt
(
sectors
[
front
->
camsec
].
f_slope
,
camera
.
x
,
camera
.
y
);
if
(
sectors
[
front
->
camsec
].
c_slope
)
frontceiling
=
P_GetZAt
(
sectors
[
front
->
camsec
].
c_slope
,
camera
.
x
,
camera
.
y
);
#endif
}
else
if
(
front
->
heightsec
>=
0
)
{
frontfloor
=
sectors
[
front
->
heightsec
].
floorheight
;
frontceiling
=
sectors
[
front
->
heightsec
].
ceilingheight
;
#ifdef ESLOPE
if
(
sectors
[
front
->
heightsec
].
f_slope
)
// SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope)
frontfloor
=
P_GetZAt
(
sectors
[
front
->
heightsec
].
f_slope
,
camera
.
x
,
camera
.
y
);
if
(
sectors
[
front
->
heightsec
].
c_slope
)
frontceiling
=
P_GetZAt
(
sectors
[
front
->
heightsec
].
c_slope
,
camera
.
x
,
camera
.
y
);
#endif
}
else
{
...
...
@@ -335,23 +329,19 @@ void P_CameraLineOpening(line_t *linedef)
{
backfloor
=
sectors
[
back
->
camsec
].
floorheight
;
backceiling
=
sectors
[
back
->
camsec
].
ceilingheight
;
#ifdef ESLOPE
if
(
sectors
[
back
->
camsec
].
f_slope
)
// SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope)
frontfloor
=
P_GetZAt
(
sectors
[
back
->
camsec
].
f_slope
,
camera
.
x
,
camera
.
y
);
if
(
sectors
[
back
->
camsec
].
c_slope
)
frontceiling
=
P_GetZAt
(
sectors
[
back
->
camsec
].
c_slope
,
camera
.
x
,
camera
.
y
);
#endif
}
else
if
(
back
->
heightsec
>=
0
)
{
backfloor
=
sectors
[
back
->
heightsec
].
floorheight
;
backceiling
=
sectors
[
back
->
heightsec
].
ceilingheight
;
#ifdef ESLOPE
if
(
sectors
[
back
->
heightsec
].
f_slope
)
// SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope)
frontfloor
=
P_GetZAt
(
sectors
[
back
->
heightsec
].
f_slope
,
camera
.
x
,
camera
.
y
);
if
(
sectors
[
back
->
heightsec
].
c_slope
)
frontceiling
=
P_GetZAt
(
sectors
[
back
->
heightsec
].
c_slope
,
camera
.
x
,
camera
.
y
);
#endif
}
else
{
...
...
@@ -469,9 +459,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
openbottom
=
INT32_MIN
;
highceiling
=
INT32_MIN
;
lowfloor
=
INT32_MAX
;
#ifdef ESLOPE
opentopslope
=
openbottomslope
=
NULL
;
#endif
}
else
#endif
...
...
@@ -485,17 +473,13 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
{
opentop
=
frontheight
;
highceiling
=
backheight
;
#ifdef ESLOPE
opentopslope
=
front
->
c_slope
;
#endif
}
else
{
opentop
=
backheight
;
highceiling
=
frontheight
;
#ifdef ESLOPE
opentopslope
=
back
->
c_slope
;
#endif
}
frontheight
=
P_GetFloorZ
(
mobj
,
front
,
tmx
,
tmy
,
linedef
);
...
...
@@ -505,17 +489,13 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
{
openbottom
=
frontheight
;
lowfloor
=
backheight
;
#ifdef ESLOPE
openbottomslope
=
front
->
f_slope
;
#endif
}
else
{
openbottom
=
backheight
;
lowfloor
=
frontheight
;
#ifdef ESLOPE
openbottomslope
=
back
->
f_slope
;
#endif
}
}
...
...
@@ -647,9 +627,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
{
if
(
bottomheight
<
opentop
)
{
opentop
=
bottomheight
;
#ifdef ESLOPE
opentopslope
=
*
rover
->
b_slope
;
#endif
openceilingrover
=
rover
;
}
else
if
(
bottomheight
<
highceiling
)
...
...
@@ -660,9 +638,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
{
if
(
topheight
>
openbottom
)
{
openbottom
=
topheight
;
#ifdef ESLOPE
openbottomslope
=
*
rover
->
t_slope
;
#endif
openfloorrover
=
rover
;
}
else
if
(
topheight
>
lowfloor
)
...
...
@@ -693,9 +669,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
{
if
(
bottomheight
<
opentop
)
{
opentop
=
bottomheight
;
#ifdef ESLOPE
opentopslope
=
*
rover
->
b_slope
;
#endif
openceilingrover
=
rover
;
}
else
if
(
bottomheight
<
highceiling
)
...
...
@@ -706,9 +680,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
{
if
(
topheight
>
openbottom
)
{
openbottom
=
topheight
;
#ifdef ESLOPE
openbottomslope
=
*
rover
->
t_slope
;
#endif
openfloorrover
=
rover
;
}
else
if
(
topheight
>
lowfloor
)
...
...
src/p_maputl.h
View file @
892a8dd6
...
...
@@ -55,9 +55,7 @@ void P_CreatePrecipSecNodeList(precipmobj_t *thing, fixed_t x,fixed_t y);
boolean
P_SceneryTryMove
(
mobj_t
*
thing
,
fixed_t
x
,
fixed_t
y
);
extern
fixed_t
opentop
,
openbottom
,
openrange
,
lowfloor
,
highceiling
;
#ifdef ESLOPE
extern
pslope_t
*
opentopslope
,
*
openbottomslope
;
#endif
extern
ffloor_t
*
openfloorrover
,
*
openceilingrover
;
void
P_LineOpening
(
line_t
*
plinedef
,
mobj_t
*
mobj
);
...
...
src/p_mobj.c
View file @
892a8dd6
This diff is collapsed.
Click to expand it.
src/p_mobj.h
View file @
892a8dd6
...
...
@@ -370,9 +370,7 @@ typedef struct mobj_s
INT32
cusval
;
INT32
cvmem
;
#ifdef ESLOPE
struct
pslope_s
*
standingslope
;
// The slope that the object is standing on (shouldn't need synced in savegames, right?)
#endif
boolean
colorized
;
// Whether the mobj uses the rainbow colormap
fixed_t
shadowscale
;
// If this object casts a shadow, and the size relative to radius
...
...
src/p_saveg.c
View file @
892a8dd6
...
...
@@ -31,9 +31,7 @@
#include "r_sky.h"
#include "p_polyobj.h"
#include "lua_script.h"
#ifdef ESLOPE
#include "p_slopes.h"
#endif
savedata_t
savedata
;
UINT8
*
save_p
;
...
...
@@ -1252,9 +1250,7 @@ typedef enum
MD2_HPREV
=
1
<<
8
,
MD2_FLOORROVER
=
1
<<
9
,