gzdoom-last-svn/src/p_buildmap.cpp

877 lines
26 KiB
C++
Raw Normal View History

//**************************************************************************
//**
//** TEMPLATE.C
//**
//**************************************************************************
// HEADER FILES ------------------------------------------------------------
#include "p_local.h"
#include "m_swap.h"
#include "v_palette.h"
#include "w_wad.h"
#include "templates.h"
#include "r_sky.h"
#include "r_main.h"
#include "r_defs.h"
- fixed drawing of Strife's targeter sprites when HUD models are active. - removed redundant P_FindLine function from FraggleScript source. - updated model rendering code to latest Skulltag version. Update to ZDoom r977: - Fixed: All translucent blending operations for CopyColors must treat an alpha of 0 so that the pixel is not modified or texture composition as intended will not work. - Fixed: 3D hardware texture filling did not copy pixels with 0 alpha, preserving whatever was underneath in the texture box previously. - Fixed: s_sound.cpp had its own idea of whether or not sounds were paused and did not entirely keep it in sync with the sound system's. This meant that when starting a new game from the menu, all sounds were played as menu sounds until you did something to pause the game, because s_sound.cpp thought sounds were unpaused, while the FMOD system thought they were. - I finally managed to test the translucency options for composite texture definitions in HIRESTEX. The feature should be complete now. - Fixed: A_CheckTargetInLOS used BAM angles instead of degrees which is the DECORATE convention. - Added Snowkate709's A_CheckTargetInLOS addition. - Added listmaps CCMD. - Revised underwater effect now uses a lowpass filter in combination with an optional freeverb unit. - Removed ResetEnvironment hack, since with software reverb, losing the existing reverb when focus is lost isn't a problem. - Commented out the TiMidity FIXME messages. - Fixed: FBarShader::GetColumn() passed incorrect information to the software renderer for horizontal bars. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@106 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-17 08:47:26 +00:00
#include "p_setup.h"
#include "g_level.h"
// MACROS ------------------------------------------------------------------
//#define SHADE2LIGHT(s) (clamp (160-2*(s), 0, 255))
#define SHADE2LIGHT(s) (clamp (255-2*s, 0, 255))
// TYPES -------------------------------------------------------------------
//ceilingstat/floorstat:
// bit 0: 1 = parallaxing, 0 = not "P"
// bit 1: 1 = groudraw, 0 = not
// bit 2: 1 = swap x&y, 0 = not "F"
// bit 3: 1 = double smooshiness "E"
// bit 4: 1 = x-flip "F"
// bit 5: 1 = y-flip "F"
// bit 6: 1 = Align texture to first wall of sector "R"
// bits 7-8: "T"
// 00 = normal floors
// 01 = masked floors
// 10 = transluscent masked floors
// 11 = reverse transluscent masked floors
// bits 9-15: reserved
//40 bytes
Update to ZDoom r1514: - Fixed: Altering a link type with Sector_SetLink did not work. - Fixed: player.crouchsprite had no proper means of unsetting the crouch sprite which is needed by the ChexPlayer. - Fixed: A_ChangeFlags must unlink the actor from the world before changing the NOBLOCKMAP and NOSECTOR flags. - Fixed: Dehacked string replacement did not check the clusters' finaleflats. - Changed the definition of several typedef'd structs so that they are properly named. - Limited DEHSUPP lump lookup to search zdoom.pk3 only. It will no longer be possible to load DEHSUPP lumps from user WADs. - Brought back the text-based DEHSUPP parser and changed it to be able to reference states by label. Also changed label names of DoomUnusedStates and added proper labels to all states that were previously forced to be the first state of an actor so that the old (limited) method could access them. This was done to address the following bug: - Fixed: The player's death states calling A_PlayerSkinCheck should not be part of the state set that is accessible by Dehacked. These will produce error messages when mapped to non-players. - Fixed: Reading the RNG states from a savegame calculated the amounts of RNGs in the savegame wrong. - Changed random seed initialization so that it uses the system's cryptographically secure random number generator, if available, instead of the current time. - Changed the random number generator from Lee Killough's algorithm to the SFMT607 variant of the Mersenne Twister. <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html> - Made fmodex.dll delay-loaded so the game should be runnable on Windows 95 again, though without sound. - Changed gameinfo_t and gameborder_t to be named structs instead of typedef'ed anonymous structs. - Fixed: P_AutoUseHealth() used autousemodes 0 and 1 instead of 1 and 2. - Fixed: SBARINFO did not recognize 5:4 aspect ratio. - Fixed: screenshot_dir was ignored. - Removed some obsolete code from G_InitLevelLocals that was causing problems with maps that have no name. - Fixed: The inner loop in AWeaponSlot::PickWeapon could endlessly loop when the counter variable became negative. - Fixed: Implicitly defined clusters were not initialized when being created. - Fixed: Item tossing did not work anymore. - Changed: Making the gameinfo customizable by MAPINFO requires different checks for map specific border flats. - removed gamemission variable because it wasn't used anywhere. - removed gamemode variable. All it was used for were some checks that really should depend on GI_MAPxx. - Externalized all internal gameinfo definitions. - added include to MAPINFO parser. - split IWAD detection code off from d_main.cpp into its own file. - disabled gamemission based switch filtering because it is not useful. - added GAMEINFO submission by Blzut3 with significant modifications. There is no GAMEINFO lump. Instead all information is placed in MAPINFO, except the data that is needed to decide which WADs to autoload. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@318 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-29 11:21:36 +00:00
struct sectortype
{
SWORD wallptr, wallnum;
SDWORD ceilingz, floorz;
SWORD ceilingstat, floorstat;
SWORD ceilingpicnum, ceilingheinum;
SBYTE ceilingshade;
BYTE ceilingpal, ceilingxpanning, ceilingypanning;
SWORD floorpicnum, floorheinum;
SBYTE floorshade;
BYTE floorpal, floorxpanning, floorypanning;
BYTE visibility, filler;
SWORD lotag, hitag, extra;
Update to ZDoom r1514: - Fixed: Altering a link type with Sector_SetLink did not work. - Fixed: player.crouchsprite had no proper means of unsetting the crouch sprite which is needed by the ChexPlayer. - Fixed: A_ChangeFlags must unlink the actor from the world before changing the NOBLOCKMAP and NOSECTOR flags. - Fixed: Dehacked string replacement did not check the clusters' finaleflats. - Changed the definition of several typedef'd structs so that they are properly named. - Limited DEHSUPP lump lookup to search zdoom.pk3 only. It will no longer be possible to load DEHSUPP lumps from user WADs. - Brought back the text-based DEHSUPP parser and changed it to be able to reference states by label. Also changed label names of DoomUnusedStates and added proper labels to all states that were previously forced to be the first state of an actor so that the old (limited) method could access them. This was done to address the following bug: - Fixed: The player's death states calling A_PlayerSkinCheck should not be part of the state set that is accessible by Dehacked. These will produce error messages when mapped to non-players. - Fixed: Reading the RNG states from a savegame calculated the amounts of RNGs in the savegame wrong. - Changed random seed initialization so that it uses the system's cryptographically secure random number generator, if available, instead of the current time. - Changed the random number generator from Lee Killough's algorithm to the SFMT607 variant of the Mersenne Twister. <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html> - Made fmodex.dll delay-loaded so the game should be runnable on Windows 95 again, though without sound. - Changed gameinfo_t and gameborder_t to be named structs instead of typedef'ed anonymous structs. - Fixed: P_AutoUseHealth() used autousemodes 0 and 1 instead of 1 and 2. - Fixed: SBARINFO did not recognize 5:4 aspect ratio. - Fixed: screenshot_dir was ignored. - Removed some obsolete code from G_InitLevelLocals that was causing problems with maps that have no name. - Fixed: The inner loop in AWeaponSlot::PickWeapon could endlessly loop when the counter variable became negative. - Fixed: Implicitly defined clusters were not initialized when being created. - Fixed: Item tossing did not work anymore. - Changed: Making the gameinfo customizable by MAPINFO requires different checks for map specific border flats. - removed gamemission variable because it wasn't used anywhere. - removed gamemode variable. All it was used for were some checks that really should depend on GI_MAPxx. - Externalized all internal gameinfo definitions. - added include to MAPINFO parser. - split IWAD detection code off from d_main.cpp into its own file. - disabled gamemission based switch filtering because it is not useful. - added GAMEINFO submission by Blzut3 with significant modifications. There is no GAMEINFO lump. Instead all information is placed in MAPINFO, except the data that is needed to decide which WADs to autoload. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@318 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-29 11:21:36 +00:00
};
//cstat:
// bit 0: 1 = Blocking wall (use with clipmove, getzrange) "B"
// bit 1: 1 = bottoms of invisible walls swapped, 0 = not "2"
// bit 2: 1 = align picture on bottom (for doors), 0 = top "O"
// bit 3: 1 = x-flipped, 0 = normal "F"
// bit 4: 1 = masking wall, 0 = not "M"
// bit 5: 1 = 1-way wall, 0 = not "1"
// bit 6: 1 = Blocking wall (use with hitscan / cliptype 1) "H"
// bit 7: 1 = Transluscence, 0 = not "T"
// bit 8: 1 = y-flipped, 0 = normal "F"
// bit 9: 1 = Transluscence reversing, 0 = normal "T"
// bits 10-15: reserved
//32 bytes
Update to ZDoom r1514: - Fixed: Altering a link type with Sector_SetLink did not work. - Fixed: player.crouchsprite had no proper means of unsetting the crouch sprite which is needed by the ChexPlayer. - Fixed: A_ChangeFlags must unlink the actor from the world before changing the NOBLOCKMAP and NOSECTOR flags. - Fixed: Dehacked string replacement did not check the clusters' finaleflats. - Changed the definition of several typedef'd structs so that they are properly named. - Limited DEHSUPP lump lookup to search zdoom.pk3 only. It will no longer be possible to load DEHSUPP lumps from user WADs. - Brought back the text-based DEHSUPP parser and changed it to be able to reference states by label. Also changed label names of DoomUnusedStates and added proper labels to all states that were previously forced to be the first state of an actor so that the old (limited) method could access them. This was done to address the following bug: - Fixed: The player's death states calling A_PlayerSkinCheck should not be part of the state set that is accessible by Dehacked. These will produce error messages when mapped to non-players. - Fixed: Reading the RNG states from a savegame calculated the amounts of RNGs in the savegame wrong. - Changed random seed initialization so that it uses the system's cryptographically secure random number generator, if available, instead of the current time. - Changed the random number generator from Lee Killough's algorithm to the SFMT607 variant of the Mersenne Twister. <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html> - Made fmodex.dll delay-loaded so the game should be runnable on Windows 95 again, though without sound. - Changed gameinfo_t and gameborder_t to be named structs instead of typedef'ed anonymous structs. - Fixed: P_AutoUseHealth() used autousemodes 0 and 1 instead of 1 and 2. - Fixed: SBARINFO did not recognize 5:4 aspect ratio. - Fixed: screenshot_dir was ignored. - Removed some obsolete code from G_InitLevelLocals that was causing problems with maps that have no name. - Fixed: The inner loop in AWeaponSlot::PickWeapon could endlessly loop when the counter variable became negative. - Fixed: Implicitly defined clusters were not initialized when being created. - Fixed: Item tossing did not work anymore. - Changed: Making the gameinfo customizable by MAPINFO requires different checks for map specific border flats. - removed gamemission variable because it wasn't used anywhere. - removed gamemode variable. All it was used for were some checks that really should depend on GI_MAPxx. - Externalized all internal gameinfo definitions. - added include to MAPINFO parser. - split IWAD detection code off from d_main.cpp into its own file. - disabled gamemission based switch filtering because it is not useful. - added GAMEINFO submission by Blzut3 with significant modifications. There is no GAMEINFO lump. Instead all information is placed in MAPINFO, except the data that is needed to decide which WADs to autoload. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@318 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-29 11:21:36 +00:00
struct walltype
{
SDWORD x, y;
SWORD point2, nextwall, nextsector, cstat;
SWORD picnum, overpicnum;
SBYTE shade;
BYTE pal, xrepeat, yrepeat, xpanning, ypanning;
SWORD lotag, hitag, extra;
Update to ZDoom r1514: - Fixed: Altering a link type with Sector_SetLink did not work. - Fixed: player.crouchsprite had no proper means of unsetting the crouch sprite which is needed by the ChexPlayer. - Fixed: A_ChangeFlags must unlink the actor from the world before changing the NOBLOCKMAP and NOSECTOR flags. - Fixed: Dehacked string replacement did not check the clusters' finaleflats. - Changed the definition of several typedef'd structs so that they are properly named. - Limited DEHSUPP lump lookup to search zdoom.pk3 only. It will no longer be possible to load DEHSUPP lumps from user WADs. - Brought back the text-based DEHSUPP parser and changed it to be able to reference states by label. Also changed label names of DoomUnusedStates and added proper labels to all states that were previously forced to be the first state of an actor so that the old (limited) method could access them. This was done to address the following bug: - Fixed: The player's death states calling A_PlayerSkinCheck should not be part of the state set that is accessible by Dehacked. These will produce error messages when mapped to non-players. - Fixed: Reading the RNG states from a savegame calculated the amounts of RNGs in the savegame wrong. - Changed random seed initialization so that it uses the system's cryptographically secure random number generator, if available, instead of the current time. - Changed the random number generator from Lee Killough's algorithm to the SFMT607 variant of the Mersenne Twister. <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html> - Made fmodex.dll delay-loaded so the game should be runnable on Windows 95 again, though without sound. - Changed gameinfo_t and gameborder_t to be named structs instead of typedef'ed anonymous structs. - Fixed: P_AutoUseHealth() used autousemodes 0 and 1 instead of 1 and 2. - Fixed: SBARINFO did not recognize 5:4 aspect ratio. - Fixed: screenshot_dir was ignored. - Removed some obsolete code from G_InitLevelLocals that was causing problems with maps that have no name. - Fixed: The inner loop in AWeaponSlot::PickWeapon could endlessly loop when the counter variable became negative. - Fixed: Implicitly defined clusters were not initialized when being created. - Fixed: Item tossing did not work anymore. - Changed: Making the gameinfo customizable by MAPINFO requires different checks for map specific border flats. - removed gamemission variable because it wasn't used anywhere. - removed gamemode variable. All it was used for were some checks that really should depend on GI_MAPxx. - Externalized all internal gameinfo definitions. - added include to MAPINFO parser. - split IWAD detection code off from d_main.cpp into its own file. - disabled gamemission based switch filtering because it is not useful. - added GAMEINFO submission by Blzut3 with significant modifications. There is no GAMEINFO lump. Instead all information is placed in MAPINFO, except the data that is needed to decide which WADs to autoload. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@318 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-29 11:21:36 +00:00
};
//cstat:
// bit 0: 1 = Blocking sprite (use with clipmove, getzrange) "B"
// bit 1: 1 = transluscence, 0 = normal "T"
// bit 2: 1 = x-flipped, 0 = normal "F"
// bit 3: 1 = y-flipped, 0 = normal "F"
// bits 5-4: 00 = FACE sprite (default) "R"
// 01 = WALL sprite (like masked walls)
// 10 = FLOOR sprite (parallel to ceilings&floors)
// bit 6: 1 = 1-sided sprite, 0 = normal "1"
// bit 7: 1 = Real centered centering, 0 = foot center "C"
// bit 8: 1 = Blocking sprite (use with hitscan / cliptype 1) "H"
// bit 9: 1 = Transluscence reversing, 0 = normal "T"
// bits 10-14: reserved
// bit 15: 1 = Invisible sprite, 0 = not invisible
//44 bytes
Update to ZDoom r1514: - Fixed: Altering a link type with Sector_SetLink did not work. - Fixed: player.crouchsprite had no proper means of unsetting the crouch sprite which is needed by the ChexPlayer. - Fixed: A_ChangeFlags must unlink the actor from the world before changing the NOBLOCKMAP and NOSECTOR flags. - Fixed: Dehacked string replacement did not check the clusters' finaleflats. - Changed the definition of several typedef'd structs so that they are properly named. - Limited DEHSUPP lump lookup to search zdoom.pk3 only. It will no longer be possible to load DEHSUPP lumps from user WADs. - Brought back the text-based DEHSUPP parser and changed it to be able to reference states by label. Also changed label names of DoomUnusedStates and added proper labels to all states that were previously forced to be the first state of an actor so that the old (limited) method could access them. This was done to address the following bug: - Fixed: The player's death states calling A_PlayerSkinCheck should not be part of the state set that is accessible by Dehacked. These will produce error messages when mapped to non-players. - Fixed: Reading the RNG states from a savegame calculated the amounts of RNGs in the savegame wrong. - Changed random seed initialization so that it uses the system's cryptographically secure random number generator, if available, instead of the current time. - Changed the random number generator from Lee Killough's algorithm to the SFMT607 variant of the Mersenne Twister. <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html> - Made fmodex.dll delay-loaded so the game should be runnable on Windows 95 again, though without sound. - Changed gameinfo_t and gameborder_t to be named structs instead of typedef'ed anonymous structs. - Fixed: P_AutoUseHealth() used autousemodes 0 and 1 instead of 1 and 2. - Fixed: SBARINFO did not recognize 5:4 aspect ratio. - Fixed: screenshot_dir was ignored. - Removed some obsolete code from G_InitLevelLocals that was causing problems with maps that have no name. - Fixed: The inner loop in AWeaponSlot::PickWeapon could endlessly loop when the counter variable became negative. - Fixed: Implicitly defined clusters were not initialized when being created. - Fixed: Item tossing did not work anymore. - Changed: Making the gameinfo customizable by MAPINFO requires different checks for map specific border flats. - removed gamemission variable because it wasn't used anywhere. - removed gamemode variable. All it was used for were some checks that really should depend on GI_MAPxx. - Externalized all internal gameinfo definitions. - added include to MAPINFO parser. - split IWAD detection code off from d_main.cpp into its own file. - disabled gamemission based switch filtering because it is not useful. - added GAMEINFO submission by Blzut3 with significant modifications. There is no GAMEINFO lump. Instead all information is placed in MAPINFO, except the data that is needed to decide which WADs to autoload. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@318 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-29 11:21:36 +00:00
struct spritetype
{
SDWORD x, y, z;
SWORD cstat, picnum;
SBYTE shade;
BYTE pal, clipdist, filler;
BYTE xrepeat, yrepeat;
SBYTE xoffset, yoffset;
SWORD sectnum, statnum;
SWORD ang, owner, xvel, yvel, zvel;
SWORD lotag, hitag, extra;
Update to ZDoom r1514: - Fixed: Altering a link type with Sector_SetLink did not work. - Fixed: player.crouchsprite had no proper means of unsetting the crouch sprite which is needed by the ChexPlayer. - Fixed: A_ChangeFlags must unlink the actor from the world before changing the NOBLOCKMAP and NOSECTOR flags. - Fixed: Dehacked string replacement did not check the clusters' finaleflats. - Changed the definition of several typedef'd structs so that they are properly named. - Limited DEHSUPP lump lookup to search zdoom.pk3 only. It will no longer be possible to load DEHSUPP lumps from user WADs. - Brought back the text-based DEHSUPP parser and changed it to be able to reference states by label. Also changed label names of DoomUnusedStates and added proper labels to all states that were previously forced to be the first state of an actor so that the old (limited) method could access them. This was done to address the following bug: - Fixed: The player's death states calling A_PlayerSkinCheck should not be part of the state set that is accessible by Dehacked. These will produce error messages when mapped to non-players. - Fixed: Reading the RNG states from a savegame calculated the amounts of RNGs in the savegame wrong. - Changed random seed initialization so that it uses the system's cryptographically secure random number generator, if available, instead of the current time. - Changed the random number generator from Lee Killough's algorithm to the SFMT607 variant of the Mersenne Twister. <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html> - Made fmodex.dll delay-loaded so the game should be runnable on Windows 95 again, though without sound. - Changed gameinfo_t and gameborder_t to be named structs instead of typedef'ed anonymous structs. - Fixed: P_AutoUseHealth() used autousemodes 0 and 1 instead of 1 and 2. - Fixed: SBARINFO did not recognize 5:4 aspect ratio. - Fixed: screenshot_dir was ignored. - Removed some obsolete code from G_InitLevelLocals that was causing problems with maps that have no name. - Fixed: The inner loop in AWeaponSlot::PickWeapon could endlessly loop when the counter variable became negative. - Fixed: Implicitly defined clusters were not initialized when being created. - Fixed: Item tossing did not work anymore. - Changed: Making the gameinfo customizable by MAPINFO requires different checks for map specific border flats. - removed gamemission variable because it wasn't used anywhere. - removed gamemode variable. All it was used for were some checks that really should depend on GI_MAPxx. - Externalized all internal gameinfo definitions. - added include to MAPINFO parser. - split IWAD detection code off from d_main.cpp into its own file. - disabled gamemission based switch filtering because it is not useful. - added GAMEINFO submission by Blzut3 with significant modifications. There is no GAMEINFO lump. Instead all information is placed in MAPINFO, except the data that is needed to decide which WADs to autoload. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@318 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-29 11:21:36 +00:00
};
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
// I used to have all the Xobjects mapped out. Not anymore.
// (Thanks for the great firmware, Seagate!)
struct Xsprite
{
BYTE NotReallyPadding[16];
WORD Data1;
WORD Data2;
WORD Data3;
WORD ThisIsntPaddingEither;
DWORD NorThis:2;
DWORD Data4:16;
DWORD WhatIsThisIDontEven:14;
BYTE ThisNeedsToBe56Bytes[28];
};
struct SlopeWork
{
walltype *wal;
walltype *wal2;
long dx, dy, i, x[3], y[3], z[3];
long heinum;
};
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
void P_AdjustLine (line_t *line);
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
static bool P_LoadBloodMap (BYTE *data, size_t len, FMapThing **sprites, int *numsprites);
static void LoadSectors (sectortype *bsectors);
static void LoadWalls (walltype *walls, int numwalls, sectortype *bsectors);
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites, sectortype *bsectors, FMapThing *mapthings);
static vertex_t *FindVertex (fixed_t x, fixed_t y);
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
static void CreateStartSpot (fixed_t *pos, FMapThing *start);
static void CalcPlane (SlopeWork &slope, secplane_t &plane);
static void Decrypt (void *to, const void *from, int len, int key);
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
// PUBLIC DATA DEFINITIONS -------------------------------------------------
// PRIVATE DATA DEFINITIONS ------------------------------------------------
// CODE --------------------------------------------------------------------
- fixed drawing of Strife's targeter sprites when HUD models are active. - removed redundant P_FindLine function from FraggleScript source. - updated model rendering code to latest Skulltag version. Update to ZDoom r977: - Fixed: All translucent blending operations for CopyColors must treat an alpha of 0 so that the pixel is not modified or texture composition as intended will not work. - Fixed: 3D hardware texture filling did not copy pixels with 0 alpha, preserving whatever was underneath in the texture box previously. - Fixed: s_sound.cpp had its own idea of whether or not sounds were paused and did not entirely keep it in sync with the sound system's. This meant that when starting a new game from the menu, all sounds were played as menu sounds until you did something to pause the game, because s_sound.cpp thought sounds were unpaused, while the FMOD system thought they were. - I finally managed to test the translucency options for composite texture definitions in HIRESTEX. The feature should be complete now. - Fixed: A_CheckTargetInLOS used BAM angles instead of degrees which is the DECORATE convention. - Added Snowkate709's A_CheckTargetInLOS addition. - Added listmaps CCMD. - Revised underwater effect now uses a lowpass filter in combination with an optional freeverb unit. - Removed ResetEnvironment hack, since with software reverb, losing the existing reverb when focus is lost isn't a problem. - Commented out the TiMidity FIXME messages. - Fixed: FBarShader::GetColumn() passed incorrect information to the software renderer for horizontal bars. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@106 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-17 08:47:26 +00:00
bool P_IsBuildMap(MapData *map)
{
DWORD len = map->Size(ML_LABEL);
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
if (len < 4)
{
return false;
}
- fixed drawing of Strife's targeter sprites when HUD models are active. - removed redundant P_FindLine function from FraggleScript source. - updated model rendering code to latest Skulltag version. Update to ZDoom r977: - Fixed: All translucent blending operations for CopyColors must treat an alpha of 0 so that the pixel is not modified or texture composition as intended will not work. - Fixed: 3D hardware texture filling did not copy pixels with 0 alpha, preserving whatever was underneath in the texture box previously. - Fixed: s_sound.cpp had its own idea of whether or not sounds were paused and did not entirely keep it in sync with the sound system's. This meant that when starting a new game from the menu, all sounds were played as menu sounds until you did something to pause the game, because s_sound.cpp thought sounds were unpaused, while the FMOD system thought they were. - I finally managed to test the translucency options for composite texture definitions in HIRESTEX. The feature should be complete now. - Fixed: A_CheckTargetInLOS used BAM angles instead of degrees which is the DECORATE convention. - Added Snowkate709's A_CheckTargetInLOS addition. - Added listmaps CCMD. - Revised underwater effect now uses a lowpass filter in combination with an optional freeverb unit. - Removed ResetEnvironment hack, since with software reverb, losing the existing reverb when focus is lost isn't a problem. - Commented out the TiMidity FIXME messages. - Fixed: FBarShader::GetColumn() passed incorrect information to the software renderer for horizontal bars. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@106 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-17 08:47:26 +00:00
BYTE *data = new BYTE[len];
map->Seek(ML_LABEL);
map->Read(ML_LABEL, data);
// Check for a Blood map.
if (*(DWORD *)data == MAKE_ID('B','L','M','\x1a'))
{
delete[] data;
return true;
}
numsectors = LittleShort(*(WORD *)(data + 20));
int numwalls;
if (len < 26 + numsectors*sizeof(sectortype) ||
(numwalls = LittleShort(*(WORD *)(data + 22 + numsectors*sizeof(sectortype))),
len < 24 + numsectors*sizeof(sectortype) + numwalls*sizeof(walltype)) ||
LittleLong(*(DWORD *)data) != 7 ||
LittleShort(*(WORD *)(data + 16)) >= 2048)
{ // Can't possibly be a version 7 BUILD map
delete[] data;
return false;
}
delete[] data;
return true;
}
//==========================================================================
//
// P_LoadBuildMap
//
//==========================================================================
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
bool P_LoadBuildMap (BYTE *data, size_t len, FMapThing **sprites, int *numspr)
{
if (len < 26)
{
return false;
}
// Check for a Blood map.
if (*(DWORD *)data == MAKE_ID('B','L','M','\x1a'))
{
return P_LoadBloodMap (data, len, sprites, numspr);
}
numsectors = LittleShort(*(WORD *)(data + 20));
int numwalls;
int numsprites;
if (len < 26 + numsectors*sizeof(sectortype) ||
(numwalls = LittleShort(*(WORD *)(data + 22 + numsectors*sizeof(sectortype))),
len < 24 + numsectors*sizeof(sectortype) + numwalls*sizeof(walltype)) ||
LittleLong(*(DWORD *)data) != 7 ||
LittleShort(*(WORD *)(data + 16)) >= 2048)
{ // Can't possibly be a version 7 BUILD map
return false;
}
LoadSectors ((sectortype *)(data + 22));
LoadWalls ((walltype *)(data + 24 + numsectors*sizeof(sectortype)), numwalls,
(sectortype *)(data + 22));
numsprites = *(WORD *)(data + 24 + numsectors*sizeof(sectortype) + numwalls*sizeof(walltype));
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
*sprites = new FMapThing[numsprites + 1];
CreateStartSpot ((fixed_t *)(data + 4), *sprites);
*numspr = 1 + LoadSprites ((spritetype *)(data + 26 + numsectors*sizeof(sectortype) + numwalls*sizeof(walltype)),
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
NULL, numsprites, (sectortype *)(data + 22), *sprites + 1);
return true;
}
//==========================================================================
//
// P_LoadBloodMap
//
//==========================================================================
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
static bool P_LoadBloodMap (BYTE *data, size_t len, FMapThing **mapthings, int *numspr)
{
BYTE infoBlock[37];
int mapver = data[5];
DWORD matt;
int numRevisions, numWalls, numsprites, skyLen;
int i;
int k;
if (mapver != 6 && mapver != 7)
{
return false;
}
matt = *(DWORD *)(data + 28);
if (matt != 0 &&
matt != MAKE_ID('M','a','t','t') &&
matt != MAKE_ID('t','t','a','M'))
{
Decrypt (infoBlock, data + 6, 37, 0x7474614d);
}
else
{
memcpy (infoBlock, data + 6, 37);
}
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
numRevisions = LittleLong(*(DWORD *)(infoBlock + 27));
numsectors = LittleShort(*(WORD *)(infoBlock + 31));
numWalls = LittleShort(*(WORD *)(infoBlock + 33));
numsprites = LittleShort(*(WORD *)(infoBlock + 35));
skyLen = 2 << LittleShort(*(WORD *)(infoBlock + 16));
if (mapver == 7)
{
// Version 7 has some extra stuff after the info block. This
// includes a copyright, and I have no idea what the rest of
// it is.
data += 171;
}
else
{
data += 43;
}
// Skip the sky info.
data += skyLen;
sectortype *bsec = new sectortype[numsectors];
walltype *bwal = new walltype[numWalls];
spritetype *bspr = new spritetype[numsprites];
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
Xsprite *xspr = new Xsprite[numsprites];
// Read sectors
k = numRevisions * sizeof(sectortype);
for (i = 0; i < numsectors; ++i)
{
if (mapver == 7)
{
Decrypt (&bsec[i], data, sizeof(sectortype), k);
}
else
{
memcpy (&bsec[i], data, sizeof(sectortype));
}
data += sizeof(sectortype);
if (bsec[i].extra > 0) // skip Xsector
{
data += 60;
}
}
// Read walls
k |= 0x7474614d;
for (i = 0; i < numWalls; ++i)
{
if (mapver == 7)
{
Decrypt (&bwal[i], data, sizeof(walltype), k);
}
else
{
memcpy (&bwal[i], data, sizeof(walltype));
}
data += sizeof(walltype);
if (bwal[i].extra > 0) // skip Xwall
{
data += 24;
}
}
// Read sprites
k = (numRevisions * sizeof(spritetype)) | 0x7474614d;
for (i = 0; i < numsprites; ++i)
{
if (mapver == 7)
{
Decrypt (&bspr[i], data, sizeof(spritetype), k);
}
else
{
memcpy (&bspr[i], data, sizeof(spritetype));
}
data += sizeof(spritetype);
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
if (bspr[i].extra > 0) // copy Xsprite
{
assert(sizeof Xsprite == 56);
memcpy(&xspr[i], data, sizeof(Xsprite));
data += sizeof(Xsprite);
}
else
{
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
memset(&xspr[i], 0, sizeof(Xsprite));
}
}
// Now convert to Doom format, since we've extracted all the standard
// BUILD info from the map we need. (Sprites are ignored.)
LoadSectors (bsec);
LoadWalls (bwal, numWalls, bsec);
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
*mapthings = new FMapThing[numsprites + 1];
CreateStartSpot ((fixed_t *)infoBlock, *mapthings);
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
*numspr = 1 + LoadSprites (bspr, xspr, numsprites, bsec, *mapthings + 1);
delete[] bsec;
delete[] bwal;
delete[] bspr;
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
delete[] xspr;
return true;
}
//==========================================================================
//
// LoadSectors
//
//==========================================================================
static void LoadSectors (sectortype *bsec)
{
FDynamicColormap *map = GetSpecialLights (PalEntry (255,255,255), level.fadeto, 0);
sector_t *sec;
char tnam[9];
sec = sectors = new sector_t[numsectors];
memset (sectors, 0, sizeof(sector_t)*numsectors);
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
sectors[0].e = new extsector_t[numsectors];
for (int i = 0; i < numsectors; ++i, ++bsec, ++sec)
{
bsec->wallptr = WORD(bsec->wallptr);
bsec->wallnum = WORD(bsec->wallnum);
bsec->ceilingstat = WORD(bsec->ceilingstat);
bsec->floorstat = WORD(bsec->floorstat);
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
sec->e = &sectors[0].e[i];
sec->SetPlaneTexZ(sector_t::floor, -(LittleLong(bsec->floorz) << 8));
sec->floorplane.d = -sec->GetPlaneTexZ(sector_t::floor);
sec->floorplane.c = FRACUNIT;
sec->floorplane.ic = FRACUNIT;
Update to ZDoom r1083. Not fully tested yet! - Converted most sprintf (and all wsprintf) calls to either mysnprintf or FStrings, depending on the situation. - Changed the strings in the wbstartstruct to be FStrings. - Changed myvsnprintf() to output nothing if count is greater than INT_MAX. This is so that I can use a series of mysnprintf() calls and advance the pointer for each one. Once the pointer goes beyond the end of the buffer, the count will go negative, but since it's an unsigned type it will be seen as excessively huge instead. This should not be a problem, as there's no reason for ZDoom to be using text buffers larger than 2 GB anywhere. - Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig(). - Changed CalcMapName() to return an FString instead of a pointer to a static buffer. - Changed startmap in d_main.cpp into an FString. - Changed CheckWarpTransMap() to take an FString& as the first argument. - Changed d_mapname in g_level.cpp into an FString. - Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an FString. - Fixed: The MAPINFO parser wrote into the string buffer to construct a map name when given a Hexen map number. This was fine with the old scanner code, but only a happy coincidence prevents it from crashing with the new code. - Added the 'B' conversion specifier to StringFormat::VWorker() for printing binary numbers. - Added CMake support for building with MinGW, MSYS, and NMake. Linux support is probably broken until I get around to booting into Linux again. Niceties provided over the existing Makefiles they're replacing: * All command-line builds can use the same build system, rather than having a separate one for MinGW and another for Linux. * Microsoft's NMake tool is supported as a target. * Progress meters. * Parallel makes work from a fresh checkout without needing to be primed first with a single-threaded make. * Porting to other architectures should be simplified, whenever that day comes. - Replaced the makewad tool with zipdir. This handles the dependency tracking itself instead of generating an external makefile to do it, since I couldn't figure out how to generate a makefile with an external tool and include it with a CMake-generated makefile. Where makewad used a master list of files to generate the package file, zipdir just zips the entire contents of one or more directories. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@138 b0f79afe-0144-0410-b225-9a4edf0717df
2008-07-23 18:35:55 +00:00
mysnprintf (tnam, countof(tnam), "BTIL%04d", LittleShort(bsec->floorpicnum));
sec->SetTexture(sector_t::floor, TexMan.GetTexture (tnam, FTexture::TEX_Build));
Update to ZDoom r1033: - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t. - Grouped the sector plane texture transformation values into a separate structure and replaced all access to them with wrapper functions. - Add environment 255, 255 as a way to get the software underwater effect in any zone you want. - Using a too-recent version of FMOD now gives an error, since there may be breaking changes to the API from one version to the next (excluding revisions in stable branches, which only represent bug fixes). - Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone unnoticed before: The delayhi and delaylo parameters for Channel::setDelay() and getDelay() were swapped. - Fixed: P_ChangeSector could incorrectly block movement when checking for mid textures linked to a moving floor. - Fixed AActor's bouncefactor definitions which I accidentally changed when adding wallbouncefactor. - Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead of subtracting it. - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. - Added scaling to double size for idmypos display. - Changed: Players don't telefrag when they are spawned now but after all actors have been spawned to avoid accidental voodoo doll telefragging. - Fixed: ACS scripts for non-existent maps were started on the current one. - Added a 'wallbouncefactor' property to AActor. - Reverted forceunderwater change from r1026 and fixed the problem for real: SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec. So the initial check of the current sector in AActor::UpdateWaterLevel must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK. - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's armortype. It does not touch the armor given by the megasphere. - Changed forcewater handling so that only control sectors created by one- sided lines become swimmable, since there's a good chance that a two-sided line is creating the control sector out of a normal, accessible portion of the map. (See e.g. linedef 29242 of zdoomcmp1.) - Added self-modifying code notifications for Valgrind. Build with make VALGRIND=1 to turn them on. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@121 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-14 15:37:17 +00:00
sec->SetXScale(sector_t::floor, (bsec->floorstat & 8) ? FRACUNIT*2 : FRACUNIT);
sec->SetYScale(sector_t::floor, (bsec->floorstat & 8) ? FRACUNIT*2 : FRACUNIT);
sec->SetXOffset(sector_t::floor, (bsec->floorxpanning << FRACBITS) + (32 << FRACBITS));
sec->SetYOffset(sector_t::floor, bsec->floorypanning << FRACBITS);
sec->SetPlaneLight(sector_t::floor, SHADE2LIGHT (bsec->floorshade));
sec->ChangeFlags(sector_t::floor, 0, PLANEF_ABSLIGHTING);
sec->SetPlaneTexZ(sector_t::ceiling, -(LittleLong(bsec->ceilingz) << 8));
sec->ceilingplane.d = sec->GetPlaneTexZ(sector_t::ceiling);
sec->ceilingplane.c = -FRACUNIT;
sec->ceilingplane.ic = -FRACUNIT;
Update to ZDoom r1083. Not fully tested yet! - Converted most sprintf (and all wsprintf) calls to either mysnprintf or FStrings, depending on the situation. - Changed the strings in the wbstartstruct to be FStrings. - Changed myvsnprintf() to output nothing if count is greater than INT_MAX. This is so that I can use a series of mysnprintf() calls and advance the pointer for each one. Once the pointer goes beyond the end of the buffer, the count will go negative, but since it's an unsigned type it will be seen as excessively huge instead. This should not be a problem, as there's no reason for ZDoom to be using text buffers larger than 2 GB anywhere. - Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig(). - Changed CalcMapName() to return an FString instead of a pointer to a static buffer. - Changed startmap in d_main.cpp into an FString. - Changed CheckWarpTransMap() to take an FString& as the first argument. - Changed d_mapname in g_level.cpp into an FString. - Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an FString. - Fixed: The MAPINFO parser wrote into the string buffer to construct a map name when given a Hexen map number. This was fine with the old scanner code, but only a happy coincidence prevents it from crashing with the new code. - Added the 'B' conversion specifier to StringFormat::VWorker() for printing binary numbers. - Added CMake support for building with MinGW, MSYS, and NMake. Linux support is probably broken until I get around to booting into Linux again. Niceties provided over the existing Makefiles they're replacing: * All command-line builds can use the same build system, rather than having a separate one for MinGW and another for Linux. * Microsoft's NMake tool is supported as a target. * Progress meters. * Parallel makes work from a fresh checkout without needing to be primed first with a single-threaded make. * Porting to other architectures should be simplified, whenever that day comes. - Replaced the makewad tool with zipdir. This handles the dependency tracking itself instead of generating an external makefile to do it, since I couldn't figure out how to generate a makefile with an external tool and include it with a CMake-generated makefile. Where makewad used a master list of files to generate the package file, zipdir just zips the entire contents of one or more directories. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@138 b0f79afe-0144-0410-b225-9a4edf0717df
2008-07-23 18:35:55 +00:00
mysnprintf (tnam, countof(tnam), "BTIL%04d", LittleShort(bsec->ceilingpicnum));
sec->SetTexture(sector_t::ceiling, TexMan.GetTexture (tnam, FTexture::TEX_Build));
if (bsec->ceilingstat & 1)
{
sky1texture = sky2texture = sec->GetTexture(sector_t::ceiling);
sec->SetTexture(sector_t::ceiling, skyflatnum);
}
Update to ZDoom r1033: - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t. - Grouped the sector plane texture transformation values into a separate structure and replaced all access to them with wrapper functions. - Add environment 255, 255 as a way to get the software underwater effect in any zone you want. - Using a too-recent version of FMOD now gives an error, since there may be breaking changes to the API from one version to the next (excluding revisions in stable branches, which only represent bug fixes). - Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone unnoticed before: The delayhi and delaylo parameters for Channel::setDelay() and getDelay() were swapped. - Fixed: P_ChangeSector could incorrectly block movement when checking for mid textures linked to a moving floor. - Fixed AActor's bouncefactor definitions which I accidentally changed when adding wallbouncefactor. - Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead of subtracting it. - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. - Added scaling to double size for idmypos display. - Changed: Players don't telefrag when they are spawned now but after all actors have been spawned to avoid accidental voodoo doll telefragging. - Fixed: ACS scripts for non-existent maps were started on the current one. - Added a 'wallbouncefactor' property to AActor. - Reverted forceunderwater change from r1026 and fixed the problem for real: SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec. So the initial check of the current sector in AActor::UpdateWaterLevel must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK. - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's armortype. It does not touch the armor given by the megasphere. - Changed forcewater handling so that only control sectors created by one- sided lines become swimmable, since there's a good chance that a two-sided line is creating the control sector out of a normal, accessible portion of the map. (See e.g. linedef 29242 of zdoomcmp1.) - Added self-modifying code notifications for Valgrind. Build with make VALGRIND=1 to turn them on. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@121 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-14 15:37:17 +00:00
sec->SetXScale(sector_t::ceiling, (bsec->ceilingstat & 8) ? FRACUNIT*2 : FRACUNIT);
sec->SetYScale(sector_t::ceiling, (bsec->ceilingstat & 8) ? FRACUNIT*2 : FRACUNIT);
sec->SetXOffset(sector_t::ceiling, (bsec->ceilingxpanning << FRACBITS) + (32 << FRACBITS));
sec->SetYOffset(sector_t::ceiling, bsec->ceilingypanning << FRACBITS);
sec->SetPlaneLight(sector_t::ceiling, SHADE2LIGHT (bsec->ceilingshade));
sec->ChangeFlags(sector_t::ceiling, 0, PLANEF_ABSLIGHTING);
sec->lightlevel = (sec->GetPlaneLight(sector_t::floor) + sec->GetPlaneLight(sector_t::ceiling)) / 2;
sec->seqType = -1;
sec->nextsec = -1;
sec->prevsec = -1;
sec->gravity = 1.f;
sec->friction = ORIG_FRICTION;
sec->movefactor = ORIG_FRICTION_FACTOR;
sec->ColorMap = map;
sec->ZoneNumber = 0xFFFF;
if (bsec->floorstat & 4)
{
Update to ZDoom r1033: - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t. - Grouped the sector plane texture transformation values into a separate structure and replaced all access to them with wrapper functions. - Add environment 255, 255 as a way to get the software underwater effect in any zone you want. - Using a too-recent version of FMOD now gives an error, since there may be breaking changes to the API from one version to the next (excluding revisions in stable branches, which only represent bug fixes). - Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone unnoticed before: The delayhi and delaylo parameters for Channel::setDelay() and getDelay() were swapped. - Fixed: P_ChangeSector could incorrectly block movement when checking for mid textures linked to a moving floor. - Fixed AActor's bouncefactor definitions which I accidentally changed when adding wallbouncefactor. - Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead of subtracting it. - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. - Added scaling to double size for idmypos display. - Changed: Players don't telefrag when they are spawned now but after all actors have been spawned to avoid accidental voodoo doll telefragging. - Fixed: ACS scripts for non-existent maps were started on the current one. - Added a 'wallbouncefactor' property to AActor. - Reverted forceunderwater change from r1026 and fixed the problem for real: SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec. So the initial check of the current sector in AActor::UpdateWaterLevel must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK. - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's armortype. It does not touch the armor given by the megasphere. - Changed forcewater handling so that only control sectors created by one- sided lines become swimmable, since there's a good chance that a two-sided line is creating the control sector out of a normal, accessible portion of the map. (See e.g. linedef 29242 of zdoomcmp1.) - Added self-modifying code notifications for Valgrind. Build with make VALGRIND=1 to turn them on. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@121 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-14 15:37:17 +00:00
sec->SetAngle(sector_t::floor, ANGLE_90);
sec->SetXScale(sector_t::floor, -sec->GetXScale(sector_t::floor));
}
if (bsec->floorstat & 16)
{
Update to ZDoom r1033: - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t. - Grouped the sector plane texture transformation values into a separate structure and replaced all access to them with wrapper functions. - Add environment 255, 255 as a way to get the software underwater effect in any zone you want. - Using a too-recent version of FMOD now gives an error, since there may be breaking changes to the API from one version to the next (excluding revisions in stable branches, which only represent bug fixes). - Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone unnoticed before: The delayhi and delaylo parameters for Channel::setDelay() and getDelay() were swapped. - Fixed: P_ChangeSector could incorrectly block movement when checking for mid textures linked to a moving floor. - Fixed AActor's bouncefactor definitions which I accidentally changed when adding wallbouncefactor. - Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead of subtracting it. - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. - Added scaling to double size for idmypos display. - Changed: Players don't telefrag when they are spawned now but after all actors have been spawned to avoid accidental voodoo doll telefragging. - Fixed: ACS scripts for non-existent maps were started on the current one. - Added a 'wallbouncefactor' property to AActor. - Reverted forceunderwater change from r1026 and fixed the problem for real: SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec. So the initial check of the current sector in AActor::UpdateWaterLevel must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK. - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's armortype. It does not touch the armor given by the megasphere. - Changed forcewater handling so that only control sectors created by one- sided lines become swimmable, since there's a good chance that a two-sided line is creating the control sector out of a normal, accessible portion of the map. (See e.g. linedef 29242 of zdoomcmp1.) - Added self-modifying code notifications for Valgrind. Build with make VALGRIND=1 to turn them on. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@121 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-14 15:37:17 +00:00
sec->SetXScale(sector_t::floor, -sec->GetXScale(sector_t::floor));
}
if (bsec->floorstat & 32)
{
Update to ZDoom r1033: - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t. - Grouped the sector plane texture transformation values into a separate structure and replaced all access to them with wrapper functions. - Add environment 255, 255 as a way to get the software underwater effect in any zone you want. - Using a too-recent version of FMOD now gives an error, since there may be breaking changes to the API from one version to the next (excluding revisions in stable branches, which only represent bug fixes). - Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone unnoticed before: The delayhi and delaylo parameters for Channel::setDelay() and getDelay() were swapped. - Fixed: P_ChangeSector could incorrectly block movement when checking for mid textures linked to a moving floor. - Fixed AActor's bouncefactor definitions which I accidentally changed when adding wallbouncefactor. - Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead of subtracting it. - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. - Added scaling to double size for idmypos display. - Changed: Players don't telefrag when they are spawned now but after all actors have been spawned to avoid accidental voodoo doll telefragging. - Fixed: ACS scripts for non-existent maps were started on the current one. - Added a 'wallbouncefactor' property to AActor. - Reverted forceunderwater change from r1026 and fixed the problem for real: SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec. So the initial check of the current sector in AActor::UpdateWaterLevel must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK. - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's armortype. It does not touch the armor given by the megasphere. - Changed forcewater handling so that only control sectors created by one- sided lines become swimmable, since there's a good chance that a two-sided line is creating the control sector out of a normal, accessible portion of the map. (See e.g. linedef 29242 of zdoomcmp1.) - Added self-modifying code notifications for Valgrind. Build with make VALGRIND=1 to turn them on. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@121 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-14 15:37:17 +00:00
sec->SetYScale(sector_t::floor, -sec->GetYScale(sector_t::floor));
}
if (bsec->ceilingstat & 4)
{
Update to ZDoom r1033: - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t. - Grouped the sector plane texture transformation values into a separate structure and replaced all access to them with wrapper functions. - Add environment 255, 255 as a way to get the software underwater effect in any zone you want. - Using a too-recent version of FMOD now gives an error, since there may be breaking changes to the API from one version to the next (excluding revisions in stable branches, which only represent bug fixes). - Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone unnoticed before: The delayhi and delaylo parameters for Channel::setDelay() and getDelay() were swapped. - Fixed: P_ChangeSector could incorrectly block movement when checking for mid textures linked to a moving floor. - Fixed AActor's bouncefactor definitions which I accidentally changed when adding wallbouncefactor. - Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead of subtracting it. - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. - Added scaling to double size for idmypos display. - Changed: Players don't telefrag when they are spawned now but after all actors have been spawned to avoid accidental voodoo doll telefragging. - Fixed: ACS scripts for non-existent maps were started on the current one. - Added a 'wallbouncefactor' property to AActor. - Reverted forceunderwater change from r1026 and fixed the problem for real: SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec. So the initial check of the current sector in AActor::UpdateWaterLevel must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK. - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's armortype. It does not touch the armor given by the megasphere. - Changed forcewater handling so that only control sectors created by one- sided lines become swimmable, since there's a good chance that a two-sided line is creating the control sector out of a normal, accessible portion of the map. (See e.g. linedef 29242 of zdoomcmp1.) - Added self-modifying code notifications for Valgrind. Build with make VALGRIND=1 to turn them on. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@121 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-14 15:37:17 +00:00
sec->SetAngle(sector_t::ceiling, ANGLE_90);
sec->SetYScale(sector_t::ceiling, -sec->GetYScale(sector_t::ceiling));
}
if (bsec->ceilingstat & 16)
{
Update to ZDoom r1033: - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t. - Grouped the sector plane texture transformation values into a separate structure and replaced all access to them with wrapper functions. - Add environment 255, 255 as a way to get the software underwater effect in any zone you want. - Using a too-recent version of FMOD now gives an error, since there may be breaking changes to the API from one version to the next (excluding revisions in stable branches, which only represent bug fixes). - Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone unnoticed before: The delayhi and delaylo parameters for Channel::setDelay() and getDelay() were swapped. - Fixed: P_ChangeSector could incorrectly block movement when checking for mid textures linked to a moving floor. - Fixed AActor's bouncefactor definitions which I accidentally changed when adding wallbouncefactor. - Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead of subtracting it. - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. - Added scaling to double size for idmypos display. - Changed: Players don't telefrag when they are spawned now but after all actors have been spawned to avoid accidental voodoo doll telefragging. - Fixed: ACS scripts for non-existent maps were started on the current one. - Added a 'wallbouncefactor' property to AActor. - Reverted forceunderwater change from r1026 and fixed the problem for real: SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec. So the initial check of the current sector in AActor::UpdateWaterLevel must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK. - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's armortype. It does not touch the armor given by the megasphere. - Changed forcewater handling so that only control sectors created by one- sided lines become swimmable, since there's a good chance that a two-sided line is creating the control sector out of a normal, accessible portion of the map. (See e.g. linedef 29242 of zdoomcmp1.) - Added self-modifying code notifications for Valgrind. Build with make VALGRIND=1 to turn them on. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@121 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-14 15:37:17 +00:00
sec->SetXScale(sector_t::ceiling, -sec->GetXScale(sector_t::ceiling));
}
if (bsec->ceilingstat & 32)
{
Update to ZDoom r1033: - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t. - Grouped the sector plane texture transformation values into a separate structure and replaced all access to them with wrapper functions. - Add environment 255, 255 as a way to get the software underwater effect in any zone you want. - Using a too-recent version of FMOD now gives an error, since there may be breaking changes to the API from one version to the next (excluding revisions in stable branches, which only represent bug fixes). - Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone unnoticed before: The delayhi and delaylo parameters for Channel::setDelay() and getDelay() were swapped. - Fixed: P_ChangeSector could incorrectly block movement when checking for mid textures linked to a moving floor. - Fixed AActor's bouncefactor definitions which I accidentally changed when adding wallbouncefactor. - Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead of subtracting it. - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. - Added scaling to double size for idmypos display. - Changed: Players don't telefrag when they are spawned now but after all actors have been spawned to avoid accidental voodoo doll telefragging. - Fixed: ACS scripts for non-existent maps were started on the current one. - Added a 'wallbouncefactor' property to AActor. - Reverted forceunderwater change from r1026 and fixed the problem for real: SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec. So the initial check of the current sector in AActor::UpdateWaterLevel must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK. - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's armortype. It does not touch the armor given by the megasphere. - Changed forcewater handling so that only control sectors created by one- sided lines become swimmable, since there's a good chance that a two-sided line is creating the control sector out of a normal, accessible portion of the map. (See e.g. linedef 29242 of zdoomcmp1.) - Added self-modifying code notifications for Valgrind. Build with make VALGRIND=1 to turn them on. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@121 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-14 15:37:17 +00:00
sec->SetYScale(sector_t::ceiling, -sec->GetYScale(sector_t::ceiling));
}
}
}
//==========================================================================
//
// LoadWalls
//
//==========================================================================
static void LoadWalls (walltype *walls, int numwalls, sectortype *bsec)
{
int i, j;
// Setting numvertexes to the same as numwalls is overly conservative,
// but the extra vertices will be removed during the BSP building pass.
numsides = numvertexes = numwalls;
numlines = 0;
sides = new side_t[numsides];
memset (sides, 0, numsides*sizeof(side_t));
vertexes = new vertex_t[numvertexes];
numvertexes = 0;
// First mark each sidedef with the sector it belongs to
for (i = 0; i < numsectors; ++i)
{
if (bsec[i].wallptr >= 0)
{
for (j = 0; j < bsec[i].wallnum; ++j)
{
sides[j + bsec[i].wallptr].sector = sectors + i;
}
}
}
// Now copy wall properties to their matching sidedefs
for (i = 0; i < numwalls; ++i)
{
char tnam[9];
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 overpic, pic;
Update to ZDoom r1083. Not fully tested yet! - Converted most sprintf (and all wsprintf) calls to either mysnprintf or FStrings, depending on the situation. - Changed the strings in the wbstartstruct to be FStrings. - Changed myvsnprintf() to output nothing if count is greater than INT_MAX. This is so that I can use a series of mysnprintf() calls and advance the pointer for each one. Once the pointer goes beyond the end of the buffer, the count will go negative, but since it's an unsigned type it will be seen as excessively huge instead. This should not be a problem, as there's no reason for ZDoom to be using text buffers larger than 2 GB anywhere. - Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig(). - Changed CalcMapName() to return an FString instead of a pointer to a static buffer. - Changed startmap in d_main.cpp into an FString. - Changed CheckWarpTransMap() to take an FString& as the first argument. - Changed d_mapname in g_level.cpp into an FString. - Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an FString. - Fixed: The MAPINFO parser wrote into the string buffer to construct a map name when given a Hexen map number. This was fine with the old scanner code, but only a happy coincidence prevents it from crashing with the new code. - Added the 'B' conversion specifier to StringFormat::VWorker() for printing binary numbers. - Added CMake support for building with MinGW, MSYS, and NMake. Linux support is probably broken until I get around to booting into Linux again. Niceties provided over the existing Makefiles they're replacing: * All command-line builds can use the same build system, rather than having a separate one for MinGW and another for Linux. * Microsoft's NMake tool is supported as a target. * Progress meters. * Parallel makes work from a fresh checkout without needing to be primed first with a single-threaded make. * Porting to other architectures should be simplified, whenever that day comes. - Replaced the makewad tool with zipdir. This handles the dependency tracking itself instead of generating an external makefile to do it, since I couldn't figure out how to generate a makefile with an external tool and include it with a CMake-generated makefile. Where makewad used a master list of files to generate the package file, zipdir just zips the entire contents of one or more directories. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@138 b0f79afe-0144-0410-b225-9a4edf0717df
2008-07-23 18:35:55 +00:00
mysnprintf (tnam, countof(tnam), "BTIL%04d", LittleShort(walls[i].picnum));
pic = TexMan.GetTexture (tnam, FTexture::TEX_Build);
Update to ZDoom r1083. Not fully tested yet! - Converted most sprintf (and all wsprintf) calls to either mysnprintf or FStrings, depending on the situation. - Changed the strings in the wbstartstruct to be FStrings. - Changed myvsnprintf() to output nothing if count is greater than INT_MAX. This is so that I can use a series of mysnprintf() calls and advance the pointer for each one. Once the pointer goes beyond the end of the buffer, the count will go negative, but since it's an unsigned type it will be seen as excessively huge instead. This should not be a problem, as there's no reason for ZDoom to be using text buffers larger than 2 GB anywhere. - Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig(). - Changed CalcMapName() to return an FString instead of a pointer to a static buffer. - Changed startmap in d_main.cpp into an FString. - Changed CheckWarpTransMap() to take an FString& as the first argument. - Changed d_mapname in g_level.cpp into an FString. - Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an FString. - Fixed: The MAPINFO parser wrote into the string buffer to construct a map name when given a Hexen map number. This was fine with the old scanner code, but only a happy coincidence prevents it from crashing with the new code. - Added the 'B' conversion specifier to StringFormat::VWorker() for printing binary numbers. - Added CMake support for building with MinGW, MSYS, and NMake. Linux support is probably broken until I get around to booting into Linux again. Niceties provided over the existing Makefiles they're replacing: * All command-line builds can use the same build system, rather than having a separate one for MinGW and another for Linux. * Microsoft's NMake tool is supported as a target. * Progress meters. * Parallel makes work from a fresh checkout without needing to be primed first with a single-threaded make. * Porting to other architectures should be simplified, whenever that day comes. - Replaced the makewad tool with zipdir. This handles the dependency tracking itself instead of generating an external makefile to do it, since I couldn't figure out how to generate a makefile with an external tool and include it with a CMake-generated makefile. Where makewad used a master list of files to generate the package file, zipdir just zips the entire contents of one or more directories. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@138 b0f79afe-0144-0410-b225-9a4edf0717df
2008-07-23 18:35:55 +00:00
mysnprintf (tnam, countof(tnam), "BTIL%04d", LittleShort(walls[i].overpicnum));
overpic = TexMan.GetTexture (tnam, FTexture::TEX_Build);
walls[i].x = LittleLong(walls[i].x);
walls[i].y = LittleLong(walls[i].y);
walls[i].point2 = LittleShort(walls[i].point2);
walls[i].cstat = LittleShort(walls[i].cstat);
walls[i].nextwall = LittleShort(walls[i].nextwall);
walls[i].nextsector = LittleShort(walls[i].nextsector);
- 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
sides[i].SetTextureXOffset(walls[i].xpanning << FRACBITS);
sides[i].SetTextureYOffset(walls[i].ypanning << FRACBITS);
- 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
sides[i].SetTexture(side_t::top, pic);
sides[i].SetTexture(side_t::bottom, pic);
if (walls[i].nextsector < 0 || (walls[i].cstat & 32))
{
- 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
sides[i].SetTexture(side_t::mid, pic);
}
else if (walls[i].cstat & 16)
{
- 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
sides[i].SetTexture(side_t::mid, overpic);
}
else
{
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
sides[i].SetTexture(side_t::mid, FNullTextureID());
}
sides[i].TexelLength = walls[i].xrepeat * 8;
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
sides[i].SetTextureYScale(walls[i].yrepeat << (FRACBITS - 3));
sides[i].SetTextureXScale(FRACUNIT);
Update to ZDoom r1033: - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t. - Grouped the sector plane texture transformation values into a separate structure and replaced all access to them with wrapper functions. - Add environment 255, 255 as a way to get the software underwater effect in any zone you want. - Using a too-recent version of FMOD now gives an error, since there may be breaking changes to the API from one version to the next (excluding revisions in stable branches, which only represent bug fixes). - Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone unnoticed before: The delayhi and delaylo parameters for Channel::setDelay() and getDelay() were swapped. - Fixed: P_ChangeSector could incorrectly block movement when checking for mid textures linked to a moving floor. - Fixed AActor's bouncefactor definitions which I accidentally changed when adding wallbouncefactor. - Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead of subtracting it. - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array. - Fixed: ACS's ChangeSky command didn't clean up the stack. - Fixed: Wall scrolling interpolations incremented their reference count twice. - Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. - Added scaling to double size for idmypos display. - Changed: Players don't telefrag when they are spawned now but after all actors have been spawned to avoid accidental voodoo doll telefragging. - Fixed: ACS scripts for non-existent maps were started on the current one. - Added a 'wallbouncefactor' property to AActor. - Reverted forceunderwater change from r1026 and fixed the problem for real: SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec. So the initial check of the current sector in AActor::UpdateWaterLevel must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK. - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's armortype. It does not touch the armor given by the megasphere. - Changed forcewater handling so that only control sectors created by one- sided lines become swimmable, since there's a good chance that a two-sided line is creating the control sector out of a normal, accessible portion of the map. (See e.g. linedef 29242 of zdoomcmp1.) - Added self-modifying code notifications for Valgrind. Build with make VALGRIND=1 to turn them on. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@121 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-14 15:37:17 +00:00
sides[i].SetLight(SHADE2LIGHT(walls[i].shade));
sides[i].Flags = WALLF_ABSLIGHTING;
sides[i].RightSide = walls[i].point2;
sides[walls[i].point2].LeftSide = i;
if (walls[i].nextwall >= 0 && walls[i].nextwall <= i)
{
sides[i].linedef = sides[walls[i].nextwall].linedef;
}
else
{
sides[i].linedef = (line_t*)(intptr_t)(numlines++);
}
}
// Set line properties that Doom doesn't store per-sidedef
lines = new line_t[numlines];
memset (lines, 0, numlines*sizeof(line_t));
for (i = 0, j = -1; i < numwalls; ++i)
{
if (walls[i].nextwall >= 0 && walls[i].nextwall <= i)
{
continue;
}
j = int(intptr_t(sides[i].linedef));
lines[j].sidedef[0] = (side_t*)(intptr_t)i;
lines[j].sidedef[1] = (side_t*)(intptr_t)walls[i].nextwall;
lines[j].v1 = FindVertex (walls[i].x, walls[i].y);
lines[j].v2 = FindVertex (walls[walls[i].point2].x, walls[walls[i].point2].y);
lines[j].frontsector = sides[i].sector;
lines[j].flags |= ML_WRAP_MIDTEX;
if (walls[i].nextsector >= 0)
{
lines[j].backsector = sectors + walls[i].nextsector;
lines[j].flags |= ML_TWOSIDED;
}
else
{
lines[j].backsector = NULL;
}
P_AdjustLine (&lines[j]);
if (walls[i].cstat & 128)
{
if (walls[i].cstat & 512)
{
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
lines[j].Alpha = FRACUNIT/3;
}
else
{
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
lines[j].Alpha = FRACUNIT*2/3;
}
}
if (walls[i].cstat & 1)
{
lines[j].flags |= ML_BLOCKING;
}
if (walls[i].nextwall < 0)
{
if (walls[i].cstat & 4)
{
lines[j].flags |= ML_DONTPEGBOTTOM;
}
}
else
{
if (walls[i].cstat & 4)
{
lines[j].flags |= ML_DONTPEGTOP;
}
else
{
lines[j].flags |= ML_DONTPEGBOTTOM;
}
}
if (walls[i].cstat & 64)
{
lines[j].flags |= ML_BLOCKEVERYTHING;
}
}
// Finish setting sector properties that depend on walls
for (i = 0; i < numsectors; ++i, ++bsec)
{
SlopeWork slope;
slope.wal = &walls[bsec->wallptr];
slope.wal2 = &walls[slope.wal->point2];
slope.dx = slope.wal2->x - slope.wal->x;
slope.dy = slope.wal2->y - slope.wal->y;
slope.i = long (sqrt ((double)(slope.dx*slope.dx+slope.dy*slope.dy))) << 5;
if (slope.i == 0)
{
continue;
}
if ((bsec->floorstat & 2) && (bsec->floorheinum != 0))
{ // floor is sloped
slope.heinum = -LittleShort(bsec->floorheinum);
slope.z[0] = slope.z[1] = slope.z[2] = -bsec->floorz;
CalcPlane (slope, sectors[i].floorplane);
}
if ((bsec->ceilingstat & 2) && (bsec->ceilingheinum != 0))
{ // ceiling is sloped
slope.heinum = -LittleShort(bsec->ceilingheinum);
slope.z[0] = slope.z[1] = slope.z[2] = -bsec->ceilingz;
CalcPlane (slope, sectors[i].ceilingplane);
}
int linenum = int(intptr_t(sides[bsec->wallptr].linedef));
int sidenum = int(intptr_t(lines[linenum].sidedef[1]));
if (bsec->floorstat & 64)
{ // floor is aligned to first wall
R_AlignFlat (linenum, sidenum == bsec->wallptr, 0);
}
if (bsec->ceilingstat & 64)
{ // ceiling is aligned to first wall
R_AlignFlat (linenum, sidenum == bsec->wallptr, 0);
}
}
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
for (i = 0; i < numlines; i++)
{
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
intptr_t front = intptr_t(lines[i].sidedef[0]);
intptr_t back = intptr_t(lines[i].sidedef[1]);
lines[i].sidedef[0] = front >= 0 ? &sides[front] : NULL;
lines[i].sidedef[1] = back >= 0 ? &sides[back] : NULL;
}
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
for (i = 0; i < numsides; i++)
{
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
assert(sides[i].sector != NULL);
sides[i].linedef = &lines[intptr_t(sides[i].linedef)];
}
}
//==========================================================================
//
// LoadSprites
//
//==========================================================================
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites,
sectortype *bsectors, FMapThing *mapthings)
{
int count = 0;
for (int i = 0; i < numsprites; ++i)
{
mapthings[count].thingid = 0;
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
mapthings[count].x = (sprites[i].x << 12);
mapthings[count].y = -(sprites[i].y << 12);
mapthings[count].z = (bsectors[sprites[i].sectnum].floorz - sprites[i].z) << 8;
mapthings[count].angle = (((2048-sprites[i].ang) & 2047) * 360) >> 11;
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
mapthings[count].ClassFilter = 0xffff;
mapthings[count].SkillFilter = 0xffff;
mapthings[count].flags = MTF_SINGLE|MTF_COOPERATIVE|MTF_DEATHMATCH;
mapthings[count].special = 0;
- removed gl_nogl option because it was completely broken. Update to ZDoom r2226: - fixed: True color texture generation for DDS was broken. - After experimenting with Blood, I think ROLLOFF_Linear is a better choice for ambient sounds than ROLLOFF_Doom. - Added support for Blood's ambient sounds, because I thought it would be an easy way to test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the Build/Blood stuff first, it would have been.) - Changed the ambient sounds list into a map so that it can handle more than 256 entries. - Added support for Blood's SFX loop start markers. - Fixed: Blood sound effect namespacing was broken. - Fixed: The Build loader did not set the wall texture scaling properly, either. - Fixed: The BUILD map loader did not create extsector information, and it also did not set valid sidedef references for the backs of one-sided lines. - Fixed: RFF files constructed incorrect full names for the files they contained. - Fixed: Checking for BUILD maps only worked if they came from unencrypted and uncompressed sources. - Fixed endianness assumption when loading external map files. - Add more parameters to the ambient sound things: * Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever it was defined with in SNDINFO.) Other values scale it accordingly. * Third argument: Minimum distance before volume fading starts. * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0 will use whatever they were defined with in SNDINFO. - Fix some GCC warnings. - Meh. Linux does not have itoa. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@750 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-18 10:19:00 +00:00
if (xsprites != NULL && sprites[i].lotag == 710)
{ // Blood ambient sound
mapthings[count].args[0] = xsprites[i].Data3;
// I am totally guessing abount the volume level. 50 seems to be a pretty
// typical value for Blood's standard maps, so I assume it's 100-based.
mapthings[count].args[1] = xsprites[i].Data4 * 128 / 100;
mapthings[count].args[2] = xsprites[i].Data1;
mapthings[count].args[3] = xsprites[i].Data2;
mapthings[count].type = 14065;
}
else
{
if (sprites[i].cstat & (16|32|32768)) continue;
if (sprites[i].xrepeat == 0 || sprites[i].yrepeat == 0) continue;
mapthings[count].type = 9988;
mapthings[count].args[0] = sprites[i].picnum & 255;
mapthings[count].args[1] = sprites[i].picnum >> 8;
mapthings[count].args[2] = sprites[i].xrepeat;
mapthings[count].args[3] = sprites[i].yrepeat;
mapthings[count].args[4] = (sprites[i].cstat & 14) | ((sprites[i].cstat >> 9) & 1);
}
count++;
}
return count;
}
//==========================================================================
//
// FindVertex
//
//==========================================================================
vertex_t *FindVertex (fixed_t x, fixed_t y)
{
int i;
x <<= 12;
y = -(y << 12);
for (i = 0; i < numvertexes; ++i)
{
if (vertexes[i].x == x && vertexes[i].y == y)
{
return &vertexes[i];
}
}
vertexes[i].x = x;
vertexes[i].y = y;
numvertexes++;
return &vertexes[i];
}
//==========================================================================
//
// CreateStartSpot
//
//==========================================================================
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
static void CreateStartSpot (fixed_t *pos, FMapThing *start)
{
short angle = LittleShort(*(WORD *)(&pos[3]));
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
FMapThing mt =
{
- Fixed: The hitscan tracer had the current sector point to a temporary variable when 3D floors were involved. Update to ZDoom r965: - Fixed: SPAC_AnyCross didn't work. - Fixed: Pushable doors must also check for SPAC_MPush. - Fixed: P_LoadThings2 did not adjust the byte order for the thingid field. - Changed: HIRESTEX 'define' textures now replace existing textures of type MiscPatch with the same name. - Added UDMF line trigger types MonsterUse and MonsterPush. - Separated skill and class filter bits from FMapThing::flags so that UDMF can define up to 16 of each. Also separated easy/baby and hard/nightmare and changed default MAPINFO definitions. - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any marker lumps it inserted. - Fixed: Need write barriers when modifying SequenceListHead. - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer to TiMidity++ than original TiMidity. - Renamed timidity_config and timidity_voices to midi_config and midi_voices respectively. - Changed: Crosshair drawing uses the current player class's default health instead of 100 to calculate the color for the crosshair. - Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated all user settable flags from MoreFlags into their own Flags variable. - Reduced volume, expression, and panning controllers back to 7 bits. - Added very basic Soundfont support to the internal TiMidity. Things missing: filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or may not be compatible with TiMidity++'s soundfont extensions. - Changed all thing coordinates that were stored as shorts into fixed_t. - Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so that it is easier to add new features in the UDMF map format. - Added some initial code to read UDMF maps. - Added support for quoted strings to the TiMidity config parser. - Split off the slope creation code from p_Setup.cpp into its own file. - Separated the linedef activation types into a bit mask that allows combination of all types on the same linedef. Also added a 'first side only' flag. This is not usable from Hexen or Doom format maps though but in preparation of the UDMF format discussed here: http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/ - Changed linedef's alpha property from a byte to fixed point after seeing that 255 wasn't handled to be fully opaque. - fixed a GCC warning in fmodsound.cpp - Fixed: Warped textures didn't work anymore because the default speed was 0. - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value in the instrument loader, effectively disabling vibrato. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
0, (LittleLong(pos[0])<<12), ((-LittleLong(pos[1]))<<12), 0,// tid, x, y, z
short(Scale ((2048-angle)&2047, 360, 2048)), 1, // angle, type
7|MTF_SINGLE|224, // flags
// special and args are 0
};
*start = mt;
}
//==========================================================================
//
// CalcPlane
//
//==========================================================================
static void CalcPlane (SlopeWork &slope, secplane_t &plane)
{
FVector3 pt[3];
long j;
slope.x[0] = slope.wal->x; slope.y[0] = slope.wal->y;
slope.x[1] = slope.wal2->x; slope.y[1] = slope.wal2->y;
if (slope.dx == 0)
{
slope.x[2] = slope.x[0] + 64;
slope.y[2] = slope.y[0];
}
else
{
slope.x[2] = slope.x[0];
slope.y[2] = slope.y[0] + 64;
}
j = DMulScale3 (slope.dx, slope.y[2]-slope.wal->y,
-slope.dy, slope.x[2]-slope.wal->x);
slope.z[2] += Scale (slope.heinum, j, slope.i);
pt[0] = FVector3(slope.dx, -slope.dy, 0);
pt[1] = FVector3(slope.x[2] - slope.x[0], slope.y[0] - slope.y[2], (slope.z[2] - slope.z[0]) / 16);
pt[2] = (pt[0] ^ pt[1]).Unit();
if ((pt[2][2] < 0 && plane.c > 0) || (pt[2][2] > 0 && plane.c < 0))
{
pt[2] = -pt[2];
}
plane.a = fixed_t(pt[2][0]*65536.f);
plane.b = fixed_t(pt[2][1]*65536.f);
plane.c = fixed_t(pt[2][2]*65536.f);
plane.ic = fixed_t(65536.f/pt[2][2]);
plane.d = -TMulScale8
(plane.a, slope.x[0]<<4, plane.b, (-slope.y[0])<<4, plane.c, slope.z[0]);
}
//==========================================================================
//
// Decrypt
//
// Note that this is different from the general RFF encryption.
//
//==========================================================================
static void Decrypt (void *to_, const void *from_, int len, int key)
{
BYTE *to = (BYTE *)to_;
const BYTE *from = (const BYTE *)from_;
for (int i = 0; i < len; ++i, ++key)
{
to[i] = from[i] ^ key;
}
}
//==========================================================================
//
// Just an actor to make the Build sprites show up. It doesn't do anything
// with them other than display them.
//
//==========================================================================
class ACustomSprite : public AActor
{
Update to ZDoom r1146 (warning: massive changes ahead!) - Removed DECORATE's ParseClass because it was only used to add data to fully internal actor classes which no longer exist. - Changed the state structure so that the Tics value doesn't need to be hacked into misc1 with SF_BIGTIC anymore. - Changed sprite processing so that sprite names are converted to indices during parsing so that an additional postprocessing step is no longer needed. - Fixed: Sprite names in DECORATE were case sensitive. - Exported AActor's defaults to DECORATE and removed all code for the internal property parser which is no longer needed. - Converted the Heresiarch to DECORATE. - Added an Active and Inactive state for monsters. - Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted GetRaiseSpeed and GetSinkSpeed. - Added some remaining DECORATE conversions for Hexen by Karate Chris. - Changed Windows to use the performance counter instead of rdtsc. - Changed Linux to use clock_gettime for profiling instead of rdtsc. This avoids potential erroneous results on multicore and variable speed processors. - Converted the last of Hexen's inventory items to DECORATE so that I could export AInventory. - Removed AT_GAME_SET because it's no longer used anywhere. - Converted the last remaining global classes to DECORATE. - Fixed: Inventory.PickupFlash requires an class name as parameter not an integer. Some Hexen definitions got it wrong. - Converted Hexen's Pig to DECORATE. - Replaced the ActorInfo definitions of all internal inventory classes with DECORATE definitions. - Added option to specify a powerup's duration in second by using a negative number. - Added Gez's Freedoom detection patch. - SBARINFO update: * Added: The ability to have drawkeybar auto detect spacing. * Added: Offset parameter to drawkeybar to allow two key bars with different keys. * Added: Multi-row/column keybar parameters. Spacing can also be auto. These defualt to left to right/top to bottom but can be switched. * Added: Drawshadow flag to drawnumber. This will draw a solid color and translucent number under the normal number. * Added: hexenarmor to drawimage. This takes a parameter for a hexen armor type and will fade the image like the hexen status bar. * Added: centerbottom offset to draw(switchable)image. * Added: translucent flag to drawinventorybar. * Fixed: Accidentally removed flag from DrawTexture that allowed negative coordinates to work with fullscreenoffsets. Hopefully this is the last major bug in the fullscreenoffsets system. - Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of registers AMD64 provides, this routine still needs to be written as self- modifying code for maximum performance. The additional registers do allow for further optimization over the x86 version by allowing all four pixels to be in flight at the same time. The end result is that AMD64 ASM is about 2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM. (For further comparison, AMD64 C and x86 C are practically the same for this function.) Should I port any more assembly to AMD64, mvlineasm4 is the most likely candidate, but it's not used enough at this point to bother. Also, this may or may not work with Linux at the moment, since it doesn't have the eh_handler metadata. Win64 is easier, since I just need to structure the function prologue and epilogue properly and use some assembler directives/macros to automatically generate the metadata. And that brings up another point: You need YASM to assemble the AMD64 code, because NASM doesn't support the Win64 metadata directives. - Replaced the ActorInfo definitions of several internal classes with DECORATE definitions - Converted teleport fog and destinations to DECORATE. - AActor::PreExplode is gone now that the last item that was using it has been converted. - Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE. - Exported Point pushers, CustomSprite and AmbientSound to DECORATE. - Changed increased lightning damage for Centaurs into a damage factor. - Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage types instead to keep dependencies on specific actor types out of the main engine code. - Added Korax DECORATE conversion by Gez and a few others by Karate Chris. - Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon pieces. - Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris. - Added aWeaponGiver class to generalize the standing AssaultGun. - converted a_Strifeweapons.cpp to DECORATE, except for the Sigil. - Added an SSE version of DoBlending. This is strictly C intrinsics. VC++ still throws around unneccessary register moves. GCC seems to be pretty close to optimal, requiring only about 2 cycles/color. They're both faster than my hand-written MMX routine, so I don't need to feel bad about not hand-optimizing this for x64 builds. - Removed an extra instruction from DoBlending_MMX, transposed two instructions, and unrolled it once, shaving off about 80 cycles from the time required to blend 256 palette entries. Why? Because I tried writing a C version of the routine using compiler intrinsics and was appalled by all the extra movq's VC++ added to the code. GCC was better, but still generated extra instructions. I only wanted a C version because I can't use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit of a pain. (It's a pain because Linux and Windows have different calling conventions, and you need to maintain extra metadata for functions.) So, the assembly version stays and the C version stays out. - Converted the rest of a_strifestuff.cpp to DECORATE. - Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange. I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that this feature can also be used by other actors. - Converted Strife's Stalker to DECORATE. - Converted ArtiTeleport to DECORATE. - Removed the NoBlockingSet method from AActor because everything using it has been converted to DECORATE using DropItem instead. - Changed: Macil doesn't need the StrifeHumanoid's special death states so he might as well inherit directly from AActor. - Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved the burning hand states to StrifePlayer where they really belong. - Added Gez's dropammofactor submission with some necessary changes. Also merged redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup. - Restricted native action function definitions to zdoom.pk3. - Fixed. The Firedemon was missing a game filter. - Added: disablegrin, disableouch, disablepain, and disablerampage flags to drawmugshot. - Fixed: LowerHealthCap did not work properly. - Fixed: Various bugs I noticed in the fullscreenoffsets code. - Removed all the pixel doubling r_detail modes, since the one platform they were intended to assist (486) actually sees very little benefit from them. - Rewrote CheckMMX in C and renamed it to CheckCPU. - Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache only for AMD processors, so we must not use it on other architectures, or we end up overwriting the L1 cache line size with 0 or some other number we don't actually understand. - The x87 precision control is now explicitly set for double precision, since GCC defaults to extended precision instead, unlike Visual C++. - Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE. - Fixed: Attacking a merchant in Strife didn't alert the enemies. - Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two occurences in the code that depended on it were changed accordingly. Invulnerability colormaps are now being set by the items exclusively. - Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER so that it can hopefully be generalized to be usable elsewhere later. - Added Gez's submission for converting the Minotaur to DECORATE. - Fixed a few minor DECORATE bugs. - Changed coordinate storage for EntityBoss so that it works properly even when the pod is not used to spawn it. - Converted Strife's Spectres and Entity to DECORATE. - Added: fullscreenoffsets flag for status bars. This changes the coordinate system to be relative to the top left corner of the screen. This is useful for full screen status bars. - Changed: drawinventorybar will use the width of artibox or invcurs (strife) to determine the spacing. Let me know if this breaks any released mods. - Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar would be shown. - Fixed: If a static inventory bar was used the user still had to press invuse in order to get rid of the "overlay". - Fixed: forcescaled would not work if the height of the bar was 0. - Added: keyslot to drawswitchableimage. - Fixed: The transition effects for the log and keys popups were switched. - Converted Strife's Crusader, Inquisitor and spectral missiles to DECORATE. - Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to DECORATE. - Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris. - Added a check to Zipdir that excludes files with a .orig extension. These can be left behind by patch.exe and create problems. - fixed: Unmorphing from chicken caused a crash when reading non-existent meta-data strings. - Converted the ScriptedMarines to DECORATE. - Fixed: DLightTransfer and DWallLightTransfer were declared as actors. - Converted the PhoenixRod and associated classes to DECORATE to make the Heretic conversion complete. - Converted the Minotaur's projectiles to DECORATE so that I can get rid of the AT_SPEED_SET code. - Converted Heretic's Blaster and SkullRod to DECORATE. - Converted the mace and all related actors to DECORATE and generalized the spawn function that only spawns one mace per level. - Moved Mace respawning code into AInventory so that it works properly for replacement actors. - Added more DECORATE conversions by Karate Chris. - Cleaned up the new bridge code and exported all related actors to DECORATE so that the exported code pointers can be used. - Separated Heretic's and Hexen's invulnerability items for stability reasons. - Fixed spurious warnings on 32-bit VC++ debug builds. - Made the subsong (order) number a proper parameter to MusInfo::Play() instead of requiring a separate SetPosition() call to do it. - Added Gez's submission for custom bridge things. - Fixed: ASpecialSpot must check the array's size before dividing by it. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@151 b0f79afe-0144-0410-b225-9a4edf0717df
2008-08-10 15:12:58 +00:00
DECLARE_CLASS (ACustomSprite, AActor);
public:
void BeginPlay ();
};
Update to ZDoom r1146 (warning: massive changes ahead!) - Removed DECORATE's ParseClass because it was only used to add data to fully internal actor classes which no longer exist. - Changed the state structure so that the Tics value doesn't need to be hacked into misc1 with SF_BIGTIC anymore. - Changed sprite processing so that sprite names are converted to indices during parsing so that an additional postprocessing step is no longer needed. - Fixed: Sprite names in DECORATE were case sensitive. - Exported AActor's defaults to DECORATE and removed all code for the internal property parser which is no longer needed. - Converted the Heresiarch to DECORATE. - Added an Active and Inactive state for monsters. - Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted GetRaiseSpeed and GetSinkSpeed. - Added some remaining DECORATE conversions for Hexen by Karate Chris. - Changed Windows to use the performance counter instead of rdtsc. - Changed Linux to use clock_gettime for profiling instead of rdtsc. This avoids potential erroneous results on multicore and variable speed processors. - Converted the last of Hexen's inventory items to DECORATE so that I could export AInventory. - Removed AT_GAME_SET because it's no longer used anywhere. - Converted the last remaining global classes to DECORATE. - Fixed: Inventory.PickupFlash requires an class name as parameter not an integer. Some Hexen definitions got it wrong. - Converted Hexen's Pig to DECORATE. - Replaced the ActorInfo definitions of all internal inventory classes with DECORATE definitions. - Added option to specify a powerup's duration in second by using a negative number. - Added Gez's Freedoom detection patch. - SBARINFO update: * Added: The ability to have drawkeybar auto detect spacing. * Added: Offset parameter to drawkeybar to allow two key bars with different keys. * Added: Multi-row/column keybar parameters. Spacing can also be auto. These defualt to left to right/top to bottom but can be switched. * Added: Drawshadow flag to drawnumber. This will draw a solid color and translucent number under the normal number. * Added: hexenarmor to drawimage. This takes a parameter for a hexen armor type and will fade the image like the hexen status bar. * Added: centerbottom offset to draw(switchable)image. * Added: translucent flag to drawinventorybar. * Fixed: Accidentally removed flag from DrawTexture that allowed negative coordinates to work with fullscreenoffsets. Hopefully this is the last major bug in the fullscreenoffsets system. - Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of registers AMD64 provides, this routine still needs to be written as self- modifying code for maximum performance. The additional registers do allow for further optimization over the x86 version by allowing all four pixels to be in flight at the same time. The end result is that AMD64 ASM is about 2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM. (For further comparison, AMD64 C and x86 C are practically the same for this function.) Should I port any more assembly to AMD64, mvlineasm4 is the most likely candidate, but it's not used enough at this point to bother. Also, this may or may not work with Linux at the moment, since it doesn't have the eh_handler metadata. Win64 is easier, since I just need to structure the function prologue and epilogue properly and use some assembler directives/macros to automatically generate the metadata. And that brings up another point: You need YASM to assemble the AMD64 code, because NASM doesn't support the Win64 metadata directives. - Replaced the ActorInfo definitions of several internal classes with DECORATE definitions - Converted teleport fog and destinations to DECORATE. - AActor::PreExplode is gone now that the last item that was using it has been converted. - Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE. - Exported Point pushers, CustomSprite and AmbientSound to DECORATE. - Changed increased lightning damage for Centaurs into a damage factor. - Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage types instead to keep dependencies on specific actor types out of the main engine code. - Added Korax DECORATE conversion by Gez and a few others by Karate Chris. - Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon pieces. - Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris. - Added aWeaponGiver class to generalize the standing AssaultGun. - converted a_Strifeweapons.cpp to DECORATE, except for the Sigil. - Added an SSE version of DoBlending. This is strictly C intrinsics. VC++ still throws around unneccessary register moves. GCC seems to be pretty close to optimal, requiring only about 2 cycles/color. They're both faster than my hand-written MMX routine, so I don't need to feel bad about not hand-optimizing this for x64 builds. - Removed an extra instruction from DoBlending_MMX, transposed two instructions, and unrolled it once, shaving off about 80 cycles from the time required to blend 256 palette entries. Why? Because I tried writing a C version of the routine using compiler intrinsics and was appalled by all the extra movq's VC++ added to the code. GCC was better, but still generated extra instructions. I only wanted a C version because I can't use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit of a pain. (It's a pain because Linux and Windows have different calling conventions, and you need to maintain extra metadata for functions.) So, the assembly version stays and the C version stays out. - Converted the rest of a_strifestuff.cpp to DECORATE. - Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange. I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that this feature can also be used by other actors. - Converted Strife's Stalker to DECORATE. - Converted ArtiTeleport to DECORATE. - Removed the NoBlockingSet method from AActor because everything using it has been converted to DECORATE using DropItem instead. - Changed: Macil doesn't need the StrifeHumanoid's special death states so he might as well inherit directly from AActor. - Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved the burning hand states to StrifePlayer where they really belong. - Added Gez's dropammofactor submission with some necessary changes. Also merged redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup. - Restricted native action function definitions to zdoom.pk3. - Fixed. The Firedemon was missing a game filter. - Added: disablegrin, disableouch, disablepain, and disablerampage flags to drawmugshot. - Fixed: LowerHealthCap did not work properly. - Fixed: Various bugs I noticed in the fullscreenoffsets code. - Removed all the pixel doubling r_detail modes, since the one platform they were intended to assist (486) actually sees very little benefit from them. - Rewrote CheckMMX in C and renamed it to CheckCPU. - Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache only for AMD processors, so we must not use it on other architectures, or we end up overwriting the L1 cache line size with 0 or some other number we don't actually understand. - The x87 precision control is now explicitly set for double precision, since GCC defaults to extended precision instead, unlike Visual C++. - Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE. - Fixed: Attacking a merchant in Strife didn't alert the enemies. - Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two occurences in the code that depended on it were changed accordingly. Invulnerability colormaps are now being set by the items exclusively. - Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER so that it can hopefully be generalized to be usable elsewhere later. - Added Gez's submission for converting the Minotaur to DECORATE. - Fixed a few minor DECORATE bugs. - Changed coordinate storage for EntityBoss so that it works properly even when the pod is not used to spawn it. - Converted Strife's Spectres and Entity to DECORATE. - Added: fullscreenoffsets flag for status bars. This changes the coordinate system to be relative to the top left corner of the screen. This is useful for full screen status bars. - Changed: drawinventorybar will use the width of artibox or invcurs (strife) to determine the spacing. Let me know if this breaks any released mods. - Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar would be shown. - Fixed: If a static inventory bar was used the user still had to press invuse in order to get rid of the "overlay". - Fixed: forcescaled would not work if the height of the bar was 0. - Added: keyslot to drawswitchableimage. - Fixed: The transition effects for the log and keys popups were switched. - Converted Strife's Crusader, Inquisitor and spectral missiles to DECORATE. - Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to DECORATE. - Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris. - Added a check to Zipdir that excludes files with a .orig extension. These can be left behind by patch.exe and create problems. - fixed: Unmorphing from chicken caused a crash when reading non-existent meta-data strings. - Converted the ScriptedMarines to DECORATE. - Fixed: DLightTransfer and DWallLightTransfer were declared as actors. - Converted the PhoenixRod and associated classes to DECORATE to make the Heretic conversion complete. - Converted the Minotaur's projectiles to DECORATE so that I can get rid of the AT_SPEED_SET code. - Converted Heretic's Blaster and SkullRod to DECORATE. - Converted the mace and all related actors to DECORATE and generalized the spawn function that only spawns one mace per level. - Moved Mace respawning code into AInventory so that it works properly for replacement actors. - Added more DECORATE conversions by Karate Chris. - Cleaned up the new bridge code and exported all related actors to DECORATE so that the exported code pointers can be used. - Separated Heretic's and Hexen's invulnerability items for stability reasons. - Fixed spurious warnings on 32-bit VC++ debug builds. - Made the subsong (order) number a proper parameter to MusInfo::Play() instead of requiring a separate SetPosition() call to do it. - Added Gez's submission for custom bridge things. - Fixed: ASpecialSpot must check the array's size before dividing by it. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@151 b0f79afe-0144-0410-b225-9a4edf0717df
2008-08-10 15:12:58 +00:00
IMPLEMENT_CLASS (ACustomSprite)
void ACustomSprite::BeginPlay ()
{
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
char name[9];
Super::BeginPlay ();
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
Update to ZDoom r1083. Not fully tested yet! - Converted most sprintf (and all wsprintf) calls to either mysnprintf or FStrings, depending on the situation. - Changed the strings in the wbstartstruct to be FStrings. - Changed myvsnprintf() to output nothing if count is greater than INT_MAX. This is so that I can use a series of mysnprintf() calls and advance the pointer for each one. Once the pointer goes beyond the end of the buffer, the count will go negative, but since it's an unsigned type it will be seen as excessively huge instead. This should not be a problem, as there's no reason for ZDoom to be using text buffers larger than 2 GB anywhere. - Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig(). - Changed CalcMapName() to return an FString instead of a pointer to a static buffer. - Changed startmap in d_main.cpp into an FString. - Changed CheckWarpTransMap() to take an FString& as the first argument. - Changed d_mapname in g_level.cpp into an FString. - Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an FString. - Fixed: The MAPINFO parser wrote into the string buffer to construct a map name when given a Hexen map number. This was fine with the old scanner code, but only a happy coincidence prevents it from crashing with the new code. - Added the 'B' conversion specifier to StringFormat::VWorker() for printing binary numbers. - Added CMake support for building with MinGW, MSYS, and NMake. Linux support is probably broken until I get around to booting into Linux again. Niceties provided over the existing Makefiles they're replacing: * All command-line builds can use the same build system, rather than having a separate one for MinGW and another for Linux. * Microsoft's NMake tool is supported as a target. * Progress meters. * Parallel makes work from a fresh checkout without needing to be primed first with a single-threaded make. * Porting to other architectures should be simplified, whenever that day comes. - Replaced the makewad tool with zipdir. This handles the dependency tracking itself instead of generating an external makefile to do it, since I couldn't figure out how to generate a makefile with an external tool and include it with a CMake-generated makefile. Where makewad used a master list of files to generate the package file, zipdir just zips the entire contents of one or more directories. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@138 b0f79afe-0144-0410-b225-9a4edf0717df
2008-07-23 18:35:55 +00:00
mysnprintf (name, countof(name), "BTIL%04d", (args[0] + args[1]*256) & 0xffff);
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
picnum = TexMan.GetTexture (name, FTexture::TEX_Build);
scaleX = args[2] * (FRACUNIT/64);
scaleY = args[3] * (FRACUNIT/64);
if (args[4] & 2)
{
RenderStyle = STYLE_Translucent;
if (args[4] & 1)
alpha = TRANSLUC66;
else
alpha = TRANSLUC33;
}
if (args[4] & 4)
renderflags |= RF_XFLIP;
if (args[4] & 8)
renderflags |= RF_YFLIP;
}