[Scummvm-git-logs] scummvm master -> 6e1abf064ab35b299b865fd05dc1e1c31b1748d8

bgK bastien.bouclet at gmail.com
Sun Jan 19 14:18:33 UTC 2020


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c566d02992 GUI: Add override markers where appropriate
6e1abf064a GUI: Use nullptr instead of 0 or NULL where appropriate


Commit: c566d029922e55b9aa97bcbfa7c2bcde5858bf75
    https://github.com/scummvm/scummvm/commit/c566d029922e55b9aa97bcbfa7c2bcde5858bf75
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-01-19T15:08:37+01:00

Commit Message:
GUI: Add override markers where appropriate

Changed paths:
    gui/EventRecorder.h
    gui/KeysDialog.h
    gui/ThemeLayout.h
    gui/ThemeParser.h
    gui/Tooltip.h
    gui/browser.h
    gui/chooser.h
    gui/dialog.h
    gui/downloaddialog.h
    gui/editgamedialog.cpp
    gui/editgamedialog.h
    gui/editrecorddialog.h
    gui/filebrowser-dialog.h
    gui/fluidsynth-dialog.h
    gui/gui-manager.h
    gui/launcher.h
    gui/massadd.h
    gui/message.h
    gui/object.h
    gui/onscreendialog.h
    gui/options.h
    gui/predictivedialog.h
    gui/recorderdialog.h
    gui/remotebrowser.h
    gui/saveload-dialog.h
    gui/themebrowser.h
    gui/updates-dialog.h
    gui/widget.h
    gui/widgets/editable.h
    gui/widgets/edittext.h
    gui/widgets/list.h
    gui/widgets/popup.h
    gui/widgets/scrollbar.h
    gui/widgets/tab.h


