mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +00:00
- Fixed: GCC warnings.
SVN r2843 (trunk)
This commit is contained in:
parent
1e83634089
commit
15d74dab56
9 changed files with 16 additions and 15 deletions
|
@ -80,9 +80,9 @@ void M_SaveCustomKeys (FConfigFile *config, char *section, char *subsection, siz
|
||||||
{
|
{
|
||||||
for (unsigned i=0; i<KeySections.Size(); i++)
|
for (unsigned i=0; i<KeySections.Size(); i++)
|
||||||
{
|
{
|
||||||
mysnprintf (subsection, sublen, "%s.Bindings", KeySections[i].mSection);
|
mysnprintf (subsection, sublen, "%s.Bindings", KeySections[i].mSection.GetChars());
|
||||||
DoSaveKeys (config, section, &KeySections[i], false);
|
DoSaveKeys (config, section, &KeySections[i], false);
|
||||||
mysnprintf (subsection, sublen, "%s.DoubleBindings", KeySections[i].mSection);
|
mysnprintf (subsection, sublen, "%s.DoubleBindings", KeySections[i].mSection.GetChars());
|
||||||
DoSaveKeys (config, section, &KeySections[i], true);
|
DoSaveKeys (config, section, &KeySections[i], true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,7 +218,7 @@ bool DListMenu::MouseEvent(int type, int x, int y)
|
||||||
{
|
{
|
||||||
if (mDesc->mItems[i]->CheckCoordinate(x, y))
|
if (mDesc->mItems[i]->CheckCoordinate(x, y))
|
||||||
{
|
{
|
||||||
if (i != mDesc->mSelectedItem)
|
if (i != static_cast<unsigned int> (mDesc->mSelectedItem))
|
||||||
{
|
{
|
||||||
//S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
//S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ void DListMenu::Drawer ()
|
||||||
{
|
{
|
||||||
for(unsigned i=0;i<mDesc->mItems.Size(); i++)
|
for(unsigned i=0;i<mDesc->mItems.Size(); i++)
|
||||||
{
|
{
|
||||||
if (mDesc->mItems[i]->mEnabled) mDesc->mItems[i]->Drawer(mDesc->mSelectedItem == i);
|
if (mDesc->mItems[i]->mEnabled) mDesc->mItems[i]->Drawer(static_cast<unsigned int> (mDesc->mSelectedItem) == i);
|
||||||
}
|
}
|
||||||
if (mDesc->mSelectedItem >= 0 && mDesc->mSelectedItem < (int)mDesc->mItems.Size())
|
if (mDesc->mSelectedItem >= 0 && mDesc->mSelectedItem < (int)mDesc->mItems.Size())
|
||||||
mDesc->mItems[mDesc->mSelectedItem]->DrawSelector(mDesc->mSelectOfsX, mDesc->mSelectOfsY, mDesc->mSelector);
|
mDesc->mItems[mDesc->mSelectedItem]->DrawSelector(mDesc->mSelectOfsX, mDesc->mSelectOfsY, mDesc->mSelector);
|
||||||
|
|
|
@ -604,7 +604,7 @@ void DLoadSaveMenu::Drawer ()
|
||||||
{
|
{
|
||||||
color = CR_ORANGE;
|
color = CR_ORANGE;
|
||||||
}
|
}
|
||||||
else if (j == Selected)
|
else if (j == static_cast<unsigned int> (Selected))
|
||||||
{
|
{
|
||||||
color = CR_WHITE;
|
color = CR_WHITE;
|
||||||
}
|
}
|
||||||
|
@ -612,7 +612,7 @@ void DLoadSaveMenu::Drawer ()
|
||||||
{
|
{
|
||||||
color = CR_TAN;
|
color = CR_TAN;
|
||||||
}
|
}
|
||||||
if (j == Selected)
|
if (j == static_cast<unsigned int> (Selected))
|
||||||
{
|
{
|
||||||
screen->Clear (listboxLeft, listboxTop+rowHeight*i,
|
screen->Clear (listboxLeft, listboxTop+rowHeight*i,
|
||||||
listboxRight, listboxTop+rowHeight*(i+1), -1,
|
listboxRight, listboxTop+rowHeight*(i+1), -1,
|
||||||
|
|
|
@ -392,13 +392,13 @@ void DOptionMenu::Drawer ()
|
||||||
for (i = 0; i < mDesc->mItems.Size() && y <= lastrow; i++, y += fontheight)
|
for (i = 0; i < mDesc->mItems.Size() && y <= lastrow; i++, y += fontheight)
|
||||||
{
|
{
|
||||||
// Don't scroll the uppermost items
|
// Don't scroll the uppermost items
|
||||||
if (i == mDesc->mScrollTop)
|
if (i == static_cast<unsigned int> (mDesc->mScrollTop))
|
||||||
{
|
{
|
||||||
i += mDesc->mScrollPos;
|
i += mDesc->mScrollPos;
|
||||||
if (i >= mDesc->mItems.Size()) break; // skipped beyond end of menu
|
if (i >= mDesc->mItems.Size()) break; // skipped beyond end of menu
|
||||||
}
|
}
|
||||||
int cur_indent = mDesc->mItems[i]->Draw(mDesc, y, indent, mDesc->mSelectedItem == i);
|
int cur_indent = mDesc->mItems[i]->Draw(mDesc, y, indent, static_cast<unsigned int> (mDesc->mSelectedItem) == i);
|
||||||
if (cur_indent >= 0 && mDesc->mSelectedItem == i && mDesc->mItems[i]->Selectable())
|
if (cur_indent >= 0 && static_cast<unsigned int> (mDesc->mSelectedItem) == i && mDesc->mItems[i]->Selectable())
|
||||||
{
|
{
|
||||||
if (((DMenu::MenuTime%8) < 6) || DMenu::CurrentMenu != this)
|
if (((DMenu::MenuTime%8) < 6) || DMenu::CurrentMenu != this)
|
||||||
{
|
{
|
||||||
|
|
|
@ -802,7 +802,7 @@ void DPlayerMenu::UpdateSkins()
|
||||||
{
|
{
|
||||||
int j = PlayerSkins.Push(i);
|
int j = PlayerSkins.Push(i);
|
||||||
li->SetString(j, skins[i].name);
|
li->SetString(j, skins[i].name);
|
||||||
if (players[consoleplayer].userinfo.skin == i)
|
if (static_cast<unsigned int> (players[consoleplayer].userinfo.skin) == i)
|
||||||
{
|
{
|
||||||
sel = j;
|
sel = j;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1031,7 +1031,7 @@ public:
|
||||||
|
|
||||||
screen->DrawText (SmallFont, CR_GREEN, x, y, mResponseLines[i], DTA_Clean, true, TAG_DONE);
|
screen->DrawText (SmallFont, CR_GREEN, x, y, mResponseLines[i], DTA_Clean, true, TAG_DONE);
|
||||||
|
|
||||||
if (i == mResponses[response])
|
if (static_cast<unsigned int> (i) == mResponses[response])
|
||||||
{
|
{
|
||||||
char tbuf[16];
|
char tbuf[16];
|
||||||
|
|
||||||
|
|
|
@ -256,7 +256,7 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
||||||
// end of changed code
|
// end of changed code
|
||||||
if (developer && buttonSuccess)
|
if (developer && buttonSuccess)
|
||||||
{
|
{
|
||||||
Printf ("Line special %d activated on line %i\n", special, line - lines);
|
Printf ("Line special %d activated on line %i\n", special, static_cast<int> (line - lines));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -595,7 +595,7 @@ FString GetStatString()
|
||||||
CCMD(printstats)
|
CCMD(printstats)
|
||||||
{
|
{
|
||||||
StoreLevelStats(); // Refresh the current level's results.
|
StoreLevelStats(); // Refresh the current level's results.
|
||||||
Printf("%s", GetStatString());
|
Printf("%s", GetStatString().GetChars());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1200,6 +1200,7 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
|
||||||
bMultiPatch = true;
|
bMultiPatch = true;
|
||||||
sc.SetCMode(true);
|
sc.SetCMode(true);
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
|
const char* textureName = NULL;
|
||||||
if (sc.Compare("optional"))
|
if (sc.Compare("optional"))
|
||||||
{
|
{
|
||||||
bSilent = true;
|
bSilent = true;
|
||||||
|
@ -1208,11 +1209,11 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
|
||||||
{
|
{
|
||||||
// this is not right. Apparently a texture named 'optional' is being defined right now...
|
// this is not right. Apparently a texture named 'optional' is being defined right now...
|
||||||
sc.UnGet();
|
sc.UnGet();
|
||||||
sc.String = "optional";
|
textureName = "optional";
|
||||||
bSilent = false;
|
bSilent = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uppercopy(Name, sc.String);
|
uppercopy(Name, !textureName ? sc.String : textureName);
|
||||||
Name[8] = 0;
|
Name[8] = 0;
|
||||||
sc.MustGetStringName(",");
|
sc.MustGetStringName(",");
|
||||||
sc.MustGetNumber();
|
sc.MustGetNumber();
|
||||||
|
|
Loading…
Reference in a new issue