- 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:
Christoph Oelckers 2011-07-06 18:59:20 +00:00
parent 5540b6fefc
commit 4e74a881b6
133 changed files with 737 additions and 623 deletions

View file

@ -1094,6 +1094,10 @@
RelativePath=".\src\actor.h" RelativePath=".\src\actor.h"
> >
</File> </File>
<File
RelativePath=".\src\actorptrselect.h"
>
</File>
<File <File
RelativePath=".\src\am_map.h" RelativePath=".\src\am_map.h"
> >
@ -2332,10 +2336,6 @@
RelativePath=".\src\r_drawt.cpp" RelativePath=".\src\r_drawt.cpp"
> >
</File> </File>
<File
RelativePath=".\src\r_interpolate.cpp"
>
</File>
<File <File
RelativePath=".\src\r_main.cpp" RelativePath=".\src\r_main.cpp"
> >
@ -2360,10 +2360,6 @@
RelativePath=".\src\r_things.cpp" RelativePath=".\src\r_things.cpp"
> >
</File> </File>
<File
RelativePath=".\src\r_translate.cpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Render Headers" Name="Render Headers"
@ -2372,10 +2368,6 @@
RelativePath=".\src\r_3dfloors.h" RelativePath=".\src\r_3dfloors.h"
> >
</File> </File>
<File
RelativePath=".\src\r_blend.h"
>
</File>
<File <File
RelativePath=".\src\r_bsp.h" RelativePath=".\src\r_bsp.h"
> >
@ -2388,14 +2380,6 @@
RelativePath=".\src\r_draw.h" RelativePath=".\src\r_draw.h"
> >
</File> </File>
<File
RelativePath=".\src\r_interpolate.h"
>
</File>
<File
RelativePath=".\src\r_jpeg.h"
>
</File>
<File <File
RelativePath=".\src\r_local.h" RelativePath=".\src\r_local.h"
> >
@ -2429,7 +2413,7 @@
> >
</File> </File>
<File <File
RelativePath=".\src\r_translate.h" RelativePath=".\src\r_utility.h"
> >
</File> </File>
</Filter> </Filter>
@ -7124,32 +7108,8 @@
</Filter> </Filter>
</Filter> </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 <Filter
Name="Textures" Name="Textures"
> >
@ -7242,6 +7202,62 @@
> >
</File> </File>
</Filter> </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> </Filter>
</Files> </Files>
<Globals> <Globals>

View file

@ -39,6 +39,7 @@
#include "r_bsp.h" #include "r_bsp.h"
#include "p_setup.h" #include "p_setup.h"
#include "c_bind.h" #include "c_bind.h"
#include "farchive.h"
#include "m_cheat.h" #include "m_cheat.h"
#include "i_system.h" #include "i_system.h"

View file

@ -12,6 +12,7 @@
#include "cmdlib.h" #include "cmdlib.h"
#include "teaminfo.h" #include "teaminfo.h"
#include "d_net.h" #include "d_net.h"
#include "farchive.h"
CVAR (Int, bot_next_color, 11, 0) CVAR (Int, bot_next_color, 11, 0)
CVAR (Bool, bot_observer, false, 0) CVAR (Bool, bot_observer, false, 0)

View file

@ -15,7 +15,6 @@
#include "g_game.h" #include "g_game.h"
#include "m_random.h" #include "m_random.h"
#include "r_sky.h" #include "r_sky.h"
#include "r_main.h"
#include "st_stuff.h" #include "st_stuff.h"
#include "stats.h" #include "stats.h"
#include "i_system.h" #include "i_system.h"

View file

@ -12,7 +12,6 @@
#include "g_game.h" #include "g_game.h"
#include "d_ticcmd.h" #include "d_ticcmd.h"
#include "m_random.h" #include "m_random.h"
#include "r_main.h"
#include "i_system.h" #include "i_system.h"
#include "p_lnspec.h" #include "p_lnspec.h"
#include "gi.h" #include "gi.h"

View file

@ -14,7 +14,6 @@
#include "b_bot.h" #include "b_bot.h"
#include "g_game.h" #include "g_game.h"
#include "m_random.h" #include "m_random.h"
#include "r_main.h"
#include "stats.h" #include "stats.h"
#include "a_pickups.h" #include "a_pickups.h"
#include "statnums.h" #include "statnums.h"

View file

@ -61,7 +61,6 @@
#include "gi.h" #include "gi.h"
#include "r_defs.h" #include "r_defs.h"
#include "d_player.h" #include "d_player.h"
#include "r_main.h"
#include "templates.h" #include "templates.h"
#include "p_local.h" #include "p_local.h"
#include "r_sky.h" #include "r_sky.h"
@ -663,32 +662,6 @@ CCMD (fov)
Net_WriteByte (clamp (atoi (argv[1]), 5, 179)); 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 // CCMD warp

View file

@ -53,7 +53,6 @@
#include "v_video.h" #include "v_video.h"
#include "v_text.h" #include "v_text.h"
#include "w_wad.h" #include "w_wad.h"
#include "r_main.h"
#include "sbar.h" #include "sbar.h"
#include "s_sound.h" #include "s_sound.h"
#include "s_sndseq.h" #include "s_sndseq.h"
@ -64,6 +63,7 @@
#include "d_net.h" #include "d_net.h"
#include "g_level.h" #include "g_level.h"
#include "d_event.h" #include "d_event.h"
#include "d_player.h"
#include "gi.h" #include "gi.h"

View file

@ -53,6 +53,7 @@
#include "v_text.h" #include "v_text.h"
#include "d_net.h" #include "d_net.h"
#include "d_main.h" #include "d_main.h"
#include "farchive.h"
// MACROS ------------------------------------------------------------------ // MACROS ------------------------------------------------------------------

View file

@ -71,6 +71,7 @@
#include "i_system.h" #include "i_system.h"
#include "doomerrors.h" #include "doomerrors.h"
#include "p_effect.h" #include "p_effect.h"
#include "farchive.h"
// [SO] Just the way Randy said to do it :) // [SO] Just the way Randy said to do it :)
// [RH] Made this CVAR_SERVERINFO // [RH] Made this CVAR_SERVERINFO

View file

@ -43,6 +43,7 @@
#include "d_netinf.h" #include "d_netinf.h"
#include "d_net.h" #include "d_net.h"
#include "d_protocol.h" #include "d_protocol.h"
#include "d_player.h"
#include "c_dispatch.h" #include "c_dispatch.h"
#include "v_palette.h" #include "v_palette.h"
#include "v_video.h" #include "v_video.h"
@ -55,6 +56,7 @@
#include "r_data/r_translate.h" #include "r_data/r_translate.h"
#include "templates.h" #include "templates.h"
#include "cmdlib.h" #include "cmdlib.h"
#include "farchive.h"
static FRandom pr_pickteam ("PickRandomTeam"); static FRandom pr_pickteam ("PickRandomTeam");