diff --git a/gui/EventRecorder.h b/gui/EventRecorder.h
index 5f016b0..15b5db0 100644
--- a/gui/EventRecorder.h
+++ b/gui/EventRecorder.h
@@ -68,7 +68,7 @@ class WriteStream;
 class EventRecorder : private Common::EventSource, public Common::Singleton<EventRecorder>, private Common::DefaultEventMapper {
 	friend class Common::Singleton<SingletonBaseType>;
 	EventRecorder();
-	~EventRecorder();
+	~EventRecorder() override;
 public:
 	/** Specify operation mode of Event Recorder */
 	enum RecordMode {
@@ -176,9 +176,9 @@ public:
 	void switchFastMode();
 
 private:
-	virtual Common::List<Common::Event> mapEvent(const Common::Event &ev, Common::EventSource *source);
+	Common::List<Common::Event> mapEvent(const Common::Event &ev, Common::EventSource *source) override;
 	bool notifyPoll();
-	bool pollEvent(Common::Event &ev);
+	bool pollEvent(Common::Event &ev) override;
 	bool _initialized;
 	volatile uint32 _fakeTimer;
 	bool _savedState;
@@ -215,7 +215,7 @@ private:
 	bool checkGameHash(const ADGameDescription *desc);
 
 	void checkForKeyCode(const Common::Event &event);
-	bool allowMapping() const { return false; }
+	bool allowMapping() const override { return false; }
 
 	volatile uint32 _lastMillis;
 	uint32 _lastScreenshotTime;
diff --git a/gui/KeysDialog.h b/gui/KeysDialog.h
index e0cf025..de60450 100644
--- a/gui/KeysDialog.h
+++ b/gui/KeysDialog.h
@@ -35,9 +35,9 @@ class KeysDialog : public GUI::Dialog {
 public:
 	KeysDialog(const Common::String &title = _("Choose an action to map"));
 
-	virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
-	virtual void handleKeyUp(Common::KeyState state);
-	virtual void handleKeyDown(Common::KeyState state);
+	void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
+	void handleKeyUp(Common::KeyState state) override;
+	void handleKeyDown(Common::KeyState state) override;
 
 protected:
 
diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h
index 0bfe7f7..df62ea3 100644
--- a/gui/ThemeLayout.h
+++ b/gui/ThemeLayout.h
@@ -152,7 +152,7 @@ public:
 	}
 	void reflowLayout(Widget *widgetChain) override;
 
-	void resetLayout() {
+	void resetLayout() override {
 		ThemeLayout::resetLayout();
 		_x = _defaultX;
 		_y = _defaultY;
@@ -162,7 +162,7 @@ public:
 
 protected:
 	LayoutType getLayoutType() const override { return kLayoutMain; }
-	ThemeLayout *makeClone(ThemeLayout *newParent) { assert(!"Do not copy Main Layouts!"); return 0; }
+	ThemeLayout *makeClone(ThemeLayout *newParent) override { assert(!"Do not copy Main Layouts!"); return 0; }
 
 	int16 _defaultX;
 	int16 _defaultY;
@@ -204,7 +204,7 @@ protected:
 
 	LayoutType getLayoutType() const override { return _type; }
 
-	ThemeLayout *makeClone(ThemeLayout *newParent) {
+	ThemeLayout *makeClone(ThemeLayout *newParent) override {
 		ThemeLayoutStacked *n = new ThemeLayoutStacked(*this);
 		n->_parent = newParent;
 
@@ -228,8 +228,8 @@ public:
 		setTextHAlign(align);
 	}
 
-	bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h);
-	Graphics::TextAlign getWidgetTextHAlign(const Common::String &name);
+	bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) override;
+	Graphics::TextAlign getWidgetTextHAlign(const Common::String &name) override;
 
 	void reflowLayout(Widget *widgetChain) override;
 
@@ -241,7 +241,7 @@ protected:
 	bool isBound(Widget *widgetChain) const override;
 	Widget *getWidget(Widget *widgetChain) const;
 
-	ThemeLayout *makeClone(ThemeLayout *newParent) {
+	ThemeLayout *makeClone(ThemeLayout *newParent) override {
 		ThemeLayout *n = new ThemeLayoutWidget(*this);
 		n->_parent = newParent;
 		return n;
@@ -265,7 +265,7 @@ public:
 		}
 	}
 
-	virtual bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) {
+	bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) override {
 		if (ThemeLayoutWidget::getWidgetData(name, x, y, w, h)) {
 			h -= _tabHeight;
 			return true;
@@ -277,7 +277,7 @@ public:
 protected:
 	LayoutType getLayoutType() const override { return kLayoutTabWidget; }
 
-	ThemeLayout *makeClone(ThemeLayout *newParent) {
+	ThemeLayout *makeClone(ThemeLayout *newParent) override {
 		ThemeLayoutTabWidget *n = new ThemeLayoutTabWidget(*this);
 		n->_parent = newParent;
 		return n;
@@ -296,7 +296,7 @@ public:
 		}
 	}
 
-	bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) { return false; }
+	bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) override { return false; }
 	void reflowLayout(Widget *widgetChain) override {}
 #ifdef LAYOUT_DEBUG_DIALOG
 	const char *getName() const { return "SPACE"; }
@@ -305,7 +305,7 @@ public:
 protected:
 	LayoutType getLayoutType() const override { return kLayoutSpace; }
 
-	ThemeLayout *makeClone(ThemeLayout *newParent) {
+	ThemeLayout *makeClone(ThemeLayout *newParent) override {
 		ThemeLayout *n = new ThemeLayoutSpacing(*this);
 		n->_parent = newParent;
 		return n;
diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h
index 890a86d..bb7033d 100644
--- a/gui/ThemeParser.h
+++ b/gui/ThemeParser.h
@@ -34,7 +34,7 @@ class ThemeParser : public Common::XMLParser {
 public:
 	ThemeParser(ThemeEngine *parent);
 
-	virtual ~ThemeParser();
+	~ThemeParser() override;
 
 	bool getPaletteColor(const Common::String &name, int &r, int &g, int &b) {
 		if (!_palette.contains(name))
@@ -244,11 +244,11 @@ protected:
 	bool parserCallback_space(ParserNode *node);
 	bool parserCallback_import(ParserNode *node);
 
-	bool closedKeyCallback(ParserNode *node);
+	bool closedKeyCallback(ParserNode *node) override;
 
 	bool resolutionCheck(const Common::String &resolution);
 
-	void cleanup();
+	void cleanup() override;
 
 	Graphics::DrawStep *newDrawStep();
 	Graphics::DrawStep *defaultDrawStep();
diff --git a/gui/Tooltip.h b/gui/Tooltip.h
index e812ebe..a7a654d 100644
--- a/gui/Tooltip.h
+++ b/gui/Tooltip.h
@@ -42,29 +42,29 @@ public:
 
 	void drawDialog(DrawLayer layerToDraw) override;
 
-	virtual void receivedFocus(int x = -1, int y = -1) override {}
+	void receivedFocus(int x = -1, int y = -1) override {}
 protected:
-	virtual void handleMouseDown(int x, int y, int button, int clickCount) override {
+	void handleMouseDown(int x, int y, int button, int clickCount) override {
 		close();
 		_parent->handleMouseDown(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount);
 	}
-	virtual void handleMouseUp(int x, int y, int button, int clickCount) override {
+	void handleMouseUp(int x, int y, int button, int clickCount) override {
 		close();
 		_parent->handleMouseUp(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount);
 	}
-	virtual void handleMouseWheel(int x, int y, int direction) override {
+	void handleMouseWheel(int x, int y, int direction) override {
 		close();
 		_parent->handleMouseWheel(x + (getAbsX() - _parent->getAbsX()), y + (getAbsX() - _parent->getAbsX()), direction);
 	}
-	virtual void handleKeyDown(Common::KeyState state) override {
+	void handleKeyDown(Common::KeyState state) override {
 		close();
 		_parent->handleKeyDown(state);
 	}
-	virtual void handleKeyUp(Common::KeyState state) override {
+	void handleKeyUp(Common::KeyState state) override {
 		close();
 		_parent->handleKeyUp(state);
 	}
-	virtual void handleMouseMoved(int x, int y, int button) override {
+	void handleMouseMoved(int x, int y, int button) override {
 		close();
 	}
 
diff --git a/gui/browser.h b/gui/browser.h
index 37e18d3..2dc0128 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -38,9 +38,9 @@ class BrowserDialog : public Dialog {
 public:
 	BrowserDialog(const char *title, bool dirBrowser);
 
-	virtual int runModal();
-	virtual void open();
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	int runModal() override;
+	void open() override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
 	const Common::FSNode	&getResult() { return _choice; }
 
diff --git a/gui/chooser.h b/gui/chooser.h
index 47b34b7..e662a38 100644
--- a/gui/chooser.h
+++ b/gui/chooser.h
@@ -49,7 +49,7 @@ public:
 
 	void setList(const StringArray& list);
 
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 };
 
 } // End of namespace GUI
diff --git a/gui/dialog.h b/gui/dialog.h
index 1089434..b2eb4eb 100644
--- a/gui/dialog.h
+++ b/gui/dialog.h
@@ -68,9 +68,9 @@ public:
 
 	virtual int runModal();
 
-	bool	isVisible() const	{ return _visible; }
+	bool	isVisible() const override	{ return _visible; }
 
-	void	releaseFocus();
+	void	releaseFocus() override;
 	void	setFocusWidget(Widget *widget);
 	Widget *getFocusWidget() { return _focusedWidget; }
 
@@ -78,7 +78,7 @@ public:
 	void unSetTickleWidget() { _tickleWidget = NULL; }
 	Widget *getTickleWidget() { return _tickleWidget; }
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 	virtual void lostFocus();
 	virtual void receivedFocus(int x = -1, int y = -1) { if (x >= 0 && y >= 0) handleMouseMoved(x, y, 0); }
 
@@ -103,12 +103,12 @@ protected:
 	virtual void handleKeyUp(Common::KeyState state);
 	virtual void handleMouseMoved(int x, int y, int button);
 	virtual void handleMouseLeft(int button) {};
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 	virtual void handleOtherEvent(Common::Event evt);
 
 	Widget *findWidget(int x, int y); // Find the widget at pos x,y if any
 	Widget *findWidget(const char *name);
-	void removeWidget(Widget *widget);
+	void removeWidget(Widget *widget) override;
 
 	void setDefaultFocusedWidget();
 
diff --git a/gui/downloaddialog.h b/gui/downloaddialog.h
index 9080717..ef04a1d 100644
--- a/gui/downloaddialog.h
+++ b/gui/downloaddialog.h
@@ -67,13 +67,13 @@ class DownloadDialog : public Dialog {
 
 public:
 	DownloadDialog(uint32 storageId, LauncherDialog *launcher);
-	virtual ~DownloadDialog();
+	~DownloadDialog() override;
 
-	virtual void open();
-	virtual void close();
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
-	virtual void handleTickle();
-	virtual void reflowLayout();
+	void open() override;
+	void close() override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
+	void handleTickle() override;
+	void reflowLayout() override;
 };
 
 } // End of namespace GUI
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 449bcc5..8aad576 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -89,7 +89,7 @@ public:
 		: EditTextWidget(boss, name, text, tooltip) {}
 
 protected:
-	bool tryInsertChar(byte c, int pos) {
+	bool tryInsertChar(byte c, int pos) override {
 		if (Common::isAlnum(c) || c == '-' || c == '_') {
 			_editString.insertChar(c, pos);
 			return true;
diff --git a/gui/editgamedialog.h b/gui/editgamedialog.h
index c3d55ea..8f74beb 100644
--- a/gui/editgamedialog.h
+++ b/gui/editgamedialog.h
@@ -62,12 +62,12 @@ class EditGameDialog : public OptionsDialog {
 public:
 	EditGameDialog(const String &domain);
 
-	void open();
-	virtual void apply();
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void open() override;
+	void apply() override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
 protected:
-	virtual void setupGraphicsTab();
+	void setupGraphicsTab() override;
 
 	EditTextWidget *_descriptionWidget;
 	DomainEditTextWidget *_domainWidget;
diff --git a/gui/editrecorddialog.h b/gui/editrecorddialog.h
index 3825f64..93edebe 100644
--- a/gui/editrecorddialog.h
+++ b/gui/editrecorddialog.h
@@ -38,7 +38,7 @@ private:
 	EditRecordDialog() : Dialog("EditRecordDialog") {};
 public:
 	EditRecordDialog(const Common::String author, const Common::String name, const Common::String notes);
-	~EditRecordDialog();
+	~EditRecordDialog() override;
 
 	const Common::String getAuthor();
 	const Common::String getNotes();
@@ -48,7 +48,7 @@ public:
 	void setNotes(const Common::String &desc);
 	void setName(const Common::String &name);
 
-	virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
 };
 
 }// End of namespace GUI
diff --git a/gui/filebrowser-dialog.h b/gui/filebrowser-dialog.h
index 5916d76..0b54cc0 100644
--- a/gui/filebrowser-dialog.h
+++ b/gui/filebrowser-dialog.h
@@ -41,9 +41,9 @@ class FileBrowserDialog : public Dialog {
 public:
 	FileBrowserDialog(const char *title, const char *fileExtension, int mode);
 
-	virtual void open();
+	void open() override;
 
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
 	const char *getResult() { return Dialog::getResult() ? _fileName->getEditString().c_str() : NULL; }
 
diff --git a/gui/fluidsynth-dialog.h b/gui/fluidsynth-dialog.h
index ebf6563..9050352 100644
--- a/gui/fluidsynth-dialog.h
+++ b/gui/fluidsynth-dialog.h
@@ -37,11 +37,11 @@ class PopUpWidget;
 class FluidSynthSettingsDialog : public Dialog {
 public:
 	FluidSynthSettingsDialog();
-	~FluidSynthSettingsDialog();
+	~FluidSynthSettingsDialog() override;
 
-	void open();
-	void close();
-	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void open() override;
+	void close() override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
 protected:
 	void setChorusSettingsState(bool enabled);
diff --git a/gui/gui-manager.h b/gui/gui-manager.h
index c83c80c..d97cd78 100644
--- a/gui/gui-manager.h
+++ b/gui/gui-manager.h
@@ -67,7 +67,7 @@ class GuiManager : public Common::Singleton<GuiManager> {
 	friend class Dialog;
 	friend class Common::Singleton<SingletonBaseType>;
 	GuiManager();
-	~GuiManager();
+	~GuiManager() override;
 public:
 
 	// Main entry for the GUI: this will start an event loop that keeps running
diff --git a/gui/launcher.h b/gui/launcher.h
index 7009b99..0461a19 100644
--- a/gui/launcher.h
+++ b/gui/launcher.h
@@ -43,15 +43,15 @@ class LauncherDialog : public Dialog {
 	typedef Common::Array<Common::String> StringArray;
 public:
 	LauncherDialog();
-	~LauncherDialog();
+	~LauncherDialog() override;
 
 	void rebuild();
 
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
-	virtual void handleKeyDown(Common::KeyState state);
-	virtual void handleKeyUp(Common::KeyState state);
-	virtual void handleOtherEvent(Common::Event evt);
+	void handleKeyDown(Common::KeyState state) override;
+	void handleKeyUp(Common::KeyState state) override;
+	void handleOtherEvent(Common::Event evt) override;
 	bool doGameDetection(const Common::String &path);
 protected:
 	EditTextWidget  *_searchWidget;
@@ -73,7 +73,7 @@ protected:
 
 	String _search;
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 
 	/**
 	 * Fill the list widget with all currently configured targets, and trigger
@@ -86,8 +86,8 @@ protected:
 	void build();
 	void clean();
 
-	void open();
-	void close();
+	void open() override;
+	void close() override;
 
 	/**
 	 * Handle "Add game..." button.
diff --git a/gui/massadd.h b/gui/massadd.h
index b81a604..a4476d6 100644
--- a/gui/massadd.h
+++ b/gui/massadd.h
@@ -40,8 +40,8 @@ public:
 	MassAddDialog(const Common::FSNode &startDir);
 
 	//void open();
-	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
-	void handleTickle();
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
+	void handleTickle() override;
 
 	Common::String getFirstAddedTarget() const {
 		if (!_games.empty())
diff --git a/gui/message.h b/gui/message.h
index ff69780..491ec02 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -43,7 +43,7 @@ class MessageDialog : public Dialog {
 public:
 	MessageDialog(const Common::String &message, const char *defaultButton = "OK", const char *altButton = 0);
 
-	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 };
 
 /**
@@ -53,7 +53,7 @@ class TimedMessageDialog : public MessageDialog {
 public:
 	TimedMessageDialog(const Common::String &message, uint32 duration);
 
-	void handleTickle();
+	void handleTickle() override;
 
 protected:
 	uint32 _timer;
diff --git a/gui/object.h b/gui/object.h
index 33d6ec3..220e72e 100644
--- a/gui/object.h
+++ b/gui/object.h
@@ -72,7 +72,7 @@ protected:
 public:
 	GuiObject(int x, int y, int w, int h) : _x(x), _y(y), _w(w), _h(h), _firstWidget(nullptr) { }
 	GuiObject(const Common::String &name);
-	~GuiObject();
+	~GuiObject() override;
 
 	virtual void setTextDrawableArea(const Common::Rect &r) { _textDrawableArea = r; }
 
diff --git a/gui/onscreendialog.h b/gui/onscreendialog.h
index ca95ff3..c5cf205 100644
--- a/gui/onscreendialog.h
+++ b/gui/onscreendialog.h
@@ -42,23 +42,23 @@ private:
 
 public:
 	OnScreenDialog(bool recordingMode);
-	~OnScreenDialog();
-	virtual void close();
-	virtual bool isVisible() const;
-	virtual void reflowLayout();
+	~OnScreenDialog() override;
+	void close() override;
+	bool isVisible() const override;
+	void reflowLayout() override;
 
 	void setReplayedTime(uint32 newTime);
 
-	virtual void handleMouseMoved(int x, int y, int button);
-	virtual void handleMouseDown(int x, int y, int button, int clickCount);
-	virtual void handleMouseUp(int x, int y, int button, int clickCount);
-	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleMouseMoved(int x, int y, int button) override;
+	void handleMouseDown(int x, int y, int button, int clickCount) override;
+	void handleMouseUp(int x, int y, int button, int clickCount) override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
 	bool isMouseOver();
 	bool isEditDlgVisible();
 	Dialog *getActiveDlg();
 protected:
-	virtual void releaseFocus();
+	void releaseFocus() override;
 };
 
 } // End of namespace GUI
diff --git a/gui/options.h b/gui/options.h
index 4674177..5e8a318 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -62,17 +62,17 @@ class OptionsDialog : public Dialog {
 public:
 	OptionsDialog(const Common::String &domain, int x, int y, int w, int h);
 	OptionsDialog(const Common::String &domain, const Common::String &name);
-	~OptionsDialog();
+	~OptionsDialog() override;
 
 	void init();
 
-	void open();
+	void open() override;
 	virtual void apply();
-	void close();
-	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void close() override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 	const Common::String& getDomain() const { return _domain; }
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 
 protected:
 	/** Config domain this dialog is used to edit. */
@@ -240,18 +240,18 @@ protected:
 class GlobalOptionsDialog : public OptionsDialog, public CommandSender {
 public:
 	GlobalOptionsDialog(LauncherDialog *launcher);
-	~GlobalOptionsDialog();
+	~GlobalOptionsDialog() override;
 
-	virtual void apply();
-	void close();
-	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
-	void handleTickle();
+	void apply() override;
+	void close() override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
+	void handleTickle() override;
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 
 protected:
-	virtual void build();
-	virtual void clean();
+	void build() override;
+	void clean() override;
 
 	Common::String _newTheme;
 	LauncherDialog *_launcher;
diff --git a/gui/predictivedialog.h b/gui/predictivedialog.h
index a8be434..1fdc845 100644
--- a/gui/predictivedialog.h
+++ b/gui/predictivedialog.h
@@ -36,13 +36,13 @@ class PicButtonWidget;
 class PredictiveDialog : public GUI::Dialog {
 public:
 	PredictiveDialog();
-	~PredictiveDialog();
+	~PredictiveDialog() override;
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 
-	virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
-	virtual void handleKeyUp(Common::KeyState state);
-	virtual void handleKeyDown(Common::KeyState state);
+	void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
+	void handleKeyUp(Common::KeyState state) override;
+	void handleKeyDown(Common::KeyState state) override;
 
 	const char *getResult() const { return _predictiveResult; }
 
diff --git a/gui/recorderdialog.h b/gui/recorderdialog.h
index 8a229a0..74ee1f4 100644
--- a/gui/recorderdialog.h
+++ b/gui/recorderdialog.h
@@ -69,10 +69,10 @@ public:
 		kRecordDialogPlayback
 	};
 	RecorderDialog();
-	~RecorderDialog();
+	~RecorderDialog() override;
 
-	virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
-	virtual void reflowLayout();
+	void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
+	void reflowLayout() override;
 
 	int runModal(Common::String &target);
 	const Common::String getFileName() {return _filename;}
diff --git a/gui/remotebrowser.h b/gui/remotebrowser.h
index 190d8c6..ae9353b 100644
--- a/gui/remotebrowser.h
+++ b/gui/remotebrowser.h
@@ -39,12 +39,12 @@ class CommandSender;
 class RemoteBrowserDialog : public Dialog {
 public:
 	RemoteBrowserDialog(const char *title);
-	virtual ~RemoteBrowserDialog();
+	~RemoteBrowserDialog() override;
 
-	virtual void open();
-	virtual void close();
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
-	virtual void handleTickle();
+	void open() override;
+	void close() override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
+	void handleTickle() override;
 
 	const Cloud::StorageFile	&getResult() { return _choice; }
 
diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h
index b4820ff..936ef03 100644
--- a/gui/saveload-dialog.h
+++ b/gui/saveload-dialog.h
@@ -42,10 +42,10 @@ class SaveLoadCloudSyncProgressDialog : public Dialog { //protected?
 	bool _close;
 public:
 	SaveLoadCloudSyncProgressDialog(bool canRunInBackground);
-	virtual ~SaveLoadCloudSyncProgressDialog();
+	~SaveLoadCloudSyncProgressDialog() override;
 
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
-	virtual void handleTickle();
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
+	void handleTickle() override;
 };
 #endif
 
@@ -72,20 +72,20 @@ class SaveLoadChooserDialog : protected Dialog {
 public:
 	SaveLoadChooserDialog(const Common::String &dialogName, const bool saveMode);
 	SaveLoadChooserDialog(int x, int y, int w, int h, const bool saveMode);
-	virtual ~SaveLoadChooserDialog();
+	~SaveLoadChooserDialog() override;
 
-	virtual void open();
-	virtual void close();
+	void open() override;
+	void close() override;
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
 #if defined(USE_CLOUD) && defined(USE_LIBCURL)
 	virtual void runSaveSync(bool hasSavepathOverride);
 #endif
 
-	virtual void handleTickle();
+	void handleTickle() override;
 
 #ifndef DISABLE_SAVELOADCHOOSER_GRID
 	virtual SaveLoadChooserType getType() const = 0;
@@ -136,22 +136,22 @@ class SaveLoadChooserSimple : public SaveLoadChooserDialog {
 public:
 	SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode);
 
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
-	virtual const Common::String &getResultString() const;
+	const Common::String &getResultString() const override;
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 
 #ifndef DISABLE_SAVELOADCHOOSER_GRID
-	virtual SaveLoadChooserType getType() const { return kSaveLoadDialogList; }
+	SaveLoadChooserType getType() const override { return kSaveLoadDialogList; }
 #endif // !DISABLE_SAVELOADCHOOSER_GRID
 
-	virtual void open();
-	virtual void close();
+	void open() override;
+	void close() override;
 protected:
-	virtual void updateSaveList();
+	void updateSaveList() override;
 private:
-	virtual int runIntern();
+	int runIntern() override;
 
 	ListWidget		*_list;
 	ButtonWidget	*_chooseButton;
@@ -181,9 +181,9 @@ public:
 
 	void setTargetSlot(int slot) { _targetSlot = slot; }
 
-	virtual void open();
+	void open() override;
 protected:
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 private:
 	int _targetSlot;
 	StaticTextWidget *_title;
@@ -193,23 +193,23 @@ private:
 class SaveLoadChooserGrid : public SaveLoadChooserDialog {
 public:
 	SaveLoadChooserGrid(const Common::String &title, bool saveMode);
-	~SaveLoadChooserGrid();
+	~SaveLoadChooserGrid() override;
 
-	virtual const Common::String &getResultString() const;
+	const Common::String &getResultString() const override;
 
-	virtual void open();
+	void open() override;
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 
-	virtual SaveLoadChooserType getType() const { return kSaveLoadDialogGrid; }
+	SaveLoadChooserType getType() const override { return kSaveLoadDialogGrid; }
 
-	virtual void close();
+	void close() override;
 protected:
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
-	virtual void handleMouseWheel(int x, int y, int direction);
-	virtual void updateSaveList();
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
+	void handleMouseWheel(int x, int y, int direction) override;
+	void updateSaveList() override;
 private:
-	virtual int runIntern();
+	int runIntern() override;
 
 	uint _columns, _lines;
 	uint _entriesPerPage;
diff --git a/gui/themebrowser.h b/gui/themebrowser.h
index bb0bec8..e3241e2 100644
--- a/gui/themebrowser.h
+++ b/gui/themebrowser.h
@@ -38,8 +38,8 @@ class ThemeBrowser : public Dialog {
 public:
 	ThemeBrowser();
 
-	void open();
-	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void open() override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
 	const Common::String &getSelected() const { return _select; }
 	const Common::String &getSelectedName() const { return _selectName; }
diff --git a/gui/updates-dialog.h b/gui/updates-dialog.h
index 428a82c..9d55c05 100644
--- a/gui/updates-dialog.h
+++ b/gui/updates-dialog.h
@@ -38,9 +38,9 @@ class PopUpWidget;
 class UpdatesDialog : public Dialog {
 public:
 	UpdatesDialog();
-	virtual ~UpdatesDialog() {}
+	~UpdatesDialog() override {}
 
-	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
 private:
 	PopUpWidget *_updatesPopUp;
diff --git a/gui/widget.h b/gui/widget.h
index 87099f5..878f85e 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -116,7 +116,7 @@ public:
 public:
 	Widget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
 	Widget(GuiObject *boss, const Common::String &name, const char *tooltip = 0);
-	virtual ~Widget();
+	~Widget() override;
 
 	void init();
 	void resize(int x, int y, int w, int h);
@@ -124,8 +124,8 @@ public:
 	void setNext(Widget *w) { _next = w; }
 	Widget *next() { return _next; }
 
-	virtual int16	getAbsX() const	{ return _x + _boss->getChildX(); }
-	virtual int16	getAbsY() const	{ return _y + _boss->getChildY(); }
+	int16	getAbsX() const override	{ return _x + _boss->getChildX(); }
+	int16	getAbsY() const override	{ return _y + _boss->getChildY(); }
 
 	virtual void setPos(int x, int y) { _x = x; _y = y; }
 	virtual void setSize(int w, int h) { _w = w; _h = h; }
@@ -161,7 +161,7 @@ public:
 	bool isEnabled() const;
 
 	void setVisible(bool e);
-	bool isVisible() const;
+	bool isVisible() const override;
 
 	uint8 parseHotkey(const Common::String &label);
 	Common::String cleanupHotkey(const Common::String &label);
@@ -184,10 +184,10 @@ protected:
 
 	virtual Widget *findWidget(int x, int y) { return this; }
 
-	void releaseFocus() { assert(_boss); _boss->releaseFocus(); }
+	void releaseFocus() override { assert(_boss); _boss->releaseFocus(); }
 
 	// By default, delegate unhandled commands to the boss
-	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { assert(_boss); _boss->handleCommand(sender, cmd, data); }
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override { assert(_boss); _boss->handleCommand(sender, cmd, data); }
 };
 
 /* StaticTextWidget */
@@ -201,14 +201,14 @@ public:
 	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
 	void setValue(int value);
 	void setLabel(const Common::String &label);
-	void handleMouseEntered(int button)	{ readLabel(); }
+	void handleMouseEntered(int button) override	{ readLabel(); }
 	const Common::String &getLabel() const		{ return _label; }
 	void setAlign(Graphics::TextAlign align);
 	Graphics::TextAlign getAlign() const		{ return _align; }
 	void readLabel() { read(_label); }
 
 protected:
-	void drawWidget();
+	void drawWidget() override;
 };
 
 /* ButtonWidget */
@@ -228,16 +228,16 @@ public:
 
 	void setLabel(const Common::String &label);
 
-	void handleMouseUp(int x, int y, int button, int clickCount);
-	void handleMouseDown(int x, int y, int button, int clickCount);
-	void handleMouseEntered(int button)	{ readLabel(); if (_duringPress) { setFlags(WIDGET_PRESSED); } else { setFlags(WIDGET_HILITED); } markAsDirty(); }
-	void handleMouseLeft(int button)	{ clearFlags(WIDGET_HILITED | WIDGET_PRESSED); markAsDirty(); }
+	void handleMouseUp(int x, int y, int button, int clickCount) override;
+	void handleMouseDown(int x, int y, int button, int clickCount) override;
+	void handleMouseEntered(int button) override	{ readLabel(); if (_duringPress) { setFlags(WIDGET_PRESSED); } else { setFlags(WIDGET_HILITED); } markAsDirty(); }
+	void handleMouseLeft(int button) override	{ clearFlags(WIDGET_HILITED | WIDGET_PRESSED); markAsDirty(); }
 
 	void setHighLighted(bool enable);
 	void setPressedState();
 	void setUnpressedState();
 protected:
-	void drawWidget();
+	void drawWidget() override;
 	bool _duringPress;
 };
 
@@ -281,7 +281,7 @@ class PicButtonWidget : public ButtonWidget {
 public:
 	PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
 	PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
-	~PicButtonWidget();
+	~PicButtonWidget() override;
 
 	void setGfx(const Graphics::Surface *gfx, int statenum = kPicButtonStateEnabled);
 	void setGfx(int w, int h, int r, int g, int b, int statenum = kPicButtonStateEnabled);
@@ -291,7 +291,7 @@ public:
 	void setButtonDisplay(bool enable) {_showButton = enable; }
 
 protected:
-	void drawWidget();
+	void drawWidget() override;
 
 	Graphics::Surface _gfx[kPicButtonStateMax + 1];
 	int _alpha;
@@ -307,16 +307,16 @@ public:
 	CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
 	CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
 
-	void handleMouseUp(int x, int y, int button, int clickCount);
-	virtual void handleMouseEntered(int button)	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
-	virtual void handleMouseLeft(int button)	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseUp(int x, int y, int button, int clickCount) override;
+	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseLeft(int button) override	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
 
 	void setState(bool state);
 	void toggleState()			{ setState(!_state); }
 	bool getState() const		{ return _state; }
 
 protected:
-	void drawWidget();
+	void drawWidget() override;
 };
 
 class RadiobuttonWidget;
@@ -324,7 +324,7 @@ class RadiobuttonWidget;
 class RadiobuttonGroup : public CommandSender {
 public:
 	RadiobuttonGroup(GuiObject *boss, uint32 cmd = 0);
-	~RadiobuttonGroup() {}
+	~RadiobuttonGroup() override {}
 
 	void addButton(RadiobuttonWidget *button) { _buttons.push_back(button); }
 	Common::Array<RadiobuttonWidget *> getButtonList() const { return _buttons; }
@@ -353,9 +353,9 @@ public:
 	RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = 0, uint8 hotkey = 0);
 	RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = 0, uint8 hotkey = 0);
 
-	void handleMouseUp(int x, int y, int button, int clickCount);
-	virtual void handleMouseEntered(int button)	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
-	virtual void handleMouseLeft(int button)	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseUp(int x, int y, int button, int clickCount) override;
+	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseLeft(int button) override	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
 
 	void setState(bool state, bool setGroup = true);
 	void toggleState()			{ setState(!_state); }
@@ -363,7 +363,7 @@ public:
 	int getValue() const			{ return _value; }
 
 protected:
-	void drawWidget();
+	void drawWidget() override;
 
 	RadiobuttonGroup *_group;
 };
@@ -391,15 +391,15 @@ public:
 	void setMaxValue(int value)	{ _valueMax = value; }
 	int getMaxValue() const		{ return _valueMax; }
 
-	void handleMouseMoved(int x, int y, int button);
-	void handleMouseDown(int x, int y, int button, int clickCount);
-	void handleMouseUp(int x, int y, int button, int clickCount);
-	void handleMouseEntered(int button)	{ setFlags(WIDGET_HILITED); markAsDirty(); }
-	void handleMouseLeft(int button)	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
-	void handleMouseWheel(int x, int y, int direction);
+	void handleMouseMoved(int x, int y, int button) override;
+	void handleMouseDown(int x, int y, int button, int clickCount) override;
+	void handleMouseUp(int x, int y, int button, int clickCount) override;
+	void handleMouseEntered(int button) override	{ setFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseLeft(int button) override	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseWheel(int x, int y, int direction) override;
 
 protected:
-	void drawWidget();
+	void drawWidget() override;
 
 	int valueToPos(int value);
 	int posToValue(int pos);
@@ -411,7 +411,7 @@ class GraphicsWidget : public Widget {
 public:
 	GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
 	GraphicsWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0);
-	~GraphicsWidget();
+	~GraphicsWidget() override;
 
 	void setGfx(const Graphics::Surface *gfx);
 	void setGfx(int w, int h, int r, int g, int b);
@@ -420,7 +420,7 @@ public:
 	void useThemeTransparency(bool enable) { _transparency = enable; }
 
 protected:
-	void drawWidget();
+	void drawWidget() override;
 
 	Graphics::Surface _gfx;
 	int _alpha;
@@ -432,15 +432,15 @@ class ContainerWidget : public Widget {
 public:
 	ContainerWidget(GuiObject *boss, int x, int y, int w, int h);
 	ContainerWidget(GuiObject *boss, const Common::String &name);
-	~ContainerWidget();
+	~ContainerWidget() override;
 
-	virtual bool containsWidget(Widget *) const;
-	virtual Widget *findWidget(int x, int y);
-	virtual void removeWidget(Widget *widget);
+	bool containsWidget(Widget *) const override;
+	Widget *findWidget(int x, int y) override;
+	void removeWidget(Widget *widget) override;
 
 	void setBackgroundType(ThemeEngine::WidgetBackground backgroundType);
 protected:
-	void drawWidget();
+	void drawWidget() override;
 
 	ThemeEngine::WidgetBackground _backgroundType;
 };
diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h
index e3b3a2b..a437233 100644
--- a/gui/widgets/editable.h
+++ b/gui/widgets/editable.h
@@ -62,16 +62,16 @@ protected:
 public:
 	EditableWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0);
 	EditableWidget(GuiObject *boss, const String &name, const char *tooltip = 0, uint32 cmd = 0);
-	virtual ~EditableWidget();
+	~EditableWidget() override;
 
 	void init();
 
 	virtual void setEditString(const String &str);
 	virtual const String &getEditString() const		{ return _editString; }
 
-	virtual void handleTickle();
-	virtual bool handleKeyDown(Common::KeyState state);
-	virtual void reflowLayout();
+	void handleTickle() override;
+	bool handleKeyDown(Common::KeyState state) override;
+	void reflowLayout() override;
 
 	bool setCaretPos(int newPos);
 
diff --git a/gui/widgets/edittext.h b/gui/widgets/edittext.h
index a20d40e..152e3a9 100644
--- a/gui/widgets/edittext.h
+++ b/gui/widgets/edittext.h
@@ -43,24 +43,24 @@ public:
 	EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = 0, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
 	EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = 0, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
 
-	void setEditString(const String &str);
+	void setEditString(const String &str) override;
 
-	virtual void handleMouseDown(int x, int y, int button, int clickCount);
+	void handleMouseDown(int x, int y, int button, int clickCount) override;
 
-	virtual bool wantsFocus() { return true; }
+	bool wantsFocus() override { return true; }
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 
 protected:
-	void drawWidget();
-	void receivedFocusWidget();
-	void lostFocusWidget();
+	void drawWidget() override;
+	void receivedFocusWidget() override;
+	void lostFocusWidget() override;
 
-	void startEditMode();
-	void endEditMode();
-	void abortEditMode();
+	void startEditMode() override;
+	void endEditMode() override;
+	void abortEditMode() override;
 
-	Common::Rect getEditRect() const;
+	Common::Rect getEditRect() const override;
 
 	uint32 _finishCmd;
 };
diff --git a/gui/widgets/list.h b/gui/widgets/list.h
index eeaad30..e3d9b9b 100644
--- a/gui/widgets/list.h
+++ b/gui/widgets/list.h
@@ -90,8 +90,8 @@ public:
 	ListWidget(Dialog *boss, const String &name, const char *tooltip = 0, uint32 cmd = 0);
 	ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0);
 
-	virtual bool containsWidget(Widget *) const;
-	virtual Widget *findWidget(int x, int y);
+	bool containsWidget(Widget *) const override;
+	Widget *findWidget(int x, int y) override;
 
 	void setList(const StringArray &list, const ColorList *colors = 0);
 	const StringArray &getList()	const			{ return _dataList; }
@@ -118,38 +118,38 @@ public:
 	void setEditColor(ThemeEngine::FontColor color) { _editColor = color; }
 
 	// Made startEditMode/endEditMode for SaveLoadChooser
-	void startEditMode();
-	void endEditMode();
+	void startEditMode() override;
+	void endEditMode() override;
 
 	void setFilter(const String &filter, bool redraw = true);
 
-	virtual void handleTickle();
-	virtual void handleMouseDown(int x, int y, int button, int clickCount);
-	virtual void handleMouseUp(int x, int y, int button, int clickCount);
-	virtual void handleMouseWheel(int x, int y, int direction);
-	virtual void handleMouseMoved(int x, int y, int button);
-	virtual void handleMouseLeft(int button);
-	virtual bool handleKeyDown(Common::KeyState state);
-	virtual bool handleKeyUp(Common::KeyState state);
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleTickle() override;
+	void handleMouseDown(int x, int y, int button, int clickCount) override;
+	void handleMouseUp(int x, int y, int button, int clickCount) override;
+	void handleMouseWheel(int x, int y, int direction) override;
+	void handleMouseMoved(int x, int y, int button) override;
+	void handleMouseLeft(int button) override;
+	bool handleKeyDown(Common::KeyState state) override;
+	bool handleKeyUp(Common::KeyState state) override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 
-	virtual bool wantsFocus() { return true; }
+	bool wantsFocus() override { return true; }
 
 protected:
-	void drawWidget();
+	void drawWidget() override;
 
 	/// Finds the item at position (x,y). Returns -1 if there is no item there.
 	int findItem(int x, int y) const;
 	void scrollBarRecalc();
 
-	void abortEditMode();
+	void abortEditMode() override;
 
-	Common::Rect getEditRect() const;
+	Common::Rect getEditRect() const override;
 
-	void receivedFocusWidget();
-	void lostFocusWidget();
+	void receivedFocusWidget() override;
+	void lostFocusWidget() override;
 	void checkBounds();
 	void scrollToCurrent();
 };
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index d7c218f..e6010c8 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -60,8 +60,8 @@ public:
 	PopUpWidget(GuiObject *boss, const String &name, const char *tooltip = 0);
 	PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
 
-	void handleMouseDown(int x, int y, int button, int clickCount);
-	void handleMouseWheel(int x, int y, int direction);
+	void handleMouseDown(int x, int y, int button, int clickCount) override;
+	void handleMouseWheel(int x, int y, int direction) override;
 
 	void appendEntry(const String &entry, uint32 tag = (uint32)-1);
 	void clearEntries();
@@ -77,12 +77,12 @@ public:
 	uint32 getSelectedTag() const				{ return (_selectedItem >= 0) ? _entries[_selectedItem].tag : (uint32)-1; }
 //	const String& getSelectedString() const		{ return (_selectedItem >= 0) ? _entries[_selectedItem].name : String::emptyString; }
 
-	void handleMouseEntered(int button)	{ if (_selectedItem != -1) read(_entries[_selectedItem].name); setFlags(WIDGET_HILITED); markAsDirty(); }
-	void handleMouseLeft(int button)	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseEntered(int button) override	{ if (_selectedItem != -1) read(_entries[_selectedItem].name); setFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseLeft(int button) override	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
 
-	virtual void reflowLayout();
+	void reflowLayout() override;
 protected:
-	void drawWidget();
+	void drawWidget() override;
 };
 
 /**
diff --git a/gui/widgets/scrollbar.h b/gui/widgets/scrollbar.h
index ad7e83f..afbca23 100644
--- a/gui/widgets/scrollbar.h
+++ b/gui/widgets/scrollbar.h
@@ -65,14 +65,14 @@ public:
 public:
 	ScrollBarWidget(GuiObject *boss, int x, int y, int w, int h);
 
-	void handleMouseDown(int x, int y, int button, int clickCount);
-	void handleMouseUp(int x, int y, int button, int clickCount);
-	void handleMouseWheel(int x, int y, int direction);
-	void handleMouseMoved(int x, int y, int button);
-	void handleMouseEntered(int button)	{ setFlags(WIDGET_HILITED); }
-	void handleMouseLeft(int button)	{ clearFlags(WIDGET_HILITED); _part = kNoPart; markAsDirty(); }
-	void handleTickle();
-	bool wantsFocus() { return true; }
+	void handleMouseDown(int x, int y, int button, int clickCount) override;
+	void handleMouseUp(int x, int y, int button, int clickCount) override;
+	void handleMouseWheel(int x, int y, int direction) override;
+	void handleMouseMoved(int x, int y, int button) override;
+	void handleMouseEntered(int button) override	{ setFlags(WIDGET_HILITED); }
+	void handleMouseLeft(int button) override	{ clearFlags(WIDGET_HILITED); _part = kNoPart; markAsDirty(); }
+	void handleTickle() override;
+	bool wantsFocus() override { return true; }
 
 	// FIXME - this should be private, but then we also have to add accessors
 	// for _numEntries, _entriesPerPage and _currentPos. This again leads to the question:
@@ -82,7 +82,7 @@ public:
 	void checkBounds(int old_pos);
 
 protected:
-	void drawWidget();
+	void drawWidget() override;
 };
 
 } // End of namespace GUI
diff --git a/gui/widgets/tab.h b/gui/widgets/tab.h
index 1aa9ded..d7f75bd 100644
--- a/gui/widgets/tab.h
+++ b/gui/widgets/tab.h
@@ -66,7 +66,7 @@ protected:
 public:
 	TabWidget(GuiObject *boss, int x, int y, int w, int h);
 	TabWidget(GuiObject *boss, const String &name);
-	~TabWidget();
+	~TabWidget() override;
 
 	void init();
 
@@ -103,17 +103,17 @@ public:
 		_tabs[tabID].title = title;
 	}
 
-	virtual void handleMouseDown(int x, int y, int button, int clickCount) override;
-	virtual void handleMouseMoved(int x, int y, int button);
-	virtual void handleMouseLeft(int button) { _lastRead = -1; };
-	virtual bool handleKeyDown(Common::KeyState state) override;
-	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
+	void handleMouseDown(int x, int y, int button, int clickCount) override;
+	void handleMouseMoved(int x, int y, int button) override;
+	void handleMouseLeft(int button) override { _lastRead = -1; };
+	bool handleKeyDown(Common::KeyState state) override;
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 	virtual int getFirstVisible() const;
 	virtual void setFirstVisible(int tabID, bool adjustIfRoom = false);
 
-	virtual bool containsWidget(Widget *) const override;
+	bool containsWidget(Widget *) const override;
 
-	virtual void reflowLayout() override;
+	void reflowLayout() override;
 
 	void draw() override;
 	void markAsDirty() override;
@@ -121,12 +121,12 @@ public:
 protected:
 	// We overload getChildY to make sure child widgets are positioned correctly.
 	// Essentially this compensates for the space taken up by the tab title header.
-	virtual int16 getChildY() const override;
-	virtual uint16 getHeight() const override;
+	int16 getChildY() const override;
+	uint16 getHeight() const override;
 
-	virtual void drawWidget() override;
+	void drawWidget() override;
 
-	virtual Widget *findWidget(int x, int y) override;
+	Widget *findWidget(int x, int y) override;
 
 	virtual void adjustTabs(int value);
 


Commit: 6e1abf064ab35b299b865fd05dc1e1c31b1748d8
    https://github.com/scummvm/scummvm/commit/6e1abf064ab35b299b865fd05dc1e1c31b1748d8
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-01-19T15:08:37+01:00

Commit Message:
GUI: Use nullptr instead of 0 or NULL where appropriate

Changed paths:
    gui/EventRecorder.cpp
    gui/ThemeEngine.cpp
    gui/ThemeEval.cpp
    gui/ThemeLayout.h
    gui/ThemeParser.cpp
    gui/Tooltip.cpp
    gui/about.cpp
    gui/animation/Animation.cpp
    gui/browser.cpp
    gui/chooser.cpp
    gui/console.cpp
    gui/debugger.h
    gui/dialog.cpp
    gui/dialog.h
    gui/downloaddialog.cpp
    gui/editgamedialog.cpp
    gui/editrecorddialog.cpp
    gui/filebrowser-dialog.cpp
    gui/filebrowser-dialog.h
    gui/fluidsynth-dialog.cpp
    gui/gui-manager.cpp
    gui/gui-manager.h
    gui/launcher.cpp
    gui/massadd.cpp
    gui/message.cpp
    gui/message.h
    gui/object.cpp
    gui/onscreendialog.cpp
    gui/options.cpp
    gui/predictivedialog.cpp
    gui/recorderdialog.cpp
    gui/remotebrowser.cpp
    gui/saveload-dialog.cpp
    gui/saveload-dialog.h
    gui/saveload.cpp
    gui/themebrowser.cpp
    gui/unknown-game-dialog.cpp
    gui/updates-dialog.cpp
    gui/widget.cpp
    gui/widget.h
    gui/widgets/editable.h
    gui/widgets/edittext.h
    gui/widgets/list.h
    gui/widgets/popup.h
    gui/widgets/tab.cpp


diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp
index f66738e..d0cf266 100644
--- a/gui/EventRecorder.cpp
+++ b/gui/EventRecorder.cpp
@@ -70,9 +70,9 @@ void writeTime(Common::WriteStream *outFile, uint32 d) {
 }
 
 EventRecorder::EventRecorder() {
-	_timerManager = NULL;
+	_timerManager = nullptr;
 	_recordMode = kPassthrough;
-	_fakeMixerManager = NULL;
+	_fakeMixerManager = nullptr;
 	_initialized = false;
 	_needRedraw = false;
 	_fastPlayback = false;
@@ -81,21 +81,19 @@ EventRecorder::EventRecorder() {
 	_savedState = false;
 	_needcontinueGame = false;
 	_temporarySlot = 0;
-	_realSaveManager = 0;
-	_realMixerManager = 0;
-	_controlPanel = 0;
+	_realSaveManager = nullptr;
+	_realMixerManager = nullptr;
+	_controlPanel = nullptr;
 	_lastMillis = 0;
 	_lastScreenshotTime = 0;
 	_screenshotPeriod = 0;
-	_playbackFile = 0;
+	_playbackFile = nullptr;
 
 	DebugMan.addDebugChannel(kDebugLevelEventRec, "EventRec", "Event recorder debug level");
 }
 
 EventRecorder::~EventRecorder() {
-	if (_timerManager != NULL) {
-		delete _timerManager;
-	}
+	delete _timerManager;
 }
 
 void EventRecorder::deinit() {
@@ -107,7 +105,7 @@ void EventRecorder::deinit() {
 	_initialized = false;
 	_recordMode = kPassthrough;
 	delete _fakeMixerManager;
-	_fakeMixerManager = NULL;
+	_fakeMixerManager = nullptr;
 	_controlPanel->close();
 	delete _controlPanel;
 	debugC(1, kDebugLevelEventRec, "playback:action=stopplayback");
@@ -486,7 +484,7 @@ Common::List<Common::Event> EventRecorder::mapEvent(const Common::Event &ev, Com
 
 void EventRecorder::setGameMd5(const ADGameDescription *gameDesc) {
 	for (const ADGameFileDescription *fileDesc = gameDesc->filesDescriptions; fileDesc->fileName; fileDesc++) {
-		if (fileDesc->md5 != NULL) {
+		if (fileDesc->md5 != nullptr) {
 			_playbackFile->getHeader().hashRecords[fileDesc->fileName] = fileDesc->md5;
 		}
 	}
@@ -536,13 +534,13 @@ Common::SeekableReadStream *EventRecorder::processSaveStream(const Common::Strin
 		return new Common::MemoryReadStream(_playbackFile->getHeader().saveFiles[fileName].buffer, _playbackFile->getHeader().saveFiles[fileName].size);
 	case kRecorderRecord:
 		saveFile = _realSaveManager->openForLoading(fileName);
-		if (saveFile != NULL) {
+		if (saveFile != nullptr) {
 			_playbackFile->addSaveFile(fileName, saveFile);
 			saveFile->seek(0);
 		}
 		return saveFile;
 	default:
-		return NULL;
+		return nullptr;
 		break;
 	}
 }
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 06abdcd..7928499 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -173,10 +173,10 @@ static const DrawDataInfo kDrawDataDefaults[] = {
  * ThemeEngine class
  *********************************************************/
 ThemeEngine::ThemeEngine(Common::String id, GraphicsMode mode) :
-	_system(0), _vectorRenderer(0),
+	_system(nullptr), _vectorRenderer(nullptr),
 	_layerToDraw(kDrawLayerBackground), _bytesPerPixel(0),  _graphicsMode(kGfxDisabled),
-	_font(0), _initOk(false), _themeOk(false), _enabled(false), _themeFiles(),
-	_cursor(0) {
+	_font(nullptr), _initOk(false), _themeOk(false), _enabled(false), _themeFiles(),
+	_cursor(nullptr) {
 
 	_system = g_system;
 	_parser = new ThemeParser(this);
@@ -185,15 +185,15 @@ ThemeEngine::ThemeEngine(Common::String id, GraphicsMode mode) :
 	_useCursor = false;
 
 	for (int i = 0; i < kDrawDataMAX; ++i) {
-		_widgets[i] = 0;
+		_widgets[i] = nullptr;
 	}
 
 	for (int i = 0; i < kTextDataMAX; ++i) {
-		_texts[i] = 0;
+		_texts[i] = nullptr;
 	}
 
 	for (int i = 0; i < kTextColorMAX; ++i) {
-		_textColors[i] = 0;
+		_textColors[i] = nullptr;
 	}
 
 	// We currently allow two different ways of theme selection in our config file:
@@ -207,7 +207,7 @@ ThemeEngine::ThemeEngine(Common::String id, GraphicsMode mode) :
 	_themeId = getThemeId(_themeFile);
 
 	_graphicsMode = mode;
-	_themeArchive = 0;
+	_themeArchive = nullptr;
 	_initOk = false;
 
 	_cursorHotspotX = _cursorHotspotY = 0;
@@ -220,7 +220,7 @@ ThemeEngine::ThemeEngine(Common::String id, GraphicsMode mode) :
 
 ThemeEngine::~ThemeEngine() {
 	delete _vectorRenderer;
-	_vectorRenderer = 0;
+	_vectorRenderer = nullptr;
 	_screen.free();
 	_backBuffer.free();
 
@@ -488,7 +488,7 @@ void ThemeEngine::restoreBackground(Common::Rect r) {
 void ThemeEngine::addDrawStep(const Common::String &drawDataId, const Graphics::DrawStep &step) {
 	DrawData id = parseDrawDataId(drawDataId);
 
-	assert(id != kDDNone && _widgets[id] != 0);
+	assert(id != kDDNone && _widgets[id] != nullptr);
 	_widgets[id]->_steps.push_back(step);
 }
 
@@ -510,7 +510,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file, const Com
 	if (textId == -1)
 		return false;
 
-	if (_texts[textId] != 0)
+	if (_texts[textId] != nullptr)
 		delete _texts[textId];
 
 	_texts[textId] = new TextDrawData;
@@ -570,7 +570,7 @@ bool ThemeEngine::addTextColor(TextColor colorId, int r, int g, int b) {
 	if (colorId >= kTextColorMAX)
 		return false;
 
-	if (_textColors[colorId] != 0)
+	if (_textColors[colorId] != nullptr)
 		delete _textColors[colorId];
 
 	_textColors[colorId] = new TextColorData;
@@ -588,7 +588,7 @@ bool ThemeEngine::addBitmap(const Common::String &filename) {
 	if (surf)
 		return true;
 
-	const Graphics::Surface *srcSurface = 0;
+	const Graphics::Surface *srcSurface = nullptr;
 
 	if (filename.hasSuffix(".png")) {
 		// Maybe it is PNG?
@@ -637,7 +637,7 @@ bool ThemeEngine::addBitmap(const Common::String &filename) {
 	// Store the surface into our hashmap (attention, may store NULL entries!)
 	_bitmaps[filename] = surf;
 
-	return surf != 0;
+	return surf != nullptr;
 }
 
 bool ThemeEngine::addAlphaBitmap(const Common::String &filename) {
@@ -647,7 +647,7 @@ bool ThemeEngine::addAlphaBitmap(const Common::String &filename) {
 		return true;
 
 #ifdef USE_PNG
-	const Graphics::TransparentSurface *srcSurface = 0;
+	const Graphics::TransparentSurface *srcSurface = nullptr;
 #endif
 
 	if (filename.hasSuffix(".png")) {
@@ -681,7 +681,7 @@ bool ThemeEngine::addAlphaBitmap(const Common::String &filename) {
 	// Store the surface into our hashmap (attention, may store NULL entries!)
 	_abitmaps[filename] = surf;
 
-	return surf != 0;
+	return surf != nullptr;
 }
 
 bool ThemeEngine::addDrawData(const Common::String &data, bool cached) {
@@ -690,7 +690,7 @@ bool ThemeEngine::addDrawData(const Common::String &data, bool cached) {
 	if (id == -1)
 		return false;
 
-	if (_widgets[id] != 0)
+	if (_widgets[id] != nullptr)
 		delete _widgets[id];
 
 	_widgets[id] = new WidgetDrawData;
@@ -722,7 +722,7 @@ void ThemeEngine::loadTheme(const Common::String &themeId) {
 	}
 
 	for (int i = 0; i < kDrawDataMAX; ++i) {
-		if (_widgets[i] == 0) {
+		if (_widgets[i] == nullptr) {
 			warning("Missing data asset: '%s'", kDrawDataDefaults[i].name);
 		} else {
 			_widgets[i]->calcBackgroundOffset();
@@ -736,17 +736,17 @@ void ThemeEngine::unloadTheme() {
 
 	for (int i = 0; i < kDrawDataMAX; ++i) {
 		delete _widgets[i];
-		_widgets[i] = 0;
+		_widgets[i] = nullptr;
 	}
 
 	for (int i = 0; i < kTextDataMAX; ++i) {
 		delete _texts[i];
-		_texts[i] = 0;
+		_texts[i] = nullptr;
 	}
 
 	for (int i = 0; i < kTextColorMAX; ++i) {
 		delete _textColors[i];
-		_textColors[i] = 0;
+		_textColors[i] = nullptr;
 	}
 
 	_themeEval->reset();
@@ -1553,7 +1553,7 @@ const Graphics::Font *ThemeEngine::loadScalableFont(const Common::String &filena
 	if (font)
 		return font;
 #endif
-	return 0;
+	return nullptr;
 }
 
 const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename, Common::String &name) {
@@ -1588,13 +1588,13 @@ const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename, Comm
 		}
 	}
 
-	return 0;
+	return nullptr;
 }
 
 const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename, const Common::String &scalableFilename, const Common::String &charset, const int pointsize, const bool makeLocalizedFont) {
 	Common::String fontName;
 
-	const Graphics::Font *font = 0;
+	const Graphics::Font *font = nullptr;
 
 	// Prefer scalable fonts over non-scalable fonts
 	if (!scalableFilename.empty())
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp
index 3eede27..03a4cbe 100644
--- a/gui/ThemeEval.cpp
+++ b/gui/ThemeEval.cpp
@@ -131,7 +131,7 @@ void ThemeEval::addDialog(const Common::String &name, const Common::String &over
 }
 
 void ThemeEval::addLayout(ThemeLayout::LayoutType type, int spacing, ThemeLayout::ItemAlign itemAlign) {
-	ThemeLayout *layout = 0;
+	ThemeLayout *layout = nullptr;
 
 	if (spacing == -1)
 		spacing = getVar("Globals.Layout.Spacing", 4);
diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h
index df62ea3..eed2eff 100644
--- a/gui/ThemeLayout.h
+++ b/gui/ThemeLayout.h
@@ -162,7 +162,7 @@ public:
 
 protected:
 	LayoutType getLayoutType() const override { return kLayoutMain; }
-	ThemeLayout *makeClone(ThemeLayout *newParent) override { assert(!"Do not copy Main Layouts!"); return 0; }
+	ThemeLayout *makeClone(ThemeLayout *newParent) override { assert(!"Do not copy Main Layouts!"); return nullptr; }
 
 	int16 _defaultX;
 	int16 _defaultY;
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index f48ba6b..951d124 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -105,7 +105,7 @@ static GUI::ThemeEngine::TextAlignVertical parseTextVAlign(const Common::String
 
 ThemeParser::ThemeParser(ThemeEngine *parent) : XMLParser() {
 	_defaultStepGlobal = defaultDrawStep();
-	_defaultStepLocal = 0;
+	_defaultStepLocal = nullptr;
 	_theme = parent;
 }
 
@@ -119,7 +119,7 @@ void ThemeParser::cleanup() {
 	delete _defaultStepLocal;
 
 	_defaultStepGlobal = defaultDrawStep();
-	_defaultStepLocal = 0;
+	_defaultStepLocal = nullptr;
 	_palette.clear();
 }
 
@@ -140,7 +140,7 @@ Graphics::DrawStep *ThemeParser::defaultDrawStep() {
 
 Graphics::DrawStep *ThemeParser::newDrawStep() {
 	assert(_defaultStepGlobal);
-	Graphics::DrawStep *step = 0; //new DrawStep;
+	Graphics::DrawStep *step = nullptr; //new DrawStep;
 
 	if (_defaultStepLocal) {
 		step = new Graphics::DrawStep(*_defaultStepLocal);
@@ -153,12 +153,12 @@ Graphics::DrawStep *ThemeParser::newDrawStep() {
 
 bool ThemeParser::parserCallback_defaults(ParserNode *node) {
 	ParserNode *parentNode = getParentNode(node);
-	Graphics::DrawStep *step = 0;
+	Graphics::DrawStep *step = nullptr;
 
 	if (parentNode->name == "render_info") {
 		step = _defaultStepGlobal;
 	} else if (parentNode->name == "drawdata") {
-		if (_defaultStepLocal == 0)
+		if (_defaultStepLocal == nullptr)
 			_defaultStepLocal = new Graphics::DrawStep(*_defaultStepGlobal);
 
 		step = _defaultStepLocal;
@@ -337,7 +337,7 @@ static Graphics::DrawingFunctionCallback getDrawingFunctionCallback(const Common
 	if (name == "alphabitmap")
 		return &Graphics::VectorRenderer::drawCallback_ALPHABITMAP;
 
-	return 0;
+	return nullptr;
 }
 
 
@@ -348,7 +348,7 @@ bool ThemeParser::parserCallback_drawstep(ParserNode *node) {
 
 	drawstep->drawingCall = getDrawingFunctionCallback(functionName);
 
-	if (drawstep->drawingCall == 0) {
+	if (drawstep->drawingCall == nullptr) {
 		delete drawstep;
 		return parserError(functionName + " is not a valid drawing function name");
 	}
@@ -381,7 +381,7 @@ bool ThemeParser::parserCallback_drawdata(ParserNode *node) {
 		return parserError("Error adding Draw Data set: Invalid DrawData name.");
 
 	delete _defaultStepLocal;
-	_defaultStepLocal = 0;
+	_defaultStepLocal = nullptr;
 
 	return true;
 }
diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp
index cdfc43f..01418cd 100644
--- a/gui/Tooltip.cpp
+++ b/gui/Tooltip.cpp
@@ -32,7 +32,7 @@ namespace GUI {
 
 
 Tooltip::Tooltip() :
-	Dialog(-1, -1, -1, -1), _maxWidth(-1), _parent(NULL), _xdelta(0), _ydelta(0) {
+	Dialog(-1, -1, -1, -1), _maxWidth(-1), _parent(nullptr), _xdelta(0), _ydelta(0) {
 
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundTooltip;
 }
diff --git a/gui/about.cpp b/gui/about.cpp
index 42c01f3..c1ac23e 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -156,7 +156,7 @@ void AboutDialog::addLine(const char *str) {
 			// We could use TransMan.getCurrentCharset() but rather than compare strings
 			// it is easier to use TransMan.getCharsetMapping() (non null in case of non
 			// ISO-8859-1 mapping)
-			useAscii = (TransMan.getCharsetMapping() != NULL);
+			useAscii = (TransMan.getCharsetMapping() != nullptr);
 #endif
 			if (useAscii)
 				asciiStr = str;
diff --git a/gui/animation/Animation.cpp b/gui/animation/Animation.cpp
index ee4d900..08622b7 100644
--- a/gui/animation/Animation.cpp
+++ b/gui/animation/Animation.cpp
@@ -58,7 +58,7 @@ void Animation::update(Drawable *drawable, long currentTime) {
 	}
 
 	// Activate the interpolator if present
-	if (_interpolator.get() != NULL) {
+	if (_interpolator.get() != nullptr) {
 		interpolation = _interpolator->interpolate(interpolation);
 	}
 
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 820e773..ac79c5d 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -54,8 +54,8 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
 
 	_title = title;
 	_isDirBrowser = dirBrowser;
-	_fileList = NULL;
-	_currentPath = NULL;
+	_fileList = nullptr;
+	_currentPath = nullptr;
 	_showHidden = false;
 
 	// Headline - TODO: should be customizable during creation time
@@ -79,8 +79,8 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
 		new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
 	else
 		new ButtonWidget(this, "Browser.Up", _c("Go up", "lowres"), _("Go to previous directory level"), kGoUpCmd);
-	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), 0, kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", _("Choose"), 0, kChooseCmd);
+	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", _("Choose"), nullptr, kChooseCmd);
 }
 
 int BrowserDialog::runModal() {
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index 1351263..798689b 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -43,8 +43,8 @@ ChooserDialog::ChooserDialog(const String &title, String dialogId)
 	_list->setEditable(false);
 
 	// Buttons
-	new ButtonWidget(this, dialogId + ".Cancel", _("Cancel"), 0, kCloseCmd);
-	_chooseButton = new ButtonWidget(this, dialogId + ".Choose", _("Choose"), 0, kChooseCmd);
+	new ButtonWidget(this, dialogId + ".Cancel", _("Cancel"), nullptr, kCloseCmd);
+	_chooseButton = new ButtonWidget(this, dialogId + ".Choose", _("Choose"), nullptr, kChooseCmd);
 	_chooseButton->setEnabled(false);
 }
 
diff --git a/gui/console.cpp b/gui/console.cpp
index 41b7a73..d2df0fd 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -76,8 +76,8 @@ ConsoleDialog::ConsoleDialog(float widthPercent, float heightPercent)
 	_promptStartPos = _promptEndPos = -1;
 
 	// Init callback
-	_callbackProc = 0;
-	_callbackRefCon = 0;
+	_callbackProc = nullptr;
+	_callbackRefCon = nullptr;
 
 	// Init History
 	_historyIndex = 0;
diff --git a/gui/debugger.h b/gui/debugger.h
index 0f4982a..fc74e49 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -65,7 +65,7 @@ public:
 	 * 'Attach' the debugger. This ensures that the next time onFrame()
 	 * is invoked, the debugger will activate and accept user input.
 	 */
-	virtual void attach(const char *entry = 0);
+	virtual void attach(const char *entry = nullptr);
 
 	/**
 	 * Return true if the debugger is currently active (i.e. executing
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index ed6958b..2ad4c1b 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -41,7 +41,7 @@ namespace GUI {
 
 Dialog::Dialog(int x, int y, int w, int h)
 	: GuiObject(x, y, w, h),
-	  _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _tickleWidget(0), _visible(false),
+	  _mouseWidget(nullptr), _focusedWidget(nullptr), _dragWidget(nullptr), _tickleWidget(nullptr), _visible(false),
 	_backgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) {
 	// Some dialogs like LauncherDialog use internally a fixed size, even though
 	// their widgets rely on the layout to be initialized correctly by the theme.
@@ -55,7 +55,7 @@ Dialog::Dialog(int x, int y, int w, int h)
 
 Dialog::Dialog(const Common::String &name)
 	: GuiObject(name),
-	  _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _tickleWidget(0), _visible(false),
+	  _mouseWidget(nullptr), _focusedWidget(nullptr), _dragWidget(nullptr), _tickleWidget(nullptr), _visible(false),
 	_backgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) {
 
 	// It may happen that we have 3x scaler in launcher (960xY) and then 640x480
@@ -94,7 +94,7 @@ void Dialog::close() {
 
 	if (_mouseWidget) {
 		_mouseWidget->handleMouseLeft(0);
-		_mouseWidget = 0;
+		_mouseWidget = nullptr;
 	}
 	releaseFocus();
 	g_gui.closeTopDialog();
@@ -119,7 +119,7 @@ void Dialog::reflowLayout() {
 }
 
 void Dialog::lostFocus() {
-	_dragWidget = NULL;
+	_dragWidget = nullptr;
 
 	if (_tickleWidget) {
 		_tickleWidget->lostFocus();
@@ -151,7 +151,7 @@ void Dialog::setDefaultFocusedWidget() {
 void Dialog::releaseFocus() {
 	if (_focusedWidget) {
 		_focusedWidget->lostFocus();
-		_focusedWidget = 0;
+		_focusedWidget = nullptr;
 	}
 }
 
@@ -228,7 +228,7 @@ void Dialog::handleMouseUp(int x, int y, int button, int clickCount) {
 	if (w)
 		w->handleMouseUp(x - (w->getAbsX() - _x), y - (w->getAbsY() - _y), button, clickCount);
 
-	_dragWidget = 0;
+	_dragWidget = nullptr;
 }
 
 void Dialog::handleMouseWheel(int x, int y, int direction) {
@@ -310,7 +310,7 @@ void Dialog::handleMouseMoved(int x, int y, int button) {
 			_mouseWidget = w;
 			w->handleMouseEntered(button);
 		} else if (!mouseInFocusedWidget && _mouseWidget == w) {
-			_mouseWidget = 0;
+			_mouseWidget = nullptr;
 			w->handleMouseLeft(button);
 		}
 
@@ -333,7 +333,7 @@ void Dialog::handleMouseMoved(int x, int y, int button) {
 		// If we have a widget in drag mode we prevent mouseEntered
 		// events from being sent to other widgets.
 		if (_dragWidget && w != _dragWidget)
-			w = 0;
+			w = nullptr;
 
 		if (w)
 			w->handleMouseEntered(button);
@@ -380,11 +380,11 @@ Widget *Dialog::findWidget(const char *name) {
 
 void Dialog::removeWidget(Widget *del) {
 	if (del == _mouseWidget || del->containsWidget(_mouseWidget))
-		_mouseWidget = NULL;
+		_mouseWidget = nullptr;
 	if (del == _focusedWidget || del->containsWidget(_focusedWidget))
-		_focusedWidget = NULL;
+		_focusedWidget = nullptr;
 	if (del == _dragWidget || del->containsWidget(_dragWidget))
-		_dragWidget = NULL;
+		_dragWidget = nullptr;
 
 	GuiObject::removeWidget(del);
 }
diff --git a/gui/dialog.h b/gui/dialog.h
index b2eb4eb..8cc4906 100644
--- a/gui/dialog.h
+++ b/gui/dialog.h
@@ -75,7 +75,7 @@ public:
 	Widget *getFocusWidget() { return _focusedWidget; }
 
 	void setTickleWidget(Widget *widget) { _tickleWidget = widget; }
-	void unSetTickleWidget() { _tickleWidget = NULL; }
+	void unSetTickleWidget() { _tickleWidget = nullptr; }
 	Widget *getTickleWidget() { return _tickleWidget; }
 
 	void reflowLayout() override;
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index 8b7408c..db2f30d 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -61,11 +61,11 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
 	_downloadSizeLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSize", "");
 	_downloadSpeedLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSpeed", "");
 	if (g_system->getOverlayWidth() > 320)
-		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _("Cancel download"), 0, kDownloadDialogButtonCmd);
+		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _("Cancel download"), nullptr, kDownloadDialogButtonCmd);
 	else
-		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _c("Cancel download", "lowres"), 0, kDownloadDialogButtonCmd);
+		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _c("Cancel download", "lowres"), nullptr, kDownloadDialogButtonCmd);
 
-	_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", _("Hide"), 0, kCloseCmd);
+	_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", _("Hide"), nullptr, kCloseCmd);
 	refreshWidgets();
 
 	CloudMan.setDownloadTarget(this);
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 8aad576..0028564 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -85,7 +85,7 @@ enum {
 */
 class DomainEditTextWidget : public EditTextWidget {
 public:
-	DomainEditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip = 0)
+	DomainEditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip = nullptr)
 		: EditTextWidget(boss, name, text, tooltip) {}
 
 protected:
@@ -189,9 +189,9 @@ EditGameDialog::EditGameDialog(const String &domain)
 	graphicsContainer->setTarget(this);
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _("Override global graphic settings"), 0, kCmdGlobalGraphicsOverride);
+		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _("Override global graphic settings"), nullptr, kCmdGlobalGraphicsOverride);
 	else
-		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _c("Override global graphic settings", "lowres"), 0, kCmdGlobalGraphicsOverride);
+		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _c("Override global graphic settings", "lowres"), nullptr, kCmdGlobalGraphicsOverride);
 
 	addGraphicControls(graphicsContainer, "GameOptions_Graphics_Container.");
 
@@ -201,9 +201,9 @@ EditGameDialog::EditGameDialog(const String &domain)
 	tab->addTab(_("Audio"), "GameOptions_Audio");
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _("Override global audio settings"), 0, kCmdGlobalAudioOverride);
+		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _("Override global audio settings"), nullptr, kCmdGlobalAudioOverride);
 	else
-		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _c("Override global audio settings", "lowres"), 0, kCmdGlobalAudioOverride);
+		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _c("Override global audio settings", "lowres"), nullptr, kCmdGlobalAudioOverride);
 
 	addAudioControls(tab, "GameOptions_Audio.");
 	addSubtitleControls(tab, "GameOptions_Audio.");
@@ -217,9 +217,9 @@ EditGameDialog::EditGameDialog(const String &domain)
 		tab->addTab(_c("Volume", "lowres"), "GameOptions_Volume");
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _("Override global volume settings"), 0, kCmdGlobalVolumeOverride);
+		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _("Override global volume settings"), nullptr, kCmdGlobalVolumeOverride);
 	else
-		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _c("Override global volume settings", "lowres"), 0, kCmdGlobalVolumeOverride);
+		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _c("Override global volume settings", "lowres"), nullptr, kCmdGlobalVolumeOverride);
 
 	addVolumeControls(tab, "GameOptions_Volume.");
 
@@ -228,14 +228,14 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	// 6) The MIDI tab
 	//
-	_globalMIDIOverride = NULL;
+	_globalMIDIOverride = nullptr;
 	if (showMidi) {
 		tab->addTab(_("MIDI"), "GameOptions_MIDI");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _("Override global MIDI settings"), 0, kCmdGlobalMIDIOverride);
+			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _("Override global MIDI settings"), nullptr, kCmdGlobalMIDIOverride);
 		else
-			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _c("Override global MIDI settings", "lowres"), 0, kCmdGlobalMIDIOverride);
+			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _c("Override global MIDI settings", "lowres"), nullptr, kCmdGlobalMIDIOverride);
 
 		addMIDIControls(tab, "GameOptions_MIDI.");
 	}
@@ -243,14 +243,14 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	// 7) The MT-32 tab
 	//
-	_globalMT32Override = NULL;
+	_globalMT32Override = nullptr;
 	if (showMidi) {
 		tab->addTab(_("MT-32"), "GameOptions_MT32");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _("Override global MT-32 settings"), 0, kCmdGlobalMT32Override);
+			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _("Override global MT-32 settings"), nullptr, kCmdGlobalMT32Override);
 		else
-			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _c("Override global MT-32 settings", "lowres"), 0, kCmdGlobalMT32Override);
+			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _c("Override global MT-32 settings", "lowres"), nullptr, kCmdGlobalMT32Override);
 
 		addMT32Controls(tab, "GameOptions_MT32.");
 	}
@@ -268,9 +268,9 @@ EditGameDialog::EditGameDialog(const String &domain)
 
 	// GUI:  Button + Label for the game path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _("Game Path:"), 0, kCmdGameBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _("Game Path:"), nullptr, kCmdGameBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _c("Game Path:", "lowres"), 0, kCmdGameBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _c("Game Path:", "lowres"), nullptr, kCmdGameBrowser);
 	_gamePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.GamepathText", gamePath);
 
 	// GUI:  Button + Label for the additional path
@@ -296,8 +296,8 @@ EditGameDialog::EditGameDialog(const String &domain)
 	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
-	new ButtonWidget(this, "GameOptions.Cancel", _("Cancel"), 0, kCloseCmd);
-	new ButtonWidget(this, "GameOptions.Ok", _("OK"), 0, kOKCmd);
+	new ButtonWidget(this, "GameOptions.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new ButtonWidget(this, "GameOptions.Ok", _("OK"), nullptr, kOKCmd);
 }
 
 void EditGameDialog::setupGraphicsTab() {
@@ -439,7 +439,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	case kCmdGlobalAudioOverride:
 		setAudioSettingsState(data != 0);
 		setSubtitleSettingsState(data != 0);
-		if (_globalVolumeOverride == NULL)
+		if (_globalVolumeOverride == nullptr)
 			setVolumeSettingsState(data != 0);
 		g_gui.scheduleTopDialogRedraw();
 		break;
diff --git a/gui/editrecorddialog.cpp b/gui/editrecorddialog.cpp
index cd384ba..6e74351 100644
--- a/gui/editrecorddialog.cpp
+++ b/gui/editrecorddialog.cpp
@@ -64,8 +64,8 @@ EditRecordDialog::EditRecordDialog(const Common::String author, const Common::St
 	_authorEdit->setEditString(author);
 	_notesEdit->setEditString(notes);
 	_nameEdit->setEditString(name);
-	new GUI::ButtonWidget(this, "EditRecordDialog.Cancel", _("Cancel"), 0, kCloseCmd);
-	new GUI::ButtonWidget(this, "EditRecordDialog.OK", _("Ok"), 0, kOKCmd);
+	new GUI::ButtonWidget(this, "EditRecordDialog.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new GUI::ButtonWidget(this, "EditRecordDialog.OK", _("Ok"), nullptr, kOKCmd);
 }
 
 void EditRecordDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/filebrowser-dialog.cpp b/gui/filebrowser-dialog.cpp
index 0c7f55a..e3d9bcb 100644
--- a/gui/filebrowser-dialog.cpp
+++ b/gui/filebrowser-dialog.cpp
@@ -44,7 +44,7 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 
 	_fileMask = "*.";
 	_fileMask += fileExtension;
-	_fileList = NULL;
+	_fileList = nullptr;
 
 	new StaticTextWidget(this, "FileBrowser.Headline", title ? title :
 					mode == kFBModeLoad ? _("Choose file for loading") : _("Enter filename for saving"));
@@ -62,8 +62,8 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Buttons
-	new ButtonWidget(this, "FileBrowser.Cancel", _("Cancel"), 0, kCloseCmd);
-	new ButtonWidget(this, "FileBrowser.Choose", _("Choose"), 0, kChooseCmd);
+	new ButtonWidget(this, "FileBrowser.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new ButtonWidget(this, "FileBrowser.Choose", _("Choose"), nullptr, kChooseCmd);
 }
 
 void FileBrowserDialog::open() {
diff --git a/gui/filebrowser-dialog.h b/gui/filebrowser-dialog.h
index 0b54cc0..ceee9a5 100644
--- a/gui/filebrowser-dialog.h
+++ b/gui/filebrowser-dialog.h
@@ -45,7 +45,7 @@ public:
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
-	const char *getResult() { return Dialog::getResult() ? _fileName->getEditString().c_str() : NULL; }
+	const char *getResult() { return Dialog::getResult() ? _fileName->getEditString().c_str() : nullptr; }
 
 protected:
 	EditTextWidget *_fileName;
diff --git a/gui/fluidsynth-dialog.cpp b/gui/fluidsynth-dialog.cpp
index 34fbbf9..b3b5750 100644
--- a/gui/fluidsynth-dialog.cpp
+++ b/gui/fluidsynth-dialog.cpp
@@ -68,31 +68,31 @@ FluidSynthSettingsDialog::FluidSynthSettingsDialog()
 
 	_tabWidget->addTab(_("Reverb"), "FluidSynthSettings_Reverb");
 
-	_reverbActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Reverb.EnableTabCheckbox", _("Active"), 0, kActivateReverbCmd);
+	_reverbActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Reverb.EnableTabCheckbox", _("Active"), nullptr, kActivateReverbCmd);
 
 	_reverbRoomSizeDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeText", _("Room:"));
-	_reverbRoomSizeSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeSlider", 0, kReverbRoomSizeChangedCmd);
+	_reverbRoomSizeSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeSlider", nullptr, kReverbRoomSizeChangedCmd);
 	// 0.00 - 1.20, Default: 0.20
 	_reverbRoomSizeSlider->setMinValue(0);
 	_reverbRoomSizeSlider->setMaxValue(120);
 	_reverbRoomSizeLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeLabel", "20");
 
 	_reverbDampingDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingText", _("Damp:"));
-	_reverbDampingSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingSlider", 0, kReverbDampingChangedCmd);
+	_reverbDampingSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingSlider", nullptr, kReverbDampingChangedCmd);
 	// 0.00 - 1.00, Default: 0.00
 	_reverbDampingSlider->setMinValue(0);
 	_reverbDampingSlider->setMaxValue(100);
 	_reverbDampingLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingLabel", "0");
 
 	_reverbWidthDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthText", _("Width:"));
-	_reverbWidthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthSlider", 0, kReverbWidthChangedCmd);
+	_reverbWidthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthSlider", nullptr, kReverbWidthChangedCmd);
 	// 0 - 100, Default: 1
 	_reverbWidthSlider->setMinValue(0);
 	_reverbWidthSlider->setMaxValue(100);
 	_reverbWidthLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthLabel", "1");
 
 	_reverbLevelDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelText", _("Level:"));
-	_reverbLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelSlider", 0, kReverbLevelChangedCmd);
+	_reverbLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelSlider", nullptr, kReverbLevelChangedCmd);
 	// 0.00 - 1.00, Default: 0.90
 	_reverbLevelSlider->setMinValue(0);
 	_reverbLevelSlider->setMaxValue(100);
@@ -100,31 +100,31 @@ FluidSynthSettingsDialog::FluidSynthSettingsDialog()
 
 	_tabWidget->addTab(_("Chorus"), "FluidSynthSettings_Chorus");
 
-	_chorusActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Chorus.EnableTabCheckbox", _("Active"), 0, kActivateChorusCmd);
+	_chorusActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Chorus.EnableTabCheckbox", _("Active"), nullptr, kActivateChorusCmd);
 
 	_chorusVoiceCountDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountText", _("N:"));
-	_chorusVoiceCountSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountSlider", 0, kChorusVoiceCountChangedCmd);
+	_chorusVoiceCountSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountSlider", nullptr, kChorusVoiceCountChangedCmd);
 	// 0-99, Default: 3
 	_chorusVoiceCountSlider->setMinValue(0);
 	_chorusVoiceCountSlider->setMaxValue(99);
 	_chorusVoiceCountLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountLabel", "3");
 
 	_chorusLevelDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelText", _("Level:"));
-	_chorusLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelSlider", 0, kChorusLevelChangedCmd);
+	_chorusLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelSlider", nullptr, kChorusLevelChangedCmd);
 	// 0.00 - 1.00, Default: 1.00
 	_chorusLevelSlider->setMinValue(0);
 	_chorusLevelSlider->setMaxValue(100);
 	_chorusLevelLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelLabel", "100");
 
 	_chorusSpeedDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedText", _("Speed:"));
-	_chorusSpeedSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedSlider", 0, kChorusSpeedChangedCmd);
+	_chorusSpeedSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedSlider", nullptr, kChorusSpeedChangedCmd);
 	// 0.30 - 5.00, Default: 0.30
 	_chorusSpeedSlider->setMinValue(30);
 	_chorusSpeedSlider->setMaxValue(500);
 	_chorusSpeedLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedLabel", "30");
 
 	_chorusDepthDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthText", _("Depth:"));
-	_chorusDepthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthSlider", 0, kChorusDepthChangedCmd);
+	_chorusDepthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthSlider", nullptr, kChorusDepthChangedCmd);
 	// 0.00 - 21.00, Default: 8.00
 	_chorusDepthSlider->setMinValue(0);
 	_chorusDepthSlider->setMaxValue(210);
@@ -150,8 +150,8 @@ FluidSynthSettingsDialog::FluidSynthSettingsDialog()
 
 	new ButtonWidget(this, "FluidSynthSettings.ResetSettings", _("Reset"), _("Reset all FluidSynth settings to their default values."), kResetSettingsCmd);
 
-	new ButtonWidget(this, "FluidSynthSettings.Cancel", _("Cancel"), 0, kCloseCmd);
-	new ButtonWidget(this, "FluidSynthSettings.Ok", _("OK"), 0, kOKCmd);
+	new ButtonWidget(this, "FluidSynthSettings.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new ButtonWidget(this, "FluidSynthSettings.Ok", _("OK"), nullptr, kOKCmd);
 }
 
 FluidSynthSettingsDialog::~FluidSynthSettingsDialog() {
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 659d87b..0505177 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -56,7 +56,7 @@ enum {
 // Constructor
 GuiManager::GuiManager() : _redrawStatus(kRedrawDisabled), _stateIsSaved(false),
     _cursorAnimateCounter(0), _cursorAnimateTimer(0) {
-	_theme = 0;
+	_theme = nullptr;
 	_useStdCursor = false;
 
 	_system = g_system;
@@ -156,7 +156,7 @@ bool GuiManager::loadNewTheme(Common::String id, ThemeEngine::GraphicsMode gfx,
 		if (_theme && id == _theme->getThemeId() && gfx == _theme->getGraphicsMode())
 			return true;
 
-	ThemeEngine *newTheme = 0;
+	ThemeEngine *newTheme = nullptr;
 
 	if (gfx == ThemeEngine::kGfxDisabled)
 		gfx = ThemeEngine::_defaultRendererMode;
@@ -277,7 +277,7 @@ void GuiManager::redraw() {
 
 Dialog *GuiManager::getTopDialog() const {
 	if (_dialogStack.empty())
-		return 0;
+		return nullptr;
 	return _dialogStack.top();
 }
 
@@ -285,9 +285,9 @@ void GuiManager::addToTrash(GuiObject* object, Dialog* parent) {
 	debug(7, "Adding Gui Object %p to trash", (void *)object);
 	GuiObjectTrashItem t;
 	t.object = object;
-	t.parent = 0;
+	t.parent = nullptr;
 	// If a dialog was provided, check it is in the dialog stack
-	if (parent != 0) {
+	if (parent != nullptr) {
 		for (uint i = 0 ; i < _dialogStack.size() ; ++i) {
 			if (_dialogStack[i] == parent) {
 				t.parent = parent;
@@ -302,7 +302,7 @@ void GuiManager::runLoop() {
 	Dialog * const activeDialog = getTopDialog();
 	bool didSaveState = false;
 
-	if (activeDialog == 0)
+	if (activeDialog == nullptr)
 		return;
 
 #ifdef ENABLE_EVENTRECORDER
@@ -372,7 +372,7 @@ void GuiManager::runLoop() {
 		// Delete GuiObject that have been added to the trash for a delayed deletion
 		Common::List<GuiObjectTrashItem>::iterator it = _guiObjectTrash.begin();
 		while (it != _guiObjectTrash.end()) {
-			if ((*it).parent == 0 || (*it).parent == activeDialog) {
+			if ((*it).parent == nullptr || (*it).parent == activeDialog) {
 				debug(7, "Delayed deletion of Gui Object %p", (void *)(*it).object);
 				delete (*it).object;
 				it = _guiObjectTrash.erase(it);
@@ -497,7 +497,7 @@ void GuiManager::setupCursor() {
 	};
 
 	CursorMan.pushCursorPalette(palette, 0, 4);
-	CursorMan.pushCursor(NULL, 0, 0, 0, 0, 0);
+	CursorMan.pushCursor(nullptr, 0, 0, 0, 0, 0);
 	CursorMan.showMouse(true);
 }
 
@@ -552,7 +552,7 @@ void GuiManager::screenChange() {
 }
 
 void GuiManager::processEvent(const Common::Event &event, Dialog *const activeDialog) {
-	if (activeDialog == 0)
+	if (activeDialog == nullptr)
 		return;
 	int button;
 	uint32 time;
diff --git a/gui/gui-manager.h b/gui/gui-manager.h
index d97cd78..c3fb9a6 100644
--- a/gui/gui-manager.h
+++ b/gui/gui-manager.h
@@ -106,7 +106,7 @@ public:
 	 * dialog is provided and is present in the DialogStack, the object will
 	 * only be deleted when that dialog is the top level dialog.
 	 */
-	void addToTrash(GuiObject*, Dialog* parent = 0);
+	void addToTrash(GuiObject*, Dialog* parent = nullptr);
 	void initTextToSpeech();
 
 	bool _launched;
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 0a6f00c..8653f23 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -123,7 +123,7 @@ LauncherDialog::~LauncherDialog() {
 
 void LauncherDialog::build() {
 #ifndef DISABLE_FANCY_THEMES
-	_logo = 0;
+	_logo = nullptr;
 	if (g_gui.xmlEval()->getVar("Globals.ShowLauncherLogo") == 1 && g_gui.theme()->supportsImages()) {
 		_logo = new GraphicsWidget(this, "Launcher.Logo");
 		_logo->useThemeTransparency(true);
@@ -174,9 +174,9 @@ void LauncherDialog::build() {
 	}
 
 	// Search box
-	_searchDesc = 0;
+	_searchDesc = nullptr;
 #ifndef DISABLE_FANCY_THEMES
-	_searchPic = 0;
+	_searchPic = nullptr;
 	if (g_gui.xmlEval()->getVar("Globals.ShowSearchPic") == 1 && g_gui.theme()->supportsImages()) {
 		_searchPic = new GraphicsWidget(this, "Launcher.SearchPic", _("Search in game list"));
 		_searchPic->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageSearch));
@@ -184,11 +184,11 @@ void LauncherDialog::build() {
 #endif
 		_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", _("Search:"));
 
-	_searchWidget = new EditTextWidget(this, "Launcher.Search", _search, 0, kSearchCmd);
+	_searchWidget = new EditTextWidget(this, "Launcher.Search", _search, nullptr, kSearchCmd);
 	_searchClearButton = addClearButton(this, "Launcher.SearchClearButton", kSearchClearCmd);
 
 	// Add list with game titles
-	_list = new ListWidget(this, "Launcher.GameList", 0, kListSearchCmd);
+	_list = new ListWidget(this, "Launcher.GameList", nullptr, kListSearchCmd);
 	_list->setEditable(false);
 	_list->setNumberingMode(kListNumberingOff);
 
@@ -733,9 +733,9 @@ void LauncherDialog::reflowLayout() {
 
 		if (_logo) {
 			removeWidget(_logo);
-			_logo->setNext(0);
+			_logo->setNext(nullptr);
 			delete _logo;
-			_logo = 0;
+			_logo = nullptr;
 		}
 	}
 
@@ -746,9 +746,9 @@ void LauncherDialog::reflowLayout() {
 
 		if (_searchDesc) {
 			removeWidget(_searchDesc);
-			_searchDesc->setNext(0);
+			_searchDesc->setNext(nullptr);
 			delete _searchDesc;
-			_searchDesc = 0;
+			_searchDesc = nullptr;
 		}
 	} else {
 		if (!_searchDesc)
@@ -756,14 +756,14 @@ void LauncherDialog::reflowLayout() {
 
 		if (_searchPic) {
 			removeWidget(_searchPic);
-			_searchPic->setNext(0);
+			_searchPic->setNext(nullptr);
 			delete _searchPic;
-			_searchPic = 0;
+			_searchPic = nullptr;
 		}
 	}
 
 	removeWidget(_searchClearButton);
-	_searchClearButton->setNext(0);
+	_searchClearButton->setNext(nullptr);
 	delete _searchClearButton;
 	_searchClearButton = addClearButton(this, "Launcher.SearchClearButton", kSearchClearCmd);
 #endif
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 1d1d119..708bc46 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -60,9 +60,9 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	_dirsScanned(0),
 	_oldGamesCount(0),
 	_dirTotal(0),
-	_okButton(0),
-	_dirProgressText(0),
-	_gameProgressText(0) {
+	_okButton(nullptr),
+	_dirProgressText(nullptr),
+	_gameProgressText(nullptr) {
 
 	StringArray l;
 
@@ -86,10 +86,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	_list->setNumberingMode(kListNumberingOff);
 	_list->setList(l);
 
-	_okButton = new ButtonWidget(this, "MassAdd.Ok", _("OK"), 0, kOkCmd, Common::ASCII_RETURN);
+	_okButton = new ButtonWidget(this, "MassAdd.Ok", _("OK"), nullptr, kOkCmd, Common::ASCII_RETURN);
 	_okButton->setEnabled(false);
 
-	new ButtonWidget(this, "MassAdd.Cancel", _("Cancel"), 0, kCancelCmd, Common::ASCII_ESCAPE);
+	new ButtonWidget(this, "MassAdd.Cancel", _("Cancel"), nullptr, kCancelCmd, Common::ASCII_ESCAPE);
 
 	// Build a map from all configured game paths to the targets using them
 	const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
diff --git a/gui/message.cpp b/gui/message.cpp
index 674680c..3478440 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -90,10 +90,10 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
 	}
 
 	if (defaultButton)
-		new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, defaultButton, 0, kOkCmd, Common::ASCII_RETURN);	// Confirm dialog
+		new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, defaultButton, nullptr, kOkCmd, Common::ASCII_RETURN);	// Confirm dialog
 
 	if (altButton)
-		new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, 0, kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+		new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, nullptr, kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
 }
 
 void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
@@ -110,7 +110,7 @@ void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
 }
 
 TimedMessageDialog::TimedMessageDialog(const Common::String &message, uint32 duration)
-	: MessageDialog(message, 0, 0) {
+	: MessageDialog(message, nullptr, nullptr) {
 	_timer = g_system->getMillis() + duration;
 }
 
diff --git a/gui/message.h b/gui/message.h
index 491ec02..b22297e 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -41,7 +41,7 @@ enum {
  */
 class MessageDialog : public Dialog {
 public:
-	MessageDialog(const Common::String &message, const char *defaultButton = "OK", const char *altButton = 0);
+	MessageDialog(const Common::String &message, const char *defaultButton = "OK", const char *altButton = nullptr);
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 };
diff --git a/gui/object.cpp b/gui/object.cpp
index 036465a..84dd103 100644
--- a/gui/object.cpp
+++ b/gui/object.cpp
@@ -35,7 +35,7 @@ GuiObject::GuiObject(const Common::String &name)
 
 GuiObject::~GuiObject() {
 	delete _firstWidget;
-	_firstWidget = 0;
+	_firstWidget = nullptr;
 }
 
 void GuiObject::reflowLayout() {
@@ -49,7 +49,7 @@ void GuiObject::reflowLayout() {
 void GuiObject::removeWidget(Widget *del) {
 	if (del == _firstWidget) {
 		Widget *del_next = del->next();
-		del->setNext(0);
+		del->setNext(nullptr);
 		_firstWidget = del_next;
 		return;
 	}
@@ -58,7 +58,7 @@ void GuiObject::removeWidget(Widget *del) {
 	while (w) {
 		if (w->next() == del) {
 			Widget *del_next = del->next();
-			del->setNext(0);
+			del->setNext(nullptr);
 			w->setNext(del_next);
 			return;
 		}
diff --git a/gui/onscreendialog.cpp b/gui/onscreendialog.cpp
index 6b6fa2c..253f88c 100644
--- a/gui/onscreendialog.cpp
+++ b/gui/onscreendialog.cpp
@@ -63,7 +63,7 @@ OnScreenDialog::OnScreenDialog(bool isRecord) : Dialog("OnScreenDialog") {
 #ifndef DISABLE_FANCY_THEMES
 	if (g_gui.xmlEval()->getVar("Globals.OnScreenDialog.ShowPics") == 1 && g_gui.theme()->supportsImages()) {
 		GUI::PicButtonWidget *button;
-		button = new PicButtonWidget(this, "OnScreenDialog.StopButton", 0, kStopCmd, 0);
+		button = new PicButtonWidget(this, "OnScreenDialog.StopButton", nullptr, kStopCmd, 0);
 		button->useThemeTransparency(true);
 
 		if (g_system->getOverlayWidth() > 320)
@@ -72,7 +72,7 @@ OnScreenDialog::OnScreenDialog(bool isRecord) : Dialog("OnScreenDialog") {
 			button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageStopSmallButton));
 
 		if (isRecord) {
-			button = new PicButtonWidget(this, "OnScreenDialog.EditButton", 0, kEditCmd, 0);
+			button = new PicButtonWidget(this, "OnScreenDialog.EditButton", nullptr, kEditCmd, 0);
 			button->useThemeTransparency(true);
 
 			if (g_system->getOverlayWidth() > 320)
@@ -80,14 +80,14 @@ OnScreenDialog::OnScreenDialog(bool isRecord) : Dialog("OnScreenDialog") {
 			else
 				button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageEditSmallButton));
 		} else {
-			button = new PicButtonWidget(this, "OnScreenDialog.SwitchModeButton", 0, kSwitchModeCmd, 0);
+			button = new PicButtonWidget(this, "OnScreenDialog.SwitchModeButton", nullptr, kSwitchModeCmd, 0);
 			button->useThemeTransparency(true);
 			if (g_system->getOverlayWidth() > 320)
 				button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageSwitchModeButton));
 			else
 				button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageSwitchModeSmallButton));
 
-			button = new PicButtonWidget(this, "OnScreenDialog.FastReplayButton", 0, kFastModeCmd, 0);
+			button = new PicButtonWidget(this, "OnScreenDialog.FastReplayButton", nullptr, kFastModeCmd, 0);
 			button->useThemeTransparency(true);
 			if (g_system->getOverlayWidth() > 320)
 				button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageFastReplayButton));
@@ -118,7 +118,7 @@ OnScreenDialog::OnScreenDialog(bool isRecord) : Dialog("OnScreenDialog") {
 	_editDlgShown = false;
 
 	_lastTime = 0;
-	_dlg = 0;
+	_dlg = nullptr;
 }
 
 void OnScreenDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/options.cpp b/gui/options.cpp
index 239c88b..42c422f 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -125,19 +125,19 @@ enum {
 	kApplyCmd = 'appl'
 };
 
-static const char *savePeriodLabels[] = { _s("Never"), _s("Every 5 mins"), _s("Every 10 mins"), _s("Every 15 mins"), _s("Every 30 mins"), 0 };
+static const char *savePeriodLabels[] = { _s("Never"), _s("Every 5 mins"), _s("Every 10 mins"), _s("Every 15 mins"), _s("Every 30 mins"), nullptr };
 static const int savePeriodValues[] = { 0, 5 * 60, 10 * 60, 15 * 60, 30 * 60, -1 };
 // The keyboard mouse speed values range from 0 to 7 and correspond to speeds shown in the label
 // "10" (value 3) is the default speed corresponding to the speed before introduction of this control
-static const char *kbdMouseSpeedLabels[] = { "3", "5", "8", "10", "13", "15", "18", "20", 0 };
+static const char *kbdMouseSpeedLabels[] = { "3", "5", "8", "10", "13", "15", "18", "20", nullptr };
 
 OptionsDialog::OptionsDialog(const Common::String &domain, int x, int y, int w, int h)
-	: Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(0) {
+	: Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(nullptr) {
 	init();
 }
 
 OptionsDialog::OptionsDialog(const Common::String &domain, const Common::String &name)
-	: Dialog(name), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(0) {
+	: Dialog(name), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(nullptr) {
 	init();
 }
 
@@ -147,68 +147,68 @@ OptionsDialog::~OptionsDialog() {
 
 void OptionsDialog::init() {
 	_enableControlSettings = false;
-	_onscreenCheckbox = 0;
-	_touchpadCheckbox = 0;
-	_swapMenuAndBackBtnsCheckbox = 0;
-	_kbdMouseSpeedDesc = 0;
-	_kbdMouseSpeedSlider = 0;
-	_kbdMouseSpeedLabel = 0;
-	_joystickDeadzoneDesc = 0;
-	_joystickDeadzoneSlider = 0;
-	_joystickDeadzoneLabel = 0;
+	_onscreenCheckbox = nullptr;
+	_touchpadCheckbox = nullptr;
+	_swapMenuAndBackBtnsCheckbox = nullptr;
+	_kbdMouseSpeedDesc = nullptr;
+	_kbdMouseSpeedSlider = nullptr;
+	_kbdMouseSpeedLabel = nullptr;
+	_joystickDeadzoneDesc = nullptr;
+	_joystickDeadzoneSlider = nullptr;
+	_joystickDeadzoneLabel = nullptr;
 	_enableGraphicSettings = false;
-	_gfxPopUp = 0;
-	_gfxPopUpDesc = 0;
-	_renderModePopUp = 0;
-	_renderModePopUpDesc = 0;
-	_stretchPopUp = 0;
-	_stretchPopUpDesc = 0;
-	_fullscreenCheckbox = 0;
-	_filteringCheckbox = 0;
-	_aspectCheckbox = 0;
+	_gfxPopUp = nullptr;
+	_gfxPopUpDesc = nullptr;
+	_renderModePopUp = nullptr;
+	_renderModePopUpDesc = nullptr;
+	_stretchPopUp = nullptr;
+	_stretchPopUpDesc = nullptr;
+	_fullscreenCheckbox = nullptr;
+	_filteringCheckbox = nullptr;
+	_aspectCheckbox = nullptr;
 	_enableShaderSettings = false;
-	_shaderPopUpDesc = 0;
-	_shaderPopUp = 0;
+	_shaderPopUpDesc = nullptr;
+	_shaderPopUp = nullptr;
 	_enableAudioSettings = false;
-	_midiPopUp = 0;
-	_midiPopUpDesc = 0;
-	_oplPopUp = 0;
-	_oplPopUpDesc = 0;
+	_midiPopUp = nullptr;
+	_midiPopUpDesc = nullptr;
+	_oplPopUp = nullptr;
+	_oplPopUpDesc = nullptr;
 	_enableMIDISettings = false;
-	_gmDevicePopUp = 0;
-	_gmDevicePopUpDesc = 0;
-	_soundFont = 0;
-	_soundFontButton = 0;
-	_soundFontClearButton = 0;
-	_multiMidiCheckbox = 0;
-	_midiGainDesc = 0;
-	_midiGainSlider = 0;
-	_midiGainLabel = 0;
+	_gmDevicePopUp = nullptr;
+	_gmDevicePopUpDesc = nullptr;
+	_soundFont = nullptr;
+	_soundFontButton = nullptr;
+	_soundFontClearButton = nullptr;
+	_multiMidiCheckbox = nullptr;
+	_midiGainDesc = nullptr;
+	_midiGainSlider = nullptr;
+	_midiGainLabel = nullptr;
 	_enableMT32Settings = false;
-	_mt32Checkbox = 0;
-	_mt32DevicePopUp = 0;
-	_mt32DevicePopUpDesc = 0;
-	_enableGSCheckbox = 0;
+	_mt32Checkbox = nullptr;
+	_mt32DevicePopUp = nullptr;
+	_mt32DevicePopUpDesc = nullptr;
+	_enableGSCheckbox = nullptr;
 	_enableVolumeSettings = false;
-	_musicVolumeDesc = 0;
-	_musicVolumeSlider = 0;
-	_musicVolumeLabel = 0;
-	_sfxVolumeDesc = 0;
-	_sfxVolumeSlider = 0;
-	_sfxVolumeLabel = 0;
-	_speechVolumeDesc = 0;
-	_speechVolumeSlider = 0;
-	_speechVolumeLabel = 0;
-	_muteCheckbox = 0;
+	_musicVolumeDesc = nullptr;
+	_musicVolumeSlider = nullptr;
+	_musicVolumeLabel = nullptr;
+	_sfxVolumeDesc = nullptr;
+	_sfxVolumeSlider = nullptr;
+	_sfxVolumeLabel = nullptr;
+	_speechVolumeDesc = nullptr;
+	_speechVolumeSlider = nullptr;
+	_speechVolumeLabel = nullptr;
+	_muteCheckbox = nullptr;
 	_enableSubtitleSettings = false;
-	_subToggleDesc = 0;
-	_subToggleGroup = 0;
-	_subToggleSubOnly = 0;
-	_subToggleSpeechOnly = 0;
-	_subToggleSubBoth = 0;
-	_subSpeedDesc = 0;
-	_subSpeedSlider = 0;
-	_subSpeedLabel = 0;
+	_subToggleDesc = nullptr;
+	_subToggleGroup = nullptr;
+	_subToggleSubOnly = nullptr;
+	_subToggleSpeechOnly = nullptr;
+	_subToggleSubBoth = nullptr;
+	_subSpeedDesc = nullptr;
+	_subSpeedSlider = nullptr;
+	_subSpeedLabel = nullptr;
 
 	// Retrieve game GUI options
 	_guioptions.clear();
@@ -230,21 +230,21 @@ void OptionsDialog::build() {
 	if (g_system->hasFeature(OSystem::kFeatureOnScreenControl)) {
 		if (ConfMan.hasKey("onscreen_control", _domain)) {
 			bool onscreenState =  g_system->getFeatureState(OSystem::kFeatureOnScreenControl);
-			if (_onscreenCheckbox != 0)
+			if (_onscreenCheckbox != nullptr)
 				_onscreenCheckbox->setState(onscreenState);
 		}
 	}
 	if (g_system->hasFeature(OSystem::kFeatureTouchpadMode)) {
 		if (ConfMan.hasKey("touchpad_mouse_mode", _domain)) {
 			bool touchpadState =  g_system->getFeatureState(OSystem::kFeatureTouchpadMode);
-			if (_touchpadCheckbox != 0)
+			if (_touchpadCheckbox != nullptr)
 				_touchpadCheckbox->setState(touchpadState);
 		}
 	}
 	if (g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons)) {
 		if (ConfMan.hasKey("swap_menu_and_back_buttons", _domain)) {
 			bool state =  g_system->getFeatureState(OSystem::kFeatureSwapMenuAndBackButtons);
-			if (_swapMenuAndBackBtnsCheckbox != 0)
+			if (_swapMenuAndBackBtnsCheckbox != nullptr)
 				_swapMenuAndBackBtnsCheckbox->setState(state);
 		}
 	}
@@ -257,7 +257,7 @@ void OptionsDialog::build() {
 	}
 	if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
 		int value = ConfMan.getInt("joystick_deadzone", _domain);
-		if (_joystickDeadzoneSlider != 0) {
+		if (_joystickDeadzoneSlider != nullptr) {
 			_joystickDeadzoneSlider->setValue(value);
 			_joystickDeadzoneLabel->setValue(value);
 		}
@@ -890,7 +890,7 @@ void OptionsDialog::setAudioSettingsState(bool enabled) {
 	_midiPopUp->setEnabled(enabled);
 
 	const Common::String allFlags = MidiDriver::musicType2GUIO((uint32)-1);
-	bool hasMidiDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != NULL);
+	bool hasMidiDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != nullptr);
 
 	if (_domain != Common::ConfigManager::kApplicationDomain && // global dialog
 		hasMidiDefined && // No flags are specified
@@ -1068,7 +1068,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 
 	// RenderMode popup
 	const Common::String allFlags = Common::allRenderModesGUIOs();
-	bool renderingTypeDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != NULL);
+	bool renderingTypeDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != nullptr);
 
 	_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", _("Render mode:"), _("Special dithering modes supported by some games"));
 	_renderModePopUp = new PopUpWidget(boss, prefix + "grRenderPopup", _("Special dithering modes supported by some games"));
@@ -1115,7 +1115,7 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
 
 	// Populate it
 	const Common::String allFlags = MidiDriver::musicType2GUIO((uint32)-1);
-	bool hasMidiDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != NULL);
+	bool hasMidiDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != nullptr);
 
 	const PluginList p = MusicMan.getPlugins();
 	for (PluginList::const_iterator m = p.begin(); m != p.end(); ++m) {
@@ -1197,7 +1197,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 
 	// MIDI gain setting (FluidSynth uses this)
 	_midiGainDesc = new StaticTextWidget(boss, prefix + "mcMidiGainText", _("MIDI gain:"));
-	_midiGainSlider = new SliderWidget(boss, prefix + "mcMidiGainSlider", 0, kMidiGainChanged);
+	_midiGainSlider = new SliderWidget(boss, prefix + "mcMidiGainSlider", nullptr, kMidiGainChanged);
 	_midiGainSlider->setMinValue(0);
 	_midiGainSlider->setMaxValue(1000);
 	_midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", "1.00");
@@ -1274,7 +1274,7 @@ void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &p
 	}
 
 	// Subtitle speed
-	_subSpeedSlider = new SliderWidget(boss, prefix + "subSubtitleSpeedSlider", 0, kSubtitleSpeedChanged);
+	_subSpeedSlider = new SliderWidget(boss, prefix + "subSubtitleSpeedSlider", nullptr, kSubtitleSpeedChanged);
 	_subSpeedLabel = new StaticTextWidget(boss, prefix + "subSubtitleSpeedLabel", "100%");
 	_subSpeedSlider->setMinValue(0); _subSpeedSlider->setMaxValue(maxSliderVal);
 	_subSpeedLabel->setFlags(WIDGET_CLEARBG);
@@ -1289,13 +1289,13 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _("Music volume:"));
 	else
 		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _c("Music volume:", "lowres"));
-	_musicVolumeSlider = new SliderWidget(boss, prefix + "vcMusicSlider", 0, kMusicVolumeChanged);
+	_musicVolumeSlider = new SliderWidget(boss, prefix + "vcMusicSlider", nullptr, kMusicVolumeChanged);
 	_musicVolumeLabel = new StaticTextWidget(boss, prefix + "vcMusicLabel", "100%");
 	_musicVolumeSlider->setMinValue(0);
 	_musicVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
 	_musicVolumeLabel->setFlags(WIDGET_CLEARBG);
 
-	_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", _("Mute all"), 0, kMuteAllChanged);
+	_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", _("Mute all"), nullptr, kMuteAllChanged);
 
 	if (g_system->getOverlayWidth() > 320)
 		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", _("SFX volume:"), _("Special sound effects volume"));
@@ -1311,7 +1311,7 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , _("Speech volume:"));
 	else
 		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , _c("Speech volume:", "lowres"));
-	_speechVolumeSlider = new SliderWidget(boss, prefix + "vcSpeechSlider", 0, kSpeechVolumeChanged);
+	_speechVolumeSlider = new SliderWidget(boss, prefix + "vcSpeechSlider", nullptr, kSpeechVolumeChanged);
 	_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", "100%");
 	_speechVolumeSlider->setMinValue(0);
 	_speechVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
@@ -1453,83 +1453,83 @@ void OptionsDialog::setupGraphicsTab() {
 GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
 	: OptionsDialog(Common::ConfigManager::kApplicationDomain, "GlobalOptions"), CommandSender(nullptr), _launcher(launcher) {
 #ifdef GUI_ENABLE_KEYSDIALOG
-	_keysDialog = 0;
+	_keysDialog = nullptr;
 #endif
 #ifdef USE_FLUIDSYNTH
-	_fluidSynthSettingsDialog = 0;
+	_fluidSynthSettingsDialog = nullptr;
 #endif
-	_savePath = 0;
-	_savePathClearButton = 0;
-	_themePath = 0;
-	_themePathClearButton = 0;
-	_extraPath = 0;
-	_extraPathClearButton = 0;
+	_savePath = nullptr;
+	_savePathClearButton = nullptr;
+	_themePath = nullptr;
+	_themePathClearButton = nullptr;
+	_extraPath = nullptr;
+	_extraPathClearButton = nullptr;
 #ifdef DYNAMIC_MODULES
-	_pluginsPath = 0;
-	_pluginsPathClearButton = 0;
+	_pluginsPath = nullptr;
+	_pluginsPathClearButton = nullptr;
 #endif
-	_curTheme = 0;
-	_rendererPopUpDesc = 0;
-	_rendererPopUp = 0;
-	_autosavePeriodPopUpDesc = 0;
-	_autosavePeriodPopUp = 0;
-	_guiLanguagePopUpDesc = 0;
-	_guiLanguagePopUp = 0;
+	_curTheme = nullptr;
+	_rendererPopUpDesc = nullptr;
+	_rendererPopUp = nullptr;
+	_autosavePeriodPopUpDesc = nullptr;
+	_autosavePeriodPopUp = nullptr;
+	_guiLanguagePopUpDesc = nullptr;
+	_guiLanguagePopUp = nullptr;
 	_guiLanguageUseGameLanguageCheckbox = nullptr;
-	_useSystemDialogsCheckbox = 0;
+	_useSystemDialogsCheckbox = nullptr;
 #ifdef USE_UPDATES
-	_updatesPopUpDesc = 0;
-	_updatesPopUp = 0;
+	_updatesPopUpDesc = nullptr;
+	_updatesPopUp = nullptr;
 #endif
 #ifdef USE_CLOUD
 #ifdef USE_LIBCURL
 	_selectedStorageIndex = CloudMan.getStorageIndex();
-	_storagePopUpDesc = 0;
-	_storagePopUp = 0;
-	_storageDisabledHint = 0;
-	_storageEnableButton = 0;
-	_storageUsernameDesc = 0;
-	_storageUsername = 0;
-	_storageUsedSpaceDesc = 0;
-	_storageUsedSpace = 0;
-	_storageSyncHint = 0;
-	_storageLastSyncDesc = 0;
-	_storageLastSync = 0;
-	_storageSyncSavesButton = 0;
-	_storageDownloadHint = 0;
-	_storageDownloadButton = 0;
-	_storageDisconnectHint = 0;
-	_storageDisconnectButton = 0;
+	_storagePopUpDesc = nullptr;
+	_storagePopUp = nullptr;
+	_storageDisabledHint = nullptr;
+	_storageEnableButton = nullptr;
+	_storageUsernameDesc = nullptr;
+	_storageUsername = nullptr;
+	_storageUsedSpaceDesc = nullptr;
+	_storageUsedSpace = nullptr;
+	_storageSyncHint = nullptr;
+	_storageLastSyncDesc = nullptr;
+	_storageLastSync = nullptr;
+	_storageSyncSavesButton = nullptr;
+	_storageDownloadHint = nullptr;
+	_storageDownloadButton = nullptr;
+	_storageDisconnectHint = nullptr;
+	_storageDisconnectButton = nullptr;
 
 	_connectingStorage = false;
-	_storageWizardNotConnectedHint = 0;
-	_storageWizardOpenLinkHint = 0;
-	_storageWizardLink = 0;
-	_storageWizardCodeHint = 0;
-	_storageWizardCodeBox = 0;
-	_storageWizardPasteButton = 0;
-	_storageWizardConnectButton = 0;
-	_storageWizardConnectionStatusHint = 0;
+	_storageWizardNotConnectedHint = nullptr;
+	_storageWizardOpenLinkHint = nullptr;
+	_storageWizardLink = nullptr;
+	_storageWizardCodeHint = nullptr;
+	_storageWizardCodeBox = nullptr;
+	_storageWizardPasteButton = nullptr;
+	_storageWizardConnectButton = nullptr;
+	_storageWizardConnectionStatusHint = nullptr;
 	_redrawCloudTab = false;
 #endif
 #ifdef USE_SDL_NET
-	_runServerButton = 0;
-	_serverInfoLabel = 0;
-	_rootPathButton = 0;
-	_rootPath = 0;
-	_rootPathClearButton = 0;
-	_serverPortDesc = 0;
-	_serverPort = 0;
-	_serverPortClearButton = 0;
-	_featureDescriptionLine1 = 0;
-	_featureDescriptionLine2 = 0;
+	_runServerButton = nullptr;
+	_serverInfoLabel = nullptr;
+	_rootPathButton = nullptr;
+	_rootPath = nullptr;
+	_rootPathClearButton = nullptr;
+	_serverPortDesc = nullptr;
+	_serverPort = nullptr;
+	_serverPortClearButton = nullptr;
+	_featureDescriptionLine1 = nullptr;
+	_featureDescriptionLine2 = nullptr;
 	_serverWasRunning = false;
 #endif
 #endif
 #ifdef USE_TTS
 	_enableTTS = false;
-	_ttsCheckbox = 0;
-	_ttsVoiceSelectionPopUp = 0;
+	_ttsCheckbox = nullptr;
+	_ttsVoiceSelectionPopUp = nullptr;
 #endif
 }
 
@@ -1599,7 +1599,7 @@ void GlobalOptionsDialog::build() {
 	addMIDIControls(tab, "GlobalOptions_MIDI.");
 
 #ifdef USE_FLUIDSYNTH
-	new ButtonWidget(tab, "GlobalOptions_MIDI.mcFluidSynthSettings", _("FluidSynth Settings"), 0, kFluidSynthSettingsCmd);
+	new ButtonWidget(tab, "GlobalOptions_MIDI.mcFluidSynthSettings", _("FluidSynth Settings"), nullptr, kFluidSynthSettingsCmd);
 #endif
 
 	//
@@ -1630,9 +1630,9 @@ void GlobalOptionsDialog::build() {
 	_savePathClearButton = addClearButton(tab, "GlobalOptions_Paths.SavePathClearButton", kSavePathClearCmd);
 
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GlobalOptions_Paths.ThemeButton", _("Theme Path:"), 0, kChooseThemeDirCmd);
+		new ButtonWidget(tab, "GlobalOptions_Paths.ThemeButton", _("Theme Path:"), nullptr, kChooseThemeDirCmd);
 	else
-		new ButtonWidget(tab, "GlobalOptions_Paths.ThemeButton", _c("Theme Path:", "lowres"), 0, kChooseThemeDirCmd);
+		new ButtonWidget(tab, "GlobalOptions_Paths.ThemeButton", _c("Theme Path:", "lowres"), nullptr, kChooseThemeDirCmd);
 	_themePath = new StaticTextWidget(tab, "GlobalOptions_Paths.ThemePath", _c("None", "path"));
 
 	_themePathClearButton = addClearButton(tab, "GlobalOptions_Paths.ThemePathClearButton", kThemePathClearCmd);
@@ -1647,9 +1647,9 @@ void GlobalOptionsDialog::build() {
 
 #ifdef DYNAMIC_MODULES
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GlobalOptions_Paths.PluginsButton", _("Plugins Path:"), 0, kChoosePluginsDirCmd);
+		new ButtonWidget(tab, "GlobalOptions_Paths.PluginsButton", _("Plugins Path:"), nullptr, kChoosePluginsDirCmd);
 	else
-		new ButtonWidget(tab, "GlobalOptions_Paths.PluginsButton", _c("Plugins Path:", "lowres"), 0, kChoosePluginsDirCmd);
+		new ButtonWidget(tab, "GlobalOptions_Paths.PluginsButton", _c("Plugins Path:", "lowres"), nullptr, kChoosePluginsDirCmd);
 	_pluginsPath = new StaticTextWidget(tab, "GlobalOptions_Paths.PluginsPath", _c("None", "path"));
 
 	_pluginsPathClearButton = addClearButton(tab, "GlobalOptions_Paths.PluginsPathClearButton", kPluginsPathClearCmd);
@@ -1664,7 +1664,7 @@ void GlobalOptionsDialog::build() {
 	else
 		tab->addTab(_c("Misc", "lowres"), "GlobalOptions_Misc");
 
-	new ButtonWidget(tab, "GlobalOptions_Misc.ThemeButton", _("Theme:"), 0, kChooseThemeCmd);
+	new ButtonWidget(tab, "GlobalOptions_Misc.ThemeButton", _("Theme:"), nullptr, kChooseThemeCmd);
 	_curTheme = new StaticTextWidget(tab, "GlobalOptions_Misc.CurTheme", g_gui.theme()->getThemeName());
 
 
@@ -1690,7 +1690,7 @@ void GlobalOptionsDialog::build() {
 	}
 
 #ifdef GUI_ENABLE_KEYSDIALOG
-	new ButtonWidget(tab, "GlobalOptions_Misc.KeysButton", _("Keys"), 0, kChooseKeyMappingCmd);
+	new ButtonWidget(tab, "GlobalOptions_Misc.KeysButton", _("Keys"), nullptr, kChooseKeyMappingCmd);
 #endif
 
 	// TODO: joystick setting
@@ -1757,7 +1757,7 @@ void GlobalOptionsDialog::build() {
 
 	_updatesPopUp->setSelectedTag(Common::UpdateManager::normalizeInterval(ConfMan.getInt("updates_check")));
 
-	new ButtonWidget(tab, "GlobalOptions_Misc.UpdatesCheckManuallyButton", _("Check now"), 0, kUpdatesCheckCmd);
+	new ButtonWidget(tab, "GlobalOptions_Misc.UpdatesCheckManuallyButton", _("Check now"), nullptr, kUpdatesCheckCmd);
 #endif
 
 #ifdef USE_CLOUD
@@ -1826,9 +1826,9 @@ void GlobalOptionsDialog::build() {
 	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
-	new ButtonWidget(this, "GlobalOptions.Cancel", _("Cancel"), 0, kCloseCmd);
-	new ButtonWidget(this, "GlobalOptions.Apply", _("Apply"), 0, kApplyCmd);
-	new ButtonWidget(this, "GlobalOptions.Ok", _("OK"), 0, kOKCmd);
+	new ButtonWidget(this, "GlobalOptions.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new ButtonWidget(this, "GlobalOptions.Apply", _("Apply"), nullptr, kApplyCmd);
+	new ButtonWidget(this, "GlobalOptions.Ok", _("OK"), nullptr, kOKCmd);
 
 #ifdef GUI_ENABLE_KEYSDIALOG
 	_keysDialog = new KeysDialog();
@@ -1902,12 +1902,12 @@ void GlobalOptionsDialog::build() {
 void GlobalOptionsDialog::clean() {
 #ifdef GUI_ENABLE_KEYSDIALOG
 	delete _keysDialog;
-	_keysDialog = 0;
+	_keysDialog = nullptr;
 #endif
 
 #ifdef USE_FLUIDSYNTH
 	delete _fluidSynthSettingsDialog;
-	_fluidSynthSettingsDialog = 0;
+	_fluidSynthSettingsDialog = nullptr;
 #endif
 
 	OptionsDialog::clean();
@@ -1965,7 +1965,7 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", _c("2. Get the code and enter it here:", "lowres"));
 	else
 		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", _("2. Get the code and enter it here:"));
-	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", "", 0, 0, 0, ThemeEngine::kFontStyleConsole);
+	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", "", nullptr, 0, 0, ThemeEngine::kFontStyleConsole);
 	_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", _("Paste"), _("Paste code from clipboard"), kPasteCodeStorageCmd);
 	_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", _("3. Connect"), _("Connect your cloud storage account"), kConnectStorageCmd);
 	_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", "...");
@@ -1990,7 +1990,7 @@ void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::Stri
 	uint32 port = Networking::LocalWebserver::getPort();
 
 	_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", _("Server's port:"), _("Port for server to use"));
-	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), 0);
+	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), nullptr);
 	_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
 
 	if (lowres) {
@@ -2179,7 +2179,7 @@ void GlobalOptionsDialog::apply() {
 #endif
 
 	if (isRebuildNeeded) {
-		if (_launcher != 0)
+		if (_launcher != nullptr)
 			_launcher->rebuild();
 		rebuild();
 	}
@@ -2531,7 +2531,7 @@ void GlobalOptionsDialog::reflowLayout() {
 		_tabWidget->setActiveTab(_midiTabId);
 
 		_tabWidget->removeWidget(_soundFontClearButton);
-		_soundFontClearButton->setNext(0);
+		_soundFontClearButton->setNext(nullptr);
 		delete _soundFontClearButton;
 		_soundFontClearButton = addClearButton(_tabWidget, "GlobalOptions_MIDI.mcFontClearButton", kClearSoundFontCmd);
 	}
@@ -2540,17 +2540,17 @@ void GlobalOptionsDialog::reflowLayout() {
 		_tabWidget->setActiveTab(_pathsTabId);
 
 		_tabWidget->removeWidget(_savePathClearButton);
-		_savePathClearButton->setNext(0);
+		_savePathClearButton->setNext(nullptr);
 		delete _savePathClearButton;
 		_savePathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.SavePathClearButton", kSavePathClearCmd);
 
 		_tabWidget->removeWidget(_themePathClearButton);
-		_themePathClearButton->setNext(0);
+		_themePathClearButton->setNext(nullptr);
 		delete _themePathClearButton;
 		_themePathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.ThemePathClearButton", kThemePathClearCmd);
 
 		_tabWidget->removeWidget(_extraPathClearButton);
-		_extraPathClearButton->setNext(0);
+		_extraPathClearButton->setNext(nullptr);
 		delete _extraPathClearButton;
 		_extraPathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.ExtraPathClearButton", kExtraPathClearCmd);
 	}
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index b15bd5c..17c4730 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -70,21 +70,21 @@ enum {
 PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 	new StaticTextWidget(this, "Predictive.Headline", "Enter Text");
 
-	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  _("Cancel")   , 0, kCancelCmd);
-	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      _("Ok")       , 0, kOkCmd);
-	_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", "1  `-.&"     , 0, kBut1Cmd);
-	_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", "2  abc"      , 0, kBut2Cmd);
-	_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", "3  def"      , 0, kBut3Cmd);
-	_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", "4  ghi"      , 0, kBut4Cmd);
-	_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", "5  jkl"      , 0, kBut5Cmd);
-	_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", "6  mno"      , 0, kBut6Cmd);
-	_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", "7  pqrs"     , 0, kBut7Cmd);
-	_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", "8  tuv"      , 0, kBut8Cmd);
-	_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", "9  wxyz"     , 0, kBut9Cmd);
-	_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", "0"           , 0, kBut0Cmd);
+	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  _("Cancel")   , nullptr, kCancelCmd);
+	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      _("Ok")       , nullptr, kOkCmd);
+	_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", "1  `-.&"     , nullptr, kBut1Cmd);
+	_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", "2  abc"      , nullptr, kBut2Cmd);
+	_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", "3  def"      , nullptr, kBut3Cmd);
+	_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", "4  ghi"      , nullptr, kBut4Cmd);
+	_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", "5  jkl"      , nullptr, kBut5Cmd);
+	_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", "6  mno"      , nullptr, kBut6Cmd);
+	_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", "7  pqrs"     , nullptr, kBut7Cmd);
+	_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", "8  tuv"      , nullptr, kBut8Cmd);
+	_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", "9  wxyz"     , nullptr, kBut9Cmd);
+	_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", "0"           , nullptr, kBut0Cmd);
 	// I18N: You must leave "#" as is, only word 'next' is translatable
-	_button[kNextAct] =    new ButtonWidget(this, "Predictive.Next",    _("#  next")  , 0, kNextCmd);
-	_button[kAddAct] =     new ButtonWidget(this, "Predictive.Add",     _("add")      , 0, kAddCmd);
+	_button[kNextAct] =    new ButtonWidget(this, "Predictive.Next",    _("#  next")  , nullptr, kNextCmd);
+	_button[kAddAct] =     new ButtonWidget(this, "Predictive.Add",     _("add")      , nullptr, kAddCmd);
 	_button[kAddAct]->setEnabled(false);
 
 #ifndef DISABLE_FANCY_THEMES
@@ -94,10 +94,10 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 		((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
 	} else
 #endif
-		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , 0, kDelCmd);
+		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , nullptr, kDelCmd);
 	// I18N: Pre means 'Predictive', leave '*' as is
-	_button[kModeAct] = new ButtonWidget(this, "Predictive.Pre", _("*  Pre"), 0, kModeCmd);
-	_editText = new EditTextWidget(this, "Predictive.Word", _search, 0, 0, 0);
+	_button[kModeAct] = new ButtonWidget(this, "Predictive.Pre", _("*  Pre"), nullptr, kModeCmd);
+	_editText = new EditTextWidget(this, "Predictive.Word", _search, nullptr, 0, 0);
 
 	_userDictHasChanged = false;
 
@@ -159,7 +159,7 @@ PredictiveDialog::~PredictiveDialog() {
 void PredictiveDialog::reflowLayout() {
 #ifndef DISABLE_FANCY_THEMES
 	removeWidget(_button[kDelAct]);
-	_button[kDelAct]->setNext(0);
+	_button[kDelAct]->setNext(nullptr);
 	delete _button[kDelAct];
 	_button[kDelAct] = nullptr;
 
@@ -168,7 +168,7 @@ void PredictiveDialog::reflowLayout() {
 		((PicButtonWidget *)_button[kDelAct])->useThemeTransparency(true);
 		((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
 	} else {
-		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , 0, kDelCmd);
+		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , nullptr, kDelCmd);
 	}
 #endif
 
@@ -456,7 +456,7 @@ void PredictiveDialog::processButton(ButtonId button) {
 		"next",    "add",
 		"<",
 		"Cancel",  "OK",
-		"Pre", "(0) ", NULL
+		"Pre", "(0) ", nullptr
 	};
 
 	if (_mode == kModeAbc) {
@@ -544,7 +544,7 @@ void PredictiveDialog::processButton(ButtonId button) {
 					tmp[kMaxLineLen - 1] = 0;
 					char *tok = strtok(tmp, " ");
 					for (uint8 i = 0; i <= _wordNumber; i++)
-						tok = strtok(NULL, " ");
+						tok = strtok(nullptr, " ");
 					_currentWord = Common::String(tok, _currentCode.size());
 				}
 			} else if (_mode == kModeAbc) {
@@ -682,7 +682,7 @@ void PredictiveDialog::bringWordtoTop(char *str, int wordnum) {
 	}
 
 	words.push_back(word);
-	while ((word = strtok(NULL, " ")) != NULL)
+	while ((word = strtok(nullptr, " ")) != nullptr)
 		words.push_back(word);
 	words.insert_at(1, words.remove_at(wordnum + 1));
 
@@ -738,7 +738,7 @@ bool PredictiveDialog::matchWord() {
 	int line = binarySearch(_unitedDict.dictLine, code, _unitedDict.dictLineCount);
 	if (line < 0) {
 		line = -(line + 1);
-		_unitedDict.dictActLine = NULL;
+		_unitedDict.dictActLine = nullptr;
 	} else {
 		_unitedDict.dictActLine = _unitedDict.dictLine[line];
 	}
@@ -751,7 +751,7 @@ bool PredictiveDialog::matchWord() {
 		tmp[kMaxLineLen - 1] = 0;
 		char *tok;
 		strtok(tmp, " ");
-		tok = strtok(NULL, " ");
+		tok = strtok(nullptr, " ");
 		_currentWord = Common::String(tok, _currentCode.size());
 		return true;
 	} else {
@@ -781,7 +781,7 @@ bool PredictiveDialog::searchWord(const char *const where, const Common::String
 }
 
 void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Common::String &code) {
-	char *newLine = 0;
+	char *newLine = nullptr;
 	Common::String tmpCode = code + ' ';
 	int line = binarySearch(dict.dictLine, tmpCode, dict.dictLineCount);
 	if (line >= 0) {
@@ -937,7 +937,7 @@ void PredictiveDialog::loadDictionary(Common::SeekableReadStream *in, Dict &dict
 	}
 
 	dict.dictLine = (char **)calloc(lines, sizeof(char *));
-	if (dict.dictLine == NULL) {
+	if (dict.dictLine == nullptr) {
 		warning("Predictive Dialog: Cannot allocate memory for line index buffer");
 		return;
 	}
diff --git a/gui/recorderdialog.cpp b/gui/recorderdialog.cpp
index b9ac1e2..ab0ce34 100644
--- a/gui/recorderdialog.cpp
+++ b/gui/recorderdialog.cpp
@@ -51,12 +51,12 @@ enum {
 	kEditRecordCmd = 'EDIT'
 };
 
-RecorderDialog::RecorderDialog() : Dialog("RecorderDialog"), _list(0), _currentScreenshot(0) {
+RecorderDialog::RecorderDialog() : Dialog("RecorderDialog"), _list(nullptr), _currentScreenshot(0) {
 	_firstScreenshotUpdate = false;
 	_screenShotsCount = 0;
-	_currentScreenshotText = 0;
-	_authorText = 0;
-	_notesText = 0;
+	_currentScreenshotText = nullptr;
+	_authorText = nullptr;
+	_notesText = nullptr;
 
 	_backgroundType = ThemeEngine::kDialogBackgroundSpecial;
 
@@ -65,12 +65,12 @@ RecorderDialog::RecorderDialog() : Dialog("RecorderDialog"), _list(0), _currentS
 	_list = new GUI::ListWidget(this, "RecorderDialog.List");
 	_list->setNumberingMode(GUI::kListNumberingOff);
 
-	_deleteButton = new GUI::ButtonWidget(this, "RecorderDialog.Delete", _("Delete"), 0, kDeleteCmd);
-	new GUI::ButtonWidget(this, "RecorderDialog.Cancel", _("Cancel"), 0, kCloseCmd);
-	new GUI::ButtonWidget(this, "RecorderDialog.Record", _("Record"), 0, kRecordCmd);
-	_playbackButton = new GUI::ButtonWidget(this, "RecorderDialog.Playback", _("Playback"), 0, kPlaybackCmd);
+	_deleteButton = new GUI::ButtonWidget(this, "RecorderDialog.Delete", _("Delete"), nullptr, kDeleteCmd);
+	new GUI::ButtonWidget(this, "RecorderDialog.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new GUI::ButtonWidget(this, "RecorderDialog.Record", _("Record"), nullptr, kRecordCmd);
+	_playbackButton = new GUI::ButtonWidget(this, "RecorderDialog.Playback", _("Playback"), nullptr, kPlaybackCmd);
 
-	_editButton = new GUI::ButtonWidget(this, "RecorderDialog.Edit", _("Edit"), 0, kEditRecordCmd);
+	_editButton = new GUI::ButtonWidget(this, "RecorderDialog.Edit", _("Edit"), nullptr, kEditRecordCmd);
 
 	_editButton->setEnabled(false);
 	_deleteButton->setEnabled(false);
@@ -79,14 +79,14 @@ RecorderDialog::RecorderDialog() : Dialog("RecorderDialog"), _list(0), _currentS
 	_gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10);
 	_container = new GUI::ContainerWidget(this, "RecorderDialog.Thumbnail");
 	if (g_gui.xmlEval()->getVar("Globals.RecorderDialog.ExtInfo.Visible") == 1) {
-		new GUI::ButtonWidget(this,"RecorderDialog.NextScreenShotButton", "<", 0, kPrevScreenshotCmd);
-		new GUI::ButtonWidget(this, "RecorderDialog.PreviousScreenShotButton", ">", 0, kNextScreenshotCmd);
+		new GUI::ButtonWidget(this,"RecorderDialog.NextScreenShotButton", "<", nullptr, kPrevScreenshotCmd);
+		new GUI::ButtonWidget(this, "RecorderDialog.PreviousScreenShotButton", ">", nullptr, kNextScreenshotCmd);
 		_currentScreenshotText = new StaticTextWidget(this, "RecorderDialog.currentScreenshot", "0/0");
 		_authorText = new StaticTextWidget(this, "RecorderDialog.Author", _("Author: "));
 		_notesText = new StaticTextWidget(this, "RecorderDialog.Notes", _("Notes: "));
 	}
 	if (_gfxWidget)
-		_gfxWidget->setGfx(0);
+		_gfxWidget->setGfx(nullptr);
 }
 
 
@@ -274,7 +274,7 @@ void RecorderDialog::updateScreenshot() {
 		_firstScreenshotUpdate = false;
 	}
 	Graphics::Surface *srcsf = _playbackFile.getScreenShot(_currentScreenshot);
-	if (srcsf != NULL) {
+	if (srcsf != nullptr) {
 		Graphics::Surface *destsf = Graphics::scale(*srcsf, _gfxWidget->getWidth(), _gfxWidget->getHeight());
 		_gfxWidget->setGfx(destsf);
 		updateScreenShotsText();
diff --git a/gui/remotebrowser.cpp b/gui/remotebrowser.cpp
index 0bbc21d..6c6c88d 100644
--- a/gui/remotebrowser.cpp
+++ b/gui/remotebrowser.cpp
@@ -57,8 +57,8 @@ RemoteBrowserDialog::RemoteBrowserDialog(const char *title):
 		new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
 	else
 		new ButtonWidget(this, "Browser.Up", _c("Go up", "lowres"), _("Go to previous directory level"), kGoUpCmd);
-	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), 0, kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", _("Choose"), 0, kChooseCmd);
+	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", _("Choose"), nullptr, kChooseCmd);
 }
 
 RemoteBrowserDialog::~RemoteBrowserDialog() {
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index d300e91..af7e627 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -57,8 +57,8 @@ SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBa
 	_progressBar->setValue(progress);
 	_progressBar->setEnabled(false);
 	_percentLabel = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.PercentText", Common::String::format("%u %%", progress));
-	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", "Cancel", 0, kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
-	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", "Run in background", 0, kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
+	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", "Cancel", nullptr, kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", "Run in background", nullptr, kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
 	backgroundButton->setEnabled(canRunInBackground);
 	g_gui.scheduleTopDialogRedraw();
 }
@@ -134,11 +134,11 @@ enum {
 #endif // !DISABLE_SAVELOADCHOOSER_GRID
 
 SaveLoadChooserDialog::SaveLoadChooserDialog(const Common::String &dialogName, const bool saveMode)
-	: Dialog(dialogName), _metaEngine(0), _delSupport(false), _metaInfoSupport(false),
+	: Dialog(dialogName), _metaEngine(nullptr), _delSupport(false), _metaInfoSupport(false),
 	_thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false), _saveMode(saveMode),
 	_dialogWasShown(false)
 #ifndef DISABLE_SAVELOADCHOOSER_GRID
-	, _listButton(0), _gridButton(0)
+	, _listButton(nullptr), _gridButton(nullptr)
 #endif // !DISABLE_SAVELOADCHOOSER_GRID
 	{
 #ifndef DISABLE_SAVELOADCHOOSER_GRID
@@ -147,11 +147,11 @@ SaveLoadChooserDialog::SaveLoadChooserDialog(const Common::String &dialogName, c
 }
 
 SaveLoadChooserDialog::SaveLoadChooserDialog(int x, int y, int w, int h, const bool saveMode)
-	: Dialog(x, y, w, h), _metaEngine(0), _delSupport(false), _metaInfoSupport(false),
+	: Dialog(x, y, w, h), _metaEngine(nullptr), _delSupport(false), _metaInfoSupport(false),
 	_thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false), _saveMode(saveMode),
 	_dialogWasShown(false)
 #ifndef DISABLE_SAVELOADCHOOSER_GRID
-	, _listButton(0), _gridButton(0)
+	, _listButton(nullptr), _gridButton(nullptr)
 #endif // !DISABLE_SAVELOADCHOOSER_GRID
 	{
 #ifndef DISABLE_SAVELOADCHOOSER_GRID
@@ -372,8 +372,8 @@ enum {
 };
 
 SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode)
-	: SaveLoadChooserDialog("SaveLoadChooser", saveMode), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0),
-	_container(0) {
+	: SaveLoadChooserDialog("SaveLoadChooser", saveMode), _list(nullptr), _chooseButton(nullptr), _deleteButton(nullptr), _gfxWidget(nullptr),
+	_container(nullptr) {
 	_backgroundType = ThemeEngine::kDialogBackgroundSpecial;
 
 	new StaticTextWidget(this, "SaveLoadChooser.Title", title);
@@ -390,11 +390,11 @@ SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String &
 	_playtime = new StaticTextWidget(this, 0, 0, 10, 10, _("No playtime saved"), Graphics::kTextAlignCenter);
 
 	// Buttons
-	new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Cancel"), 0, kCloseCmd);
-	_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, 0, kChooseCmd);
+	new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, nullptr, kChooseCmd);
 	_chooseButton->setEnabled(false);
 
-	_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", _("Delete"), 0, kDelCmd);
+	_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", _("Delete"), nullptr, kDelCmd);
 	_deleteButton->setEnabled(false);
 
 	_delSupport = _metaInfoSupport = _thumbnailSupport = false;
@@ -415,7 +415,7 @@ void SaveLoadChooserSimple::addThumbnailContainer() {
 
 int SaveLoadChooserSimple::runIntern() {
 	if (_gfxWidget)
-		_gfxWidget->setGfx(0);
+		_gfxWidget->setGfx(nullptr);
 
 	_resultString.clear();
 	reflowLayout();
@@ -662,7 +662,7 @@ void SaveLoadChooserSimple::close() {
 		ConfMan.setInt("gui_saveload_last_pos", _list->getCurrentScrollPos());
 	}
 
-	_metaEngine = 0;
+	_metaEngine = nullptr;
 	_target.clear();
 	_saveList.clear();
 	_list->setList(StringArray());
@@ -753,7 +753,7 @@ enum {
 
 SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::String &title, bool saveMode)
 	: SaveLoadChooserDialog("SaveLoadChooser", saveMode), _lines(0), _columns(0), _entriesPerPage(0),
-	_curPage(0), _newSaveContainer(0), _nextFreeSaveSlot(0), _buttons() {
+	_curPage(0), _newSaveContainer(nullptr), _nextFreeSaveSlot(0), _buttons() {
 	_backgroundType = ThemeEngine::kDialogBackgroundSpecial;
 
 	new StaticTextWidget(this, "SaveLoadChooser.Title", title);
@@ -763,11 +763,11 @@ SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::String &title, bool saveM
 	list->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
 
 	// Buttons
-	new ButtonWidget(this, "SaveLoadChooser.Delete", _("Cancel"), 0, kCloseCmd);
-	_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", _("Next"), 0, kNextCmd);
+	new ButtonWidget(this, "SaveLoadChooser.Delete", _("Cancel"), nullptr, kCloseCmd);
+	_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", _("Next"), nullptr, kNextCmd);
 	_nextButton->setEnabled(false);
 
-	_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Prev"), 0, kPrevCmd);
+	_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Prev"), nullptr, kPrevCmd);
 	_prevButton->setEnabled(false);
 
 	// Page display
@@ -989,7 +989,7 @@ void SaveLoadChooserGrid::reflowLayout() {
 				buttonCmd += 1;
 			}
 
-			PicButtonWidget *button = new PicButtonWidget(container, dstX, dstY, buttonWidth, buttonHeight, 0, buttonCmd);
+			PicButtonWidget *button = new PicButtonWidget(container, dstX, dstY, buttonWidth, buttonHeight, nullptr, buttonCmd);
 			dstY += buttonHeight;
 
 			StaticTextWidget *description = new StaticTextWidget(container, dstX, dstY, buttonWidth, kLineHeight, Common::String(), Graphics::kTextAlignLeft);
@@ -1064,7 +1064,7 @@ void SaveLoadChooserGrid::destroyButtons() {
 	if (_newSaveContainer) {
 		removeWidget(_newSaveContainer);
 		delete _newSaveContainer;
-		_newSaveContainer = 0;
+		_newSaveContainer = nullptr;
 	}
 
 	for (ButtonArray::iterator i = _buttons.begin(), end = _buttons.end(); i != end; ++i) {
@@ -1077,7 +1077,7 @@ void SaveLoadChooserGrid::destroyButtons() {
 
 void SaveLoadChooserGrid::hideButtons() {
 	for (ButtonArray::iterator i = _buttons.begin(), end = _buttons.end(); i != end; ++i) {
-		i->button->setGfx(0);
+		i->button->setGfx(nullptr);
 		i->setVisible(false);
 	}
 }
@@ -1157,10 +1157,10 @@ SavenameDialog::SavenameDialog()
 	: Dialog("SavenameDialog") {
 	_title = new StaticTextWidget(this, "SavenameDialog.DescriptionText", Common::String());
 
-	new ButtonWidget(this, "SavenameDialog.Cancel", _("Cancel"), 0, kCloseCmd);
-	new ButtonWidget(this, "SavenameDialog.Ok", _("OK"), 0, kOKCmd);
+	new ButtonWidget(this, "SavenameDialog.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new ButtonWidget(this, "SavenameDialog.Ok", _("OK"), nullptr, kOKCmd);
 
-	_description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), 0, 0, kOKCmd);
+	_description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), nullptr, 0, kOKCmd);
 
 	_targetSlot = 0;
 }
diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h
index 936ef03..f9a437d 100644
--- a/gui/saveload-dialog.h
+++ b/gui/saveload-dialog.h
@@ -228,7 +228,7 @@ private:
 	bool selectDescription();
 
 	struct SlotButton {
-		SlotButton() : container(0), button(0), description(0) {}
+		SlotButton() : container(nullptr), button(nullptr), description(nullptr) {}
 		SlotButton(ContainerWidget *c, PicButtonWidget *b, StaticTextWidget *d) : container(c), button(b), description(d) {}
 
 		ContainerWidget  *container;
diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index 4e2525a..f9b32d6 100644
--- a/gui/saveload.cpp
+++ b/gui/saveload.cpp
@@ -31,12 +31,12 @@
 namespace GUI {
 
 SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode)
-	: _impl(0), _title(title), _buttonLabel(buttonLabel), _saveMode(saveMode) {
+	: _impl(nullptr), _title(title), _buttonLabel(buttonLabel), _saveMode(saveMode) {
 }
 
 SaveLoadChooser::~SaveLoadChooser() {
 	delete _impl;
-	_impl = 0;
+	_impl = nullptr;
 }
 
 void SaveLoadChooser::selectChooser(const MetaEngine &engine) {
@@ -44,7 +44,7 @@ void SaveLoadChooser::selectChooser(const MetaEngine &engine) {
 	const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(engine);
 	if (!_impl || _impl->getType() != requestedType) {
 		delete _impl;
-		_impl = 0;
+		_impl = nullptr;
 
 		switch (requestedType) {
 		case kSaveLoadDialogGrid:
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index 6705c07..b78b35d 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -40,7 +40,7 @@ enum {
 // also it will get its own theme config values
 // and not use 'browser_' anymore
 ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
-	_fileList = 0;
+	_fileList = nullptr;
 
 	new StaticTextWidget(this, "Browser.Headline", _("Select a Theme"));
 
@@ -52,8 +52,8 @@ ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Buttons
-	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), 0, kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", _("Choose"), 0, kChooseCmd);
+	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), nullptr, kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", _("Choose"), nullptr, kChooseCmd);
 }
 
 void ThemeBrowser::open() {
diff --git a/gui/unknown-game-dialog.cpp b/gui/unknown-game-dialog.cpp
index b443334..68150c8 100644
--- a/gui/unknown-game-dialog.cpp
+++ b/gui/unknown-game-dialog.cpp
@@ -46,22 +46,22 @@ UnknownGameDialog::UnknownGameDialog(const DetectedGame &detectedGame) :
 		_detectedGame(detectedGame) {
 
 	if (detectedGame.canBeAdded) {
-		_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", _("Add anyway"), 0, kAddAnyway);
+		_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", _("Add anyway"), nullptr, kAddAnyway);
 	} else {
 		_addAnywayButton = nullptr;
 	}
 
-	_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? _("Cancel") : _("Close"), 0, kClose);
+	_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? _("Cancel") : _("Close"), nullptr, kClose);
 
 	//Check if we have clipboard functionality
 	if (g_system->hasFeature(OSystem::kFeatureClipboardSupport)) {
-		_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", _("Copy to clipboard"), 0, kCopyToClipboard);
+		_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", _("Copy to clipboard"), nullptr, kCopyToClipboard);
 	} else
 		_copyToClipboardButton = nullptr;
 
 	//Check if we have support for opening URLs
 	if (g_system->hasFeature(OSystem::kFeatureOpenUrl)) {
-		_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", _("Report game"), 0, kOpenBugtrackerURL);
+		_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", _("Report game"), nullptr, kOpenBugtrackerURL);
 	} else
 		_openBugTrackerUrlButton = nullptr;
 
diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index d2f79cc..d9473ca 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -113,7 +113,7 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 	int buttonPos = _w - buttonWidth - 10;
 
 	_proceedButton = new ButtonWidget(this, buttonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight,
-				_("Proceed"), 0, kProceedCmd, Common::ASCII_RETURN);
+				_("Proceed"), nullptr, kProceedCmd, Common::ASCII_RETURN);
 }
 
 void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 1a81d8f..3c1f44f 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -58,7 +58,7 @@ void Widget::init() {
 
 Widget::~Widget() {
 	delete _next;
-	_next = 0;
+	_next = nullptr;
 }
 
 void Widget::resize(int x, int y, int w, int h) {
@@ -169,7 +169,7 @@ Widget *Widget::findWidgetInChain(Widget *w, const char *name) {
 		}
 		w = w->_next;
 	}
-	return 0;
+	return nullptr;
 }
 
 bool Widget::containsWidgetInChain(Widget *w, Widget *search) {
diff --git a/gui/widget.h b/gui/widget.h
index 878f85e..7b4b19b 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -114,8 +114,8 @@ public:
 	static bool containsWidgetInChain(Widget *start, Widget *search);
 
 public:
-	Widget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
-	Widget(GuiObject *boss, const Common::String &name, const char *tooltip = 0);
+	Widget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr);
+	Widget(GuiObject *boss, const Common::String &name, const char *tooltip = nullptr);
 	~Widget() override;
 
 	void init();
@@ -197,8 +197,8 @@ protected:
 	Graphics::TextAlign		_align;
 	ThemeEngine::FontStyle	_font;
 public:
-	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
-	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
+	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
+	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
 	void setValue(int value);
 	void setLabel(const Common::String &label);
 	void handleMouseEntered(int button) override	{ readLabel(); }
@@ -218,8 +218,8 @@ protected:
 	uint32	_cmd;
 	uint8	_hotkey;
 public:
-	ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
-	ButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
+	ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	ButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
 
 	void getMinSize(int &minWidth, int &minHeight) override;
 
@@ -279,8 +279,8 @@ protected:
 /* PicButtonWidget */
 class PicButtonWidget : public ButtonWidget {
 public:
-	PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
-	PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
+	PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
 	~PicButtonWidget() override;
 
 	void setGfx(const Graphics::Surface *gfx, int statenum = kPicButtonStateEnabled);
@@ -304,8 +304,8 @@ class CheckboxWidget : public ButtonWidget {
 protected:
 	bool	_state;
 public:
-	CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
-	CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
+	CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
@@ -350,8 +350,8 @@ protected:
 	int _value;
 
 public:
-	RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = 0, uint8 hotkey = 0);
-	RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = 0, uint8 hotkey = 0);
+	RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
+	RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
@@ -377,8 +377,8 @@ protected:
 	bool	_isDragging;
 	uint	_labelWidth;
 public:
-	SliderWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0);
-	SliderWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0, uint32 cmd = 0);
+	SliderWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr, uint32 cmd = 0);
+	SliderWidget(GuiObject *boss, const Common::String &name, const char *tooltip = nullptr, uint32 cmd = 0);
 
 	void setCmd(uint32 cmd)		{ _cmd = cmd; }
 	uint32 getCmd() const		{ return _cmd; }
@@ -409,8 +409,8 @@ protected:
 /* GraphicsWidget */
 class GraphicsWidget : public Widget {
 public:
-	GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
-	GraphicsWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0);
+	GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr);
+	GraphicsWidget(GuiObject *boss, const Common::String &name, const char *tooltip = nullptr);
 	~GraphicsWidget() override;
 
 	void setGfx(const Graphics::Surface *gfx);
diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h
index a437233..78ee591 100644
--- a/gui/widgets/editable.h
+++ b/gui/widgets/editable.h
@@ -60,8 +60,8 @@ protected:
 	ThemeEngine::TextInversionState  _inversion;
 
 public:
-	EditableWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0);
-	EditableWidget(GuiObject *boss, const String &name, const char *tooltip = 0, uint32 cmd = 0);
+	EditableWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr, uint32 cmd = 0);
+	EditableWidget(GuiObject *boss, const String &name, const char *tooltip = nullptr, uint32 cmd = 0);
 	~EditableWidget() override;
 
 	void init();
diff --git a/gui/widgets/edittext.h b/gui/widgets/edittext.h
index 152e3a9..d317175 100644
--- a/gui/widgets/edittext.h
+++ b/gui/widgets/edittext.h
@@ -40,8 +40,8 @@ protected:
 	int				_rightPadding;
 
 public:
-	EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = 0, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
-	EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = 0, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
+	EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = nullptr, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
+	EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = nullptr, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
 
 	void setEditString(const String &str) override;
 
diff --git a/gui/widgets/list.h b/gui/widgets/list.h
index e3d9b9b..f915b9b 100644
--- a/gui/widgets/list.h
+++ b/gui/widgets/list.h
@@ -87,13 +87,13 @@ protected:
 	int				_lastRead;
 
 public:
-	ListWidget(Dialog *boss, const String &name, const char *tooltip = 0, uint32 cmd = 0);
-	ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0);
+	ListWidget(Dialog *boss, const String &name, const char *tooltip = nullptr, uint32 cmd = 0);
+	ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip = nullptr, uint32 cmd = 0);
 
 	bool containsWidget(Widget *) const override;
 	Widget *findWidget(int x, int y) override;
 
-	void setList(const StringArray &list, const ColorList *colors = 0);
+	void setList(const StringArray &list, const ColorList *colors = nullptr);
 	const StringArray &getList()	const			{ return _dataList; }
 
 	void append(const String &s, ThemeEngine::FontColor color = ThemeEngine::kFontColorNormal);
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index e6010c8..7696d04 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -57,8 +57,8 @@ protected:
 	int				_rightPadding;
 
 public:
-	PopUpWidget(GuiObject *boss, const String &name, const char *tooltip = 0);
-	PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
+	PopUpWidget(GuiObject *boss, const String &name, const char *tooltip = nullptr);
+	PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr);
 
 	void handleMouseDown(int x, int y, int button, int clickCount) override;
 	void handleMouseWheel(int x, int y, int direction) override;
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index 1ca6156..645f533 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -69,8 +69,8 @@ void TabWidget::init() {
 
 	int x = _w - _butRP - _butW * 2 - 2;
 	int y = _butTP - _tabHeight;
-	_navLeft = new ButtonWidget(this, x, y, _butW, _butH, "<", 0, kCmdLeft);
-	_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, ">", 0, kCmdRight);
+	_navLeft = new ButtonWidget(this, x, y, _butW, _butH, "<", nullptr, kCmdLeft);
+	_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, ">", nullptr, kCmdRight);
 	_lastRead = -1;
 }
 
@@ -81,10 +81,10 @@ TabWidget::~TabWidget() {
 	// date. So update it now.
 	if (_activeTab != -1)
 		_tabs[_activeTab].firstWidget = _firstWidget;
-	_firstWidget = 0;
+	_firstWidget = nullptr;
 	for (uint i = 0; i < _tabs.size(); ++i) {
 		delete _tabs[i].firstWidget;
-		_tabs[i].firstWidget = 0;
+		_tabs[i].firstWidget = nullptr;
 	}
 	_tabs.clear();
 	delete _navRight;
@@ -109,7 +109,7 @@ int TabWidget::addTab(const String &title, const String &dialogName) {
 	Tab newTab;
 	newTab.title = title;
 	newTab.dialogName = dialogName;
-	newTab.firstWidget = 0;
+	newTab.firstWidget = nullptr;
 
 	// Determine the new tab width
 	int newWidth = g_gui.getStringWidth(title) + kTabTitleSpacing;
@@ -134,7 +134,7 @@ void TabWidget::removeTab(int tabID) {
 	if (tabID == _activeTab) {
 		_tabs[tabID].firstWidget = _firstWidget;
 		releaseFocus();
-		_firstWidget = 0;
+		_firstWidget = nullptr;
 	}
 
 	// Dispose the widgets in that tab and then the tab itself




More information about the Scummvm-git-logs mailing list