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 frameOutFx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void doShake();
void vSync();
void setMode();
void showPCX(const Common::String &suffix);
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();
showKeypad();
showPointer();
vSync();
waitForVSync();
if (_pressCount == 0) {
_pressed = 255;
_graphicPress = 255;
vSync();
waitForVSync();
} else
--_pressCount;
@ -252,7 +252,7 @@ void DreamWebEngine::useMenu() {
showMenu();
readMouse();
showPointer();
vSync();
waitForVSync();
dumpPointer();
dumpMenu();
dumpTextLine();
@ -311,7 +311,7 @@ void DreamWebEngine::viewFolder() {
delPointer();
readMouse();
showPointer();
vSync();
waitForVSync();
dumpPointer();
dumpTextLine();
checkFolderCoords();
@ -508,7 +508,7 @@ void DreamWebEngine::enterSymbol() {
showSymbol();
readMouse();
showPointer();
vSync();
waitForVSync();
dumpPointer();
dumpTextLine();
dumpSymbol();
@ -743,7 +743,7 @@ void DreamWebEngine::useDiary() {
readMouse();
showDiaryKeys();
showPointer();
vSync();
waitForVSync();
dumpPointer();
dumpDiaryKeys();
dumpTextLine();

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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