View file

@ -413,10 +413,7 @@ public:
// Bookkeeping on players - state. // Bookkeeping on players - state.
extern player_t players[MAXPLAYERS]; extern player_t players[MAXPLAYERS];
inline FArchive &operator<< (FArchive &arc, player_t *&p) FArchive &operator<< (FArchive &arc, player_t *&p);
{
return arc.SerializePointer (players, (BYTE **)&p, sizeof(*players));
}
void P_CheckPlayerSprites(); void P_CheckPlayerSprites();

View file

@ -48,6 +48,7 @@
#include "g_level.h" #include "g_level.h"
#include "colormatcher.h" #include "colormatcher.h"
#include "b_bot.h" #include "b_bot.h"
#include "farchive.h"
FDecalLib DecalLibrary; FDecalLib DecalLibrary;

View file

@ -47,6 +47,7 @@
#include "stats.h" #include "stats.h"
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "dsectoreffect.h" #include "dsectoreffect.h"
#include "farchive.h"
PClass DObject::_StaticType; PClass DObject::_StaticType;
ClassReg DObject::RegistrationInfo = ClassReg DObject::RegistrationInfo =

View file

@ -28,6 +28,7 @@
#include "p_3dmidtex.h" #include "p_3dmidtex.h"
#include "r_data/r_interpolate.h" #include "r_data/r_interpolate.h"
#include "statnums.h" #include "statnums.h"
#include "farchive.h"
IMPLEMENT_CLASS (DSectorEffect) IMPLEMENT_CLASS (DSectorEffect)

View file

@ -38,6 +38,7 @@
#include "statnums.h" #include "statnums.h"
#include "i_system.h" #include "i_system.h"
#include "doomerrors.h" #include "doomerrors.h"
#include "farchive.h"
static cycle_t ThinkCycles; static cycle_t ThinkCycles;

View file

@ -55,7 +55,6 @@
#include "c_dispatch.h" #include "c_dispatch.h"
#include "d_player.h" #include "d_player.h"
#include "dobject.h" #include "dobject.h"
#include "r_local.h"
// These are special tokens found in the data stream of an archive. // These are special tokens found in the data stream of an archive.
// Whenever a new object is encountered, it gets created using new and // 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; 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));
}

View file

@ -36,6 +36,7 @@
#include <stdio.h> #include <stdio.h>
#include "dobject.h" #include "dobject.h"
#include "r_state.h"
class FFile class FFile
{ {
@ -318,4 +319,17 @@ inline FArchive &operator<< (FArchive &arc, TArray<T,TT> &self)
return arc; 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__ #endif //__FARCHIVE_H__

View file

@ -66,6 +66,7 @@
#include "v_palette.h" #include "v_palette.h"
#include "v_font.h" #include "v_font.h"
#include "r_data/colormaps.h" #include "r_data/colormaps.h"
#include "farchive.h"
#include "gl/gl_functions.h" #include "gl/gl_functions.h"

View file

@ -45,7 +45,6 @@
// //
// //
#include "r_local.h"
#include "t_script.h" #include "t_script.h"
#include "p_lnspec.h" #include "p_lnspec.h"
#include "a_keys.h" #include "a_keys.h"
@ -55,6 +54,7 @@
#include "i_system.h" #include "i_system.h"
#include "doomerrors.h" #include "doomerrors.h"
#include "doomstat.h" #include "doomstat.h"
#include "farchive.h"
//========================================================================== //==========================================================================
// //

View file

@ -13,6 +13,7 @@
#include "a_specialspot.h" #include "a_specialspot.h"
#include "templates.h" #include "templates.h"
#include "m_bbox.h" #include "m_bbox.h"
#include "farchive.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"

View file

@ -77,6 +77,7 @@
#include "d_event.h" #include "d_event.h"
#include "p_acs.h" #include "p_acs.h"
#include "m_joy.h" #include "m_joy.h"
#include "farchive.h"
#include "r_data/colormaps.h" #include "r_data/colormaps.h"
#include <zlib.h> #include <zlib.h>

View file

@ -14,6 +14,7 @@
#include "templates.h" #include "templates.h"
#include "r_data/r_translate.h" #include "r_data/r_translate.h"
#include "doomstat.h" #include "doomstat.h"
#include "farchive.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"

View file

@ -17,6 +17,7 @@
#include "p_terrain.h" #include "p_terrain.h"
#include "m_bbox.h" #include "m_bbox.h"
#include "ravenshared.h" #include "ravenshared.h"
#include "farchive.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"

View file

@ -79,6 +79,7 @@
#include "menu/menu.h" #include "menu/menu.h"
#include "a_strifeglobal.h" #include "a_strifeglobal.h"
#include "r_data/colormaps.h" #include "r_data/colormaps.h"
#include "farchive.h"
#include "gi.h" #include "gi.h"

View file

@ -11,6 +11,7 @@
#include "thingdef/thingdef.h" #include "thingdef/thingdef.h"
#include "g_level.h" #include "g_level.h"
#include "doomstat.h" #include "doomstat.h"
#include "farchive.h"
#define MAULATORTICS (25*35) #define MAULATORTICS (25*35)

View file

@ -11,6 +11,7 @@
#include "p_enemy.h" #include "p_enemy.h"
#include "statnums.h" #include "statnums.h"
#include "templates.h" #include "templates.h"
#include "farchive.h"
#include "r_data/r_translate.h" #include "r_data/r_translate.h"
static FRandom pr_freezedeath ("FreezeDeath"); static FRandom pr_freezedeath ("FreezeDeath");

View file

@ -6,6 +6,7 @@
#include "templates.h" #include "templates.h"
#include "g_level.h" #include "g_level.h"
#include "d_player.h" #include "d_player.h"
#include "farchive.h"
IMPLEMENT_CLASS (AArmor) IMPLEMENT_CLASS (AArmor)

View file

@ -19,6 +19,7 @@
#include "g_level.h" #include "g_level.h"
#include "doomstat.h" #include "doomstat.h"
#include "v_palette.h" #include "v_palette.h"
#include "farchive.h"
#include "r_data/colormaps.h" #include "r_data/colormaps.h"
static FRandom pr_torch ("Torch"); 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); int changed = Inventory == NULL ? false : Inventory->AlterWeaponSprite(vis);
if (Owner != NULL) 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); int changed = Inventory == NULL ? false : Inventory->AlterWeaponSprite(vis);
// Blink if the powerup is wearing off // Blink if the powerup is wearing off

