Merge branch 'master' into vulkan2

This commit is contained in:
Christoph Oelckers 2019-03-03 00:04:19 +01:00
commit 6ba8fee5c2
112 changed files with 301 additions and 99 deletions

View file

@ -2581,7 +2581,8 @@ void D_DoomMain (void)
};
for (p = 0; p < 5; ++p)
{
const char *str = GStrings[startupString[p]];
// At this point we cannot use the player's gender info yet so force 'male' here.
const char *str = GStrings.GetString(startupString[p], nullptr, 0);
if (str != NULL && str[0] != '\0')
{
Printf("%s\n", str);

View file

@ -278,7 +278,7 @@ void EventManager::WorldLoaded()
{
for (DStaticEventHandler* handler = FirstEventHandler; handler; handler = handler->next)
{
if (savegamerestore) continue; // don't execute WorldLoaded for handlers loaded from the savegame.
if (!handler->IsStatic() && savegamerestore) continue; // don't execute WorldLoaded for handlers loaded from the savegame.
handler->WorldLoaded();
}
}

View file

@ -94,6 +94,7 @@ CUSTOM_CVAR (Int, cl_maxdecals, 1024, CVAR_ARCHIVE|CVAR_NOINITCALL)
if (thinker != NULL)
{
thinker->Destroy();
Level->ImpactDecalCount--;
}
}
}

View file

@ -1530,7 +1530,7 @@ FLevelLocals::FLevelLocals() : Behaviors(this), tagManager(this)
{
Players[i] = &players[i];
}
localEventManager = new EventManager;
localEventManager = new EventManager(this);
}
FLevelLocals::~FLevelLocals()

View file

@ -539,7 +539,7 @@ void FDynamicLight::CollectWithinRadius(const DVector3 &opos, FSection *section,
bool hitonesidedback = false;
for (unsigned i = 0; i < collected_ss.Size(); i++)
{
auto &pos = collected_ss[i].pos;
auto pos = collected_ss[i].pos;
section = collected_ss[i].sect;
touching_sector = AddLightNode(&section->lighthead, section, this, touching_sector);

View file

@ -2164,13 +2164,14 @@ static int PatchMusic (int dummy)
while ((result = GetLine()) == 1)
{
const char *newname = skipwhite (Line2);
FString newname = skipwhite (Line2);
FString keystring;
keystring << "MUSIC_" << Line1;
DehStrings.Insert(keystring, newname);
DPrintf (DMSG_SPAMMY, "Music %s set to:\n%s\n", keystring.GetChars(), newname);
TableElement te = { newname, newname, newname, newname };
DehStrings.Insert(keystring, te);
DPrintf (DMSG_SPAMMY, "Music %s set to:\n%s\n", keystring.GetChars(), newname.GetChars());
}
return result;
@ -2283,7 +2284,9 @@ static int PatchText (int oldSize)
str = EnglishStrings.MatchString(oldStr);
if (str != NULL)
{
DehStrings.Insert(str, newStr);
FString newname = newStr;
TableElement te = { newname, newname, newname, newname };
DehStrings.Insert(str, te);
EnglishStrings.Remove(str); // remove entry so that it won't get found again by the next iteration or by another replacement later
good = true;
}
@ -2337,7 +2340,8 @@ static int PatchStrings (int dummy)
// Account for a discrepancy between Boom's and ZDoom's name for the red skull key pickup message
const char *ll = Line1;
if (!stricmp(ll, "GOTREDSKULL")) ll = "GOTREDSKUL";
DehStrings.Insert(ll, holdstring);
TableElement te = { holdstring, holdstring, holdstring, holdstring };
DehStrings.Insert(ll, te);
DPrintf (DMSG_SPAMMY, "%s set to:\n%s\n", Line1, holdstring.GetChars());
}

View file

@ -185,6 +185,7 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla
if (FixedWidth > 0)
{
ReadSheetFont(folderdata, FixedWidth, FontHeight, Scale);
Type = Folder;
}
else
{
@ -211,6 +212,7 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla
}
if (lump.isValid())
{
Type = Multilump;
if (position < minchar) minchar = position;
if (position > maxchar) maxchar = position;
charMap.Insert(position, TexMan.GetTexture(lump));
@ -235,6 +237,7 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla
auto tex = TexMan.GetTexture(lump);
tex->SetScale(Scale);
charMap.Insert((int)position, tex);
Type = Folder;
}
}
}

