mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
a few Getchars
This commit is contained in:
parent
90eb9ceafe
commit
7cffe6e3f0
5 changed files with 17 additions and 17 deletions
|
@ -250,7 +250,7 @@ void FActorInfo::ResolveTextures(const char* clsname, DCoreActor* defaults)
|
|||
SpriteSet.Resize(SpriteSetNames.Size());
|
||||
for (unsigned i = 0; i < SpriteSet.Size(); i++)
|
||||
{
|
||||
SpriteSet[i] = TexMan.CheckForTexture(SpriteSetNames[i], ETextureType::Any);
|
||||
SpriteSet[i] = TexMan.CheckForTexture(SpriteSetNames[i].GetChars(), ETextureType::Any);
|
||||
// This should later be enabled to user content.
|
||||
//if (SpriteSet[i] == -1) Printf(TEXTCOLOR_RED "Unknown texture '%s' in sprite set for class %s\n", SpriteSetNames[i].GetChars(), clsname);
|
||||
}
|
||||
|
|
|
@ -254,7 +254,7 @@ void ChangeLevel(MapRecord* map, int skill, bool bossexit)
|
|||
Net_WriteByte(DEM_CHANGEMAP);
|
||||
Net_WriteByte(skill);
|
||||
Net_WriteByte(bossexit);
|
||||
Net_WriteString(map? map->labelName : nullptr);
|
||||
Net_WriteString(map? map->labelName.GetChars() : nullptr);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -302,7 +302,7 @@ static MapRecord* levelwarp_common(FCommandLine& argv, const char *cmdname, cons
|
|||
else Printf(PRINT_BOLD, "Level %s not found!\n", argv[1]);
|
||||
return nullptr;
|
||||
}
|
||||
if (fileSystem.FindFile(map->fileName) < 0)
|
||||
if (fileSystem.FindFile(map->fileName.GetChars()) < 0)
|
||||
{
|
||||
Printf(PRINT_BOLD, "%s: map file not found\n", map->fileName.GetChars());
|
||||
}
|
||||
|
@ -387,7 +387,7 @@ CCMD(changemap)
|
|||
#endif
|
||||
|
||||
FString mapname = argv[1];
|
||||
auto map = FindMapByName(mapname);
|
||||
auto map = FindMapByName(mapname.GetChars());
|
||||
if (map == nullptr)
|
||||
{
|
||||
// got a user map
|
||||
|
@ -400,7 +400,7 @@ CCMD(changemap)
|
|||
Printf(PRINT_BOLD, "%s: Cannot warp to user maps.\n", mapname.GetChars());
|
||||
return;
|
||||
}
|
||||
if (fileSystem.FindFile(map->fileName) < 0)
|
||||
if (fileSystem.FindFile(map->fileName.GetChars()) < 0)
|
||||
{
|
||||
Printf(PRINT_BOLD, "%s: map file not found\n", map->fileName.GetChars());
|
||||
}
|
||||
|
@ -435,11 +435,11 @@ CCMD(map)
|
|||
auto map = FindMapByName(argv[1]);
|
||||
if (map == nullptr)
|
||||
{
|
||||
map = SetupUserMap(mapfilename, g_gameType & GAMEFLAG_DUKE ? "dethtoll.mid" : nullptr);
|
||||
map = SetupUserMap(mapfilename.GetChars(), g_gameType & GAMEFLAG_DUKE ? "dethtoll.mid" : nullptr);
|
||||
}
|
||||
if (map)
|
||||
{
|
||||
if (fileSystem.FindFile(map->fileName) < 0)
|
||||
if (fileSystem.FindFile(map->fileName.GetChars()) < 0)
|
||||
{
|
||||
Printf(PRINT_BOLD, "%s: map file not found\n", map->fileName.GetChars());
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ CCMD(skill)
|
|||
auto currentSkill = gi->GetCurrentSkill();
|
||||
if (currentSkill >= 0)
|
||||
{
|
||||
Printf("Current skill is %d (%s)\n", currentSkill, GStrings.localize(gSkillNames[currentSkill]));
|
||||
Printf("Current skill is %d (%s)\n", currentSkill, GStrings.localize(gSkillNames[currentSkill].GetChars()));
|
||||
}
|
||||
else if (currentSkill == -1)
|
||||
{
|
||||
|
@ -551,7 +551,7 @@ CCMD(skill)
|
|||
Printf("Please specify a skill level between 0 and %d\n", maxvalidskills - 1);
|
||||
for (auto i = 0; i < maxvalidskills; i++)
|
||||
{
|
||||
Printf("%d = '%s'\n", i, GStrings.localize(gSkillNames[i]));
|
||||
Printf("%d = '%s'\n", i, GStrings.localize(gSkillNames[i].GetChars()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,14 +144,14 @@ void FNotifyBuffer::DrawNative()
|
|||
|
||||
if (!center)
|
||||
{
|
||||
DrawText(twod, font, CR_UNTRANSLATED, 0, line, notify.Text,
|
||||
DrawText(twod, font, CR_UNTRANSLATED, 0, line, notify.Text.GetChars(),
|
||||
DTA_FullscreenScale, FSMode_ScaleToHeight,
|
||||
DTA_VirtualWidthF, 320 * scale, DTA_VirtualHeightF, 200 * scale, DTA_KeepRatio, true,
|
||||
DTA_Alpha, alpha, TAG_DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawText(twod, font, CR_UNTRANSLATED, 160 * scale - font->StringWidth(notify.Text) / 2, line, notify.Text,
|
||||
DrawText(twod, font, CR_UNTRANSLATED, 160 * scale - font->StringWidth(notify.Text) / 2, line, notify.Text.GetChars(),
|
||||
DTA_FullscreenScale, FSMode_ScaleToHeight,
|
||||
DTA_VirtualWidthF, 320 * scale, DTA_VirtualHeightF, 200 * scale,
|
||||
DTA_Alpha, alpha, TAG_DONE);
|
||||
|
@ -222,7 +222,7 @@ void FNotifyBuffer::Draw()
|
|||
color = PrintColors[notify.PrintLevel];
|
||||
|
||||
if (!center)
|
||||
DrawText(twod, font, color, 0, line * NotifyFontScale, notify.Text,
|
||||
DrawText(twod, font, color, 0, line * NotifyFontScale, notify.Text.GetChars(),
|
||||
DTA_FullscreenScale, FSMode_ScaleToHeight,
|
||||
DTA_VirtualWidthF, 320. * scale,
|
||||
DTA_VirtualHeightF, 200. * scale,
|
||||
|
@ -230,7 +230,7 @@ void FNotifyBuffer::Draw()
|
|||
DTA_Alpha, alpha, TAG_DONE);
|
||||
else
|
||||
DrawText(twod, font, color, 160 * scale - font->StringWidth (notify.Text) / 2.,
|
||||
line, notify.Text,
|
||||
line, notify.Text.GetChars(),
|
||||
DTA_FullscreenScale, FSMode_ScaleToHeight,
|
||||
DTA_VirtualWidthF, 320. * scale,
|
||||
DTA_VirtualHeightF, 200. * scale,
|
||||
|
|
|
@ -162,7 +162,7 @@ bool CT_Responder (event_t *ev)
|
|||
else if (ev->data1 == 'V' && (ev->data3 & GKM_CTRL))
|
||||
#endif // __APPLE__
|
||||
{
|
||||
CT_PasteChat(I_GetFromClipboard(false));
|
||||
CT_PasteChat(I_GetFromClipboard(false).GetChars());
|
||||
}
|
||||
}
|
||||
else if (ev->subtype == EV_GUI_Char)
|
||||
|
@ -256,7 +256,7 @@ void CT_Drawer (void)
|
|||
twod->AddColorOnlyQuad(0, y, screen_width, screen_height, 0x80000000);
|
||||
DrawText(drawer, displayfont, CR_GREEN, 0, y, prompt.GetChars(),
|
||||
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
||||
DrawText(drawer, displayfont, CR_GREY, promptwidth, y, printstr,
|
||||
DrawText(drawer, displayfont, CR_GREY, promptwidth, y, printstr.GetChars(),
|
||||
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,12 +26,12 @@ public:
|
|||
|
||||
const char *GetQuote(int num)
|
||||
{
|
||||
return GStrings.localize(quotes[num]);
|
||||
return GStrings.localize(quotes[num].GetChars());
|
||||
}
|
||||
|
||||
const char *GetRawQuote(int num)
|
||||
{
|
||||
return quotes[num];
|
||||
return quotes[num].GetChars();
|
||||
}
|
||||
|
||||
void CopyQuote(int dst, int src)
|
||||
|
|
Loading…
Reference in a new issue