diff options
author | Einar Johan Trøan Sømåen | 2012-07-21 21:01:47 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-21 21:01:47 +0200 |
commit | b5a07fef8ebf29f7f44b15d9b34799c7e115fdad (patch) | |
tree | 76599c7b51aa6ad0447cb6ff6847f9eba54a679a /engines/wintermute/base/gfx/osystem | |
parent | 2e82471240804df65acdf51c43ea044cbb81ae68 (diff) | |
download | scummvm-rg350-b5a07fef8ebf29f7f44b15d9b34799c7e115fdad.tar.gz scummvm-rg350-b5a07fef8ebf29f7f44b15d9b34799c7e115fdad.tar.bz2 scummvm-rg350-b5a07fef8ebf29f7f44b15d9b34799c7e115fdad.zip |
WINTERMUTE: Get rid of the C-prefix for class-definitions.
Diffstat (limited to 'engines/wintermute/base/gfx/osystem')
4 files changed, 89 insertions, 89 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index dbd2511928..ec69a80095 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -41,7 +41,7 @@ namespace WinterMute {
-RenderTicket::RenderTicket(CBSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY) : _owner(owner),
+RenderTicket::RenderTicket(BaseSurfaceOSystem *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 *makeOSystemRenderer(CBGame *inGame) {
- return new CBRenderOSystem(inGame);
+BaseRenderer *makeOSystemRenderer(BaseGame *inGame) {
+ return new BaseRenderOSystem(inGame);
}
// TODO: Redo everything here.
//////////////////////////////////////////////////////////////////////////
-CBRenderOSystem::CBRenderOSystem(CBGame *inGame) : CBRenderer(inGame) {
+BaseRenderOSystem::BaseRenderOSystem(BaseGame *inGame) : BaseRenderer(inGame) {
_renderSurface = new Graphics::Surface();
_drawNum = 1;
_needsFlip = true;
@@ -110,7 +110,7 @@ CBRenderOSystem::CBRenderOSystem(CBGame *inGame) : CBRenderer(inGame) { }
//////////////////////////////////////////////////////////////////////////
-CBRenderOSystem::~CBRenderOSystem() {
+BaseRenderOSystem::~BaseRenderOSystem() {
_renderSurface->free();
delete _renderSurface;
#if 0
@@ -121,7 +121,7 @@ CBRenderOSystem::~CBRenderOSystem() { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderOSystem::initRenderer(int width, int height, bool windowed) {
+bool BaseRenderOSystem::initRenderer(int width, int height, bool windowed) {
//if (SDL_Init(SDL_INIT_VIDEO) < 0) return STATUS_FAILED;
#if 0
@@ -237,20 +237,20 @@ bool CBRenderOSystem::initRenderer(int width, int height, bool windowed) { return STATUS_OK;
}
-void CBRenderOSystem::setAlphaMod(byte alpha) {
+void BaseRenderOSystem::setAlphaMod(byte alpha) {
byte r = RGBCOLGetR(_colorMod);
byte g = RGBCOLGetB(_colorMod);
byte b = RGBCOLGetB(_colorMod);
_colorMod = BS_ARGB(alpha, r, g, b);
}
-void CBRenderOSystem::setColorMod(byte r, byte g, byte b) {
+void BaseRenderOSystem::setColorMod(byte r, byte g, byte b) {
byte alpha = RGBCOLGetA(_colorMod);
_colorMod = BS_ARGB(alpha, r, g, b);
}
//////////////////////////////////////////////////////////////////////////
-bool CBRenderOSystem::flip() {
+bool BaseRenderOSystem::flip() {
if (!_disableDirtyRects) {
drawTickets();
}
@@ -270,7 +270,7 @@ bool CBRenderOSystem::flip() { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderOSystem::fill(byte r, byte g, byte b, Common::Rect *rect) {
+bool BaseRenderOSystem::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 CBRenderOSystem::fill(byte r, byte g, byte b, Common::Rect *rect) { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderOSystem::fade(uint16 Alpha) {
+bool BaseRenderOSystem::fade(uint16 Alpha) {
uint32 dwAlpha = 255 - Alpha;
return fadeToColor(dwAlpha << 24);
}
//////////////////////////////////////////////////////////////////////////
-bool CBRenderOSystem::fadeToColor(uint32 Color, Common::Rect *rect) {
+bool BaseRenderOSystem::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("CBRenderOSystem::FadeToColor - Breaks when using dirty rects");
- warning("Implement CBRenderOSystem::FadeToColor"); // TODO.
+ warning("BaseRenderOSystem::FadeToColor - Breaks when using dirty rects");
+ warning("Implement BaseRenderOSystem::FadeToColor"); // TODO.
hasWarned = true;
}
@@ -347,7 +347,7 @@ bool CBRenderOSystem::fadeToColor(uint32 Color, Common::Rect *rect) { return STATUS_OK;
}
-void CBRenderOSystem::drawSurface(CBSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY) {
+void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *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 CBRenderOSystem::drawSurface(CBSurfaceOSystem *owner, const Graphics::Surfa drawFromTicket(ticket);
}
-void CBRenderOSystem::invalidateTicket(RenderTicket *renderTicket) {
+void BaseRenderOSystem::invalidateTicket(RenderTicket *renderTicket) {
addDirtyRect(renderTicket->_dstRect);
renderTicket->_isValid = false;
// renderTicket->_canDelete = true; // TODO: Maybe readd this, to avoid even more duplicates.
}
-void CBRenderOSystem::invalidateTicketsFromSurface(CBSurfaceOSystem *surf) {
+void BaseRenderOSystem::invalidateTicketsFromSurface(BaseSurfaceOSystem *surf) {
RenderQueueIterator it;
for (it = _renderQueue.begin(); it != _renderQueue.end(); it++) {
if ((*it)->_owner == surf) {
@@ -390,7 +390,7 @@ void CBRenderOSystem::invalidateTicketsFromSurface(CBSurfaceOSystem *surf) { }
}
-void CBRenderOSystem::drawFromTicket(RenderTicket *renderTicket) {
+void BaseRenderOSystem::drawFromTicket(RenderTicket *renderTicket) {
renderTicket->_wantsDraw = true;
// A new item always has _drawNum == 0
if (renderTicket->_drawNum == 0) {
@@ -445,7 +445,7 @@ void CBRenderOSystem::drawFromTicket(RenderTicket *renderTicket) { }
}
-void CBRenderOSystem::addDirtyRect(const Common::Rect &rect) {
+void BaseRenderOSystem::addDirtyRect(const Common::Rect &rect) {
if (!_dirtyRect) {
_dirtyRect = new Common::Rect(rect);
} else {
@@ -455,7 +455,7 @@ void CBRenderOSystem::addDirtyRect(const Common::Rect &rect) { // warning("AddDirtyRect: %d %d %d %d", rect.left, rect.top, rect.right, rect.bottom);
}
-void CBRenderOSystem::drawTickets() {
+void BaseRenderOSystem::drawTickets() {
RenderQueueIterator it = _renderQueue.begin();
// Clean out the old tickets
int decrement = 0;
@@ -511,7 +511,7 @@ void CBRenderOSystem::drawTickets() { }
// Replacement for SDL2's SDL_RenderCopy
-void CBRenderOSystem::drawFromSurface(const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect, uint32 mirror) {
+void BaseRenderOSystem::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) {
@@ -527,10 +527,10 @@ void CBRenderOSystem::drawFromSurface(const Graphics::Surface *surf, Common::Rec }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
+bool BaseRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
static bool hasWarned = false;
if (!hasWarned) {
- warning("CBRenderOSystem::DrawLine - not fully ported yet");
+ warning("BaseRenderOSystem::DrawLine - not fully ported yet");
hasWarned = true;
}
byte r = RGBCOLGetR(color);
@@ -558,10 +558,10 @@ bool CBRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) { }
//////////////////////////////////////////////////////////////////////////
-CBImage *CBRenderOSystem::takeScreenshot() {
+BaseImage *BaseRenderOSystem::takeScreenshot() {
// TODO: Fix this
- warning("CBRenderOSystem::TakeScreenshot() - not ported yet");
- CBImage *screenshot = new CBImage(_gameRef);
+ warning("BaseRenderOSystem::TakeScreenshot() - not ported yet");
+ BaseImage *screenshot = new BaseImage(_gameRef);
screenshot->copyFrom(_renderSurface);
return screenshot;
#if 0
@@ -584,13 +584,13 @@ CBImage *CBRenderOSystem::takeScreenshot() { memcpy(bits, src, bytespp * viewport.w);
}
- return new CBImage(_gameRef, dib);
+ return new BaseImage(_gameRef, dib);
#endif
return NULL;
}
//////////////////////////////////////////////////////////////////////////
-bool CBRenderOSystem::switchFullscreen() {
+bool BaseRenderOSystem::switchFullscreen() {
/*if (_windowed) SDL_SetWindowFullscreen(_win, SDL_TRUE);
else SDL_SetWindowFullscreen(_win, SDL_FALSE);
@@ -602,7 +602,7 @@ bool CBRenderOSystem::switchFullscreen() { }
//////////////////////////////////////////////////////////////////////////
-const char *CBRenderOSystem::getName() {
+const char *BaseRenderOSystem::getName() {
if (_name.empty()) {
#if 0
if (_renderer) {
@@ -616,7 +616,7 @@ const char *CBRenderOSystem::getName() { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderOSystem::setViewport(int left, int top, int right, int bottom) {
+bool BaseRenderOSystem::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);
@@ -632,7 +632,7 @@ bool CBRenderOSystem::setViewport(int left, int top, int right, int bottom) { }
//////////////////////////////////////////////////////////////////////////
-void CBRenderOSystem::modTargetRect(Common::Rect *rect) {
+void BaseRenderOSystem::modTargetRect(Common::Rect *rect) {
#if 0
SDL_Rect viewportRect;
SDL_RenderGetViewport(GetSdlRenderer(), &viewportRect);
@@ -645,7 +645,7 @@ void CBRenderOSystem::modTargetRect(Common::Rect *rect) { }
//////////////////////////////////////////////////////////////////////////
-void CBRenderOSystem::pointFromScreen(Point32 *point) {
+void BaseRenderOSystem::pointFromScreen(Point32 *point) {
#if 0
SDL_Rect viewportRect;
SDL_RenderGetViewport(GetSdlRenderer(), &viewportRect);
@@ -657,7 +657,7 @@ void CBRenderOSystem::pointFromScreen(Point32 *point) { //////////////////////////////////////////////////////////////////////////
-void CBRenderOSystem::pointToScreen(Point32 *point) {
+void BaseRenderOSystem::pointToScreen(Point32 *point) {
#if 0
SDL_Rect viewportRect;
SDL_RenderGetViewport(GetSdlRenderer(), &viewportRect);
@@ -668,19 +668,19 @@ void CBRenderOSystem::pointToScreen(Point32 *point) { }
//////////////////////////////////////////////////////////////////////////
-void CBRenderOSystem::dumpData(const char *filename) {
- warning("CBRenderOSystem::DumpData(%s) - not reimplemented yet", filename); // TODO
+void BaseRenderOSystem::dumpData(const char *filename) {
+ warning("BaseRenderOSystem::DumpData(%s) - not reimplemented yet", filename); // TODO
#if 0
FILE *f = fopen(filename, "wt");
if (!f) return;
- CBSurfaceStorage *Mgr = _gameRef->_surfaceStorage;
+ BaseSurfaceStorage *Mgr = _gameRef->_surfaceStorage;
int TotalKB = 0;
int TotalLoss = 0;
fprintf(f, "Filename;Usage;Size;KBytes\n");
for (int i = 0; i < Mgr->_surfaces.getSize(); i++) {
- CBSurfaceOSystem *Surf = (CBSurfaceOSystem *)Mgr->_surfaces[i];
+ BaseSurfaceOSystem *Surf = (BaseSurfaceOSystem *)Mgr->_surfaces[i];
if (!Surf->_filename) continue;
if (!Surf->_valid) continue;
@@ -702,8 +702,8 @@ void CBRenderOSystem::dumpData(const char *filename) { #endif
}
-CBSurface *CBRenderOSystem::createSurface() {
- return new CBSurfaceOSystem(_gameRef);
+BaseSurface *BaseRenderOSystem::createSurface() {
+ return new BaseSurfaceOSystem(_gameRef);
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h index 8a8eb88ede..75c745ecf7 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h @@ -35,11 +35,11 @@ #include "common/list.h"
namespace WinterMute {
-class CBSurfaceOSystem;
+class BaseSurfaceOSystem;
class RenderTicket {
Graphics::Surface *_surface;
public:
- RenderTicket(CBSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, bool mirrorX = false, bool mirrorY = false);
+ RenderTicket(BaseSurfaceOSystem *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();
const Graphics::Surface *getSurface() { return _surface; }
@@ -53,14 +53,14 @@ public: uint32 _drawNum;
uint32 _colorMod;
- CBSurfaceOSystem *_owner;
+ BaseSurfaceOSystem *_owner;
bool operator==(RenderTicket &a);
};
-class CBRenderOSystem : public CBRenderer {
+class BaseRenderOSystem : public BaseRenderer {
public:
- CBRenderOSystem(CBGame *inGame);
- ~CBRenderOSystem();
+ BaseRenderOSystem(BaseGame *inGame);
+ ~BaseRenderOSystem();
const char *getName();
@@ -75,12 +75,12 @@ public: bool drawLine(int x1, int y1, int x2, int y2, uint32 color);
- CBImage *takeScreenshot();
+ BaseImage *takeScreenshot();
void setAlphaMod(byte alpha);
void setColorMod(byte r, byte g, byte b);
void invalidateTicket(RenderTicket *renderTicket);
- void invalidateTicketsFromSurface(CBSurfaceOSystem *surf);
+ void invalidateTicketsFromSurface(BaseSurfaceOSystem *surf);
void drawFromTicket(RenderTicket *renderTicket);
bool setViewport(int left, int top, int right, int bottom);
@@ -98,8 +98,8 @@ public: return _ratioY;
}
- void drawSurface(CBSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY);
- CBSurface *createSurface();
+ void drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY);
+ BaseSurface *createSurface();
private:
void addDirtyRect(const Common::Rect &rect);
void drawTickets();
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp index 87c5731b49..0de31349fd 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp @@ -46,7 +46,7 @@ namespace WinterMute {
//////////////////////////////////////////////////////////////////////////
-CBSurfaceOSystem::CBSurfaceOSystem(CBGame *inGame) : CBSurface(inGame) {
+BaseSurfaceOSystem::BaseSurfaceOSystem(BaseGame *inGame) : BaseSurface(inGame) {
_surface = new Graphics::Surface();
_alphaMask = NULL;
_hasAlpha = true;
@@ -56,7 +56,7 @@ CBSurfaceOSystem::CBSurfaceOSystem(CBGame *inGame) : CBSurface(inGame) { }
//////////////////////////////////////////////////////////////////////////
-CBSurfaceOSystem::~CBSurfaceOSystem() {
+BaseSurfaceOSystem::~BaseSurfaceOSystem() {
//TODO
if (_surface) {
_surface->free();
@@ -68,7 +68,7 @@ CBSurfaceOSystem::~CBSurfaceOSystem() { _alphaMask = NULL;
_gameRef->addMem(-_width * _height * 4);
- CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
+ BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
renderer->invalidateTicketsFromSurface(this);
}
@@ -91,8 +91,8 @@ bool hasTransparency(Graphics::Surface *surf) { }
//////////////////////////////////////////////////////////////////////////
-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); */
+bool BaseSurfaceOSystem::create(const char *filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime, bool keepLoaded) {
+ /* BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer); */
_filename = filename;
// const Graphics::Surface *surface = image->getSurface();
@@ -116,8 +116,8 @@ bool CBSurfaceOSystem::create(const char *filename, bool defaultCK, byte ckRed, return STATUS_OK;
}
-void CBSurfaceOSystem::finishLoad() {
- CBImage *image = new CBImage(_gameRef);
+void BaseSurfaceOSystem::finishLoad() {
+ BaseImage *image = new BaseImage(_gameRef);
image->loadFile(_filename);
_width = image->getSurface()->w;
@@ -191,8 +191,8 @@ void CBSurfaceOSystem::finishLoad() { }
//////////////////////////////////////////////////////////////////////////
-void CBSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) {
- warning("CBSurfaceOSystem::GenAlphaMask - Not ported yet");
+void BaseSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) {
+ warning("BaseSurfaceOSystem::GenAlphaMask - Not ported yet");
return;
delete[] _alphaMask;
@@ -237,8 +237,8 @@ void CBSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) { }
//////////////////////////////////////////////////////////////////////////
-uint32 CBSurfaceOSystem::getPixel(Graphics::Surface *surface, int x, int y) {
- warning("CBSurfaceOSystem::GetPixel - Not ported yet");
+uint32 BaseSurfaceOSystem::getPixel(Graphics::Surface *surface, int x, int y) {
+ warning("BaseSurfaceOSystem::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 CBSurfaceOSystem::getPixel(Graphics::Surface *surface, int x, int y) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceOSystem::create(int width, int height) {
- warning("CBSurfaceOSystem::Create not ported yet"); //TODO
+bool BaseSurfaceOSystem::create(int width, int height) {
+ warning("BaseSurfaceOSystem::Create not ported yet"); //TODO
#if 0
- CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
+ BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
_texture = SDL_CreateTexture(renderer->GetSdlRenderer(), SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, Width, Height);
#endif
_width = width;
@@ -290,10 +290,10 @@ bool CBSurfaceOSystem::create(int width, int height) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceOSystem::createFromSDLSurface(Graphics::Surface *surface) {
- warning("CBSurfaceOSystem::CreateFromSDLSurface not ported yet"); //TODO
+bool BaseSurfaceOSystem::createFromSDLSurface(Graphics::Surface *surface) {
+ warning("BaseSurfaceOSystem::CreateFromSDLSurface not ported yet"); //TODO
#if 0
- CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
+ BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
_texture = SDL_CreateTextureFromSurface(renderer->GetSdlRenderer(), surface);
#endif
if (_surface) {
@@ -314,12 +314,12 @@ bool CBSurfaceOSystem::createFromSDLSurface(Graphics::Surface *surface) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceOSystem::isTransparentAt(int x, int y) {
+bool BaseSurfaceOSystem::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("CBSurfaceOSystem::IsTransparentAt not ported yet");
+ warning("BaseSurfaceOSystem::IsTransparentAt not ported yet");
hasWarned = true;
}
#if 0
@@ -340,14 +340,14 @@ bool CBSurfaceOSystem::isTransparentAt(int x, int y) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceOSystem::isTransparentAtLite(int x, int y) {
+bool BaseSurfaceOSystem::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("CBSurfaceOSystem::IsTransparentAtLite not ported yet");
+ warning("BaseSurfaceOSystem::IsTransparentAtLite not ported yet");
hasWarned = true;
}
if (_surface->format.bytesPerPixel == 4) {
@@ -387,57 +387,57 @@ bool CBSurfaceOSystem::isTransparentAtLite(int x, int y) { }
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceOSystem::startPixelOp() {
+bool BaseSurfaceOSystem::startPixelOp() {
//SDL_LockTexture(_texture, NULL, &_lockPixels, &_lockPitch);
// Any pixel-op makes the caching useless:
- CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
+ BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
renderer->invalidateTicketsFromSurface(this);
return STATUS_OK;
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceOSystem::endPixelOp() {
+bool BaseSurfaceOSystem::endPixelOp() {
//SDL_UnlockTexture(_texture);
return STATUS_OK;
}
//////////////////////////////////////////////////////////////////////////
-bool CBSurfaceOSystem::display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool BaseSurfaceOSystem::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 CBSurfaceOSystem::displayTrans(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool BaseSurfaceOSystem::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 CBSurfaceOSystem::displayTransOffset(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY, int offsetX, int offsetY) {
+bool BaseSurfaceOSystem::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 CBSurfaceOSystem::displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool BaseSurfaceOSystem::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 CBSurfaceOSystem::displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, bool Transparent, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool BaseSurfaceOSystem::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 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) {
+bool BaseSurfaceOSystem::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 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);
+bool BaseSurfaceOSystem::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) {
+ BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
if (!_loaded) {
finishLoad();
@@ -450,7 +450,7 @@ bool CBSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, float zoomX, float // thus we avoid printing it more than once.
static bool hasWarned = false;
if (!hasWarned) {
- warning("CBSurfaceOSystem::DrawSprite not fully ported yet"); // TODO.
+ warning("BaseSurfaceOSystem::DrawSprite not fully ported yet"); // TODO.
hasWarned = true;
}
@@ -508,7 +508,7 @@ bool CBSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, float zoomX, float hasAlpha = false;
}
if (alphaDisable) {
- warning("CBSurfaceOSystem::drawSprite - AlphaDisable ignored");
+ warning("BaseSurfaceOSystem::drawSprite - AlphaDisable ignored");
}
renderer->drawSurface(this, _surface, &srcRect, &position, mirrorX, mirrorY);
@@ -519,11 +519,11 @@ bool CBSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, float zoomX, float return STATUS_OK;
}
-bool CBSurfaceOSystem::putSurface(const Graphics::Surface &surface, bool hasAlpha) {
+bool BaseSurfaceOSystem::putSurface(const Graphics::Surface &surface, bool hasAlpha) {
_loaded = true;
_surface->copyFrom(surface);
_hasAlpha = hasAlpha;
- CBRenderOSystem *renderer = static_cast<CBRenderOSystem *>(_gameRef->_renderer);
+ BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
renderer->invalidateTicketsFromSurface(this);
return STATUS_OK;
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h index 091e8ccba8..bece031fe7 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h @@ -35,11 +35,11 @@ namespace WinterMute {
struct TransparentSurface;
-class CBImage;
-class CBSurfaceOSystem : public CBSurface {
+class BaseImage;
+class BaseSurfaceOSystem : public BaseSurface {
public:
- CBSurfaceOSystem(CBGame *inGame);
- ~CBSurfaceOSystem();
+ BaseSurfaceOSystem(BaseGame *inGame);
+ ~BaseSurfaceOSystem();
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);
|