diff options
author | Einar Johan Trøan Sømåen | 2012-07-19 19:17:05 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-19 19:17:05 +0200 |
commit | a3e8ad4c52f2ad484e94fc8b641e7c7b67b44c04 (patch) | |
tree | d3fc1c23ed6196a24266825f2d77f963d8d98656 /engines | |
parent | def3cd92570ac8138441cd0e7492d0b7bdc61f91 (diff) | |
download | scummvm-rg350-a3e8ad4c52f2ad484e94fc8b641e7c7b67b44c04.tar.gz scummvm-rg350-a3e8ad4c52f2ad484e94fc8b641e7c7b67b44c04.tar.bz2 scummvm-rg350-a3e8ad4c52f2ad484e94fc8b641e7c7b67b44c04.zip |
WINTERMUTE: Move all the gfx-related files to a subfolder, and rename SDL->OSystem
Diffstat (limited to 'engines')
25 files changed, 129 insertions, 127 deletions
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index f5b234a013..d4f97cfdba 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -32,17 +32,18 @@ #include "engines/wintermute/Base/BFileManager.h"
#include "engines/wintermute/Base/font/BFont.h"
#include "engines/wintermute/Base/font/BFontStorage.h"
-#include "engines/wintermute/Base/BImage.h"
+#include "engines/wintermute/Base/gfx/base_image.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
+#include "engines/wintermute/Base/gfx/base_renderer.h"
#include "engines/wintermute/Base/BKeyboardState.h"
#include "engines/wintermute/Base/BParser.h"
#include "engines/wintermute/Base/BQuickMsg.h"
#include "engines/wintermute/Base/BRegistry.h"
-#include "engines/wintermute/Base/BRenderer.h"
#include "engines/wintermute/Base/BSound.h"
#include "engines/wintermute/Base/BSoundMgr.h"
#include "engines/wintermute/Base/BSprite.h"
#include "engines/wintermute/Base/BSubFrame.h"
-#include "engines/wintermute/Base/BSurface.h"
+
#include "engines/wintermute/Base/BTransitionMgr.h"
#include "engines/wintermute/Base/BViewport.h"
#include "engines/wintermute/Base/BStringTable.h"
@@ -484,7 +485,7 @@ bool CBGame::initialize1() { //////////////////////////////////////////////////////////////////////
bool CBGame::initialize2() { // we know whether we are going to be accelerated
- _renderer = makeSDLRenderer(this);
+ _renderer = makeOSystemRenderer(this);
if (_renderer == NULL) return STATUS_FAILED;
return STATUS_OK;
@@ -3801,7 +3802,7 @@ void CBGame::setWindowTitle() { title = StringUtil::WideToUtf8(wstr);*/
}
#if 0
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_renderer);
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_renderer);
// TODO
SDL_SetWindowTitle(renderer->GetSdlWindow(), title.c_str());
diff --git a/engines/wintermute/Base/BGame.h b/engines/wintermute/Base/BGame.h index 44b820ade7..1a0e4efb09 100644 --- a/engines/wintermute/Base/BGame.h +++ b/engines/wintermute/Base/BGame.h @@ -30,7 +30,7 @@ #define WINTERMUTE_BGAME_H
#include "engines/wintermute/Base/BDebugger.h"
-#include "engines/wintermute/Base/BRenderer.h"
+#include "engines/wintermute/Base/gfx/base_renderer.h"
#include "engines/wintermute/Base/BObject.h"
#include "engines/wintermute/persistent.h"
#include "engines/wintermute/coll_templ.h"
diff --git a/engines/wintermute/Base/BPersistMgr.cpp b/engines/wintermute/Base/BPersistMgr.cpp index c7c3661032..635097c0ad 100644 --- a/engines/wintermute/Base/BPersistMgr.cpp +++ b/engines/wintermute/Base/BPersistMgr.cpp @@ -34,7 +34,7 @@ #include "engines/wintermute/PlatformSDL.h"
#include "engines/wintermute/math/Vector2.h"
#include "engines/wintermute/utils/StringUtil.h"
-#include "engines/wintermute/Base/BImage.h"
+#include "engines/wintermute/Base/gfx/base_image.h"
#include "engines/wintermute/Base/BSound.h"
#include "graphics/decoders/bmp.h"
#include "common/memstream.h"
diff --git a/engines/wintermute/Base/BSaveThumbHelper.cpp b/engines/wintermute/Base/BSaveThumbHelper.cpp index a1653449ff..74295170ff 100644 --- a/engines/wintermute/Base/BSaveThumbHelper.cpp +++ b/engines/wintermute/Base/BSaveThumbHelper.cpp @@ -28,7 +28,7 @@ #include "engines/wintermute/dcgf.h"
#include "engines/wintermute/Base/BSaveThumbHelper.h"
-#include "engines/wintermute/Base/BImage.h"
+#include "engines/wintermute/Base/gfx/base_image.h"
#include "engines/wintermute/Base/BGame.h"
namespace WinterMute {
diff --git a/engines/wintermute/Base/BSprite.cpp b/engines/wintermute/Base/BSprite.cpp index 1abea36c6b..1af73ca595 100644 --- a/engines/wintermute/Base/BSprite.cpp +++ b/engines/wintermute/Base/BSprite.cpp @@ -32,7 +32,7 @@ #include "engines/wintermute/utils/PathUtil.h"
#include "engines/wintermute/Base/BParser.h"
#include "engines/wintermute/Base/BDynBuffer.h"
-#include "engines/wintermute/Base/BSurface.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
#include "engines/wintermute/Base/BGame.h"
#include "engines/wintermute/Base/BFrame.h"
#include "engines/wintermute/Base/BSound.h"
diff --git a/engines/wintermute/Base/BSubFrame.cpp b/engines/wintermute/Base/BSubFrame.cpp index fe6695c7c2..7569ecb727 100644 --- a/engines/wintermute/Base/BSubFrame.cpp +++ b/engines/wintermute/Base/BSubFrame.cpp @@ -31,7 +31,7 @@ #include "engines/wintermute/Base/BSubFrame.h"
#include "engines/wintermute/Base/BActiveRect.h"
#include "engines/wintermute/Base/BDynBuffer.h"
-#include "engines/wintermute/Base/BSurface.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
#include "engines/wintermute/Base/BSurfaceStorage.h"
#include "engines/wintermute/Base/BGame.h"
#include "engines/wintermute/PlatformSDL.h"
diff --git a/engines/wintermute/Base/BSurfaceStorage.cpp b/engines/wintermute/Base/BSurfaceStorage.cpp index 56b59f714a..64bc3daac6 100644 --- a/engines/wintermute/Base/BSurfaceStorage.cpp +++ b/engines/wintermute/Base/BSurfaceStorage.cpp @@ -28,7 +28,7 @@ #include "engines/wintermute/dcgf.h"
#include "engines/wintermute/Base/BSurfaceStorage.h"
-#include "engines/wintermute/Base/BSurfaceSDL.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
#include "engines/wintermute/Base/BGame.h"
#include "engines/wintermute/Base/BFileManager.h"
#include "engines/wintermute/PlatformSDL.h"
@@ -114,7 +114,7 @@ CBSurface *CBSurfaceStorage::addSurface(const char *filename, bool defaultCK, by }
CBSurface *surface;
- surface = new CBSurfaceSDL(_gameRef);
+ surface = _gameRef->_renderer->createSurface();
if (!surface) return NULL;
diff --git a/engines/wintermute/Base/font/BFontBitmap.cpp b/engines/wintermute/Base/font/BFontBitmap.cpp index badf5ac646..15e14958f8 100644 --- a/engines/wintermute/Base/font/BFontBitmap.cpp +++ b/engines/wintermute/Base/font/BFontBitmap.cpp @@ -31,7 +31,7 @@ #include "engines/wintermute/utils/StringUtil.h"
#include "engines/wintermute/Base/BParser.h"
#include "engines/wintermute/Base/BFrame.h"
-#include "engines/wintermute/Base/BSurface.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
#include "engines/wintermute/Base/BGame.h"
#include "engines/wintermute/Base/BSubFrame.h"
#include "engines/wintermute/Base/BFrame.h"
diff --git a/engines/wintermute/Base/font/BFontTT.cpp b/engines/wintermute/Base/font/BFontTT.cpp index 4517f580b2..fd3dcb3567 100644 --- a/engines/wintermute/Base/font/BFontTT.cpp +++ b/engines/wintermute/Base/font/BFontTT.cpp @@ -32,8 +32,8 @@ #include "engines/wintermute/utils/PathUtil.h"
#include "engines/wintermute/utils/StringUtil.h"
#include "engines/wintermute/math/MathUtil.h"
-#include "engines/wintermute/Base/BRenderer.h"
-#include "engines/wintermute/Base/BSurface.h"
+#include "engines/wintermute/Base/gfx/base_renderer.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
#include "engines/wintermute/Base/BParser.h"
#include "engines/wintermute/Base/BGame.h"
#include "engines/wintermute/Base/BFileManager.h"
@@ -363,7 +363,7 @@ CBSurface *CBFontTT::renderTextToTexture(const WideString &text, int width, TTex posY += GetLineHeight();
}
- CBSurfaceSDL *wmeSurface = new CBSurfaceSDL(_gameRef);
+ CBSurfaceOSystem *wmeSurface = new CBSurfaceOSystem(_gameRef);
if (DID_SUCCEED(wmeSurface->CreateFromSDLSurface(surface))) {
SDL_FreeSurface(surface);
return wmeSurface;
diff --git a/engines/wintermute/Base/font/BFontTT.h b/engines/wintermute/Base/font/BFontTT.h index 058fc28755..d2b29a89f8 100644 --- a/engines/wintermute/Base/font/BFontTT.h +++ b/engines/wintermute/Base/font/BFontTT.h @@ -31,7 +31,7 @@ #include "engines/wintermute/Base/font/BFontStorage.h"
#include "engines/wintermute/Base/font/BFont.h"
-#include "engines/wintermute/Base/BSurface.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
#include "common/rect.h"
#include "graphics/surface.h"
#include "graphics/font.h"
diff --git a/engines/wintermute/Base/BImage.cpp b/engines/wintermute/Base/gfx/base_image.cpp index 41a1eff753..e6a6881807 100644 --- a/engines/wintermute/Base/BImage.cpp +++ b/engines/wintermute/Base/gfx/base_image.cpp @@ -27,7 +27,7 @@ */
#include "engines/wintermute/dcgf.h"
-#include "engines/wintermute/Base/BImage.h"
+#include "engines/wintermute/Base/gfx/base_image.h"
#include "engines/wintermute/Base/BGame.h"
#include "engines/wintermute/Base/BFileManager.h"
#include "engines/wintermute/graphics/transparentSurface.h"
diff --git a/engines/wintermute/Base/BImage.h b/engines/wintermute/Base/gfx/base_image.h index 29455d3f7a..29455d3f7a 100644 --- a/engines/wintermute/Base/BImage.h +++ b/engines/wintermute/Base/gfx/base_image.h diff --git a/engines/wintermute/Base/BRenderer.cpp b/engines/wintermute/Base/gfx/base_renderer.cpp index 15ec101c1f..a2ecf16cd4 100644 --- a/engines/wintermute/Base/BRenderer.cpp +++ b/engines/wintermute/Base/gfx/base_renderer.cpp @@ -28,8 +28,8 @@ #include "engines/wintermute/dcgf.h"
#include "engines/wintermute/Base/BActiveRect.h"
-#include "engines/wintermute/Base/BRenderer.h"
-#include "engines/wintermute/Base/BSurface.h"
+#include "engines/wintermute/Base/gfx/base_renderer.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
#include "engines/wintermute/Base/BSubFrame.h"
#include "engines/wintermute/Base/BRegion.h"
#include "engines/wintermute/PlatformSDL.h"
diff --git a/engines/wintermute/Base/BRenderer.h b/engines/wintermute/Base/gfx/base_renderer.h index 4cc7e64fc1..b5f654e8ec 100644 --- a/engines/wintermute/Base/BRenderer.h +++ b/engines/wintermute/Base/gfx/base_renderer.h @@ -121,7 +121,7 @@ public: CBArray<CBActiveRect *, CBActiveRect *> _rectList;
};
-CBRenderer *makeSDLRenderer(CBGame *inGame); // Implemented in BRenderSDL.cpp
+CBRenderer *makeOSystemRenderer(CBGame *inGame); // Implemented in BRenderSDL.cpp
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BSurface.cpp b/engines/wintermute/Base/gfx/base_surface.cpp index 3ba2a773a9..dac0692d76 100644 --- a/engines/wintermute/Base/BSurface.cpp +++ b/engines/wintermute/Base/gfx/base_surface.cpp @@ -28,7 +28,7 @@ #include "engines/wintermute/wintypes.h"
#include "engines/wintermute/Base/BGame.h"
-#include "engines/wintermute/Base/BSurface.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
namespace WinterMute {
diff --git a/engines/wintermute/Base/BSurface.h b/engines/wintermute/Base/gfx/base_surface.h index ed9ace5322..ed9ace5322 100644 --- a/engines/wintermute/Base/BSurface.h +++ b/engines/wintermute/Base/gfx/base_surface.h diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/gfx/osystem/base_render_osystem.cpp index 68c04d9d46..923855686d 100644 --- a/engines/wintermute/Base/BRenderSDL.cpp +++ b/engines/wintermute/Base/gfx/osystem/base_render_osystem.cpp @@ -27,11 +27,11 @@ */
#include "engines/wintermute/dcgf.h"
-#include "engines/wintermute/Base/BRenderSDL.h"
+#include "engines/wintermute/Base/gfx/osystem/base_render_osystem.h"
#include "engines/wintermute/Base/BRegistry.h"
-#include "engines/wintermute/Base/BSurfaceSDL.h"
+#include "engines/wintermute/Base/gfx/osystem/base_surface_osystem.h"
#include "engines/wintermute/Base/BSurfaceStorage.h"
-#include "engines/wintermute/Base/BImage.h"
+#include "engines/wintermute/Base/gfx/base_image.h"
#include "engines/wintermute/math/MathUtil.h"
#include "engines/wintermute/Base/BGame.h"
#include "engines/wintermute/Base/BSprite.h"
@@ -41,7 +41,7 @@ namespace WinterMute {
-RenderTicket::RenderTicket(CBSurfaceSDL *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY) : _owner(owner),
+RenderTicket::RenderTicket(CBSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY) : _owner(owner),
_srcRect(*srcRect), _dstRect(*dstRect), _drawNum(0), _isValid(true), _wantsDraw(true), _hasAlpha(true) {
_colorMod = 0;
_mirror = TransparentSurface::FLIP_NONE;
@@ -89,14 +89,14 @@ bool RenderTicket::operator==(RenderTicket &t) { return true;
}
-CBRenderer *makeSDLRenderer(CBGame *inGame) {
- return new CBRenderSDL(inGame);
+CBRenderer *makeOSystemRenderer(CBGame *inGame) {
+ return new CBRenderOSystem(inGame);
}
// TODO: Redo everything here.
//////////////////////////////////////////////////////////////////////////
-CBRenderSDL::CBRenderSDL(CBGame *inGame) : CBRenderer(inGame) {
+CBRenderOSystem::CBRenderOSystem(CBGame *inGame) : CBRenderer(inGame) {
_renderSurface = new Graphics::Surface();
_drawNum = 1;
_needsFlip = true;
@@ -110,7 +110,7 @@ CBRenderSDL::CBRenderSDL(CBGame *inGame) : CBRenderer(inGame) { }
//////////////////////////////////////////////////////////////////////////
-CBRenderSDL::~CBRenderSDL() {
+CBRenderOSystem::~CBRenderOSystem() {
_renderSurface->free();
delete _renderSurface;
#if 0
@@ -121,7 +121,7 @@ CBRenderSDL::~CBRenderSDL() { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderSDL::initRenderer(int width, int height, bool windowed) {
+bool CBRenderOSystem::initRenderer(int width, int height, bool windowed) {
//if (SDL_Init(SDL_INIT_VIDEO) < 0) return STATUS_FAILED;
#if 0
@@ -237,20 +237,20 @@ bool CBRenderSDL::initRenderer(int width, int height, bool windowed) { return STATUS_OK;
}
-void CBRenderSDL::setAlphaMod(byte alpha) {
+void CBRenderOSystem::setAlphaMod(byte alpha) {
byte r = RGBCOLGetR(_colorMod);
byte g = RGBCOLGetB(_colorMod);
byte b = RGBCOLGetB(_colorMod);
_colorMod = BS_ARGB(alpha, r, g, b);
}
-void CBRenderSDL::setColorMod(byte r, byte g, byte b) {
+void CBRenderOSystem::setColorMod(byte r, byte g, byte b) {
byte alpha = RGBCOLGetA(_colorMod);
_colorMod = BS_ARGB(alpha, r, g, b);
}
//////////////////////////////////////////////////////////////////////////
-bool CBRenderSDL::flip() {
+bool CBRenderOSystem::flip() {
if (!_disableDirtyRects) {
drawTickets();
}
@@ -270,7 +270,7 @@ bool CBRenderSDL::flip() { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderSDL::fill(byte r, byte g, byte b, Common::Rect *rect) {
+bool CBRenderOSystem::fill(byte r, byte g, byte b, Common::Rect *rect) {
//SDL_SetRenderDrawColor(_renderer, r, g, b, 0xFF);
//SDL_RenderClear(_renderer);
_clearColor = _renderSurface->format.ARGBToColor(0xFF, r, g, b);
@@ -285,20 +285,20 @@ bool CBRenderSDL::fill(byte r, byte g, byte b, Common::Rect *rect) { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderSDL::fade(uint16 Alpha) {
+bool CBRenderOSystem::fade(uint16 Alpha) {
uint32 dwAlpha = 255 - Alpha;
return fadeToColor(dwAlpha << 24);
}
//////////////////////////////////////////////////////////////////////////
-bool CBRenderSDL::fadeToColor(uint32 Color, Common::Rect *rect) {
+bool CBRenderOSystem::fadeToColor(uint32 Color, Common::Rect *rect) {
// This particular warning is rather messy, as this function is called a ton,
// thus we avoid printing it more than once.
static bool hasWarned = false;
if (!hasWarned) {
- warning("CBRenderSDL::FadeToColor - Breaks when using dirty rects");
- warning("Implement CBRenderSDL::FadeToColor"); // TODO.
+ warning("CBRenderOSystem::FadeToColor - Breaks when using dirty rects");
+ warning("Implement CBRenderOSystem::FadeToColor"); // TODO.
hasWarned = true;
}
@@ -347,7 +347,7 @@ bool CBRenderSDL::fadeToColor(uint32 Color, Common::Rect *rect) { return STATUS_OK;
}
-void CBRenderSDL::drawSurface(CBSurfaceSDL *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY) {
+void CBRenderOSystem::drawSurface(CBSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY) {
if (_disableDirtyRects) {
RenderTicket renderTicket(owner, surf, srcRect, dstRect, mirrorX, mirrorY);
// HINT: The surface-data contains other info than it should.
@@ -375,13 +375,13 @@ void CBRenderSDL::drawSurface(CBSurfaceSDL *owner, const Graphics::Surface *surf drawFromTicket(ticket);
}
-void CBRenderSDL::invalidateTicket(RenderTicket *renderTicket) {
+void CBRenderOSystem::invalidateTicket(RenderTicket *renderTicket) {
addDirtyRect(renderTicket->_dstRect);
renderTicket->_isValid = false;
// renderTicket->_canDelete = true; // TODO: Maybe readd this, to avoid even more duplicates.
}
-void CBRenderSDL::invalidateTicketsFromSurface(CBSurfaceSDL *surf) {
+void CBRenderOSystem::invalidateTicketsFromSurface(CBSurfaceOSystem *surf) {
RenderQueueIterator it;
for (it = _renderQueue.begin(); it != _renderQueue.end(); it++) {
if ((*it)->_owner == surf) {
@@ -390,7 +390,7 @@ void CBRenderSDL::invalidateTicketsFromSurface(CBSurfaceSDL *surf) { }
}
-void CBRenderSDL::drawFromTicket(RenderTicket *renderTicket) {
+void CBRenderOSystem::drawFromTicket(RenderTicket *renderTicket) {
renderTicket->_wantsDraw = true;
// A new item always has _drawNum == 0
if (renderTicket->_drawNum == 0) {
@@ -439,7 +439,7 @@ void CBRenderSDL::drawFromTicket(RenderTicket *renderTicket) { }
}
-void CBRenderSDL::addDirtyRect(const Common::Rect &rect) {
+void CBRenderOSystem::addDirtyRect(const Common::Rect &rect) {
if (!_dirtyRect) {
_dirtyRect = new Common::Rect(rect);
} else {
@@ -449,7 +449,7 @@ void CBRenderSDL::addDirtyRect(const Common::Rect &rect) { // warning("AddDirtyRect: %d %d %d %d", rect.left, rect.top, rect.right, rect.bottom);
}
-void CBRenderSDL::drawTickets() {
+void CBRenderOSystem::drawTickets() {
RenderQueueIterator it = _renderQueue.begin();
// Clean out the old tickets
int decrement = 0;
@@ -503,7 +503,7 @@ void CBRenderSDL::drawTickets() { }
// Replacement for SDL2's SDL_RenderCopy
-void CBRenderSDL::drawFromSurface(const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect, uint32 mirror) {
+void CBRenderOSystem::drawFromSurface(const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect, uint32 mirror) {
TransparentSurface src(*surf, false);
bool doDelete = false;
if (!clipRect) {
@@ -519,10 +519,10 @@ void CBRenderSDL::drawFromSurface(const Graphics::Surface *surf, Common::Rect *s }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderSDL::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
+bool CBRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
static bool hasWarned = false;
if (!hasWarned) {
- warning("CBRenderSDL::DrawLine - not fully ported yet");
+ warning("CBRenderOSystem::DrawLine - not fully ported yet");
hasWarned = true;
}
byte r = RGBCOLGetR(color);
@@ -550,9 +550,9 @@ bool CBRenderSDL::drawLine(int x1, int y1, int x2, int y2, uint32 color) { }
//////////////////////////////////////////////////////////////////////////
-CBImage *CBRenderSDL::takeScreenshot() {
+CBImage *CBRenderOSystem::takeScreenshot() {
// TODO: Fix this
- warning("CBRenderSDL::TakeScreenshot() - not ported yet");
+ warning("CBRenderOSystem::TakeScreenshot() - not ported yet");
CBImage *screenshot = new CBImage(_gameRef);
screenshot->copyFrom(_renderSurface);
return screenshot;
@@ -582,7 +582,7 @@ CBImage *CBRenderSDL::takeScreenshot() { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderSDL::switchFullscreen() {
+bool CBRenderOSystem::switchFullscreen() {
/*if (_windowed) SDL_SetWindowFullscreen(_win, SDL_TRUE);
else SDL_SetWindowFullscreen(_win, SDL_FALSE);
@@ -594,7 +594,7 @@ bool CBRenderSDL::switchFullscreen() { }
//////////////////////////////////////////////////////////////////////////
-const char *CBRenderSDL::getName() {
+const char *CBRenderOSystem::getName() {
if (_name.empty()) {
#if 0
if (_renderer) {
@@ -608,7 +608,7 @@ const char *CBRenderSDL::getName() { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderSDL::setViewport(int left, int top, int right, int bottom) {
+bool CBRenderOSystem::setViewport(int left, int top, int right, int bottom) {
Common::Rect rect;
// TODO: Hopefully this is the same logic that ScummVM uses.
rect.left = (int16)(left + _borderLeft);
@@ -624,7 +624,7 @@ bool CBRenderSDL::setViewport(int left, int top, int right, int bottom) { }
//////////////////////////////////////////////////////////////////////////
-void CBRenderSDL::modTargetRect(Common::Rect *rect) {
+void CBRenderOSystem::modTargetRect(Common::Rect *rect) {
#if 0
SDL_Rect viewportRect;
SDL_RenderGetViewport(GetSdlRenderer(), &viewportRect);
@@ -637,7 +637,7 @@ void CBRenderSDL::modTargetRect(Common::Rect *rect) { }
//////////////////////////////////////////////////////////////////////////
-void CBRenderSDL::pointFromScreen(Point32 *point) {
+void CBRenderOSystem::pointFromScreen(Point32 *point) {
#if 0
SDL_Rect viewportRect;
SDL_RenderGetViewport(GetSdlRenderer(), &viewportRect);
@@ -649,7 +649,7 @@ void CBRenderSDL::pointFromScreen(Point32 *point) { //////////////////////////////////////////////////////////////////////////
-void CBRenderSDL::pointToScreen(Point32 *point) {
+void CBRenderOSystem::pointToScreen(Point32 *point) {
#if 0
SDL_Rect viewportRect;
SDL_RenderGetViewport(GetSdlRenderer(), &viewportRect);
@@ -660,8 +660,8 @@ void CBRenderSDL::pointToScreen(Point32 *point) { }
//////////////////////////////////////////////////////////////////////////
-void CBRenderSDL::dumpData(const char *filename) {
- warning("CBRenderSDL::DumpData(%s) - not reimplemented yet", filename); // TODO
+void CBRenderOSystem::dumpData(const char *filename) {
+ warning("CBRenderOSystem::DumpData(%s) - not reimplemented yet", filename); // TODO
#if 0
FILE *f = fopen(filename, "wt");
if (!f) return;
@@ -672,7 +672,7 @@ void CBRenderSDL::dumpData(const char *filename) { int TotalLoss = 0;
fprintf(f, "Filename;Usage;Size;KBytes\n");
for (int i = 0; i < Mgr->_surfaces.getSize(); i++) {
- CBSurfaceSDL *Surf = (CBSurfaceSDL *)Mgr->_surfaces[i];
+ CBSurfaceOSystem *Surf = (CBSurfaceOSystem *)Mgr->_surfaces[i];
if (!Surf->_filename) continue;
if (!Surf->_valid) continue;
@@ -694,8 +694,8 @@ void CBRenderSDL::dumpData(const char *filename) { #endif
}
-CBSurface *CBRenderSDL::createSurface() {
- return new CBSurfaceSDL(_gameRef);
+CBSurface *CBRenderOSystem::createSurface() {
+ return new CBSurfaceOSystem(_gameRef);
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BRenderSDL.h b/engines/wintermute/Base/gfx/osystem/base_render_osystem.h index 7b5878a496..44bd1d3906 100644 --- a/engines/wintermute/Base/BRenderSDL.h +++ b/engines/wintermute/Base/gfx/osystem/base_render_osystem.h @@ -29,16 +29,16 @@ #ifndef WINTERMUTE_BRENDERER_SDL_H
#define WINTERMUTE_BRENDERER_SDL_H
-#include "engines/wintermute/Base/BRenderer.h"
+#include "engines/wintermute/Base/gfx/base_renderer.h"
#include "common/rect.h"
#include "graphics/surface.h"
#include "common/list.h"
namespace WinterMute {
-class CBSurfaceSDL;
+class CBSurfaceOSystem;
class RenderTicket {
public:
- RenderTicket(CBSurfaceSDL *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, bool mirrorX = false, bool mirrorY = false);
+ RenderTicket(CBSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, bool mirrorX = false, bool mirrorY = false);
RenderTicket() : _isValid(true), _wantsDraw(false), _drawNum(0) {}
~RenderTicket();
Graphics::Surface *_surface;
@@ -52,14 +52,14 @@ public: uint32 _drawNum;
uint32 _colorMod;
- CBSurfaceSDL *_owner;
+ CBSurfaceOSystem *_owner;
bool operator==(RenderTicket &a);
};
-class CBRenderSDL : public CBRenderer {
+class CBRenderOSystem : public CBRenderer {
public:
- CBRenderSDL(CBGame *inGame);
- ~CBRenderSDL();
+ CBRenderOSystem(CBGame *inGame);
+ ~CBRenderOSystem();
const char *getName();
@@ -79,7 +79,7 @@ public: void setAlphaMod(byte alpha);
void setColorMod(byte r, byte g, byte b);
void invalidateTicket(RenderTicket *renderTicket);
- void invalidateTicketsFromSurface(CBSurfaceSDL *surf);
+ void invalidateTicketsFromSurface(CBSurfaceOSystem *surf);
void drawFromTicket(RenderTicket *renderTicket);
bool setViewport(int left, int top, int right, int bottom);
@@ -97,7 +97,7 @@ public: return _ratioY;
}
- void drawSurface(CBSurfaceSDL *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY);
+ void drawSurface(CBSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY);
CBSurface *createSurface();
private:
void addDirtyRect(const Common::Rect &rect);
diff --git a/engines/wintermute/Base/BSurfaceSDL.cpp b/engines/wintermute/Base/gfx/osystem/base_surface_osystem.cpp index c8b22511fa..57b3c61b8a 100644 --- a/engines/wintermute/Base/BSurfaceSDL.cpp +++ b/engines/wintermute/Base/gfx/osystem/base_surface_osystem.cpp @@ -29,9 +29,9 @@ #include "engines/wintermute/Base/file/BFile.h"
#include "engines/wintermute/Base/BFileManager.h"
#include "engines/wintermute/Base/BGame.h"
-#include "engines/wintermute/Base/BSurfaceSDL.h"
-#include "engines/wintermute/Base/BRenderSDL.h"
-#include "engines/wintermute/Base/BImage.h"
+#include "engines/wintermute/Base/gfx/osystem/base_surface_osystem.h"
+#include "engines/wintermute/Base/gfx/osystem/base_render_osystem.h"
+#include "engines/wintermute/Base/gfx/base_image.h"
#include "engines/wintermute/PlatformSDL.h"
#include "graphics/decoders/png.h"
#include "graphics/decoders/bmp.h"
@@ -46,7 +46,7 @@ namespace WinterMute {
//////////////////////////////////////////////////////////////////////////
-CBSurfaceSDL::CBSurfaceSDL(CBGame *inGame) : CBSurface(inGame) {
+CBSurfaceOSystem::CBSurfaceOSystem(CBGame *inGame) : CBSurface(inGame) {
_surface = new Graphics::Surface();
_alphaMask = NULL;
_hasAlpha = true;
@@ -56,7 +56,7 @@ CBSurfaceSDL::CBSurfaceSDL(CBGame *inGame) : CBSurface(inGame) { }
//////////////////////////////////////////////////////////////////////////
-CBSurfaceSDL::~CBSurfaceSDL() {
+CBSurfaceOSystem::~CBSurfaceOSystem() {
//TODO
if (_surface) {
_surface->free();
@@ -68,7 +68,7 @@ CBSurfaceSDL::~CBSurfaceSDL() { _alphaMask = NULL;
_gameRef->addMem(-_width * _height * 4);
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer);
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
renderer->invalidateTicketsFromSurface(this);
}
@@ -91,8 +91,8 @@ bool hasTransparency(Graphics::Surface *surf) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::create(const char *filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime, bool keepLoaded) {
- /* CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer); */
+bool CBSurfaceOSystem::create(const char *filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime, bool keepLoaded) {
+ /* CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer); */
_filename = filename;
// const Graphics::Surface *surface = image->getSurface();
@@ -116,7 +116,7 @@ bool CBSurfaceSDL::create(const char *filename, bool defaultCK, byte ckRed, byte return STATUS_OK;
}
-void CBSurfaceSDL::finishLoad() {
+void CBSurfaceOSystem::finishLoad() {
CBImage *image = new CBImage(_gameRef);
image->loadFile(_filename);
@@ -191,8 +191,8 @@ void CBSurfaceSDL::finishLoad() { }
//////////////////////////////////////////////////////////////////////////
-void CBSurfaceSDL::genAlphaMask(Graphics::Surface *surface) {
- warning("CBSurfaceSDL::GenAlphaMask - Not ported yet");
+void CBSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) {
+ warning("CBSurfaceOSystem::GenAlphaMask - Not ported yet");
return;
delete[] _alphaMask;
@@ -237,8 +237,8 @@ void CBSurfaceSDL::genAlphaMask(Graphics::Surface *surface) { }
//////////////////////////////////////////////////////////////////////////
-uint32 CBSurfaceSDL::getPixel(Graphics::Surface *surface, int x, int y) {
- warning("CBSurfaceSDL::GetPixel - Not ported yet");
+uint32 CBSurfaceOSystem::getPixel(Graphics::Surface *surface, int x, int y) {
+ warning("CBSurfaceOSystem::GetPixel - Not ported yet");
int bpp = surface->format.bytesPerPixel;
/* Here p is the address to the pixel we want to retrieve */
uint8 *p = (uint8 *)surface->pixels + y * surface->pitch + x * bpp;
@@ -273,10 +273,10 @@ uint32 CBSurfaceSDL::getPixel(Graphics::Surface *surface, int x, int y) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::create(int width, int height) {
- warning("SurfaceSDL::Create not ported yet"); //TODO
+bool CBSurfaceOSystem::create(int width, int height) {
+ warning("CBSurfaceOSystem::Create not ported yet"); //TODO
#if 0
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer);
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
_texture = SDL_CreateTexture(renderer->GetSdlRenderer(), SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, Width, Height);
#endif
_width = width;
@@ -290,10 +290,10 @@ bool CBSurfaceSDL::create(int width, int height) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::createFromSDLSurface(Graphics::Surface *surface) {
- warning("CBSurfaceSDL::CreateFromSDLSurface not ported yet"); //TODO
+bool CBSurfaceOSystem::createFromSDLSurface(Graphics::Surface *surface) {
+ warning("CBSurfaceOSystem::CreateFromSDLSurface not ported yet"); //TODO
#if 0
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer);
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
_texture = SDL_CreateTextureFromSurface(renderer->GetSdlRenderer(), surface);
#endif
if (_surface) {
@@ -314,12 +314,12 @@ bool CBSurfaceSDL::createFromSDLSurface(Graphics::Surface *surface) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::isTransparentAt(int x, int y) {
+bool CBSurfaceOSystem::isTransparentAt(int x, int y) {
// This particular warning is rather messy, as this function is called a ton,
// thus we avoid printing it more than once.
static bool hasWarned = false;
if (!hasWarned) {
- warning("CBSurfaceSDL::IsTransparentAt not ported yet");
+ warning("CBSurfaceOSystem::IsTransparentAt not ported yet");
hasWarned = true;
}
#if 0
@@ -340,14 +340,14 @@ bool CBSurfaceSDL::isTransparentAt(int x, int y) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::isTransparentAtLite(int x, int y) {
+bool CBSurfaceOSystem::isTransparentAtLite(int x, int y) {
//if (!_lockPixels) return false;
// This particular warning is rather messy, as this function is called a ton,
// thus we avoid printing it more than once.
static bool hasWarned = false;
if (!hasWarned) {
- warning("CBSurfaceSDL::IsTransparentAtLite not ported yet");
+ warning("CBSurfaceOSystem::IsTransparentAtLite not ported yet");
hasWarned = true;
}
if (_surface->format.bytesPerPixel == 4) {
@@ -387,57 +387,57 @@ bool CBSurfaceSDL::isTransparentAtLite(int x, int y) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::startPixelOp() {
+bool CBSurfaceOSystem::startPixelOp() {
//SDL_LockTexture(_texture, NULL, &_lockPixels, &_lockPitch);
// Any pixel-op makes the caching useless:
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer);
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
renderer->invalidateTicketsFromSurface(this);
return STATUS_OK;
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::endPixelOp() {
+bool CBSurfaceOSystem::endPixelOp() {
//SDL_UnlockTexture(_texture);
return STATUS_OK;
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool CBSurfaceOSystem::display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
return drawSprite(x, y, &rect, 100, 100, 0xFFFFFFFF, true, blendMode, mirrorX, mirrorY);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::displayTrans(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool CBSurfaceOSystem::displayTrans(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
return drawSprite(x, y, &rect, 100, 100, alpha, false, blendMode, mirrorX, mirrorY);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::displayTransOffset(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY, int offsetX, int offsetY) {
+bool CBSurfaceOSystem::displayTransOffset(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY, int offsetX, int offsetY) {
return drawSprite(x, y, &rect, 100, 100, alpha, false, blendMode, mirrorX, mirrorY, offsetX, offsetY);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool CBSurfaceOSystem::displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
return drawSprite(x, y, &rect, zoomX, zoomY, alpha, false, blendMode, mirrorX, mirrorY);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, bool Transparent, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool CBSurfaceOSystem::displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, bool Transparent, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
return drawSprite(x, y, &rect, zoomX, zoomY, alpha, !Transparent, blendMode, mirrorX, mirrorY);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::displayTransform(int x, int y, int hotX, int hotY, Rect32 rect, float zoomX, float zoomY, uint32 alpha, float rotate, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool CBSurfaceOSystem::displayTransform(int x, int y, int hotX, int hotY, Rect32 rect, float zoomX, float zoomY, uint32 alpha, float rotate, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
return drawSprite(x, y, &rect, zoomX, zoomY, alpha, false, blendMode, mirrorX, mirrorY);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceSDL::drawSprite(int x, int y, Rect32 *rect, float zoomX, float zoomY, uint32 alpha, bool alphaDisable, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY, int offsetX, int offsetY) {
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer);
+bool CBSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, float zoomX, float zoomY, uint32 alpha, bool alphaDisable, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY, int offsetX, int offsetY) {
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
if (!_loaded) {
finishLoad();
@@ -450,7 +450,7 @@ bool CBSurfaceSDL::drawSprite(int x, int y, Rect32 *rect, float zoomX, float zoo // thus we avoid printing it more than once.
static bool hasWarned = false;
if (!hasWarned) {
- warning("CBSurfaceSDL::DrawSprite not fully ported yet"); // TODO.
+ warning("CBSurfaceOSystem::DrawSprite not fully ported yet"); // TODO.
hasWarned = true;
}
@@ -508,7 +508,7 @@ bool CBSurfaceSDL::drawSprite(int x, int y, Rect32 *rect, float zoomX, float zoo hasAlpha = false;
}
if (alphaDisable) {
- warning("CBSurfaceSDL::drawSprite - AlphaDisable ignored");
+ warning("CBSurfaceOSystem::drawSprite - AlphaDisable ignored");
}
renderer->drawSurface(this, _surface, &srcRect, &position, mirrorX, mirrorY);
@@ -519,11 +519,11 @@ bool CBSurfaceSDL::drawSprite(int x, int y, Rect32 *rect, float zoomX, float zoo return STATUS_OK;
}
-bool CBSurfaceSDL::putSurface(const Graphics::Surface &surface, bool hasAlpha) {
+bool CBSurfaceOSystem::putSurface(const Graphics::Surface &surface, bool hasAlpha) {
_loaded = true;
_surface->copyFrom(surface);
_hasAlpha = hasAlpha;
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer);
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
renderer->invalidateTicketsFromSurface(this);
return STATUS_OK;
diff --git a/engines/wintermute/Base/BSurfaceSDL.h b/engines/wintermute/Base/gfx/osystem/base_surface_osystem.h index fa70c97fdf..a5298706a3 100644 --- a/engines/wintermute/Base/BSurfaceSDL.h +++ b/engines/wintermute/Base/gfx/osystem/base_surface_osystem.h @@ -30,16 +30,16 @@ #define WINTERMUTE_BSURFACESDL_H
#include "graphics/surface.h"
-#include "engines/wintermute/Base/BSurface.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
#include "common/list.h"
namespace WinterMute {
struct TransparentSurface;
class CBImage;
-class CBSurfaceSDL : public CBSurface {
+class CBSurfaceOSystem : public CBSurface {
public:
- CBSurfaceSDL(CBGame *inGame);
- ~CBSurfaceSDL();
+ CBSurfaceOSystem(CBGame *inGame);
+ ~CBSurfaceOSystem();
bool create(const char *filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime = -1, bool keepLoaded = false);
bool create(int width, int height);
diff --git a/engines/wintermute/PlatformSDL.cpp b/engines/wintermute/PlatformSDL.cpp index df656d13f6..b3834bf465 100644 --- a/engines/wintermute/PlatformSDL.cpp +++ b/engines/wintermute/PlatformSDL.cpp @@ -28,7 +28,7 @@ #include "engines/wintermute/dcgf.h"
#include "engines/wintermute/Base/BGame.h"
-#include "engines/wintermute/Base/BRenderSDL.h"
+#include "engines/wintermute/Base/gfx/osystem/base_render_osystem.h"
#include "engines/wintermute/utils/PathUtil.h"
#include "engines/wintermute/PlatformSDL.h"
#include "engines/wintermute/Base/BRegistry.h"
@@ -88,7 +88,7 @@ void CBPlatform::handleEvent(Common::Event *event) { break;
/*#ifdef __IPHONEOS__
{
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer);
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
POINT p;
GetCursorPos(&p);
_gameRef->SetActiveObject(renderer->GetObjectAt(p.x, p.y));
@@ -182,7 +182,7 @@ uint32 CBPlatform::getTime() { //////////////////////////////////////////////////////////////////////////
bool CBPlatform::getCursorPos(Point32 *lpPoint) {
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer);
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
Common::Point p = g_system->getEventManager()->getMousePos();
lpPoint->x = p.x;
@@ -195,7 +195,7 @@ bool CBPlatform::getCursorPos(Point32 *lpPoint) { //////////////////////////////////////////////////////////////////////////
bool CBPlatform::setCursorPos(int X, int Y) {
- CBRenderSDL *renderer = static_cast<CBRenderSDL *>(_gameRef->_renderer);
+ CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
Point32 p;
p.x = X;
diff --git a/engines/wintermute/UI/UITiledImage.cpp b/engines/wintermute/UI/UITiledImage.cpp index 12e392a18f..31500f7863 100644 --- a/engines/wintermute/UI/UITiledImage.cpp +++ b/engines/wintermute/UI/UITiledImage.cpp @@ -28,7 +28,7 @@ #include "engines/wintermute/dcgf.h"
#include "engines/wintermute/UI/UITiledImage.h"
-#include "engines/wintermute/Base/BSurface.h"
+#include "engines/wintermute/Base/gfx/base_surface.h"
#include "engines/wintermute/Base/BDynBuffer.h"
#include "engines/wintermute/Base/BParser.h"
#include "engines/wintermute/Base/BGame.h"
diff --git a/engines/wintermute/module.mk b/engines/wintermute/module.mk index 56c82b6846..eab99e1eb5 100644 --- a/engines/wintermute/module.mk +++ b/engines/wintermute/module.mk @@ -46,6 +46,11 @@ MODULE_OBJS := \ Base/font/BFontTT.o \ Base/font/BFont.o \ Base/font/BFontStorage.o \ + Base/gfx/base_image.o \ + Base/gfx/base_renderer.o \ + Base/gfx/base_surface.o \ + Base/gfx/osystem/base_surface_osystem.o \ + Base/gfx/osystem/base_render_osystem.o \ Base/particles/PartParticle.o \ Base/particles/PartEmitter.o \ Base/particles/PartForce.o \ @@ -58,7 +63,6 @@ MODULE_OBJS := \ Base/BFileManager.o \ Base/BGame.o \ Base/BFrame.o \ - Base/BImage.o \ Base/BKeyboardState.o \ Base/BNamedObject.o \ Base/BObject.o \ @@ -69,8 +73,6 @@ MODULE_OBJS := \ Base/BQuickMsg.o \ Base/BRegion.o \ Base/BRegistry.o \ - Base/BRenderer.o \ - Base/BRenderSDL.o \ Base/BResources.o \ Base/BSaveThumbHelper.o \ Base/BScriptable.o \ @@ -81,8 +83,6 @@ MODULE_OBJS := \ Base/BSprite.o \ Base/BStringTable.o \ Base/BSubFrame.o \ - Base/BSurface.o \ - Base/BSurfaceSDL.o \ Base/BSurfaceStorage.o \ Base/BTransitionMgr.o \ Base/BViewport.o \ diff --git a/engines/wintermute/video/VidTheoraPlayer.cpp b/engines/wintermute/video/VidTheoraPlayer.cpp index d7e8850177..3bbd2172f7 100644 --- a/engines/wintermute/video/VidTheoraPlayer.cpp +++ b/engines/wintermute/video/VidTheoraPlayer.cpp @@ -32,7 +32,8 @@ #include "engines/wintermute/Base/BBase.h" #include "engines/wintermute/Base/BGame.h" #include "engines/wintermute/Base/BFileManager.h" -#include "engines/wintermute/Base/BSurfaceSDL.h" +#include "engines/wintermute/Base/gfx/osystem/base_surface_osystem.h" +#include "engines/wintermute/Base/gfx/base_image.h" #include "engines/wintermute/Base/BSoundMgr.h" #include "engines/wintermute/utils/utils.h" #include "engines/wintermute/PlatformSDL.h" @@ -155,7 +156,7 @@ bool CVidTheoraPlayer::initialize(const Common::String &filename, const Common:: // Additional setup. _surface.create(_theoraDecoder->getWidth(), _theoraDecoder->getHeight(), _theoraDecoder->getPixelFormat()); - _texture = new CBSurfaceSDL(_gameRef); + _texture = new CBSurfaceOSystem(_gameRef); _texture->create(_theoraDecoder->getWidth(), _theoraDecoder->getHeight()); _state = THEORA_STATE_PLAYING; _playZoom = 100; diff --git a/engines/wintermute/video/VidTheoraPlayer.h b/engines/wintermute/video/VidTheoraPlayer.h index 74fc0ce5b4..f403a82f64 100644 --- a/engines/wintermute/video/VidTheoraPlayer.h +++ b/engines/wintermute/video/VidTheoraPlayer.h @@ -31,14 +31,14 @@ #include "engines/wintermute/Base/BBase.h" #include "engines/wintermute/Base/file/BFile.h" -#include "engines/wintermute/Base/BSurface.h" -#include "engines/wintermute/Base/BImage.h" #include "engines/wintermute/persistent.h" #include "video/video_decoder.h" #include "common/stream.h" +#include "graphics/surface.h" namespace WinterMute { - +class CBSurface; +class CBImage; class CVidTheoraPlayer : public CBBase { private: enum { |