View file

@ -54,7 +54,7 @@ protected:
void InitEffect (); void InitEffect ();
void DoEffect (); void DoEffect ();
void EndEffect (); void EndEffect ();
int AlterWeaponSprite (vissprite_t *vis); int AlterWeaponSprite (visstyle_t *vis);
}; };
class APowerStrength : public APowerup class APowerStrength : public APowerup
@ -76,7 +76,7 @@ protected:
void InitEffect (); void InitEffect ();
void DoEffect (); void DoEffect ();
void EndEffect (); void EndEffect ();
int AlterWeaponSprite (vissprite_t *vis); int AlterWeaponSprite (visstyle_t *vis);
// FRenderStyle OwnersNormalStyle; // FRenderStyle OwnersNormalStyle;
// fixed_t OwnersNormalAlpha; // fixed_t OwnersNormalAlpha;
}; };

View file

@ -35,8 +35,8 @@
#include "actor.h" #include "actor.h"
#include "info.h" #include "info.h"
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "r_main.h"
#include "p_local.h" #include "p_local.h"
#include "farchive.h"
/* /*
== SecurityCamera == SecurityCamera

View file

@ -44,6 +44,7 @@
#include "d_net.h" #include "d_net.h"
#include "colormatcher.h" #include "colormatcher.h"
#include "v_palette.h" #include "v_palette.h"
#include "farchive.h"
static fixed_t DecalWidth, DecalLeft, DecalRight; static fixed_t DecalWidth, DecalLeft, DecalRight;
static fixed_t SpreadZ; static fixed_t SpreadZ;

View file

@ -1,6 +1,7 @@
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "g_level.h" #include "g_level.h"
#include "d_player.h" #include "d_player.h"
#include "farchive.h"
IMPLEMENT_POINTY_CLASS (DFlashFader) IMPLEMENT_POINTY_CLASS (DFlashFader)
DECLARE_POINTER (ForWho) DECLARE_POINTER (ForWho)

View file

@ -1,4 +1,5 @@
#include "a_lightning.h" #include "a_lightning.h"
#include "doomstat.h"
#include "p_lnspec.h" #include "p_lnspec.h"
#include "statnums.h" #include "statnums.h"
#include "m_random.h" #include "m_random.h"
@ -8,6 +9,7 @@
#include "r_sky.h" #include "r_sky.h"
#include "g_level.h" #include "g_level.h"
#include "r_state.h" #include "r_state.h"
#include "farchive.h"
static FRandom pr_lightning ("Lightning"); static FRandom pr_lightning ("Lightning");

View file

@ -11,6 +11,7 @@
#include "a_morph.h" #include "a_morph.h"
#include "doomstat.h" #include "doomstat.h"
#include "g_level.h" #include "g_level.h"
#include "farchive.h"
static FRandom pr_morphmonst ("MorphMonster"); static FRandom pr_morphmonst ("MorphMonster");

View file

@ -37,6 +37,7 @@
#include "p_local.h" #include "p_local.h"
#include "p_lnspec.h" #include "p_lnspec.h"
#include "doomstat.h" #include "doomstat.h"
#include "farchive.h"
/* /*
== InterpolationPoint: node along a camera's path == InterpolationPoint: node along a camera's path

View file

@ -18,6 +18,7 @@
#include "g_level.h" #include "g_level.h"
#include "g_game.h" #include "g_game.h"
#include "doomstat.h" #include "doomstat.h"
#include "farchive.h"
static FRandom pr_restore ("RestorePos"); 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) if (Inventory != NULL)
{ {

View file

@ -10,6 +10,7 @@
class player_t; class player_t;
class FConfigFile; class FConfigFile;
class AWeapon; class AWeapon;
struct visstyle_t;
class FWeaponSlot class FWeaponSlot
{ {
@ -132,7 +133,6 @@ enum
IF_PERSISTENTPOWER = 1<<18, // Powerup is kept when travelling between levels IF_PERSISTENTPOWER = 1<<18, // Powerup is kept when travelling between levels
}; };
struct vissprite_t;
class AInventory : public AActor class AInventory : public AActor
{ {
@ -192,7 +192,7 @@ public:
virtual void AbsorbDamage (int damage, FName damageType, int &newdamage); virtual void AbsorbDamage (int damage, FName damageType, int &newdamage);
virtual void ModifyDamage (int damage, FName damageType, int &newdamage, bool passive); virtual void ModifyDamage (int damage, FName damageType, int &newdamage, bool passive);
virtual fixed_t GetSpeedFactor(); virtual fixed_t GetSpeedFactor();
virtual int AlterWeaponSprite (vissprite_t *vis); virtual int AlterWeaponSprite (visstyle_t *vis);
virtual PalEntry GetBlend (); virtual PalEntry GetBlend ();

View file

@ -7,6 +7,7 @@
#include "c_console.h" #include "c_console.h"
#include "doomstat.h" #include "doomstat.h"
#include "v_font.h" #include "v_font.h"
#include "farchive.h"
IMPLEMENT_CLASS (APuzzleItem) IMPLEMENT_CLASS (APuzzleItem)

View file

@ -8,6 +8,7 @@
#include "s_sound.h" #include "s_sound.h"
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "statnums.h" #include "statnums.h"
#include "farchive.h"
static FRandom pr_quake ("Quake"); static FRandom pr_quake ("Quake");

View file

@ -36,6 +36,7 @@
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "p_local.h" #include "p_local.h"
#include "p_lnspec.h" #include "p_lnspec.h"
#include "farchive.h"
// arg0 = Visibility*4 for this skybox // arg0 = Visibility*4 for this skybox

View file

@ -39,6 +39,7 @@
#include "i_system.h" #include "i_system.h"
#include "thingdef/thingdef.h" #include "thingdef/thingdef.h"
#include "doomstat.h" #include "doomstat.h"
#include "farchive.h"
static FRandom pr_spot ("SpecialSpot"); static FRandom pr_spot ("SpecialSpot");
static FRandom pr_spawnmace ("SpawnMace"); static FRandom pr_spawnmace ("SpawnMace");

View file

@ -17,6 +17,7 @@
#include "doomstat.h" #include "doomstat.h"
#include "g_level.h" #include "g_level.h"
#include "d_net.h" #include "d_net.h"
#include "farchive.h"
#define BONUSADD 6 #define BONUSADD 6

View file

@ -39,6 +39,7 @@
#include "v_video.h" #include "v_video.h"
#include "cmdlib.h" #include "cmdlib.h"
#include "doomstat.h" #include "doomstat.h"
#include "farchive.h"
EXTERN_CVAR (Int, con_scaletext) EXTERN_CVAR (Int, con_scaletext)

View file

@ -34,13 +34,13 @@
*/ */
#include "r_defs.h" #include "r_defs.h"
#include "r_main.h"
#include "m_random.h" #include "m_random.h"
#include "d_player.h" #include "d_player.h"
#include "d_event.h" #include "d_event.h"
#include "sbar.h" #include "sbar.h"
#include "sbarinfo.h" #include "sbarinfo.h"
#include "templates.h" #include "templates.h"
#include "r_utility.h"
#define ST_RAMPAGEDELAY (2*TICRATE) #define ST_RAMPAGEDELAY (2*TICRATE)
#define ST_MUCHPAIN 20 #define ST_MUCHPAIN 20