View file

@ -131,6 +131,7 @@ FSingleLumpFont::FSingleLumpFont (const char *name, int lump) : FFont(lump)
if (data[0] == 0xE1 && data[1] == 0xE6 && data[2] == 0xD5 && data[3] == 0x1A)
{
LoadBMF(lump, data);
Type = BMF;
}
else if (data[0] != 'F' || data[1] != 'O' || data[2] != 'N' ||
(data[3] != '1' && data[3] != '2'))
@ -143,10 +144,12 @@ FSingleLumpFont::FSingleLumpFont (const char *name, int lump) : FFont(lump)
{
case '1':
LoadFON1 (lump, data);
Type = Fon1;
break;
case '2':
LoadFON2 (lump, data);
Type = Fon2;
break;
}
}

View file

@ -859,6 +859,12 @@ FFont *V_GetFont(const char *name, const char *fontlumpname)
FFont *font = FFont::FindFont (name);
if (font == nullptr)
{
if (!stricmp(name, "BIGUPPER"))
{
font = FFont::FindFont("BIGFONT");
if (font) return font;
}
int lump = -1;
int folderfile = -1;
@ -1446,6 +1452,10 @@ void V_InitFonts()
SmallFont2 = new FFont("SmallFont2", "STBFN%.3d", "defsmallfont2", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1);
}
}
//This must be read before BigFont so that it can be properly substituted.
BigUpper = V_GetFont("BigUpper");
if (!(BigFont = V_GetFont("BigFont")))
{
if (gameinfo.gametype & GAME_Raven)
@ -1453,7 +1463,15 @@ void V_InitFonts()
BigFont = new FFont("BigFont", "FONTB%02u", "defbigfont", HU_FONTSTART, HU_FONTSIZE, 1, -1);
}
}
if (!(BigUpper = V_GetFont("BigUpper")))
// let PWAD BIGFONTs override the stock BIGUPPER font. (This check needs to be made smarter.)
if (BigUpper && BigFont->Type != FFont::Folder && BigUpper->Type == FFont::Folder)
{
delete BigUpper;
BigUpper = BigFont;
}
if (BigUpper == nullptr)
{
BigUpper = BigFont;
}

View file

@ -81,6 +81,18 @@ extern int NumTextColors;
class FFont
{
public:
enum EFontType
{
Unknown,
Folder,
Multilump,
Fon1,
Fon2,
BMF,
Custom
};
FFont (const char *fontname, const char *nametemplate, const char *filetemplate, int first, int count, int base, int fdlump, int spacewidth=-1, bool notranslate = false);
virtual ~FFont ();
@ -119,6 +131,7 @@ protected:
void ReadSheetFont(TArray<FolderEntry> &folderdata, int width, int height, const DVector2 &Scale);
EFontType Type = EFontType::Unknown;
int FirstChar, LastChar;
int SpaceWidth;
int FontHeight;
@ -147,6 +160,7 @@ protected:
friend struct FontsDeleter;
friend void V_ClearFonts();
friend void V_InitFonts();
};

View file

