mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
yet even more GetChars calls added.
This commit is contained in:
parent
c94c63110e
commit
7a5a2858a2
46 changed files with 190 additions and 190 deletions
|
@ -68,7 +68,7 @@ std::pair<FileReader, FString> FSoundFontReader::LookupFile(const char *name)
|
|||
for(int i = mPaths.Size()-1; i>=0; i--)
|
||||
{
|
||||
FString fullname = mPaths[i] + name;
|
||||
auto fr = OpenFile(fullname);
|
||||
auto fr = OpenFile(fullname.GetChars());
|
||||
if (fr.isOpen()) return std::make_pair(std::move(fr), fullname);
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ void FSoundFontReader::AddPath(const char *strp)
|
|||
if (str.Back() != '/') str += '/'; // always let it end with a slash.
|
||||
for (auto &s : mPaths)
|
||||
{
|
||||
if (pathcmp(s.GetChars(), str) == 0)
|
||||
if (pathcmp(s.GetChars(), str.GetChars()) == 0)
|
||||
{
|
||||
// move string to the back.
|
||||
mPaths.Delete(i);
|
||||
|
@ -122,13 +122,13 @@ FileReader FSoundFontReader::Open(const char *name, std::string& filename)
|
|||
if (name == nullptr)
|
||||
{
|
||||
fr = OpenMainConfigFile();
|
||||
filename = MainConfigFileName();
|
||||
filename = MainConfigFileName().GetChars();
|
||||
}
|
||||
else
|
||||
{
|
||||
auto res = LookupFile(name);
|
||||
fr = std::move(res.first);
|
||||
filename = res.second;
|
||||
filename = res.second.GetChars();
|
||||
}
|
||||
return fr;
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ FPatchSetReader::FPatchSetReader(const char *filename)
|
|||
const char *paths[] = {
|
||||
"C:/TIMIDITY",
|
||||
"/TIMIDITY",
|
||||
progdir
|
||||
progdir.GetChars()
|
||||
};
|
||||
#endif
|
||||
mAllowAbsolutePaths = true;
|
||||
|
@ -258,7 +258,7 @@ FPatchSetReader::FPatchSetReader(const char *filename)
|
|||
for(auto c : paths)
|
||||
{
|
||||
FStringf fullname("%s/%s", c, filename);
|
||||
if (fr.OpenFile(fullname))
|
||||
if (fr.OpenFile(fullname.GetChars()))
|
||||
{
|
||||
mFullPathToConfig = fullname;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ FPatchSetReader::FPatchSetReader(const char *filename)
|
|||
if (mFullPathToConfig.Len() > 0)
|
||||
{
|
||||
FixPathSeperator(mFullPathToConfig);
|
||||
mBasePath = ExtractFilePath(mFullPathToConfig);
|
||||
mBasePath = ExtractFilePath(mFullPathToConfig.GetChars());
|
||||
if (mBasePath.Len() > 0 && mBasePath.Back() != '/') mBasePath += '/';
|
||||
}
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ FPatchSetReader::FPatchSetReader(const char *filename)
|
|||
FileReader FPatchSetReader::OpenMainConfigFile()
|
||||
{
|
||||
FileReader fr;
|
||||
fr.OpenFile(mFullPathToConfig);
|
||||
fr.OpenFile(mFullPathToConfig.GetChars());
|
||||
return fr;
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ FileReader FPatchSetReader::OpenFile(const char *name)
|
|||
if (IsAbsPath(name)) path = name;
|
||||
else path = mBasePath + name;
|
||||
FileReader fr;
|
||||
fr.OpenFile(path);
|
||||
fr.OpenFile(path.GetChars());
|
||||
return fr;
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ FLumpPatchSetReader::FLumpPatchSetReader(const char *filename)
|
|||
|
||||
mBasePath = filename;
|
||||
FixPathSeperator(mBasePath);
|
||||
mBasePath = ExtractFilePath(mBasePath);
|
||||
mBasePath = ExtractFilePath(mBasePath.GetChars());
|
||||
if (mBasePath.Len() > 0 && mBasePath.Back() != '/') mBasePath += '/';
|
||||
}
|
||||
|
||||
|
@ -523,8 +523,8 @@ FSoundFontReader *FSoundFontManager::OpenSoundFont(const char *name, int allowed
|
|||
auto sfi = FindSoundFont(name, allowed);
|
||||
if (sfi != nullptr)
|
||||
{
|
||||
if (sfi->type == SF_SF2) return new FSF2Reader(sfi->mFilename);
|
||||
else return new FZipPatReader(sfi->mFilename);
|
||||
if (sfi->type == SF_SF2) return new FSF2Reader(sfi->mFilename.GetChars());
|
||||
else return new FZipPatReader(sfi->mFilename.GetChars());
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
|
|
|
@ -463,7 +463,7 @@ static void SaveGains()
|
|||
{
|
||||
auto path = M_GetAppDataPath(true);
|
||||
path << "/replaygain.ini";
|
||||
FConfigFile gains(path);
|
||||
FConfigFile gains(path.GetChars());
|
||||
TMap<FString, float>::Iterator it(gainMap);
|
||||
TMap<FString, float>::Pair* pair;
|
||||
|
||||
|
@ -471,7 +471,7 @@ static void SaveGains()
|
|||
{
|
||||
while (it.NextPair(pair))
|
||||
{
|
||||
gains.SetValueForKey(pair->Key, std::to_string(pair->Value).c_str());
|
||||
gains.SetValueForKey(pair->Key.GetChars(), std::to_string(pair->Value).c_str());
|
||||
}
|
||||
}
|
||||
gains.WriteConfigFile();
|
||||
|
@ -484,7 +484,7 @@ static void ReadGains()
|
|||
done = true;
|
||||
auto path = M_GetAppDataPath(true);
|
||||
path << "/replaygain.ini";
|
||||
FConfigFile gains(path);
|
||||
FConfigFile gains(path.GetChars());
|
||||
if (gains.SetSection("Gains"))
|
||||
{
|
||||
const char* key;
|
||||
|
@ -669,7 +669,7 @@ bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
|
|||
|
||||
if (!mus_playing.name.IsEmpty() &&
|
||||
mus_playing.handle != nullptr &&
|
||||
stricmp(mus_playing.name, musicname) == 0 &&
|
||||
mus_playing.name.CompareNoCase(musicname) == 0 &&
|
||||
ZMusic_IsLooping(mus_playing.handle) == zmusic_bool(looping))
|
||||
{
|
||||
if (order != mus_playing.baseorder)
|
||||
|
@ -768,7 +768,7 @@ void S_RestartMusic ()
|
|||
{
|
||||
FString song = mus_playing.LastSong;
|
||||
mus_playing.LastSong = "";
|
||||
S_ChangeMusic (song, mus_playing.baseorder, mus_playing.loop, true);
|
||||
S_ChangeMusic (song.GetChars(), mus_playing.baseorder, mus_playing.loop, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -791,7 +791,7 @@ void S_MIDIDeviceChanged(int newdev)
|
|||
// Reload the song to change the device
|
||||
auto mi = mus_playing;
|
||||
S_StopMusic(true);
|
||||
S_ChangeMusic(mi.name, mi.baseorder, mi.loop);
|
||||
S_ChangeMusic(mi.name.GetChars(), mi.baseorder, mi.loop);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -807,7 +807,7 @@ int S_GetMusic (const char **name)
|
|||
|
||||
if (mus_playing.name.IsNotEmpty())
|
||||
{
|
||||
*name = mus_playing.name;
|
||||
*name = mus_playing.name.GetChars();
|
||||
order = mus_playing.baseorder;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -75,7 +75,7 @@ CVAR (String, snd_alresampler, "Default", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
#define OPENALLIB1 "libopenal.1.dylib"
|
||||
#define OPENALLIB2 "OpenAL.framework/OpenAL"
|
||||
#else // !__APPLE__
|
||||
#define OPENALLIB1 NicePath("$PROGDIR/" OPENALLIB)
|
||||
#define OPENALLIB1 NicePath("$PROGDIR/" OPENALLIB).GetChars()
|
||||
#define OPENALLIB2 OPENALLIB
|
||||
#endif
|
||||
|
||||
|
|
|
@ -837,7 +837,7 @@ MoviePlayer* OpenMovie(const char* filename, TArray<int>& ans, const int* framet
|
|||
{
|
||||
auto fn = StripExtension(filename);
|
||||
DefaultExtension(fn, ".ivf");
|
||||
fr = fileSystem.OpenFileReader(fn);
|
||||
fr = fileSystem.OpenFileReader(fn.GetChars());
|
||||
}
|
||||
|
||||
if (!fr.isOpen()) fr = fileSystem.OpenFileReader(filename);
|
||||
|
@ -905,7 +905,7 @@ MoviePlayer* OpenMovie(const char* filename, TArray<int>& ans, const int* framet
|
|||
// VPX files have no sound track, so look for a same-named sound file with a known extension as the soundtrack to be played.
|
||||
static const char* knownSoundExts[] = { "OGG", "FLAC", "MP3", "OPUS", "WAV" };
|
||||
FString name = StripExtension(filename);
|
||||
anm->soundtrack = fileSystem.FindFileWithExtensions(name, knownSoundExts, countof(knownSoundExts));
|
||||
anm->soundtrack = fileSystem.FindFileWithExtensions(name.GetChars(), knownSoundExts, countof(knownSoundExts));
|
||||
return anm;
|
||||
}
|
||||
// add more formats here.
|
||||
|
@ -936,7 +936,7 @@ DEFINE_ACTION_FUNCTION(_MoviePlayer, Create)
|
|||
if (firstframetime == -1) firstframetime = frametime;
|
||||
if (lastframetime == -1) lastframetime = frametime;
|
||||
int frametimes[] = { firstframetime, frametime, lastframetime };
|
||||
auto movie = OpenMovie(filename, *sndinf, frametime == -1? nullptr : frametimes, flags, error);
|
||||
auto movie = OpenMovie(filename.GetChars(), *sndinf, frametime == -1? nullptr : frametimes, flags, error);
|
||||
if (!movie)
|
||||
{
|
||||
Printf(TEXTCOLOR_YELLOW "%s", error.GetChars());
|
||||
|
|
|
@ -154,7 +154,7 @@ void AddGenericVideo(DObject* runner, const FString& fn, int soundid, int fps)
|
|||
int CutsceneDef::GetSound()
|
||||
{
|
||||
FSoundID id = INVALID_SOUND;
|
||||
if (soundName.IsNotEmpty()) id = soundEngine->FindSound(soundName);
|
||||
if (soundName.IsNotEmpty()) id = soundEngine->FindSound(soundName.GetChars());
|
||||
if (id == INVALID_SOUND) id = soundEngine->FindSoundByResID(soundID);
|
||||
return id.index();
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ void CutsceneDef::Create(DObject* runner)
|
|||
{
|
||||
if (function.IsNotEmpty())
|
||||
{
|
||||
CallCreateFunction(function, runner);
|
||||
CallCreateFunction(function.GetChars(), runner);
|
||||
}
|
||||
else if (video.IsNotEmpty())
|
||||
{
|
||||
|
|
|
@ -98,7 +98,7 @@ static bool M_SetJoystickConfigSection(IJoystickConfig *joy, bool create, FConfi
|
|||
FString id = "Joy:";
|
||||
id += joy->GetIdentifier();
|
||||
if (!GameConfig) return false;
|
||||
return GameConfig->SetSection(id, create);
|
||||
return GameConfig->SetSection(id.GetChars(), create);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -1145,7 +1145,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FTextureID &value, FTe
|
|||
}
|
||||
else
|
||||
{
|
||||
name = pic->GetName();
|
||||
name = pic->GetName().GetChars();
|
||||
}
|
||||
arc.WriteKey(key);
|
||||
arc.w->StartArray();
|
||||
|
@ -1507,8 +1507,8 @@ FString DictionaryToString(const Dictionary &dict)
|
|||
|
||||
while (i.NextPair(pair))
|
||||
{
|
||||
writer.Key(pair->Key);
|
||||
writer.String(pair->Value);
|
||||
writer.Key(pair->Key.GetChars());
|
||||
writer.String(pair->Value.GetChars());
|
||||
}
|
||||
|
||||
writer.EndObject();
|
||||
|
|
|
@ -116,7 +116,7 @@ void FStat::PrintStat (F2DDrawer *drawer)
|
|||
// Count number of linefeeds but ignore terminating ones.
|
||||
if (stattext[i] == '\n') y -= fontheight;
|
||||
}
|
||||
DrawText(drawer, NewConsoleFont, CR_GREEN, 5 / textScale, y, stattext,
|
||||
DrawText(drawer, NewConsoleFont, CR_GREEN, 5 / textScale, y, stattext.GetChars(),
|
||||
DTA_VirtualWidth, twod->GetWidth() / textScale,
|
||||
DTA_VirtualHeight, twod->GetHeight() / textScale,
|
||||
DTA_KeepRatio, true, TAG_DONE);
|
||||
|
|
|
@ -241,7 +241,7 @@ bool FStringTable::ParseLanguageCSV(int lumpnum, const char* buffer, size_t size
|
|||
auto filter = filterstr.Split(" ", FString::TOK_SKIPEMPTY);
|
||||
for (auto& entry : filter)
|
||||
{
|
||||
if (sysCallbacks.CheckGame(entry))
|
||||
if (sysCallbacks.CheckGame(entry.GetChars()))
|
||||
{
|
||||
ok = true;
|
||||
break;
|
||||
|
@ -639,7 +639,7 @@ bool FStringTable::MatchDefaultString(const char *name, const char *content) con
|
|||
|
||||
// Check a secondary key, in case the text comparison cannot be done due to needed orthographic fixes (see Harmony's exit text)
|
||||
FStringf checkkey("%s_CHECK", name);
|
||||
auto cc = GetLanguageString(checkkey, FStringTable::default_table);
|
||||
auto cc = GetLanguageString(checkkey.GetChars(), FStringTable::default_table);
|
||||
if (cc) c = cc;
|
||||
|
||||
return (c && !strnicmp(c, content, strcspn(content, "\n\r\t")));
|
||||
|
|
|
@ -176,7 +176,7 @@ void UpdateJoystickMenu(IJoystickConfig *selected)
|
|||
|
||||
for (int ii = 0; ii < (int)Joysticks.Size(); ++ii)
|
||||
{
|
||||
it = CreateOptionMenuItemJoyConfigMenu(Joysticks[ii]->GetName(), Joysticks[ii]);
|
||||
it = CreateOptionMenuItemJoyConfigMenu(Joysticks[ii]->GetName().GetChars(), Joysticks[ii]);
|
||||
GC::WriteBarrier(opt, it);
|
||||
opt->mItems.Push(it);
|
||||
if (ii == itemnum) opt->mSelectedItem = opt->mItems.Size();
|
||||
|
|
|
@ -1209,7 +1209,7 @@ bool DMenuItemBase::GetString(int i, char *s, int len)
|
|||
FString retstr;
|
||||
VMReturn ret[2]; ret[0].IntAt(&retval); ret[1].StringAt(&retstr);
|
||||
VMCall(func, params, countof(params), ret, 2);
|
||||
strncpy(s, retstr, len);
|
||||
strncpy(s, retstr.GetChars(), len);
|
||||
return !!retval;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -1628,7 +1628,7 @@ static void InitMusicMenus()
|
|||
{
|
||||
FString display = entry.mName;
|
||||
display.ReplaceChars("_", ' ');
|
||||
auto it = CreateOptionMenuItemCommand(display, FStringf("%s \"%s\"", std::get<2>(p), entry.mName.GetChars()), true);
|
||||
auto it = CreateOptionMenuItemCommand(display.GetChars(), FStringf("%s \"%s\"", std::get<2>(p), entry.mName.GetChars()), true);
|
||||
static_cast<DOptionMenuDescriptor*>(*menu)->mItems.Push(it);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,6 +99,6 @@ DEFINE_ACTION_FUNCTION(DMenu, StartMessage)
|
|||
PARAM_STRING(msg);
|
||||
PARAM_INT(mode);
|
||||
PARAM_NAME(action);
|
||||
M_StartMessage(msg, mode, action);
|
||||
M_StartMessage(msg.GetChars(), mode, action);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -252,7 +252,7 @@ void FSavegameManagerBase::DoSave(int Selected, const char *savegamestring)
|
|||
break;
|
||||
}
|
||||
}
|
||||
PerformSaveGame(filename, savegamestring);
|
||||
PerformSaveGame(filename.GetChars(), savegamestring);
|
||||
}
|
||||
M_ClearMenus();
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ DEFINE_ACTION_FUNCTION(FSavegameManager, DoSave)
|
|||
PARAM_SELF_STRUCT_PROLOGUE(FSavegameManagerBase);
|
||||
PARAM_INT(sel);
|
||||
PARAM_STRING(name);
|
||||
self->DoSave(sel, name);
|
||||
self->DoSave(sel, name.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -559,7 +559,7 @@ FString G_GetSavegamesFolder()
|
|||
}
|
||||
else
|
||||
{
|
||||
name = **save_dir ? save_dir : M_GetSavegamesPath();
|
||||
name = **save_dir ? FString(save_dir) : M_GetSavegamesPath();
|
||||
usefilter = true;
|
||||
}
|
||||
|
||||
|
@ -574,8 +574,8 @@ FString G_GetSavegamesFolder()
|
|||
if (usefilter && SavegameFolder.IsNotEmpty())
|
||||
name << SavegameFolder << '/';
|
||||
|
||||
name = NicePath(name);
|
||||
CreatePath(name);
|
||||
name = NicePath(name.GetChars());
|
||||
CreatePath(name.GetChars());
|
||||
return name;
|
||||
}
|
||||
|
||||
|
@ -589,7 +589,7 @@ FString G_BuildSaveName(const char* prefix)
|
|||
{
|
||||
FString name = G_GetSavegamesFolder() + prefix;
|
||||
DefaultExtension(name, "." SAVEGAME_EXT); // only add an extension if the prefix doesn't have one already.
|
||||
name = NicePath(name);
|
||||
name = NicePath(name.GetChars());
|
||||
name.Substitute("\\", "/");
|
||||
return name;
|
||||
}
|
||||
|
|
|
@ -53,14 +53,14 @@ bool FUE1Model::Load( const char *filename, int lumpnum, const char *buffer, int
|
|||
if ( (size_t)realfilename.IndexOf("_d.3d") == realfilename.Len()-5 )
|
||||
{
|
||||
realfilename.Substitute("_d.3d","_a.3d");
|
||||
lumpnum2 = fileSystem.CheckNumForFullName(realfilename);
|
||||
lumpnum2 = fileSystem.CheckNumForFullName(realfilename.GetChars());
|
||||
mDataLump = lumpnum;
|
||||
mAnivLump = lumpnum2;
|
||||
}
|
||||
else
|
||||
{
|
||||
realfilename.Substitute("_a.3d","_d.3d");
|
||||
lumpnum2 = fileSystem.CheckNumForFullName(realfilename);
|
||||
lumpnum2 = fileSystem.CheckNumForFullName(realfilename.GetChars());
|
||||
mAnivLump = lumpnum;
|
||||
mDataLump = lumpnum2;
|
||||
}
|
||||
|
|
|
@ -408,13 +408,13 @@ DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, ByteAt, StringByteAt)
|
|||
|
||||
static void StringFilter(FString *self, FString *result)
|
||||
{
|
||||
*result = strbin1(*self);
|
||||
*result = strbin1(self->GetChars());
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, Filter, StringFilter)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FString);
|
||||
ACTION_RETURN_STRING(strbin1(*self));
|
||||
ACTION_RETURN_STRING(strbin1(self->GetChars()));
|
||||
}
|
||||
|
||||
static int StringIndexOf(FString *self, const FString &substr, int startIndex)
|
||||
|
|
|
@ -58,7 +58,7 @@ static int CastS2I(FString *b) { return (int)b->ToLong(); }
|
|||
static double CastS2F(FString *b) { return b->ToDouble(); }
|
||||
static int CastS2N(FString *b) { return b->Len() == 0 ? NAME_None : FName(*b).GetIndex(); }
|
||||
static void CastN2S(FString *a, int b) { FName name = FName(ENamedName(b)); *a = name.IsValidName() ? name.GetChars() : ""; }
|
||||
static int CastS2Co(FString *b) { return V_GetColor(*b); }
|
||||
static int CastS2Co(FString *b) { return V_GetColor(b->GetChars()); }
|
||||
static void CastCo2S(FString *a, int b) { PalEntry c(b); a->Format("%02x %02x %02x", c.r, c.g, c.b); }
|
||||
static int CastS2So(FString *b) { return S_FindSound(*b).index(); }
|
||||
static void CastSo2S(FString* a, int b) { *a = soundEngine->GetSoundName(FSoundID::fromInt(b)); }
|
||||
|
|
|
@ -570,8 +570,8 @@ void FStartScreen::CreateHeader()
|
|||
fcolor.rgbBlue = BPART(GameStartupInfo.FgColor);
|
||||
fcolor.rgbReserved = 255;
|
||||
ClearBlock(HeaderBitmap, bcolor, 0, 0, HeaderBitmap.GetWidth(), HeaderBitmap.GetHeight());
|
||||
int textlen = SizeOfText(GameStartupInfo.Name);
|
||||
DrawString(HeaderBitmap, (HeaderBitmap.GetWidth() >> 4) - (textlen >> 1), 0.5, GameStartupInfo.Name, fcolor, bcolor);
|
||||
int textlen = SizeOfText(GameStartupInfo.Name.GetChars());
|
||||
DrawString(HeaderBitmap, (HeaderBitmap.GetWidth() >> 4) - (textlen >> 1), 0.5, GameStartupInfo.Name.GetChars(), fcolor, bcolor);
|
||||
NetBitmap.Create(StartupBitmap.GetWidth() * Scale, 16);
|
||||
}
|
||||
|
||||
|
@ -588,7 +588,7 @@ void FStartScreen::DrawNetStatus(int found, int total)
|
|||
RgbQuad black = { 0, 0, 0, 255 };
|
||||
RgbQuad gray = { 100, 100, 100, 255 };
|
||||
ClearBlock(NetBitmap, black, 0, NetBitmap.GetHeight() - 16, NetBitmap.GetWidth(), 16);
|
||||
DrawString(NetBitmap, 0, 0, NetMessageString, gray, black);
|
||||
DrawString(NetBitmap, 0, 0, NetMessageString.GetChars(), gray, black);
|
||||
char of[10];
|
||||
mysnprintf(of, 10, "%d/%d", found, total);
|
||||
int siz = SizeOfText(of);
|
||||
|
|
|
@ -137,7 +137,7 @@ struct FPatchLookup
|
|||
|
||||
void FMultipatchTextureBuilder::MakeTexture(BuildInfo &buildinfo, ETextureType usetype)
|
||||
{
|
||||
buildinfo.texture = new FGameTexture(nullptr, buildinfo.Name);
|
||||
buildinfo.texture = new FGameTexture(nullptr, buildinfo.Name.GetChars());
|
||||
buildinfo.texture->SetUseType(usetype);
|
||||
buildinfo.texture->SetSize(buildinfo.Width, buildinfo.Height);
|
||||
buildinfo.texture->SetOffsets(0, buildinfo.LeftOffset[0], buildinfo.TopOffset[0]); // These are needed for construction of other multipatch textures.
|
||||
|
@ -373,7 +373,7 @@ void FMultipatchTextureBuilder::AddTexturesLump(const void *lumpdata, int lumpsi
|
|||
int j;
|
||||
for (j = (int)TexMan.NumTextures() - 1; j >= firstdup; --j)
|
||||
{
|
||||
if (strnicmp(TexMan.GameByIndex(j)->GetName(), (const char *)maptex + offset, 8) == 0)
|
||||
if (strnicmp(TexMan.GameByIndex(j)->GetName().GetChars(), (const char *)maptex + offset, 8) == 0)
|
||||
break;
|
||||
}
|
||||
if (j + 1 == firstdup)
|
||||
|
@ -778,11 +778,11 @@ void FMultipatchTextureBuilder::ResolvePatches(BuildInfo &buildinfo)
|
|||
{
|
||||
for (unsigned i = 0; i < buildinfo.Inits.Size(); i++)
|
||||
{
|
||||
FTextureID texno = TexMan.CheckForTexture(buildinfo.Inits[i].TexName, buildinfo.Inits[i].UseType);
|
||||
FTextureID texno = TexMan.CheckForTexture(buildinfo.Inits[i].TexName.GetChars(), buildinfo.Inits[i].UseType);
|
||||
if (texno == buildinfo.texture->GetID()) // we found ourselves. Try looking for another one with the same name which is not a multipatch texture itself.
|
||||
{
|
||||
TArray<FTextureID> list;
|
||||
TexMan.ListTextures(buildinfo.Inits[i].TexName, list, true);
|
||||
TexMan.ListTextures(buildinfo.Inits[i].TexName.GetChars(), list, true);
|
||||
for (int ii = list.Size() - 1; ii >= 0; ii--)
|
||||
{
|
||||
auto gtex = TexMan.GetGameTexture(list[ii]);
|
||||
|
|
|
@ -158,7 +158,7 @@ int FArgs::CheckParm(const char** check, int start) const
|
|||
{
|
||||
for (unsigned i = start; i < Argv.Size(); ++i)
|
||||
{
|
||||
if (0 == stricmp(check, Argv[i]))
|
||||
if (0 == stricmp(check, Argv[i].GetChars()))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -342,7 +342,7 @@ FString *FSharedStringArena::Alloc(const FString &source)
|
|||
unsigned int hash;
|
||||
Node *strnode;
|
||||
|
||||
strnode = FindString(source, source.Len(), hash);
|
||||
strnode = FindString(source.GetChars(), source.Len(), hash);
|
||||
if (strnode == NULL)
|
||||
{
|
||||
strnode = (Node *)iAlloc(sizeof(Node));
|
||||
|
|
|
@ -759,7 +759,7 @@ int V_GetColor(const char* str, FScriptPosition* sc)
|
|||
|
||||
if (!string.IsEmpty())
|
||||
{
|
||||
res = V_GetColorFromString(string, sc);
|
||||
res = V_GetColorFromString(string.GetChars(), sc);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -97,7 +97,7 @@ FGameTexture *FMugShotFrame::GetTexture(const char *default_face, const char *sk
|
|||
}
|
||||
sprite.UnlockBuffer();
|
||||
}
|
||||
return TexMan.GetGameTexture(TexMan.CheckForTexture(sprite, ETextureType::Any, FTextureManager::TEXMAN_TryAny|FTextureManager::TEXMAN_AllowSkins));
|
||||
return TexMan.GetGameTexture(TexMan.CheckForTexture(sprite.GetChars(), ETextureType::Any, FTextureManager::TEXMAN_TryAny|FTextureManager::TEXMAN_AllowSkins));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -376,7 +376,7 @@ int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
|||
full_state_name = "pain.";
|
||||
}
|
||||
full_state_name += player->LastDamageType.GetChars();
|
||||
if (SetState(full_state_name, false, true))
|
||||
if (SetState(full_state_name.GetChars(), false, true))
|
||||
{
|
||||
bDamageFaceActive = (CurrentState != NULL);
|
||||
LastDamageAngle = damage_angle;
|
||||
|
@ -403,7 +403,7 @@ int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
|||
full_state_name = "pain.";
|
||||
}
|
||||
full_state_name += player->LastDamageType.GetChars();
|
||||
if (SetState(full_state_name))
|
||||
if (SetState(full_state_name.GetChars()))
|
||||
{
|
||||
bOuchActive = use_ouch;
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
|||
full_state_name = "xdeath.";
|
||||
}
|
||||
full_state_name += player->LastDamageType.GetChars();
|
||||
SetState(full_state_name);
|
||||
SetState(full_state_name.GetChars());
|
||||
bNormal = true; //Allow the face to return to alive states when the player respawns.
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -443,7 +443,7 @@ void SBarInfo::Load()
|
|||
{
|
||||
if(gameinfo.statusbar.IsNotEmpty())
|
||||
{
|
||||
int lump = fileSystem.CheckNumForFullName(gameinfo.statusbar, true);
|
||||
int lump = fileSystem.CheckNumForFullName(gameinfo.statusbar.GetChars(), true);
|
||||
if(lump != -1)
|
||||
{
|
||||
if (!batchrun) Printf ("ParseSBarInfo: Loading default status bar definition.\n");
|
||||
|
@ -795,7 +795,7 @@ int SBarInfo::newImage(const char *patchname)
|
|||
}
|
||||
for(unsigned int i = 0;i < this->Images.Size();i++) //did we already load it?
|
||||
{
|
||||
if(stricmp(this->Images[i], patchname) == 0)
|
||||
if(stricmp(this->Images[i].GetChars(), patchname) == 0)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
@ -996,7 +996,7 @@ public:
|
|||
unsigned int i = 0;
|
||||
for(i = 0;i < script->Images.Size();i++)
|
||||
{
|
||||
patchnames[i] = script->Images[i];
|
||||
patchnames[i] = script->Images[i].GetChars();
|
||||
}
|
||||
for(i = 0;i < 9;i++)
|
||||
{
|
||||
|
|
|
@ -692,7 +692,7 @@ class CommandDrawString : public SBarInfoCommand
|
|||
auto lines = V_BreakLines(font, breakWidth, str.GetChars());
|
||||
for(unsigned i = 0; i < lines.Size();i++)
|
||||
{
|
||||
statusBar->DrawString(font, lines[i].Text, x, y+i*(font->GetHeight()+4), block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets(), translation, spacing, shadow, shadowX, shadowY);
|
||||
statusBar->DrawString(font, lines[i].Text.GetChars(), x, y+i*(font->GetHeight()+4), block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets(), translation, spacing, shadow, shadowX, shadowY);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1183,7 +1183,7 @@ class CommandDrawNumber : public CommandDrawString
|
|||
|
||||
// We have a name, but make sure it exists. If not, send notification so modders
|
||||
// are aware of the situation.
|
||||
FBaseCVar *CVar = FindCVar(cvarName, nullptr);
|
||||
FBaseCVar *CVar = FindCVar(cvarName.GetChars(), nullptr);
|
||||
|
||||
if (CVar != nullptr)
|
||||
{
|
||||
|
@ -1484,7 +1484,7 @@ class CommandDrawNumber : public CommandDrawString
|
|||
break;
|
||||
case INTCVAR:
|
||||
{
|
||||
FBaseCVar *CVar = GetCVar(int(statusBar->CPlayer - players), cvarName);
|
||||
FBaseCVar *CVar = GetCVar(int(statusBar->CPlayer - players), cvarName.GetChars());
|
||||
if (CVar != nullptr)
|
||||
{
|
||||
ECVarType cvartype = CVar->GetRealType();
|
||||
|
@ -1618,7 +1618,7 @@ class CommandDrawMugShot : public SBarInfoCommand
|
|||
|
||||
void Draw(const SBarInfoMainBlock *block, const DSBarInfo *statusBar)
|
||||
{
|
||||
FGameTexture *face = statusBar->wrapper->mugshot.GetFace(statusBar->CPlayer, defaultFace, accuracy, stateFlags);
|
||||
FGameTexture *face = statusBar->wrapper->mugshot.GetFace(statusBar->CPlayer, defaultFace.GetChars(), accuracy, stateFlags);
|
||||
if (face != NULL)
|
||||
statusBar->DrawGraphic(face, x, y, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets());
|
||||
}
|
||||
|
@ -2954,7 +2954,7 @@ class CommandPlayerClass : public SBarInfoCommandFlowControl
|
|||
bool foundClass = false;
|
||||
for(unsigned int c = 0;c < PlayerClasses.Size();c++)
|
||||
{
|
||||
if(stricmp(sc.String, PlayerClasses[c].Type->GetDisplayName()) == 0)
|
||||
if(stricmp(sc.String, PlayerClasses[c].Type->GetDisplayName().GetChars()) == 0)
|
||||
{
|
||||
foundClass = true;
|
||||
classes.Push(PlayerClasses[c].Type);
|
||||
|
@ -3499,7 +3499,7 @@ class CommandIfCVarInt : public SBarInfoNegatableFlowControl
|
|||
}
|
||||
|
||||
cvarname = sc.String;
|
||||
cvar = FindCVar(cvarname, nullptr);
|
||||
cvar = FindCVar(cvarname.GetChars(), nullptr);
|
||||
|
||||
if (cvar != nullptr)
|
||||
{
|
||||
|
@ -3536,7 +3536,7 @@ class CommandIfCVarInt : public SBarInfoNegatableFlowControl
|
|||
SBarInfoNegatableFlowControl::Tick(block, statusBar, hudChanged);
|
||||
|
||||
bool result = false;
|
||||
cvar = GetCVar(int(statusBar->CPlayer - players), cvarname);
|
||||
cvar = GetCVar(int(statusBar->CPlayer - players), cvarname.GetChars());
|
||||
|
||||
if (cvar != nullptr)
|
||||
{
|
||||
|
|
|
@ -157,45 +157,45 @@ void V_DrawFrame(F2DDrawer* drawer, int left, int top, int width, int height, bo
|
|||
if (!scalemode)
|
||||
{
|
||||
// Draw top and bottom sides.
|
||||
p = TexMan.GetGameTextureByName(border->t);
|
||||
p = TexMan.GetGameTextureByName(border->t.GetChars());
|
||||
drawer->AddFlatFill(left, top - (int)p->GetDisplayHeight(), right, top, p, true);
|
||||
p = TexMan.GetGameTextureByName(border->b);
|
||||
p = TexMan.GetGameTextureByName(border->b.GetChars());
|
||||
drawer->AddFlatFill(left, bottom, right, bottom + (int)p->GetDisplayHeight(), p, true);
|
||||
|
||||
// Draw left and right sides.
|
||||
p = TexMan.GetGameTextureByName(border->l);
|
||||
p = TexMan.GetGameTextureByName(border->l.GetChars());
|
||||
drawer->AddFlatFill(left - (int)p->GetDisplayWidth(), top, left, bottom, p, true);
|
||||
p = TexMan.GetGameTextureByName(border->r);
|
||||
p = TexMan.GetGameTextureByName(border->r.GetChars());
|
||||
drawer->AddFlatFill(right, top, right + (int)p->GetDisplayWidth(), bottom, p, true);
|
||||
|
||||
// Draw beveled corners.
|
||||
DrawTexture(drawer, TexMan.GetGameTextureByName(border->tl), left - offset, top - offset, TAG_DONE);
|
||||
DrawTexture(drawer, TexMan.GetGameTextureByName(border->tr), left + width, top - offset, TAG_DONE);
|
||||
DrawTexture(drawer, TexMan.GetGameTextureByName(border->bl), left - offset, top + height, TAG_DONE);
|
||||
DrawTexture(drawer, TexMan.GetGameTextureByName(border->br), left + width, top + height, TAG_DONE);
|
||||
DrawTexture(drawer, TexMan.GetGameTextureByName(border->tl.GetChars()), left - offset, top - offset, TAG_DONE);
|
||||
DrawTexture(drawer, TexMan.GetGameTextureByName(border->tr.GetChars()), left + width, top - offset, TAG_DONE);
|
||||
DrawTexture(drawer, TexMan.GetGameTextureByName(border->bl.GetChars()), left - offset, top + height, TAG_DONE);
|
||||
DrawTexture(drawer, TexMan.GetGameTextureByName(border->br.GetChars()), left + width, top + height, TAG_DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Draw top and bottom sides.
|
||||
p = TexMan.GetGameTextureByName(border->t);
|
||||
p = TexMan.GetGameTextureByName(border->t.GetChars());
|
||||
drawer->AddFlatFill(left, top - (int)(p->GetDisplayHeight() / sh), right, top, p, -2);
|
||||
p = TexMan.GetGameTextureByName(border->b);
|
||||
p = TexMan.GetGameTextureByName(border->b.GetChars());
|
||||
drawer->AddFlatFill(left, bottom, right, bottom + (int)(p->GetDisplayHeight() / sh), p, -2);
|
||||
|
||||
// Draw left and right sides.
|
||||
p = TexMan.GetGameTextureByName(border->l);
|
||||
p = TexMan.GetGameTextureByName(border->l.GetChars());
|
||||
drawer->AddFlatFill(left - (int)(p->GetDisplayWidth() / sw), top, left, bottom, p, -2);
|
||||
p = TexMan.GetGameTextureByName(border->r);
|
||||
p = TexMan.GetGameTextureByName(border->r.GetChars());
|
||||
drawer->AddFlatFill(right, top, right + (int)(p->GetDisplayWidth() / sw), bottom, p, -2);
|
||||
|
||||
// Draw beveled corners.
|
||||
p = TexMan.GetGameTextureByName(border->tl);
|
||||
p = TexMan.GetGameTextureByName(border->tl.GetChars());
|
||||
drawer->AddFlatFill(left - (int)(p->GetDisplayWidth() / sw), top - (int)(p->GetDisplayHeight() / sh), left, top, p, -2);
|
||||
p = TexMan.GetGameTextureByName(border->tr);
|
||||
p = TexMan.GetGameTextureByName(border->tr.GetChars());
|
||||
drawer->AddFlatFill(right, top - (int)(p->GetDisplayHeight() / sh), right + (int)(p->GetDisplayWidth() / sw), top, p, -2);
|
||||
p = TexMan.GetGameTextureByName(border->bl);
|
||||
p = TexMan.GetGameTextureByName(border->bl.GetChars());
|
||||
drawer->AddFlatFill(left - (int)(p->GetDisplayWidth() / sw), bottom, left, bottom + (int)(p->GetDisplayHeight() / sh), p, -2);
|
||||
p = TexMan.GetGameTextureByName(border->br);
|
||||
p = TexMan.GetGameTextureByName(border->br.GetChars());
|
||||
drawer->AddFlatFill(right, bottom, right + (int)(p->GetDisplayWidth() / sw), bottom + (int)(p->GetDisplayHeight() / sh), p, -2);
|
||||
}
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ void DBaseStatusBar::DoDrawAutomapHUD(int crdefault, int highlight)
|
|||
{
|
||||
sec = Tics2Seconds(primaryLevel->time);
|
||||
textbuffer.Format("%02d:%02d:%02d", sec / 3600, (sec % 3600) / 60, sec % 60);
|
||||
DrawText(twod, font, crdefault, vwidth - zerowidth * 8 - textdist, y, textbuffer, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
||||
DrawText(twod, font, crdefault, vwidth - zerowidth * 8 - textdist, y, textbuffer.GetChars(), DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
||||
DTA_Monospace, EMonospacing::CellCenter, DTA_Spacing, zerowidth, DTA_KeepRatio, true, TAG_END);
|
||||
y += fheight;
|
||||
}
|
||||
|
@ -562,7 +562,7 @@ void DBaseStatusBar::DoDrawAutomapHUD(int crdefault, int highlight)
|
|||
{
|
||||
sec = Tics2Seconds(primaryLevel->totaltime);
|
||||
textbuffer.Format("%02d:%02d:%02d", sec / 3600, (sec % 3600) / 60, sec % 60);
|
||||
DrawText(twod, font, crdefault, vwidth - zerowidth * 8 - textdist, y, textbuffer, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
||||
DrawText(twod, font, crdefault, vwidth - zerowidth * 8 - textdist, y, textbuffer.GetChars(), DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
||||
DTA_Monospace, EMonospacing::CellCenter, DTA_Spacing, zerowidth, DTA_KeepRatio, true, TAG_END);
|
||||
}
|
||||
|
||||
|
@ -572,14 +572,14 @@ void DBaseStatusBar::DoDrawAutomapHUD(int crdefault, int highlight)
|
|||
if (am_showmonsters)
|
||||
{
|
||||
textbuffer.Format("%s\34%c %d/%d", GStrings("AM_MONSTERS"), crdefault + 65, primaryLevel->killed_monsters, primaryLevel->total_monsters);
|
||||
DrawText(twod, font2, highlight, textdist, y, textbuffer, DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||
DrawText(twod, font2, highlight, textdist, y, textbuffer.GetChars(), DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||
y += fheight;
|
||||
}
|
||||
|
||||
if (am_showsecrets)
|
||||
{
|
||||
textbuffer.Format("%s\34%c %d/%d", GStrings("AM_SECRETS"), crdefault + 65, primaryLevel->found_secrets, primaryLevel->total_secrets);
|
||||
DrawText(twod, font2, highlight, textdist, y, textbuffer, DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||
DrawText(twod, font2, highlight, textdist, y, textbuffer.GetChars(), DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||
y += fheight;
|
||||
}
|
||||
|
||||
|
@ -587,7 +587,7 @@ void DBaseStatusBar::DoDrawAutomapHUD(int crdefault, int highlight)
|
|||
if (am_showitems)
|
||||
{
|
||||
textbuffer.Format("%s\34%c %d/%d", GStrings("AM_ITEMS"), crdefault + 65, primaryLevel->found_items, primaryLevel->total_items);
|
||||
DrawText(twod, font2, highlight, textdist, y, textbuffer, DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||
DrawText(twod, font2, highlight, textdist, y, textbuffer.GetChars(), DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||
y += fheight;
|
||||
}
|
||||
|
||||
|
@ -627,7 +627,7 @@ void DBaseStatusBar::DoDrawAutomapHUD(int crdefault, int highlight)
|
|||
for (unsigned i = 0; i < numlines; i++)
|
||||
{
|
||||
int x = (vwidth - font->StringWidth(lines[i].Text)) / 2;
|
||||
DrawText(twod, font, highlight, x, y, lines[i].Text, DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||
DrawText(twod, font, highlight, x, y, lines[i].Text.GetChars(), DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE);
|
||||
y += fheight;
|
||||
}
|
||||
}
|
||||
|
@ -876,10 +876,10 @@ static FTextureID GetBorderTexture(FLevelLocals *Level)
|
|||
{
|
||||
if (Level != nullptr && Level->info != nullptr && Level->info->BorderTexture.Len() != 0)
|
||||
{
|
||||
auto picnum = TexMan.CheckForTexture (Level->info->BorderTexture, ETextureType::Flat);
|
||||
auto picnum = TexMan.CheckForTexture (Level->info->BorderTexture.GetChars(), ETextureType::Flat);
|
||||
if (picnum.isValid()) return picnum;
|
||||
}
|
||||
return TexMan.CheckForTexture (gameinfo.BorderFlat, ETextureType::Flat);
|
||||
return TexMan.CheckForTexture (gameinfo.BorderFlat.GetChars(), ETextureType::Flat);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -958,7 +958,7 @@ void DBaseStatusBar::RefreshBackground () const
|
|||
|
||||
if (setblocks >= 10)
|
||||
{
|
||||
FGameTexture *p = TexMan.GetGameTextureByName(gameinfo.Border.b);
|
||||
FGameTexture *p = TexMan.GetGameTextureByName(gameinfo.Border.b.GetChars());
|
||||
if (p != NULL)
|
||||
{
|
||||
if (!ui_screenborder_classic_scaling)
|
||||
|
@ -1143,7 +1143,7 @@ void DBaseStatusBar::DrawLog ()
|
|||
y+=10;
|
||||
for (const FBrokenLines &line : lines)
|
||||
{
|
||||
DrawText(twod, font, CPlayer->SubtitleCounter? CR_CYAN : CR_UNTRANSLATED, x, y, line.Text,
|
||||
DrawText(twod, font, CPlayer->SubtitleCounter? CR_CYAN : CR_UNTRANSLATED, x, y, line.Text.GetChars(),
|
||||
DTA_KeepRatio, true,
|
||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, TAG_DONE);
|
||||
y += font->GetHeight ();
|
||||
|
|
|
@ -72,7 +72,7 @@ static void DoSaveKeys (FConfigFile *config, const char *section, FKeySection *k
|
|||
FKeyBindings *bindings = dbl? &DoubleBindings : &Bindings;
|
||||
for (unsigned i = 0; i < keysection->mActions.Size(); ++i)
|
||||
{
|
||||
bindings->ArchiveBindings (config, keysection->mActions[i].mAction);
|
||||
bindings->ArchiveBindings (config, keysection->mActions[i].mAction.GetChars());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ int compare_episode_names(const void *a, const void *b)
|
|||
FStatistics *A = (FStatistics*)a;
|
||||
FStatistics *B = (FStatistics*)b;
|
||||
|
||||
return strnatcasecmp(A->epi_header, B->epi_header);
|
||||
return strnatcasecmp(A->epi_header.GetChars(), B->epi_header.GetChars());
|
||||
}
|
||||
|
||||
int compare_dates(const void *a, const void *b)
|
||||
|
@ -291,7 +291,7 @@ static FStatistics *GetStatisticsList(TArray<FStatistics> &statlist, const char
|
|||
{
|
||||
for(unsigned int i=0;i<statlist.Size();i++)
|
||||
{
|
||||
if (!stricmp(section, statlist[i].epi_header))
|
||||
if (!stricmp(section, statlist[i].epi_header.GetChars()))
|
||||
{
|
||||
return &statlist[i];
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ int compare_level_names(const void* a, const void* b)
|
|||
OneLevel* A = (OneLevel*)a;
|
||||
OneLevel* B = (OneLevel*)b;
|
||||
|
||||
return strnatcasecmp(A->Levelname, B->Levelname);
|
||||
return strnatcasecmp(A->Levelname.GetChars(), B->Levelname.GetChars());
|
||||
}
|
||||
|
||||
|
||||
|
@ -458,7 +458,7 @@ void STAT_ChangeLevel(const char *newl, FLevelLocals *Level)
|
|||
{
|
||||
// we reached the end of this episode
|
||||
int wad = 0;
|
||||
MapData * map = P_OpenMapData(StartEpisode->mEpisodeMap, false);
|
||||
MapData * map = P_OpenMapData(StartEpisode->mEpisodeMap.GetChars(), false);
|
||||
if (map != NULL)
|
||||
{
|
||||
wad = fileSystem.GetFileContainer(map->lumpnum);
|
||||
|
@ -468,9 +468,9 @@ void STAT_ChangeLevel(const char *newl, FLevelLocals *Level)
|
|||
FString section = ExtractFileBase(name) + "." + StartEpisode->mEpisodeMap;
|
||||
section.ToUpper();
|
||||
|
||||
const char *ep_name = StartEpisode->mEpisodeName;
|
||||
const char *ep_name = StartEpisode->mEpisodeName.GetChars();
|
||||
if (*ep_name == '$') ep_name = GStrings(ep_name+1);
|
||||
FStatistics *sl = GetStatisticsList(EpisodeStatistics, section, ep_name);
|
||||
FStatistics *sl = GetStatisticsList(EpisodeStatistics, section.GetChars(), ep_name);
|
||||
|
||||
int statvals[6] = {0,0,0,0,0,0};
|
||||
FString infostring;
|
||||
|
@ -486,7 +486,7 @@ void STAT_ChangeLevel(const char *newl, FLevelLocals *Level)
|
|||
}
|
||||
|
||||
infostring.Format("%4d/%4d, %4d/%4d, %3d/%3d, %2d", statvals[0], statvals[1], statvals[2], statvals[3], statvals[4], statvals[5], validlevels);
|
||||
FSessionStatistics *es = StatisticsEntry(sl, infostring, Level->totaltime);
|
||||
FSessionStatistics *es = StatisticsEntry(sl, infostring.GetChars(), Level->totaltime);
|
||||
|
||||
for(unsigned i = 0; i < LevelData.Size(); i++)
|
||||
{
|
||||
|
@ -495,7 +495,7 @@ void STAT_ChangeLevel(const char *newl, FLevelLocals *Level)
|
|||
infostring.Format("%4d/%4d, %4d/%4d, %3d/%3d",
|
||||
LevelData[i].killcount, LevelData[i].totalkills, LevelData[i].itemcount, LevelData[i].totalitems, LevelData[i].secretcount, LevelData[i].totalsecrets);
|
||||
|
||||
LevelStatEntry(es, lsection, infostring, LevelData[i].leveltime);
|
||||
LevelStatEntry(es, lsection.GetChars(), infostring.GetChars(), LevelData[i].leveltime);
|
||||
}
|
||||
SaveStatistics(statfile, EpisodeStatistics);
|
||||
}
|
||||
|
|
|
@ -281,7 +281,7 @@ bool M_SaveDefaults (const char *filename)
|
|||
GameConfig->ArchiveGlobalData ();
|
||||
if (gameinfo.ConfigName.IsNotEmpty())
|
||||
{
|
||||
GameConfig->ArchiveGameData (gameinfo.ConfigName);
|
||||
GameConfig->ArchiveGameData (gameinfo.ConfigName.GetChars());
|
||||
}
|
||||
success = GameConfig->WriteConfigFile ();
|
||||
if (filename != nullptr)
|
||||
|
@ -318,7 +318,7 @@ UNSAFE_CCMD (writeini)
|
|||
CCMD(openconfig)
|
||||
{
|
||||
M_SaveDefaults(nullptr);
|
||||
I_OpenShellFolder(ExtractFilePath(GameConfig->GetPathName()));
|
||||
I_OpenShellFolder(ExtractFilePath(GameConfig->GetPathName()).GetChars());
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -537,7 +537,7 @@ static bool FindFreeName (FString &fullname, const char *extension)
|
|||
|
||||
for (i = 0; i <= 9999; i++)
|
||||
{
|
||||
const char *gamename = gameinfo.ConfigName;
|
||||
const char *gamename = gameinfo.ConfigName.GetChars();
|
||||
|
||||
time_t now;
|
||||
tm *tm;
|
||||
|
@ -601,8 +601,8 @@ void M_ScreenShot (const char *filename)
|
|||
autoname += '/';
|
||||
}
|
||||
}
|
||||
autoname = NicePath(autoname);
|
||||
CreatePath(autoname);
|
||||
autoname = NicePath(autoname.GetChars());
|
||||
CreatePath(autoname.GetChars());
|
||||
if (!FindFreeName (autoname, writepcx ? "pcx" : "png"))
|
||||
{
|
||||
Printf ("M_ScreenShot: Delete some screenshots\n");
|
||||
|
@ -623,7 +623,7 @@ void M_ScreenShot (const char *filename)
|
|||
auto buffer = screen->GetScreenshotBuffer(pitch, color_type, gamma);
|
||||
if (buffer.Size() > 0)
|
||||
{
|
||||
file = FileWriter::Open(autoname);
|
||||
file = FileWriter::Open(autoname.GetChars());
|
||||
if (file == NULL)
|
||||
{
|
||||
Printf ("Could not open %s\n", autoname.GetChars());
|
||||
|
@ -687,9 +687,9 @@ CCMD(openscreenshots)
|
|||
autoname += '/';
|
||||
}
|
||||
}
|
||||
autoname = NicePath(autoname);
|
||||
autoname = NicePath(autoname.GetChars());
|
||||
|
||||
CreatePath(autoname);
|
||||
CreatePath(autoname.GetChars());
|
||||
|
||||
I_OpenShellFolder(autoname.GetChars());
|
||||
}
|
||||
|
|
|
@ -2058,9 +2058,9 @@ void MapLoader::ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec
|
|||
// instead of figuring something out from the colormap.
|
||||
if (sec != nullptr)
|
||||
{
|
||||
SetTexture (sd, side_t::bottom, &sec->bottommap, msd->bottomtexture);
|
||||
SetTexture (sd, side_t::mid, &sec->midmap, msd->midtexture);
|
||||
SetTexture (sd, side_t::top, &sec->topmap, msd->toptexture);
|
||||
SetTexture (sd, side_t::bottom, &sec->bottommap, msd->bottomtexture.GetChars());
|
||||
SetTexture (sd, side_t::mid, &sec->midmap, msd->midtexture.GetChars());
|
||||
SetTexture (sd, side_t::top, &sec->topmap, msd->toptexture.GetChars());
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2072,9 +2072,9 @@ void MapLoader::ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec
|
|||
uint32_t color = MAKERGB(255,255,255), fog = 0;
|
||||
bool colorgood, foggood;
|
||||
|
||||
SetTextureNoErr (sd, side_t::bottom, &fog, msd->bottomtexture, &foggood, true);
|
||||
SetTextureNoErr (sd, side_t::top, &color, msd->toptexture, &colorgood, false);
|
||||
SetTexture(sd, side_t::mid, msd->midtexture, missingtex);
|
||||
SetTextureNoErr (sd, side_t::bottom, &fog, msd->bottomtexture.GetChars(), &foggood, true);
|
||||
SetTextureNoErr (sd, side_t::top, &color, msd->toptexture.GetChars(), &colorgood, false);
|
||||
SetTexture(sd, side_t::mid, msd->midtexture.GetChars(), missingtex);
|
||||
|
||||
if (colorgood | foggood)
|
||||
{
|
||||
|
@ -2114,12 +2114,12 @@ void MapLoader::ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec
|
|||
{
|
||||
int lumpnum;
|
||||
|
||||
if (strnicmp ("TRANMAP", msd->midtexture, 8) == 0)
|
||||
if (strnicmp ("TRANMAP", msd->midtexture.GetChars(), 8) == 0)
|
||||
{
|
||||
// The translator set the alpha argument already; no reason to do it again.
|
||||
sd->SetTexture(side_t::mid, FNullTextureID());
|
||||
}
|
||||
else if ((lumpnum = fileSystem.CheckNumForName (msd->midtexture)) > 0 &&
|
||||
else if ((lumpnum = fileSystem.CheckNumForName (msd->midtexture.GetChars())) > 0 &&
|
||||
fileSystem.FileLength (lumpnum) == 65536)
|
||||
{
|
||||
auto fr = fileSystem.OpenFileReader(lumpnum);
|
||||
|
|
|
@ -109,7 +109,7 @@ void MapLoader::LoadStrifeConversations (MapData *map, const char *mapname)
|
|||
bool addedDialogues = false;
|
||||
for (const FString &addd : gameinfo.AddDialogues)
|
||||
{
|
||||
if (!LoadScriptFile(addd, true, 0))
|
||||
if (!LoadScriptFile(addd.GetChars(), true, 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ void MapLoader::LoadStrifeConversations (MapData *map, const char *mapname)
|
|||
|
||||
if (gameinfo.Dialogue.IsNotEmpty())
|
||||
{
|
||||
if (LoadScriptFile(gameinfo.Dialogue, false, 0))
|
||||
if (LoadScriptFile(gameinfo.Dialogue.GetChars(), false, 0))
|
||||
{
|
||||
if (addedDialogues)
|
||||
{
|
||||
|
|
|
@ -171,7 +171,7 @@ FString FSavegameManager::ExtractSaveComment(FSerializer &arc)
|
|||
|
||||
FString FSavegameManager::BuildSaveName(const char* prefix, int slot)
|
||||
{
|
||||
return G_BuildSaveName(FStringf("%s%02d", prefix, slot));
|
||||
return G_BuildSaveName(FStringf("%s%02d", prefix, slot).GetChars());
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -81,7 +81,7 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, PlayerNameChanged)
|
|||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_STRING(s);
|
||||
const char *pp = s;
|
||||
const char *pp = s.GetChars();
|
||||
FString command("name \"");
|
||||
|
||||
if (DMenu::InMenu)
|
||||
|
@ -96,7 +96,7 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, PlayerNameChanged)
|
|||
command << *p;
|
||||
}
|
||||
command << '"';
|
||||
C_DoCommand(command);
|
||||
C_DoCommand(command.GetChars());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, SkinChanged)
|
|||
if (DMenu::InMenu)
|
||||
{
|
||||
players[consoleplayer].userinfo.SkinNumChanged(sel);
|
||||
cvar_set("skin", Skins[sel].Name);
|
||||
cvar_set("skin", Skins[sel].Name.GetChars());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -503,7 +503,7 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
|
|||
// No, you don't. Say so and let the NPC animate negatively.
|
||||
if (reply->QuickNo.IsNotEmpty() && isconsole)
|
||||
{
|
||||
TerminalResponse(reply->QuickNo);
|
||||
TerminalResponse(reply->QuickNo.GetChars());
|
||||
}
|
||||
npc->ConversationAnimation(2);
|
||||
if (!(npc->flags8 & MF8_DONTFACETALKER))
|
||||
|
@ -576,7 +576,7 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
|
|||
{
|
||||
TakeStrifeItem (player, reply->ItemCheck[i].Item, reply->ItemCheck[i].Amount);
|
||||
}
|
||||
replyText = reply->QuickYes;
|
||||
replyText = reply->QuickYes.GetChars();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -586,7 +586,7 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
|
|||
// Update the quest log, if needed.
|
||||
if (reply->LogString.IsNotEmpty())
|
||||
{
|
||||
const char *log = reply->LogString;
|
||||
const char *log = reply->LogString.GetChars();
|
||||
if (log[0] == '$')
|
||||
{
|
||||
log = GStrings(log + 1);
|
||||
|
|
|
@ -140,9 +140,9 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
|
|||
// Names with more than 8 characters will only be checked as .wad and .map.
|
||||
if (strlen(mapname) <= 8) lump_name = fileSystem.CheckNumForName(mapname);
|
||||
fmt.Format("maps/%s.wad", mapname);
|
||||
lump_wad = fileSystem.CheckNumForFullName(fmt);
|
||||
lump_wad = fileSystem.CheckNumForFullName(fmt.GetChars());
|
||||
fmt.Format("maps/%s.map", mapname);
|
||||
lump_map = fileSystem.CheckNumForFullName(fmt);
|
||||
lump_map = fileSystem.CheckNumForFullName(fmt.GetChars());
|
||||
|
||||
if (lump_name > lump_wad && lump_name > lump_map && lump_name != -1)
|
||||
{
|
||||
|
|
|
@ -870,11 +870,11 @@ void FLevelLocals::CopyPlayer(player_t *dst, player_t *src, const char *name)
|
|||
{
|
||||
dst->userinfo.TransferFrom(uibackup);
|
||||
// The player class must come from the save, so that the menu reflects the currently playing one.
|
||||
dst->userinfo.PlayerClassChanged(src->mo->GetInfo()->DisplayName);
|
||||
dst->userinfo.PlayerClassChanged(src->mo->GetInfo()->DisplayName.GetChars());
|
||||
}
|
||||
|
||||
// Validate the skin
|
||||
dst->userinfo.SkinNumChanged(R_FindSkin(Skins[dst->userinfo.GetSkin()].Name, dst->CurrentPlayerClass));
|
||||
dst->userinfo.SkinNumChanged(R_FindSkin(Skins[dst->userinfo.GetSkin()].Name.GetChars(), dst->CurrentPlayerClass));
|
||||
|
||||
// Make sure the player pawn points to the proper player struct.
|
||||
if (dst->mo != nullptr)
|
||||
|
|
|
@ -213,12 +213,12 @@ static void PrecacheLevel(FLevelLocals *Level)
|
|||
|
||||
for (auto n : gameinfo.PrecachedTextures)
|
||||
{
|
||||
FTextureID tex = TexMan.CheckForTexture(n, ETextureType::Wall, checkForTextureFlags);
|
||||
FTextureID tex = TexMan.CheckForTexture(n.GetChars(), ETextureType::Wall, checkForTextureFlags);
|
||||
if (tex.Exists()) AddToList(hitlist.Data(), tex, FTextureManager::HIT_Wall);
|
||||
}
|
||||
for (unsigned i = 0; i < Level->info->PrecacheTextures.Size(); i++)
|
||||
{
|
||||
FTextureID tex = TexMan.CheckForTexture(Level->info->PrecacheTextures[i], ETextureType::Wall, checkForTextureFlags);
|
||||
FTextureID tex = TexMan.CheckForTexture(Level->info->PrecacheTextures[i].GetChars(), ETextureType::Wall, checkForTextureFlags);
|
||||
if (tex.Exists()) AddToList(hitlist.Data(), tex, FTextureManager::HIT_Wall);
|
||||
}
|
||||
|
||||
|
@ -451,7 +451,7 @@ void P_SetupLevel(FLevelLocals *Level, int position, bool newGame)
|
|||
// Free all level data from the previous map
|
||||
P_FreeLevelData();
|
||||
|
||||
MapData *map = P_OpenMapData(Level->MapName, true);
|
||||
MapData *map = P_OpenMapData(Level->MapName.GetChars(), true);
|
||||
if (map == nullptr)
|
||||
{
|
||||
I_Error("Unable to open map '%s'\n", Level->MapName.GetChars());
|
||||
|
|
|
@ -979,7 +979,7 @@ int ACSStringPool::AddString(FString &str)
|
|||
{
|
||||
unsigned int h = SuperFastHash(str.GetChars(), str.Len());
|
||||
unsigned int bucketnum = h % NUM_BUCKETS;
|
||||
int i = FindString(str, str.Len(), h, bucketnum);
|
||||
int i = FindString(str.GetChars(), str.Len(), h, bucketnum);
|
||||
if (i >= 0)
|
||||
{
|
||||
return i | STRPOOL_LIBRARYID_OR;
|
||||
|
@ -999,7 +999,7 @@ const char *ACSStringPool::GetString(int strnum)
|
|||
strnum &= ~LIBRARYID_MASK;
|
||||
if ((unsigned)strnum < Pool.Size() && Pool[strnum].Next != FREE_ENTRY)
|
||||
{
|
||||
return Pool[strnum].Str;
|
||||
return Pool[strnum].Str.GetChars();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1299,7 +1299,7 @@ void ACSStringPool::ReadStrings(FSerializer &file, const char *key)
|
|||
file("string", Pool[ii].Str)
|
||||
("locks", Pool[ii].Locks);
|
||||
|
||||
unsigned h = SuperFastHash(Pool[ii].Str, Pool[ii].Str.Len());
|
||||
unsigned h = SuperFastHash(Pool[ii].Str.GetChars(), Pool[ii].Str.Len());
|
||||
unsigned bucketnum = h % NUM_BUCKETS;
|
||||
Pool[ii].Hash = h;
|
||||
Pool[ii].Next = PoolBuckets[bucketnum];
|
||||
|
@ -1595,7 +1595,7 @@ static void WriteArrayVars (FSerializer &file, FWorldGlobalArray *vars, unsigned
|
|||
FString arraykey;
|
||||
|
||||
arraykey.Format("%d", i);
|
||||
if (file.BeginObject(arraykey))
|
||||
if (file.BeginObject(arraykey.GetChars()))
|
||||
{
|
||||
FWorldGlobalArray::ConstIterator it(vars[i]);
|
||||
const FWorldGlobalArray::Pair *pair;
|
||||
|
@ -3248,7 +3248,7 @@ const char *FBehavior::LookupString (uint32_t index, bool forprint) const
|
|||
token.Truncate(5);
|
||||
|
||||
FStringf label("TXT_ACS_%s_%d_%.5s", Level->MapName.GetChars(), index, token.GetChars());
|
||||
auto p = GStrings[label];
|
||||
auto p = GStrings[label.GetChars()];
|
||||
if (p) return p;
|
||||
}
|
||||
|
||||
|
@ -6093,7 +6093,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
|||
{
|
||||
newlen = oldlen - pos;
|
||||
}
|
||||
return GlobalACSStrings.AddString(FString(oldstr + pos, newlen));
|
||||
return GlobalACSStrings.AddString(FString(oldstr + pos, newlen).GetChars());
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -6674,7 +6674,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
|||
auto a = Level->SingleActorFromTID(args[0], activator);
|
||||
if (a != nullptr)
|
||||
{
|
||||
return GlobalACSStrings.AddString(TexMan.GetGameTexture(a->floorpic)->GetName());
|
||||
return GlobalACSStrings.AddString(TexMan.GetGameTexture(a->floorpic)->GetName().GetChars());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -8729,7 +8729,7 @@ scriptwait:
|
|||
if (pcd == PCD_ENDPRINTBOLD || screen == NULL ||
|
||||
screen->CheckLocalView())
|
||||
{
|
||||
C_MidPrint (activefont, work, pcd == PCD_ENDPRINTBOLD && (gameinfo.correctprintbold || (Level->flags2 & LEVEL2_HEXENHACK)));
|
||||
C_MidPrint (activefont, work.GetChars(), pcd == PCD_ENDPRINTBOLD && (gameinfo.correctprintbold || (Level->flags2 & LEVEL2_HEXENHACK)));
|
||||
}
|
||||
STRINGBUILDER_FINISH(work);
|
||||
}
|
||||
|
@ -10504,7 +10504,7 @@ EXTERN_CVAR (Bool, sv_cheats)
|
|||
|
||||
int P_StartScript (FLevelLocals *Level, AActor *who, line_t *where, int script, const char *map, const int *args, int argcount, int flags)
|
||||
{
|
||||
if (map == NULL || 0 == strnicmp (Level->MapName, map, 8))
|
||||
if (map == NULL || 0 == strnicmp (Level->MapName.GetChars(), map, 8))
|
||||
{
|
||||
FBehavior *module = NULL;
|
||||
const ScriptPtr *scriptdata;
|
||||
|
@ -10559,7 +10559,7 @@ int P_StartScript (FLevelLocals *Level, AActor *who, line_t *where, int script,
|
|||
|
||||
void P_SuspendScript (FLevelLocals *Level, int script, const char *map)
|
||||
{
|
||||
if (strnicmp (Level->MapName, map, 8))
|
||||
if (strnicmp (Level->MapName.GetChars(), map, 8))
|
||||
addDefered (FindLevelInfo (map), acsdefered_t::defsuspend, script, NULL, 0, NULL);
|
||||
else
|
||||
SetScriptState (Level->ACSThinker, script, DLevelScript::SCRIPT_Suspended);
|
||||
|
@ -10567,7 +10567,7 @@ void P_SuspendScript (FLevelLocals *Level, int script, const char *map)
|
|||
|
||||
void P_TerminateScript (FLevelLocals *Level, int script, const char *map)
|
||||
{
|
||||
if (strnicmp (Level->MapName, map, 8))
|
||||
if (strnicmp (Level->MapName.GetChars(), map, 8))
|
||||
addDefered (FindLevelInfo (map), acsdefered_t::defterminate, script, NULL, 0, NULL);
|
||||
else
|
||||
SetScriptState (Level->ACSThinker, script, DLevelScript::SCRIPT_PleaseRemove);
|
||||
|
|
|
@ -384,7 +384,7 @@ DEFINE_ACTION_FUNCTION(AActor, GetCVar)
|
|||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_STRING(cvarname);
|
||||
|
||||
FBaseCVar *cvar = GetCVar(self->player ? int(self->player - players) : -1, cvarname);
|
||||
FBaseCVar *cvar = GetCVar(self->player ? int(self->player - players) : -1, cvarname.GetChars());
|
||||
if (cvar == nullptr)
|
||||
{
|
||||
ret->SetFloat(0);
|
||||
|
@ -414,7 +414,7 @@ DEFINE_ACTION_FUNCTION(AActor, GetCVarString)
|
|||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_STRING(cvarname);
|
||||
|
||||
FBaseCVar *cvar = GetCVar(self->player? int(self->player - players) : -1, cvarname);
|
||||
FBaseCVar *cvar = GetCVar(self->player? int(self->player - players) : -1, cvarname.GetChars());
|
||||
if (cvar == nullptr)
|
||||
{
|
||||
ret->SetString("");
|
||||
|
@ -1306,7 +1306,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Print)
|
|||
{
|
||||
con_midtime = float(time);
|
||||
}
|
||||
FString formatted = strbin1(text);
|
||||
FString formatted = strbin1(text.GetChars());
|
||||
C_MidPrint(font, formatted.GetChars());
|
||||
con_midtime = saved;
|
||||
}
|
||||
|
@ -1338,7 +1338,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PrintBold)
|
|||
{
|
||||
con_midtime = float(time);
|
||||
}
|
||||
FString formatted = strbin1(text);
|
||||
FString formatted = strbin1(text.GetChars());
|
||||
C_MidPrint(font, formatted.GetChars(), true);
|
||||
con_midtime = saved;
|
||||
return 0;
|
||||
|
@ -1359,7 +1359,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Log)
|
|||
if (local && !self->CheckLocalView()) return 0;
|
||||
|
||||
if (text[0] == '$') text = GStrings(&text[1]);
|
||||
FString formatted = strbin1(text);
|
||||
FString formatted = strbin1(text.GetChars());
|
||||
Printf("%s\n", formatted.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
@ -2686,7 +2686,7 @@ DEFINE_ACTION_FUNCTION(AActor, CheckFlag)
|
|||
PARAM_INT (checkpointer);
|
||||
|
||||
AActor *owner = COPY_AAPTR(self, checkpointer);
|
||||
ACTION_RETURN_BOOL(owner != nullptr && CheckActorFlag(owner, flagname));
|
||||
ACTION_RETURN_BOOL(owner != nullptr && CheckActorFlag(owner, flagname.GetChars()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -5080,7 +5080,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SprayDecal)
|
|||
PARAM_FLOAT(direction_z);
|
||||
PARAM_BOOL(useBloodColor);
|
||||
PARAM_COLOR(decalColor);
|
||||
SprayDecal(self, name, dist, DVector3(offset_x, offset_y, offset_z), DVector3(direction_x, direction_y, direction_z), useBloodColor, decalColor);
|
||||
SprayDecal(self, name.GetChars(), dist, DVector3(offset_x, offset_y, offset_z), DVector3(direction_x, direction_y, direction_z), useBloodColor, decalColor);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -5089,7 +5089,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetMugshotState)
|
|||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_STRING(name);
|
||||
if (self->CheckLocalView())
|
||||
StatusBar->SetMugShotState(name);
|
||||
StatusBar->SetMugShotState(name.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
|
|||
}
|
||||
|
||||
FString obit = DamageTypeDefinition::GetObituary(mod);
|
||||
if (attacker == nullptr && obit.IsNotEmpty()) messagename = obit;
|
||||
if (attacker == nullptr && obit.IsNotEmpty()) messagename = obit.GetChars();
|
||||
else
|
||||
{
|
||||
switch (mod.GetIndex())
|
||||
|
@ -249,11 +249,11 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
|
|||
else
|
||||
{
|
||||
lookup.Format("$Obituary_%s_%s", attacker->GetClass()->TypeName.GetChars(), mod.GetChars());
|
||||
if (GStrings[lookup.GetChars() + 1]) message = lookup;
|
||||
if (GStrings[lookup.GetChars() + 1]) message = lookup.GetChars();
|
||||
else
|
||||
{
|
||||
lookup.Format("$Obituary_%s", attacker->GetClass()->TypeName.GetChars());
|
||||
if (GStrings[lookup.GetChars() + 1]) message = lookup;
|
||||
if (GStrings[lookup.GetChars() + 1]) message = lookup.GetChars();
|
||||
else
|
||||
{
|
||||
IFVIRTUALPTR(attacker, AActor, GetObituary)
|
||||
|
@ -261,7 +261,7 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
|
|||
VMValue params[] = { attacker, self, inflictor, mod.GetIndex(), !!(dmgflags & DMG_PLAYERATTACK) };
|
||||
VMReturn rett(&ret);
|
||||
VMCall(func, params, countof(params), &rett, 1);
|
||||
if (ret.IsNotEmpty()) message = ret;
|
||||
if (ret.IsNotEmpty()) message = ret.GetChars();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -283,12 +283,12 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
|
|||
if (mod == NAME_Melee)
|
||||
{
|
||||
FStringf ob("DEFHITOB_%s", cls);
|
||||
message = GStrings.GetString(ob, nullptr, self->player->userinfo.GetGender());
|
||||
message = GStrings.GetString(ob.GetChars(), nullptr, self->player->userinfo.GetGender());
|
||||
}
|
||||
if (message == nullptr)
|
||||
{
|
||||
FStringf ob("DEFOB_%s", cls);
|
||||
message = GStrings.GetString(ob, nullptr, self->player->userinfo.GetGender());
|
||||
message = GStrings.GetString(ob.GetChars(), nullptr, self->player->userinfo.GetGender());
|
||||
}
|
||||
if (message == nullptr)
|
||||
{
|
||||
|
|
|
@ -1082,7 +1082,7 @@ FUNC(LS_Generic_Lift)
|
|||
FUNC(LS_Exit_Normal)
|
||||
// Exit_Normal (position)
|
||||
{
|
||||
if (Level->CheckIfExitIsGood (it, FindLevelInfo(Level->NextMap)))
|
||||
if (Level->CheckIfExitIsGood (it, FindLevelInfo(Level->NextMap.GetChars())))
|
||||
{
|
||||
Level->ExitLevel (arg0, false);
|
||||
return true;
|
||||
|
@ -1110,7 +1110,7 @@ FUNC(LS_Teleport_NewMap)
|
|||
|
||||
if (info && Level->CheckIfExitIsGood (it, info))
|
||||
{
|
||||
Level->ChangeLevel(info->MapName, arg1, arg2 ? CHANGELEVEL_KEEPFACING : 0);
|
||||
Level->ChangeLevel(info->MapName.GetChars(), arg1, arg2 ? CHANGELEVEL_KEEPFACING : 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1928,11 +1928,11 @@ FUNC(LS_ACS_Execute)
|
|||
|
||||
if (arg1 == 0)
|
||||
{
|
||||
mapname = Level->MapName;
|
||||
mapname = Level->MapName.GetChars();
|
||||
}
|
||||
else if ((info = FindLevelByNum(arg1)) != NULL)
|
||||
{
|
||||
mapname = info->MapName;
|
||||
mapname = info->MapName.GetChars();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1951,11 +1951,11 @@ FUNC(LS_ACS_ExecuteAlways)
|
|||
|
||||
if (arg1 == 0)
|
||||
{
|
||||
mapname = Level->MapName;
|
||||
mapname = Level->MapName.GetChars();
|
||||
}
|
||||
else if ((info = FindLevelByNum(arg1)) != NULL)
|
||||
{
|
||||
mapname = info->MapName;
|
||||
mapname = info->MapName.GetChars();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1991,7 +1991,7 @@ FUNC(LS_ACS_ExecuteWithResult)
|
|||
int args[4] = { arg1, arg2, arg3, arg4 };
|
||||
int flags = (backSide ? ACS_BACKSIDE : 0) | ACS_ALWAYS | ACS_WANTRESULT;
|
||||
|
||||
return P_StartScript (Level, it, ln, arg0, Level->MapName, args, 4, flags);
|
||||
return P_StartScript (Level, it, ln, arg0, Level->MapName.GetChars(), args, 4, flags);
|
||||
}
|
||||
|
||||
FUNC(LS_ACS_Suspend)
|
||||
|
@ -2000,9 +2000,9 @@ FUNC(LS_ACS_Suspend)
|
|||
level_info_t *info;
|
||||
|
||||
if (arg1 == 0)
|
||||
P_SuspendScript (Level, arg0, Level->MapName);
|
||||
P_SuspendScript (Level, arg0, Level->MapName.GetChars());
|
||||
else if ((info = FindLevelByNum (arg1)) )
|
||||
P_SuspendScript (Level, arg0, info->MapName);
|
||||
P_SuspendScript (Level, arg0, info->MapName.GetChars());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2013,9 +2013,9 @@ FUNC(LS_ACS_Terminate)
|
|||
level_info_t *info;
|
||||
|
||||
if (arg1 == 0)
|
||||
P_TerminateScript (Level, arg0, Level->MapName);
|
||||
P_TerminateScript (Level, arg0, Level->MapName.GetChars());
|
||||
else if ((info = FindLevelByNum (arg1)) )
|
||||
P_TerminateScript (Level, arg0, info->MapName);
|
||||
P_TerminateScript (Level, arg0, info->MapName.GetChars());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -3258,7 +3258,7 @@ FUNC(LS_SendToCommunicator)
|
|||
// Get the message from the LANGUAGE lump.
|
||||
FString msg;
|
||||
msg.Format("TXT_COMM%d", arg2);
|
||||
const char *str = GStrings[msg];
|
||||
const char *str = GStrings[msg.GetChars()];
|
||||
if (str != NULL)
|
||||
{
|
||||
Printf (PRINT_CHAT, "%s\n", str);
|
||||
|
|
|
@ -5299,7 +5299,7 @@ AActor *FLevelLocals::SpawnPlayer (FPlayerStart *mthing, int playernum, int flag
|
|||
}
|
||||
|
||||
// [GRB] Reset skin
|
||||
p->userinfo.SkinNumChanged(R_FindSkin (Skins[p->userinfo.GetSkin()].Name, p->CurrentPlayerClass));
|
||||
p->userinfo.SkinNumChanged(R_FindSkin (Skins[p->userinfo.GetSkin()].Name.GetChars(), p->CurrentPlayerClass));
|
||||
|
||||
if (!(mobj->flags2 & MF2_DONTTRANSLATE))
|
||||
{
|
||||
|
|
|
@ -430,7 +430,7 @@ DEFINE_ACTION_FUNCTION(_PlayerInfo, SetLogText)
|
|||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(player_t);
|
||||
PARAM_STRING(log);
|
||||
self->SetLogText(log);
|
||||
self->SetLogText(log.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -828,16 +828,16 @@ static int SetupCrouchSprite(AActor *self, int crouchsprite)
|
|||
FString normspritename = sprites[self->SpawnState->sprite].name;
|
||||
FString crouchspritename = sprites[crouchsprite].name;
|
||||
|
||||
int spritenorm = fileSystem.CheckNumForName(normspritename + "A1", FileSys::ns_sprites);
|
||||
int spritenorm = fileSystem.CheckNumForName((normspritename + "A1").GetChars(), FileSys::ns_sprites);
|
||||
if (spritenorm == -1)
|
||||
{
|
||||
spritenorm = fileSystem.CheckNumForName(normspritename + "A0", FileSys::ns_sprites);
|
||||
spritenorm = fileSystem.CheckNumForName((normspritename + "A0").GetChars(), FileSys::ns_sprites);
|
||||
}
|
||||
|
||||
int spritecrouch = fileSystem.CheckNumForName(crouchspritename + "A1", FileSys::ns_sprites);
|
||||
int spritecrouch = fileSystem.CheckNumForName((crouchspritename + "A1").GetChars(), FileSys::ns_sprites);
|
||||
if (spritecrouch == -1)
|
||||
{
|
||||
spritecrouch = fileSystem.CheckNumForName(crouchspritename + "A0", FileSys::ns_sprites);
|
||||
spritecrouch = fileSystem.CheckNumForName((crouchspritename + "A0").GetChars(), FileSys::ns_sprites);
|
||||
}
|
||||
|
||||
if (spritenorm == -1 || spritecrouch == -1)
|
||||
|
@ -1711,7 +1711,7 @@ void player_t::Serialize(FSerializer &arc)
|
|||
}
|
||||
if (skinname.IsNotEmpty())
|
||||
{
|
||||
userinfo.SkinChanged(skinname, CurrentPlayerClass);
|
||||
userinfo.SkinChanged(skinname.GetChars(), CurrentPlayerClass);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ void FCanvasTextureInfo::Add (AActor *viewpoint, FTextureID picnum, double fov)
|
|||
|
||||
void SetCameraToTexture(AActor *viewpoint, const FString &texturename, double fov)
|
||||
{
|
||||
FTextureID textureid = TexMan.CheckForTexture(texturename, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
FTextureID textureid = TexMan.CheckForTexture(texturename.GetChars(), ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
if (textureid.isValid())
|
||||
{
|
||||
// Only proceed if the texture actually has a canvas.
|
||||
|
|
|
@ -614,7 +614,7 @@ DEFINE_ACTION_FUNCTION(_Translation, SetPlayerTranslation)
|
|||
|
||||
if (cls != nullptr)
|
||||
{
|
||||
PlayerSkin = R_FindSkin(Skins[PlayerSkin].Name, int(cls - &PlayerClasses[0]));
|
||||
PlayerSkin = R_FindSkin(Skins[PlayerSkin].Name.GetChars(), int(cls - &PlayerClasses[0]));
|
||||
FRemapTable remap;
|
||||
R_GetPlayerTranslation(PlayerColor, GetColorSet(cls->Type, PlayerColorset),
|
||||
&Skins[PlayerSkin], &remap);
|
||||
|
|
|
@ -335,7 +335,7 @@ void R_InitSpriteDefs ()
|
|||
for (i = 0; i < smax; ++i)
|
||||
{
|
||||
auto tex = TexMan.GameByIndex(i);
|
||||
if (tex->GetUseType() == ETextureType::Sprite && strlen(tex->GetName()) >= 6)
|
||||
if (tex->GetUseType() == ETextureType::Sprite && strlen(tex->GetName().GetChars()) >= 6)
|
||||
{
|
||||
size_t bucket = TEX_DWNAME(tex) % smax;
|
||||
hashes[i].Next = hashes[bucket].Head;
|
||||
|
@ -721,11 +721,11 @@ void R_InitSkins (void)
|
|||
{
|
||||
if (stricmp (key, "*pain") == 0)
|
||||
{ // Replace all pain sounds in one go
|
||||
aliasid = S_AddPlayerSound (Skins[i].Name, Skins[i].gender,
|
||||
aliasid = S_AddPlayerSound (Skins[i].Name.GetChars(), Skins[i].gender,
|
||||
playersoundrefs[0], lump, true);
|
||||
for (int l = 3; l > 0; --l)
|
||||
{
|
||||
S_AddPlayerSoundExisting (Skins[i].Name, Skins[i].gender,
|
||||
S_AddPlayerSoundExisting (Skins[i].Name.GetChars(), Skins[i].gender,
|
||||
playersoundrefs[l], aliasid, true);
|
||||
}
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ void R_InitSkins (void)
|
|||
auto sndref = soundEngine->FindSoundNoHash (key);
|
||||
if (sndref.isvalid())
|
||||
{
|
||||
S_AddPlayerSound (Skins[i].Name, Skins[i].gender, sndref, lump, true);
|
||||
S_AddPlayerSound (Skins[i].Name.GetChars(), Skins[i].gender, sndref, lump, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -888,12 +888,12 @@ void R_InitSkins (void)
|
|||
{
|
||||
if (j == 0 || sndlumps[j] != sndlumps[j-1])
|
||||
{
|
||||
aliasid = S_AddPlayerSound (Skins[i].Name, Skins[i].gender,
|
||||
aliasid = S_AddPlayerSound (Skins[i].Name.GetChars(), Skins[i].gender,
|
||||
playersoundrefs[j], sndlumps[j], true);
|
||||
}
|
||||
else
|
||||
{
|
||||
S_AddPlayerSoundExisting (Skins[i].Name, Skins[i].gender,
|
||||
S_AddPlayerSoundExisting (Skins[i].Name.GetChars(), Skins[i].gender,
|
||||
playersoundrefs[j], aliasid, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue