gzdoom-last-svn/src/p_spec.h

903 lines
22 KiB
C
Raw Normal View History

// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id:$
//
// Copyright (C) 1993-1996 by id Software, Inc.
//
// This source is available for distribution and/or modification
// only under the terms of the DOOM Source Code License as
// published by id Software. All rights reserved.
//
// The source is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
// for more details.
//
// DESCRIPTION: none
// Implements special effects:
// Texture animation, height or lighting changes
// according to adjacent sectors, respective
// utility functions, etc.
//
//-----------------------------------------------------------------------------
#ifndef __P_SPEC__
#define __P_SPEC__
#include "dsectoreffect.h"
#include "doomdata.h"
#include "r_state.h"
class FScanner;
struct level_info_t;
//jff 2/23/98 identify the special classes that can share sectors
typedef enum
{
floor_special,
ceiling_special,
lighting_special,
} special_e;
// killough 3/7/98: Add generalized scroll effects
class DScroller : public DThinker
{
DECLARE_CLASS (DScroller, DThinker)
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
HAS_OBJECT_POINTERS
public:
enum EScrollType
{
sc_side,
sc_floor,
sc_ceiling,
sc_carry,
sc_carry_ceiling, // killough 4/11/98: carry objects hanging on ceilings
};
- Removed precompiled header option for GL code because it caused more problems than the minimal amount of saved time was worth. Update to ZDoom r833: - Disabled scrolling of 3DMIDTEX textures. Due to the special needs this cannot work properly. - Added new Scroll_Wall special to allow more control over wall scrolling. Since it uses fixed point parameters it can only be used in scripts though. - Added flags parameters to all wall scroller specials that didn't use all 5 args. - Separated scrolling of the 3 different texture parts of a sidedef. While doing this I did some more restructuring of the sidedef structure and changed it so that all state changes to sidedefs that affect rendering have to be made with access functions. This is not of much use to the software renderer but it allows far easier caching of rendering data for OpenGL because the only place I need to check is in the access functions. - Added Karate Chris's ThingCountSector submission. - Made texture indices in FSwitchDef full integers. Since that required some data restructuring I also eliminated the MAX_FRAMES limit of 128 per switch. - Removed some debug output from SBarInfo::ParseSBarInfo(). - Fixed: Heretic linetype translations included the wrong file. - Removed ATTN_SURROUND, since FMOD Ex doesn't exactly support it, and it only worked as intended on stereo speakers anyway. - Cleaned out ancient crud from i_sound.cpp. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@67 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-21 21:15:56 +00:00
enum EScrollPos
{
scw_top=1,
scw_mid=2,
scw_bottom=4,
scw_all=7,
};
- Removed precompiled header option for GL code because it caused more problems than the minimal amount of saved time was worth. Update to ZDoom r833: - Disabled scrolling of 3DMIDTEX textures. Due to the special needs this cannot work properly. - Added new Scroll_Wall special to allow more control over wall scrolling. Since it uses fixed point parameters it can only be used in scripts though. - Added flags parameters to all wall scroller specials that didn't use all 5 args. - Separated scrolling of the 3 different texture parts of a sidedef. While doing this I did some more restructuring of the sidedef structure and changed it so that all state changes to sidedefs that affect rendering have to be made with access functions. This is not of much use to the software renderer but it allows far easier caching of rendering data for OpenGL because the only place I need to check is in the access functions. - Added Karate Chris's ThingCountSector submission. - Made texture indices in FSwitchDef full integers. Since that required some data restructuring I also eliminated the MAX_FRAMES limit of 128 per switch. - Removed some debug output from SBarInfo::ParseSBarInfo(). - Fixed: Heretic linetype translations included the wrong file. - Removed ATTN_SURROUND, since FMOD Ex doesn't exactly support it, and it only worked as intended on stereo speakers anyway. - Cleaned out ancient crud from i_sound.cpp. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@67 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-21 21:15:56 +00:00
DScroller (EScrollType type, fixed_t dx, fixed_t dy, int control, int affectee, int accel, int scrollpos = scw_all);
DScroller (fixed_t dx, fixed_t dy, const line_t *l, int control, int accel, int scrollpos = scw_all);
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
void Destroy();
void Serialize (FArchive &arc);
void Tick ();
bool AffectsWall (int wallnum) const { return m_Type == sc_side && m_Affectee == wallnum; }
int GetWallNum () const { return m_Type == sc_side ? m_Affectee : -1; }
void SetRate (fixed_t dx, fixed_t dy) { m_dx = dx; m_dy = dy; }
bool IsType (EScrollType type) const { return type == m_Type; }
int GetAffectee () const { return m_Affectee; }
- Removed precompiled header option for GL code because it caused more problems than the minimal amount of saved time was worth. Update to ZDoom r833: - Disabled scrolling of 3DMIDTEX textures. Due to the special needs this cannot work properly. - Added new Scroll_Wall special to allow more control over wall scrolling. Since it uses fixed point parameters it can only be used in scripts though. - Added flags parameters to all wall scroller specials that didn't use all 5 args. - Separated scrolling of the 3 different texture parts of a sidedef. While doing this I did some more restructuring of the sidedef structure and changed it so that all state changes to sidedefs that affect rendering have to be made with access functions. This is not of much use to the software renderer but it allows far easier caching of rendering data for OpenGL because the only place I need to check is in the access functions. - Added Karate Chris's ThingCountSector submission. - Made texture indices in FSwitchDef full integers. Since that required some data restructuring I also eliminated the MAX_FRAMES limit of 128 per switch. - Removed some debug output from SBarInfo::ParseSBarInfo(). - Fixed: Heretic linetype translations included the wrong file. - Removed ATTN_SURROUND, since FMOD Ex doesn't exactly support it, and it only worked as intended on stereo speakers anyway. - Cleaned out ancient crud from i_sound.cpp. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@67 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-21 21:15:56 +00:00
int GetScrollParts() const { return m_Parts; }
protected:
EScrollType m_Type; // Type of scroll effect
fixed_t m_dx, m_dy; // (dx,dy) scroll speeds
int m_Affectee; // Number of affected sidedef, sector, tag, or whatever
int m_Control; // Control sector (-1 if none) used to control scrolling
fixed_t m_LastHeight; // Last known height of control sector
fixed_t m_vdx, m_vdy; // Accumulated velocity if accelerative
int m_Accel; // Whether it's accelerative
- Removed precompiled header option for GL code because it caused more problems than the minimal amount of saved time was worth. Update to ZDoom r833: - Disabled scrolling of 3DMIDTEX textures. Due to the special needs this cannot work properly. - Added new Scroll_Wall special to allow more control over wall scrolling. Since it uses fixed point parameters it can only be used in scripts though. - Added flags parameters to all wall scroller specials that didn't use all 5 args. - Separated scrolling of the 3 different texture parts of a sidedef. While doing this I did some more restructuring of the sidedef structure and changed it so that all state changes to sidedefs that affect rendering have to be made with access functions. This is not of much use to the software renderer but it allows far easier caching of rendering data for OpenGL because the only place I need to check is in the access functions. - Added Karate Chris's ThingCountSector submission. - Made texture indices in FSwitchDef full integers. Since that required some data restructuring I also eliminated the MAX_FRAMES limit of 128 per switch. - Removed some debug output from SBarInfo::ParseSBarInfo(). - Fixed: Heretic linetype translations included the wrong file. - Removed ATTN_SURROUND, since FMOD Ex doesn't exactly support it, and it only worked as intended on stereo speakers anyway. - Cleaned out ancient crud from i_sound.cpp. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@67 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-21 21:15:56 +00:00
int m_Parts; // Which parts of a sidedef are being scrolled?
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
TObjPtr<DInterpolation> m_Interpolations[3];
private:
DScroller ();
};
// Factor to scale scrolling effect into mobj-carrying properties = 3/32.
// (This is so scrolling floors and objects on them can move at same speed.)
enum { CARRYFACTOR = ((fixed_t)(FRACUNIT*.09375)) };
// phares 3/20/98: added new model of Pushers for push/pull effects
class DPusher : public DThinker
{
DECLARE_CLASS (DPusher, DThinker)
HAS_OBJECT_POINTERS
public:
enum EPusher
{
p_push,
p_pull,
p_wind,
p_current
};
DPusher ();
DPusher (EPusher type, line_t *l, int magnitude, int angle, AActor *source, int affectee);
void Serialize (FArchive &arc);
* Updated to ZDoom r2831: - Fixed: The DUMB specific options should be grayed out when using FMod for playing back modules. - Fixed: The newly accelerated mousewheel scrolling code did not check for the end of the list and could scroll one item too far. It also incremented VisBottom by 3 instead of 2. - changed lock failsound lookup so that for each sound it tries to resolve it as a player sound before deciding if it is valid. - Fixed: FOptionMenuItemJoyMap::SetSelection() did not convert from menu selection number to joyaxis number. - Scroll two rows at a time with the mouse wheel in the options menu. - Remove extra *usefail definition for the pig player. - Locks can now define more than one LockedSound by separating them with commas. The default setting for this property is now "*keytry", "misc/keytry". The first sound that is defined is the one that will be played for the lock. Thus, for standard locks, if the player class defines *keytry, that will be played. Otherwise, misc/keytry will be played as before. - Added a ClearCounters function to AActor that handles everything necessary to un-count an item that is not supposed to be counted but has some of the COUNT* flags set. - Merged all places where secrets are credited into one common function. - Added the Doom64 COUNTSECRET actor flag. - Fixed: AInventory::CreateCopy did not clear the COUNTITEM flag. - Fixed: Dropping an item did not increase the item count but the dropped item could still have the COUNTITEM flag. Now this flag gets cleared when the item gets picked up so that dropped items don't count a second time. - Merged Thing_Destroy extension from Doom64 branch into trunk and extended it by a tid=0, tag!=0 case which will kill all shootable actors in sectors with the specified tag. - Fixed: Compilation errors on Mac OS X. - Fixed Linux compilation issue with statistics.cpp - Resurrected some old statistics code I had and made some minor enhancements to be of more use. - Fixed: The subsector serializing code accessed the subsector array before validating the index. - Added episode names to episode definitions of Doom 1 and Chex Quest. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@979 b0f79afe-0144-0410-b225-9a4edf0717df
2010-09-19 08:00:43 +00:00
int CheckForSectorMatch (EPusher type, int tag);
void ChangeValues (int magnitude, int angle)
{
angle_t ang = ((angle_t)(angle<<24)) >> ANGLETOFINESHIFT;
m_Xmag = (magnitude * finecosine[ang]) >> FRACBITS;
m_Ymag = (magnitude * finesine[ang]) >> FRACBITS;
m_Magnitude = magnitude;
}
void Tick ();
protected:
EPusher m_Type;
TObjPtr<AActor> m_Source;// Point source if point pusher
int m_Xmag; // X Strength
int m_Ymag; // Y Strength
int m_Magnitude; // Vector strength for point pusher
int m_Radius; // Effective radius for point pusher
int m_X; // X of point source if point pusher
int m_Y; // Y of point source if point pusher
int m_Affectee; // Number of affected sector
friend bool PIT_PushThing (AActor *thing);
};
bool PIT_PushThing (AActor *thing);
// Define values for map objects
#define MO_TELEPORTMAN 14
// [RH] If a deathmatch game, checks to see if noexit is enabled.
// If so, it kills the player and returns false. Otherwise,
// it returns true, and the player is allowed to live.
bool CheckIfExitIsGood (AActor *self, level_info_t *info);
// at map load
void P_SpawnSpecials (void);
// every tic
void P_UpdateSpecials (void);
// when needed
bool P_ActivateLine (line_t *ld, AActor *mo, int side, int activationType);
bool P_TestActivateLine (line_t *ld, AActor *mo, int side, int activationType);
void P_PlayerInSpecialSector (player_t *player, sector_t * sector=NULL);
void P_PlayerOnSpecialFlat (player_t *player, int floorType);
void P_SetSectorFriction (int tag, int amount, bool alterFlag);
* Updated to ZDoom r2831: - Fixed: The DUMB specific options should be grayed out when using FMod for playing back modules. - Fixed: The newly accelerated mousewheel scrolling code did not check for the end of the list and could scroll one item too far. It also incremented VisBottom by 3 instead of 2. - changed lock failsound lookup so that for each sound it tries to resolve it as a player sound before deciding if it is valid. - Fixed: FOptionMenuItemJoyMap::SetSelection() did not convert from menu selection number to joyaxis number. - Scroll two rows at a time with the mouse wheel in the options menu. - Remove extra *usefail definition for the pig player. - Locks can now define more than one LockedSound by separating them with commas. The default setting for this property is now "*keytry", "misc/keytry". The first sound that is defined is the one that will be played for the lock. Thus, for standard locks, if the player class defines *keytry, that will be played. Otherwise, misc/keytry will be played as before. - Added a ClearCounters function to AActor that handles everything necessary to un-count an item that is not supposed to be counted but has some of the COUNT* flags set. - Merged all places where secrets are credited into one common function. - Added the Doom64 COUNTSECRET actor flag. - Fixed: AInventory::CreateCopy did not clear the COUNTITEM flag. - Fixed: Dropping an item did not increase the item count but the dropped item could still have the COUNTITEM flag. Now this flag gets cleared when the item gets picked up so that dropped items don't count a second time. - Merged Thing_Destroy extension from Doom64 branch into trunk and extended it by a tid=0, tag!=0 case which will kill all shootable actors in sectors with the specified tag. - Fixed: Compilation errors on Mac OS X. - Fixed Linux compilation issue with statistics.cpp - Resurrected some old statistics code I had and made some minor enhancements to be of more use. - Fixed: The subsector serializing code accessed the subsector array before validating the index. - Added episode names to episode definitions of Doom 1 and Chex Quest. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@979 b0f79afe-0144-0410-b225-9a4edf0717df
2010-09-19 08:00:43 +00:00
void P_GiveSecret(AActor *actor, bool printmessage, bool playsound);
//
// getSide()
// Will return a side_t*
// given the number of the current sector,
// the line number, and the side (0/1) that you want.
//
inline side_t *getSide (int currentSector, int line, int side)
{
return (sectors[currentSector].lines[line])->sidedef[side];
}
//
// getSector()
// Will return a sector_t*
// given the number of the current sector,
// the line number and the side (0/1) that you want.
//
inline sector_t *getSector (int currentSector, int line, int side)
{
return (sectors[currentSector].lines[line])->sidedef[side]->sector;
}
//
// twoSided()
// Given the sector number and the line number,
// it will tell you whether the line is two-sided or not.
//
inline int twoSided (int sector, int line)
{
return (sectors[sector].lines[line])->flags & ML_TWOSIDED;
}
//
// getNextSector()
// Return sector_t * of sector next to current.
// NULL if not two-sided line
//
inline sector_t *getNextSector (line_t *line, const sector_t *sec)
{
if (!(line->flags & ML_TWOSIDED))
return NULL;
return line->frontsector == sec ?
(line->backsector != sec ? line->backsector : NULL) :
line->frontsector;
}
int P_FindSectorFromTag (int tag, int start);
int P_FindLineFromID (int id, int start);
//
// P_LIGHTS
//
class DLighting : public DSectorEffect
{
DECLARE_CLASS (DLighting, DSectorEffect)
public:
DLighting (sector_t *sector);
protected:
DLighting ();
};
class DFireFlicker : public DLighting
{
DECLARE_CLASS (DFireFlicker, DLighting)
public:
DFireFlicker (sector_t *sector);
DFireFlicker (sector_t *sector, int upper, int lower);
void Serialize (FArchive &arc);
void Tick ();
protected:
int m_Count;
int m_MaxLight;
int m_MinLight;
private:
DFireFlicker ();
};
class DFlicker : public DLighting
{
DECLARE_CLASS (DFlicker, DLighting)
public:
DFlicker (sector_t *sector, int upper, int lower);
void Serialize (FArchive &arc);
void Tick ();
protected:
int m_Count;
int m_MaxLight;
int m_MinLight;
private:
DFlicker ();
};
class DLightFlash : public DLighting
{
DECLARE_CLASS (DLightFlash, DLighting)
public:
DLightFlash (sector_t *sector);
DLightFlash (sector_t *sector, int min, int max);
void Serialize (FArchive &arc);
void Tick ();
protected:
int m_Count;
int m_MaxLight;
int m_MinLight;
int m_MaxTime;
int m_MinTime;
private:
DLightFlash ();
};
class DStrobe : public DLighting
{
DECLARE_CLASS (DStrobe, DLighting)
public:
DStrobe (sector_t *sector, int utics, int ltics, bool inSync);
DStrobe (sector_t *sector, int upper, int lower, int utics, int ltics);
void Serialize (FArchive &arc);
void Tick ();
protected:
int m_Count;
int m_MinLight;
int m_MaxLight;
int m_DarkTime;
int m_BrightTime;
private:
DStrobe ();
};
class DGlow : public DLighting
{
DECLARE_CLASS (DGlow, DLighting)
public:
DGlow (sector_t *sector);
void Serialize (FArchive &arc);
void Tick ();
protected:
int m_MinLight;
int m_MaxLight;
int m_Direction;
private:
DGlow ();
};
// [RH] Glow from Light_Glow and Light_Fade specials
class DGlow2 : public DLighting
{
DECLARE_CLASS (DGlow2, DLighting)
public:
DGlow2 (sector_t *sector, int start, int end, int tics, bool oneshot);
void Serialize (FArchive &arc);
void Tick ();
protected:
int m_Start;
int m_End;
int m_MaxTics;
int m_Tics;
bool m_OneShot;
private:
DGlow2 ();
};
// [RH] Phased light thinker
class DPhased : public DLighting
{
DECLARE_CLASS (DPhased, DLighting)
public:
DPhased (sector_t *sector);
DPhased (sector_t *sector, int baselevel, int phase);
void Serialize (FArchive &arc);
void Tick ();
protected:
BYTE m_BaseLevel;
BYTE m_Phase;
private:
DPhased ();
DPhased (sector_t *sector, int baselevel);
int PhaseHelper (sector_t *sector, int index, int light, sector_t *prev);
};
#define GLOWSPEED 8
#define STROBEBRIGHT 5
#define FASTDARK 15
#define SLOWDARK TICRATE
void EV_StartLightFlickering (int tag, int upper, int lower);
void EV_StartLightStrobing (int tag, int upper, int lower, int utics, int ltics);
void EV_StartLightStrobing (int tag, int utics, int ltics);
void EV_TurnTagLightsOff (int tag);
void EV_LightTurnOn (int tag, int bright);
void EV_LightTurnOnPartway (int tag, fixed_t frac); // killough 10/98
void EV_LightChange (int tag, int value);
void EV_StopLightEffect (int tag);
void P_SpawnGlowingLight (sector_t *sector);
void EV_StartLightGlowing (int tag, int upper, int lower, int tics);
void EV_StartLightFading (int tag, int value, int tics);
//
// P_SWITCH
//
#define BUTTONTIME TICRATE // 1 second, in ticks.
bool P_ChangeSwitchTexture (side_t *side, int useAgain, BYTE special, bool *quest=NULL);
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno);
//
// P_PLATS
//
class DPlat : public DMovingFloor
{
DECLARE_CLASS (DPlat, DMovingFloor)
public:
enum EPlatState
{
up,
down,
waiting,
in_stasis
};
enum EPlatType
{
platPerpetualRaise,
platDownWaitUpStay,
platDownWaitUpStayStone,
platUpWaitDownStay,
platUpNearestWaitDownStay,
platDownByValue,
platUpByValue,
platUpByValueStay,
platRaiseAndStay,
platToggle,
platDownToNearestFloor,
platDownToLowestCeiling,
platRaiseAndStayLockout,
};
void Serialize (FArchive &arc);
void Tick ();
bool IsLift() const { return m_Type == platDownWaitUpStay || m_Type == platDownWaitUpStayStone; }
protected:
DPlat (sector_t *sector);
fixed_t m_Speed;
fixed_t m_Low;
fixed_t m_High;
int m_Wait;
int m_Count;
EPlatState m_Status;
EPlatState m_OldStatus;
int m_Crush;
int m_Tag;
EPlatType m_Type;
void PlayPlatSound (const char *sound);
void Reactivate ();
void Stop ();
private:
DPlat ();
friend bool EV_DoPlat (int tag, line_t *line, EPlatType type,
int height, int speed, int delay, int lip, int change);
friend void EV_StopPlat (int tag);
friend void P_ActivateInStasis (int tag);
};
bool EV_DoPlat (int tag, line_t *line, DPlat::EPlatType type,
int height, int speed, int delay, int lip, int change);
void EV_StopPlat (int tag);
void P_ActivateInStasis (int tag);
//
// [RH]
// P_PILLAR
//
class DPillar : public DMover
{
DECLARE_CLASS (DPillar, DMover)
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
HAS_OBJECT_POINTERS
public:
enum EPillar
{
pillarBuild,
pillarOpen
};
DPillar (sector_t *sector, EPillar type, fixed_t speed, fixed_t height,
fixed_t height2, int crush, bool hexencrush);
void Serialize (FArchive &arc);
void Tick ();
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
void Destroy();
protected:
EPillar m_Type;
fixed_t m_FloorSpeed;
fixed_t m_CeilingSpeed;
fixed_t m_FloorTarget;
fixed_t m_CeilingTarget;
int m_Crush;
bool m_Hexencrush;
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
TObjPtr<DInterpolation> m_Interp_Ceiling;
TObjPtr<DInterpolation> m_Interp_Floor;
private:
DPillar ();
};
bool EV_DoPillar (DPillar::EPillar type, int tag, fixed_t speed, fixed_t height,
fixed_t height2, int crush, bool hexencrush);
//
// P_DOORS
//
class DDoor : public DMovingCeiling
{
DECLARE_CLASS (DDoor, DMovingCeiling)
public:
enum EVlDoor
{
doorClose,
doorOpen,
doorRaise,
doorRaiseIn5Mins,
doorCloseWaitOpen,
};
DDoor (sector_t *sector);
DDoor (sector_t *sec, EVlDoor type, fixed_t speed, int delay, int lightTag);
void Serialize (FArchive &arc);
void Tick ();
protected:
EVlDoor m_Type;
fixed_t m_TopDist;
fixed_t m_BotDist, m_OldFloorDist;
vertex_t *m_BotSpot;
fixed_t m_Speed;
// 1 = up, 0 = waiting at top, -1 = down
int m_Direction;
// tics to wait at the top
int m_TopWait;
// (keep in case a door going down is reset)
// when it reaches 0, start going down
int m_TopCountdown;
int m_LightTag;
void DoorSound (bool raise) const;
friend bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing,
int tag, int speed, int delay, int lock,
int lightTag);
friend void P_SpawnDoorCloseIn30 (sector_t *sec);
friend void P_SpawnDoorRaiseIn5Mins (sector_t *sec);
private:
DDoor ();
};
bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing,
int tag, int speed, int delay, int lock,
int lightTag);
void P_SpawnDoorCloseIn30 (sector_t *sec);
void P_SpawnDoorRaiseIn5Mins (sector_t *sec);
class DAnimatedDoor : public DMovingCeiling
{
DECLARE_CLASS (DAnimatedDoor, DMovingCeiling)
public:
DAnimatedDoor (sector_t *sector);
DAnimatedDoor (sector_t *sec, line_t *line, int speed, int delay, FDoorAnimation *anim);
void Serialize (FArchive &arc);
void Tick ();
bool StartClosing ();
protected:
line_t *m_Line1, *m_Line2;
int m_Frame;
FDoorAnimation *m_DoorAnim;
int m_Timer;
fixed_t m_BotDist;
int m_Status;
enum
{
Opening,
Waiting,
Closing,
Dead
};
int m_Speed;
int m_Delay;
bool m_SetBlocking1, m_SetBlocking2;
friend bool EV_SlidingDoor (line_t *line, AActor *thing, int tag, int speed, int delay);
private:
DAnimatedDoor ();
};
bool EV_SlidingDoor (line_t *line, AActor *thing, int tag, int speed, int delay);
//
// P_CEILNG
//
// [RH] Changed these
class DCeiling : public DMovingCeiling
{
DECLARE_CLASS (DCeiling, DMovingCeiling)
public:
enum ECeiling
{
ceilLowerByValue,
ceilRaiseByValue,
ceilMoveToValue,
ceilLowerToHighestFloor,
ceilLowerInstant,
ceilRaiseInstant,
ceilCrushAndRaise,
ceilLowerAndCrush,
ceilLowerAndCrushDist,
ceilCrushRaiseAndStay,
ceilRaiseToNearest,
ceilLowerToLowest,
ceilLowerToFloor,
// The following are only used by Generic_Ceiling
ceilRaiseToHighest,
ceilLowerToHighest,
ceilRaiseToLowest,
ceilLowerToNearest,
ceilRaiseToHighestFloor,
ceilRaiseToFloor,
ceilRaiseByTexture,
ceilLowerByTexture,
genCeilingChg0,
genCeilingChgT,
genCeilingChg
};
DCeiling (sector_t *sec);
DCeiling (sector_t *sec, fixed_t speed1, fixed_t speed2, int silent);
void Serialize (FArchive &arc);
void Tick ();
static DCeiling *Create(sector_t *sec, DCeiling::ECeiling type, line_t *line, int tag,
fixed_t speed, fixed_t speed2, fixed_t height,
int crush, int silent, int change, bool hexencrush);
protected:
ECeiling m_Type;
fixed_t m_BottomHeight;
fixed_t m_TopHeight;
fixed_t m_Speed;
fixed_t m_Speed1; // [RH] dnspeed of crushers
fixed_t m_Speed2; // [RH] upspeed of crushers
int m_Crush;
bool m_Hexencrush;
int m_Silent;
int m_Direction; // 1 = up, 0 = waiting, -1 = down
// [RH] Need these for BOOM-ish transferring ceilings
Update to ZDoom r1052: - Fixed: Dead players didn't get the MF_CORPSE flag set. - Fixed: The internal definition of Floor_LowerToNearest had incorrect parameter settings. - Fixed: Heretic's ActivatedTimeBomb had the same spawn ID as the inventory item. - fixed: Heretic's mace did not have its spawn ID set. - For controls that are not bound, the customize controls menu now displays a black --- instead of ???. - Applied Gez's BossBrainPatch3. - Fixed: P_BulletSlope() did not return the linetarget. This effected the Sigil, A_JumpIfCloser, and A_JumpIfTargetInLOS. - Fixed all the new warnings tossed out by GCC 4.3. - Fixed: PickNext/PrevWeapon() did not check for NULL player actors. - Fixed compilation issues with GCC. - Removed special case for nobotnodes in MAPINFO. - Added support for ST's QUARTERGRAVITY flag. - Added a generalized version of Skulltag's A_CheckRailReload function. - Fixed: DrawImage didn't take 0 as a valid image index. - Added Gez's RandomSpawner submission with significant changes. - Added optional blocks for MAPINFO map definitions. ZDoom doesn't use this feature itself but it allows other ports based on ZDoom to implement their own sets of options without making such a MAPINFO unreadable by ZDoom. - Fixed: The mugshot would not reset on re-spawn. - Fixed: Picking up a weapon would sometimes not activate the grin. - Changed: Line_SetIdentification will ignore extended parameters when used in maps defined Hexen style in MAPINFO. - Fixed: Ambient sounds didn't pass their point of origin to S_StartSound. - Fixed: UseType was not properly set for textures defined in TEXTURES. - Fixed: You couldn't set an offset for sprites defined in TEXTURES. - Added read barriers to all actor pointers within player_t except for mo, ReadyWeapon and PendingWeapon. - Added a read barrier to player_t::PrewmorphWeapon. - Fixed: After spawning a deathmatch player P_PlayerStartStomp must be called. - Fixed: SpawnThings must check if the players were spawned before calling P_PlayerStartStomp. - Fixed typo in flat scroll interpolation. - Changed FImageCollection to return translated texture indices so that animated icons can be done with it. - Changed FImageCollection to use a TArray to hold its data. - Fixed: SetChanHeadSettings did an assignment instead of comparing the channel ID witg CHAN_CEILING. - Changed sound sequence names for animated doors to FNames. - Automatically fixed: DCeiling didn't properly serialize its texture id. - Replaced integers as texture ID representation with a specific new type to track down all potentially incorrect uses and remaining WORDs used for texture IDs so that more than 32767 or 65535 textures can be defined. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@124 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-28 13:29:59 +00:00
FTextureID m_Texture;
int m_NewSpecial;
// ID
int m_Tag;
int m_OldDirection;
void PlayCeilingSound ();
private:
DCeiling ();
friend bool EV_CeilingCrushStop (int tag);
friend void P_ActivateInStasisCeiling (int tag);
};
bool EV_DoCeiling (DCeiling::ECeiling type, line_t *line,
int tag, fixed_t speed, fixed_t speed2, fixed_t height,
int crush, int silent, int change, bool hexencrush);
bool EV_CeilingCrushStop (int tag);
void P_ActivateInStasisCeiling (int tag);
//
// P_FLOOR
//
class DFloor : public DMovingFloor
{
DECLARE_CLASS (DFloor, DMovingFloor)
public:
enum EFloor
{
floorLowerToLowest,
floorLowerToNearest,
floorLowerToHighest,
floorLowerByValue,
floorRaiseByValue,
floorRaiseToHighest,
floorRaiseToNearest,
floorRaiseAndCrush,
floorCrushStop,
floorLowerInstant,
floorRaiseInstant,
floorMoveToValue,
floorRaiseToLowestCeiling,
floorRaiseByTexture,
floorLowerAndChange,
floorRaiseAndChange,
floorRaiseToLowest,
floorRaiseToCeiling,
floorLowerToLowestCeiling,
floorLowerByTexture,
floorLowerToCeiling,
donutRaise,
buildStair,
waitStair,
resetStair,
// Not to be used as parameters to EV_DoFloor()
genFloorChg0,
genFloorChgT,
genFloorChg
};
// [RH] Changed to use Hexen-ish specials
enum EStair
{
buildUp,
buildDown
};
DFloor (sector_t *sec);
void Serialize (FArchive &arc);
void Tick ();
protected:
EFloor m_Type;
int m_Crush;
bool m_Hexencrush;
int m_Direction;
Update to ZDoom r1052: - Fixed: Dead players didn't get the MF_CORPSE flag set. - Fixed: The internal definition of Floor_LowerToNearest had incorrect parameter settings. - Fixed: Heretic's ActivatedTimeBomb had the same spawn ID as the inventory item. - fixed: Heretic's mace did not have its spawn ID set. - For controls that are not bound, the customize controls menu now displays a black --- instead of ???. - Applied Gez's BossBrainPatch3. - Fixed: P_BulletSlope() did not return the linetarget. This effected the Sigil, A_JumpIfCloser, and A_JumpIfTargetInLOS. - Fixed all the new warnings tossed out by GCC 4.3. - Fixed: PickNext/PrevWeapon() did not check for NULL player actors. - Fixed compilation issues with GCC. - Removed special case for nobotnodes in MAPINFO. - Added support for ST's QUARTERGRAVITY flag. - Added a generalized version of Skulltag's A_CheckRailReload function. - Fixed: DrawImage didn't take 0 as a valid image index. - Added Gez's RandomSpawner submission with significant changes. - Added optional blocks for MAPINFO map definitions. ZDoom doesn't use this feature itself but it allows other ports based on ZDoom to implement their own sets of options without making such a MAPINFO unreadable by ZDoom. - Fixed: The mugshot would not reset on re-spawn. - Fixed: Picking up a weapon would sometimes not activate the grin. - Changed: Line_SetIdentification will ignore extended parameters when used in maps defined Hexen style in MAPINFO. - Fixed: Ambient sounds didn't pass their point of origin to S_StartSound. - Fixed: UseType was not properly set for textures defined in TEXTURES. - Fixed: You couldn't set an offset for sprites defined in TEXTURES. - Added read barriers to all actor pointers within player_t except for mo, ReadyWeapon and PendingWeapon. - Added a read barrier to player_t::PrewmorphWeapon. - Fixed: After spawning a deathmatch player P_PlayerStartStomp must be called. - Fixed: SpawnThings must check if the players were spawned before calling P_PlayerStartStomp. - Fixed typo in flat scroll interpolation. - Changed FImageCollection to return translated texture indices so that animated icons can be done with it. - Changed FImageCollection to use a TArray to hold its data. - Fixed: SetChanHeadSettings did an assignment instead of comparing the channel ID witg CHAN_CEILING. - Changed sound sequence names for animated doors to FNames. - Automatically fixed: DCeiling didn't properly serialize its texture id. - Replaced integers as texture ID representation with a specific new type to track down all potentially incorrect uses and remaining WORDs used for texture IDs so that more than 32767 or 65535 textures can be defined. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@124 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-28 13:29:59 +00:00
int m_NewSpecial;
FTextureID m_Texture;
fixed_t m_FloorDestDist;
fixed_t m_Speed;
// [RH] New parameters used to reset and delay stairs
int m_ResetCount;
int m_OrgDist;
int m_Delay;
int m_PauseTime;
int m_StepTime;
int m_PerStepTime;
void StartFloorSound ();
void SetFloorChangeType (sector_t *sec, int change);
friend bool EV_BuildStairs (int tag, DFloor::EStair type, line_t *line,
fixed_t stairsize, fixed_t speed, int delay, int reset, int igntxt,
int usespecials);
friend bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush);
friend bool EV_FloorCrushStop (int tag);
friend bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);
private:
DFloor ();
};
bool EV_BuildStairs (int tag, DFloor::EStair type, line_t *line,
fixed_t stairsize, fixed_t speed, int delay, int reset, int igntxt,
int usespecials);
bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush);
bool EV_FloorCrushStop (int tag);
bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);
class DElevator : public DMover
{
DECLARE_CLASS (DElevator, DMover)
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
HAS_OBJECT_POINTERS
public:
enum EElevator
{
elevateUp,
elevateDown,
elevateCurrent,
// [RH] For FloorAndCeiling_Raise/Lower
elevateRaise,
elevateLower
};
DElevator (sector_t *sec);
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
void Destroy();
void Serialize (FArchive &arc);
void Tick ();
protected:
EElevator m_Type;
int m_Direction;
fixed_t m_FloorDestDist;
fixed_t m_CeilingDestDist;
fixed_t m_Speed;
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
TObjPtr<DInterpolation> m_Interp_Ceiling;
TObjPtr<DInterpolation> m_Interp_Floor;
void StartFloorSound ();
friend bool EV_DoElevator (line_t *line, DElevator::EElevator type, fixed_t speed,
fixed_t height, int tag);
private:
DElevator ();
};
bool EV_DoElevator (line_t *line, DElevator::EElevator type, fixed_t speed,
fixed_t height, int tag);
class DWaggleBase : public DMover
{
DECLARE_CLASS (DWaggleBase, DMover)
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
HAS_OBJECT_POINTERS
public:
DWaggleBase (sector_t *sec);
void Serialize (FArchive &arc);
protected:
fixed_t m_OriginalDist;
fixed_t m_Accumulator;
fixed_t m_AccDelta;
fixed_t m_TargetScale;
fixed_t m_Scale;
fixed_t m_ScaleDelta;
int m_Ticker;
int m_State;
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
TObjPtr<DInterpolation> m_Interpolation;
friend bool EV_StartWaggle (int tag, line_t *line, int height, int speed,
int offset, int timer, bool ceiling);
void DoWaggle (bool ceiling);
- Added Skulltag's texture compression feature. Update to ZDoom r1024: - Fixed: There was still an inventory bar check in FMugShot::GetFace() after separating it from DDoomStatusBar. - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. - Removed the 8-character limit on endpic names from the parser. (Though it might still be present in the texture manager; I don't remember.) - Fixed: EndSequence needs a proper constructor. - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction were doing some things in their destructor that needed to be done in the Destroy method. - Rewrote the interpolation code. Interpolations are no longer some objects that are separate from the rest of the engine. Instead, they are owned by the thinkers starting them. Also, polyobjects only spawn a single interpolation for each polyobject instead of a single one for each vertex. Also, different types of interpolation objects are used for different types of interpolation so that they can do some additional work if eventually needed. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@117 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-08 09:24:55 +00:00
void Destroy();
DWaggleBase ();
};
bool EV_StartWaggle (int tag, line_t *line, int height, int speed,
int offset, int timer, bool ceiling);
class DFloorWaggle : public DWaggleBase
{
DECLARE_CLASS (DFloorWaggle, DWaggleBase)
public:
DFloorWaggle (sector_t *sec);
void Tick ();
private:
DFloorWaggle ();
};
class DCeilingWaggle : public DWaggleBase
{
DECLARE_CLASS (DCeilingWaggle, DWaggleBase)
public:
DCeilingWaggle (sector_t *sec);
void Tick ();
private:
DCeilingWaggle ();
};
//jff 3/15/98 pure texture/type change for better generalized support
enum EChange
{
trigChangeOnly,
numChangeOnly,
};
bool EV_DoChange (line_t *line, EChange changetype, int tag);
//
// P_TELEPT
//
Update to ZDoom r1705: - ZDoom now disables the input method editor, since it has no east-Asian support, and having it open a composition window when you're only expecting a single keypress is not so good. - Fixed: Setting intermissioncounter to false in gameinfo drew all the stats at once, instead of revealing them one line at a time. - Fixed: The border definition in MAPINFO's gameinfo block used extra braces. - Added A_SetCrosshair. - Added A_WeaponBob. - Dropped the Hexen player classes' JumpZ down to 9, since the original value now works as it originally did. - MF2_NODMGTHRUST now works with players, too. (Previously, it was only for missiles.) Also added PPF_NOTHRUSTWHILEINVUL to prevent invulnerable players from being thrusted while taking damage. (Non-players were already unthrusted.) - A_ZoomFactor now scales turning with the FOV by default. ZOOM_NOSCALETURNING will leave it unaltered. - Added Gez's PowerInvisibility changes. - Fixed: clearflags did not clear flags6. - Added A_SetAngle, A_SetPitch, A_ScaleVelocity, and A_ChangeVelocity. - Enough with this "momentum" garbage. What Doom calls "momentum" is really velocity, and now it's known as such. The actor variables momx/momy/momz are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will continue to work as aliases from DECORATE. The ACS functions, however, require you to use the new name, since they never saw an official release yet. - Added A_ZoomFactor. This lets weapons scale their player's FOV. Each weapon maintains its own FOV scale independent from any other weapons the player may have. - Fixed: When parsing DECORATE functions that were not exported, the parser crashed after giving you the warning. - Fixed some improper preprocessor lines in autostart/autozend.cpp. - Added XInput support. For the benefit of people compiling with MinGW, the CMakeLists.txt checks for xinput.h and disables it if it cannot be found. (And much to my surprise, I accidentally discovered that if you have the DirectX SDK installed, those headers actually do work with GCC, though they add a few extra warnings.) git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@376 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-04 08:28:50 +00:00
bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, bool useFog, bool sourceFog, bool keepOrientation, bool haltVelocity = true);
bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog, bool sourceFog, bool keepOrientation, bool haltVelocity = true);
bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id, INTBOOL reverse);
bool EV_TeleportOther (int other_tid, int dest_tid, bool fog);
bool EV_TeleportGroup (int group_tid, AActor *victim, int source_tid, int dest_tid, bool moveSource, bool fog);
bool EV_TeleportSector (int tag, int source_tid, int dest_tid, bool fog, int group_tid);
//
// [RH] ACS (see also p_acs.h)
//
int P_StartScript (AActor *who, line_t *where, int script, char *map, bool backSide,
int arg0, int arg1, int arg2, int always, bool wantResultCode, bool net=false);
void P_SuspendScript (int script, char *map);
void P_TerminateScript (int script, char *map);
void P_DoDeferedScripts (void);
//
// [RH] p_quake.c
//
bool P_StartQuake (AActor *activator, int tid, int intensity, int duration, int damrad, int tremrad, FSoundID quakesfx);
#endif