mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-19 10:30:46 +00:00
- rewrote p_local.h so that it doesn't pull in the entire bunch of headers.
This was to resolve some circular dependencies with the portal code. The most notable changees: * FTextureID was moved from textures.h to doomtype.h because it is frequently needed in files that don't want to do anything with actual textures. * split off the parts from p_maputl into a separate header. * consolidated all blockmap related data into p_blockmap.h * split off the polyobject parts into po_man.h
This commit is contained in:
parent
405db83393
commit
6adb069506
72 changed files with 503 additions and 314 deletions
.gitignore
src
actor.ham_map.cppb_bot.cppb_func.cppb_game.cppb_move.cppb_think.cppbasictypes.hc_cmds.cppd_net.cppdobjgc.cppdoomtype.hdsectoreffect.cppdthinker.cpp
fragglescript
g_doom
g_game.cppg_heretic
g_hexen
g_level.cppg_raven
g_shared
a_artifacts.cppa_fastprojectile.cppa_morph.cppa_pickups.cppa_quake.cppa_randomspawner.cppa_specialspot.cppshared_hud.cpp
info.cppm_bbox.cppm_cheat.cppp_3dfloors.cppp_3dmidtex.cppp_acs.cppp_blockmap.hp_doors.cppp_effect.cppp_enemy.cppp_glnodes.cppp_interaction.cppp_lights.cppp_lnspec.cppp_local.hp_map.cppp_maputl.cppp_maputl.hp_mobj.cppp_saveg.cppp_setup.cppp_sight.cppp_slopes.cppp_spec.cppp_switch.cppp_teleport.cppp_things.cppp_tick.cppp_trace.cppp_user.cppp_writemap.cpppo_man.cpppo_man.hportal.cppr_defs.hr_things.cppr_utility.cpps_sndseq.cpps_sound.cpptextures
thingdef
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -41,3 +41,5 @@
|
||||||
/lzma/x64/
|
/lzma/x64/
|
||||||
/zlib/x64/
|
/zlib/x64/
|
||||||
/build_vc2015
|
/build_vc2015
|
||||||
|
/build_vc2015-32
|
||||||
|
/build_vc2015-64
|
||||||
|
|
27
src/actor.h
27
src/actor.h
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
struct subsector_t;
|
struct subsector_t;
|
||||||
class PClassAmmo;
|
class PClassAmmo;
|
||||||
|
struct FBlockNode;
|
||||||
|
|
||||||
//
|
//
|
||||||
// NOTES: AActor
|
// NOTES: AActor
|
||||||
|
@ -530,21 +531,6 @@ enum EThingSpecialActivationType
|
||||||
THINGSPEC_Switch = 1<<10, // The thing is alternatively activated and deactivated when triggered
|
THINGSPEC_Switch = 1<<10, // The thing is alternatively activated and deactivated when triggered
|
||||||
};
|
};
|
||||||
|
|
||||||
// [RH] Like msecnode_t, but for the blockmap
|
|
||||||
struct FBlockNode
|
|
||||||
{
|
|
||||||
AActor *Me; // actor this node references
|
|
||||||
int BlockIndex; // index into blocklinks for the block this node is in
|
|
||||||
FBlockNode **PrevActor; // previous actor in this block
|
|
||||||
FBlockNode *NextActor; // next actor in this block
|
|
||||||
FBlockNode **PrevBlock; // previous block this actor is in
|
|
||||||
FBlockNode *NextBlock; // next block this actor is in
|
|
||||||
|
|
||||||
static FBlockNode *Create (AActor *who, int x, int y);
|
|
||||||
void Release ();
|
|
||||||
|
|
||||||
static FBlockNode *FreeBlocks;
|
|
||||||
};
|
|
||||||
|
|
||||||
class FDecalBase;
|
class FDecalBase;
|
||||||
class AInventory;
|
class AInventory;
|
||||||
|
@ -569,16 +555,6 @@ struct line_t;
|
||||||
struct secplane_t;
|
struct secplane_t;
|
||||||
struct FStrifeDialogueNode;
|
struct FStrifeDialogueNode;
|
||||||
|
|
||||||
struct fixedvec3
|
|
||||||
{
|
|
||||||
fixed_t x, y, z;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct fixedvec2
|
|
||||||
{
|
|
||||||
fixed_t x, y;
|
|
||||||
};
|
|
||||||
|
|
||||||
class DDropItem : public DObject
|
class DDropItem : public DObject
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(DDropItem, DObject)
|
DECLARE_CLASS(DDropItem, DObject)
|
||||||
|
@ -1407,6 +1383,7 @@ inline fixedvec3 PosRelative(const fixedvec3 &pos, line_t *line, sector_t *refse
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintMiscActorInfo(AActor * query);
|
void PrintMiscActorInfo(AActor * query);
|
||||||
|
AActor *P_LinePickActor(AActor *t1, angle_t angle, fixed_t distance, int pitch, ActorFlags actorMask, DWORD wallMask);
|
||||||
|
|
||||||
#define S_FREETARGMOBJ 1
|
#define S_FREETARGMOBJ 1
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,8 @@
|
||||||
#include "r_renderer.h"
|
#include "r_renderer.h"
|
||||||
#include "r_sky.h"
|
#include "r_sky.h"
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
|
|
||||||
#include "m_cheat.h"
|
#include "m_cheat.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
|
@ -58,6 +60,7 @@
|
||||||
// State.
|
// State.
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "r_state.h"
|
#include "r_state.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
|
||||||
// Data.
|
// Data.
|
||||||
#include "gstrings.h"
|
#include "gstrings.h"
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "teaminfo.h"
|
#include "teaminfo.h"
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
IMPLEMENT_POINTY_CLASS(DBot)
|
IMPLEMENT_POINTY_CLASS(DBot)
|
||||||
DECLARE_POINTER(dest)
|
DECLARE_POINTER(dest)
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
#include "b_bot.h"
|
#include "b_bot.h"
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
|
@ -20,6 +21,8 @@
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
static FRandom pr_botdofire ("BotDoFire");
|
static FRandom pr_botdofire ("BotDoFire");
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ Everything that is changed is marked (maybe commented) with "Added by MC"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
#include "d_netinf.h"
|
#include "d_netinf.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
static FRandom pr_botspawn ("BotSpawn");
|
static FRandom pr_botspawn ("BotSpawn");
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include "a_keys.h"
|
#include "a_keys.h"
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
#include "p_enemy.h"
|
#include "p_enemy.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
static FRandom pr_botopendoor ("BotOpenDoor");
|
static FRandom pr_botopendoor ("BotOpenDoor");
|
||||||
static FRandom pr_bottrywalk ("BotTryWalk");
|
static FRandom pr_bottrywalk ("BotTryWalk");
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "statnums.h"
|
#include "statnums.h"
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
static FRandom pr_botmove ("BotMove");
|
static FRandom pr_botmove ("BotMove");
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,17 @@ union QWORD_UNION
|
||||||
typedef SDWORD fixed_t;
|
typedef SDWORD fixed_t;
|
||||||
typedef DWORD dsfixed_t; // fixedpt used by span drawer
|
typedef DWORD dsfixed_t; // fixedpt used by span drawer
|
||||||
|
|
||||||
|
struct fixedvec3
|
||||||
|
{
|
||||||
|
fixed_t x, y, z;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fixedvec2
|
||||||
|
{
|
||||||
|
fixed_t x, y;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#define FIXED_MAX (signed)(0x7fffffff)
|
#define FIXED_MAX (signed)(0x7fffffff)
|
||||||
#define FIXED_MIN (signed)(0x80000000)
|
#define FIXED_MIN (signed)(0x80000000)
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,8 @@
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
#include "v_video.h"
|
#include "v_video.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "r_data/r_interpolate.h"
|
||||||
|
|
||||||
extern FILE *Logfile;
|
extern FILE *Logfile;
|
||||||
extern bool insave;
|
extern bool insave;
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
#include "v_video.h"
|
#include "v_video.h"
|
||||||
#include "p_spec.h"
|
#include "p_spec.h"
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
|
#include "r_utility.h"
|
||||||
#include "intermission/intermission.h"
|
#include "intermission/intermission.h"
|
||||||
|
|
||||||
EXTERN_CVAR (Int, disableautosave)
|
EXTERN_CVAR (Int, disableautosave)
|
||||||
|
|
|
@ -73,6 +73,8 @@
|
||||||
#include "po_man.h"
|
#include "po_man.h"
|
||||||
#include "autosegs.h"
|
#include "autosegs.h"
|
||||||
#include "v_video.h"
|
#include "v_video.h"
|
||||||
|
#include "textures.h"
|
||||||
|
#include "r_utility.h"
|
||||||
#include "menu/menu.h"
|
#include "menu/menu.h"
|
||||||
#include "intermission/intermission.h"
|
#include "intermission/intermission.h"
|
||||||
|
|
||||||
|
|
|
@ -197,6 +197,41 @@ struct PalEntry
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class FArchive;
|
||||||
|
class PClassInventory;
|
||||||
|
|
||||||
|
class FTextureID
|
||||||
|
{
|
||||||
|
friend class FTextureManager;
|
||||||
|
friend FArchive &operator<< (FArchive &arc, FTextureID &tex);
|
||||||
|
friend FTextureID GetHUDIcon(PClassInventory *cls);
|
||||||
|
friend void R_InitSpriteDefs();
|
||||||
|
|
||||||
|
public:
|
||||||
|
FTextureID() throw() {}
|
||||||
|
bool isNull() const { return texnum == 0; }
|
||||||
|
bool isValid() const { return texnum > 0; }
|
||||||
|
bool Exists() const { return texnum >= 0; }
|
||||||
|
void SetInvalid() { texnum = -1; }
|
||||||
|
void SetNull() { texnum = 0; }
|
||||||
|
bool operator ==(const FTextureID &other) const { return texnum == other.texnum; }
|
||||||
|
bool operator !=(const FTextureID &other) const { return texnum != other.texnum; }
|
||||||
|
FTextureID operator +(int offset) throw();
|
||||||
|
int GetIndex() const { return texnum; } // Use this only if you absolutely need the index!
|
||||||
|
|
||||||
|
// The switch list needs these to sort the switches by texture index
|
||||||
|
int operator -(FTextureID other) const { return texnum - other.texnum; }
|
||||||
|
bool operator < (FTextureID other) const { return texnum < other.texnum; }
|
||||||
|
bool operator > (FTextureID other) const { return texnum > other.texnum; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
FTextureID(int num) { texnum = num; }
|
||||||
|
private:
|
||||||
|
int texnum;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Screenshot buffer image data types
|
// Screenshot buffer image data types
|
||||||
enum ESSType
|
enum ESSType
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "r_data/r_interpolate.h"
|
#include "r_data/r_interpolate.h"
|
||||||
#include "statnums.h"
|
#include "statnums.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "doomstat.h"
|
||||||
|
|
||||||
IMPLEMENT_CLASS (DSectorEffect)
|
IMPLEMENT_CLASS (DSectorEffect)
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "doomerrors.h"
|
#include "doomerrors.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
|
|
||||||
static cycle_t ThinkCycles;
|
static cycle_t ThinkCycles;
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "sc_man.h"
|
#include "sc_man.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "r_renderer.h"
|
#include "r_renderer.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "actor.h"
|
#include "actor.h"
|
||||||
#include "info.h"
|
#include "info.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_spec.h"
|
||||||
#include "a_sharedglobal.h"
|
#include "a_sharedglobal.h"
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
|
@ -15,6 +16,9 @@
|
||||||
#include "m_bbox.h"
|
#include "m_bbox.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
#include "portal.h"
|
#include "portal.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "g_shared/a_pickups.h"
|
||||||
|
|
||||||
// Include all the other Doom stuff here to reduce compile time
|
// Include all the other Doom stuff here to reduce compile time
|
||||||
#include "a_arachnotron.cpp"
|
#include "a_arachnotron.cpp"
|
||||||
|
|
|
@ -80,6 +80,9 @@
|
||||||
#include "m_joy.h"
|
#include "m_joy.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
#include "r_renderer.h"
|
#include "r_renderer.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "a_morph.h"
|
||||||
|
#include "p_spec.h"
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
|
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
#include "r_data/r_translate.h"
|
#include "r_data/r_translate.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "a_morph.h"
|
||||||
|
|
||||||
// Include all the other Heretic stuff here to reduce compile time
|
// Include all the other Heretic stuff here to reduce compile time
|
||||||
#include "a_chicken.cpp"
|
#include "a_chicken.cpp"
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
#include "v_palette.h"
|
#include "v_palette.h"
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
// Include all the Hexen stuff here to reduce compile time
|
// Include all the Hexen stuff here to reduce compile time
|
||||||
#include "a_bats.cpp"
|
#include "a_bats.cpp"
|
||||||
|
|
|
@ -83,6 +83,8 @@
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
#include "r_renderer.h"
|
#include "r_renderer.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,14 @@
|
||||||
#include "a_artifacts.h"
|
#include "a_artifacts.h"
|
||||||
#include "gstrings.h"
|
#include "gstrings.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_spec.h"
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "a_morph.h"
|
||||||
|
|
||||||
static FRandom pr_tele ("TeleportSelf");
|
static FRandom pr_tele ("TeleportSelf");
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "a_pickups.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
#define MAULATORTICS (25*35)
|
#define MAULATORTICS (25*35)
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "v_palette.h"
|
#include "v_palette.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
|
|
||||||
static FRandom pr_torch ("Torch");
|
static FRandom pr_torch ("Torch");
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "r_sky.h"
|
#include "r_sky.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
|
#include "b_bot.h"
|
||||||
|
|
||||||
|
|
||||||
IMPLEMENT_CLASS(AFastProjectile)
|
IMPLEMENT_CLASS(AFastProjectile)
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
#include "p_enemy.h"
|
#include "p_enemy.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
static FRandom pr_morphmonst ("MorphMonster");
|
static FRandom pr_morphmonst ("MorphMonster");
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
static FRandom pr_restore ("RestorePos");
|
static FRandom pr_restore ("RestorePos");
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#include "a_sharedglobal.h"
|
#include "a_sharedglobal.h"
|
||||||
#include "statnums.h"
|
#include "statnums.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
|
||||||
static FRandom pr_quake ("Quake");
|
static FRandom pr_quake ("Quake");
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
#include "a_action.h"
|
#include "a_action.h"
|
||||||
#include "thingdef/thingdef.h"
|
#include "thingdef/thingdef.h"
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
|
#include "doomstat.h"
|
||||||
|
#include "doomdata.h"
|
||||||
|
|
||||||
#define MAX_RANDOMSPAWNERS_RECURSION 32 // Should be largely more than enough, honestly.
|
#define MAX_RANDOMSPAWNERS_RECURSION 32 // Should be largely more than enough, honestly.
|
||||||
static FRandom pr_randomspawn("RandomSpawn");
|
static FRandom pr_randomspawn("RandomSpawn");
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "thingdef/thingdef.h"
|
#include "thingdef/thingdef.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "a_pickups.h"
|
||||||
|
|
||||||
static FRandom pr_spot ("SpecialSpot");
|
static FRandom pr_spot ("SpecialSpot");
|
||||||
static FRandom pr_spawnmace ("SpawnMace");
|
static FRandom pr_spawnmace ("SpawnMace");
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "doomstat.h"
|
||||||
#include "info.h"
|
#include "info.h"
|
||||||
#include "m_fixed.h"
|
#include "m_fixed.h"
|
||||||
#include "c_dispatch.h"
|
#include "c_dispatch.h"
|
||||||
|
@ -51,6 +52,8 @@
|
||||||
#include "cmdlib.h"
|
#include "cmdlib.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
|
#include "thingdef.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
extern void LoadActors ();
|
extern void LoadActors ();
|
||||||
extern void InitBotStuff();
|
extern void InitBotStuff();
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include "m_bbox.h"
|
#include "m_bbox.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -46,6 +46,8 @@
|
||||||
#include "d_dehacked.h"
|
#include "d_dehacked.h"
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "a_morph.h"
|
||||||
|
|
||||||
// [RH] Actually handle the cheat. The cheat code in st_stuff.c now just
|
// [RH] Actually handle the cheat. The cheat code in st_stuff.c now just
|
||||||
// writes some bytes to the network data stream, and the network code
|
// writes some bytes to the network data stream, and the network code
|
||||||
|
|
|
@ -38,10 +38,14 @@
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
#include "sc_man.h"
|
#include "sc_man.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "p_terrain.h"
|
#include "p_terrain.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "p_spec.h"
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
#include "p_terrain.h"
|
#include "p_terrain.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "d_player.h"
|
||||||
#include "p_spec.h"
|
#include "p_spec.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
|
@ -79,6 +80,8 @@
|
||||||
#include "p_terrain.h"
|
#include "p_terrain.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "p_effect.h"
|
#include "p_effect.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "a_morph.h"
|
||||||
|
|
||||||
#include "g_shared/a_pickups.h"
|
#include "g_shared/a_pickups.h"
|
||||||
|
|
||||||
|
|
33
src/p_blockmap.h
Normal file
33
src/p_blockmap.h
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#ifndef __P_BLOCKMAP_H
|
||||||
|
#define __P_BLOCKMAP_H
|
||||||
|
|
||||||
|
#include "doomtype.h"
|
||||||
|
|
||||||
|
class AActor;
|
||||||
|
|
||||||
|
// [RH] Like msecnode_t, but for the blockmap
|
||||||
|
struct FBlockNode
|
||||||
|
{
|
||||||
|
AActor *Me; // actor this node references
|
||||||
|
int BlockIndex; // index into blocklinks for the block this node is in
|
||||||
|
FBlockNode **PrevActor; // previous actor in this block
|
||||||
|
FBlockNode *NextActor; // next actor in this block
|
||||||
|
FBlockNode **PrevBlock; // previous block this actor is in
|
||||||
|
FBlockNode *NextBlock; // next block this actor is in
|
||||||
|
|
||||||
|
static FBlockNode *Create (AActor *who, int x, int y);
|
||||||
|
void Release ();
|
||||||
|
|
||||||
|
static FBlockNode *FreeBlocks;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern int* blockmaplump; // offsets in blockmap are from here
|
||||||
|
|
||||||
|
extern int* blockmap;
|
||||||
|
extern int bmapwidth;
|
||||||
|
extern int bmapheight; // in mapblocks
|
||||||
|
extern fixed_t bmaporgx;
|
||||||
|
extern fixed_t bmaporgy; // origin of block map
|
||||||
|
extern FBlockNode** blocklinks; // for thing chains
|
||||||
|
|
||||||
|
#endif
|
|
@ -36,6 +36,8 @@
|
||||||
#include "sc_man.h"
|
#include "sc_man.h"
|
||||||
#include "cmdlib.h"
|
#include "cmdlib.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -51,6 +51,8 @@
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
#include "v_palette.h"
|
#include "v_palette.h"
|
||||||
#include "colormatcher.h"
|
#include "colormatcher.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
|
||||||
CVAR (Int, cl_rockettrails, 1, CVAR_ARCHIVE);
|
CVAR (Int, cl_rockettrails, 1, CVAR_ARCHIVE);
|
||||||
CVAR (Bool, r_rail_smartspiral, 0, CVAR_ARCHIVE);
|
CVAR (Bool, r_rail_smartspiral, 0, CVAR_ARCHIVE);
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "d_player.h"
|
||||||
#include "m_bbox.h"
|
#include "m_bbox.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
|
@ -44,8 +46,11 @@
|
||||||
#include "thingdef/thingdef.h"
|
#include "thingdef/thingdef.h"
|
||||||
#include "d_dehacked.h"
|
#include "d_dehacked.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
#include "r_data/r_translate.h"
|
#include "r_data/r_translate.h"
|
||||||
#include "teaminfo.h"
|
#include "teaminfo.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,8 @@
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
#include "m_misc.h"
|
#include "m_misc.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "cmdlib.h"
|
||||||
|
|
||||||
void P_GetPolySpots (MapData * lump, TArray<FNodeBuilder::FPolyStart> &spots, TArray<FNodeBuilder::FPolyStart> &anchors);
|
void P_GetPolySpots (MapData * lump, TArray<FNodeBuilder::FPolyStart> &spots, TArray<FNodeBuilder::FPolyStart> &anchors);
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
#include "d_netinf.h"
|
#include "d_netinf.h"
|
||||||
|
#include "a_morph.h"
|
||||||
|
|
||||||
static FRandom pr_obituary ("Obituary");
|
static FRandom pr_obituary ("Obituary");
|
||||||
static FRandom pr_botrespawn ("BotRespawn");
|
static FRandom pr_botrespawn ("BotRespawn");
|
||||||
|
|
|
@ -27,8 +27,10 @@
|
||||||
|
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
|
#include "doomstat.h"
|
||||||
|
|
||||||
// State.
|
// State.
|
||||||
#include "r_state.h"
|
#include "r_state.h"
|
||||||
|
|
|
@ -58,8 +58,12 @@
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
#include "gstrings.h"
|
#include "gstrings.h"
|
||||||
#include "portal.h"
|
#include "portal.h"
|
||||||
|
#include "po_man.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "r_utility.h"
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
#include "fragglescript/t_fs.h"
|
#include "fragglescript/t_fs.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
// Remaps EE sector change types to Generic_Floor values. According to the Eternity Wiki:
|
// Remaps EE sector change types to Generic_Floor values. According to the Eternity Wiki:
|
||||||
/*
|
/*
|
||||||
|
|
273
src/p_local.h
273
src/p_local.h
|
@ -24,13 +24,19 @@
|
||||||
#define __P_LOCAL__
|
#define __P_LOCAL__
|
||||||
|
|
||||||
#include "doomtype.h"
|
#include "doomtype.h"
|
||||||
#include "doomdef.h"
|
|
||||||
#include "tables.h"
|
#include "tables.h"
|
||||||
#include "r_state.h"
|
|
||||||
#include "r_utility.h"
|
|
||||||
#include "d_player.h"
|
|
||||||
|
|
||||||
#include "a_morph.h"
|
class player_t;
|
||||||
|
class AActor;
|
||||||
|
struct FPlayerStart;
|
||||||
|
class PClassActor;
|
||||||
|
struct fixedvec3;
|
||||||
|
class APlayerPawn;
|
||||||
|
struct line_t;
|
||||||
|
struct sector_t;
|
||||||
|
struct msecnode_t;
|
||||||
|
struct secplane_t;
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
@ -119,7 +125,7 @@ void P_PredictionLerpReset();
|
||||||
#define SPF_TEMPPLAYER 1 // spawning a short-lived dummy player
|
#define SPF_TEMPPLAYER 1 // spawning a short-lived dummy player
|
||||||
#define SPF_WEAPONFULLYUP 2 // spawn with weapon already raised
|
#define SPF_WEAPONFULLYUP 2 // spawn with weapon already raised
|
||||||
|
|
||||||
APlayerPawn *P_SpawnPlayer (struct FPlayerStart *mthing, int playernum, int flags=0);
|
APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags=0);
|
||||||
|
|
||||||
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
|
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
|
||||||
int P_FaceMobj (AActor *source, AActor *target, angle_t *delta);
|
int P_FaceMobj (AActor *source, AActor *target, angle_t *delta);
|
||||||
|
@ -221,200 +227,6 @@ enum WARPF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// P_MAPUTL
|
|
||||||
//
|
|
||||||
struct divline_t
|
|
||||||
{
|
|
||||||
fixed_t x;
|
|
||||||
fixed_t y;
|
|
||||||
fixed_t dx;
|
|
||||||
fixed_t dy;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
struct intercept_t
|
|
||||||
{
|
|
||||||
fixed_t frac; // along trace line
|
|
||||||
bool isaline;
|
|
||||||
bool done;
|
|
||||||
union {
|
|
||||||
AActor *thing;
|
|
||||||
line_t *line;
|
|
||||||
} d;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef bool (*traverser_t) (intercept_t *in);
|
|
||||||
|
|
||||||
fixed_t P_AproxDistance (fixed_t dx, fixed_t dy);
|
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
// P_PointOnLineSide
|
|
||||||
//
|
|
||||||
// Returns 0 (front/on) or 1 (back)
|
|
||||||
// [RH] inlined, stripped down, and made more precise
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
inline int P_PointOnLineSide (fixed_t x, fixed_t y, const line_t *line)
|
|
||||||
{
|
|
||||||
extern int P_VanillaPointOnLineSide(fixed_t x, fixed_t y, const line_t* line);
|
|
||||||
|
|
||||||
return i_compatflags2 & COMPATF2_POINTONLINE
|
|
||||||
? P_VanillaPointOnLineSide(x, y, line)
|
|
||||||
: DMulScale32 (y-line->v1->y, line->dx, line->v1->x-x, line->dy) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int P_PointOnLineSidePrecise (fixed_t x, fixed_t y, const line_t *line)
|
|
||||||
{
|
|
||||||
return DMulScale32 (y-line->v1->y, line->dx, line->v1->x-x, line->dy) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
// P_PointOnDivlineSide
|
|
||||||
//
|
|
||||||
// Same as P_PointOnLineSide except it uses divlines
|
|
||||||
// [RH] inlined, stripped down, and made more precise
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
inline int P_PointOnDivlineSide (fixed_t x, fixed_t y, const divline_t *line)
|
|
||||||
{
|
|
||||||
extern int P_VanillaPointOnDivlineSide(fixed_t x, fixed_t y, const divline_t* line);
|
|
||||||
|
|
||||||
return (i_compatflags2 & COMPATF2_POINTONLINE)
|
|
||||||
? P_VanillaPointOnDivlineSide(x, y, line)
|
|
||||||
: (DMulScale32 (y-line->y, line->dx, line->x-x, line->dy) > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int P_PointOnDivlineSidePrecise (fixed_t x, fixed_t y, const divline_t *line)
|
|
||||||
{
|
|
||||||
return DMulScale32 (y-line->y, line->dx, line->x-x, line->dy) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
// P_MakeDivline
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
inline void P_MakeDivline (const line_t *li, divline_t *dl)
|
|
||||||
{
|
|
||||||
dl->x = li->v1->x;
|
|
||||||
dl->y = li->v1->y;
|
|
||||||
dl->dx = li->dx;
|
|
||||||
dl->dy = li->dy;
|
|
||||||
}
|
|
||||||
|
|
||||||
fixed_t P_InterceptVector (const divline_t *v2, const divline_t *v1);
|
|
||||||
|
|
||||||
struct FLineOpening
|
|
||||||
{
|
|
||||||
fixed_t top;
|
|
||||||
fixed_t bottom;
|
|
||||||
fixed_t range;
|
|
||||||
fixed_t lowfloor;
|
|
||||||
sector_t *bottomsec;
|
|
||||||
sector_t *topsec;
|
|
||||||
FTextureID ceilingpic;
|
|
||||||
FTextureID floorpic;
|
|
||||||
int floorterrain;
|
|
||||||
bool touchmidtex;
|
|
||||||
bool abovemidtex;
|
|
||||||
};
|
|
||||||
|
|
||||||
void P_LineOpening (FLineOpening &open, AActor *thing, const line_t *linedef, fixed_t x, fixed_t y, fixed_t refx=FIXED_MIN, fixed_t refy=0, int flags=0);
|
|
||||||
|
|
||||||
class FBoundingBox;
|
|
||||||
struct polyblock_t;
|
|
||||||
|
|
||||||
class FBlockLinesIterator
|
|
||||||
{
|
|
||||||
int minx, maxx;
|
|
||||||
int miny, maxy;
|
|
||||||
|
|
||||||
int curx, cury;
|
|
||||||
polyblock_t *polyLink;
|
|
||||||
int polyIndex;
|
|
||||||
int *list;
|
|
||||||
|
|
||||||
void StartBlock(int x, int y);
|
|
||||||
|
|
||||||
public:
|
|
||||||
FBlockLinesIterator(int minx, int miny, int maxx, int maxy, bool keepvalidcount = false);
|
|
||||||
FBlockLinesIterator(const FBoundingBox &box);
|
|
||||||
line_t *Next();
|
|
||||||
void Reset() { StartBlock(minx, miny); }
|
|
||||||
};
|
|
||||||
|
|
||||||
class FBlockThingsIterator
|
|
||||||
{
|
|
||||||
int minx, maxx;
|
|
||||||
int miny, maxy;
|
|
||||||
|
|
||||||
int curx, cury;
|
|
||||||
|
|
||||||
FBlockNode *block;
|
|
||||||
|
|
||||||
int Buckets[32];
|
|
||||||
|
|
||||||
struct HashEntry
|
|
||||||
{
|
|
||||||
AActor *Actor;
|
|
||||||
int Next;
|
|
||||||
};
|
|
||||||
HashEntry FixedHash[10];
|
|
||||||
int NumFixedHash;
|
|
||||||
TArray<HashEntry> DynHash;
|
|
||||||
|
|
||||||
HashEntry *GetHashEntry(int i) { return i < (int)countof(FixedHash) ? &FixedHash[i] : &DynHash[i - countof(FixedHash)]; }
|
|
||||||
|
|
||||||
void StartBlock(int x, int y);
|
|
||||||
void SwitchBlock(int x, int y);
|
|
||||||
void ClearHash();
|
|
||||||
|
|
||||||
// The following is only for use in the path traverser
|
|
||||||
// and therefore declared private.
|
|
||||||
FBlockThingsIterator();
|
|
||||||
|
|
||||||
friend class FPathTraverse;
|
|
||||||
|
|
||||||
public:
|
|
||||||
FBlockThingsIterator(int minx, int miny, int maxx, int maxy);
|
|
||||||
FBlockThingsIterator(const FBoundingBox &box);
|
|
||||||
AActor *Next(bool centeronly = false);
|
|
||||||
void Reset() { StartBlock(minx, miny); }
|
|
||||||
};
|
|
||||||
|
|
||||||
class FPathTraverse
|
|
||||||
{
|
|
||||||
static TArray<intercept_t> intercepts;
|
|
||||||
|
|
||||||
divline_t trace;
|
|
||||||
unsigned int intercept_index;
|
|
||||||
unsigned int intercept_count;
|
|
||||||
unsigned int count;
|
|
||||||
|
|
||||||
void AddLineIntercepts(int bx, int by);
|
|
||||||
void AddThingIntercepts(int bx, int by, FBlockThingsIterator &it, bool compatible);
|
|
||||||
public:
|
|
||||||
|
|
||||||
intercept_t *Next();
|
|
||||||
|
|
||||||
FPathTraverse(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags);
|
|
||||||
~FPathTraverse();
|
|
||||||
const divline_t &Trace() const { return trace; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#define PT_ADDLINES 1
|
|
||||||
#define PT_ADDTHINGS 2
|
|
||||||
#define PT_COMPATIBLE 4
|
|
||||||
#define PT_DELTA 8 // x2,y2 is passed as a delta, not as an endpoint
|
|
||||||
|
|
||||||
AActor *P_BlockmapSearch (AActor *mo, int distance, AActor *(*check)(AActor*, int, void *), void *params = NULL);
|
AActor *P_BlockmapSearch (AActor *mo, int distance, AActor *(*check)(AActor*, int, void *), void *params = NULL);
|
||||||
AActor *P_RoughMonsterSearch (AActor *mo, int distance, bool onlyseekable=false);
|
AActor *P_RoughMonsterSearch (AActor *mo, int distance, bool onlyseekable=false);
|
||||||
|
@ -451,6 +263,8 @@ struct FCheckPosition
|
||||||
// ripping damage once per tic instead of once per move.
|
// ripping damage once per tic instead of once per move.
|
||||||
bool DoRipping;
|
bool DoRipping;
|
||||||
TMap<AActor*, bool> LastRipped;
|
TMap<AActor*, bool> LastRipped;
|
||||||
|
|
||||||
|
//FPortalGroupTable Groups;
|
||||||
int PushTime;
|
int PushTime;
|
||||||
|
|
||||||
FCheckPosition(bool rip=false)
|
FCheckPosition(bool rip=false)
|
||||||
|
@ -539,7 +353,6 @@ enum // P_LineAttack flags
|
||||||
|
|
||||||
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, PClassActor *pufftype, int flags = 0, AActor **victim = NULL, int *actualdamage = NULL);
|
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, PClassActor *pufftype, int flags = 0, AActor **victim = NULL, int *actualdamage = NULL);
|
||||||
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, FName pufftype, int flags = 0, AActor **victim = NULL, int *actualdamage = NULL);
|
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, FName pufftype, int flags = 0, AActor **victim = NULL, int *actualdamage = NULL);
|
||||||
AActor *P_LinePickActor (AActor *t1, angle_t angle, fixed_t distance, int pitch, ActorFlags actorMask, DWORD wallMask);
|
|
||||||
void P_TraceBleed (int damage, fixed_t x, fixed_t y, fixed_t z, AActor *target, angle_t angle, int pitch);
|
void P_TraceBleed (int damage, fixed_t x, fixed_t y, fixed_t z, AActor *target, angle_t angle, int pitch);
|
||||||
void P_TraceBleed (int damage, AActor *target, angle_t angle, int pitch);
|
void P_TraceBleed (int damage, AActor *target, angle_t angle, int pitch);
|
||||||
void P_TraceBleed (int damage, AActor *target, AActor *missile); // missile version
|
void P_TraceBleed (int damage, AActor *target, AActor *missile); // missile version
|
||||||
|
@ -587,31 +400,10 @@ bool Check_Sides(AActor *, int, int); // phares
|
||||||
// [RH]
|
// [RH]
|
||||||
const secplane_t * P_CheckSlopeWalk (AActor *actor, fixed_t &xmove, fixed_t &ymove);
|
const secplane_t * P_CheckSlopeWalk (AActor *actor, fixed_t &xmove, fixed_t &ymove);
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Added so that in the source there's a clear distinction between
|
|
||||||
// game engine and renderer specific calls.
|
|
||||||
// (For ZDoom itself this doesn't make any difference here but for GZDoom it does.)
|
|
||||||
//
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
subsector_t *P_PointInSubsector (fixed_t x, fixed_t y);
|
|
||||||
inline sector_t *P_PointInSector(fixed_t x, fixed_t y)
|
|
||||||
{
|
|
||||||
return P_PointInSubsector(x,y)->sector;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_SETUP
|
// P_SETUP
|
||||||
//
|
//
|
||||||
extern BYTE* rejectmatrix; // for fast sight rejection
|
extern BYTE* rejectmatrix; // for fast sight rejection
|
||||||
extern int* blockmaplump; // offsets in blockmap are from here
|
|
||||||
|
|
||||||
extern int* blockmap;
|
|
||||||
extern int bmapwidth;
|
|
||||||
extern int bmapheight; // in mapblocks
|
|
||||||
extern fixed_t bmaporgx;
|
|
||||||
extern fixed_t bmaporgy; // origin of block map
|
|
||||||
extern FBlockNode** blocklinks; // for thing chains
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -639,46 +431,9 @@ enum EDmgFlags
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// ===== PO_MAN =====
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
PODOOR_NONE,
|
|
||||||
PODOOR_SLIDE,
|
|
||||||
PODOOR_SWING,
|
|
||||||
} podoortype_t;
|
|
||||||
|
|
||||||
bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle, int direction, bool overRide);
|
|
||||||
bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle, fixed_t dist, bool overRide);
|
|
||||||
bool EV_MovePolyTo (line_t *line, int polyNum, int speed, fixed_t x, fixed_t y, bool overRide);
|
|
||||||
bool EV_OpenPolyDoor (line_t *line, int polyNum, int speed, angle_t angle, int delay, int distance, podoortype_t type);
|
|
||||||
bool EV_StopPoly (int polyNum);
|
|
||||||
|
|
||||||
|
|
||||||
// [RH] Data structure for P_SpawnMapThing() to keep track
|
|
||||||
// of polyobject-related things.
|
|
||||||
struct polyspawns_t
|
|
||||||
{
|
|
||||||
polyspawns_t *next;
|
|
||||||
fixed_t x;
|
|
||||||
fixed_t y;
|
|
||||||
short angle;
|
|
||||||
short type;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern int po_NumPolyobjs;
|
|
||||||
extern polyspawns_t *polyspawns; // [RH] list of polyobject things to spawn
|
|
||||||
|
|
||||||
|
|
||||||
void PO_Init ();
|
|
||||||
bool PO_Busy (int polyobj);
|
|
||||||
FPolyObj *PO_GetPolyobj(int polyNum);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_SPEC
|
// P_SPEC
|
||||||
//
|
//
|
||||||
#include "p_spec.h"
|
|
||||||
|
|
||||||
bool P_AlignFlat (int linenum, int side, int fc);
|
bool P_AlignFlat (int linenum, int side, int fc);
|
||||||
|
|
||||||
#endif // __P_LOCAL__
|
#endif // __P_LOCAL__
|
||||||
|
|
|
@ -34,10 +34,14 @@
|
||||||
|
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
#include "p_effect.h"
|
#include "p_effect.h"
|
||||||
#include "p_terrain.h"
|
#include "p_terrain.h"
|
||||||
#include "p_trace.h"
|
#include "p_trace.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "decallib.h"
|
#include "decallib.h"
|
||||||
|
|
|
@ -32,9 +32,13 @@
|
||||||
#include "m_bbox.h"
|
#include "m_bbox.h"
|
||||||
|
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
|
#include "doomdata.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
#include "p_3dmidtex.h"
|
#include "p_3dmidtex.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
|
||||||
// State.
|
// State.
|
||||||
#include "r_state.h"
|
#include "r_state.h"
|
||||||
|
|
208
src/p_maputl.h
Normal file
208
src/p_maputl.h
Normal file
|
@ -0,0 +1,208 @@
|
||||||
|
#ifndef __P_MAPUTL_H
|
||||||
|
#define __P_MAPUTL_H
|
||||||
|
|
||||||
|
#include "r_defs.h"
|
||||||
|
#include "doomstat.h"
|
||||||
|
|
||||||
|
extern int validcount;
|
||||||
|
|
||||||
|
struct divline_t
|
||||||
|
{
|
||||||
|
fixed_t x;
|
||||||
|
fixed_t y;
|
||||||
|
fixed_t dx;
|
||||||
|
fixed_t dy;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct intercept_t
|
||||||
|
{
|
||||||
|
fixed_t frac; // along trace line
|
||||||
|
bool isaline;
|
||||||
|
bool done;
|
||||||
|
union {
|
||||||
|
AActor *thing;
|
||||||
|
line_t *line;
|
||||||
|
} d;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// P_PointOnLineSide
|
||||||
|
//
|
||||||
|
// Returns 0 (front/on) or 1 (back)
|
||||||
|
// [RH] inlined, stripped down, and made more precise
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
inline int P_PointOnLineSide (fixed_t x, fixed_t y, const line_t *line)
|
||||||
|
{
|
||||||
|
extern int P_VanillaPointOnLineSide(fixed_t x, fixed_t y, const line_t* line);
|
||||||
|
|
||||||
|
return i_compatflags2 & COMPATF2_POINTONLINE
|
||||||
|
? P_VanillaPointOnLineSide(x, y, line)
|
||||||
|
: DMulScale32 (y-line->v1->y, line->dx, line->v1->x-x, line->dy) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int P_PointOnLineSidePrecise (fixed_t x, fixed_t y, const line_t *line)
|
||||||
|
{
|
||||||
|
return DMulScale32 (y-line->v1->y, line->dx, line->v1->x-x, line->dy) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// P_PointOnDivlineSide
|
||||||
|
//
|
||||||
|
// Same as P_PointOnLineSide except it uses divlines
|
||||||
|
// [RH] inlined, stripped down, and made more precise
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
inline int P_PointOnDivlineSide (fixed_t x, fixed_t y, const divline_t *line)
|
||||||
|
{
|
||||||
|
extern int P_VanillaPointOnDivlineSide(fixed_t x, fixed_t y, const divline_t* line);
|
||||||
|
|
||||||
|
return (i_compatflags2 & COMPATF2_POINTONLINE)
|
||||||
|
? P_VanillaPointOnDivlineSide(x, y, line)
|
||||||
|
: (DMulScale32 (y-line->y, line->dx, line->x-x, line->dy) > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int P_PointOnDivlineSidePrecise (fixed_t x, fixed_t y, const divline_t *line)
|
||||||
|
{
|
||||||
|
return DMulScale32 (y-line->y, line->dx, line->x-x, line->dy) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// P_MakeDivline
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
inline void P_MakeDivline (const line_t *li, divline_t *dl)
|
||||||
|
{
|
||||||
|
dl->x = li->v1->x;
|
||||||
|
dl->y = li->v1->y;
|
||||||
|
dl->dx = li->dx;
|
||||||
|
dl->dy = li->dy;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct FLineOpening
|
||||||
|
{
|
||||||
|
fixed_t top;
|
||||||
|
fixed_t bottom;
|
||||||
|
fixed_t range;
|
||||||
|
fixed_t lowfloor;
|
||||||
|
sector_t *bottomsec;
|
||||||
|
sector_t *topsec;
|
||||||
|
FTextureID ceilingpic;
|
||||||
|
FTextureID floorpic;
|
||||||
|
int floorterrain;
|
||||||
|
bool touchmidtex;
|
||||||
|
bool abovemidtex;
|
||||||
|
};
|
||||||
|
|
||||||
|
void P_LineOpening (FLineOpening &open, AActor *thing, const line_t *linedef, fixed_t x, fixed_t y, fixed_t refx=FIXED_MIN, fixed_t refy=0, int flags=0);
|
||||||
|
|
||||||
|
class FBoundingBox;
|
||||||
|
struct polyblock_t;
|
||||||
|
|
||||||
|
class FBlockLinesIterator
|
||||||
|
{
|
||||||
|
int minx, maxx;
|
||||||
|
int miny, maxy;
|
||||||
|
|
||||||
|
int curx, cury;
|
||||||
|
polyblock_t *polyLink;
|
||||||
|
int polyIndex;
|
||||||
|
int *list;
|
||||||
|
|
||||||
|
void StartBlock(int x, int y);
|
||||||
|
|
||||||
|
public:
|
||||||
|
FBlockLinesIterator(int minx, int miny, int maxx, int maxy, bool keepvalidcount = false);
|
||||||
|
FBlockLinesIterator(const FBoundingBox &box);
|
||||||
|
line_t *Next();
|
||||||
|
void Reset() { StartBlock(minx, miny); }
|
||||||
|
};
|
||||||
|
|
||||||
|
class FBlockThingsIterator
|
||||||
|
{
|
||||||
|
int minx, maxx;
|
||||||
|
int miny, maxy;
|
||||||
|
|
||||||
|
int curx, cury;
|
||||||
|
|
||||||
|
FBlockNode *block;
|
||||||
|
|
||||||
|
int Buckets[32];
|
||||||
|
|
||||||
|
struct HashEntry
|
||||||
|
{
|
||||||
|
AActor *Actor;
|
||||||
|
int Next;
|
||||||
|
};
|
||||||
|
HashEntry FixedHash[10];
|
||||||
|
int NumFixedHash;
|
||||||
|
TArray<HashEntry> DynHash;
|
||||||
|
|
||||||
|
HashEntry *GetHashEntry(int i) { return i < (int)countof(FixedHash) ? &FixedHash[i] : &DynHash[i - countof(FixedHash)]; }
|
||||||
|
|
||||||
|
void StartBlock(int x, int y);
|
||||||
|
void SwitchBlock(int x, int y);
|
||||||
|
void ClearHash();
|
||||||
|
|
||||||
|
// The following is only for use in the path traverser
|
||||||
|
// and therefore declared private.
|
||||||
|
FBlockThingsIterator();
|
||||||
|
|
||||||
|
friend class FPathTraverse;
|
||||||
|
|
||||||
|
public:
|
||||||
|
FBlockThingsIterator(int minx, int miny, int maxx, int maxy);
|
||||||
|
FBlockThingsIterator(const FBoundingBox &box);
|
||||||
|
AActor *Next(bool centeronly = false);
|
||||||
|
void Reset() { StartBlock(minx, miny); }
|
||||||
|
};
|
||||||
|
|
||||||
|
class FPathTraverse
|
||||||
|
{
|
||||||
|
static TArray<intercept_t> intercepts;
|
||||||
|
|
||||||
|
divline_t trace;
|
||||||
|
unsigned int intercept_index;
|
||||||
|
unsigned int intercept_count;
|
||||||
|
unsigned int count;
|
||||||
|
|
||||||
|
void AddLineIntercepts(int bx, int by);
|
||||||
|
void AddThingIntercepts(int bx, int by, FBlockThingsIterator &it, bool compatible);
|
||||||
|
public:
|
||||||
|
|
||||||
|
intercept_t *Next();
|
||||||
|
|
||||||
|
FPathTraverse(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags);
|
||||||
|
~FPathTraverse();
|
||||||
|
const divline_t &Trace() const { return trace; }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// P_MAPUTL
|
||||||
|
//
|
||||||
|
|
||||||
|
typedef bool(*traverser_t) (intercept_t *in);
|
||||||
|
|
||||||
|
fixed_t P_AproxDistance (fixed_t dx, fixed_t dy);
|
||||||
|
|
||||||
|
|
||||||
|
fixed_t P_InterceptVector (const divline_t *v2, const divline_t *v1);
|
||||||
|
|
||||||
|
#define PT_ADDLINES 1
|
||||||
|
#define PT_ADDTHINGS 2
|
||||||
|
#define PT_COMPATIBLE 4
|
||||||
|
#define PT_DELTA 8 // x2,y2 is passed as a delta, not as an endpoint
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
|
@ -29,6 +29,7 @@
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
#include "p_effect.h"
|
#include "p_effect.h"
|
||||||
#include "p_terrain.h"
|
#include "p_terrain.h"
|
||||||
|
@ -66,6 +67,8 @@
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
#include "r_renderer.h"
|
#include "r_renderer.h"
|
||||||
|
#include "po_man.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,10 @@
|
||||||
|
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
// State.
|
// State.
|
||||||
|
#include "d_player.h"
|
||||||
#include "dobject.h"
|
#include "dobject.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "r_state.h"
|
#include "r_state.h"
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
|
#include "d_player.h"
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
#include "m_swap.h"
|
#include "m_swap.h"
|
||||||
#include "m_bbox.h"
|
#include "m_bbox.h"
|
||||||
|
@ -69,6 +70,9 @@
|
||||||
#include "r_renderer.h"
|
#include "r_renderer.h"
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
#include "portal.h"
|
#include "portal.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "p_spec.h"
|
||||||
#ifndef NO_EDATA
|
#ifndef NO_EDATA
|
||||||
#include "edata.h"
|
#include "edata.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,11 +14,16 @@
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
#include "m_bbox.h"
|
#include "m_bbox.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "po_man.h"
|
#include "po_man.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "b_bot.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
// State.
|
// State.
|
||||||
#include "r_state.h"
|
#include "r_state.h"
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
#include "cmdlib.h"
|
#include "cmdlib.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -46,6 +46,8 @@
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
|
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
#include "p_terrain.h"
|
#include "p_terrain.h"
|
||||||
#include "p_acs.h"
|
#include "p_acs.h"
|
||||||
|
@ -64,7 +66,10 @@
|
||||||
#include "a_keys.h"
|
#include "a_keys.h"
|
||||||
#include "c_dispatch.h"
|
#include "c_dispatch.h"
|
||||||
#include "r_sky.h"
|
#include "r_sky.h"
|
||||||
|
#include "d_player.h"
|
||||||
#include "portal.h"
|
#include "portal.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
#ifndef NO_EDATA
|
#ifndef NO_EDATA
|
||||||
#include "edata.h"
|
#include "edata.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
#include "tarray.h"
|
#include "tarray.h"
|
||||||
#include "cmdlib.h"
|
#include "cmdlib.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,10 @@
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
#define FUDGEFACTOR 10
|
#define FUDGEFACTOR 10
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
// Set of spawnable things for the Thing_Spawn and Thing_Projectile specials.
|
// Set of spawnable things for the Thing_Spawn and Thing_Projectile specials.
|
||||||
FClassMap SpawnableThings;
|
FClassMap SpawnableThings;
|
||||||
|
|
|
@ -31,7 +31,10 @@
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
#include "r_data/r_interpolate.h"
|
#include "r_data/r_interpolate.h"
|
||||||
#include "i_sound.h"
|
#include "i_sound.h"
|
||||||
|
#include "d_player.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
extern gamestate_t wipegamestate;
|
extern gamestate_t wipegamestate;
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "r_sky.h"
|
#include "r_sky.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "r_defs.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
struct FTraceInfo
|
struct FTraceInfo
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,6 +54,11 @@
|
||||||
#include "gstrings.h"
|
#include "gstrings.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
#include "r_renderer.h"
|
#include "r_renderer.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
|
#include "a_morph.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
static FRandom pr_skullpop ("SkullPop");
|
static FRandom pr_skullpop ("SkullPop");
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#include "r_defs.h"
|
#include "r_defs.h"
|
||||||
#include "m_swap.h"
|
#include "m_swap.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
static int WriteTHINGS (FILE *file);
|
static int WriteTHINGS (FILE *file);
|
||||||
static int WriteLINEDEFS (FILE *file);
|
static int WriteLINEDEFS (FILE *file);
|
||||||
|
|
|
@ -29,6 +29,9 @@
|
||||||
#include "p_setup.h"
|
#include "p_setup.h"
|
||||||
#include "vectors.h"
|
#include "vectors.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "p_blockmap.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
36
src/po_man.h
36
src/po_man.h
|
@ -107,4 +107,40 @@ FArchive &operator<< (FArchive &arc, FPolyObj *&poly);
|
||||||
FArchive &operator<< (FArchive &arc, const FPolyObj *&poly);
|
FArchive &operator<< (FArchive &arc, const FPolyObj *&poly);
|
||||||
|
|
||||||
|
|
||||||
|
// ===== PO_MAN =====
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
PODOOR_NONE,
|
||||||
|
PODOOR_SLIDE,
|
||||||
|
PODOOR_SWING,
|
||||||
|
} podoortype_t;
|
||||||
|
|
||||||
|
bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle, int direction, bool overRide);
|
||||||
|
bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle, fixed_t dist, bool overRide);
|
||||||
|
bool EV_MovePolyTo (line_t *line, int polyNum, int speed, fixed_t x, fixed_t y, bool overRide);
|
||||||
|
bool EV_OpenPolyDoor (line_t *line, int polyNum, int speed, angle_t angle, int delay, int distance, podoortype_t type);
|
||||||
|
bool EV_StopPoly (int polyNum);
|
||||||
|
|
||||||
|
|
||||||
|
// [RH] Data structure for P_SpawnMapThing() to keep track
|
||||||
|
// of polyobject-related things.
|
||||||
|
struct polyspawns_t
|
||||||
|
{
|
||||||
|
polyspawns_t *next;
|
||||||
|
fixed_t x;
|
||||||
|
fixed_t y;
|
||||||
|
short angle;
|
||||||
|
short type;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern int po_NumPolyobjs;
|
||||||
|
extern polyspawns_t *polyspawns; // [RH] list of polyobject things to spawn
|
||||||
|
|
||||||
|
|
||||||
|
void PO_Init ();
|
||||||
|
bool PO_Busy (int polyobj);
|
||||||
|
FPolyObj *PO_GetPolyobj(int polyNum);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -11,6 +11,8 @@
|
||||||
#include "a_sharedglobal.h"
|
#include "a_sharedglobal.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "c_dispatch.h"
|
#include "c_dispatch.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
// simulation recurions maximum
|
// simulation recurions maximum
|
||||||
CVAR(Int, sv_portal_recursions, 4, CVAR_ARCHIVE|CVAR_SERVERINFO)
|
CVAR(Int, sv_portal_recursions, 4, CVAR_ARCHIVE|CVAR_SERVERINFO)
|
||||||
|
|
13
src/r_defs.h
13
src/r_defs.h
|
@ -1153,4 +1153,17 @@ struct visstyle_t
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// The playsim can use different nodes than the renderer so this is
|
||||||
|
// not the same as R_PointInSubsector
|
||||||
|
//
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
subsector_t *P_PointInSubsector(fixed_t x, fixed_t y);
|
||||||
|
inline sector_t *P_PointInSector(fixed_t x, fixed_t y)
|
||||||
|
{
|
||||||
|
return P_PointInSubsector(x, y)->sector;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
#include "r_data/voxels.h"
|
#include "r_data/voxels.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
|
||||||
// [RH] A c-buffer. Used for keeping track of offscreen voxel spans.
|
// [RH] A c-buffer. Used for keeping track of offscreen voxel spans.
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,8 @@
|
||||||
#include "r_renderer.h"
|
#include "r_renderer.h"
|
||||||
#include "r_data/colormaps.h"
|
#include "r_data/colormaps.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
|
|
||||||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "c_dispatch.h"
|
#include "c_dispatch.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "po_man.h"
|
#include "po_man.h"
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -14,36 +14,6 @@ class FArchive;
|
||||||
class FTextureManager;
|
class FTextureManager;
|
||||||
class FTerrainTypeArray;
|
class FTerrainTypeArray;
|
||||||
|
|
||||||
class FTextureID
|
|
||||||
{
|
|
||||||
friend class FTextureManager;
|
|
||||||
friend FArchive &operator<< (FArchive &arc, FTextureID &tex);
|
|
||||||
friend FTextureID GetHUDIcon(PClassInventory *cls);
|
|
||||||
friend void R_InitSpriteDefs ();
|
|
||||||
|
|
||||||
public:
|
|
||||||
FTextureID() throw() {}
|
|
||||||
bool isNull() const { return texnum == 0; }
|
|
||||||
bool isValid() const { return texnum > 0; }
|
|
||||||
bool Exists() const { return texnum >= 0; }
|
|
||||||
void SetInvalid() { texnum = -1; }
|
|
||||||
void SetNull() { texnum = 0; }
|
|
||||||
bool operator ==(const FTextureID &other) const { return texnum == other.texnum; }
|
|
||||||
bool operator !=(const FTextureID &other) const { return texnum != other.texnum; }
|
|
||||||
FTextureID operator +(int offset) throw();
|
|
||||||
int GetIndex() const { return texnum; } // Use this only if you absolutely need the index!
|
|
||||||
|
|
||||||
// The switch list needs these to sort the switches by texture index
|
|
||||||
int operator -(FTextureID other) const { return texnum - other.texnum; }
|
|
||||||
bool operator < (FTextureID other) const { return texnum < other.texnum; }
|
|
||||||
bool operator > (FTextureID other) const { return texnum > other.texnum; }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
FTextureID(int num) { texnum = num; }
|
|
||||||
private:
|
|
||||||
int texnum;
|
|
||||||
};
|
|
||||||
|
|
||||||
class FNullTextureID : public FTextureID
|
class FNullTextureID : public FTextureID
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -73,6 +73,9 @@
|
||||||
#include "p_trace.h"
|
#include "p_trace.h"
|
||||||
#include "p_setup.h"
|
#include "p_setup.h"
|
||||||
#include "gstrings.h"
|
#include "gstrings.h"
|
||||||
|
#include "d_player.h"
|
||||||
|
#include "p_maputl.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
AActor *SingleActorFromTID(int tid, AActor *defactor);
|
AActor *SingleActorFromTID(int tid, AActor *defactor);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue