2006-02-24 04:48:15 +00:00
|
|
|
/*
|
|
|
|
** gi.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 __GI_H__
|
|
|
|
#define __GI_H__
|
|
|
|
|
2008-09-14 23:54:38 +00:00
|
|
|
#include "basictypes.h"
|
2009-03-22 11:37:56 +00:00
|
|
|
#include "zstring.h"
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-03-22 11:37:56 +00:00
|
|
|
// Flags are not user configurable and only depend on the standard IWADs
|
2006-02-24 04:48:15 +00:00
|
|
|
#define GI_MAPxx 0x00000001
|
2009-03-22 11:37:56 +00:00
|
|
|
#define GI_SHAREWARE 0x00000002
|
|
|
|
#define GI_MENUHACK_EXTENDED 0x00000004 // (Heretic)
|
|
|
|
#define GI_TEASER2 0x00000008 // Alternate version of the Strife Teaser
|
2009-12-11 09:21:08 +00:00
|
|
|
#define GI_COMPATSHORTTEX 0x00000010 // always force COMPAT_SHORTTEX for IWAD maps.
|
2010-08-15 10:02:10 +00:00
|
|
|
#define GI_COMPATSTAIRS 0x00000020 // same for stairbuilding
|
|
|
|
#define GI_COMPATPOLY1 0x00000040 // Hexen's MAP36 needs old polyobject drawing
|
|
|
|
#define GI_COMPATPOLY2 0x00000080 // so does HEXDD's MAP47
|
2010-12-15 00:14:42 +00:00
|
|
|
#define GI_NOTEXTCOLOR 0x00000100 // Chex Quest 3 would have everything green
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-03-22 11:37:56 +00:00
|
|
|
#include "gametype.h"
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-08-30 19:44:19 +00:00
|
|
|
extern const char *GameNames[17];
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2014-05-13 11:40:02 +00:00
|
|
|
struct staticgameborder_t
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2006-09-14 00:02:31 +00:00
|
|
|
BYTE offset;
|
|
|
|
BYTE size;
|
2006-02-24 04:48:15 +00:00
|
|
|
char tl[8];
|
|
|
|
char t[8];
|
|
|
|
char tr[8];
|
|
|
|
char l[8];
|
|
|
|
char r[8];
|
|
|
|
char bl[8];
|
|
|
|
char b[8];
|
|
|
|
char br[8];
|
2009-03-26 02:06:14 +00:00
|
|
|
};
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2014-05-13 11:40:02 +00:00
|
|
|
struct gameborder_t
|
|
|
|
{
|
|
|
|
BYTE offset;
|
|
|
|
BYTE size;
|
|
|
|
FString tl;
|
|
|
|
FString t;
|
|
|
|
FString tr;
|
|
|
|
FString l;
|
|
|
|
FString r;
|
|
|
|
FString bl;
|
|
|
|
FString b;
|
|
|
|
FString br;
|
|
|
|
|
|
|
|
gameborder_t &operator=(staticgameborder_t &other)
|
|
|
|
{
|
|
|
|
offset = other.offset;
|
|
|
|
size = other.size;
|
|
|
|
tl = other.tl;
|
|
|
|
t = other.t;
|
|
|
|
tr = other.tr;
|
|
|
|
l = other.l;
|
|
|
|
r = other.r;
|
|
|
|
bl = other.bl;
|
|
|
|
b = other.b;
|
|
|
|
br = other.br;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-11-06 09:28:17 +00:00
|
|
|
struct FGIFont
|
|
|
|
{
|
|
|
|
FName fontname;
|
|
|
|
FName color;
|
|
|
|
};
|
|
|
|
|
2009-03-26 02:06:14 +00:00
|
|
|
struct gameinfo_t
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
int flags;
|
2009-03-22 11:37:56 +00:00
|
|
|
EGameType gametype;
|
2010-10-15 15:13:53 +00:00
|
|
|
FString ConfigName;
|
2009-03-22 11:37:56 +00:00
|
|
|
|
2014-05-13 10:44:17 +00:00
|
|
|
FString TitlePage;
|
2009-03-22 11:37:56 +00:00
|
|
|
bool drawreadthis;
|
|
|
|
bool noloopfinalemusic;
|
2009-04-23 22:49:38 +00:00
|
|
|
bool intermissioncounter;
|
2010-09-19 10:39:34 +00:00
|
|
|
bool nightmarefast;
|
2010-09-26 06:53:40 +00:00
|
|
|
bool swapmenu;
|
2014-05-14 10:54:03 +00:00
|
|
|
bool dontcrunchcorpses;
|
2009-03-22 11:37:56 +00:00
|
|
|
TArray<FName> creditPages;
|
|
|
|
TArray<FName> finalePages;
|
|
|
|
TArray<FName> infoPages;
|
2009-04-04 17:46:33 +00:00
|
|
|
TArray<FName> DefaultWeaponSlots[10];
|
2010-09-19 08:27:20 +00:00
|
|
|
TArray<FName> PlayerClasses;
|
2009-03-22 11:37:56 +00:00
|
|
|
|
|
|
|
FString titleMusic;
|
2013-08-12 19:11:53 +00:00
|
|
|
int titleOrder;
|
2006-02-24 04:48:15 +00:00
|
|
|
float titleTime;
|
|
|
|
float advisoryTime;
|
|
|
|
float pageTime;
|
2009-03-22 11:37:56 +00:00
|
|
|
FString chatSound;
|
|
|
|
FString finaleMusic;
|
2013-08-12 19:11:53 +00:00
|
|
|
int finaleOrder;
|
2014-05-13 10:44:17 +00:00
|
|
|
FString FinaleFlat;
|
|
|
|
FString BorderFlat;
|
|
|
|
FString SkyFlatName;
|
|
|
|
FString ArmorIcon1;
|
|
|
|
FString ArmorIcon2;
|
|
|
|
FString PauseSign;
|
|
|
|
FString Endoom;
|
2009-09-07 19:46:54 +00:00
|
|
|
fixed_t Armor2Percent;
|
|
|
|
FString quitSound;
|
2014-05-13 11:40:02 +00:00
|
|
|
gameborder_t Border;
|
2006-02-24 04:48:15 +00:00
|
|
|
int telefogheight;
|
|
|
|
int defKickback;
|
2009-03-22 11:37:56 +00:00
|
|
|
FString translator;
|
2008-08-26 18:32:17 +00:00
|
|
|
DWORD defaultbloodcolor;
|
2008-09-04 14:09:32 +00:00
|
|
|
DWORD defaultbloodparticlecolor;
|
2009-03-22 11:37:56 +00:00
|
|
|
FString backpacktype;
|
|
|
|
FString statusbar;
|
|
|
|
FString intermissionMusic;
|
2013-08-12 19:11:53 +00:00
|
|
|
int intermissionOrder;
|
2010-09-26 05:31:52 +00:00
|
|
|
FString CursorPic;
|
2009-09-04 22:25:46 +00:00
|
|
|
DWORD dimcolor;
|
|
|
|
float dimamount;
|
2009-09-08 21:01:24 +00:00
|
|
|
int definventorymaxamount;
|
|
|
|
int defaultrespawntime;
|
|
|
|
int defaultdropstyle;
|
2009-11-24 06:55:38 +00:00
|
|
|
int player5start;
|
2010-08-14 06:25:38 +00:00
|
|
|
DWORD pickupcolor;
|
2010-09-14 17:28:18 +00:00
|
|
|
TArray<FString> quitmessages;
|
|
|
|
FName mTitleColor;
|
|
|
|
FName mFontColor;
|
|
|
|
FName mFontColorValue;
|
|
|
|
FName mFontColorMore;
|
|
|
|
FName mFontColorHeader;
|
|
|
|
FName mFontColorHighlight;
|
|
|
|
FName mFontColorSelection;
|
2014-05-13 10:44:17 +00:00
|
|
|
FString mBackButton;
|
2010-09-19 10:39:34 +00:00
|
|
|
fixed_t gibfactor;
|
2010-10-06 10:44:03 +00:00
|
|
|
int TextScreenX;
|
|
|
|
int TextScreenY;
|
|
|
|
FName DefaultEndSequence;
|
2010-10-16 22:37:30 +00:00
|
|
|
FString mMapArrow, mCheatMapArrow;
|
2014-10-25 08:19:14 +00:00
|
|
|
FString mEasyKey, mCheatKey;
|
2010-11-06 09:28:17 +00:00
|
|
|
FGIFont mStatscreenMapNameFont;
|
|
|
|
FGIFont mStatscreenFinishedFont;
|
|
|
|
FGIFont mStatscreenEnteringFont;
|
2013-02-19 02:50:47 +00:00
|
|
|
bool norandomplayerclass;
|
2009-03-22 11:37:56 +00:00
|
|
|
|
|
|
|
const char *GetFinalePage(unsigned int num) const;
|
2009-03-26 02:06:14 +00:00
|
|
|
};
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-03-22 11:37:56 +00:00
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
extern gameinfo_t gameinfo;
|
|
|
|
|
2010-10-15 15:13:53 +00:00
|
|
|
inline const char *GameTypeName()
|
2010-10-12 07:14:31 +00:00
|
|
|
{
|
|
|
|
return GameNames[gameinfo.gametype];
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool CheckGame(const char *string, bool chexisdoom)
|
|
|
|
{
|
|
|
|
int test = gameinfo.gametype;
|
|
|
|
if (test == GAME_Chex && chexisdoom) test = GAME_Doom;
|
|
|
|
return !stricmp(string, GameNames[test]);
|
|
|
|
}
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
#endif //__GI_H__
|