mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-30 00:41:19 +00:00
- update to ZDoom r 3261:
Removed unneeded includes of r_local.h. Removed more r_ header dependencies from the rest of the code. took all includes of farchive.h out of headers. This file will have to be included explicitly in each source file that needs it. Changed AlterWeaponSprite so that it doesn't take a full vissprite as parameter. FCoverageBuffer is only used in r_things.cpp, so its declaration does not need to be in a global header that's included everywhere. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1223 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
5540b6fefc
commit
4e74a881b6
133 changed files with 737 additions and 623 deletions
108
gzdoom.vcproj
108
gzdoom.vcproj
|
@ -1094,6 +1094,10 @@
|
|||
RelativePath=".\src\actor.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\actorptrselect.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\am_map.h"
|
||||
>
|
||||
|
@ -2332,10 +2336,6 @@
|
|||
RelativePath=".\src\r_drawt.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_interpolate.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_main.cpp"
|
||||
>
|
||||
|
@ -2360,10 +2360,6 @@
|
|||
RelativePath=".\src\r_things.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_translate.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Render Headers"
|
||||
|
@ -2372,10 +2368,6 @@
|
|||
RelativePath=".\src\r_3dfloors.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_blend.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_bsp.h"
|
||||
>
|
||||
|
@ -2388,14 +2380,6 @@
|
|||
RelativePath=".\src\r_draw.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_interpolate.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_jpeg.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_local.h"
|
||||
>
|
||||
|
@ -2429,7 +2413,7 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_translate.h"
|
||||
RelativePath=".\src\r_utility.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
@ -7124,32 +7108,8 @@
|
|||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resources"
|
||||
Name="Render Data"
|
||||
>
|
||||
<Filter
|
||||
Name="Resource Headers"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\resources\colormaps.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\resources\voxels.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Sources"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\resources\colormaps.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\resources\voxels.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Textures"
|
||||
>
|
||||
|
@ -7242,6 +7202,62 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Headers"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\r_data\colormaps.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\r_interpolate.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\r_translate.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\renderstyle.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\sprites.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\voxels.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Sources"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\r_data\colormaps.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\r_interpolate.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\r_translate.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\renderstyle.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\sprites.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\r_data\voxels.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "r_bsp.h"
|
||||
#include "p_setup.h"
|
||||
#include "c_bind.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#include "m_cheat.h"
|
||||
#include "i_system.h"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "cmdlib.h"
|
||||
#include "teaminfo.h"
|
||||
#include "d_net.h"
|
||||
#include "farchive.h"
|
||||
|
||||
CVAR (Int, bot_next_color, 11, 0)
|
||||
CVAR (Bool, bot_observer, false, 0)
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "g_game.h"
|
||||
#include "m_random.h"
|
||||
#include "r_sky.h"
|
||||
#include "r_main.h"
|
||||
#include "st_stuff.h"
|
||||
#include "stats.h"
|
||||
#include "i_system.h"
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "g_game.h"
|
||||
#include "d_ticcmd.h"
|
||||
#include "m_random.h"
|
||||
#include "r_main.h"
|
||||
#include "i_system.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "gi.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "b_bot.h"
|
||||
#include "g_game.h"
|
||||
#include "m_random.h"
|
||||
#include "r_main.h"
|
||||
#include "stats.h"
|
||||
#include "a_pickups.h"
|
||||
#include "statnums.h"
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
#include "gi.h"
|
||||
#include "r_defs.h"
|
||||
#include "d_player.h"
|
||||
#include "r_main.h"
|
||||
#include "templates.h"
|
||||
#include "p_local.h"
|
||||
#include "r_sky.h"
|
||||
|
@ -663,32 +662,6 @@ CCMD (fov)
|
|||
Net_WriteByte (clamp (atoi (argv[1]), 5, 179));
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD r_visibility
|
||||
//
|
||||
// Controls how quickly light ramps across a 1/z range. Set this, and it
|
||||
// sets all the r_*Visibility variables (except r_SkyVisibilily, which is
|
||||
// currently unused).
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CCMD (r_visibility)
|
||||
{
|
||||
if (argv.argc() < 2)
|
||||
{
|
||||
Printf ("Visibility is %g\n", R_GetVisibility());
|
||||
}
|
||||
else if (!netgame)
|
||||
{
|
||||
R_SetVisibility ((float)atof (argv[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf ("Visibility cannot be changed in net games.\n");
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD warp
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "v_video.h"
|
||||
#include "v_text.h"
|
||||
#include "w_wad.h"
|
||||
#include "r_main.h"
|
||||
#include "sbar.h"
|
||||
#include "s_sound.h"
|
||||
#include "s_sndseq.h"
|
||||
|
@ -64,6 +63,7 @@
|
|||
#include "d_net.h"
|
||||
#include "g_level.h"
|
||||
#include "d_event.h"
|
||||
#include "d_player.h"
|
||||
|
||||
#include "gi.h"
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include "v_text.h"
|
||||
#include "d_net.h"
|
||||
#include "d_main.h"
|
||||
#include "farchive.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
#include "i_system.h"
|
||||
#include "doomerrors.h"
|
||||
#include "p_effect.h"
|
||||
#include "farchive.h"
|
||||
|
||||
// [SO] Just the way Randy said to do it :)
|
||||
// [RH] Made this CVAR_SERVERINFO
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "d_netinf.h"
|
||||
#include "d_net.h"
|
||||
#include "d_protocol.h"
|
||||
#include "d_player.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "v_palette.h"
|
||||
#include "v_video.h"
|
||||
|
@ -55,6 +56,7 @@
|
|||
#include "r_data/r_translate.h"
|
||||
#include "templates.h"
|
||||
#include "cmdlib.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static FRandom pr_pickteam ("PickRandomTeam");
|
||||
|
||||
|
|
|
@ -413,10 +413,7 @@ public:
|
|||
// Bookkeeping on players - state.
|
||||
extern player_t players[MAXPLAYERS];
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, player_t *&p)
|
||||
{
|
||||
return arc.SerializePointer (players, (BYTE **)&p, sizeof(*players));
|
||||
}
|
||||
FArchive &operator<< (FArchive &arc, player_t *&p);
|
||||
|
||||
void P_CheckPlayerSprites();
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "g_level.h"
|
||||
#include "colormatcher.h"
|
||||
#include "b_bot.h"
|
||||
#include "farchive.h"
|
||||
|
||||
FDecalLib DecalLibrary;
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "stats.h"
|
||||
#include "a_sharedglobal.h"
|
||||
#include "dsectoreffect.h"
|
||||
#include "farchive.h"
|
||||
|
||||
PClass DObject::_StaticType;
|
||||
ClassReg DObject::RegistrationInfo =
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "p_3dmidtex.h"
|
||||
#include "r_data/r_interpolate.h"
|
||||
#include "statnums.h"
|
||||
#include "farchive.h"
|
||||
|
||||
IMPLEMENT_CLASS (DSectorEffect)
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "statnums.h"
|
||||
#include "i_system.h"
|
||||
#include "doomerrors.h"
|
||||
#include "farchive.h"
|
||||
|
||||
|
||||
static cycle_t ThinkCycles;
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
#include "c_dispatch.h"
|
||||
#include "d_player.h"
|
||||
#include "dobject.h"
|
||||
#include "r_local.h"
|
||||
|
||||
// These are special tokens found in the data stream of an archive.
|
||||
// Whenever a new object is encountered, it gets created using new and
|
||||
|
@ -1539,3 +1538,28 @@ FArchive &operator<< (FArchive &arc, const PClass * &info)
|
|||
}
|
||||
return arc;
|
||||
}
|
||||
|
||||
FArchive &operator<< (FArchive &arc, sector_t *&sec)
|
||||
{
|
||||
return arc.SerializePointer (sectors, (BYTE **)&sec, sizeof(*sectors));
|
||||
}
|
||||
|
||||
FArchive &operator<< (FArchive &arc, const sector_t *&sec)
|
||||
{
|
||||
return arc.SerializePointer (sectors, (BYTE **)&sec, sizeof(*sectors));
|
||||
}
|
||||
|
||||
FArchive &operator<< (FArchive &arc, line_t *&line)
|
||||
{
|
||||
return arc.SerializePointer (lines, (BYTE **)&line, sizeof(*lines));
|
||||
}
|
||||
|
||||
FArchive &operator<< (FArchive &arc, vertex_t *&vert)
|
||||
{
|
||||
return arc.SerializePointer (vertexes, (BYTE **)&vert, sizeof(*vertexes));
|
||||
}
|
||||
|
||||
FArchive &operator<< (FArchive &arc, side_t *&side)
|
||||
{
|
||||
return arc.SerializePointer (sides, (BYTE **)&side, sizeof(*sides));
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include "dobject.h"
|
||||
#include "r_state.h"
|
||||
|
||||
class FFile
|
||||
{
|
||||
|
@ -318,4 +319,17 @@ inline FArchive &operator<< (FArchive &arc, TArray<T,TT> &self)
|
|||
return arc;
|
||||
}
|
||||
|
||||
struct sector_t;
|
||||
struct line_t;
|
||||
struct vertex_t;
|
||||
struct side_t;
|
||||
|
||||
FArchive &operator<< (FArchive &arc, sector_t *&sec);
|
||||
FArchive &operator<< (FArchive &arc, const sector_t *&sec);
|
||||
FArchive &operator<< (FArchive &arc, line_t *&line);
|
||||
FArchive &operator<< (FArchive &arc, vertex_t *&vert);
|
||||
FArchive &operator<< (FArchive &arc, side_t *&side);
|
||||
|
||||
|
||||
|
||||
#endif //__FARCHIVE_H__
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#include "v_palette.h"
|
||||
#include "v_font.h"
|
||||
#include "r_data/colormaps.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#include "gl/gl_functions.h"
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
//
|
||||
//
|
||||
|
||||
#include "r_local.h"
|
||||
#include "t_script.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "a_keys.h"
|
||||
|
@ -55,6 +54,7 @@
|
|||
#include "i_system.h"
|
||||
#include "doomerrors.h"
|
||||
#include "doomstat.h"
|
||||
#include "farchive.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "a_specialspot.h"
|
||||
#include "templates.h"
|
||||
#include "m_bbox.h"
|
||||
#include "farchive.h"
|
||||
|
||||
// Include all the other Doom stuff here to reduce compile time
|
||||
#include "a_arachnotron.cpp"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#include "d_event.h"
|
||||
#include "p_acs.h"
|
||||
#include "m_joy.h"
|
||||
#include "farchive.h"
|
||||
#include "r_data/colormaps.h"
|
||||
|
||||
#include <zlib.h>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "templates.h"
|
||||
#include "r_data/r_translate.h"
|
||||
#include "doomstat.h"
|
||||
#include "farchive.h"
|
||||
|
||||
// Include all the other Heretic stuff here to reduce compile time
|
||||
#include "a_chicken.cpp"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "p_terrain.h"
|
||||
#include "m_bbox.h"
|
||||
#include "ravenshared.h"
|
||||
#include "farchive.h"
|
||||
|
||||
// Include all the Hexen stuff here to reduce compile time
|
||||
#include "a_bats.cpp"
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
#include "menu/menu.h"
|
||||
#include "a_strifeglobal.h"
|
||||
#include "r_data/colormaps.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#include "gi.h"
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "thingdef/thingdef.h"
|
||||
#include "g_level.h"
|
||||
#include "doomstat.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#define MAULATORTICS (25*35)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "p_enemy.h"
|
||||
#include "statnums.h"
|
||||
#include "templates.h"
|
||||
#include "farchive.h"
|
||||
#include "r_data/r_translate.h"
|
||||
|
||||
static FRandom pr_freezedeath ("FreezeDeath");
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "templates.h"
|
||||
#include "g_level.h"
|
||||
#include "d_player.h"
|
||||
#include "farchive.h"
|
||||
|
||||
|
||||
IMPLEMENT_CLASS (AArmor)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "g_level.h"
|
||||
#include "doomstat.h"
|
||||
#include "v_palette.h"
|
||||
#include "farchive.h"
|
||||
#include "r_data/colormaps.h"
|
||||
|
||||
static FRandom pr_torch ("Torch");
|
||||
|
@ -464,7 +465,7 @@ void APowerInvulnerable::EndEffect ()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
int APowerInvulnerable::AlterWeaponSprite (vissprite_t *vis)
|
||||
int APowerInvulnerable::AlterWeaponSprite (visstyle_t *vis)
|
||||
{
|
||||
int changed = Inventory == NULL ? false : Inventory->AlterWeaponSprite(vis);
|
||||
if (Owner != NULL)
|
||||
|
@ -655,7 +656,7 @@ void APowerInvisibility::EndEffect ()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
int APowerInvisibility::AlterWeaponSprite (vissprite_t *vis)
|
||||
int APowerInvisibility::AlterWeaponSprite (visstyle_t *vis)
|
||||
{
|
||||
int changed = Inventory == NULL ? false : Inventory->AlterWeaponSprite(vis);
|
||||
// Blink if the powerup is wearing off
|
||||
|
|
|
@ -54,7 +54,7 @@ protected:
|
|||
void InitEffect ();
|
||||
void DoEffect ();
|
||||
void EndEffect ();
|
||||
int AlterWeaponSprite (vissprite_t *vis);
|
||||
int AlterWeaponSprite (visstyle_t *vis);
|
||||
};
|
||||
|
||||
class APowerStrength : public APowerup
|
||||
|
@ -76,7 +76,7 @@ protected:
|
|||
void InitEffect ();
|
||||
void DoEffect ();
|
||||
void EndEffect ();
|
||||
int AlterWeaponSprite (vissprite_t *vis);
|
||||
int AlterWeaponSprite (visstyle_t *vis);
|
||||
// FRenderStyle OwnersNormalStyle;
|
||||
// fixed_t OwnersNormalAlpha;
|
||||
};
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include "actor.h"
|
||||
#include "info.h"
|
||||
#include "a_sharedglobal.h"
|
||||
#include "r_main.h"
|
||||
#include "p_local.h"
|
||||
#include "farchive.h"
|
||||
|
||||
/*
|
||||
== SecurityCamera
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "d_net.h"
|
||||
#include "colormatcher.h"
|
||||
#include "v_palette.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static fixed_t DecalWidth, DecalLeft, DecalRight;
|
||||
static fixed_t SpreadZ;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "a_sharedglobal.h"
|
||||
#include "g_level.h"
|
||||
#include "d_player.h"
|
||||
#include "farchive.h"
|
||||
|
||||
IMPLEMENT_POINTY_CLASS (DFlashFader)
|
||||
DECLARE_POINTER (ForWho)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "a_lightning.h"
|
||||
#include "doomstat.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "statnums.h"
|
||||
#include "m_random.h"
|
||||
|
@ -8,6 +9,7 @@
|
|||
#include "r_sky.h"
|
||||
#include "g_level.h"
|
||||
#include "r_state.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static FRandom pr_lightning ("Lightning");
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "a_morph.h"
|
||||
#include "doomstat.h"
|
||||
#include "g_level.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static FRandom pr_morphmonst ("MorphMonster");
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "p_local.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "doomstat.h"
|
||||
#include "farchive.h"
|
||||
|
||||
/*
|
||||
== InterpolationPoint: node along a camera's path
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "g_level.h"
|
||||
#include "g_game.h"
|
||||
#include "doomstat.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static FRandom pr_restore ("RestorePos");
|
||||
|
||||
|
@ -774,7 +775,7 @@ fixed_t AInventory::GetSpeedFactor ()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
int AInventory::AlterWeaponSprite (vissprite_t *vis)
|
||||
int AInventory::AlterWeaponSprite (visstyle_t *vis)
|
||||
{
|
||||
if (Inventory != NULL)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
class player_t;
|
||||
class FConfigFile;
|
||||
class AWeapon;
|
||||
struct visstyle_t;
|
||||
|
||||
class FWeaponSlot
|
||||
{
|
||||
|
@ -132,7 +133,6 @@ enum
|
|||
IF_PERSISTENTPOWER = 1<<18, // Powerup is kept when travelling between levels
|
||||
};
|
||||
|
||||
struct vissprite_t;
|
||||
|
||||
class AInventory : public AActor
|
||||
{
|
||||
|
@ -192,7 +192,7 @@ public:
|
|||
virtual void AbsorbDamage (int damage, FName damageType, int &newdamage);
|
||||
virtual void ModifyDamage (int damage, FName damageType, int &newdamage, bool passive);
|
||||
virtual fixed_t GetSpeedFactor();
|
||||
virtual int AlterWeaponSprite (vissprite_t *vis);
|
||||
virtual int AlterWeaponSprite (visstyle_t *vis);
|
||||
|
||||
virtual PalEntry GetBlend ();
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "c_console.h"
|
||||
#include "doomstat.h"
|
||||
#include "v_font.h"
|
||||
#include "farchive.h"
|
||||
|
||||
IMPLEMENT_CLASS (APuzzleItem)
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "s_sound.h"
|
||||
#include "a_sharedglobal.h"
|
||||
#include "statnums.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static FRandom pr_quake ("Quake");
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "a_sharedglobal.h"
|
||||
#include "p_local.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "farchive.h"
|
||||
|
||||
// arg0 = Visibility*4 for this skybox
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "i_system.h"
|
||||
#include "thingdef/thingdef.h"
|
||||
#include "doomstat.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static FRandom pr_spot ("SpecialSpot");
|
||||
static FRandom pr_spawnmace ("SpawnMace");
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "doomstat.h"
|
||||
#include "g_level.h"
|
||||
#include "d_net.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#define BONUSADD 6
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "v_video.h"
|
||||
#include "cmdlib.h"
|
||||
#include "doomstat.h"
|
||||
#include "farchive.h"
|
||||
|
||||
EXTERN_CVAR (Int, con_scaletext)
|
||||
|
||||
|
|
|
@ -34,13 +34,13 @@
|
|||
*/
|
||||
|
||||
#include "r_defs.h"
|
||||
#include "r_main.h"
|
||||
#include "m_random.h"
|
||||
#include "d_player.h"
|
||||
#include "d_event.h"
|
||||
#include "sbar.h"
|
||||
#include "sbarinfo.h"
|
||||
#include "templates.h"
|
||||
#include "r_utility.h"
|
||||
|
||||
#define ST_RAMPAGEDELAY (2*TICRATE)
|
||||
#define ST_MUCHPAIN 20
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "m_random.h"
|
||||
#include "d_player.h"
|
||||
#include "st_stuff.h"
|
||||
#include "r_local.h"
|
||||
#include "m_swap.h"
|
||||
#include "a_keys.h"
|
||||
#include "templates.h"
|
||||
|
@ -51,7 +50,6 @@
|
|||
#include "sbarinfo.h"
|
||||
#include "gi.h"
|
||||
#include "r_data/r_translate.h"
|
||||
#include "r_main.h"
|
||||
#include "a_weaponpiece.h"
|
||||
#include "a_strifeglobal.h"
|
||||
#include "g_level.h"
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include "colormatcher.h"
|
||||
#include "v_palette.h"
|
||||
#include "d_player.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#include "../version.h"
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "templates.h"
|
||||
#include "d_event.h"
|
||||
#include "v_font.h"
|
||||
#include "farchive.h"
|
||||
|
||||
// Include all the other Strife stuff here to reduce compile time
|
||||
#include "a_acolyte.cpp"
|
||||
|
@ -177,7 +178,7 @@
|
|||
117 Blood
|
||||
118 TeleportFog
|
||||
119 ItemFog
|
||||
120 --- Doomednum is 14, which makes it a teleport destination. Don't know why it's in the mobjinfo table.
|
||||
120 teleport destination
|
||||
121 KlaxonWarningLight
|
||||
122 CeilingTurret
|
||||
123 Piston
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "m_random.h"
|
||||
#include "d_player.h"
|
||||
#include "st_stuff.h"
|
||||
#include "r_local.h"
|
||||
#include "r_utility.h"
|
||||
#include "m_swap.h"
|
||||
#include "templates.h"
|
||||
#include "a_keys.h"
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
#include "doomtype.h"
|
||||
#include "colormatcher.h"
|
||||
//#include "r_data/r_translate.h"
|
||||
#include "i_system.h"
|
||||
#include "p_local.h"
|
||||
#include "p_lnspec.h"
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
#include "doomtype.h"
|
||||
#include "colormatcher.h"
|
||||
//#include "r_data/r_translate.h"
|
||||
#include "i_system.h"
|
||||
#include "p_local.h"
|
||||
#include "p_lnspec.h"
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "gl/system/gl_system.h"
|
||||
#include "doomtype.h"
|
||||
#include "colormatcher.h"
|
||||
//#include "r_data/r_translate.h"
|
||||
#include "i_system.h"
|
||||
#include "p_local.h"
|
||||
#include "p_lnspec.h"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "templates.h"
|
||||
#include "m_random.h"
|
||||
#include "r_main.h"
|
||||
//#include "r_main.h"
|
||||
#include "p_local.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "g_level.h"
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "doomstat.h"
|
||||
#include "g_level.h"
|
||||
#include "r_state.h"
|
||||
#include "d_player.h"
|
||||
//#include "resources/voxels.h"
|
||||
//#include "gl/gl_intern.h"
|
||||
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
#include "gl/system/gl_system.h"
|
||||
#include "files.h"
|
||||
#include "m_swap.h"
|
||||
#include "r_draw.h"
|
||||
//#include "r_draw.h"
|
||||
#include "v_video.h"
|
||||
#include "r_main.h"
|
||||
//#include "r_main.h"
|
||||
#include "r_data/r_translate.h"
|
||||
#include "m_png.h"
|
||||
#include "m_crc32.h"
|
||||
|
@ -94,7 +94,7 @@ void FGLRenderer::Initialize()
|
|||
mFBID = 0;
|
||||
SetupLevel();
|
||||
mShaderManager = new FShaderManager;
|
||||
mThreadManager = new FGLThreadManager;
|
||||
//mThreadManager = new FGLThreadManager;
|
||||
}
|
||||
|
||||
FGLRenderer::~FGLRenderer()
|
||||
|
@ -102,7 +102,7 @@ FGLRenderer::~FGLRenderer()
|
|||
gl_CleanModelData();
|
||||
gl_DeleteAllAttachedLights();
|
||||
FMaterial::FlushAll();
|
||||
if (mThreadManager != NULL) delete mThreadManager;
|
||||
//if (mThreadManager != NULL) delete mThreadManager;
|
||||
if (mShaderManager != NULL) delete mShaderManager;
|
||||
if (mVBO != NULL) delete mVBO;
|
||||
if (glpart2) delete glpart2;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "p_local.h"
|
||||
#include "a_sharedglobal.h"
|
||||
#include "r_sky.h"
|
||||
#include "r_bsp.h"
|
||||
#include "p_effect.h"
|
||||
#include "po_man.h"
|
||||
|
||||
#include "gl/renderer/gl_renderer.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
**
|
||||
*/
|
||||
|
||||
#include "r_main.h"
|
||||
//#include "r_main.h"
|
||||
#include "gl/scene/gl_clipper.h"
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#ifndef __GL_CLIPPER
|
||||
#define __GL_CLIPPER
|
||||
|
||||
#include "doomtype.h"
|
||||
#include "tables.h"
|
||||
#include "xs_Float.h"
|
||||
#include "r_utility.h"
|
||||
|
||||
class ClipNode
|
||||
{
|
||||
|
|
|
@ -41,8 +41,9 @@
|
|||
*/
|
||||
#include "gl/system/gl_system.h"
|
||||
#include "r_sky.h"
|
||||
#include "r_main.h"
|
||||
#include "r_defs.h"
|
||||
#include "r_utility.h"
|
||||
#include "r_state.h"
|
||||
#include "doomstat.h"
|
||||
|
||||
#include "gl/system/gl_cvars.h"
|
||||
#include "gl/data/gl_data.h"
|
||||
|
|
|
@ -42,9 +42,10 @@
|
|||
#include "a_sharedglobal.h"
|
||||
#include "r_defs.h"
|
||||
#include "r_sky.h"
|
||||
#include "r_main.h"
|
||||
#include "r_utility.h"
|
||||
#include "g_level.h"
|
||||
#include "doomstat.h"
|
||||
#include "d_player.h"
|
||||
|
||||
#include "gl/system/gl_cvars.h"
|
||||
#include "gl/renderer/gl_renderer.h"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include "a_sharedglobal.h"
|
||||
#include "r_main.h"
|
||||
#include "r_utility.h"
|
||||
#include "r_defs.h"
|
||||
#include "r_sky.h"
|
||||
#include "g_level.h"
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "g_level.h"
|
||||
#include "r_data/r_interpolate.h"
|
||||
#include "r_main.h"
|
||||
#include "r_things.h"
|
||||
#include "p_effect.h"
|
||||
#include "sbar.h"
|
||||
#include "po_man.h"
|
||||
#include "gl/gl_functions.h"
|
||||
|
@ -1019,7 +1019,7 @@ void FGLRenderer::RenderView (player_t* player)
|
|||
else r_TicFrac = I_GetTimeFrac (&r_FrameTime);
|
||||
gl_frameMS = I_MSTime();
|
||||
|
||||
R_FindParticleSubsectors ();
|
||||
P_FindParticleSubsectors ();
|
||||
|
||||
// prepare all camera textures that have been used in the last frame
|
||||
FCanvasTextureInfo::UpdateAll();
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
#include "a_sharedglobal.h"
|
||||
#include "g_level.h"
|
||||
#include "r_sky.h"
|
||||
#include "r_main.h"
|
||||
#include "r_state.h"
|
||||
#include "r_utility.h"
|
||||
#include "doomdata.h"
|
||||
#include "gl/gl_functions.h"
|
||||
|
||||
|
|
|
@ -39,12 +39,13 @@
|
|||
*/
|
||||
#include "gl/system/gl_system.h"
|
||||
#include "p_local.h"
|
||||
//#include "r_data/r_translate.h"
|
||||
#include "p_effect.h"
|
||||
#include "g_level.h"
|
||||
#include "doomstat.h"
|
||||
#include "gl/gl_functions.h"
|
||||
#include "r_defs.h"
|
||||
#include "r_sky.h"
|
||||
#include "r_main.h"
|
||||
|
||||
#include "gl/system/gl_framebuffer.h"
|
||||
#include "gl/system/gl_cvars.h"
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "gl/system/gl_system.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "p_local.h"
|
||||
#include "p_effect.h"
|
||||
#include "vectors.h"
|
||||
#include "gl/gl_functions.h"
|
||||
#include "g_level.h"
|
||||
|
|
|
@ -39,9 +39,10 @@
|
|||
*/
|
||||
#include "gl/system/gl_system.h"
|
||||
#include "sbar.h"
|
||||
#include "r_main.h"
|
||||
#include "r_utility.h"
|
||||
#include "v_video.h"
|
||||
#include "doomstat.h"
|
||||
#include "d_player.h"
|
||||
|
||||
#include "gl/system/gl_cvars.h"
|
||||
#include "gl/renderer/gl_renderer.h"
|
||||
|
@ -253,7 +254,7 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
|||
}
|
||||
|
||||
PalEntry ThingColor = playermo->fillcolor;
|
||||
vissprite_t vis;
|
||||
visstyle_t vis;
|
||||
|
||||
vis.RenderStyle=playermo->RenderStyle;
|
||||
vis.alpha=playermo->alpha;
|
||||
|
|
|
@ -44,12 +44,13 @@
|
|||
#include "m_swap.h"
|
||||
#include "r_draw.h"
|
||||
#include "v_video.h"
|
||||
#include "r_main.h"
|
||||
#include "doomstat.h"
|
||||
#include "m_png.h"
|
||||
#include "m_crc32.h"
|
||||
#include "vectors.h"
|
||||
#include "v_palette.h"
|
||||
#include "templates.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#include "gl/system/gl_framebuffer.h"
|
||||
#include "gl/renderer/gl_renderer.h"
|
||||
|
@ -413,10 +414,7 @@ void OpenGLFrameBuffer::StateChanged(AActor *actor)
|
|||
void OpenGLFrameBuffer::StartSerialize(FArchive &arc)
|
||||
{
|
||||
gl_DeleteAllAttachedLights();
|
||||
if (SaveVersion >= 2058)
|
||||
{
|
||||
arc << fogdensity << outsidefogdensity << skyfog;
|
||||
}
|
||||
arc << fogdensity << outsidefogdensity << skyfog;
|
||||
}
|
||||
|
||||
void OpenGLFrameBuffer::EndSerialize(FArchive &arc)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __GL_THREADS_H
|
||||
#if 0 //ndef __GL_THREADS_H
|
||||
#define __GL_THREADS_H
|
||||
|
||||
#ifdef WIN32
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
#include "w_wad.h"
|
||||
#include "m_png.h"
|
||||
#include "r_draw.h"
|
||||
//#include "r_draw.h"
|
||||
#include "sbar.h"
|
||||
#include "gi.h"
|
||||
#include "cmdlib.h"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
#include "gl/system/gl_system.h"
|
||||
#include "templates.h"
|
||||
#include "r_draw.h"
|
||||
//#include "r_draw.h"
|
||||
#include "m_crc32.h"
|
||||
#include "c_cvars.h"
|
||||
#include "c_dispatch.h"
|
||||
|
|
|
@ -38,16 +38,15 @@
|
|||
#include "gl/system/gl_system.h"
|
||||
#include "w_wad.h"
|
||||
#include "m_png.h"
|
||||
#include "r_draw.h"
|
||||
//#include "r_draw.h"
|
||||
#include "sbar.h"
|
||||
#include "gi.h"
|
||||
#include "cmdlib.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "stats.h"
|
||||
#include "r_main.h"
|
||||
#include "r_utility.h"
|
||||
#include "templates.h"
|
||||
#include "sc_man.h"
|
||||
//#include "r_data/r_translate.h"
|
||||
#include "colormatcher.h"
|
||||
|
||||
//#include "gl/gl_intern.h"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "g_level.h"
|
||||
#include "c_console.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "r_main.h"
|
||||
#include "r_utility.h"
|
||||
#include "v_video.h"
|
||||
#include "gl/utility/gl_clock.h"
|
||||
#include "gl/utility/gl_convert.h"
|
||||
|
|
|
@ -48,10 +48,11 @@
|
|||
#include "v_video.h"
|
||||
#include "hu_stuff.h"
|
||||
#include "gi.h"
|
||||
#include "v_palette.h"
|
||||
#include "i_input.h"
|
||||
#include "gameconfigfile.h"
|
||||
#include "gstrings.h"
|
||||
#include "r_main.h"
|
||||
#include "r_utility.h"
|
||||
#include "menu/menu.h"
|
||||
#include "textures/textures.h"
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "tarray.h"
|
||||
#include "m_bbox.h"
|
||||
#include "c_console.h"
|
||||
#include "r_main.h"
|
||||
#include "r_state.h"
|
||||
|
||||
const int MaxSegs = 64;
|
||||
const int SplitCost = 8;
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
|
||||
#include "nodebuild.h"
|
||||
#include "templates.h"
|
||||
#include "r_main.h"
|
||||
|
||||
#if 0
|
||||
#define D(x) x
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
#include "doomtype.h"
|
||||
#include "nodebuild.h"
|
||||
#include "r_main.h"
|
||||
|
||||
static inline void STACK_ARGS Warn (const char *format, ...)
|
||||
{
|
||||
|
|
|
@ -47,9 +47,9 @@
|
|||
#include "nodebuild.h"
|
||||
#include "templates.h"
|
||||
#include "m_bbox.h"
|
||||
#include "r_main.h"
|
||||
#include "i_system.h"
|
||||
#include "po_man.h"
|
||||
#include "r_state.h"
|
||||
|
||||
static const int PO_LINE_START = 1;
|
||||
static const int PO_LINE_EXPLICIT = 5;
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
#include "p_setup.h"
|
||||
#include "po_man.h"
|
||||
#include "actorptrselect.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#include "g_shared/a_pickups.h"
|
||||
|
||||
|
@ -1961,6 +1962,14 @@ IMPLEMENT_POINTY_CLASS (DLevelScript)
|
|||
DECLARE_POINTER(activator)
|
||||
END_POINTERS
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DLevelScript::EScriptState &state)
|
||||
{
|
||||
BYTE val = (BYTE)state;
|
||||
arc << val;
|
||||
state = (DLevelScript::EScriptState)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
void DLevelScript::Serialize (FArchive &arc)
|
||||
{
|
||||
DWORD i;
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "dobject.h"
|
||||
#include "dthinker.h"
|
||||
#include "doomtype.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#define LOCAL_SIZE 20
|
||||
#define NUM_MAPVARS 128
|
||||
|
@ -737,14 +736,6 @@ private:
|
|||
friend class DACSThinker;
|
||||
};
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DLevelScript::EScriptState &state)
|
||||
{
|
||||
BYTE val = (BYTE)state;
|
||||
arc << val;
|
||||
state = (DLevelScript::EScriptState)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
class DACSThinker : public DThinker
|
||||
{
|
||||
DECLARE_CLASS (DACSThinker, DThinker)
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "w_wad.h"
|
||||
#include "templates.h"
|
||||
#include "r_sky.h"
|
||||
#include "r_main.h"
|
||||
#include "r_defs.h"
|
||||
#include "p_setup.h"
|
||||
#include "g_level.h"
|
||||
|
|
|
@ -29,6 +29,21 @@
|
|||
#include "doomstat.h"
|
||||
#include "r_state.h"
|
||||
#include "gi.h"
|
||||
#include "farchive.h"
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DCeiling::ECeiling &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DCeiling::ECeiling)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include <assert.h>
|
||||
|
||||
#include "actor.h"
|
||||
#include "r_main.h"
|
||||
#include "p_conversation.h"
|
||||
#include "w_wad.h"
|
||||
#include "cmdlib.h"
|
||||
|
@ -60,6 +59,7 @@
|
|||
#include "sbar.h"
|
||||
#include "farchive.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "r_utility.h"
|
||||
#include "menu/menu.h"
|
||||
|
||||
// The conversations as they exist inside a SCRIPTxx lump.
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "i_system.h"
|
||||
#include "sc_man.h"
|
||||
#include "cmdlib.h"
|
||||
#include "farchive.h"
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -44,6 +45,14 @@
|
|||
|
||||
IMPLEMENT_CLASS (DDoor)
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DDoor::EVlDoor &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DDoor::EVlDoor)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
DDoor::DDoor ()
|
||||
{
|
||||
}
|
||||
|
|
114
src/p_effect.cpp
114
src/p_effect.cpp
|
@ -36,8 +36,10 @@
|
|||
|
||||
#include "doomtype.h"
|
||||
#include "doomstat.h"
|
||||
#include "i_system.h"
|
||||
#include "c_cvars.h"
|
||||
#include "actor.h"
|
||||
#include "m_argv.h"
|
||||
#include "p_effect.h"
|
||||
#include "p_local.h"
|
||||
#include "g_level.h"
|
||||
|
@ -54,9 +56,17 @@ CVAR (Int, cl_rockettrails, 1, CVAR_ARCHIVE);
|
|||
CVAR (Bool, r_rail_smartspiral, 0, CVAR_ARCHIVE);
|
||||
CVAR (Int, r_rail_spiralsparsity, 1, CVAR_ARCHIVE);
|
||||
CVAR (Int, r_rail_trailsparsity, 1, CVAR_ARCHIVE);
|
||||
CVAR (Bool, r_particles, true, 0);
|
||||
|
||||
#define FADEFROMTTL(a) (255/(a))
|
||||
|
||||
// [RH] particle globals
|
||||
WORD NumParticles;
|
||||
WORD ActiveParticles;
|
||||
WORD InactiveParticles;
|
||||
particle_t *Particles;
|
||||
TArray<WORD> ParticlesInSubsec;
|
||||
|
||||
static int grey1, grey2, grey3, grey4, red, green, blue, yellow, black,
|
||||
red1, green1, blue1, yellow1, purple, purple1, white,
|
||||
rblue1, rblue2, rblue3, rblue4, orange, yorange, dred, grey5,
|
||||
|
@ -95,10 +105,114 @@ static const struct ColorList {
|
|||
{NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
inline particle_t *NewParticle (void)
|
||||
{
|
||||
particle_t *result = NULL;
|
||||
if (InactiveParticles != NO_PARTICLE)
|
||||
{
|
||||
result = Particles + InactiveParticles;
|
||||
InactiveParticles = result->tnext;
|
||||
result->tnext = ActiveParticles;
|
||||
ActiveParticles = WORD(result - Particles);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// [RH] Particle functions
|
||||
//
|
||||
void P_InitParticles ();
|
||||
void P_DeinitParticles ();
|
||||
|
||||
// [BC] Allow the maximum number of particles to be specified by a cvar (so people
|
||||
// with lots of nice hardware can have lots of particles!).
|
||||
CUSTOM_CVAR( Int, r_maxparticles, 4000, CVAR_ARCHIVE )
|
||||
{
|
||||
if ( self == 0 )
|
||||
self = 4000;
|
||||
else if ( self < 100 )
|
||||
self = 100;
|
||||
|
||||
if ( gamestate != GS_STARTUP )
|
||||
{
|
||||
P_DeinitParticles( );
|
||||
P_InitParticles( );
|
||||
}
|
||||
}
|
||||
|
||||
void P_InitParticles ()
|
||||
{
|
||||
const char *i;
|
||||
|
||||
if ((i = Args->CheckValue ("-numparticles")))
|
||||
NumParticles = atoi (i);
|
||||
// [BC] Use r_maxparticles now.
|
||||
else
|
||||
NumParticles = r_maxparticles;
|
||||
|
||||
// This should be good, but eh...
|
||||
if ( NumParticles < 100 )
|
||||
NumParticles = 100;
|
||||
|
||||
P_DeinitParticles();
|
||||
Particles = new particle_t[NumParticles];
|
||||
P_ClearParticles ();
|
||||
atterm (P_DeinitParticles);
|
||||
}
|
||||
|
||||
void P_DeinitParticles()
|
||||
{
|
||||
if (Particles != NULL)
|
||||
{
|
||||
delete[] Particles;
|
||||
Particles = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void P_ClearParticles ()
|
||||
{
|
||||
int i;
|
||||
|
||||
memset (Particles, 0, NumParticles * sizeof(particle_t));
|
||||
ActiveParticles = NO_PARTICLE;
|
||||
InactiveParticles = 0;
|
||||
for (i = 0; i < NumParticles-1; i++)
|
||||
Particles[i].tnext = i + 1;
|
||||
Particles[i].tnext = NO_PARTICLE;
|
||||
}
|
||||
|
||||
// Group particles by subsectors. Because particles are always
|
||||
// in motion, there is little benefit to caching this information
|
||||
// from one frame to the next.
|
||||
|
||||
void P_FindParticleSubsectors ()
|
||||
{
|
||||
if (ParticlesInSubsec.Size() < (size_t)numsubsectors)
|
||||
{
|
||||
ParticlesInSubsec.Reserve (numsubsectors - ParticlesInSubsec.Size());
|
||||
}
|
||||
|
||||
clearbufshort (&ParticlesInSubsec[0], numsubsectors, NO_PARTICLE);
|
||||
|
||||
if (!r_particles)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (WORD i = ActiveParticles; i != NO_PARTICLE; i = Particles[i].tnext)
|
||||
{
|
||||
subsector_t *ssec = R_PointInSubsector (Particles[i].x, Particles[i].y);
|
||||
int ssnum = int(ssec-subsectors);
|
||||
Particles[i].subsector = ssec;
|
||||
Particles[i].snext = ParticlesInSubsec[ssnum];
|
||||
ParticlesInSubsec[ssnum] = i;
|
||||
}
|
||||
}
|
||||
|
||||
void P_InitEffects ()
|
||||
{
|
||||
const struct ColorList *color = Colors;
|
||||
|
||||
P_InitParticles();
|
||||
while (color->color)
|
||||
{
|
||||
*(color->color) = ColorMatcher.Pick (color->r, color->g, color->b);
|
||||
|
|
|
@ -49,7 +49,31 @@
|
|||
#define FX_BLACKFOUNTAIN 0x00060000
|
||||
#define FX_WHITEFOUNTAIN 0x00070000
|
||||
|
||||
struct particle_t;
|
||||
// [RH] Particle details
|
||||
struct particle_t
|
||||
{
|
||||
fixed_t x,y,z;
|
||||
fixed_t velx,vely,velz;
|
||||
fixed_t accx,accy,accz;
|
||||
BYTE ttl;
|
||||
BYTE trans;
|
||||
BYTE size;
|
||||
BYTE fade;
|
||||
int color;
|
||||
WORD tnext;
|
||||
WORD snext;
|
||||
subsector_t * subsector;
|
||||
};
|
||||
|
||||
extern particle_t *Particles;
|
||||
extern TArray<WORD> ParticlesInSubsec;
|
||||
|
||||
const WORD NO_PARTICLE = 0xffff;
|
||||
|
||||
void P_ClearParticles ();
|
||||
void P_FindParticleSubsectors ();
|
||||
|
||||
|
||||
class AActor;
|
||||
|
||||
particle_t *JitterParticle (int ttl);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "doomstat.h"
|
||||
#include "r_state.h"
|
||||
#include "tables.h"
|
||||
#include "farchive.h"
|
||||
#include "p_3dmidtex.h"
|
||||
#include "r_data/r_interpolate.h"
|
||||
|
||||
|
@ -38,6 +39,20 @@
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DFloor::EFloor &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DFloor::EFloor)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
static void StartFloorSound (sector_t *sec)
|
||||
{
|
||||
if (sec->seqType >= 0)
|
||||
|
@ -870,6 +885,14 @@ IMPLEMENT_POINTY_CLASS (DElevator)
|
|||
DECLARE_POINTER(m_Interp_Ceiling)
|
||||
END_POINTERS
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DElevator::EElevator &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DElevator::EElevator)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
DElevator::DElevator ()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
// State.
|
||||
#include "r_state.h"
|
||||
#include "statnums.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static FRandom pr_flicker ("Flicker");
|
||||
static FRandom pr_lightflash ("LightFlash");
|
||||
|
|
|
@ -23,9 +23,12 @@
|
|||
#ifndef __P_LOCAL__
|
||||
#define __P_LOCAL__
|
||||
|
||||
#ifndef __R_LOCAL__
|
||||
#include "r_local.h"
|
||||
#endif
|
||||
#include "doomtype.h"
|
||||
#include "doomdef.h"
|
||||
#include "tables.h"
|
||||
#include "r_state.h"
|
||||
#include "r_utility.h"
|
||||
#include "d_player.h"
|
||||
|
||||
#include "a_morph.h"
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#include "v_palette.h"
|
||||
#include "p_enemy.h"
|
||||
#include "gstrings.h"
|
||||
#include "farchive.h"
|
||||
#include "r_data/colormaps.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "p_spec.h"
|
||||
#include "g_level.h"
|
||||
#include "s_sndseq.h"
|
||||
#include "farchive.h"
|
||||
#include "r_data/r_interpolate.h"
|
||||
|
||||
IMPLEMENT_POINTY_CLASS (DPillar)
|
||||
|
@ -44,6 +45,14 @@ IMPLEMENT_POINTY_CLASS (DPillar)
|
|||
DECLARE_POINTER(m_Interp_Ceiling)
|
||||
END_POINTERS
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DPillar::EPillar &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DPillar::EPillar)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
DPillar::DPillar ()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -30,11 +30,27 @@
|
|||
#include "doomstat.h"
|
||||
#include "r_state.h"
|
||||
#include "gi.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static FRandom pr_doplat ("DoPlat");
|
||||
|
||||
IMPLEMENT_CLASS (DPlat)
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DPlat::EPlatType &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DPlat::EPlatType)val;
|
||||
return arc;
|
||||
}
|
||||
inline FArchive &operator<< (FArchive &arc, DPlat::EPlatState &state)
|
||||
{
|
||||
BYTE val = (BYTE)state;
|
||||
arc << val;
|
||||
state = (DPlat::EPlatState)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
DPlat::DPlat ()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include "templates.h"
|
||||
#include "thingdef/thingdef.h"
|
||||
#include "g_level.h"
|
||||
#include "farchive.h"
|
||||
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -49,12 +49,18 @@
|
|||
#include "po_man.h"
|
||||
#include "p_setup.h"
|
||||
#include "r_data/colormaps.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static void CopyPlayer (player_t *dst, player_t *src, const char *name);
|
||||
static void ReadOnePlayer (FArchive &arc, bool skipload);
|
||||
static void ReadMultiplePlayers (FArchive &arc, int numPlayers, int numPlayersNow, bool skipload);
|
||||
static void SpawnExtraPlayers ();
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, FLinkedSector &link)
|
||||
{
|
||||
arc << link.Sector << link.Type;
|
||||
return arc;
|
||||
}
|
||||
|
||||
//
|
||||
// P_ArchivePlayers
|
||||
|
|
|
@ -25,9 +25,10 @@
|
|||
#include "c_cvars.h"
|
||||
#include "doomstat.h"
|
||||
#include "g_level.h"
|
||||
#include "r_main.h"
|
||||
#include "nodebuild.h"
|
||||
#include "po_man.h"
|
||||
#include "farchive.h"
|
||||
#include "r_utility.h"
|
||||
#include "r_data/colormaps.h"
|
||||
|
||||
|
||||
|
@ -831,6 +832,16 @@ bool secplane_t::CopyPlaneIfValid (secplane_t *dest, const secplane_t *opp) cons
|
|||
return copy;
|
||||
}
|
||||
|
||||
FArchive &operator<< (FArchive &arc, secplane_t &plane)
|
||||
{
|
||||
arc << plane.a << plane.b << plane.c << plane.d;
|
||||
//if (plane.c != 0)
|
||||
{ // plane.c should always be non-0. Otherwise, the plane
|
||||
// would be perfectly vertical.
|
||||
plane.ic = DivScale32 (1, plane.c);
|
||||
}
|
||||
return arc;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
@ -3958,7 +3958,7 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
R_OldBlend = 0xffffffff;
|
||||
|
||||
// [RH] Remove all particles
|
||||
R_ClearParticles ();
|
||||
P_ClearParticles ();
|
||||
|
||||
times[17].Clock();
|
||||
// preload graphics and sounds
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "m_bbox.h"
|
||||
#include "w_wad.h"
|
||||
|
||||
#include "r_local.h"
|
||||
#include "p_local.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "p_terrain.h"
|
||||
|
@ -60,6 +59,7 @@
|
|||
#include "g_level.h"
|
||||
#include "v_font.h"
|
||||
#include "a_sharedglobal.h"
|
||||
#include "farchive.h"
|
||||
|
||||
// State.
|
||||
#include "r_state.h"
|
||||
|
@ -85,6 +85,14 @@ IMPLEMENT_POINTY_CLASS (DPusher)
|
|||
DECLARE_POINTER (m_Source)
|
||||
END_POINTERS
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DScroller::EScrollType &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DScroller::EScrollType)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
DScroller::DScroller ()
|
||||
{
|
||||
}
|
||||
|
@ -109,6 +117,14 @@ DPusher::DPusher ()
|
|||
{
|
||||
}
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DPusher::EPusher &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DPusher::EPusher)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
void DPusher::Serialize (FArchive &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
|
|
70
src/p_spec.h
70
src/p_spec.h
|
@ -97,14 +97,6 @@ private:
|
|||
// (This is so scrolling floors and objects on them can move at same speed.)
|
||||
enum { CARRYFACTOR = ((fixed_t)(FRACUNIT*.09375)) };
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DScroller::EScrollType &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DScroller::EScrollType)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
// phares 3/20/98: added new model of Pushers for push/pull effects
|
||||
|
||||
class DPusher : public DThinker
|
||||
|
@ -150,14 +142,6 @@ protected:
|
|||
|
||||
bool PIT_PushThing (AActor *thing);
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DPusher::EPusher &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DPusher::EPusher)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
// Define values for map objects
|
||||
#define MO_TELEPORTMAN 14
|
||||
|
||||
|
@ -466,21 +450,6 @@ bool EV_DoPlat (int tag, line_t *line, DPlat::EPlatType type,
|
|||
void EV_StopPlat (int tag);
|
||||
void P_ActivateInStasis (int tag);
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DPlat::EPlatType &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DPlat::EPlatType)val;
|
||||
return arc;
|
||||
}
|
||||
inline FArchive &operator<< (FArchive &arc, DPlat::EPlatState &state)
|
||||
{
|
||||
BYTE val = (BYTE)state;
|
||||
arc << val;
|
||||
state = (DPlat::EPlatState)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
//
|
||||
// [RH]
|
||||
// P_PILLAR
|
||||
|
@ -520,14 +489,6 @@ private:
|
|||
DPillar ();
|
||||
};
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DPillar::EPillar &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DPillar::EPillar)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
bool EV_DoPillar (DPillar::EPillar type, int tag, fixed_t speed, fixed_t height,
|
||||
fixed_t height2, int crush, bool hexencrush);
|
||||
|
||||
|
@ -588,14 +549,6 @@ bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing,
|
|||
void P_SpawnDoorCloseIn30 (sector_t *sec);
|
||||
void P_SpawnDoorRaiseIn5Mins (sector_t *sec);
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DDoor::EVlDoor &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DDoor::EVlDoor)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
class DAnimatedDoor : public DMovingCeiling
|
||||
{
|
||||
DECLARE_CLASS (DAnimatedDoor, DMovingCeiling)
|
||||
|
@ -717,13 +670,6 @@ bool EV_DoCeiling (DCeiling::ECeiling type, line_t *line,
|
|||
bool EV_CeilingCrushStop (int tag);
|
||||
void P_ActivateInStasisCeiling (int tag);
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DCeiling::ECeiling &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DCeiling::ECeiling)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
@ -824,14 +770,6 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
|
|||
bool EV_FloorCrushStop (int tag);
|
||||
bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DFloor::EFloor &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DFloor::EFloor)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
class DElevator : public DMover
|
||||
{
|
||||
DECLARE_CLASS (DElevator, DMover)
|
||||
|
@ -873,14 +811,6 @@ private:
|
|||
bool EV_DoElevator (line_t *line, DElevator::EElevator type, fixed_t speed,
|
||||
fixed_t height, int tag);
|
||||
|
||||
inline FArchive &operator<< (FArchive &arc, DElevator::EElevator &type)
|
||||
{
|
||||
BYTE val = (BYTE)type;
|
||||
arc << val;
|
||||
type = (DElevator::EElevator)val;
|
||||
return arc;
|
||||
}
|
||||
|
||||
class DWaggleBase : public DMover
|
||||
{
|
||||
DECLARE_CLASS (DWaggleBase, DMover)
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "w_wad.h"
|
||||
#include "tarray.h"
|
||||
#include "cmdlib.h"
|
||||
#include "farchive.h"
|
||||
|
||||
#include "gi.h"
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
**
|
||||
*/
|
||||
|
||||
#include "doomstat.h"
|
||||
#include "p_setup.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "templates.h"
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include "g_level.h"
|
||||
#include "d_net.h"
|
||||
#include "gstrings.h"
|
||||
#include "farchive.h"
|
||||
|
||||
static FRandom pr_skullpop ("SkullPop");
|
||||
|
||||
|
@ -210,6 +211,11 @@ CCMD (playerclasses)
|
|||
|
||||
bool onground;
|
||||
|
||||
FArchive &operator<< (FArchive &arc, player_t *&p)
|
||||
{
|
||||
return arc.SerializePointer (players, (BYTE **)&p, sizeof(*players));
|
||||
}
|
||||
|
||||
// The player_t constructor. Since LogText is not a POD, we cannot just
|
||||
// memset it all to 0.
|
||||
player_t::player_t()
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue