DREAMWEB: Replaced vsync() function with waitForVSync().

As a call to waitForVSync() was the only contents of vsync(), there
should be no functional change.
This commit is contained in:
D G Turner 2012-05-30 04:23:34 +01:00
parent 96ae10c749
commit ae31469a9a
12 changed files with 46 additions and 51 deletions

View file

@ -1135,7 +1135,6 @@ public:
void frameOutBh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); void frameOutBh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void frameOutFx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); void frameOutFx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void doShake(); void doShake();
void vSync();
void setMode(); void setMode();
void showPCX(const Common::String &suffix); void showPCX(const Common::String &suffix);
void showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, uint8 effectsFlag, uint8 width, uint8 height); void showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, uint8 effectsFlag, uint8 width, uint8 height);

View file

@ -62,11 +62,11 @@ void DreamWebEngine::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 d
readMouse(); readMouse();
showKeypad(); showKeypad();
showPointer(); showPointer();
vSync(); waitForVSync();
if (_pressCount == 0) { if (_pressCount == 0) {
_pressed = 255; _pressed = 255;
_graphicPress = 255; _graphicPress = 255;
vSync(); waitForVSync();
} else } else
--_pressCount; --_pressCount;
@ -252,7 +252,7 @@ void DreamWebEngine::useMenu() {
showMenu(); showMenu();
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpMenu(); dumpMenu();
dumpTextLine(); dumpTextLine();
@ -311,7 +311,7 @@ void DreamWebEngine::viewFolder() {
delPointer(); delPointer();
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
checkFolderCoords(); checkFolderCoords();
@ -508,7 +508,7 @@ void DreamWebEngine::enterSymbol() {
showSymbol(); showSymbol();
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
dumpSymbol(); dumpSymbol();
@ -743,7 +743,7 @@ void DreamWebEngine::useDiary() {
readMouse(); readMouse();
showDiaryKeys(); showDiaryKeys();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpDiaryKeys(); dumpDiaryKeys();
dumpTextLine(); dumpTextLine();

View file

@ -202,7 +202,7 @@ void DreamWebEngine::input() {
_cursLocY = _monAdY; _cursLocY = _monAdY;
while (true) { while (true) {
printCurs(); printCurs();
vSync(); waitForVSync();
delCurs(); delCurs();
readKey(); readKey();
if (_quitRequested) if (_quitRequested)
@ -318,8 +318,8 @@ void DreamWebEngine::accessLightOff() {
void DreamWebEngine::randomAccess(uint16 count) { void DreamWebEngine::randomAccess(uint16 count) {
for (uint16 i = 0; i < count; ++i) { for (uint16 i = 0; i < count; ++i) {
vSync(); waitForVSync();
vSync(); waitForVSync();
uint16 v = _rnd.getRandomNumber(15); uint16 v = _rnd.getRandomNumber(15);
if (v < 10) if (v < 10)
accessLightOff(); accessLightOff();

View file

@ -65,7 +65,7 @@ void DreamWebEngine::selectLocation() {
delPointer(); delPointer();
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();

View file

@ -147,7 +147,7 @@ void DreamWebEngine::examineOb(bool examineAgain) {
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
delPointer(); delPointer();

View file

@ -197,7 +197,7 @@ uint8 DreamWebEngine::kernChars(uint8 firstChar, uint8 secondChar, uint8 width)
uint16 DreamWebEngine::waitFrames() { uint16 DreamWebEngine::waitFrames() {
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
delPointer(); delPointer();
return _mouseButton; return _mouseButton;
@ -231,7 +231,7 @@ const char *DreamWebEngine::monPrint(const char *string) {
_cursLocY = _monAdY; _cursLocY = _monAdY;
_mainTimer = 1; _mainTimer = 1;
printCurs(); printCurs();
vSync(); waitForVSync();
lockMon(); lockMon();
delCurs(); delCurs();
} while (--count); } while (--count);
@ -261,9 +261,9 @@ void DreamWebEngine::rollEndCreditsGameWon() {
// then move it up one pixel until we shifted it by a complete // then move it up one pixel until we shifted it by a complete
// line of text. // line of text.
for (int j = 0; j < linespacing; ++j) { for (int j = 0; j < linespacing; ++j) {
vSync(); waitForVSync();
multiPut(_mapStore, 75, 20, 160, 160); multiPut(_mapStore, 75, 20, 160, 160);
vSync(); waitForVSync();
// Output up to 18 lines of text // Output up to 18 lines of text
uint16 y = 10 - j; uint16 y = 10 - j;
@ -273,7 +273,7 @@ void DreamWebEngine::rollEndCreditsGameWon() {
y += linespacing; y += linespacing;
} }
vSync(); waitForVSync();
multiDump(75, 20, 160, 160); multiDump(75, 20, 160, 160);
} }
@ -300,9 +300,9 @@ void DreamWebEngine::rollEndCreditsGameLost() {
// then move it up one pixel until we shifted it by a complete // then move it up one pixel until we shifted it by a complete
// line of text. // line of text.
for (int j = 0; j < linespacing; ++j) { for (int j = 0; j < linespacing; ++j) {
vSync(); waitForVSync();
multiPut(_mapStore, 25, 20, 160, 160); multiPut(_mapStore, 25, 20, 160, 160);
vSync(); waitForVSync();
// Output up to 18 lines of text // Output up to 18 lines of text
uint16 y = 10 - j; uint16 y = 10 - j;
@ -312,7 +312,7 @@ void DreamWebEngine::rollEndCreditsGameLost() {
y += linespacing; y += linespacing;
} }
vSync(); waitForVSync();
multiDump(25, 20, 160, 160); multiDump(25, 20, 160, 160);
if (_lastHardKey == 1) if (_lastHardKey == 1)

View file

@ -136,7 +136,7 @@ void DreamWebEngine::doLoad(int savegameId) {
delPointer(); delPointer();
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
RectWithCallback loadlist[] = { RectWithCallback loadlist[] = {
@ -227,7 +227,7 @@ void DreamWebEngine::saveGame() {
checkInput(); checkInput();
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
@ -348,7 +348,7 @@ void DreamWebEngine::doSaveLoad() {
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
delPointer(); delPointer();
@ -429,7 +429,7 @@ void DreamWebEngine::discOps() {
delPointer(); delPointer();
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
checkCoords(discOpsList); checkCoords(discOpsList);

View file

@ -754,7 +754,7 @@ void DreamWebEngine::screenUpdate() {
showPointer(); showPointer();
if ((_vars._watchingTime == 0) && (_newLocation != 0xff)) if ((_vars._watchingTime == 0) && (_newLocation != 0xff))
return; return;
vSync(); waitForVSync();
uint16 mouseState = 0; uint16 mouseState = 0;
mouseState |= readMouseState(); mouseState |= readMouseState();
dumpPointer(); dumpPointer();
@ -769,7 +769,7 @@ void DreamWebEngine::screenUpdate() {
showPointer(); showPointer();
if (_wonGame) if (_wonGame)
return; return;
vSync(); waitForVSync();
mouseState |= readMouseState(); mouseState |= readMouseState();
dumpPointer(); dumpPointer();
@ -781,7 +781,7 @@ void DreamWebEngine::screenUpdate() {
afterNewRoom(); afterNewRoom();
showPointer(); showPointer();
vSync(); waitForVSync();
mouseState |= readMouseState(); mouseState |= readMouseState();
dumpPointer(); dumpPointer();
@ -790,7 +790,7 @@ void DreamWebEngine::screenUpdate() {
delPointer(); delPointer();
showPointer(); showPointer();
vSync(); waitForVSync();
_oldButton = _mouseButton; _oldButton = _mouseButton;
mouseState |= readMouseState(); mouseState |= readMouseState();
_mouseButton = mouseState; _mouseButton = mouseState;
@ -871,7 +871,7 @@ void DreamWebEngine::loadTextSegment(TextFile &file, Common::File &inFile, unsig
void DreamWebEngine::hangOnCurs(uint16 frameCount) { void DreamWebEngine::hangOnCurs(uint16 frameCount) {
for (uint16 i = 0; i < frameCount; ++i) { for (uint16 i = 0; i < frameCount; ++i) {
printCurs(); printCurs();
vSync(); waitForVSync();
delCurs(); delCurs();
} }
} }
@ -1634,7 +1634,7 @@ bool DreamWebEngine::checkIfSet(uint8 x, uint8 y) {
void DreamWebEngine::hangOn(uint16 frameCount) { void DreamWebEngine::hangOn(uint16 frameCount) {
while (frameCount) { while (frameCount) {
vSync(); waitForVSync();
--frameCount; --frameCount;
if (_quitRequested) if (_quitRequested)
break; break;
@ -1647,7 +1647,7 @@ void DreamWebEngine::hangOnW(uint16 frameCount) {
readMouse(); readMouse();
animPointer(); animPointer();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
--frameCount; --frameCount;
if (_quitRequested) if (_quitRequested)
@ -1665,7 +1665,7 @@ void DreamWebEngine::hangOnP(uint16 count) {
readMouse(); readMouse();
animPointer(); animPointer();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
count *= 3; count *= 3;
@ -1674,7 +1674,7 @@ void DreamWebEngine::hangOnP(uint16 count) {
readMouse(); readMouse();
animPointer(); animPointer();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
if (_quitRequested) if (_quitRequested)
break; break;
@ -2132,7 +2132,7 @@ void DreamWebEngine::workToScreenM() {
animPointer(); animPointer();
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
workToScreen(); workToScreen();
delPointer(); delPointer();
} }
@ -2607,7 +2607,7 @@ void DreamWebEngine::decide() {
readMouse(); readMouse();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
delPointer(); delPointer();

View file

@ -52,7 +52,7 @@ void DreamWebEngine::talk() {
readMouse(); readMouse();
animPointer(); animPointer();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
_getBack = 0; _getBack = 0;
@ -211,7 +211,7 @@ bool DreamWebEngine::hangOnPQ() {
readMouse(); readMouse();
animPointer(); animPointer();
showPointer(); showPointer();
vSync(); waitForVSync();
dumpPointer(); dumpPointer();
dumpTextLine(); dumpTextLine();
checkCoords(quitList); checkCoords(quitList);

View file

@ -134,7 +134,7 @@ void DreamWebEngine::bibleQuote() {
void DreamWebEngine::hangOne(uint16 delay) { void DreamWebEngine::hangOne(uint16 delay) {
do { do {
vSync(); waitForVSync();
if (_lastHardKey == 1) if (_lastHardKey == 1)
return; // "hangonearly" return; // "hangonearly"
} while (--delay); } while (--delay);
@ -200,13 +200,13 @@ void DreamWebEngine::runIntroSeq() {
_getBack = 0; _getBack = 0;
do { do {
vSync(); waitForVSync();
if (_lastHardKey == 1) if (_lastHardKey == 1)
break; break;
spriteUpdate(); spriteUpdate();
vSync(); waitForVSync();
if (_lastHardKey == 1) if (_lastHardKey == 1)
break; break;
@ -216,14 +216,14 @@ void DreamWebEngine::runIntroSeq() {
reelsOnScreen(); reelsOnScreen();
afterIntroRoom(); afterIntroRoom();
useTimedText(); useTimedText();
vSync(); waitForVSync();
if (_lastHardKey == 1) if (_lastHardKey == 1)
break; break;
dumpMap(); dumpMap();
dumpTimedText(); dumpTimedText();
vSync(); waitForVSync();
if (_lastHardKey == 1) if (_lastHardKey == 1)
break; break;
@ -247,18 +247,18 @@ void DreamWebEngine::runEndSeq() {
_getBack = 0; _getBack = 0;
do { do {
vSync(); waitForVSync();
spriteUpdate(); spriteUpdate();
vSync(); waitForVSync();
delEverything(); delEverything();
printSprites(); printSprites();
reelsOnScreen(); reelsOnScreen();
afterIntroRoom(); afterIntroRoom();
useTimedText(); useTimedText();
vSync(); waitForVSync();
dumpMap(); dumpMap();
dumpTimedText(); dumpTimedText();
vSync(); waitForVSync();
} while (_getBack != 1 && !_quitRequested); } while (_getBack != 1 && !_quitRequested);
} }

View file

@ -52,7 +52,7 @@ void DreamWebEngine::fadeDOS() {
return; // FIXME later return; // FIXME later
waitForVSync(); waitForVSync();
//processEvents will be called from vsync //processEvents will be called from waitForVSync
uint8 *dst = _startPal; uint8 *dst = _startPal;
getPalette(dst, 0, 64); getPalette(dst, 0, 64);
for (int fade = 0; fade < 64; ++fade) { for (int fade = 0; fade < 64; ++fade) {

View file

@ -144,10 +144,6 @@ void DreamWebEngine::doShake() {
setShakePos(offset >= 0 ? offset : -offset); setShakePos(offset >= 0 ? offset : -offset);
} }
void DreamWebEngine::vSync() {
waitForVSync();
}
void DreamWebEngine::setMode() { void DreamWebEngine::setMode() {
waitForVSync(); waitForVSync();
initGraphics(320, 200, false); initGraphics(320, 200, false);