MM: XEEN: Fix Overloaded Virtuals Shadowing Warnings

These are emitted by GCC-13 if -Woverloaded-virtual is passed.
This commit is contained in:
D G Turner 2023-12-03 22:32:07 +00:00
parent a043900214
commit 4bf543f6e7
3 changed files with 11 additions and 11 deletions

View File

@ -1138,7 +1138,7 @@ int ArenaLocation::show() {
for (uint idx = 0; idx < monsters.size(); ++idx) {
MazeMonster &monster = monsters[idx];
if (monster._position.x != 0x80 && monster._position.y != 0x80) {
LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER,
LocationMessage::showMessage(27, Res.WARZONE_BATTLE_MASTER,
map._events._text[4], 300);
goto exit;
}
@ -1154,7 +1154,7 @@ int ArenaLocation::show() {
int suffixNum = (count < 10) ? count : 0;
Common::String msg = Common::String::format(format.c_str(), count, SUFFIXES[suffixNum]);
LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, msg, 1);
LocationMessage::showMessage(27, Res.WARZONE_BATTLE_MASTER, msg, 1);
map.load(28);
goto exit;
@ -1162,15 +1162,15 @@ int ArenaLocation::show() {
for (uint idx = 0; idx < party._activeParty.size(); ++idx) {
if (party._activeParty[idx]._awards[WARZONE_AWARD] >= 99) {
LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, Res.WARZONE_MAXED, 1);
LocationMessage::showMessage(27, Res.WARZONE_BATTLE_MASTER, Res.WARZONE_MAXED, 1);
map.load(28);
goto exit;
}
}
check = LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, map._events._text[0].c_str(), 0);
check = LocationMessage::showMessage(27, Res.WARZONE_BATTLE_MASTER, map._events._text[0].c_str(), 0);
if (!check) {
LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER,
LocationMessage::showMessage(27, Res.WARZONE_BATTLE_MASTER,
map._events._text[1].c_str(), 300);
windows.closeAll();
map.load(6);
@ -1180,20 +1180,20 @@ int ArenaLocation::show() {
}
do {
LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, Res.WARZONE_LEVEL, 2);
LocationMessage::showMessage(27, Res.WARZONE_BATTLE_MASTER, Res.WARZONE_LEVEL, 2);
level = NumericInput::show(g_vm, 11, 2, 200);
} while (!g_vm->shouldExit() && level > 10);
if (level == 0)
goto exit;
do {
LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, Res.WARZONE_HOW_MANY, 2);
LocationMessage::showMessage(27, Res.WARZONE_BATTLE_MASTER, Res.WARZONE_HOW_MANY, 2);
howMany = NumericInput::show(g_vm, 11, 2, 200);
} while (!g_vm->shouldExit() && howMany > 20);
if (howMany == 0)
goto exit;
LocationMessage::show(27, Res.WARZONE_BATTLE_MASTER, map._events._text[2], 1);
LocationMessage::showMessage(27, Res.WARZONE_BATTLE_MASTER, map._events._text[2], 1);
// Clear monsters array
party._mazeDirection = DIR_EAST;
@ -2346,7 +2346,7 @@ int LocationManager::wait() {
/*------------------------------------------------------------------------*/
bool LocationMessage::show(int portrait, const Common::String &name,
bool LocationMessage::showMessage(int portrait, const Common::String &name,
const Common::String &text, int confirm) {
LocationMessage *dlg = new LocationMessage();
bool result = dlg->execute(portrait, name, text, confirm);

View File

@ -374,7 +374,7 @@ private:
void loadButtons();
public:
static bool show(int portrait, const Common::String &name,
static bool showMessage(int portrait, const Common::String &name,
const Common::String &text, int confirm);
};

View File

@ -456,7 +456,7 @@ bool Scripts::cmdNPC(ParamsIterator &params) {
int confirm = params.readByte();
int lineNum = params.readByte();
if (LocationMessage::show(portrait, _message, map._events._text[textNum],
if (LocationMessage::showMessage(portrait, _message, map._events._text[textNum],
confirm)) {
_lineNum = lineNum;
return false;