View file

@ -43,7 +43,6 @@
#include "m_random.h" #include "m_random.h"
#include "d_player.h" #include "d_player.h"
#include "st_stuff.h" #include "st_stuff.h"
#include "r_local.h"
#include "m_swap.h" #include "m_swap.h"
#include "a_keys.h" #include "a_keys.h"
#include "templates.h" #include "templates.h"
@ -51,7 +50,6 @@
#include "sbarinfo.h" #include "sbarinfo.h"
#include "gi.h" #include "gi.h"
#include "r_data/r_translate.h" #include "r_data/r_translate.h"
#include "r_main.h"
#include "a_weaponpiece.h" #include "a_weaponpiece.h"
#include "a_strifeglobal.h" #include "a_strifeglobal.h"
#include "g_level.h" #include "g_level.h"

View file

@ -51,6 +51,7 @@
#include "colormatcher.h" #include "colormatcher.h"
#include "v_palette.h" #include "v_palette.h"
#include "d_player.h" #include "d_player.h"
#include "farchive.h"
#include "../version.h" #include "../version.h"

View file

@ -18,6 +18,7 @@
#include "templates.h" #include "templates.h"
#include "d_event.h" #include "d_event.h"
#include "v_font.h" #include "v_font.h"
#include "farchive.h"
// Include all the other Strife stuff here to reduce compile time // Include all the other Strife stuff here to reduce compile time
#include "a_acolyte.cpp" #include "a_acolyte.cpp"
@ -177,7 +178,7 @@
117 Blood 117 Blood
118 TeleportFog 118 TeleportFog
119 ItemFog 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 121 KlaxonWarningLight
122 CeilingTurret 122 CeilingTurret
123 Piston 123 Piston

View file

@ -8,7 +8,7 @@
#include "m_random.h" #include "m_random.h"
#include "d_player.h" #include "d_player.h"
#include "st_stuff.h" #include "st_stuff.h"
#include "r_local.h" #include "r_utility.h"
#include "m_swap.h" #include "m_swap.h"
#include "templates.h" #include "templates.h"
#include "a_keys.h" #include "a_keys.h"

View file

@ -42,7 +42,6 @@
#include "doomtype.h" #include "doomtype.h"
#include "colormatcher.h" #include "colormatcher.h"
//#include "r_data/r_translate.h"
#include "i_system.h" #include "i_system.h"
#include "p_local.h" #include "p_local.h"
#include "p_lnspec.h" #include "p_lnspec.h"

View file

@ -41,7 +41,6 @@
#include "doomtype.h" #include "doomtype.h"
#include "colormatcher.h" #include "colormatcher.h"
//#include "r_data/r_translate.h"
#include "i_system.h" #include "i_system.h"
#include "p_local.h" #include "p_local.h"
#include "p_lnspec.h" #include "p_lnspec.h"

View file

@ -42,7 +42,6 @@
#include "gl/system/gl_system.h" #include "gl/system/gl_system.h"
#include "doomtype.h" #include "doomtype.h"
#include "colormatcher.h" #include "colormatcher.h"
//#include "r_data/r_translate.h"
#include "i_system.h" #include "i_system.h"
#include "p_local.h" #include "p_local.h"
#include "p_lnspec.h" #include "p_lnspec.h"

View file

@ -37,7 +37,7 @@
#include "templates.h" #include "templates.h"
#include "m_random.h" #include "m_random.h"
#include "r_main.h" //#include "r_main.h"
#include "p_local.h" #include "p_local.h"
#include "c_dispatch.h" #include "c_dispatch.h"
#include "g_level.h" #include "g_level.h"

View file

@ -47,6 +47,7 @@
#include "doomstat.h" #include "doomstat.h"
#include "g_level.h" #include "g_level.h"
#include "r_state.h" #include "r_state.h"
#include "d_player.h"
//#include "resources/voxels.h" //#include "resources/voxels.h"
//#include "gl/gl_intern.h" //#include "gl/gl_intern.h"

View file

@ -41,9 +41,9 @@
#include "gl/system/gl_system.h" #include "gl/system/gl_system.h"
#include "files.h" #include "files.h"
#include "m_swap.h" #include "m_swap.h"
#include "r_draw.h" //#include "r_draw.h"
#include "v_video.h" #include "v_video.h"
#include "r_main.h" //#include "r_main.h"
#include "r_data/r_translate.h" #include "r_data/r_translate.h"
#include "m_png.h" #include "m_png.h"
#include "m_crc32.h" #include "m_crc32.h"
@ -94,7 +94,7 @@ void FGLRenderer::Initialize()
mFBID = 0; mFBID = 0;
SetupLevel(); SetupLevel();
mShaderManager = new FShaderManager; mShaderManager = new FShaderManager;
mThreadManager = new FGLThreadManager; //mThreadManager = new FGLThreadManager;
} }
FGLRenderer::~FGLRenderer() FGLRenderer::~FGLRenderer()
@ -102,7 +102,7 @@ FGLRenderer::~FGLRenderer()
gl_CleanModelData(); gl_CleanModelData();
gl_DeleteAllAttachedLights(); gl_DeleteAllAttachedLights();
FMaterial::FlushAll(); FMaterial::FlushAll();
if (mThreadManager != NULL) delete mThreadManager; //if (mThreadManager != NULL) delete mThreadManager;
if (mShaderManager != NULL) delete mShaderManager; if (mShaderManager != NULL) delete mShaderManager;
if (mVBO != NULL) delete mVBO; if (mVBO != NULL) delete mVBO;
if (glpart2) delete glpart2; if (glpart2) delete glpart2;

View file

