2006-02-24 04:48:15 +00:00
|
|
|
/*
|
|
|
|
** g_level.h
|
|
|
|
**
|
|
|
|
**---------------------------------------------------------------------------
|
2006-06-11 01:37:00 +00:00
|
|
|
** Copyright 1998-2006 Randy Heit
|
2006-02-24 04:48:15 +00:00
|
|
|
** All rights reserved.
|
|
|
|
**
|
|
|
|
** Redistribution and use in source and binary forms, with or without
|
|
|
|
** modification, are permitted provided that the following conditions
|
|
|
|
** are met:
|
|
|
|
**
|
|
|
|
** 1. Redistributions of source code must retain the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer.
|
|
|
|
** 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer in the
|
|
|
|
** documentation and/or other materials provided with the distribution.
|
|
|
|
** 3. The name of the author may not be used to endorse or promote products
|
|
|
|
** derived from this software without specific prior written permission.
|
|
|
|
**
|
|
|
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __G_LEVEL_H__
|
|
|
|
#define __G_LEVEL_H__
|
|
|
|
|
|
|
|
#include "doomtype.h"
|
|
|
|
#include "doomdef.h"
|
|
|
|
|
|
|
|
#define NUM_WORLDVARS 256
|
|
|
|
#define NUM_GLOBALVARS 64
|
|
|
|
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_NOINTERMISSION UCONST64(0x00000001)
|
|
|
|
#define LEVEL_NOINVENTORYBAR UCONST64(0x00000002) // This effects Doom only, since it's the only one without a standard inventory bar.
|
|
|
|
#define LEVEL_DOUBLESKY UCONST64(0x00000004)
|
|
|
|
#define LEVEL_HASFADETABLE UCONST64(0x00000008) // Level uses Hexen's fadetable mapinfo to get fog
|
|
|
|
|
|
|
|
#define LEVEL_MAP07SPECIAL UCONST64(0x00000010)
|
|
|
|
#define LEVEL_BRUISERSPECIAL UCONST64(0x00000020)
|
|
|
|
#define LEVEL_CYBORGSPECIAL UCONST64(0x00000040)
|
|
|
|
#define LEVEL_SPIDERSPECIAL UCONST64(0x00000080)
|
|
|
|
|
|
|
|
#define LEVEL_SPECLOWERFLOOR UCONST64(0x00000100)
|
|
|
|
#define LEVEL_SPECOPENDOOR UCONST64(0x00000200)
|
|
|
|
#define LEVEL_SPECACTIONSMASK UCONST64(0x00000300)
|
|
|
|
|
|
|
|
#define LEVEL_MONSTERSTELEFRAG UCONST64(0x00000400)
|
|
|
|
#define LEVEL_ACTOWNSPECIAL UCONST64(0x00000800)
|
|
|
|
#define LEVEL_SNDSEQTOTALCTRL UCONST64(0x00001000)
|
|
|
|
#define LEVEL_FORCENOSKYSTRETCH UCONST64(0x00002000)
|
|
|
|
|
2008-03-18 18:18:18 +00:00
|
|
|
#define LEVEL_CROUCH_NO UCONST64(0x00004000)
|
|
|
|
#define LEVEL_JUMP_NO UCONST64(0x00008000)
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_FREELOOK_NO UCONST64(0x00010000)
|
|
|
|
#define LEVEL_FREELOOK_YES UCONST64(0x00020000)
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// The absence of both of the following bits means that this level does not
|
|
|
|
// use falling damage (though damage can be forced with dmflags).
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_FALLDMG_ZD UCONST64(0x00040000) // Level uses ZDoom's falling damage
|
|
|
|
#define LEVEL_FALLDMG_HX UCONST64(0x00080000) // Level uses Hexen's falling damage
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_HEADSPECIAL UCONST64(0x00100000) // Heretic episode 1/4
|
|
|
|
#define LEVEL_MINOTAURSPECIAL UCONST64(0x00200000) // Heretic episode 2/5
|
|
|
|
#define LEVEL_SORCERER2SPECIAL UCONST64(0x00400000) // Heretic episode 3
|
|
|
|
#define LEVEL_SPECKILLMONSTERS UCONST64(0x00800000)
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_STARTLIGHTNING UCONST64(0x01000000) // Automatically start lightning
|
|
|
|
#define LEVEL_FILTERSTARTS UCONST64(0x02000000) // Apply mapthing filtering to player starts
|
|
|
|
#define LEVEL_LOOKUPLEVELNAME UCONST64(0x04000000) // Level name is the name of a language string
|
|
|
|
#define LEVEL_HEXENFORMAT UCONST64(0x08000000) // Level uses the Hexen map format
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_SWAPSKIES UCONST64(0x10000000) // Used by lightning
|
|
|
|
#define LEVEL_NOALLIES UCONST64(0x20000000) // i.e. Inside Strife's front base
|
|
|
|
#define LEVEL_CHANGEMAPCHEAT UCONST64(0x40000000) // Don't display cluster messages
|
|
|
|
#define LEVEL_VISITED UCONST64(0x80000000) // Used for intermission map
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_DEATHSLIDESHOW UCONST64(0x100000000) // Slideshow on death
|
|
|
|
#define LEVEL_ALLMAP UCONST64(0x200000000) // The player picked up a map on this level
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_LAXMONSTERACTIVATION UCONST64(0x400000000) // Monsters can open doors depending on the door speed
|
|
|
|
#define LEVEL_LAXACTIVATIONMAPINFO UCONST64(0x800000000) // LEVEL_LAXMONSTERACTIVATION is not a default.
|
2007-02-04 02:12:54 +00:00
|
|
|
|
|
|
|
#define LEVEL_MISSILESACTIVATEIMPACT UCONST64(0x1000000000) // Missiles are the activators of SPAC_IMPACT events, not their shooters
|
2007-05-01 15:09:44 +00:00
|
|
|
#define LEVEL_FROZEN UCONST64(0x2000000000) // Game is frozen by a TimeFreezer
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_KEEPFULLINVENTORY UCONST64(0x4000000000) // doesn't reduce the amount of inventory items to 1
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-12-21 04:34:43 +00:00
|
|
|
#define LEVEL_MUSICDEFINED UCONST64(0x8000000000) // a marker to disable the $map command in SNDINFO for this map
|
2006-07-12 03:35:55 +00:00
|
|
|
#define LEVEL_MONSTERFALLINGDAMAGE UCONST64(0x10000000000)
|
|
|
|
#define LEVEL_CLIPMIDTEX UCONST64(0x20000000000)
|
|
|
|
#define LEVEL_WRAPMIDTEX UCONST64(0x40000000000)
|
2006-04-27 15:12:17 +00:00
|
|
|
|
2008-03-18 18:18:18 +00:00
|
|
|
#define LEVEL_CHECKSWITCHRANGE UCONST64(0x80000000000)
|
2006-05-14 14:30:13 +00:00
|
|
|
|
2008-03-18 18:18:18 +00:00
|
|
|
#define LEVEL_PAUSE_MUSIC_IN_MENUS UCONST64(0x100000000000)
|
|
|
|
#define LEVEL_TOTALINFIGHTING UCONST64(0x200000000000)
|
|
|
|
#define LEVEL_NOINFIGHTING UCONST64(0x400000000000)
|
2006-05-21 02:10:16 +00:00
|
|
|
|
2008-03-18 18:18:18 +00:00
|
|
|
#define LEVEL_NOMONSTERS UCONST64(0x800000000000)
|
|
|
|
#define LEVEL_INFINITE_FLIGHT UCONST64(0x1000000000000)
|
2007-11-08 09:22:06 +00:00
|
|
|
|
2008-03-18 18:18:18 +00:00
|
|
|
#define LEVEL_ALLOWRESPAWN UCONST64(0x2000000000000)
|
|
|
|
|
|
|
|
#define LEVEL_FORCETEAMPLAYON UCONST64(0x4000000000000)
|
|
|
|
#define LEVEL_FORCETEAMPLAYOFF UCONST64(0x8000000000000)
|
2007-12-06 08:55:17 +00:00
|
|
|
|
2008-03-29 22:59:41 +00:00
|
|
|
#define LEVEL_CONV_SINGLE_UNFREEZE UCONST64(0x10000000000000)
|
2008-05-22 19:35:38 +00:00
|
|
|
#define LEVEL_RAILINGHACK UCONST64(0x20000000000000) // but UDMF requires them to be separate to have more control
|
|
|
|
#define LEVEL_DUMMYSWITCHES UCONST64(0x40000000000000)
|
2008-06-16 22:38:23 +00:00
|
|
|
#define LEVEL_HEXENHACK UCONST64(0x80000000000000) // Level was defined in a Hexen style MAPINFO
|
2008-03-29 22:59:41 +00:00
|
|
|
|
2008-08-21 08:04:21 +00:00
|
|
|
#define LEVEL_SMOOTHLIGHTING UCONST64(0x100000000000000) // Level uses the smooth lighting feature.
|
|
|
|
|
2008-01-26 16:42:16 +00:00
|
|
|
|
2008-09-15 14:11:05 +00:00
|
|
|
struct acsdefered_t;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
struct FSpecialAction
|
|
|
|
{
|
2006-05-03 22:45:01 +00:00
|
|
|
FName Type; // this is initialized before the actors...
|
2006-02-24 04:48:15 +00:00
|
|
|
BYTE Action;
|
2008-03-23 14:18:27 +00:00
|
|
|
int Args[5]; // must allow 16 bit tags for 666 & 667!
|
2006-02-24 04:48:15 +00:00
|
|
|
FSpecialAction *Next;
|
|
|
|
};
|
|
|
|
|
2008-06-01 20:43:02 +00:00
|
|
|
class FCompressedMemFile;
|
|
|
|
class DScroller;
|
|
|
|
|
2008-06-22 09:13:19 +00:00
|
|
|
class FScanner;
|
|
|
|
struct level_info_t;
|
|
|
|
typedef void (*MIParseFunc)(FScanner &sc, level_info_t *info);
|
|
|
|
|
|
|
|
void AddOptionalMapinfoParser(const char *keyword, MIParseFunc parsefunc);
|
|
|
|
|
|
|
|
struct FOptionalMapinfoData
|
|
|
|
{
|
|
|
|
FOptionalMapinfoData *Next;
|
|
|
|
FName identifier;
|
|
|
|
FOptionalMapinfoData() { Next = NULL; identifier = NAME_None; }
|
2008-06-28 12:24:15 +00:00
|
|
|
virtual ~FOptionalMapinfoData() {}
|
2008-06-22 09:13:19 +00:00
|
|
|
virtual FOptionalMapinfoData *Clone() const = 0;
|
|
|
|
};
|
|
|
|
|
2008-04-05 12:14:33 +00:00
|
|
|
struct level_info_t
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
char mapname[9];
|
|
|
|
int levelnum;
|
|
|
|
char pname[9];
|
|
|
|
char nextmap[9];
|
|
|
|
char secretmap[9];
|
|
|
|
char skypic1[9];
|
|
|
|
int cluster;
|
|
|
|
int partime;
|
|
|
|
int sucktime;
|
|
|
|
QWORD flags;
|
|
|
|
char *music;
|
|
|
|
char *level_name;
|
|
|
|
char fadetable[9];
|
|
|
|
SBYTE WallVertLight, WallHorizLight;
|
2008-04-05 12:14:33 +00:00
|
|
|
char f1[9];
|
2006-06-03 12:30:11 +00:00
|
|
|
// TheDefaultLevelInfo initializes everything above this line.
|
2006-02-24 04:48:15 +00:00
|
|
|
int musicorder;
|
|
|
|
FCompressedMemFile *snapshot;
|
|
|
|
DWORD snapshotVer;
|
2008-09-15 14:11:05 +00:00
|
|
|
struct acsdefered_t *defered;
|
2006-02-24 04:48:15 +00:00
|
|
|
char skypic2[9];
|
2006-05-18 01:42:50 +00:00
|
|
|
float skyspeed1;
|
|
|
|
float skyspeed2;
|
2006-02-24 04:48:15 +00:00
|
|
|
DWORD fadeto;
|
|
|
|
DWORD outsidefog;
|
|
|
|
int cdtrack;
|
|
|
|
unsigned int cdid;
|
|
|
|
float gravity;
|
|
|
|
float aircontrol;
|
|
|
|
int WarpTrans;
|
|
|
|
int airsupply;
|
2006-06-03 12:30:11 +00:00
|
|
|
DWORD compatflags;
|
|
|
|
DWORD compatmask;
|
2008-03-23 14:18:27 +00:00
|
|
|
char *translator; // for converting Doom-format linedef and sector types.
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// Redirection: If any player is carrying the specified item, then
|
|
|
|
// you go to the RedirectMap instead of this one.
|
2006-05-10 15:07:14 +00:00
|
|
|
FName RedirectType;
|
2006-02-24 04:48:15 +00:00
|
|
|
char RedirectMap[9];
|
|
|
|
|
2008-04-05 12:14:33 +00:00
|
|
|
char *enterpic;
|
|
|
|
char *exitpic;
|
2006-06-09 08:19:46 +00:00
|
|
|
char *intermusic;
|
|
|
|
int intermusicorder;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-04-05 12:14:33 +00:00
|
|
|
char *soundinfo;
|
|
|
|
char *sndseq;
|
2007-01-05 22:08:57 +00:00
|
|
|
char bordertexture[9];
|
2007-12-27 11:25:25 +00:00
|
|
|
|
2007-12-22 22:04:20 +00:00
|
|
|
float teamdamage;
|
2008-04-05 12:14:33 +00:00
|
|
|
|
2008-06-22 09:13:19 +00:00
|
|
|
FSpecialAction * specialactions;
|
|
|
|
FOptionalMapinfoData *opdata;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// [RH] These get zeroed every tic and are updated by thinkers.
|
|
|
|
struct FSectorScrollValues
|
|
|
|
{
|
|
|
|
fixed_t ScrollX, ScrollY;
|
|
|
|
};
|
|
|
|
|
2008-04-05 12:14:33 +00:00
|
|
|
struct FLevelLocals
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
void Tick ();
|
|
|
|
void AddScroller (DScroller *, int secnum);
|
|
|
|
|
2006-04-11 16:27:41 +00:00
|
|
|
int time; // time in the hub
|
|
|
|
int maptime; // time in the map
|
|
|
|
int totaltime; // time in the game
|
2006-02-24 04:48:15 +00:00
|
|
|
int starttime;
|
|
|
|
int partime;
|
|
|
|
int sucktime;
|
|
|
|
|
|
|
|
level_info_t *info;
|
|
|
|
int cluster;
|
|
|
|
int clusterflags;
|
|
|
|
int levelnum;
|
|
|
|
int lumpnum;
|
|
|
|
char level_name[64]; // the descriptive name (Outer Base, etc)
|
2006-06-14 15:56:56 +00:00
|
|
|
char mapname[256]; // the server name (base1, etc)
|
2006-02-24 04:48:15 +00:00
|
|
|
char nextmap[9]; // go here when fraglimit is hit
|
|
|
|
char secretmap[9]; // map to go to when used secret exit
|
|
|
|
|
|
|
|
QWORD flags;
|
|
|
|
|
|
|
|
DWORD fadeto; // The color the palette fades to (usually black)
|
|
|
|
DWORD outsidefog; // The fog for sectors with sky ceilings
|
|
|
|
|
|
|
|
char *music;
|
|
|
|
int musicorder;
|
|
|
|
int cdtrack;
|
|
|
|
unsigned int cdid;
|
|
|
|
char skypic1[9];
|
|
|
|
char skypic2[9];
|
|
|
|
|
2006-05-18 01:42:50 +00:00
|
|
|
float skyspeed1; // Scrolling speed of sky textures, in pixels per ms
|
|
|
|
float skyspeed2;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
int total_secrets;
|
|
|
|
int found_secrets;
|
|
|
|
|
|
|
|
int total_items;
|
|
|
|
int found_items;
|
|
|
|
|
|
|
|
int total_monsters;
|
|
|
|
int killed_monsters;
|
|
|
|
|
|
|
|
float gravity;
|
|
|
|
fixed_t aircontrol;
|
|
|
|
fixed_t airfriction;
|
|
|
|
int airsupply;
|
|
|
|
|
|
|
|
FSectorScrollValues *Scrolls; // NULL if no DScrollers in this level
|
|
|
|
|
|
|
|
SBYTE WallVertLight; // Light diffs for vert/horiz walls
|
|
|
|
SBYTE WallHorizLight;
|
2007-05-10 22:22:38 +00:00
|
|
|
|
2008-02-13 02:29:49 +00:00
|
|
|
bool FromSnapshot; // The current map was restored from a snapshot
|
|
|
|
|
2007-12-22 22:04:20 +00:00
|
|
|
float teamdamage;
|
|
|
|
|
2007-12-11 04:03:40 +00:00
|
|
|
bool IsJumpingAllowed() const;
|
|
|
|
bool IsCrouchingAllowed() const;
|
|
|
|
bool IsFreelookAllowed() const;
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum EndTypes
|
|
|
|
{
|
|
|
|
END_Pic,
|
|
|
|
END_Pic1,
|
|
|
|
END_Pic2,
|
|
|
|
END_Pic3,
|
|
|
|
END_Bunny,
|
|
|
|
END_Cast,
|
|
|
|
END_Demon,
|
|
|
|
END_Underwater,
|
|
|
|
END_Chess,
|
|
|
|
END_Strife,
|
|
|
|
END_BuyStrife
|
|
|
|
};
|
|
|
|
|
|
|
|
struct EndSequence
|
|
|
|
{
|
2006-09-14 00:02:31 +00:00
|
|
|
BYTE EndType;
|
2008-05-30 06:56:50 +00:00
|
|
|
bool Advanced;
|
|
|
|
bool MusicLooping;
|
|
|
|
bool PlayTheEnd;
|
2008-06-05 04:30:18 +00:00
|
|
|
FString PicName;
|
|
|
|
FString PicName2;
|
2008-05-30 06:56:50 +00:00
|
|
|
FString Music;
|
2008-06-05 04:30:18 +00:00
|
|
|
|
|
|
|
EndSequence();
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern TArray<EndSequence> EndSequences;
|
|
|
|
|
2008-09-14 23:54:38 +00:00
|
|
|
struct cluster_info_t
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
int cluster;
|
|
|
|
char finaleflat[9];
|
|
|
|
char *exittext;
|
|
|
|
char *entertext;
|
|
|
|
char *messagemusic;
|
|
|
|
int musicorder;
|
|
|
|
int flags;
|
|
|
|
int cdtrack;
|
2006-04-11 16:27:41 +00:00
|
|
|
char *clustername;
|
2006-02-24 04:48:15 +00:00
|
|
|
unsigned int cdid;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Cluster flags
|
|
|
|
#define CLUSTER_HUB 0x00000001 // Cluster uses hub behavior
|
|
|
|
#define CLUSTER_EXITTEXTINLUMP 0x00000002 // Exit text is the name of a lump
|
|
|
|
#define CLUSTER_ENTERTEXTINLUMP 0x00000004 // Enter text is the name of a lump
|
|
|
|
#define CLUSTER_FINALEPIC 0x00000008 // Finale "flat" is actually a full-sized image
|
|
|
|
#define CLUSTER_LOOKUPEXITTEXT 0x00000010 // Exit text is the name of a language string
|
|
|
|
#define CLUSTER_LOOKUPENTERTEXT 0x00000020 // Enter text is the name of a language string
|
2008-04-05 16:45:39 +00:00
|
|
|
#define CLUSTER_LOOKUPNAME 0x00000040 // Name is the name of a language string
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-04-05 12:14:33 +00:00
|
|
|
extern FLevelLocals level;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-05-04 06:14:52 +00:00
|
|
|
extern TArray<level_info_t> wadlevelinfos;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
extern SDWORD ACS_WorldVars[NUM_WORLDVARS];
|
|
|
|
extern SDWORD ACS_GlobalVars[NUM_GLOBALVARS];
|
2007-04-12 23:00:52 +00:00
|
|
|
|
|
|
|
struct InitIntToZero
|
|
|
|
{
|
|
|
|
void Init(int &v)
|
|
|
|
{
|
|
|
|
v = 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
typedef TMap<SDWORD, SDWORD, THashTraits<SDWORD>, InitIntToZero> FWorldGlobalArray;
|
|
|
|
|
|
|
|
extern FWorldGlobalArray ACS_WorldArrays[NUM_WORLDVARS];
|
|
|
|
extern FWorldGlobalArray ACS_GlobalArrays[NUM_GLOBALVARS];
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-05-18 04:25:26 +00:00
|
|
|
extern bool savegamerestore;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// mapname will be changed if it is a valid warptrans
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- 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.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
bool CheckWarpTransMap (FString &mapname, bool substitute);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-12-29 03:38:37 +00:00
|
|
|
void G_InitNew (const char *mapname, bool bTitleLevel);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// Can be called by the startup code or M_Responder.
|
|
|
|
// A normal game starts at map 1,
|
|
|
|
// but a warp test can start elsewhere
|
2007-08-09 08:42:15 +00:00
|
|
|
void G_DeferedInitNew (const char *mapname, int skill = -1);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void G_ExitLevel (int position, bool keepFacing);
|
|
|
|
void G_SecretExitLevel (int position);
|
2008-02-12 05:54:03 +00:00
|
|
|
const char *G_GetExitMap();
|
|
|
|
const char *G_GetSecretExitMap();
|
2006-08-10 15:28:12 +00:00
|
|
|
|
2007-09-06 09:54:57 +00:00
|
|
|
void G_ChangeLevel(const char * levelname, int position, bool keepFacing, int nextSkill=-1,
|
|
|
|
bool nointermission=false, bool resetinventory=false, bool nomonsters=false);
|
2006-08-10 15:28:12 +00:00
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
void G_SetForEndGame (char *nextmap);
|
|
|
|
|
|
|
|
void G_StartTravel ();
|
|
|
|
void G_FinishTravel ();
|
|
|
|
|
|
|
|
void G_DoLoadLevel (int position, bool autosave);
|
|
|
|
|
|
|
|
void G_InitLevelLocals (void);
|
|
|
|
|
|
|
|
void G_AirControlChanged ();
|
|
|
|
|
|
|
|
const char *G_MaybeLookupLevelName (level_info_t *level);
|
|
|
|
|
|
|
|
cluster_info_t *FindClusterInfo (int cluster);
|
2008-02-12 05:54:03 +00:00
|
|
|
level_info_t *FindLevelInfo (const char *mapname);
|
2006-02-24 04:48:15 +00:00
|
|
|
level_info_t *FindLevelByNum (int num);
|
|
|
|
level_info_t *CheckLevelRedirect (level_info_t *info);
|
|
|
|
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- 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.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
FString CalcMapName (int episode, int level);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void G_ParseMapInfo (void);
|
2006-05-12 03:14:40 +00:00
|
|
|
void G_UnloadMapInfo ();
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void G_ClearSnapshots (void);
|
|
|
|
void G_SnapshotLevel (void);
|
|
|
|
void G_UnSnapshotLevel (bool keepPlayers);
|
|
|
|
struct PNGHandle;
|
|
|
|
void G_ReadSnapshots (PNGHandle *png);
|
|
|
|
void G_WriteSnapshots (FILE *file);
|
|
|
|
|
2007-10-29 22:15:46 +00:00
|
|
|
enum ESkillProperty
|
|
|
|
{
|
|
|
|
SKILLP_AmmoFactor,
|
2008-08-07 08:18:48 +00:00
|
|
|
SKILLP_DropAmmoFactor,
|
2007-10-29 22:15:46 +00:00
|
|
|
SKILLP_DamageFactor,
|
|
|
|
SKILLP_FastMonsters,
|
|
|
|
SKILLP_Respawn,
|
2008-01-26 16:42:16 +00:00
|
|
|
SKILLP_RespawnLimit,
|
2007-10-29 22:15:46 +00:00
|
|
|
SKILLP_Aggressiveness,
|
|
|
|
SKILLP_DisableCheats,
|
|
|
|
SKILLP_AutoUseHealth,
|
|
|
|
SKILLP_SpawnFilter,
|
|
|
|
SKILLP_EasyBossBrain,
|
2007-12-11 02:38:38 +00:00
|
|
|
SKILLP_ACSReturn
|
2007-10-29 22:15:46 +00:00
|
|
|
};
|
|
|
|
int G_SkillProperty(ESkillProperty prop);
|
|
|
|
|
2007-11-02 22:03:03 +00:00
|
|
|
typedef TMap<FName, FString> SkillMenuNames;
|
|
|
|
|
|
|
|
struct FSkillInfo
|
|
|
|
{
|
2007-12-08 22:57:55 +00:00
|
|
|
FName Name;
|
2008-08-07 08:18:48 +00:00
|
|
|
fixed_t AmmoFactor, DoubleAmmoFactor, DropAmmoFactor;
|
2007-11-02 22:03:03 +00:00
|
|
|
fixed_t DamageFactor;
|
|
|
|
bool FastMonsters;
|
|
|
|
bool DisableCheats;
|
|
|
|
bool AutoUseHealth;
|
|
|
|
bool EasyBossBrain;
|
|
|
|
int RespawnCounter;
|
2008-01-26 16:42:16 +00:00
|
|
|
int RespawnLimit;
|
2007-11-02 22:03:03 +00:00
|
|
|
fixed_t Aggressiveness;
|
|
|
|
int SpawnFilter;
|
|
|
|
int ACSReturn;
|
|
|
|
FString MenuName;
|
|
|
|
SkillMenuNames MenuNamesForPlayerClass;
|
|
|
|
bool MenuNameIsLump;
|
|
|
|
bool MustConfirm;
|
2007-12-06 08:55:17 +00:00
|
|
|
FString MustConfirmText;
|
2007-12-08 22:57:55 +00:00
|
|
|
char Shortcut;
|
|
|
|
FString TextColor;
|
2007-11-02 22:03:03 +00:00
|
|
|
|
|
|
|
FSkillInfo() {}
|
|
|
|
FSkillInfo(const FSkillInfo &other)
|
|
|
|
{
|
|
|
|
operator=(other);
|
|
|
|
}
|
2007-12-08 22:57:55 +00:00
|
|
|
FSkillInfo &operator=(const FSkillInfo &other);
|
|
|
|
int GetTextColor() const;
|
2007-11-02 22:03:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern TArray<FSkillInfo> AllSkills;
|
|
|
|
|
|
|
|
|
2007-10-29 22:15:46 +00:00
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
#endif //__G_LEVEL_H__
|