diff --git a/engines/myst3/detection.cpp b/engines/myst3/detection.cpp index 03a1d915d57..ef600f03586 100644 --- a/engines/myst3/detection.cpp +++ b/engines/myst3/detection.cpp @@ -31,7 +31,7 @@ namespace Myst3 { static const PlainGameDescriptor myst3Games[] = { { "myst3", "Myst III Exile" }, - { 0, 0 } + { nullptr, nullptr } }; static const DebugChannelDef debugFlagList[] = { @@ -47,7 +47,7 @@ static const char *directoryGlobs[] = { "M3Data", "MYST3BIN", "TEXT", - 0 + nullptr }; #define MYST3ENTRY(lang, langFile, md5lang, extra, flags) \ @@ -105,36 +105,36 @@ static const char *directoryGlobs[] = { static const Myst3GameDescription gameDescriptions[] = { // Initial US release (English only) v1.0 - MYST3ENTRY(Common::EN_ANY, "ENGLISH.m3t", "19dcba1074f235ec2119313242d891de", 0, kLocMonolingual) + MYST3ENTRY(Common::EN_ANY, "ENGLISH.m3t", "19dcba1074f235ec2119313242d891de", nullptr, kLocMonolingual) // Initial US release (English only) v1.22 - MYST3ENTRY(Common::EN_ANY, "ENGLISH.m3t", "3ca92b097c4319a2ace7fd6e911d6b0f", 0, kLocMonolingual) + MYST3ENTRY(Common::EN_ANY, "ENGLISH.m3t", "3ca92b097c4319a2ace7fd6e911d6b0f", nullptr, kLocMonolingual) // European releases (Country language + English) (1.2) - MYST3ENTRY(Common::NL_NLD, "DUTCH.m3u", "0e8019cfaeb58c2de00ac114cf122220", 0, kLocMulti2) - MYST3ENTRY(Common::FR_FRA, "FRENCH.m3u", "3a7e270c686806dfc31c2091e09c03ec", 0, kLocMulti2) - MYST3ENTRY(Common::DE_DEU, "GERMAN.m3u", "1b2fa162a951fa4ed65617dd3f0c8a53", 0, kLocMulti2) // #1323, andrews05 - MYST3ENTRY(Common::IT_ITA, "ITALIAN.m3u", "906645a87ac1cbbd2b88c277c2b4fda2", 0, kLocMulti2) // #1323, andrews05 - MYST3ENTRY(Common::ES_ESP, "SPANISH.m3u", "28003569d9536cbdf6020aee8e9bcd15", 0, kLocMulti2) // #1323, goodoldgeorge - MYST3ENTRY(Common::PL_POL, "POLISH.m3u", "8075e4e822e100ec79a5842a530dbe24", 0, kLocMulti2) + MYST3ENTRY(Common::NL_NLD, "DUTCH.m3u", "0e8019cfaeb58c2de00ac114cf122220", nullptr, kLocMulti2) + MYST3ENTRY(Common::FR_FRA, "FRENCH.m3u", "3a7e270c686806dfc31c2091e09c03ec", nullptr, kLocMulti2) + MYST3ENTRY(Common::DE_DEU, "GERMAN.m3u", "1b2fa162a951fa4ed65617dd3f0c8a53", nullptr, kLocMulti2) // #1323, andrews05 + MYST3ENTRY(Common::IT_ITA, "ITALIAN.m3u", "906645a87ac1cbbd2b88c277c2b4fda2", nullptr, kLocMulti2) // #1323, andrews05 + MYST3ENTRY(Common::ES_ESP, "SPANISH.m3u", "28003569d9536cbdf6020aee8e9bcd15", nullptr, kLocMulti2) // #1323, goodoldgeorge + MYST3ENTRY(Common::PL_POL, "POLISH.m3u", "8075e4e822e100ec79a5842a530dbe24", nullptr, kLocMulti2) // Russian release (Russian only) (1.2) - MYST3ENTRY(Common::RU_RUS, "ENGLISH.m3t", "57d36d8610043fda554a0708d71d2681", 0, kLocMonolingual) + MYST3ENTRY(Common::RU_RUS, "ENGLISH.m3t", "57d36d8610043fda554a0708d71d2681", nullptr, kLocMonolingual) // Hebrew release (Hebrew only) (1.2 - Patched using the patch CD) - MYST3ENTRY(Common::HE_ISR, "HEBREW.m3u", "16fbbe420fed366249a8d44a759f966c", 0, kLocMonolingual) // #1348, BLooperZ + MYST3ENTRY(Common::HE_ISR, "HEBREW.m3u", "16fbbe420fed366249a8d44a759f966c", nullptr, kLocMonolingual) // #1348, BLooperZ // Japanese release (1.2) - MYST3ENTRY(Common::JA_JPN, "JAPANESE.m3u", "21bbd040bcfadd13b9dc84360c3de01d", 0, kLocMulti2) + MYST3ENTRY(Common::JA_JPN, "JAPANESE.m3u", "21bbd040bcfadd13b9dc84360c3de01d", nullptr, kLocMulti2) MYST3ENTRY(Common::JA_JPN, "JAPANESE.m3u", "1e7c3156417978a1187fa6bc0e2cfafc", "Subtitles only", kLocMulti2) // Multilingual CD release (1.21) - MYST3ENTRY(Common::EN_ANY, "ENGLISH.m3u", "b62ca55aa17724cddbbcc78cba988337", 0, kLocMulti6) - MYST3ENTRY(Common::FR_FRA, "FRENCH.m3u", "73519070cba1c7bea599adbddeae304f", 0, kLocMulti6) - MYST3ENTRY(Common::NL_NLD, "DUTCH.m3u", "c4a8d8fb0eb3fecb9c435a8517bc1f9a", 0, kLocMulti6) - MYST3ENTRY(Common::DE_DEU, "GERMAN.m3u", "5b3be343dd20f03ebdf16381b873f035", 0, kLocMulti6) - MYST3ENTRY(Common::IT_ITA, "ITALIAN.m3u", "73db43aac3fe8671e2c4e227977fbb61", 0, kLocMulti6) - MYST3ENTRY(Common::ES_ESP, "SPANISH.m3u", "55ceb165dad02211ef2d25946c3aac8e", 0, kLocMulti6) + MYST3ENTRY(Common::EN_ANY, "ENGLISH.m3u", "b62ca55aa17724cddbbcc78cba988337", nullptr, kLocMulti6) + MYST3ENTRY(Common::FR_FRA, "FRENCH.m3u", "73519070cba1c7bea599adbddeae304f", nullptr, kLocMulti6) + MYST3ENTRY(Common::NL_NLD, "DUTCH.m3u", "c4a8d8fb0eb3fecb9c435a8517bc1f9a", nullptr, kLocMulti6) + MYST3ENTRY(Common::DE_DEU, "GERMAN.m3u", "5b3be343dd20f03ebdf16381b873f035", nullptr, kLocMulti6) + MYST3ENTRY(Common::IT_ITA, "ITALIAN.m3u", "73db43aac3fe8671e2c4e227977fbb61", nullptr, kLocMulti6) + MYST3ENTRY(Common::ES_ESP, "SPANISH.m3u", "55ceb165dad02211ef2d25946c3aac8e", nullptr, kLocMulti6) { // Chinese (Simplified) CD release (1.22LC) diff --git a/engines/myst3/effects.cpp b/engines/myst3/effects.cpp index 05cd3e6049d..0cd538b3da6 100644 --- a/engines/myst3/effects.cpp +++ b/engines/myst3/effects.cpp @@ -173,7 +173,7 @@ WaterEffect *WaterEffect::create(Myst3Engine *vm, uint32 id) { if (!s->loadMasks("", id, Archive::kWaterEffectMask)) { delete s; - return 0; + return nullptr; } return s; @@ -349,7 +349,7 @@ LavaEffect *LavaEffect::create(Myst3Engine *vm, uint32 id) { if (!s->loadMasks("", id, Archive::kLavaEffectMask)) { delete s; - return 0; + return nullptr; } return s; diff --git a/engines/myst3/gfx_opengl_shaders.cpp b/engines/myst3/gfx_opengl_shaders.cpp index 76cc4db7dbd..dc26bdfae5a 100644 --- a/engines/myst3/gfx_opengl_shaders.cpp +++ b/engines/myst3/gfx_opengl_shaders.cpp @@ -131,7 +131,7 @@ void ShaderRenderer::init() { glEnable(GL_DEPTH_TEST); - static const char* attributes[] = { "position", "texcoord", NULL }; + static const char* attributes[] = { "position", "texcoord", nullptr }; _boxShader = OpenGL::ShaderGL::fromFiles("myst3_box", attributes); _boxVBO = OpenGL::ShaderGL::createBuffer(GL_ARRAY_BUFFER, sizeof(boxVertices), boxVertices); _boxShader->enableVertexAttribute("position", _boxVBO, 2, GL_FLOAT, GL_TRUE, 2 * sizeof(float), 0); @@ -143,12 +143,12 @@ void ShaderRenderer::init() { _cubeShader->enableVertexAttribute("position", _cubeVBO, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), 2 * sizeof(float)); _rect3dShader = OpenGL::ShaderGL::fromFiles("myst3_cube", attributes); - _rect3dVBO = OpenGL::ShaderGL::createBuffer(GL_ARRAY_BUFFER, 20 * sizeof(float), NULL); + _rect3dVBO = OpenGL::ShaderGL::createBuffer(GL_ARRAY_BUFFER, 20 * sizeof(float), nullptr); _rect3dShader->enableVertexAttribute("texcoord", _rect3dVBO, 2, GL_FLOAT, GL_TRUE, 5 * sizeof(float), 0); _rect3dShader->enableVertexAttribute("position", _rect3dVBO, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), 2 * sizeof(float)); _textShader = OpenGL::ShaderGL::fromFiles("myst3_text", attributes); - _textVBO = OpenGL::ShaderGL::createBuffer(GL_ARRAY_BUFFER, 100 * 16 * sizeof(float), NULL, GL_DYNAMIC_DRAW); + _textVBO = OpenGL::ShaderGL::createBuffer(GL_ARRAY_BUFFER, 100 * 16 * sizeof(float), nullptr, GL_DYNAMIC_DRAW); _textShader->enableVertexAttribute("texcoord", _textVBO, 2, GL_FLOAT, GL_TRUE, 4 * sizeof(float), 0); _textShader->enableVertexAttribute("position", _textVBO, 2, GL_FLOAT, GL_TRUE, 4 * sizeof(float), 2 * sizeof(float)); @@ -305,7 +305,7 @@ void ShaderRenderer::draw2DText(const Common::String &text, const Common::Point _textShader->use(); glBindTexture(GL_TEXTURE_2D, glFont->id); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _quadEBO); - glDrawElements(GL_TRIANGLES, 6 * textToDraw.size(), GL_UNSIGNED_SHORT, 0); + glDrawElements(GL_TRIANGLES, 6 * textToDraw.size(), GL_UNSIGNED_SHORT, nullptr); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glDisable(GL_BLEND); diff --git a/engines/myst3/gfx_opengl_texture.cpp b/engines/myst3/gfx_opengl_texture.cpp index fc494247862..9654011f4de 100644 --- a/engines/myst3/gfx_opengl_texture.cpp +++ b/engines/myst3/gfx_opengl_texture.cpp @@ -79,7 +79,7 @@ OpenGLTexture::OpenGLTexture(const Graphics::Surface *surface) { glGenTextures(1, &id); glBindTexture(GL_TEXTURE_2D, id); - glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, internalWidth, internalHeight, 0, internalFormat, sourceFormat, 0); + glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, internalWidth, internalHeight, 0, internalFormat, sourceFormat, nullptr); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); diff --git a/engines/myst3/gfx_tinygl.cpp b/engines/myst3/gfx_tinygl.cpp index 79d88e341c7..2b87cf95f85 100644 --- a/engines/myst3/gfx_tinygl.cpp +++ b/engines/myst3/gfx_tinygl.cpp @@ -42,7 +42,7 @@ Renderer *CreateGfxTinyGL(OSystem *system) { TinyGLRenderer::TinyGLRenderer(OSystem *system) : Renderer(system), - _fb(NULL) { + _fb(nullptr) { } TinyGLRenderer::~TinyGLRenderer() { diff --git a/engines/myst3/gfx_tinygl_texture.cpp b/engines/myst3/gfx_tinygl_texture.cpp index 4a78730e9b5..42e64bb5bd5 100644 --- a/engines/myst3/gfx_tinygl_texture.cpp +++ b/engines/myst3/gfx_tinygl_texture.cpp @@ -41,7 +41,7 @@ TinyGLTexture::TinyGLTexture(const Graphics::Surface *surface) { tglGenTextures(1, &id); tglBindTexture(TGL_TEXTURE_2D, id); - tglTexImage2D(TGL_TEXTURE_2D, 0, 3, width, height, 0, internalFormat, sourceFormat, 0); + tglTexImage2D(TGL_TEXTURE_2D, 0, 3, width, height, 0, internalFormat, sourceFormat, nullptr); tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_MIN_FILTER, TGL_LINEAR); tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_MAG_FILTER, TGL_LINEAR); diff --git a/engines/myst3/inventory.cpp b/engines/myst3/inventory.cpp index dcee924d4ac..586fabb0f2e 100644 --- a/engines/myst3/inventory.cpp +++ b/engines/myst3/inventory.cpp @@ -43,7 +43,7 @@ const Inventory::ItemData Inventory::_availableItems[8] = { Inventory::Inventory(Myst3Engine *vm) : Window(), _vm(vm), - _texture(0) { + _texture(nullptr) { _scaled = !_vm->isWideScreenModEnabled(); initializeTexture(); } @@ -327,7 +327,7 @@ void Inventory::updateCursor() { DragItem::DragItem(Myst3Engine *vm, uint id): _vm(vm), - _texture(0), + _texture(nullptr), _frame(1) { // Draw on the whole screen _isConstrainedToWindow = false; diff --git a/engines/myst3/menu.cpp b/engines/myst3/menu.cpp index 0f741875e68..894b1c01655 100644 --- a/engines/myst3/menu.cpp +++ b/engines/myst3/menu.cpp @@ -38,7 +38,7 @@ namespace Myst3 { Dialog::Dialog(Myst3Engine *vm, uint id): _vm(vm), - _texture(0) { + _texture(nullptr) { // Draw on the whole screen _isConstrainedToWindow = false; _scaled = !_vm->isWideScreenModEnabled(); @@ -218,7 +218,7 @@ int16 GamepadDialog::update() { Menu::Menu(Myst3Engine *vm) : _vm(vm), - _saveLoadSpotItem(0) { + _saveLoadSpotItem(nullptr) { } Menu::~Menu() { @@ -885,7 +885,7 @@ void AlbumMenu::loadSaves() { } // Read state data - Common::Serializer s = Common::Serializer(saveFile, 0); + Common::Serializer s = Common::Serializer(saveFile, nullptr); GameState::StateData data; data.syncWithSaveGame(s); diff --git a/engines/myst3/metaengine.cpp b/engines/myst3/metaengine.cpp index d8d97b5b180..79b05f1c60b 100644 --- a/engines/myst3/metaengine.cpp +++ b/engines/myst3/metaengine.cpp @@ -90,7 +90,7 @@ public: } // Read state data - Common::Serializer s = Common::Serializer(saveFile, 0); + Common::Serializer s = Common::Serializer(saveFile, nullptr); GameState::StateData data; data.syncWithSaveGame(s); diff --git a/engines/myst3/movie.cpp b/engines/myst3/movie.cpp index bb163e82b82..7006dc32324 100644 --- a/engines/myst3/movie.cpp +++ b/engines/myst3/movie.cpp @@ -38,10 +38,10 @@ Movie::Movie(Myst3Engine *vm, uint16 id) : _posV(0), _startFrame(0), _endFrame(0), - _texture(0), + _texture(nullptr), _force2d(false), _forceOpaque(false), - _subtitles(0), + _subtitles(nullptr), _volume(0), _additiveBlending(false), _transparency(100) { @@ -473,7 +473,7 @@ SimpleMovie::~SimpleMovie() { ProjectorMovie::ProjectorMovie(Myst3Engine *vm, uint16 id, Graphics::Surface *background) : ScriptedMovie(vm, id), _background(background), - _frame(0) { + _frame(nullptr) { _enabled = true; for (uint i = 0; i < kBlurIterations; i++) { diff --git a/engines/myst3/myst3.cpp b/engines/myst3/myst3.cpp index 843a53b890c..ffdc601091e 100644 --- a/engines/myst3/myst3.cpp +++ b/engines/myst3/myst3.cpp @@ -65,19 +65,19 @@ namespace Myst3 { Myst3Engine::Myst3Engine(OSystem *syst, const Myst3GameDescription *version) : Engine(syst), _system(syst), _gameDescription(version), - _db(0), _scriptEngine(0), - _state(0), _node(0), _scene(0), _archiveNode(0), - _cursor(0), _inventory(0), _gfx(0), _menu(0), - _rnd(0), _sound(0), _ambient(0), + _db(nullptr), _scriptEngine(nullptr), + _state(nullptr), _node(nullptr), _scene(nullptr), _archiveNode(nullptr), + _cursor(nullptr), _inventory(nullptr), _gfx(nullptr), _menu(nullptr), + _rnd(nullptr), _sound(nullptr), _ambient(nullptr), _inputSpacePressed(false), _inputEnterPressed(false), _inputEscapePressed(false), _inputTildePressed(false), _inputEscapePressedNotConsumed(false), _interactive(false), - _menuAction(0), _projectorBackground(0), - _shakeEffect(0), _rotationEffect(0), + _menuAction(0), _projectorBackground(nullptr), + _shakeEffect(nullptr), _rotationEffect(nullptr), _backgroundSoundScriptLastRoomId(0), _backgroundSoundScriptLastAgeId(0), - _transition(0), _frameLimiter(0), _inventoryManualHide(false) { + _transition(nullptr), _frameLimiter(nullptr), _inventoryManualHide(false) { // Add subdirectories to the search path to allow running from a full HDD install const Common::FSNode gameDataDir(ConfMan.get("path")); @@ -223,7 +223,7 @@ Common::Error Myst3Engine::run() { bool Myst3Engine::addArchive(const Common::String &file, bool mandatory) { Archive *archive = new Archive(); - bool opened = archive->open(file.c_str(), 0); + bool opened = archive->open(file.c_str(), nullptr); if (opened) { _archivesCommon.push_back(archive); @@ -400,7 +400,7 @@ HotSpot *Myst3Engine::getHoveredHotspot(NodePtr nodeData, uint16 var) { } } - return 0; + return nullptr; } void Myst3Engine::updateCursor() { @@ -1067,7 +1067,7 @@ void Myst3Engine::loadMovie(uint16 id, uint16 condition, bool resetCond, bool lo movie = new ScriptedMovie(this, id); } else { movie = new ProjectorMovie(this, id, _projectorBackground); - _projectorBackground = 0; + _projectorBackground = nullptr; _state->setMovieUseBackground(0); } diff --git a/engines/myst3/node.cpp b/engines/myst3/node.cpp index 2b97aa56c49..9295f6112fb 100644 --- a/engines/myst3/node.cpp +++ b/engines/myst3/node.cpp @@ -44,9 +44,9 @@ void Face::setTextureFromJPEG(const ResourceDescription *jpegDesc) { Face::Face(Myst3Engine *vm) : _vm(vm), _textureDirty(true), - _texture(0), - _bitmap(0), - _finalBitmap(0) { + _texture(nullptr), + _bitmap(nullptr), + _finalBitmap(nullptr) { } void Face::addTextureDirtyRect(const Common::Rect &rect) { @@ -73,7 +73,7 @@ void Face::uploadTexture() { Face::~Face() { _bitmap->free(); delete _bitmap; - _bitmap = 0; + _bitmap = nullptr; if (_finalBitmap) { _finalBitmap->free(); @@ -257,7 +257,7 @@ void Node::update() { for (uint faceId = 0; faceId < 6; faceId++) { Face *face = _faces[faceId]; - if (face == 0) + if (face == nullptr) continue; // No such face in this node if (!isFaceVisible(faceId)) { @@ -347,8 +347,8 @@ SpotItemFace::SpotItemFace(Face *face, uint16 posX, uint16 posY): _posX(posX), _posY(posY), _drawn(false), - _bitmap(0), - _notDrawnBitmap(0), + _bitmap(nullptr), + _notDrawnBitmap(nullptr), _fadeValue(0) { } @@ -356,13 +356,13 @@ SpotItemFace::~SpotItemFace() { if (_bitmap) { _bitmap->free(); delete _bitmap; - _bitmap = 0; + _bitmap = nullptr; } if (_notDrawnBitmap) { _notDrawnBitmap->free(); delete _notDrawnBitmap; - _notDrawnBitmap = 0; + _notDrawnBitmap = nullptr; } } diff --git a/engines/myst3/puzzles.cpp b/engines/myst3/puzzles.cpp index 86be3beb6af..ca15c4f90a9 100644 --- a/engines/myst3/puzzles.cpp +++ b/engines/myst3/puzzles.cpp @@ -440,7 +440,7 @@ void Puzzles::resonanceRingsLaunchBall() { bool isOnLightButton = false; - const LightFrames *frames = 0; + const LightFrames *frames = nullptr; int32 currentLightFrame = _vm->_state->getVar(33); // Look is the mini ball is on a light button @@ -788,7 +788,7 @@ void Puzzles::pinball(int16 var) { int32 jumpPositionLeft = 50 * ((leftSideFrame + 25) / 50); int32 jumpPositionRight = 50 * ((rightSideFrame + 25) / 50); - const BallJump *jump = 0; + const BallJump *jump = nullptr; for (uint i = 0; i < ARRAYSIZE(jumps); i++) { int32 filter = jumps[i].filter; @@ -983,7 +983,7 @@ void Puzzles::pinball(int16 var) { } const Puzzles::PegCombination *Puzzles::_pinballFindCombination(uint16 var, const PegCombination pegs[], uint16 size) { - const PegCombination *combination = 0; + const PegCombination *combination = nullptr; for (uint i = 0; i < size; i++) { bool good = true; @@ -1289,7 +1289,7 @@ void Puzzles::symbolCodesInit(uint16 var, uint16 posX, uint16 posY) { uint16 node = _vm->_state->getLocationNode(); - const CodeData *code = 0; + const CodeData *code = nullptr; for (uint i = 0; i < ARRAYSIZE(codes); i++) if (codes[i].node == node) { code = &codes[i]; @@ -1519,7 +1519,7 @@ static void copySurfaceRect(Graphics::Surface *dest, const Common::Point &destPo } void Puzzles::projectorLoadBitmap(uint16 bitmap) { - assert(_vm->_projectorBackground == 0 && "Previous background not yet used."); + assert(_vm->_projectorBackground == nullptr && "Previous background not yet used."); // This surface is freed by the destructor of the movie that uses it _vm->_projectorBackground = new Graphics::Surface(); @@ -1546,7 +1546,7 @@ void Puzzles::projectorLoadBitmap(uint16 bitmap) { } void Puzzles::projectorAddSpotItem(uint16 bitmap, uint16 x, uint16 y) { - assert(_vm->_projectorBackground != 0 && "Projector background already used."); + assert(_vm->_projectorBackground != nullptr && "Projector background already used."); // Nothing to do if the spotitem is not enabled if (!_vm->_state->getVar(26)) diff --git a/engines/myst3/sound.cpp b/engines/myst3/sound.cpp index b9ab8d47d2e..2493e94f560 100644 --- a/engines/myst3/sound.cpp +++ b/engines/myst3/sound.cpp @@ -390,7 +390,7 @@ SoundChannel::SoundChannel(Myst3Engine *vm) : _playing(false), _fading(false), _id(0), - _stream(0), + _stream(nullptr), _age(0), _ambientFadeOutDelay(0), _volume(0), @@ -555,7 +555,7 @@ void SoundChannel::stop() { _stopWhenSilent = true; _hasFadeArray = false; - _stream = 0; + _stream = nullptr; _length = Audio::Timestamp(); } diff --git a/engines/myst3/state.cpp b/engines/myst3/state.cpp index 93225d6f610..0704efaf677 100644 --- a/engines/myst3/state.cpp +++ b/engines/myst3/state.cpp @@ -537,7 +537,7 @@ void GameState::newGame() { } Common::Error GameState::load(Common::InSaveFile *saveFile) { - Common::Serializer s = Common::Serializer(saveFile, 0); + Common::Serializer s = Common::Serializer(saveFile, nullptr); Common::Error loadError = _data.syncWithSaveGame(s); _data.gameRunning = true; @@ -550,7 +550,7 @@ Common::Error GameState::load(Common::InSaveFile *saveFile) { } Common::Error GameState::save(Common::OutSaveFile *saveFile, const Common::String &description, const Graphics::Surface *thumbnail, bool isAutosave) { - Common::Serializer s = Common::Serializer(0, saveFile); + Common::Serializer s = Common::Serializer(nullptr, saveFile); // Update save creation info TimeDate t; diff --git a/engines/myst3/subtitles.cpp b/engines/myst3/subtitles.cpp index b032b75a6cb..f79f524e307 100644 --- a/engines/myst3/subtitles.cpp +++ b/engines/myst3/subtitles.cpp @@ -59,8 +59,8 @@ private: FontSubtitles::FontSubtitles(Myst3Engine *vm) : Subtitles(vm), - _font(0), - _surface(0), + _font(nullptr), + _surface(nullptr), _scale(1.0), _charset(nullptr) { } @@ -385,7 +385,7 @@ void MovieSubtitles::drawToTexture(const Phrase *phrase) { Subtitles::Subtitles(Myst3Engine *vm) : Window(), _vm(vm), - _texture(0), + _texture(nullptr), _frame(-1) { _scaled = !_vm->isWideScreenModEnabled(); } @@ -507,7 +507,7 @@ Subtitles *Subtitles::create(Myst3Engine *vm, uint32 id) { if (!s->loadSubtitles(id)) { delete s; - return 0; + return nullptr; } s->loadResources();