mirror of
https://github.com/scummvm/scummvm.git
synced 2026-11-18 21:34:48 +00:00
DIRECTOR: Allocat MacWindow and draw on it
Inter-movie transitions are broken again (go over white)
This commit is contained in:
1 parent
393362b616
commit
56f2f4a4be
2 files changed
+12
-6
No files matched your search
@@ -107,6 +107,7 @@ Score::Score(DirectorEngine *vm) {
|
||||
|
||||
_framesRan = 0; // used by kDebugFewFramesOnly
|
||||
|
||||
_window = nullptr;
|
||||
}
|
||||
|
||||
void Score::setArchive(Archive *archive) {
|
||||
@@ -446,9 +447,6 @@ void Score::loadSpriteSounds(bool isSharedCast) {
|
||||
|
||||
|
||||
Score::~Score() {
|
||||
if (_surface && _surface->w)
|
||||
_surface->free();
|
||||
|
||||
if (_trailSurface && _trailSurface->w)
|
||||
_trailSurface->free();
|
||||
|
||||
@@ -460,9 +458,11 @@ Score::~Score() {
|
||||
|
||||
delete _backSurface;
|
||||
delete _backSurface2;
|
||||
delete _surface;
|
||||
delete _trailSurface;
|
||||
|
||||
if (_window)
|
||||
_vm->_wm->removeWindow(_window);
|
||||
|
||||
for (uint i = 0; i < _frames.size(); i++)
|
||||
delete _frames[i];
|
||||
|
||||
@@ -1515,12 +1515,15 @@ void Score::startLoop() {
|
||||
|
||||
initGraphics(_movieRect.width(), _movieRect.height());
|
||||
|
||||
_surface = new Graphics::ManagedSurface;
|
||||
_window = _vm->_wm->addWindow(false, false, false);
|
||||
_window->disableBorder();
|
||||
_window->resize(_movieRect.width(), _movieRect.height());
|
||||
|
||||
_surface = _window->getSurface();
|
||||
_trailSurface = new Graphics::ManagedSurface;
|
||||
_backSurface = new Graphics::ManagedSurface;
|
||||
_backSurface2 = new Graphics::ManagedSurface;
|
||||
|
||||
_surface->create(_movieRect.width(), _movieRect.height());
|
||||
_trailSurface->create(_movieRect.width(), _movieRect.height());
|
||||
_backSurface->create(_movieRect.width(), _movieRect.height());
|
||||
_backSurface2->create(_movieRect.width(), _movieRect.height());
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
namespace Graphics {
|
||||
class ManagedSurface;
|
||||
class Font;
|
||||
class MacWindow;
|
||||
}
|
||||
|
||||
namespace Common {
|
||||
@@ -153,6 +154,8 @@ public:
|
||||
|
||||
int _numChannelsDisplayed;
|
||||
|
||||
Graphics::MacWindow *_window;
|
||||
|
||||
private:
|
||||
uint16 _versionMinor;
|
||||
uint16 _versionMajor;
|
||||
|
||||
Reference in new issue
Block a user