diff options
Diffstat (limited to 'engines/wintermute/base/gfx')
4 files changed, 9 insertions, 8 deletions
diff --git a/engines/wintermute/base/gfx/base_image.cpp b/engines/wintermute/base/gfx/base_image.cpp index 1fff59d85b..2167503dc8 100644 --- a/engines/wintermute/base/gfx/base_image.cpp +++ b/engines/wintermute/base/gfx/base_image.cpp @@ -42,8 +42,8 @@ namespace WinterMute {
//////////////////////////////////////////////////////////////////////
-BaseImage::BaseImage(BaseFileManager *fileManager) {
- _fileManager = fileManager;
+BaseImage::BaseImage() {
+ _fileManager = BaseFileManager::getEngineInstance();
_palette = NULL;
_surface = NULL;
_decoder = NULL;
diff --git a/engines/wintermute/base/gfx/base_image.h b/engines/wintermute/base/gfx/base_image.h index ed0142ea95..76a389977d 100644 --- a/engines/wintermute/base/gfx/base_image.h +++ b/engines/wintermute/base/gfx/base_image.h @@ -42,7 +42,7 @@ class BaseFileManager; class BaseImage {
public:
- BaseImage(BaseFileManager *fileManager);
+ BaseImage();
~BaseImage();
bool loadFile(const Common::String &filename);
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index 58839d5ffe..51b0c2dd36 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -28,6 +28,7 @@ #include "engines/wintermute/base/gfx/osystem/base_render_osystem.h"
#include "engines/wintermute/base/base_registry.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/gfx/osystem/base_surface_osystem.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/gfx/base_image.h"
@@ -126,8 +127,8 @@ bool BaseRenderOSystem::initRenderer(int width, int height, bool windowed) { //TODO: Tiny resolution-displays might want to do some resolution-selection logic here
- _realWidth = _gameRef->_registry->readInt("Debug", "ForceResWidth", _width);
- _realHeight = _gameRef->_registry->readInt("Debug", "ForceResHeight", _height);
+ _realWidth = BaseEngine::getInstance()->getRegistry()->readInt("Debug", "ForceResWidth", _width);
+ _realHeight = BaseEngine::getInstance()->getRegistry()->readInt("Debug", "ForceResHeight", _height);
float origAspect = (float)_width / (float)_height;
float realAspect = (float)_realWidth / (float)_realHeight;
@@ -152,7 +153,7 @@ bool BaseRenderOSystem::initRenderer(int width, int height, bool windowed) { _ratioX = (float)(_realWidth - _borderLeft - _borderRight) / (float)_width;
_ratioY = (float)(_realHeight - _borderTop - _borderBottom) / (float)_height;
- //_windowed = _gameRef->_registry->readBool("Video", "Windowed", true); TODO
+ //_windowed = BaseEngine::getInstance()->getRegistry()->readBool("Video", "Windowed", true); TODO
Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
g_system->beginGFXTransaction();
@@ -496,7 +497,7 @@ bool BaseRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) { BaseImage *BaseRenderOSystem::takeScreenshot() {
// TODO: Clip by viewport.
warning("BaseRenderOSystem::TakeScreenshot() - not ported yet");
- BaseImage *screenshot = new BaseImage(_gameRef->_fileManager);
+ BaseImage *screenshot = new BaseImage();
screenshot->copyFrom(_renderSurface);
return screenshot;
}
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp index 642f2179e6..c449f6471c 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp @@ -119,7 +119,7 @@ bool BaseSurfaceOSystem::create(const Common::String &filename, bool defaultCK, }
bool BaseSurfaceOSystem::finishLoad() {
- BaseImage *image = new BaseImage(_gameRef->_fileManager);
+ BaseImage *image = new BaseImage();
if (!image->loadFile(_filename)) {
return false;
}
|