diff options
author | Einar Johan Trøan Sømåen | 2013-01-26 18:06:42 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-01-26 18:07:07 +0100 |
commit | 980dc4a456f55a8b6526d2bc6f7694a0b2d666b3 (patch) | |
tree | bef13619df90984b731795e72721da7d39089041 /engines/wintermute/base/gfx/osystem | |
parent | 6ae97cdfbe88fa34363aabc46847b0c9a32eefe5 (diff) | |
download | scummvm-rg350-980dc4a456f55a8b6526d2bc6f7694a0b2d666b3.tar.gz scummvm-rg350-980dc4a456f55a8b6526d2bc6f7694a0b2d666b3.tar.bz2 scummvm-rg350-980dc4a456f55a8b6526d2bc6f7694a0b2d666b3.zip |
WINTERMUTE: Replace all NULLs with nullptr.
Diffstat (limited to 'engines/wintermute/base/gfx/osystem')
4 files changed, 15 insertions, 15 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index 748affa13f..cec594535f 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -54,13 +54,13 @@ BaseRenderOSystem::BaseRenderOSystem(BaseGame *inGame) : BaseRenderer(inGame) { _spriteBatch = false; _batchNum = 0; _skipThisFrame = false; - _previousTicket = NULL; + _previousTicket = nullptr; _borderLeft = _borderRight = _borderTop = _borderBottom = 0; _ratioX = _ratioY = 1.0f; setAlphaMod(255); setColorMod(255, 255, 255); - _dirtyRect = NULL; + _dirtyRect = nullptr; _disableDirtyRects = false; if (ConfMan.hasKey("dirty_rects")) { _disableDirtyRects = !ConfMan.getBool("dirty_rects"); @@ -169,7 +169,7 @@ bool BaseRenderOSystem::flip() { if (_skipThisFrame) { _skipThisFrame = false; delete _dirtyRect; - _dirtyRect = NULL; + _dirtyRect = nullptr; g_system->updateScreen(); _needsFlip = false; return true; @@ -196,7 +196,7 @@ bool BaseRenderOSystem::flip() { } // g_system->copyRectToScreen((byte *)_renderSurface->pixels, _renderSurface->pitch, _dirtyRect->left, _dirtyRect->top, _dirtyRect->width(), _dirtyRect->height()); delete _dirtyRect; - _dirtyRect = NULL; + _dirtyRect = nullptr; g_system->updateScreen(); _needsFlip = false; } @@ -297,7 +297,7 @@ void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::S // Avoid calling end() and operator* every time, when potentially going through // LOTS of tickets. RenderQueueIterator endIterator = _renderQueue.end(); - RenderTicket *compareTicket = NULL; + RenderTicket *compareTicket = nullptr; for (it = _lastAddedTicket; it != endIterator; ++it) { compareTicket = *it; if (*(compareTicket) == compare && compareTicket->_isValid) { diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h index 5917551c64..cc2ed57f9b 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h @@ -47,10 +47,10 @@ public: bool initRenderer(int width, int height, bool windowed) override; bool flip() override; virtual bool indicatorFlip(); - bool fill(byte r, byte g, byte b, Common::Rect *rect = NULL) override; + bool fill(byte r, byte g, byte b, Common::Rect *rect = nullptr) override; Graphics::PixelFormat getPixelFormat() const override; void fade(uint16 alpha) override; - void fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect = NULL) override; + void fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect = nullptr) override; bool drawLine(int x1, int y1, int x2, int y2, uint32 color) override; diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp index e2bc3967e2..e00b347ecc 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp @@ -47,9 +47,9 @@ namespace Wintermute { ////////////////////////////////////////////////////////////////////////// BaseSurfaceOSystem::BaseSurfaceOSystem(BaseGame *inGame) : BaseSurface(inGame) { _surface = new Graphics::Surface(); - _alphaMask = NULL; + _alphaMask = nullptr; _hasAlpha = true; - _lockPixels = NULL; + _lockPixels = nullptr; _lockPitch = 0; _loaded = false; } @@ -59,11 +59,11 @@ BaseSurfaceOSystem::~BaseSurfaceOSystem() { if (_surface) { _surface->free(); delete _surface; - _surface = NULL; + _surface = nullptr; } delete[] _alphaMask; - _alphaMask = NULL; + _alphaMask = nullptr; _gameRef->addMem(-_width * _height * 4); BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer); @@ -177,7 +177,7 @@ void BaseSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) { return; // TODO: Reimplement this delete[] _alphaMask; - _alphaMask = NULL; + _alphaMask = nullptr; if (!surface) { return; } @@ -214,7 +214,7 @@ void BaseSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) { if (!hasTransparency) { delete[] _alphaMask; - _alphaMask = NULL; + _alphaMask = nullptr; } } @@ -293,7 +293,7 @@ bool BaseSurfaceOSystem::isTransparentAtLite(int x, int y) { ////////////////////////////////////////////////////////////////////////// bool BaseSurfaceOSystem::startPixelOp() { - //SDL_LockTexture(_texture, NULL, &_lockPixels, &_lockPitch); + //SDL_LockTexture(_texture, nullptr, &_lockPixels, &_lockPitch); // Any pixel-op makes the caching useless: BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer); renderer->invalidateTicketsFromSurface(this); diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.cpp b/engines/wintermute/base/gfx/osystem/render_ticket.cpp index 174f54e315..d253ddca4b 100644 --- a/engines/wintermute/base/gfx/osystem/render_ticket.cpp +++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp @@ -59,7 +59,7 @@ _srcRect(*srcRect), _dstRect(*dstRect), _drawNum(0), _isValid(true), _wantsDraw( _surface = temp; } } else { - _surface = NULL; + _surface = nullptr; } } |