2016-03-01 15:47:10 +00:00
|
|
|
/*
|
|
|
|
** gi.h
|
|
|
|
**
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
** Copyright 1998-2006 Randy Heit
|
|
|
|
** 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__
|
|
|
|
|
|
|
|
#include "basictypes.h"
|
|
|
|
#include "zstring.h"
|
|
|
|
|
|
|
|
// Flags are not user configurable and only depend on the standard IWADs
|
- allow the language table to supersede the title patches, if appropriate
For the Doom IWADs the provided font looks almost identical to the characters used on the title patches. So, for any level name that got replaced in some language, it will now check if the retrieved name comes from the default table, and if not, ignore the title patch and print the name with the specified font.
This also required removing the 'en' label from the default table, because with this present, the text would always be picked from 'en' instead of 'default'. Since 'en' and 'default' had the same contents, in any English locale the 'default' table was never hit, so this won't make any difference for the texts being chosen.
Last but not least, wminfo has been made a local variable in G_DoCompleted. There were two places where this was accessed from outside the summary screen or its setup code, and both were incorrect.
2019-02-14 23:29:24 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
GI_MAPxx = 0x00000001,
|
|
|
|
GI_SHAREWARE = 0x00000002,
|
|
|
|
GI_MENUHACK_EXTENDED = 0x00000004, // (Heretic)
|
|
|
|
GI_TEASER2 = 0x00000008, // Alternate version of the Strife Teaser
|
|
|
|
GI_COMPATSHORTTEX = 0x00000010, // always force COMPAT_SHORTTEX for IWAD maps.
|
|
|
|
GI_COMPATSTAIRS = 0x00000020, // same for stairbuilding
|
|
|
|
GI_COMPATPOLY1 = 0x00000040, // Hexen's MAP36 needs old polyobject drawing
|
|
|
|
GI_COMPATPOLY2 = 0x00000080, // so does HEXDD's MAP47
|
|
|
|
GI_IGNORETITLEPATCHES = 0x00000200, // Ignore the map name graphics when not runnning in English language
|
|
|
|
};
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
#include "gametype.h"
|
|
|
|
|
|
|
|
extern const char *GameNames[17];
|
|
|
|
|
|
|
|
struct staticgameborder_t
|
|
|
|
{
|
2017-03-08 17:47:52 +00:00
|
|
|
uint8_t offset;
|
|
|
|
uint8_t size;
|
2016-03-01 15:47:10 +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];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct gameborder_t
|
|
|
|
{
|
2017-03-08 17:47:52 +00:00
|
|
|
uint8_t offset;
|
|
|
|
uint8_t size;
|
2016-03-01 15:47:10 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FGIFont
|
|
|
|
{
|
|
|
|
FName fontname;
|
|
|
|
FName color;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct gameinfo_t
|
|
|
|
{
|
|
|
|
int flags;
|
|
|
|
EGameType gametype;
|
|
|
|
FString ConfigName;
|
|
|
|
|
|
|
|
FString TitlePage;
|
|
|
|
bool drawreadthis;
|
|
|
|
bool noloopfinalemusic;
|
|
|
|
bool intermissioncounter;
|
|
|
|
bool nightmarefast;
|
|
|
|
bool swapmenu;
|
|
|
|
bool dontcrunchcorpses;
|
2017-08-12 08:20:34 +00:00
|
|
|
bool correctprintbold;
|
2019-02-23 09:40:07 +00:00
|
|
|
bool forcetextinmenus;
|
2019-03-17 08:27:07 +00:00
|
|
|
bool forcenogfxsubstitution;
|
2016-03-01 15:47:10 +00:00
|
|
|
TArray<FName> creditPages;
|
|
|
|
TArray<FName> finalePages;
|
|
|
|
TArray<FName> infoPages;
|
|
|
|
TArray<FName> DefaultWeaponSlots[10];
|
|
|
|
TArray<FName> PlayerClasses;
|
|
|
|
|
2017-01-10 00:00:06 +00:00
|
|
|
TArray<FName> PrecachedClasses;
|
|
|
|
TArray<FString> PrecachedTextures;
|
2017-03-09 22:30:42 +00:00
|
|
|
TArray<int> PrecachedSounds;
|
2017-01-22 07:58:48 +00:00
|
|
|
TArray<FString> EventHandlers;
|
2017-01-10 00:00:06 +00:00
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
FString titleMusic;
|
|
|
|
int titleOrder;
|
|
|
|
float titleTime;
|
|
|
|
float advisoryTime;
|
|
|
|
float pageTime;
|
|
|
|
FString chatSound;
|
|
|
|
FString finaleMusic;
|
|
|
|
int finaleOrder;
|
|
|
|
FString FinaleFlat;
|
|
|
|
FString BorderFlat;
|
|
|
|
FString SkyFlatName;
|
|
|
|
FString ArmorIcon1;
|
|
|
|
FString ArmorIcon2;
|
|
|
|
FString PauseSign;
|
|
|
|
FString Endoom;
|
2016-03-22 15:35:41 +00:00
|
|
|
double Armor2Percent;
|
2016-03-01 15:47:10 +00:00
|
|
|
FString quitSound;
|
|
|
|
gameborder_t Border;
|
2016-03-22 11:42:27 +00:00
|
|
|
double telefogheight;
|
2016-03-01 15:47:10 +00:00
|
|
|
int defKickback;
|
|
|
|
FString translator;
|
2017-03-08 17:47:52 +00:00
|
|
|
uint32_t defaultbloodcolor;
|
|
|
|
uint32_t defaultbloodparticlecolor;
|
2016-03-01 15:47:10 +00:00
|
|
|
FString statusbar;
|
2017-03-25 17:31:53 +00:00
|
|
|
int statusbarfile = -1;
|
|
|
|
FName statusbarclass;
|
|
|
|
int statusbarclassfile = -1;
|
2017-04-14 21:28:54 +00:00
|
|
|
FName MessageBoxClass;
|
2017-03-25 17:31:53 +00:00
|
|
|
FName backpacktype;
|
2016-03-01 15:47:10 +00:00
|
|
|
FString intermissionMusic;
|
|
|
|
int intermissionOrder;
|
|
|
|
FString CursorPic;
|
2017-03-08 17:47:52 +00:00
|
|
|
uint32_t dimcolor;
|
2016-03-01 15:47:10 +00:00
|
|
|
float dimamount;
|
2017-03-14 23:11:13 +00:00
|
|
|
float bluramount;
|
2016-03-01 15:47:10 +00:00
|
|
|
int definventorymaxamount;
|
|
|
|
int defaultrespawntime;
|
|
|
|
int defaultdropstyle;
|
2017-03-08 17:47:52 +00:00
|
|
|
uint32_t pickupcolor;
|
2016-03-01 15:47:10 +00:00
|
|
|
TArray<FString> quitmessages;
|
|
|
|
FName mTitleColor;
|
|
|
|
FName mFontColor;
|
|
|
|
FName mFontColorValue;
|
|
|
|
FName mFontColorMore;
|
|
|
|
FName mFontColorHeader;
|
|
|
|
FName mFontColorHighlight;
|
|
|
|
FName mFontColorSelection;
|
2017-10-14 17:05:15 +00:00
|
|
|
FName mSliderColor;
|
2016-03-01 15:47:10 +00:00
|
|
|
FString mBackButton;
|
2016-03-26 08:28:00 +00:00
|
|
|
double gibfactor;
|
2016-03-01 15:47:10 +00:00
|
|
|
int TextScreenX;
|
|
|
|
int TextScreenY;
|
2017-02-19 13:21:49 +00:00
|
|
|
FName DefaultConversationMenuClass;
|
2016-03-01 15:47:10 +00:00
|
|
|
FName DefaultEndSequence;
|
|
|
|
FString mMapArrow, mCheatMapArrow;
|
|
|
|
FString mEasyKey, mCheatKey;
|
2017-02-26 16:22:02 +00:00
|
|
|
FString Dialogue;
|
2016-03-01 15:47:10 +00:00
|
|
|
FGIFont mStatscreenMapNameFont;
|
|
|
|
FGIFont mStatscreenFinishedFont;
|
|
|
|
FGIFont mStatscreenEnteringFont;
|
2019-07-14 07:08:19 +00:00
|
|
|
FGIFont mStatscreenContentFont;
|
2016-03-01 15:47:10 +00:00
|
|
|
bool norandomplayerclass;
|
2016-07-23 08:21:04 +00:00
|
|
|
bool forcekillscripts;
|
2017-03-18 20:19:32 +00:00
|
|
|
FName statusscreen_single;
|
|
|
|
FName statusscreen_coop;
|
|
|
|
FName statusscreen_dm;
|
2018-12-02 13:03:03 +00:00
|
|
|
int healthpic; // These get filled in from ALTHUDCF
|
|
|
|
int berserkpic;
|
2019-01-05 07:48:57 +00:00
|
|
|
double normforwardmove[2];
|
|
|
|
double normsidemove[2];
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
const char *GetFinalePage(unsigned int num) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern gameinfo_t gameinfo;
|
|
|
|
|
|
|
|
inline const char *GameTypeName()
|
|
|
|
{
|
|
|
|
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]);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //__GI_H__
|