@ -42,7 +42,7 @@
#include "p_local.h" #include "p_local.h"
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "r_sky.h" #include "r_sky.h"
#include "r_bsp.h" #include "p_effect.h"
#include "po_man.h" #include "po_man.h"
#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderer.h"

View file

@ -35,7 +35,7 @@
** **
*/ */
#include "r_main.h" //#include "r_main.h"
#include "gl/scene/gl_clipper.h" #include "gl/scene/gl_clipper.h"

View file

@ -1,7 +1,10 @@
#ifndef __GL_CLIPPER #ifndef __GL_CLIPPER
#define __GL_CLIPPER #define __GL_CLIPPER
#include "doomtype.h"
#include "tables.h" #include "tables.h"
#include "xs_Float.h"
#include "r_utility.h"
class ClipNode class ClipNode
{ {

View file

@ -41,8 +41,9 @@
*/ */
#include "gl/system/gl_system.h" #include "gl/system/gl_system.h"
#include "r_sky.h" #include "r_sky.h"
#include "r_main.h" #include "r_utility.h"
#include "r_defs.h" #include "r_state.h"
#include "doomstat.h"
#include "gl/system/gl_cvars.h" #include "gl/system/gl_cvars.h"
#include "gl/data/gl_data.h" #include "gl/data/gl_data.h"

View file

@ -42,9 +42,10 @@
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "r_defs.h" #include "r_defs.h"
#include "r_sky.h" #include "r_sky.h"
#include "r_main.h" #include "r_utility.h"
#include "g_level.h" #include "g_level.h"
#include "doomstat.h" #include "doomstat.h"
#include "d_player.h"
#include "gl/system/gl_cvars.h" #include "gl/system/gl_cvars.h"
#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderer.h"

View file

@ -39,7 +39,7 @@
*/ */
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "r_main.h" #include "r_utility.h"
#include "r_defs.h" #include "r_defs.h"
#include "r_sky.h" #include "r_sky.h"
#include "g_level.h" #include "g_level.h"

View file

@ -48,7 +48,7 @@
#include "g_level.h" #include "g_level.h"
#include "r_data/r_interpolate.h" #include "r_data/r_interpolate.h"
#include "r_main.h" #include "r_main.h"
#include "r_things.h" #include "p_effect.h"
#include "sbar.h" #include "sbar.h"
#include "po_man.h" #include "po_man.h"
#include "gl/gl_functions.h" #include "gl/gl_functions.h"
@ -1019,7 +1019,7 @@ void FGLRenderer::RenderView (player_t* player)
else r_TicFrac = I_GetTimeFrac (&r_FrameTime); else r_TicFrac = I_GetTimeFrac (&r_FrameTime);
gl_frameMS = I_MSTime(); gl_frameMS = I_MSTime();
R_FindParticleSubsectors (); P_FindParticleSubsectors ();
// prepare all camera textures that have been used in the last frame // prepare all camera textures that have been used in the last frame
FCanvasTextureInfo::UpdateAll(); FCanvasTextureInfo::UpdateAll();

View file

@ -42,7 +42,8 @@
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "g_level.h" #include "g_level.h"
#include "r_sky.h" #include "r_sky.h"
#include "r_main.h" #include "r_state.h"
#include "r_utility.h"
#include "doomdata.h" #include "doomdata.h"
#include "gl/gl_functions.h" #include "gl/gl_functions.h"

View file

@ -39,12 +39,13 @@
*/ */
#include "gl/system/gl_system.h" #include "gl/system/gl_system.h"
#include "p_local.h" #include "p_local.h"
//#include "r_data/r_translate.h" #include "p_effect.h"
#include "g_level.h" #include "g_level.h"
#include "doomstat.h" #include "doomstat.h"
#include "gl/gl_functions.h" #include "gl/gl_functions.h"
#include "r_defs.h" #include "r_defs.h"
#include "r_sky.h" #include "r_sky.h"
#include "r_main.h"
#include "gl/system/gl_framebuffer.h" #include "gl/system/gl_framebuffer.h"
#include "gl/system/gl_cvars.h" #include "gl/system/gl_cvars.h"

View file

@ -41,6 +41,7 @@
#include "gl/system/gl_system.h" #include "gl/system/gl_system.h"
#include "c_dispatch.h" #include "c_dispatch.h"
#include "p_local.h" #include "p_local.h"
#include "p_effect.h"
#include "vectors.h" #include "vectors.h"
#include "gl/gl_functions.h" #include "gl/gl_functions.h"
#include "g_level.h" #include "g_level.h"

View file

@ -39,9 +39,10 @@
*/ */
#include "gl/system/gl_system.h" #include "gl/system/gl_system.h"
#include "sbar.h" #include "sbar.h"
#include "r_main.h" #include "r_utility.h"
#include "v_video.h" #include "v_video.h"
#include "doomstat.h" #include "doomstat.h"
#include "d_player.h"
#include "gl/system/gl_cvars.h" #include "gl/system/gl_cvars.h"
#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderer.h"
@ -253,7 +254,7 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
} }
PalEntry ThingColor = playermo->fillcolor; PalEntry ThingColor = playermo->fillcolor;
vissprite_t vis; visstyle_t vis;
vis.RenderStyle=playermo->RenderStyle; vis.RenderStyle=playermo->RenderStyle;
vis.alpha=playermo->alpha; vis.alpha=playermo->alpha;

View file

@ -44,12 +44,13 @@
#include "m_swap.h" #include "m_swap.h"
#include "r_draw.h" #include "r_draw.h"
#include "v_video.h" #include "v_video.h"
#include "r_main.h" #include "doomstat.h"
#include "m_png.h" #include "m_png.h"
#include "m_crc32.h" #include "m_crc32.h"
#include "vectors.h" #include "vectors.h"
#include "v_palette.h" #include "v_palette.h"
#include "templates.h" #include "templates.h"
#include "farchive.h"
#include "gl/system/gl_framebuffer.h" #include "gl/system/gl_framebuffer.h"
#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderer.h"
@ -413,10 +414,7 @@ void OpenGLFrameBuffer::StateChanged(AActor *actor)
void OpenGLFrameBuffer::StartSerialize(FArchive &arc) void OpenGLFrameBuffer::StartSerialize(FArchive &arc)
{ {
gl_DeleteAllAttachedLights(); gl_DeleteAllAttachedLights();
if (SaveVersion >= 2058) arc << fogdensity << outsidefogdensity << skyfog;
{
arc << fogdensity << outsidefogdensity << skyfog;
}
} }
void OpenGLFrameBuffer::EndSerialize(FArchive &arc) void OpenGLFrameBuffer::EndSerialize(FArchive &arc)

View file

