2006-02-24 04:48:15 +00:00
|
|
|
// 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"
|
|
|
|
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
class FScanner;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
//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)
|
|
|
|
public:
|
|
|
|
enum EScrollType
|
|
|
|
{
|
|
|
|
sc_side,
|
|
|
|
sc_floor,
|
|
|
|
sc_ceiling,
|
|
|
|
sc_carry,
|
|
|
|
sc_carry_ceiling, // killough 4/11/98: carry objects hanging on ceilings
|
|
|
|
};
|
|
|
|
|
|
|
|
DScroller (EScrollType type, fixed_t dx, fixed_t dy, int control, int affectee, int accel);
|
|
|
|
DScroller (fixed_t dx, fixed_t dy, const line_t *l, int control, int accel);
|
|
|
|
~DScroller ();
|
|
|
|
|
|
|
|
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; }
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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)) };
|
|
|
|
|
|
|
|
inline FArchive &operator<< (FArchive &arc, DScroller::EScrollType &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DScroller::EScrollType)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
|
|
|
// phares 3/20/98: added new model of Pushers for push/pull effects
|
|
|
|
|
|
|
|
class DPusher : public DThinker
|
|
|
|
{
|
|
|
|
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);
|
|
|
|
int CheckForSectorMatch (EPusher type, int tag)
|
|
|
|
{
|
|
|
|
if (m_Type == type && sectors[m_Affectee].tag == tag)
|
|
|
|
return m_Affectee;
|
|
|
|
else
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
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;
|
|
|
|
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
|
|
|
|
|
2006-09-14 00:02:31 +00:00
|
|
|
friend bool PIT_PushThing (AActor *thing);
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
2006-09-14 00:02:31 +00:00
|
|
|
bool PIT_PushThing (AActor *thing);
|
2006-05-26 04:38:22 +00:00
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
inline FArchive &operator<< (FArchive &arc, DPusher::EPusher &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DPusher::EPusher)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Define values for map objects
|
|
|
|
#define MO_TELEPORTMAN 14
|
|
|
|
|
|
|
|
|
|
|
|
// [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.
|
2008-02-12 05:54:03 +00:00
|
|
|
bool CheckIfExitIsGood (AActor *self, level_info_t *info);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// at map load
|
|
|
|
void P_SpawnSpecials (void);
|
|
|
|
|
|
|
|
// every tic
|
|
|
|
void P_UpdateSpecials (void);
|
|
|
|
|
|
|
|
// when needed
|
2006-09-14 00:02:31 +00:00
|
|
|
bool P_ActivateLine (line_t *ld, AActor *mo, int side, int activationType);
|
|
|
|
bool P_TestActivateLine (line_t *ld, AActor *mo, int side, int activationType);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void P_PlayerInSpecialSector (player_t *player);
|
|
|
|
void P_PlayerOnSpecialFlat (player_t *player, int floorType);
|
|
|
|
|
|
|
|
void P_SetSectorFriction (int tag, int amount, bool alterFlag);
|
|
|
|
|
|
|
|
//
|
|
|
|
// 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 &sides[ (sectors[currentSector].lines[line])->sidenum[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 sides[ (sectors[currentSector].lines[line])->sidenum[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:
|
2006-09-14 00:02:31 +00:00
|
|
|
BYTE m_BaseLevel;
|
|
|
|
BYTE m_Phase;
|
2006-02-24 04:48:15 +00:00
|
|
|
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.
|
|
|
|
|
2006-09-14 00:02:31 +00:00
|
|
|
bool P_ChangeSwitchTexture (side_t *side, int useAgain, BYTE special, bool *quest=NULL);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void P_InitSwitchList ();
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
void P_ProcessSwitchDef (FScanner &sc);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// 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,
|
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2006-09-14 00:02:31 +00:00
|
|
|
int m_Crush;
|
2006-02-24 04:48:15 +00:00
|
|
|
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);
|
|
|
|
};
|
|
|
|
|
2006-05-26 04:38:22 +00:00
|
|
|
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);
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
inline FArchive &operator<< (FArchive &arc, DPlat::EPlatType &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DPlat::EPlatType)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
inline FArchive &operator<< (FArchive &arc, DPlat::EPlatState &state)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)state;
|
|
|
|
arc << val;
|
|
|
|
state = (DPlat::EPlatState)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// [RH]
|
|
|
|
// P_PILLAR
|
|
|
|
//
|
|
|
|
|
|
|
|
class DPillar : public DMover
|
|
|
|
{
|
|
|
|
DECLARE_CLASS (DPillar, DMover)
|
|
|
|
public:
|
|
|
|
enum EPillar
|
|
|
|
{
|
|
|
|
pillarBuild,
|
|
|
|
pillarOpen
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
DPillar (sector_t *sector, EPillar type, fixed_t speed, fixed_t height,
|
|
|
|
fixed_t height2, int crush);
|
|
|
|
|
|
|
|
void Serialize (FArchive &arc);
|
|
|
|
void Tick ();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EPillar m_Type;
|
|
|
|
fixed_t m_FloorSpeed;
|
|
|
|
fixed_t m_CeilingSpeed;
|
|
|
|
fixed_t m_FloorTarget;
|
|
|
|
fixed_t m_CeilingTarget;
|
|
|
|
int m_Crush;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DPillar ();
|
|
|
|
};
|
|
|
|
|
|
|
|
inline FArchive &operator<< (FArchive &arc, DPillar::EPillar &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DPillar::EPillar)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool EV_DoPillar (DPillar::EPillar type, int tag, fixed_t speed, fixed_t height,
|
|
|
|
fixed_t height2, int crush);
|
|
|
|
|
|
|
|
//
|
|
|
|
// 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 ();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2006-05-26 04:38:22 +00:00
|
|
|
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);
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
inline FArchive &operator<< (FArchive &arc, DDoor::EVlDoor &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DDoor::EVlDoor)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct FDoorAnimation
|
|
|
|
{
|
|
|
|
int BaseTexture;
|
|
|
|
int *TextureFrames;
|
|
|
|
int NumTextureFrames;
|
|
|
|
char *OpenSound;
|
|
|
|
char *CloseSound;
|
|
|
|
};
|
|
|
|
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
void P_ParseAnimatedDoor (FScanner &sc);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
class DAnimatedDoor : public DMovingCeiling
|
|
|
|
{
|
|
|
|
DECLARE_CLASS (DAnimatedDoor, DMovingCeiling)
|
|
|
|
public:
|
|
|
|
DAnimatedDoor (sector_t *sector);
|
|
|
|
DAnimatedDoor (sector_t *sector, line_t *line, int speed, int delay);
|
|
|
|
|
|
|
|
void Serialize (FArchive &arc);
|
|
|
|
void Tick ();
|
|
|
|
|
|
|
|
bool StartClosing ();
|
|
|
|
protected:
|
|
|
|
line_t *m_Line1, *m_Line2;
|
|
|
|
int m_Frame;
|
|
|
|
int m_WhichDoorIndex;
|
|
|
|
int m_Timer;
|
|
|
|
fixed_t m_BotDist;
|
|
|
|
int m_Status;
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
Opening,
|
|
|
|
Waiting,
|
|
|
|
Closing,
|
|
|
|
Dead
|
|
|
|
};
|
|
|
|
int m_Speed;
|
|
|
|
int m_Delay;
|
|
|
|
|
|
|
|
friend bool EV_SlidingDoor (line_t *line, AActor *thing, int tag, int speed, int delay);
|
|
|
|
private:
|
|
|
|
DAnimatedDoor ();
|
|
|
|
};
|
|
|
|
|
2006-05-26 04:38:22 +00:00
|
|
|
bool EV_SlidingDoor (line_t *line, AActor *thing, int tag, int speed, int delay);
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
//
|
|
|
|
// P_CEILNG
|
|
|
|
//
|
|
|
|
|
|
|
|
// [RH] Changed these
|
|
|
|
class DCeiling : public DMovingCeiling
|
|
|
|
{
|
|
|
|
DECLARE_CLASS (DCeiling, DMovingCeiling)
|
|
|
|
public:
|
|
|
|
enum ECeiling
|
|
|
|
{
|
|
|
|
ceilLowerByValue,
|
|
|
|
ceilRaiseByValue,
|
|
|
|
ceilMoveToValue,
|
|
|
|
ceilLowerToHighestFloor,
|
|
|
|
ceilLowerInstant,
|
|
|
|
ceilRaiseInstant,
|
|
|
|
ceilCrushAndRaise,
|
|
|
|
ceilLowerAndCrush,
|
|
|
|
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 ();
|
|
|
|
|
|
|
|
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;
|
|
|
|
int m_Silent;
|
|
|
|
int m_Direction; // 1 = up, 0 = waiting, -1 = down
|
|
|
|
|
|
|
|
// [RH] Need these for BOOM-ish transferring ceilings
|
|
|
|
int m_Texture;
|
|
|
|
int m_NewSpecial;
|
|
|
|
|
|
|
|
// ID
|
|
|
|
int m_Tag;
|
|
|
|
int m_OldDirection;
|
|
|
|
|
|
|
|
void PlayCeilingSound ();
|
|
|
|
|
|
|
|
private:
|
|
|
|
DCeiling ();
|
|
|
|
|
|
|
|
friend 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);
|
|
|
|
friend bool EV_CeilingCrushStop (int tag);
|
|
|
|
friend void P_ActivateInStasisCeiling (int tag);
|
|
|
|
};
|
|
|
|
|
2006-05-26 04:38:22 +00:00
|
|
|
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 EV_CeilingCrushStop (int tag);
|
|
|
|
void P_ActivateInStasisCeiling (int tag);
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
inline FArchive &operator<< (FArchive &arc, DCeiling::ECeiling &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DCeiling::ECeiling)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// 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;
|
|
|
|
int m_Direction;
|
|
|
|
short m_NewSpecial;
|
|
|
|
short 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);
|
|
|
|
friend bool EV_FloorCrushStop (int tag);
|
|
|
|
friend bool EV_DoDonut (int tag, fixed_t pillarspeed, fixed_t slimespeed);
|
|
|
|
private:
|
|
|
|
DFloor ();
|
|
|
|
};
|
|
|
|
|
2006-05-26 04:38:22 +00:00
|
|
|
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 EV_FloorCrushStop (int tag);
|
|
|
|
bool EV_DoDonut (int tag, fixed_t pillarspeed, fixed_t slimespeed);
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
inline FArchive &operator<< (FArchive &arc, DFloor::EFloor &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DFloor::EFloor)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
|
|
|
class DElevator : public DMover
|
|
|
|
{
|
|
|
|
DECLARE_CLASS (DElevator, DMover)
|
|
|
|
public:
|
|
|
|
enum EElevator
|
|
|
|
{
|
|
|
|
elevateUp,
|
|
|
|
elevateDown,
|
|
|
|
elevateCurrent,
|
|
|
|
// [RH] For FloorAndCeiling_Raise/Lower
|
|
|
|
elevateRaise,
|
|
|
|
elevateLower
|
|
|
|
};
|
|
|
|
|
|
|
|
DElevator (sector_t *sec);
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
void StartFloorSound ();
|
|
|
|
|
|
|
|
friend bool EV_DoElevator (line_t *line, DElevator::EElevator type, fixed_t speed,
|
|
|
|
fixed_t height, int tag);
|
|
|
|
private:
|
|
|
|
DElevator ();
|
|
|
|
};
|
|
|
|
|
2006-05-26 04:38:22 +00:00
|
|
|
bool EV_DoElevator (line_t *line, DElevator::EElevator type, fixed_t speed,
|
|
|
|
fixed_t height, int tag);
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
inline FArchive &operator<< (FArchive &arc, DElevator::EElevator &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DElevator::EElevator)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
|
|
|
class DWaggleBase : public DMover
|
|
|
|
{
|
|
|
|
DECLARE_CLASS (DWaggleBase, DMover)
|
|
|
|
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;
|
|
|
|
|
|
|
|
friend bool EV_StartWaggle (int tag, int height, int speed,
|
|
|
|
int offset, int timer, bool ceiling);
|
|
|
|
|
|
|
|
void DoWaggle (bool ceiling);
|
|
|
|
DWaggleBase ();
|
|
|
|
};
|
|
|
|
|
2006-05-26 04:38:22 +00:00
|
|
|
bool EV_StartWaggle (int tag, int height, int speed,
|
|
|
|
int offset, int timer, bool ceiling);
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
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
|
|
|
|
//
|
|
|
|
bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, bool useFog, bool sourceFog, bool keepOrientation);
|
|
|
|
bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog, bool sourceFog, bool keepOrientation);
|
2006-09-14 00:02:31 +00:00
|
|
|
bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id, INTBOOL reverse);
|
2006-02-24 04:48:15 +00:00
|
|
|
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
|
|
|
|
//
|
2006-07-30 08:31:26 +00:00
|
|
|
bool P_StartQuake (AActor *activator, int tid, int intensity, int duration, int damrad, int tremrad);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
#endif
|