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/base_sub_frame.cpp | |
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/base_sub_frame.cpp')
-rw-r--r-- | engines/wintermute/base/base_sub_frame.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp index 77cc522ae7..a06d7f50eb 100644 --- a/engines/wintermute/base/base_sub_frame.cpp +++ b/engines/wintermute/base/base_sub_frame.cpp @@ -44,7 +44,7 @@ IMPLEMENT_PERSISTENT(BaseSubFrame, false) ////////////////////////////////////////////////////////////////////////// BaseSubFrame::BaseSubFrame(BaseGame *inGame) : BaseScriptable(inGame, true) { - _surface = NULL; + _surface = nullptr; _hotspotX = _hotspotY = 0; _alpha = 0xFFFFFFFF; _transparent = 0xFFFF00FF; @@ -54,7 +54,7 @@ BaseSubFrame::BaseSubFrame(BaseGame *inGame) : BaseScriptable(inGame, true) { _editorSelected = false; - _surfaceFilename = NULL; + _surfaceFilename = nullptr; _cKDefault = true; _cKRed = _cKBlue = _cKGreen = 0; _lifeTime = -1; @@ -73,7 +73,7 @@ BaseSubFrame::~BaseSubFrame() { _gameRef->_surfaceStorage->removeSurface(_surface); } delete[] _surfaceFilename; - _surfaceFilename = NULL; + _surfaceFilename = nullptr; } @@ -118,10 +118,10 @@ bool BaseSubFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) { int ar = 255, ag = 255, ab = 255, alpha = 255; bool custoTrans = false; BasePlatform::setRectEmpty(&rect); - char *surfaceFile = NULL; + char *surfaceFile = nullptr; delete _surface; - _surface = NULL; + _surface = nullptr; while ((cmd = parser.getCommand((char **)&buffer, commands, ¶ms)) > 0) { switch (cmd) { @@ -184,7 +184,7 @@ bool BaseSubFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) { return STATUS_FAILED; } - if (surfaceFile != NULL) { + if (surfaceFile != nullptr) { if (custoTrans) { setSurface(surfaceFile, false, r, g, b, lifeTime, keepLoaded); } else { @@ -198,7 +198,7 @@ bool BaseSubFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) { } /* - if (_surface == NULL) + if (_surface == nullptr) { _gameRef->LOG(0, "Error parsing sub-frame. Image not set."); return STATUS_FAILED; @@ -236,7 +236,7 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl return STATUS_OK; } - if (registerOwner != NULL && !_decoration) { + if (registerOwner != nullptr && !_decoration) { if (zoomX == 100 && zoomY == 100) { _gameRef->_renderer->addRectToList(new BaseActiveRect(_gameRef, registerOwner, this, x - _hotspotX + getRect().left, y - _hotspotY + getRect().top, getRect().right - getRect().left, getRect().bottom - getRect().top, zoomX, zoomY, precise)); } else { @@ -426,7 +426,7 @@ bool BaseSubFrame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisS _gameRef->_surfaceStorage->removeSurface(_surface); } delete[] _surfaceFilename; - _surfaceFilename = NULL; + _surfaceFilename = nullptr; stack->pushBool(true); } else { const char *filename = val->getString(); @@ -617,11 +617,11 @@ const char *BaseSubFrame::scToString() { bool BaseSubFrame::setSurface(const Common::String &filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime, bool keepLoaded) { if (_surface) { _gameRef->_surfaceStorage->removeSurface(_surface); - _surface = NULL; + _surface = nullptr; } delete[] _surfaceFilename; - _surfaceFilename = NULL; + _surfaceFilename = nullptr; _surface = _gameRef->_surfaceStorage->addSurface(filename, defaultCK, ckRed, ckGreen, ckBlue, lifeTime, keepLoaded); if (_surface) { @@ -645,7 +645,7 @@ bool BaseSubFrame::setSurface(const Common::String &filename, bool defaultCK, by ////////////////////////////////////////////////////////////////////////// bool BaseSubFrame::setSurfaceSimple() { if (!_surfaceFilename) { - _surface = NULL; + _surface = nullptr; return STATUS_OK; } _surface = _gameRef->_surfaceStorage->addSurface(_surfaceFilename, _cKDefault, _cKRed, _cKGreen, _cKBlue, _lifeTime, _keepLoaded); |