CINE: Fix warnings

This commit is contained in:
Eugene Sandulenko 2020-08-25 22:37:04 +02:00
parent caa2dda045
commit 956b33a411
3 changed files with 15 additions and 9 deletions

View File

@ -287,12 +287,14 @@ void manageEvents(CallSource callSource, EventTarget eventTarget, bool useMaxMou
case UNTIL_MOUSE_BUTTON_DOWN_OR_KEY_INPUT:
foundTarget = mouseButtonDown || keysPressed < g_cine->_keyInputList.size();
break;
default:
break;
}
uint32 now = g_system->getMillis();
frameEnded = (now >= frameEnd);
waitEnded = (now >= waitEnd);
if (foundTarget) {
switch (eventTarget) {
case UNTIL_MOUSE_BUTTON_UP_DOWN_UP:
@ -312,6 +314,8 @@ void manageEvents(CallSource callSource, EventTarget eventTarget, bool useMaxMou
checkWaitEnd = true;
foundTarget = false;
break;
default:
break;
}
}
@ -343,7 +347,7 @@ void manageEvents(CallSource callSource, EventTarget eventTarget, bool useMaxMou
eventMan->pushEvent(Common::Event());
continue;
}
updateScreen = updateAudio = (foundTarget || frameEnded);
if (updateScreen) {

View File

@ -441,8 +441,8 @@ int FWScript::o2_playSampleAlt() {
byte num = getNextByte();
byte channel = getNextByte();
uint16 frequency = getNextWord();
byte param4 = getNextByte();
uint16 param5 = getNextWord();
/* byte param4 = */getNextByte();
/* uint16 param5 = */getNextWord();
uint16 size = getNextWord();
if (size == 0xFFFF) {
@ -826,8 +826,8 @@ int FWScript::o2_setAdditionalBgVScroll() {
*/
int FWScript::o2_op9F() {
warning("o2_op9F()");
uint16 param1 = getNextWord();
uint16 param2 = getNextWord();
/* uint16 param1 = */getNextWord();
/* uint16 param2 = */getNextWord();
return 0;
}

View File

@ -878,6 +878,8 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X,
case Common::KEYCODE_DOWN:
selectionValueDiff++;
break;
default:
break;
}
g_cine->_keyInputList.pop_back();
}
@ -896,7 +898,7 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X,
}
currentSelection = CLIP<int16>(currentSelection + selectionValueDiff, 0, height - 1);
if (currentSelection != oldSelection) {
Common::Point currentSelectionCenter(X + width / 2, (currentSelection * 9) + Y + 8);
g_system->warpMouse(currentSelectionCenter.x, currentSelectionCenter.y);
@ -1846,12 +1848,12 @@ bool makeTextEntryMenu(const char *messagePtr, char *inputString, int stringMaxL
ch[1] = 0;
Common::KeyState keyState = Common::KeyState();
if (!g_cine->_keyInputList.empty()) {
keyState = g_cine->_keyInputList.back();
g_cine->_keyInputList.pop_back();
}
int keycode = keyState.keycode;
uint16 ascii = keyState.ascii;
uint16 mouseButton, mouseX, mouseY;