[Scummvm-cvs-logs] SF.net SVN: scummvm:[34577] scummvm/trunk/engines/drascula
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Sep 16 13:49:41 CEST 2008
Revision: 34577
http://scummvm.svn.sourceforge.net/scummvm/?rev=34577&view=rev
Author: thebluegr
Date: 2008-09-16 11:49:40 +0000 (Tue, 16 Sep 2008)
Log Message:
-----------
- Moved some includes away from drascula.h
- Moved grr() to talk.cpp
- Removed the unnecessary parameter length from isTalkFinished()
Modified Paths:
--------------
scummvm/trunk/engines/drascula/drascula.cpp
scummvm/trunk/engines/drascula/drascula.h
scummvm/trunk/engines/drascula/interface.cpp
scummvm/trunk/engines/drascula/sound.cpp
scummvm/trunk/engines/drascula/talk.cpp
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2008-09-16 11:42:21 UTC (rev 34576)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2008-09-16 11:49:40 UTC (rev 34577)
@@ -709,7 +709,7 @@
Common::Event event;
Common::EventManager *eventMan = _system->getEventManager();
- AudioCD.updateCD();
+ updateMusic();
#ifdef _WIN32_WCE
if (eventMan->pollEvent(event)) {
Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h 2008-09-16 11:42:21 UTC (rev 34576)
+++ scummvm/trunk/engines/drascula/drascula.h 2008-09-16 11:49:40 UTC (rev 34577)
@@ -37,10 +37,7 @@
#include "common/keyboard.h"
#include "common/unarj.h"
-#include "sound/audiostream.h"
#include "sound/mixer.h"
-#include "sound/voc.h"
-#include "sound/audiocd.h"
#include "engines/engine.h"
@@ -477,7 +474,7 @@
void placeDrascula();
void talkInit(const char *filename);
- bool isTalkFinished(int* length);
+ bool isTalkFinished();
void talk_igor(int, int);
void talk_drascula(int index, int talkerType = 0);
void talk_solo(const char *, const char *);
@@ -505,6 +502,7 @@
void stopSound();
void playMusic(int p);
void stopMusic();
+ void updateMusic();
int musicStatus();
void updateRoom();
bool loadGame(const char *);
Modified: scummvm/trunk/engines/drascula/interface.cpp
===================================================================
--- scummvm/trunk/engines/drascula/interface.cpp 2008-09-16 11:42:21 UTC (rev 34576)
+++ scummvm/trunk/engines/drascula/interface.cpp 2008-09-16 11:49:40 UTC (rev 34577)
@@ -226,25 +226,4 @@
}
}
-void DrasculaEngine::grr() {
- int length = 30;
-
- color_abc(kColorDarkGreen);
-
- playFile("s10.als");
-
- updateRoom();
- copyBackground(253, 110, 150, 65, 20, 30, drawSurface3, screenSurface);
-
- if (withVoices == 0)
- centerText("groaaarrrrgghhhh!", 153, 65);
-
- updateScreen();
-
- while (!isTalkFinished(&length));
-
- updateRoom();
- updateScreen();
-}
-
} // End of namespace Drascula
Modified: scummvm/trunk/engines/drascula/sound.cpp
===================================================================
--- scummvm/trunk/engines/drascula/sound.cpp 2008-09-16 11:42:21 UTC (rev 34576)
+++ scummvm/trunk/engines/drascula/sound.cpp 2008-09-16 11:49:40 UTC (rev 34577)
@@ -23,6 +23,10 @@
*
*/
+#include "sound/mixer.h"
+#include "sound/voc.h"
+#include "sound/audiocd.h"
+
#include "drascula/drascula.h"
namespace Drascula {
@@ -119,6 +123,10 @@
AudioCD.stop();
}
+void DrasculaEngine::updateMusic() {
+ AudioCD.updateCD();
+}
+
int DrasculaEngine::musicStatus() {
return AudioCD.isPlaying();
}
Modified: scummvm/trunk/engines/drascula/talk.cpp
===================================================================
--- scummvm/trunk/engines/drascula/talk.cpp 2008-09-16 11:42:21 UTC (rev 34576)
+++ scummvm/trunk/engines/drascula/talk.cpp 2008-09-16 11:49:40 UTC (rev 34577)
@@ -36,9 +36,8 @@
playFile(filename);
}
-bool DrasculaEngine::isTalkFinished(int* length) {
- byte key = getScan();
- if (key != 0)
+bool DrasculaEngine::isTalkFinished() {
+ if (getScan() != 0)
stopSound();
if (soundIsActive())
return false;
@@ -119,7 +118,7 @@
updateScreen();
pause(3);
}
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
if ((talkerType == kIgorFront && currentChapter == 6) ||
talkerType == kIgorDoor || talkerType == kIgorSeated || talkerType == kIgorWig) {
@@ -176,7 +175,7 @@
pause(3);
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
if (talkerType == 0)
copyBackground();
@@ -225,7 +224,7 @@
byte key = getScan();
if (key == Common::KEYCODE_ESCAPE)
term_int = 1;
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
}
void DrasculaEngine::talk_solo(const char *said, const char *filename) {
@@ -251,7 +250,7 @@
centerText(said, 173, 92);
}
updateScreen();
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
if (currentChapter == 6) {
copyBackground();
@@ -312,7 +311,7 @@
updateScreen();
pause(3);
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
updateRoom();
updateScreen();
@@ -360,7 +359,7 @@
updateScreen();
}
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
updateRoom();
updateScreen();
@@ -477,7 +476,7 @@
updateScreen();
pause(3);
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
updateRoom();
updateScreen();
@@ -577,7 +576,7 @@
updateScreen();
}
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
updateRoom();
updateScreen();
@@ -633,7 +632,7 @@
updateScreen();
pause(2);
p++;
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
}
void DrasculaEngine::talk_hacker(int index) {
@@ -653,7 +652,7 @@
if (withVoices == 0)
centerText(said, 156, 170);
updateScreen();
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
}
void DrasculaEngine::talk_werewolf(int index) {
@@ -722,7 +721,7 @@
updateScreen();
pause(3);
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
flags[1] = 0;
copyBackground();
@@ -760,7 +759,7 @@
updateScreen();
pause(3);
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
updateRoom();
updateScreen();
@@ -796,7 +795,7 @@
updateScreen();
pause(3);
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
copyBackground();
updateScreen();
@@ -879,7 +878,7 @@
p++;
pause(3);
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
if (currentChapter == 1 && musicStatus() == 0 && flags[11] == 0)
playMusic(roomMusic);
@@ -912,7 +911,7 @@
updateScreen();
pause(4);
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
flags[19] = cara_antes;
updateRoom();
@@ -940,10 +939,32 @@
updateScreen();
pause(3);
- } while (!isTalkFinished(&length));
+ } while (!isTalkFinished());
updateRoom();
updateScreen();
}
+
+void DrasculaEngine::grr() {
+ int length = 30;
+
+ color_abc(kColorDarkGreen);
+
+ playFile("s10.als");
+
+ updateRoom();
+ copyBackground(253, 110, 150, 65, 20, 30, drawSurface3, screenSurface);
+
+ if (withVoices == 0)
+ centerText("groaaarrrrgghhhh!", 153, 65);
+
+ updateScreen();
+
+ while (!isTalkFinished());
+
+ updateRoom();
+ updateScreen();
+}
+
} // End of namespace Drascula
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list