[Scummvm-cvs-logs] SF.net SVN: scummvm:[47214] scummvm/trunk/engines/sci/graphics
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Sun Jan 10 00:01:39 CET 2010
Revision: 47214
http://scummvm.svn.sourceforge.net/scummvm/?rev=47214&view=rev
Author: m_kiewitz
Date: 2010-01-09 23:01:38 +0000 (Sat, 09 Jan 2010)
Log Message:
-----------
SCI: kPortrait - now drawing after wait, also using gui wait so mouse cursor still works during execution, makes lip sync perfect (thx to the other fix by fingolfin)
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/gui.cpp
scummvm/trunk/engines/sci/graphics/portrait.cpp
scummvm/trunk/engines/sci/graphics/portrait.h
Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-09 22:37:10 UTC (rev 47213)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-09 23:01:38 UTC (rev 47214)
@@ -851,7 +851,7 @@
}
void SciGui::portraitShow(Common::String resourceName, Common::Point position, uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq) {
- Portrait *myPortrait = new Portrait(_s->resMan, _screen, _palette, _audio, resourceName);
+ Portrait *myPortrait = new Portrait(_s->resMan, this, _screen, _palette, _audio, resourceName);
// TODO: cache portraits
// adjust given coordinates to curPort (but dont adjust coordinates on upscaledHires_Save_Box and give us hires coordinates
// on kDrawCel, yeah this whole stuff makes sense)
Modified: scummvm/trunk/engines/sci/graphics/portrait.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/portrait.cpp 2010-01-09 22:37:10 UTC (rev 47213)
+++ scummvm/trunk/engines/sci/graphics/portrait.cpp 2010-01-09 23:01:38 UTC (rev 47214)
@@ -29,6 +29,7 @@
#include "sci/sci.h"
#include "sci/engine/state.h"
+#include "sci/graphics/gui.h"
#include "sci/graphics/screen.h"
#include "sci/graphics/palette.h"
#include "sci/graphics/portrait.h"
@@ -36,8 +37,8 @@
namespace Sci {
-Portrait::Portrait(ResourceManager *resMan, Screen *screen, SciPalette *palette, AudioPlayer *audio, Common::String resourceName)
- : _resMan(resMan), _screen(screen), _palette(palette), _audio(audio), _resourceName(resourceName) {
+Portrait::Portrait(ResourceManager *resMan, SciGui *gui, Screen *screen, SciPalette *palette, AudioPlayer *audio, Common::String resourceName)
+ : _resMan(resMan), _gui(gui), _screen(screen), _palette(palette), _audio(audio), _resourceName(resourceName) {
init();
}
@@ -160,6 +161,12 @@
syncCue = 0xFFFF;
}
+ // Wait till syncTime passed, then show specific animation bitmap
+ do {
+ _gui->wait(1);
+ curPosition = _audio->getAudioPosition();
+ } while ((curPosition != -1) && (curPosition < timerPosition));
+
if (syncCue != 0xFFFF) {
// Display animation bitmap
if (syncCue < _bitmapCount) {
@@ -171,12 +178,6 @@
warning("kPortrait: sync information tried to draw non-existant %d", syncCue);
}
}
-
- // Wait till syncTime passed, then show specific animation bitmap
- do {
- g_system->delayMillis(10);
- curPosition = _audio->getAudioPosition();
- } while ((curPosition != -1) && (curPosition < timerPosition));
}
_resMan->unlockResource(syncResource);
Modified: scummvm/trunk/engines/sci/graphics/portrait.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/portrait.h 2010-01-09 22:37:10 UTC (rev 47213)
+++ scummvm/trunk/engines/sci/graphics/portrait.h 2010-01-09 23:01:38 UTC (rev 47214)
@@ -37,7 +37,7 @@
class Portrait {
public:
- Portrait(ResourceManager *resMan, Screen *screen, SciPalette *palette, AudioPlayer *audio, Common::String resourceName);
+ Portrait(ResourceManager *resMan, SciGui *gui, Screen *screen, SciPalette *palette, AudioPlayer *audio, Common::String resourceName);
~Portrait();
void setupAudio(uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq);
@@ -49,6 +49,7 @@
void bitsShow();
ResourceManager *_resMan;
+ SciGui *_gui;
Screen *_screen;
SciPalette *_palette;
AudioPlayer *_audio;
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