@ -42,9 +42,16 @@
#include "c_dispatch.h"
#include "v_text.h"
#include "gi.h"
#include "d_player.h"
#include "xlsxread/xlsxio_read.h"
//==========================================================================
//
//
//
//==========================================================================
void FStringTable::LoadStrings ()
{
int lastlump, lump;
@ -58,8 +65,14 @@ void FStringTable::LoadStrings ()
}
SetLanguageIDs();
UpdateLanguage();
allMacros.Clear();
}
//==========================================================================
//
//
//
//==========================================================================
bool FStringTable::LoadLanguageFromSpreadsheet(int lumpnum)
{
@ -69,14 +82,60 @@ bool FStringTable::LoadLanguageFromSpreadsheet(int lumpnum)
{
return false;
}
if (!readSheetIntoTable(xlsxio, "Sheet1")) return false;
// readMacros(xlsxio, "macros");
readMacros(xlsxio, "macros");
readSheetIntoTable(xlsxio, "strings");
xlsxioread_close(xlsxio);
return true;
}
//==========================================================================
//
//
//
//==========================================================================
bool FStringTable::readMacros(xlsxioreader reader, const char *sheetname)
{
xlsxioreadersheet sheet = xlsxioread_sheet_open(reader, sheetname, XLSXIOREAD_SKIP_NONE);
if (sheet == nullptr) return false;
while (xlsxioread_sheet_next_row(sheet))
{
auto macroname = xlsxioread_sheet_next_cell(sheet);
auto language = xlsxioread_sheet_next_cell(sheet);
if (!macroname || !language) continue;
FStringf combined_name("%s/%s", language, macroname);
free(language);
free(macroname);
FName name = combined_name;
StringMacro macro;
char *value;
for (int i = 0; i < 4; i++)
{
value = xlsxioread_sheet_next_cell(sheet);
macro.Replacements[i] = value;
free(value);
}
// This is needed because the reader code would choke on incompletely read rows.
while ((value = xlsxioread_sheet_next_cell(sheet)) != nullptr)
{
free(value);
}
allMacros.Insert(name, macro);
}
xlsxioread_sheet_close(sheet);
return true;
}
//==========================================================================
//
//
//
//==========================================================================
bool FStringTable::readSheetIntoTable(xlsxioreader reader, const char *sheetname)
{
@ -94,7 +153,7 @@ bool FStringTable::readSheetIntoTable(xlsxioreader reader, const char *sheetname
while ((value = xlsxioread_sheet_next_cell(sheet)) != nullptr)
{
auto vcopy = value;
if (table.Size() <= row) table.Reserve(1);
if (table.Size() <= (unsigned)row) table.Reserve(1);
while (*vcopy && iswspace((unsigned char)*vcopy)) vcopy++; // skip over leaading whitespace;
auto vend = vcopy + strlen(vcopy);
while (vend > vcopy && iswspace((unsigned char)vend[-1])) *--vend = 0; // skip over trailing whitespace
@ -105,67 +164,74 @@ bool FStringTable::readSheetIntoTable(xlsxioreader reader, const char *sheetname
}
row++;
}
xlsxioread_sheet_close(sheet);
int labelcol = -1;
int filtercol = -1;
TArray<std::pair<int, unsigned>> langrows;
for (unsigned column = 0; column < table[0].Size(); column++)
if (table.Size() > 0)
{
auto &entry = table[0][column];
if (entry.CompareNoCase("filter") == 0)
for (unsigned column = 0; column < table[0].Size(); column++)
{
filtercol = column;
}
else if (entry.CompareNoCase("identifier") == 0)
{
labelcol = column;;
}
else
{
auto languages = entry.Split(" ", FString::TOK_SKIPEMPTY);
for (auto &lang : languages)
auto &entry = table[0][column];
if (entry.CompareNoCase("filter") == 0)
{
if (lang.CompareNoCase("default") == 0)
filtercol = column;
}
else if (entry.CompareNoCase("identifier") == 0)
{
labelcol = column;;
}
else
{
auto languages = entry.Split(" ", FString::TOK_SKIPEMPTY);
for (auto &lang : languages)
{
langrows.Push(std::make_pair(column, default_table));
if (lang.CompareNoCase("default") == 0)
{
langrows.Push(std::make_pair(column, default_table));
}
else if (lang.Len() < 4)
{
lang.ToLower();
langrows.Push(std::make_pair(column, MAKE_ID(lang[0], lang[1], lang[2], 0)));
}
}
else if (lang.Len() < 4)
}
}
for (unsigned i = 1; i < table.Size(); i++)
{
auto &row = table[i];
if (filtercol > -1)
{
auto filterstr = row[filtercol];
auto filter = filterstr.Split(" ", FString::TOK_SKIPEMPTY);
if (filter.Size() > 0 && filter.FindEx([](const auto &str) { return str.CompareNoCase(GameNames[gameinfo.gametype]) == 0; }) == filter.Size())
continue;
}
FName strName = row[labelcol];
for (auto &langentry : langrows)
{
auto str = row[langentry.first];
if (str.Len() > 0)
{
lang.ToLower();
langrows.Push(std::make_pair(column, MAKE_ID(lang[0], lang[1], lang[2], 0)));
InsertString(langentry.second, strName, str);
}
}
}
}
for (unsigned i = 1; i < table.Size(); i++)
{
auto &row = table[i];
if (filtercol > -1)
{
auto filterstr = row[filtercol];
auto filter = filterstr.Split(" ", FString::TOK_SKIPEMPTY);
if (filter.Size() > 0 && filter.FindEx([](const auto &str) { return str.CompareNoCase(GameNames[gameinfo.gametype]) == 0; }) == filter.Size())
continue;
}
FName strName = row[labelcol];
for (auto &langentry : langrows)
{
auto str = row[langentry.first];
if (str.Len() > 0)
{
allStrings[langentry.second].Insert(strName, str);
str.Substitute("\n", "|");
Printf(PRINT_LOG, "Setting %s for %s to %.40s\n\n", strName.GetChars(), &langentry.second, str.GetChars());
}
}
}
xlsxioread_sheet_close(sheet);
return true;
}
//==========================================================================
//
//
//
//==========================================================================
void FStringTable::LoadLanguage (int lumpnum)
{
bool errordone = false;
@ -262,13 +328,52 @@ void FStringTable::LoadLanguage (int lumpnum)
// Insert the string into all relevant tables.
for (auto map : activeMaps)
{
allStrings[map].Insert(strName, strText);
InsertString(map, strName, strText);
}
}
}
}
}
//==========================================================================
//
//
//
//==========================================================================
void FStringTable::InsertString(int langid, FName label, const FString &string)
{
const char *strlangid = (const char *)&langid;
TableElement te = { string, string, string, string };
long index;
while ((index = te.strings[0].IndexOf("@[")) >= 0)
{
auto endindex = te.strings[0].IndexOf(']', index);
if (endindex == -1)
{
Printf("Bad macro in %s : %s\n", strlangid, label.GetChars());
break;
}
FString macroname(string.GetChars() + index + 2, endindex - index - 2);
FStringf lookupstr("%s/%s", strlangid, macroname.GetChars());
FStringf replacee("@[%s]", macroname.GetChars());
FName lookupname(lookupstr, true);
auto replace = allMacros.CheckKey(lookupname);
for (int i = 0; i < 4; i++)
{
const char *replacement = replace && replace->Replacements[i] ? replace->Replacements[i] : "";
te.strings[i].Substitute(replacee, replacement);
}
}
allStrings[langid].Insert(label, te);
}
//==========================================================================
//
//
//
//==========================================================================
void FStringTable::UpdateLanguage()
{
currentLanguageSet.Clear();
@ -290,7 +395,12 @@ void FStringTable::UpdateLanguage()
checkone(default_table);
}
//==========================================================================
//
// Replace \ escape sequences in a string with the escaped characters.
//
//==========================================================================
size_t FStringTable::ProcessEscapes (char *iptr)
{
char *sptr = iptr, *optr = iptr, c;
@ -317,10 +427,15 @@ size_t FStringTable::ProcessEscapes (char *iptr)
return optr - sptr;
}
//==========================================================================
//
// Checks if the given key exists in any one of the default string tables that are valid for all languages.
// To replace IWAD content this condition must be true.
//
//==========================================================================
bool FStringTable::exists(const char *name)
{
// Checks if the given key exists in any one of the default string tables that are valid for all languages.
// To replace IWAD content this condition must be true.
if (name == nullptr || *name == 0)
{
return false;
@ -343,13 +458,20 @@ bool FStringTable::exists(const char *name)
return false;
}
//==========================================================================
//
// Finds a string by name and returns its value
const char *FStringTable::GetString(const char *name, uint32_t *langtable) const
//
//==========================================================================
const char *FStringTable::GetString(const char *name, uint32_t *langtable, int gender) const
{
if (name == nullptr || *name == 0)
{
return nullptr;
}
if (gender == -1) gender = players[consoleplayer].userinfo.GetGender();
if (gender < 0 || gender > 3) gender = 0;
FName nm(name, true);
if (nm != NAME_None)
{
@ -359,20 +481,27 @@ const char *FStringTable::GetString(const char *name, uint32_t *langtable) const
if (item)
{
if (langtable) *langtable = map.first;
return item->GetChars();
return item->strings[gender].GetChars();
}
}
}
return nullptr;
}
//==========================================================================
//
// Finds a string by name in a given language
const char *FStringTable::GetLanguageString(const char *name, uint32_t langtable) const
//
//==========================================================================
const char *FStringTable::GetLanguageString(const char *name, uint32_t langtable, int gender) const
{
if (name == nullptr || *name == 0)
{
return nullptr;
}
if (gender == -1) gender = players[consoleplayer].userinfo.GetGender();
if (gender < 0 || gender > 3) gender = 0;
FName nm(name, true);
if (nm != NAME_None)
{
@ -381,14 +510,19 @@ const char *FStringTable::GetLanguageString(const char *name, uint32_t langtable
auto item = map->CheckKey(nm);
if (item)
{
return item->GetChars();
return item->strings[gender].GetChars();
}
}
return nullptr;
}
//==========================================================================
//
// Finds a string by name and returns its value. If the string does
// not exist, returns the passed name instead.
//
//==========================================================================
const char *FStringTable::operator() (const char *name) const
{
const char *str = operator[] (name);
@ -396,7 +530,14 @@ const char *FStringTable::operator() (const char *name) const
}
//==========================================================================
//
// Find a string with the same exact text. Returns its name.
// This does not need to check genders, it is only used by
// Dehacked on the English table for finding stock strings.
//
//==========================================================================
const char *StringMap::MatchString (const char *string) const
{
StringMap::ConstIterator it(*this);
@ -404,7 +545,7 @@ const char *StringMap::MatchString (const char *string) const
while (it.NextPair(pair))
{
if (pair->Value.CompareNoCase(string) == 0)
if (pair->Value.strings[0].CompareNoCase(string) == 0)
{
return pair->Key.GetChars();
}

View file

@ -47,14 +47,25 @@
#include "doomdef.h"
#include "doomtype.h"
struct TableElement
{
FString strings[4];
};
// This public interface is for Dehacked
class StringMap : public TMap<FName, FString>
class StringMap : public TMap<FName, TableElement>
{
public:
const char *MatchString(const char *string) const;
};
struct StringMacro
{
FString Replacements[4];
};
class FStringTable
{
public:
@ -66,6 +77,7 @@ public:
};
using LangMap = TMap<uint32_t, StringMap>;
using StringMacroMap = TMap<FName, StringMacro>;
void LoadStrings ();
void UpdateLanguage();
@ -76,8 +88,8 @@ public:
UpdateLanguage();
}
const char *GetLanguageString(const char *name, uint32_t langtable) const;
const char *GetString(const char *name, uint32_t *langtable) const;
const char *GetLanguageString(const char *name, uint32_t langtable, int gender = -1) const;
const char *GetString(const char *name, uint32_t *langtable, int gender = -1) const;
const char *operator() (const char *name) const; // Never returns NULL
const char *operator[] (const char *name) const
{
@ -87,12 +99,15 @@ public:
private:
StringMacroMap allMacros;
LangMap allStrings;
TArray<std::pair<uint32_t, StringMap*>> currentLanguageSet;
void LoadLanguage (int lumpnum);
bool LoadLanguageFromSpreadsheet(int lumpnum);
bool readMacros(struct xlsxio_read_struct *reader, const char *sheet);
bool readSheetIntoTable(struct xlsxio_read_struct *reader, const char *sheet);
void InsertString(int langid, FName label, const FString &string);
static size_t ProcessEscapes (char *str);
};

View file

@ -9,6 +9,7 @@
#include "r_data/r_translate.h"
#include "c_cvars.h"
#include "v_font.h"
#include "gi.h"
#include "textures/textures.h"
EXTERN_CVAR(Float, snd_menuvolume)
@ -207,6 +208,8 @@ public:
mScrollTop = 0;
mIndent = 0;
mDontDim = 0;
mFont = gameinfo.gametype == GAME_Doom ? BigUpper : BigFont;
}
size_t PropagateMark() override;
~DOptionMenuDescriptor()

View file

@ -948,6 +948,7 @@ static void ParseOptionMenu(FScanner &sc)
sc.MustGetString();
DOptionMenuDescriptor *desc = Create<DOptionMenuDescriptor>();
desc->mFont = gameinfo.gametype == GAME_Doom ? BigUpper : BigFont;
desc->mMenuName = sc.String;
desc->mSelectedItem = -1;
desc->mScrollPos = 0;
@ -1303,6 +1304,7 @@ static void BuildPlayerclassMenu()
DOptionMenuDescriptor *od = Create<DOptionMenuDescriptor>();
MenuDescriptors[NAME_Playerclassmenu] = od;
od->mMenuName = NAME_Playerclassmenu;
od->mFont = gameinfo.gametype == GAME_Doom ? BigUpper : BigFont;
od->mTitle = "$MNU_CHOOSECLASS";
od->mSelectedItem = 0;
od->mScrollPos = 0;
@ -1683,6 +1685,7 @@ fail:
od = Create<DOptionMenuDescriptor>();
MenuDescriptors[NAME_Skillmenu] = od;
od->mMenuName = NAME_Skillmenu;
od->mFont = gameinfo.gametype == GAME_Doom ? BigUpper : BigFont;
od->mTitle = "$MNU_CHOOSESKILL";
od->mSelectedItem = defindex;
od->mScrollPos = 0;

View file

@ -8869,7 +8869,7 @@ scriptwait:
case PCD_LOCALAMBIENTSOUND:
lookup = Level->Behaviors.LookupString (STACK(2));
if (lookup != NULL && activator->CheckLocalView())
if (lookup != NULL && activator && activator->CheckLocalView())
{
S_Sound (CHAN_AUTO,
lookup,

View file

@ -261,12 +261,12 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
if (message != NULL && message[0] == '$')
{
message = GStrings[message+1];
message = GStrings.GetString(message+1, nullptr, self->player->userinfo.GetGender());
}
if (message == NULL)
{
message = GStrings("OB_DEFAULT");
message = GStrings.GetString("OB_DEFAULT", nullptr, self->player->userinfo.GetGender());
}
// [CK] Don't display empty strings

View file

@ -557,6 +557,9 @@ void P_PlayerStartStomp(AActor *actor, bool mononly)
if (th->player == NULL && !(th->flags3 & MF3_ISMONSTER))
continue;
if ((th->flags6 & MF6_NOTELEFRAG) && !(th->flags7 & MF7_ALWAYSTELEFRAG))
continue;
if (th->player != NULL && mononly)
continue;

View file

@ -7396,5 +7396,7 @@ void PrintMiscActorInfo(AActor *query)
Printf("FriendlySeeBlocks: %d\n", query->friendlyseeblocks);
Printf("Target: %s\n", query->target ? query->target->GetClass()->TypeName.GetChars() : "-");
Printf("Last enemy: %s\n", query->lastenemy ? query->lastenemy->GetClass()->TypeName.GetChars() : "-");
auto sn = FState::StaticGetStateName(query->state);
Printf("State:%s, Tics: %d", sn.GetChars(), query->tics);
}
}

View file

@ -1490,7 +1490,7 @@ sfxinfo_t *S_LoadSound(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
DPrintf(DMSG_NOTIFY, "Loading sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]);
int size = Wads.LumpLength(sfx->lumpnum);
if (size > 0)
if (size > 8)
{
auto wlump = Wads.OpenLumpReader(sfx->lumpnum);
auto sfxdata = wlump.Read(size);
@ -1556,7 +1556,7 @@ static void S_LoadSound3D(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
else
{
int size = Wads.LumpLength(sfx->lumpnum);
if (size <= 0) return;
if (size <= 8) return;
auto wlump = Wads.OpenLumpReader(sfx->lumpnum);
auto sfxdata = wlump.Read(size);

View file

@ -63,7 +63,7 @@ void zip_close(zip_t *zipfile)
zip_file_t *zip_fopen(zip_t *zipfile, const char *filename)
{
if (!zipfile) return NULL;
if (!zipfile || !filename) return NULL;
auto lump = zipfile->FindLump(filename);
if (!lump) return NULL;
return new FileReader(std::move(lump->NewReader()));

View file

@ -378,8 +378,6 @@ OptionMenu "OptionsMenu" protected
Submenu "$OPTMNU_DISPLAY", "VideoOptions"
Submenu "$OPTMNU_VIDEO", "VideoModeMenu"
StaticText " "
Option "$OPTMNU_LANGUAGE", "language", "LanguageOptions"
StaticText " "
SafeCommand "$OPTMNU_DEFAULTS", "reset2defaults"
SafeCommand "$OPTMNU_RESETTOSAVED", "reset2saved"
Command "$OPTMNU_CONSOLE", "menuconsole"
@ -419,12 +417,12 @@ ListMenu "PlayerMenu"
IfGame(Doom, Heretic, Strife, Chex)
{
MouseWindow 0, 220
PlayerDisplay 220, 80, "20 00 00", "80 00 40", 1, "PlayerDisplay"
PlayerDisplay 220, 48, "20 00 00", "80 00 40", 1, "PlayerDisplay"
}
IfGame(Hexen)
{
MouseWindow 0, 220
PlayerDisplay 220, 80, "00 07 00", "40 53 40", 1, "PlayerDisplay"
PlayerDisplay 220, 48, "00 07 00", "40 53 40", 1, "PlayerDisplay"
}
ValueText "$PLYRMNU_TEAM", "Team"
@ -453,25 +451,12 @@ OptionMenu "CustomizeControls" protected
{
Title "$CNTRLMNU_TITLE"
StaticText ""
Submenu "$CNTRLMNU_ACTION" , "ActionControlsMenu"
StaticText ""
Submenu "$CNTRLMNU_CHAT" , "ChatControlsMenu"
StaticText ""
Submenu "$CNTRLMNU_WEAPONS" , "WeaponsControlMenu"
StaticText ""
Submenu "$CNTRLMNU_INVENTORY" , "InventoryControlsMenu"
StaticText ""
Submenu "$CNTRLMNU_OTHER" , "OtherControlsMenu"
StaticText ""
Submenu "$CNTRLMNU_POPUPS" , "StrifeControlsMenu"
StaticText ""
Submenu "$MAPCNTRLMNU_CONTROLS" , "MapControlsMenu"
}
@ -912,9 +897,6 @@ OptionMenu "VideoOptions" protected
Option "$DSPLYMNU_NOMONSTERINTERPOLATION", "nomonsterinterpolation", "NoYes"
Slider "$DSPLYMNU_MENUDIM", "dimamount", 0, 1.0, 0.05, 2
ColorPicker "$DSPLYMNU_DIMCOLOR", "dimcolor"
Slider "$DSPLYMNU_MOVEBOB", "movebob", 0, 1.0, 0.05, 2
Slider "$DSPLYMNU_STILLBOB", "stillbob", 0, 1.0, 0.05, 2
Slider "$DSPLYMNU_BOBSPEED", "wbobspeed", 0, 2.0, 0.1
IfOption(Windows)
{
StaticText " "
@ -1005,6 +987,11 @@ OptionMenu "HUDOptions" protected
Option "$HUDMNU_POISONFLASHES", "pf_poison", "ZDoomHexen"
Option "$HUDMNU_ICEFLASHES", "pf_ice", "ZDoomHexen"
Option "$HUDMNU_HAZARDFLASHES", "pf_hazard", "ZDoomStrife"
StaticText " "
Slider "$DSPLYMNU_MOVEBOB", "movebob", 0, 1.0, 0.05, 2
Slider "$DSPLYMNU_STILLBOB", "stillbob", 0, 1.0, 0.05, 2
Slider "$DSPLYMNU_BOBSPEED", "wbobspeed", 0, 2.0, 0.1
}
OptionMenu "ScalingOptions" protected
@ -1149,6 +1136,8 @@ OptionMenu "MiscOptions" protected
Option "$MISCMNU_CACHENODES", "gl_cachenodes", "OnOff"
Slider "$MISCMNU_CACHETIME", "gl_cachetime", 0.0, 2.0, 0.1
SafeCommand "$MISCMNU_CLEARNODECACHE", "clearnodecache"
StaticText " "
Option "$OPTMNU_LANGUAGE", "language", "LanguageOptions"
}
//-------------------------------------------------------------------------------------------

View file

@ -562,6 +562,7 @@ class MorphedMonster : Actor
unmorphed.args[3] = args[3];
unmorphed.args[4] = args[4];
unmorphed.CopyFriendliness (self, true);
unmorphed.bUnmorphed = false;
UnmorphedMe = NULL;
Substitute(unmorphed);
Destroy ();

View file

@ -228,6 +228,7 @@ class LoadSaveMenu : ListMenu
}
screen.SetClipRect(listboxLeft, listboxTop+rowHeight*i, listboxRight, listboxTop+rowHeight*(i+1));
int fontoffset = -CleanYFac;
if (j == Selected)
{
@ -235,19 +236,19 @@ class LoadSaveMenu : ListMenu
didSeeSelected = true;
if (!mEntering)
{
screen.DrawText (ConFont, colr, listboxLeft+1, listboxTop+rowHeight*i+CleanYfac, node.SaveTitle, DTA_CleanNoMove, true);
screen.DrawText (ConFont, colr, listboxLeft+1, listboxTop+rowHeight*i+CleanYfac + fontoffset, node.SaveTitle, DTA_CleanNoMove, true);
}
else
{
String s = mInput.GetText() .. ConFont.GetCursor();
int length = ConFont.StringWidth(s) * CleanXFac;
int displacement = min(0, listboxWidth - 2 - length);
screen.DrawText (ConFont, Font.CR_WHITE, listboxLeft + 1 + displacement, listboxTop+rowHeight*i+CleanYfac, s, DTA_CleanNoMove, true);
screen.DrawText (ConFont, Font.CR_WHITE, listboxLeft + 1 + displacement, listboxTop+rowHeight*i+CleanYfac + fontoffset, s, DTA_CleanNoMove, true);
}
}
else
{
screen.DrawText (ConFont, colr, listboxLeft+1, listboxTop+rowHeight*i+CleanYfac, node.SaveTitle, DTA_CleanNoMove, true);
screen.DrawText (ConFont, colr, listboxLeft+1, listboxTop+rowHeight*i+CleanYfac + fontoffset, node.SaveTitle, DTA_CleanNoMove, true);
}
screen.ClearClipRect();
j++;

View file

@ -586,9 +586,9 @@ class PlayerMenu : ListMenu
{
Super.Drawer();
String str = Stringtable.Localize("$PLYRMNU_PRESSSPACE");
screen.DrawText (SmallFont, Font.CR_GOLD, 320 - 32 - 32 - SmallFont.StringWidth (str)/2, 50 + 48 + 70, str, DTA_Clean, true);
screen.DrawText (SmallFont, Font.CR_GOLD, 320 - 32 - 32 - SmallFont.StringWidth (str)/2, 130, str, DTA_Clean, true);
str = Stringtable.Localize(mRotation ? "$PLYRMNU_SEEFRONT" : "$PLYRMNU_SEEBACK");
screen.DrawText (SmallFont, Font.CR_GOLD, 320 - 32 - 32 - SmallFont.StringWidth (str)/2, 50 + 48 + 70 + SmallFont.GetHeight (), str, DTA_Clean, true);
screen.DrawText (SmallFont, Font.CR_GOLD, 320 - 32 - 32 - SmallFont.StringWidth (str)/2, 130 + SmallFont.GetHeight (), str, DTA_Clean, true);
}

Some files were not shown because too many files have changed in this diff Show more