@ -1,4 +1,4 @@
#ifndef __GL_THREADS_H #if 0 //ndef __GL_THREADS_H
#define __GL_THREADS_H #define __GL_THREADS_H
#ifdef WIN32 #ifdef WIN32

View file

@ -48,7 +48,7 @@
#include "w_wad.h" #include "w_wad.h"
#include "m_png.h" #include "m_png.h"
#include "r_draw.h" //#include "r_draw.h"
#include "sbar.h" #include "sbar.h"
#include "gi.h" #include "gi.h"
#include "cmdlib.h" #include "cmdlib.h"

View file

@ -41,7 +41,7 @@
#include "gl/system/gl_system.h" #include "gl/system/gl_system.h"
#include "templates.h" #include "templates.h"
#include "r_draw.h" //#include "r_draw.h"
#include "m_crc32.h" #include "m_crc32.h"
#include "c_cvars.h" #include "c_cvars.h"
#include "c_dispatch.h" #include "c_dispatch.h"

View file

@ -38,16 +38,15 @@
#include "gl/system/gl_system.h" #include "gl/system/gl_system.h"
#include "w_wad.h" #include "w_wad.h"
#include "m_png.h" #include "m_png.h"
#include "r_draw.h" //#include "r_draw.h"
#include "sbar.h" #include "sbar.h"
#include "gi.h" #include "gi.h"
#include "cmdlib.h" #include "cmdlib.h"
#include "c_dispatch.h" #include "c_dispatch.h"
#include "stats.h" #include "stats.h"
#include "r_main.h" #include "r_utility.h"
#include "templates.h" #include "templates.h"
#include "sc_man.h" #include "sc_man.h"
//#include "r_data/r_translate.h"
#include "colormatcher.h" #include "colormatcher.h"
//#include "gl/gl_intern.h" //#include "gl/gl_intern.h"

View file

@ -10,7 +10,7 @@
#include "g_level.h" #include "g_level.h"
#include "c_console.h" #include "c_console.h"
#include "c_dispatch.h" #include "c_dispatch.h"
#include "r_main.h" #include "r_utility.h"
#include "v_video.h" #include "v_video.h"
#include "gl/utility/gl_clock.h" #include "gl/utility/gl_clock.h"
#include "gl/utility/gl_convert.h" #include "gl/utility/gl_convert.h"

View file

@ -48,10 +48,11 @@
#include "v_video.h" #include "v_video.h"
#include "hu_stuff.h" #include "hu_stuff.h"
#include "gi.h" #include "gi.h"
#include "v_palette.h"
#include "i_input.h" #include "i_input.h"
#include "gameconfigfile.h" #include "gameconfigfile.h"
#include "gstrings.h" #include "gstrings.h"
#include "r_main.h" #include "r_utility.h"
#include "menu/menu.h" #include "menu/menu.h"
#include "textures/textures.h" #include "textures/textures.h"

View file

@ -50,7 +50,7 @@
#include "tarray.h" #include "tarray.h"
#include "m_bbox.h" #include "m_bbox.h"
#include "c_console.h" #include "c_console.h"
#include "r_main.h" #include "r_state.h"
const int MaxSegs = 64; const int MaxSegs = 64;
const int SplitCost = 8; const int SplitCost = 8;

View file

@ -43,7 +43,6 @@
#include "nodebuild.h" #include "nodebuild.h"
#include "templates.h" #include "templates.h"
#include "r_main.h"
#if 0 #if 0
#define D(x) x #define D(x) x

View file

