mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom into zscript
This commit is contained in:
commit
c9ee17cdcd
4 changed files with 18 additions and 17 deletions
|
@ -282,7 +282,7 @@ struct FCommandBuffer
|
||||||
|
|
||||||
void CursorEnd()
|
void CursorEnd()
|
||||||
{
|
{
|
||||||
CursorPos = Text.Len();
|
CursorPos = (unsigned)Text.Len();
|
||||||
StartPos = 0;
|
StartPos = 0;
|
||||||
MakeStartPosGood();
|
MakeStartPosGood();
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ struct FCommandBuffer
|
||||||
{
|
{
|
||||||
Text.Insert(CursorPos, clip);
|
Text.Insert(CursorPos, clip);
|
||||||
}
|
}
|
||||||
CursorPos += clip.Len();
|
CursorPos += (unsigned)clip.Len();
|
||||||
MakeStartPosGood();
|
MakeStartPosGood();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -366,7 +366,7 @@ struct FCommandBuffer
|
||||||
void SetString(FString str)
|
void SetString(FString str)
|
||||||
{
|
{
|
||||||
Text = str;
|
Text = str;
|
||||||
CursorPos = Text.Len();
|
CursorPos = (unsigned)Text.Len();
|
||||||
MakeStartPosGood();
|
MakeStartPosGood();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -404,9 +404,9 @@ private:
|
||||||
};
|
};
|
||||||
static FNotifyBuffer NotifyStrings;
|
static FNotifyBuffer NotifyStrings;
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, con_numnotify, NUMNOTIFIES, CVAR_GLOBALCONFIG | CVAR_ARCHIVE)
|
CUSTOM_CVAR(Int, con_notifylines, NUMNOTIFIES, CVAR_GLOBALCONFIG | CVAR_ARCHIVE)
|
||||||
{
|
{
|
||||||
NotifyStrings.Shift(con_numnotify);
|
NotifyStrings.Shift(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ void C_DeinitConsole ()
|
||||||
while (hist != NULL)
|
while (hist != NULL)
|
||||||
{
|
{
|
||||||
History *next = hist->Newer;
|
History *next = hist->Newer;
|
||||||
free (hist);
|
delete hist;
|
||||||
hist = next;
|
hist = next;
|
||||||
}
|
}
|
||||||
HistTail = HistHead = HistPos = NULL;
|
HistTail = HistHead = HistPos = NULL;
|
||||||
|
@ -711,7 +711,7 @@ void FNotifyBuffer::AddString(int printlevel, FString source)
|
||||||
source.IsEmpty() ||
|
source.IsEmpty() ||
|
||||||
gamestate == GS_FULLCONSOLE ||
|
gamestate == GS_FULLCONSOLE ||
|
||||||
gamestate == GS_DEMOSCREEN ||
|
gamestate == GS_DEMOSCREEN ||
|
||||||
con_numnotify == 0)
|
con_notifylines == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ConsoleDrawing)
|
if (ConsoleDrawing)
|
||||||
|
@ -755,9 +755,9 @@ void FNotifyBuffer::AddString(int printlevel, FString source)
|
||||||
newline.PrintLevel = printlevel;
|
newline.PrintLevel = printlevel;
|
||||||
if (AddType == NEWLINE || Text.Size() == 0)
|
if (AddType == NEWLINE || Text.Size() == 0)
|
||||||
{
|
{
|
||||||
if (con_numnotify > 0)
|
if (con_notifylines > 0)
|
||||||
{
|
{
|
||||||
Shift(con_numnotify - 1);
|
Shift(con_notifylines - 1);
|
||||||
}
|
}
|
||||||
Text.Push(newline);
|
Text.Push(newline);
|
||||||
}
|
}
|
||||||
|
@ -1659,7 +1659,7 @@ CCMD (history)
|
||||||
|
|
||||||
while (hist)
|
while (hist)
|
||||||
{
|
{
|
||||||
Printf (" %s\n", hist->String);
|
Printf (" %s\n", hist->String.GetChars());
|
||||||
hist = hist->Newer;
|
hist = hist->Newer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1862,7 +1862,7 @@ static void C_TabComplete (bool goForward)
|
||||||
}
|
}
|
||||||
TabStart = i;
|
TabStart = i;
|
||||||
|
|
||||||
TabSize = CmdLine.Text.Len() - TabStart;
|
TabSize = (int)CmdLine.Text.Len() - TabStart;
|
||||||
|
|
||||||
if (!FindTabCommand(&CmdLine.Text[TabStart], &TabPos, TabSize))
|
if (!FindTabCommand(&CmdLine.Text[TabStart], &TabPos, TabSize))
|
||||||
return; // No initial matches
|
return; // No initial matches
|
||||||
|
@ -1922,7 +1922,7 @@ static void C_TabComplete (bool goForward)
|
||||||
CmdLine.Text << TabCommands[TabPos].TabName << ' ';
|
CmdLine.Text << TabCommands[TabPos].TabName << ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CmdLine.CursorPos = CmdLine.Text.Len();
|
CmdLine.CursorPos = (unsigned)CmdLine.Text.Len();
|
||||||
CmdLine.MakeStartPosGood();
|
CmdLine.MakeStartPosGood();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1996,7 +1996,7 @@ static bool C_TabCompleteList ()
|
||||||
TabSize = commonsize;
|
TabSize = commonsize;
|
||||||
CmdLine.Text.Truncate(TabStart);
|
CmdLine.Text.Truncate(TabStart);
|
||||||
CmdLine.Text.AppendCStrPart(TabCommands[TabPos].TabName.GetChars(), commonsize);
|
CmdLine.Text.AppendCStrPart(TabCommands[TabPos].TabName.GetChars(), commonsize);
|
||||||
CmdLine.CursorPos = CmdLine.Text.Len();
|
CmdLine.CursorPos = (unsigned)CmdLine.Text.Len();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,8 @@ void FResourceLump::LumpNameSetup(FString iname)
|
||||||
{
|
{
|
||||||
long slash = iname.LastIndexOf('/');
|
long slash = iname.LastIndexOf('/');
|
||||||
FString base = (slash >= 0) ? iname.Mid(slash + 1) : iname;
|
FString base = (slash >= 0) ? iname.Mid(slash + 1) : iname;
|
||||||
base.Truncate(base.LastIndexOf('.'));
|
auto dot = base.LastIndexOf('.');
|
||||||
|
if (dot >= 0) base.Truncate(dot);
|
||||||
uppercopy(Name, base);
|
uppercopy(Name, base);
|
||||||
Name[8] = 0;
|
Name[8] = 0;
|
||||||
FullName = iname;
|
FullName = iname;
|
||||||
|
|
|
@ -163,7 +163,7 @@ static const char *StringToUnicode(const char *cc, int size = -1)
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int count1 = 0;
|
int count1 = 0;
|
||||||
out.Clear();
|
out.Clear();
|
||||||
while (ch = (*c++) & 255)
|
while ((ch = (*c++) & 255))
|
||||||
{
|
{
|
||||||
count1++;
|
count1++;
|
||||||
if (ch >= 128)
|
if (ch >= 128)
|
||||||
|
@ -181,7 +181,7 @@ static const char *StringToUnicode(const char *cc, int size = -1)
|
||||||
out.Last() = 0;
|
out.Last() = 0;
|
||||||
c = cc;
|
c = cc;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (ch = (*c++) & 255)
|
while ((ch = (*c++) & 255))
|
||||||
{
|
{
|
||||||
utf8_encode(ch, &out[i], &count1);
|
utf8_encode(ch, &out[i], &count1);
|
||||||
i += count1;
|
i += count1;
|
||||||
|
|
|
@ -397,7 +397,7 @@ void FString::Remove(size_t index, size_t remlen)
|
||||||
if (Data()->RefCount == 1)
|
if (Data()->RefCount == 1)
|
||||||
{ // Can do this in place
|
{ // Can do this in place
|
||||||
memmove(Chars + index, Chars + index + remlen, Len() - index - remlen);
|
memmove(Chars + index, Chars + index + remlen, Len() - index - remlen);
|
||||||
Data()->Len -= remlen;
|
Data()->Len -= (unsigned)remlen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Must do it in a copy
|
{ // Must do it in a copy
|
||||||
|
|
Loading…
Reference in a new issue