@ -39,7 +39,6 @@
#include "doomtype.h" #include "doomtype.h"
#include "nodebuild.h" #include "nodebuild.h"
#include "r_main.h"
static inline void STACK_ARGS Warn (const char *format, ...) static inline void STACK_ARGS Warn (const char *format, ...)
{ {

View file

@ -47,9 +47,9 @@
#include "nodebuild.h" #include "nodebuild.h"
#include "templates.h" #include "templates.h"
#include "m_bbox.h" #include "m_bbox.h"
#include "r_main.h"
#include "i_system.h" #include "i_system.h"
#include "po_man.h" #include "po_man.h"
#include "r_state.h"
static const int PO_LINE_START = 1; static const int PO_LINE_START = 1;
static const int PO_LINE_EXPLICIT = 5; static const int PO_LINE_EXPLICIT = 5;

View file

@ -72,6 +72,7 @@
#include "p_setup.h" #include "p_setup.h"
#include "po_man.h" #include "po_man.h"
#include "actorptrselect.h" #include "actorptrselect.h"
#include "farchive.h"
#include "g_shared/a_pickups.h" #include "g_shared/a_pickups.h"
@ -1961,6 +1962,14 @@ IMPLEMENT_POINTY_CLASS (DLevelScript)
DECLARE_POINTER(activator) DECLARE_POINTER(activator)
END_POINTERS 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) void DLevelScript::Serialize (FArchive &arc)
{ {
DWORD i; DWORD i;

View file

@ -38,7 +38,6 @@
#include "dobject.h" #include "dobject.h"
#include "dthinker.h" #include "dthinker.h"
#include "doomtype.h" #include "doomtype.h"
#include "farchive.h"
#define LOCAL_SIZE 20 #define LOCAL_SIZE 20
#define NUM_MAPVARS 128 #define NUM_MAPVARS 128
@ -737,14 +736,6 @@ private:
friend class DACSThinker; 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 class DACSThinker : public DThinker
{ {
DECLARE_CLASS (DACSThinker, DThinker) DECLARE_CLASS (DACSThinker, DThinker)

View file

@ -12,7 +12,6 @@
#include "w_wad.h" #include "w_wad.h"
#include "templates.h" #include "templates.h"
#include "r_sky.h" #include "r_sky.h"
#include "r_main.h"
#include "r_defs.h" #include "r_defs.h"
#include "p_setup.h" #include "p_setup.h"
#include "g_level.h" #include "g_level.h"

View file

@ -29,6 +29,21 @@
#include "doomstat.h" #include "doomstat.h"
#include "r_state.h" #include "r_state.h"
#include "gi.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;
}
//============================================================================ //============================================================================
// //

View file

@ -35,7 +35,6 @@
#include <assert.h> #include <assert.h>
#include "actor.h" #include "actor.h"
#include "r_main.h"
#include "p_conversation.h" #include "p_conversation.h"
#include "w_wad.h" #include "w_wad.h"
#include "cmdlib.h" #include "cmdlib.h"
@ -60,6 +59,7 @@
#include "sbar.h" #include "sbar.h"
#include "farchive.h" #include "farchive.h"
#include "p_lnspec.h" #include "p_lnspec.h"
#include "r_utility.h"
#include "menu/menu.h" #include "menu/menu.h"
// The conversations as they exist inside a SCRIPTxx lump. // The conversations as they exist inside a SCRIPTxx lump.

View file

@ -35,6 +35,7 @@
#include "i_system.h" #include "i_system.h"
#include "sc_man.h" #include "sc_man.h"
#include "cmdlib.h" #include "cmdlib.h"
#include "farchive.h"
//============================================================================ //============================================================================
// //
@ -44,6 +45,14 @@
IMPLEMENT_CLASS (DDoor) 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 () DDoor::DDoor ()
{ {
} }

View file

@ -36,8 +36,10 @@
#include "doomtype.h" #include "doomtype.h"
#include "doomstat.h" #include "doomstat.h"
#include "i_system.h"
#include "c_cvars.h" #include "c_cvars.h"
#include "actor.h" #include "actor.h"
#include "m_argv.h"
#include "p_effect.h" #include "p_effect.h"
#include "p_local.h" #include "p_local.h"
#include "g_level.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 (Bool, r_rail_smartspiral, 0, CVAR_ARCHIVE);
CVAR (Int, r_rail_spiralsparsity, 1, CVAR_ARCHIVE); CVAR (Int, r_rail_spiralsparsity, 1, CVAR_ARCHIVE);
CVAR (Int, r_rail_trailsparsity, 1, CVAR_ARCHIVE); CVAR (Int, r_rail_trailsparsity, 1, CVAR_ARCHIVE);
CVAR (Bool, r_particles, true, 0);
#define FADEFROMTTL(a) (255/(a)) #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, static int grey1, grey2, grey3, grey4, red, green, blue, yellow, black,
red1, green1, blue1, yellow1, purple, purple1, white, red1, green1, blue1, yellow1, purple, purple1, white,
rblue1, rblue2, rblue3, rblue4, orange, yorange, dred, grey5, rblue1, rblue2, rblue3, rblue4, orange, yorange, dred, grey5,
@ -95,10 +105,114 @@ static const struct ColorList {
{NULL, 0, 0, 0 } {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 () void P_InitEffects ()
{ {
const struct ColorList *color = Colors; const struct ColorList *color = Colors;
P_InitParticles();
while (color->color) while (color->color)
{ {
*(color->color) = ColorMatcher.Pick (color->r, color->g, color->b); *(color->color) = ColorMatcher.Pick (color->r, color->g, color->b);

View file

@ -49,7 +49,31 @@
#define FX_BLACKFOUNTAIN 0x00060000 #define FX_BLACKFOUNTAIN 0x00060000
#define FX_WHITEFOUNTAIN 0x00070000 #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; class AActor;
particle_t *JitterParticle (int ttl); particle_t *JitterParticle (int ttl);

View file

@ -29,6 +29,7 @@
#include "doomstat.h" #include "doomstat.h"
#include "r_state.h" #include "r_state.h"
#include "tables.h" #include "tables.h"
#include "farchive.h"
#include "p_3dmidtex.h" #include "p_3dmidtex.h"
#include "r_data/r_interpolate.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) static void StartFloorSound (sector_t *sec)
{ {
if (sec->seqType >= 0) if (sec->seqType >= 0)
@ -870,6 +885,14 @@ IMPLEMENT_POINTY_CLASS (DElevator)
DECLARE_POINTER(m_Interp_Ceiling) DECLARE_POINTER(m_Interp_Ceiling)
END_POINTERS END_POINTERS
inline FArchive &operator<< (FArchive &arc, DElevator::EElevator &type)
{
BYTE val = (BYTE)type;
arc << val;
type = (DElevator::EElevator)val;
return arc;
}
DElevator::DElevator () DElevator::DElevator ()
{ {
} }

View file

@ -33,6 +33,7 @@
// State. // State.
#include "r_state.h" #include "r_state.h"
#include "statnums.h" #include "statnums.h"
#include "farchive.h"
static FRandom pr_flicker ("Flicker"); static FRandom pr_flicker ("Flicker");
static FRandom pr_lightflash ("LightFlash"); static FRandom pr_lightflash ("LightFlash");

View file

@ -23,9 +23,12 @@
#ifndef __P_LOCAL__ #ifndef __P_LOCAL__
#define __P_LOCAL__ #define __P_LOCAL__
#ifndef __R_LOCAL__ #include "doomtype.h"
#include "r_local.h" #include "doomdef.h"
#endif #include "tables.h"
#include "r_state.h"
#include "r_utility.h"
#include "d_player.h"
#include "a_morph.h" #include "a_morph.h"

View file

@ -61,6 +61,7 @@
#include "v_palette.h" #include "v_palette.h"
#include "p_enemy.h" #include "p_enemy.h"
#include "gstrings.h" #include "gstrings.h"
#include "farchive.h"
#include "r_data/colormaps.h" #include "r_data/colormaps.h"
// MACROS ------------------------------------------------------------------ // MACROS ------------------------------------------------------------------

View file

@ -37,6 +37,7 @@
#include "p_spec.h" #include "p_spec.h"
#include "g_level.h" #include "g_level.h"
#include "s_sndseq.h" #include "s_sndseq.h"
#include "farchive.h"
#include "r_data/r_interpolate.h" #include "r_data/r_interpolate.h"
IMPLEMENT_POINTY_CLASS (DPillar) IMPLEMENT_POINTY_CLASS (DPillar)
@ -44,6 +45,14 @@ IMPLEMENT_POINTY_CLASS (DPillar)
DECLARE_POINTER(m_Interp_Ceiling) DECLARE_POINTER(m_Interp_Ceiling)
END_POINTERS END_POINTERS
inline FArchive &operator<< (FArchive &arc, DPillar::EPillar &type)
{
BYTE val = (BYTE)type;
arc << val;
type = (DPillar::EPillar)val;
return arc;
}
DPillar::DPillar () DPillar::DPillar ()
{ {
} }

View file

@ -30,11 +30,27 @@
#include "doomstat.h" #include "doomstat.h"
#include "r_state.h" #include "r_state.h"
#include "gi.h" #include "gi.h"
#include "farchive.h"
static FRandom pr_doplat ("DoPlat"); static FRandom pr_doplat ("DoPlat");
IMPLEMENT_CLASS (DPlat) 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 () DPlat::DPlat ()
{ {
} }

View file

@ -27,6 +27,8 @@
#include "templates.h" #include "templates.h"
#include "thingdef/thingdef.h" #include "thingdef/thingdef.h"
#include "g_level.h" #include "g_level.h"
#include "farchive.h"
// MACROS ------------------------------------------------------------------ // MACROS ------------------------------------------------------------------

View file

@ -49,12 +49,18 @@
#include "po_man.h" #include "po_man.h"
#include "p_setup.h" #include "p_setup.h"
#include "r_data/colormaps.h" #include "r_data/colormaps.h"
#include "farchive.h"
static void CopyPlayer (player_t *dst, player_t *src, const char *name); static void CopyPlayer (player_t *dst, player_t *src, const char *name);
static void ReadOnePlayer (FArchive &arc, bool skipload); static void ReadOnePlayer (FArchive &arc, bool skipload);
static void ReadMultiplePlayers (FArchive &arc, int numPlayers, int numPlayersNow, bool skipload); static void ReadMultiplePlayers (FArchive &arc, int numPlayers, int numPlayersNow, bool skipload);
static void SpawnExtraPlayers (); static void SpawnExtraPlayers ();
inline FArchive &operator<< (FArchive &arc, FLinkedSector &link)
{
arc << link.Sector << link.Type;
return arc;
}
// //
// P_ArchivePlayers // P_ArchivePlayers

View file

@ -25,9 +25,10 @@
#include "c_cvars.h" #include "c_cvars.h"
#include "doomstat.h" #include "doomstat.h"
#include "g_level.h" #include "g_level.h"
#include "r_main.h"
#include "nodebuild.h" #include "nodebuild.h"
#include "po_man.h" #include "po_man.h"
#include "farchive.h"
#include "r_utility.h"
#include "r_data/colormaps.h" #include "r_data/colormaps.h"
@ -831,6 +832,16 @@ bool secplane_t::CopyPlaneIfValid (secplane_t *dest, const secplane_t *opp) cons
return copy; 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;
}
//========================================================================== //==========================================================================
// //

View file

@ -3958,7 +3958,7 @@ void P_SetupLevel (char *lumpname, int position)
R_OldBlend = 0xffffffff; R_OldBlend = 0xffffffff;
// [RH] Remove all particles // [RH] Remove all particles
R_ClearParticles (); P_ClearParticles ();
times[17].Clock(); times[17].Clock();
// preload graphics and sounds // preload graphics and sounds

View file

@ -44,7 +44,6 @@
#include "m_bbox.h" #include "m_bbox.h"
#include "w_wad.h" #include "w_wad.h"
#include "r_local.h"
#include "p_local.h" #include "p_local.h"
#include "p_lnspec.h" #include "p_lnspec.h"
#include "p_terrain.h" #include "p_terrain.h"
@ -60,6 +59,7 @@
#include "g_level.h" #include "g_level.h"
#include "v_font.h" #include "v_font.h"
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "farchive.h"
// State. // State.
#include "r_state.h" #include "r_state.h"
@ -85,6 +85,14 @@ IMPLEMENT_POINTY_CLASS (DPusher)
DECLARE_POINTER (m_Source) DECLARE_POINTER (m_Source)
END_POINTERS END_POINTERS
inline FArchive &operator<< (FArchive &arc, DScroller::EScrollType &type)
{
BYTE val = (BYTE)type;
arc << val;
type = (DScroller::EScrollType)val;
return arc;
}
DScroller::DScroller () 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) void DPusher::Serialize (FArchive &arc)
{ {
Super::Serialize (arc); Super::Serialize (arc);

View file

@ -97,14 +97,6 @@ private:
// (This is so scrolling floors and objects on them can move at same speed.) // (This is so scrolling floors and objects on them can move at same speed.)
enum { CARRYFACTOR = ((fixed_t)(FRACUNIT*.09375)) }; 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 // phares 3/20/98: added new model of Pushers for push/pull effects
class DPusher : public DThinker class DPusher : public DThinker
@ -150,14 +142,6 @@ protected:
bool PIT_PushThing (AActor *thing); 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 values for map objects
#define MO_TELEPORTMAN 14 #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 EV_StopPlat (int tag);
void P_ActivateInStasis (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] // [RH]
// P_PILLAR // P_PILLAR
@ -520,14 +489,6 @@ private:
DPillar (); 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, bool EV_DoPillar (DPillar::EPillar type, int tag, fixed_t speed, fixed_t height,
fixed_t height2, int crush, bool hexencrush); 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_SpawnDoorCloseIn30 (sector_t *sec);
void P_SpawnDoorRaiseIn5Mins (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 class DAnimatedDoor : public DMovingCeiling
{ {
DECLARE_CLASS (DAnimatedDoor, DMovingCeiling) DECLARE_CLASS (DAnimatedDoor, DMovingCeiling)
@ -717,13 +670,6 @@ bool EV_DoCeiling (DCeiling::ECeiling type, line_t *line,
bool EV_CeilingCrushStop (int tag); bool EV_CeilingCrushStop (int tag);
void P_ActivateInStasisCeiling (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_FloorCrushStop (int tag);
bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed); 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 class DElevator : public DMover
{ {
DECLARE_CLASS (DElevator, DMover) DECLARE_CLASS (DElevator, DMover)
@ -873,14 +811,6 @@ private:
bool EV_DoElevator (line_t *line, DElevator::EElevator type, fixed_t speed, bool EV_DoElevator (line_t *line, DElevator::EElevator type, fixed_t speed,
fixed_t height, int tag); 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 class DWaggleBase : public DMover
{ {
DECLARE_CLASS (DWaggleBase, DMover) DECLARE_CLASS (DWaggleBase, DMover)

View file

@ -46,6 +46,7 @@
#include "w_wad.h" #include "w_wad.h"
#include "tarray.h" #include "tarray.h"
#include "cmdlib.h" #include "cmdlib.h"
#include "farchive.h"
#include "gi.h" #include "gi.h"

View file

@ -33,6 +33,7 @@
** **
*/ */
#include "doomstat.h"
#include "p_setup.h" #include "p_setup.h"
#include "p_lnspec.h" #include "p_lnspec.h"
#include "templates.h" #include "templates.h"

View file

@ -52,6 +52,7 @@
#include "g_level.h" #include "g_level.h"
#include "d_net.h" #include "d_net.h"
#include "gstrings.h" #include "gstrings.h"
#include "farchive.h"
static FRandom pr_skullpop ("SkullPop"); static FRandom pr_skullpop ("SkullPop");
@ -210,6 +211,11 @@ CCMD (playerclasses)
bool onground; 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 // The player_t constructor. Since LogText is not a POD, we cannot just
// memset it all to 0. // memset it all to 0.
player_t::player_t() player_t::player_t()

Some files were not shown because too many files have changed in this diff Show more