[Scummvm-git-logs] scummvm master -> e70fbbee21c942b5f291ef545f6be685cdf9531e

aquadran noreply at scummvm.org
Sun Jun 12 22:44:43 UTC 2022


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

Summary:
e70fbbee21 MYST3: Janitorial


Commit: e70fbbee21c942b5f291ef545f6be685cdf9531e
    https://github.com/scummvm/scummvm/commit/e70fbbee21c942b5f291ef545f6be685cdf9531e
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-06-13T00:44:39+02:00

Commit Message:
MYST3: Janitorial

Changed paths:
    engines/myst3/database.cpp
    engines/myst3/effects.cpp
    engines/myst3/gfx.cpp
    engines/myst3/gfx.h
    engines/myst3/gfx_opengl.cpp
    engines/myst3/gfx_opengl_shaders.cpp
    engines/myst3/gfx_opengl_shaders.h
    engines/myst3/gfx_opengl_texture.cpp
    engines/myst3/gfx_tinygl.cpp
    engines/myst3/gfx_tinygl_texture.cpp
    engines/myst3/hotspot.cpp
    engines/myst3/hotspot.h
    engines/myst3/inventory.cpp
    engines/myst3/menu.cpp
    engines/myst3/metaengine.cpp
    engines/myst3/movie.cpp
    engines/myst3/myst3.cpp
    engines/myst3/myst3.h
    engines/myst3/node.cpp
    engines/myst3/puzzles.cpp
    engines/myst3/script.cpp
    engines/myst3/shaders/myst3_box.fragment
    engines/myst3/shaders/myst3_box.vertex
    engines/myst3/shaders/myst3_cube.fragment
    engines/myst3/shaders/myst3_cube.vertex
    engines/myst3/shaders/myst3_text.fragment
    engines/myst3/shaders/myst3_text.vertex
    engines/myst3/sound.cpp
    engines/myst3/sound.h
    engines/myst3/state.cpp
    engines/myst3/state.h
    engines/myst3/subtitles.cpp
    engines/myst3/transition.cpp


diff --git a/engines/myst3/database.cpp b/engines/myst3/database.cpp
index dafe3c8d5f4..6e71258e2ca 100644
--- a/engines/myst3/database.cpp
+++ b/engines/myst3/database.cpp
@@ -371,70 +371,70 @@ NodeWalker::~NodeWalker() {
 }
 
 static const RoomData roomsXXXX[] = {
-		{ kRoomShared,        "XXXX" }
+	{ kRoomShared,        "XXXX" }
 };
 
 static const RoomData roomsINTR[] = {
-		{ kRoomIntro,         "INTR" }
+	{ kRoomIntro,         "INTR" }
 };
 
 static const RoomData roomsTOHO[] = {
-		{ kRoomTomahnaStart,  "TOHO" }
+	{ kRoomTomahnaStart,  "TOHO" }
 };
 
 static const RoomData roomsTOHB[] = {
-		{ kRoomTomahnaReturn, "TOHB" }
+	{ kRoomTomahnaReturn, "TOHB" }
 };
 
 static const RoomData roomsLE[] = {
-		{ kJnaninStart,       "LEIS" },
-		{ kRoomLeos,          "LEOS" },
-		{ kRoomLeet,          "LEET" },
-		{ kRoomLelt,          "LELT" },
-		{ kRoomLemt,          "LEMT" },
-		{ kRoomLeof,          "LEOF" }
+	{ kJnaninStart,       "LEIS" },
+	{ kRoomLeos,          "LEOS" },
+	{ kRoomLeet,          "LEET" },
+	{ kRoomLelt,          "LELT" },
+	{ kRoomLemt,          "LEMT" },
+	{ kRoomLeof,          "LEOF" }
 };
 
 static const RoomData roomsLI[] = {
-		{ kRoomEdannaStart,   "LIDR" },
-		{ kRoomLisw,          "LISW" },
-		{ kRoomLifo,          "LIFO" },
-		{ kRoomLisp,          "LISP" },
-		{ kRoomLine,          "LINE" }
+	{ kRoomEdannaStart,   "LIDR" },
+	{ kRoomLisw,          "LISW" },
+	{ kRoomLifo,          "LIFO" },
+	{ kRoomLisp,          "LISP" },
+	{ kRoomLine,          "LINE" }
 };
 
 static const RoomData roomsEN[] = {
-		{ kRoomVoltaicStart,  "ENSI" },
-		{ kRoomEnpp,          "ENPP" },
-		{ kRoomEnem,          "ENEM" },
-		{ kRoomEnlc,          "ENLC" },
-		{ kRoomEndd,          "ENDD" },
-		{ kRoomEnch,          "ENCH" },
-		{ kRoomEnli,          "ENLI" }
+	{ kRoomVoltaicStart,  "ENSI" },
+	{ kRoomEnpp,          "ENPP" },
+	{ kRoomEnem,          "ENEM" },
+	{ kRoomEnlc,          "ENLC" },
+	{ kRoomEndd,          "ENDD" },
+	{ kRoomEnch,          "ENCH" },
+	{ kRoomEnli,          "ENLI" }
 };
 
 static const RoomData roomsNA[] = {
-		{ kRoomNarayan,       "NACH" }
+	{ kRoomNarayan,       "NACH" }
 };
 
 static const RoomData roomsMENU[] = {
-		{ kRoomMenu,          "MENU" },
-		{ kRoomJournals,      "JRNL" },
-		{ kRoomDemo,          "DEMO" },
-		{ kRoomAtix,          "ATIX" }
+	{ kRoomMenu,          "MENU" },
+	{ kRoomJournals,      "JRNL" },
+	{ kRoomDemo,          "DEMO" },
+	{ kRoomAtix,          "ATIX" }
 };
 
 static const RoomData roomsMA[] = {
-		{ kRoomAmateriaStart, "MACA" },
-		{ kRoomMais,          "MAIS" },
-		{ kRoomMall,          "MALL" },
-		{ kRoomMass,          "MASS" },
-		{ kRoomMaww,          "MAWW" },
-		{ kRoomMato,          "MATO" }
+	{ kRoomAmateriaStart, "MACA" },
+	{ kRoomMais,          "MAIS" },
+	{ kRoomMall,          "MALL" },
+	{ kRoomMass,          "MASS" },
+	{ kRoomMaww,          "MAWW" },
+	{ kRoomMato,          "MATO" }
 };
 
 static const RoomData roomsLOGO[] = {
-		{ kLogo,              "LOGO" }
+	{ kLogo,              "LOGO" }
 };
 
 const AgeData Database::_ages[] = {
@@ -457,7 +457,6 @@ Database::Database(const Common::Platform platform, const Common::Language langu
 		_localizationType(localizationType),
 		_soundIdMin(0),
 		_soundIdMax(0) {
-
 	_datFile = SearchMan.createReadStreamForMember("myst3.dat");
 	if (!_datFile) {
 		error("Unable to find 'myst3.dat'");
@@ -883,12 +882,12 @@ void Database::patchLanguageMenu() {
 	// on the detected game language.
 
 	// Script disassembly:
-	//	hotspot 5 > c[v1 != 0] (true)
-	//	rect > pitch: 373 heading: 114 width: 209 height: 28
-	//	op 206, soundPlayVolume ( 795 5 )
-	//	op 53, varSetValue ( vLanguageAudio 2 ) // <= The second argument of this opcode is patched
-	//	op 194, runPuzzle1 ( 18 )
-	//	op 194, runPuzzle1 ( 19 )
+	// hotspot 5 > c[v1 != 0] (true)
+	// rect > pitch: 373 heading: 114 width: 209 height: 28
+	// op 206, soundPlayVolume ( 795 5 )
+	// op 53, varSetValue ( vLanguageAudio 2 ) // <= The second argument of this opcode is patched
+	// op 194, runPuzzle1 ( 18 )
+	// op 194, runPuzzle1 ( 19 )
 
 	NodePtr languageMenu = getNodeData(530, kRoomMenu, 9);
 	languageMenu->hotspots[5].script[1].args[1] = getGameLanguageCode();
diff --git a/engines/myst3/effects.cpp b/engines/myst3/effects.cpp
index 824284afd50..3da8ca15832 100644
--- a/engines/myst3/effects.cpp
+++ b/engines/myst3/effects.cpp
@@ -32,7 +32,6 @@ namespace Myst3 {
 
 Effect::FaceMask::FaceMask() :
 		surface(nullptr) {
-
 	for (uint i = 0; i < 10; i++) {
 		for (uint j = 0; j < 10; j++) {
 			block[i][j] = false;
@@ -340,7 +339,6 @@ LavaEffect::LavaEffect(Myst3Engine *vm) :
 }
 
 LavaEffect::~LavaEffect() {
-
 }
 
 LavaEffect *LavaEffect::create(Myst3Engine *vm, uint32 id) {
@@ -682,7 +680,6 @@ ShieldEffect::ShieldEffect(Myst3Engine *vm):
 }
 
 ShieldEffect::~ShieldEffect() {
-
 }
 
 ShieldEffect *ShieldEffect::create(Myst3Engine *vm, uint32 id) {
diff --git a/engines/myst3/gfx.cpp b/engines/myst3/gfx.cpp
index 8c145e836f3..0d330f291a6 100644
--- a/engines/myst3/gfx.cpp
+++ b/engines/myst3/gfx.cpp
@@ -67,7 +67,6 @@ const float Renderer::cubeVertices[] = {
 Renderer::Renderer(OSystem *system)
 		: _system(system),
 		  _font(nullptr) {
-
 	// Compute the cube faces Axis Aligned Bounding Boxes
 	for (uint i = 0; i < ARRAYSIZE(_cubeFacesAABB); i++) {
 		for (uint j = 0; j < 4; j++) {
@@ -307,4 +306,5 @@ const Graphics::PixelFormat Texture::getRGBAPixelFormat() {
 	return Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24);
 #endif
 }
+
 } // End of namespace Myst3
diff --git a/engines/myst3/gfx.h b/engines/myst3/gfx.h
index df15e709622..73de5f40ab5 100644
--- a/engines/myst3/gfx.h
+++ b/engines/myst3/gfx.h
@@ -125,10 +125,10 @@ public:
 
 	virtual void drawRect2D(const Common::Rect &rect, uint8 a, uint8 r, uint8 g, uint8 b) = 0;
 	virtual void drawTexturedRect2D(const Common::Rect &screenRect, const Common::Rect &textureRect, Texture *texture,
-									float transparency = -1.0, bool additiveBlending = false) = 0;
+	                                float transparency = -1.0, bool additiveBlending = false) = 0;
 	virtual void drawTexturedRect3D(const Math::Vector3d &topLeft, const Math::Vector3d &bottomLeft,
-									const Math::Vector3d &topRight, const Math::Vector3d &bottomRight,
-									Texture *texture) = 0;
+	                                const Math::Vector3d &topRight, const Math::Vector3d &bottomRight,
+	                                Texture *texture) = 0;
 
 	virtual void drawCube(Texture **textures) = 0;
 	virtual void draw2DText(const Common::String &text, const Common::Point &position) = 0;
diff --git a/engines/myst3/gfx_opengl.cpp b/engines/myst3/gfx_opengl.cpp
index 2e7426627ef..208bd2e1025 100644
--- a/engines/myst3/gfx_opengl.cpp
+++ b/engines/myst3/gfx_opengl.cpp
@@ -143,8 +143,7 @@ void OpenGLRenderer::drawRect2D(const Common::Rect &rect, uint8 a, uint8 r, uint
 }
 
 void OpenGLRenderer::drawTexturedRect2D(const Common::Rect &screenRect, const Common::Rect &textureRect,
-		Texture *texture, float transparency, bool additiveBlending) {
-
+	                                Texture *texture, float transparency, bool additiveBlending) {
 	OpenGLTexture *glTexture = static_cast<OpenGLTexture *>(texture);
 
 	const float tLeft = textureRect.left / (float)glTexture->internalWidth;
@@ -272,7 +271,7 @@ void OpenGLRenderer::drawCube(Texture **textures) {
 }
 
 void OpenGLRenderer::drawTexturedRect3D(const Math::Vector3d &topLeft, const Math::Vector3d &bottomLeft,
-		const Math::Vector3d &topRight, const Math::Vector3d &bottomRight, Texture *texture) {
+	                                const Math::Vector3d &topRight, const Math::Vector3d &bottomRight, Texture *texture) {
 
 	OpenGLTexture *glTexture = static_cast<OpenGLTexture *>(texture);
 
diff --git a/engines/myst3/gfx_opengl_shaders.cpp b/engines/myst3/gfx_opengl_shaders.cpp
index d9331c62e72..58dbe7d9e77 100644
--- a/engines/myst3/gfx_opengl_shaders.cpp
+++ b/engines/myst3/gfx_opengl_shaders.cpp
@@ -201,8 +201,7 @@ void ShaderRenderer::drawRect2D(const Common::Rect &rect,  uint8 a, uint8 r, uin
 }
 
 void ShaderRenderer::drawTexturedRect2D(const Common::Rect &screenRect, const Common::Rect &textureRect,
-		Texture *texture, float transparency, bool additiveBlending) {
-
+	                                Texture *texture, float transparency, bool additiveBlending) {
 	OpenGLTexture *glTexture = static_cast<OpenGLTexture *>(texture);
 
 	const float tLeft = textureRect.left / (float)glTexture->internalWidth;
@@ -338,7 +337,7 @@ void ShaderRenderer::drawCube(Texture **textures) {
 }
 
 void ShaderRenderer::drawTexturedRect3D(const Math::Vector3d &topLeft, const Math::Vector3d &bottomLeft,
-		const Math::Vector3d &topRight, const Math::Vector3d &bottomRight, Texture *texture) {
+	                                const Math::Vector3d &topRight, const Math::Vector3d &bottomRight, Texture *texture) {
 	OpenGLTexture *glTexture = static_cast<OpenGLTexture *>(texture);
 
 	const float w = glTexture->width / (float)glTexture->internalWidth;
@@ -351,7 +350,7 @@ void ShaderRenderer::drawTexturedRect3D(const Math::Vector3d &topLeft, const Mat
 	glBindTexture(GL_TEXTURE_2D, glTexture->id);
 
 	const GLfloat vertices[] = {
-		// S   T         X                 Y                 Z
+		// S   T   X                  Y                 Z
 		   0,  0,  -topLeft.x(),      topLeft.y(),      topLeft.z(),
 		   0,  h,  -bottomLeft.x(),   bottomLeft.y(),   bottomLeft.z(),
 		   w,  0,  -topRight.x(),     topRight.y(),     topRight.z(),
diff --git a/engines/myst3/gfx_opengl_shaders.h b/engines/myst3/gfx_opengl_shaders.h
index 1c187a8f384..4326dc0cfc1 100644
--- a/engines/myst3/gfx_opengl_shaders.h
+++ b/engines/myst3/gfx_opengl_shaders.h
@@ -23,6 +23,7 @@
 #define GFX_OPENGL_SHADERS_H_
 
 #include "common/rect.h"
+
 #include "math/rect2d.h"
 
 #include "graphics/opengl/shader.h"
diff --git a/engines/myst3/gfx_opengl_texture.cpp b/engines/myst3/gfx_opengl_texture.cpp
index bae85ba2e7f..3484535ee01 100644
--- a/engines/myst3/gfx_opengl_texture.cpp
+++ b/engines/myst3/gfx_opengl_texture.cpp
@@ -88,7 +88,6 @@ OpenGLTexture::OpenGLTexture(const Graphics::Surface *surface) {
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
 
 	update(surface);
-
 }
 
 OpenGLTexture::~OpenGLTexture() {
diff --git a/engines/myst3/gfx_tinygl.cpp b/engines/myst3/gfx_tinygl.cpp
index b542ce4be14..4d1543da251 100644
--- a/engines/myst3/gfx_tinygl.cpp
+++ b/engines/myst3/gfx_tinygl.cpp
@@ -55,7 +55,6 @@ Texture *TinyGLRenderer::createTexture3D(const Graphics::Surface *surface) {
 	return new TinyGLTexture3D(surface);
 }
 
-
 void TinyGLRenderer::init() {
 	debug("Initializing Software 3D Renderer");
 
@@ -147,7 +146,7 @@ void TinyGLRenderer::drawRect2D(const Common::Rect &rect, uint8 a, uint8 r, uint
 }
 
 void TinyGLRenderer::drawTexturedRect2D(const Common::Rect &screenRect, const Common::Rect &textureRect,
-		Texture *texture, float transparency, bool additiveBlending) {
+	                                Texture *texture, float transparency, bool additiveBlending) {
 	TinyGLTexture2D *glTexture = static_cast<TinyGLTexture2D *>(texture);
 
 	const float sLeft = screenRect.left;
@@ -239,8 +238,7 @@ void TinyGLRenderer::drawCube(Texture **textures) {
 }
 
 void TinyGLRenderer::drawTexturedRect3D(const Math::Vector3d &topLeft, const Math::Vector3d &bottomLeft,
-		const Math::Vector3d &topRight, const Math::Vector3d &bottomRight, Texture *texture) {
-
+	                                const Math::Vector3d &topRight, const Math::Vector3d &bottomRight, Texture *texture) {
 	TinyGLTexture3D *glTexture = static_cast<TinyGLTexture3D *>(texture);
 
 	tglBlendFunc(TGL_SRC_ALPHA, TGL_ONE_MINUS_SRC_ALPHA);
diff --git a/engines/myst3/gfx_tinygl_texture.cpp b/engines/myst3/gfx_tinygl_texture.cpp
index ee454ef5f3d..273ed8999bd 100644
--- a/engines/myst3/gfx_tinygl_texture.cpp
+++ b/engines/myst3/gfx_tinygl_texture.cpp
@@ -85,7 +85,7 @@ TinyGLTexture3D::~TinyGLTexture3D() {
 void TinyGLTexture3D::update(const Graphics::Surface *surface) {
 	tglBindTexture(TGL_TEXTURE_2D, id);
 	tglTexImage2D(TGL_TEXTURE_2D, 0, internalFormat, width, height, 0,
-			internalFormat, sourceFormat, const_cast<void *>(surface->getPixels())); // TESTME: Not sure if it works.
+	              internalFormat, sourceFormat, const_cast<void *>(surface->getPixels())); // TESTME: Not sure if it works.
 }
 
 void TinyGLTexture3D::updatePartial(const Graphics::Surface *surface, const Common::Rect &rect) {
diff --git a/engines/myst3/hotspot.cpp b/engines/myst3/hotspot.cpp
index 7a329ca5ba1..15e1e4ec880 100644
--- a/engines/myst3/hotspot.cpp
+++ b/engines/myst3/hotspot.cpp
@@ -31,8 +31,8 @@
 namespace Myst3 {
 
 static void polarRectTo3dRect(const PolarRect &polarRect,
-							  Math::Vector3d &topLeft, Math::Vector3d &topRight,
-							  Math::Vector3d &bottomLeft, Math::Vector3d &bottomRight) {
+	                      Math::Vector3d &topLeft, Math::Vector3d &topRight,
+	                      Math::Vector3d &bottomLeft, Math::Vector3d &bottomRight) {
 	static const float scale = 50.0;
 
 	Math::Vector3d direction = Scene::directionToVector(polarRect.centerPitch, 90.0 - polarRect.centerHeading) * scale;
@@ -53,7 +53,7 @@ static void polarRectTo3dRect(const PolarRect &polarRect,
 }
 
 bool static rayIntersectsRect(const Math::Ray &ray, const Math::Vector3d &topLeft, const Math::Vector3d &topRight,
-							  const Math::Vector3d &bottomLeft, const Math::Vector3d &bottomRight) {
+	                      const Math::Vector3d &bottomLeft, const Math::Vector3d &bottomRight) {
 	// Orthogonal basis in rectangle coordinates
 	Math::Vector3d topRectDir = topRight - topLeft;
 	Math::Vector3d leftRectDir = bottomLeft - topLeft;
diff --git a/engines/myst3/hotspot.h b/engines/myst3/hotspot.h
index 4d16f02ca80..86c6e67568f 100644
--- a/engines/myst3/hotspot.h
+++ b/engines/myst3/hotspot.h
@@ -64,7 +64,6 @@ private:
 	int32 isZipDestinationAvailable(GameState *state);
 };
 
-
 } // End of namespace Myst3
 
 #endif // HOTSPOT_H_
diff --git a/engines/myst3/inventory.cpp b/engines/myst3/inventory.cpp
index 6945bd7411a..15933c6cea5 100644
--- a/engines/myst3/inventory.cpp
+++ b/engines/myst3/inventory.cpp
@@ -20,7 +20,6 @@
  */
 
 #include "engines/myst3/inventory.h"
-
 #include "engines/myst3/cursor.h"
 #include "engines/myst3/database.h"
 #include "engines/myst3/scene.h"
diff --git a/engines/myst3/menu.cpp b/engines/myst3/menu.cpp
index 3a934798281..958cc816b38 100644
--- a/engines/myst3/menu.cpp
+++ b/engines/myst3/menu.cpp
@@ -354,12 +354,12 @@ uint Menu::dialogIdFromType(DialogType type) {
 		uint id;
 		uint idXbox;
 	} mapping[] = {
-			{ kConfirmNewGame,        1080, 1010 },
-			{ kConfirmLoadGame,       1060, 1003 },
-			{ kConfirmOverwrite,      1040, 1004 },
-			{ kConfirmEraseSavedGame, 1020, 0 },
-			{ kErrorEraseSavedGame,   1050, 0 },
-			{ kConfirmQuit,           1070, 0 }
+		{ kConfirmNewGame,        1080, 1010 },
+		{ kConfirmLoadGame,       1060, 1003 },
+		{ kConfirmOverwrite,      1040, 1004 },
+		{ kConfirmEraseSavedGame, 1020, 0 },
+		{ kErrorEraseSavedGame,   1050, 0 },
+		{ kConfirmQuit,           1070, 0 }
 	};
 
 	uint id = 0;
diff --git a/engines/myst3/metaengine.cpp b/engines/myst3/metaengine.cpp
index 27f9c59fee9..32511a5677d 100644
--- a/engines/myst3/metaengine.cpp
+++ b/engines/myst3/metaengine.cpp
@@ -39,14 +39,13 @@ public:
 	}
 
 	bool hasFeature(MetaEngineFeature f) const override {
-		return
-			(f == kSupportsListSaves) ||
-			(f == kSupportsDeleteSave) ||
-			(f == kSupportsLoadingDuringStartup) ||
-			(f == kSavesSupportMetaInfo) ||
-			(f == kSavesSupportThumbnail) ||
-			(f == kSavesSupportCreationDate) ||
-			(f == kSavesSupportPlayTime);
+		return  (f == kSupportsListSaves) ||
+		        (f == kSupportsDeleteSave) ||
+		        (f == kSupportsLoadingDuringStartup) ||
+		        (f == kSavesSupportMetaInfo) ||
+		        (f == kSavesSupportThumbnail) ||
+		        (f == kSavesSupportCreationDate) ||
+		        (f == kSavesSupportPlayTime);
 	}
 
 	SaveStateList listSaves(const char *target) const override {
diff --git a/engines/myst3/movie.cpp b/engines/myst3/movie.cpp
index 59924afbd84..78d6d8af6a3 100644
--- a/engines/myst3/movie.cpp
+++ b/engines/myst3/movie.cpp
@@ -77,8 +77,7 @@ Movie::Movie(Myst3Engine *vm, uint16 id) :
 	_bink.setSoundType(Audio::Mixer::kSFXSoundType);
 	_bink.loadStream(binkStream);
 
-	if (binkDesc.getType() == Archive::kMultitrackMovie
-			|| binkDesc.getType() == Archive::kDialogMovie) {
+	if (binkDesc.getType() == Archive::kMultitrackMovie || binkDesc.getType() == Archive::kDialogMovie) {
 		uint language = ConfMan.getInt("audio_language");
 		_bink.setAudioTrack(language);
 	}
@@ -367,7 +366,6 @@ void ScriptedMovie::update() {
 					_vm->_state->setVar(_condition & 0x7FF, 0);
 				}
 			}
-
 		}
 	}
 }
diff --git a/engines/myst3/myst3.cpp b/engines/myst3/myst3.cpp
index 6c98e1009d7..bbb5e235179 100644
--- a/engines/myst3/myst3.cpp
+++ b/engines/myst3/myst3.cpp
@@ -130,22 +130,21 @@ bool Myst3Engine::hasFeature(EngineFeature f) const {
 	Graphics::RendererType desiredRendererType = Graphics::Renderer::parseTypeCode(rendererConfig);
 	Graphics::RendererType matchingRendererType = Graphics::Renderer::getBestMatchingAvailableType(desiredRendererType,
 #if defined(USE_OPENGL_GAME)
-			Graphics::kRendererTypeOpenGL |
+	                Graphics::kRendererTypeOpenGL |
 #endif
 #if defined(USE_OPENGL_SHADERS)
-			Graphics::kRendererTypeOpenGLShaders |
+	                Graphics::kRendererTypeOpenGLShaders |
 #endif
 #if defined(USE_TINYGL)
-			Graphics::kRendererTypeTinyGL |
+	                Graphics::kRendererTypeTinyGL |
 #endif
-			0);
+	                0);
 	bool softRenderer = matchingRendererType == Graphics::kRendererTypeTinyGL;
 
-	return
-		(f == kSupportsReturnToLauncher) ||
-		(f == kSupportsLoadingDuringRuntime) ||
-		(f == kSupportsSavingDuringRuntime) ||
-		(f == kSupportsArbitraryResolutions && !softRenderer);
+	return (f == kSupportsReturnToLauncher) ||
+	       (f == kSupportsLoadingDuringRuntime) ||
+	       (f == kSupportsSavingDuringRuntime) ||
+	       (f == kSupportsArbitraryResolutions && !softRenderer);
 }
 
 Common::Error Myst3Engine::run() {
@@ -183,7 +182,6 @@ Common::Error Myst3Engine::run() {
 	_cursor = new Cursor(this);
 	_inventory = new Inventory(this);
 
-
 	// Init the font
 	Graphics::Surface *font = loadTexture(1206);
 	_gfx->initFont(font);
@@ -1319,7 +1317,7 @@ void Myst3Engine::loadNodeSubtitles(uint32 id) {
 }
 
 ResourceDescription Myst3Engine::getFileDescription(const Common::String &room, uint32 index, uint16 face,
-													Archive::ResourceType type) {
+	                                            Archive::ResourceType type) {
 	Common::String archiveRoom = room;
 	if (archiveRoom == "") {
 		archiveRoom = _db->getRoomName(_state->getLocationRoom(), _state->getLocationAge());
@@ -1342,7 +1340,7 @@ ResourceDescription Myst3Engine::getFileDescription(const Common::String &room,
 }
 
 ResourceDescriptionArray Myst3Engine::listFilesMatching(const Common::String &room, uint32 index, uint16 face,
-													 Archive::ResourceType type) {
+	                                                Archive::ResourceType type) {
 	Common::String archiveRoom = room;
 	if (archiveRoom == "") {
 		archiveRoom = _db->getRoomName(_state->getLocationRoom(), _state->getLocationAge());
@@ -1662,8 +1660,7 @@ void Myst3Engine::animateDirectionChange(float targetPitch, float targetHeading,
 			if (numTicks >= 15) {
 				// Fast then slow movement
 				if (elapsedTicks > numTicks / 2.0f)
-					step = 1.0f - (numTicks - elapsedTicks) * (numTicks - elapsedTicks)
-								/ (numTicks / 2.0f * numTicks / 2.0f) / 2.0f;
+					step = 1.0f - (numTicks - elapsedTicks) * (numTicks - elapsedTicks) / (numTicks / 2.0f * numTicks / 2.0f) / 2.0f;
 				else
 					step = elapsedTicks * elapsedTicks / (numTicks / 2.0f * numTicks / 2.0f) / 2.0f;
 
@@ -1763,8 +1760,8 @@ void Myst3Engine::playMovieFullFrame(uint16 movie) {
 
 bool Myst3Engine::inputValidatePressed() {
 	return _inputEnterPressed ||
-			_inputSpacePressed ||
-			getEventManager()->getButtonState() & Common::EventManager::LBUTTON;
+	       _inputSpacePressed ||
+	       getEventManager()->getButtonState() & Common::EventManager::LBUTTON;
 }
 
 bool Myst3Engine::inputEscapePressed() {
@@ -1780,7 +1777,7 @@ bool Myst3Engine::inputTilePressed() {
 }
 
 void Myst3Engine::addSunSpot(uint16 pitch, uint16 heading, uint16 intensity,
-		uint16 color, uint16 var, bool varControlledIntensity, uint16 radius) {
+	                     uint16 color, uint16 var, bool varControlledIntensity, uint16 radius) {
 
 	SunSpot *s = new SunSpot();
 
@@ -1788,11 +1785,11 @@ void Myst3Engine::addSunSpot(uint16 pitch, uint16 heading, uint16 intensity,
 	s->heading = heading;
 	s->intensity = intensity * 2.55;
 	s->color = (color & 0xF) | 16
-			* ((color & 0xF) | 16
-			* (((color >> 4) & 0xF) | 16
-			* (((color >> 4) & 0xF) | 16
-			* (((color >> 8) & 0xF) | 16
-			* (((color >> 8) & 0xF))))));
+	           * ((color & 0xF) | 16
+	           * (((color >> 4) & 0xF) | 16
+	           * (((color >> 4) & 0xF) | 16
+	           * (((color >> 8) & 0xF) | 16
+	           * (((color >> 8) & 0xF))))));
 	s->var = var;
 	s->variableIntensity = varControlledIntensity;
 	s->radius = radius;
diff --git a/engines/myst3/myst3.h b/engines/myst3/myst3.h
index 03960e0a731..df69e923be3 100644
--- a/engines/myst3/myst3.h
+++ b/engines/myst3/myst3.h
@@ -126,9 +126,9 @@ public:
 	Common::Error saveGameState(const Common::String &desc, const Graphics::Surface *thumbnail, bool isAutosave);
 
 	ResourceDescription getFileDescription(const Common::String &room, uint32 index, uint16 face,
-	                                            Archive::ResourceType type);
+	                                       Archive::ResourceType type);
 	ResourceDescriptionArray listFilesMatching(const Common::String &room, uint32 index, uint16 face,
-	                                        Archive::ResourceType type);
+	                                       Archive::ResourceType type);
 
 	Graphics::Surface *loadTexture(uint16 id);
 	static Graphics::Surface *decodeJpeg(const ResourceDescription *jpegDesc);
diff --git a/engines/myst3/node.cpp b/engines/myst3/node.cpp
index ad8f7042d42..577f47c47e1 100644
--- a/engines/myst3/node.cpp
+++ b/engines/myst3/node.cpp
@@ -178,10 +178,7 @@ void Node::loadSpotItem(uint16 id, int16 condition, bool fade) {
 			const ResourceDescription &image = spotItemImages[j];
 			ResourceDescription::SpotItemData spotItemData = image.getSpotItemData();
 
-			SpotItemFace *spotItemFace = new SpotItemFace(
-					_faces[i],
-					spotItemData.u,
-					spotItemData.v);
+			SpotItemFace *spotItemFace = new SpotItemFace(_faces[i], spotItemData.u, spotItemData.v);
 
 			spotItemFace->loadData(&image);
 
@@ -412,8 +409,7 @@ void SpotItemFace::initNotDrawn(uint16 width, uint16 height) {
 	_notDrawnBitmap->create(width, height, Texture::getRGBAPixelFormat());
 
 	for (uint i = 0; i < height; i++) {
-		memcpy(_notDrawnBitmap->getBasePtr(0, i),
-				_face->_bitmap->getBasePtr(_posX, _posY + i), width * 4);
+		memcpy(_notDrawnBitmap->getBasePtr(0, i), _face->_bitmap->getBasePtr(_posX, _posY + i), width * 4);
 	}
 }
 
@@ -427,9 +423,7 @@ Common::Rect SpotItemFace::getFaceRect() const {
 
 void SpotItemFace::draw() {
 	for (int i = 0; i < _bitmap->h; i++) {
-		memcpy(_face->_bitmap->getBasePtr(_posX, _posY + i),
-				_bitmap->getBasePtr(0, i),
-				_bitmap->w * 4);
+		memcpy(_face->_bitmap->getBasePtr(_posX, _posY + i), _bitmap->getBasePtr(0, i), _bitmap->w * 4);
 	}
 
 	_drawn = true;
@@ -438,9 +432,7 @@ void SpotItemFace::draw() {
 
 void SpotItemFace::undraw() {
 	for (int i = 0; i < _notDrawnBitmap->h; i++) {
-		memcpy(_face->_bitmap->getBasePtr(_posX, _posY + i),
-				_notDrawnBitmap->getBasePtr(0, i),
-				_notDrawnBitmap->w * 4);
+		memcpy(_face->_bitmap->getBasePtr(_posX, _posY + i), _notDrawnBitmap->getBasePtr(0, i), _notDrawnBitmap->w * 4);
 	}
 
 	_drawn = false;
diff --git a/engines/myst3/puzzles.cpp b/engines/myst3/puzzles.cpp
index 30e25d3fef3..5008f2bb9be 100644
--- a/engines/myst3/puzzles.cpp
+++ b/engines/myst3/puzzles.cpp
@@ -187,7 +187,7 @@ void Puzzles::leversBall(int16 var) {
 		NewPosition p[2];
 	};
 
-	static const Move moves[] =	{
+	static const Move moves[] = {
 		{   0,   1,   2, { { 1,   1,   2, 127, 147,   0,   0 }, { 0,   0,   0, 703, 735,   0,   0 } } },
 		{   0,   0,   4, { { 1,   0,   4,  43,  63,   0,   0 }, { 0,   1,   4,  64,  84,   0,   0 } } },
 		{   0,   0,   1, { { 1,   0,   1,  85, 105,   0,   0 }, { 0,   1,   1,  22,  42,   0,   0 } } },
@@ -218,9 +218,7 @@ void Puzzles::leversBall(int16 var) {
 
 	const Move *move = nullptr;
 	for (uint i = _vm->_state->getBallDoorOpen() ? 0 : 1; i < ARRAYSIZE(moves); i++)
-		if (moves[i].oldBallPosition == oldPosition
-				&& moves[i].oldLeft == oldLeverLeft
-				&& moves[i].oldRight == oldLeverRight) {
+		if (moves[i].oldBallPosition == oldPosition && moves[i].oldLeft == oldLeverLeft && moves[i].oldRight == oldLeverRight) {
 			move = &moves[i];
 			break;
 		}
@@ -230,8 +228,7 @@ void Puzzles::leversBall(int16 var) {
 
 	const NewPosition *position = nullptr;
 	for (uint i = 0; i < ARRAYSIZE(move->p); i++)
-		if (move->p[i].newLeft == newLeverLeft
-				&& move->p[i].newRight == newLeverRight) {
+		if (move->p[i].newLeft == newLeverLeft && move->p[i].newRight == newLeverRight) {
 			position = &move->p[i];
 			break;
 		}
@@ -332,8 +329,8 @@ void Puzzles::tesla(int16 movie, int16 var, int16 move) {
 	_vm->_state->setVar(var, absPosition);
 
 	bool puzzleSolved = _vm->_state->getTeslaTopAligned() == 1
-			&& _vm->_state->getTeslaMiddleAligned() == 1
-			&& _vm->_state->getTeslaBottomAligned() == 1;
+	                 && _vm->_state->getTeslaMiddleAligned() == 1
+	                 && _vm->_state->getTeslaBottomAligned() == 1;
 
 	_vm->_state->setTeslaAllAligned(puzzleSolved);
 }
@@ -1151,9 +1148,7 @@ void Puzzles::journalSaavedro(int16 move) {
 			leftBitmap->create(bitmap->w / 2, bitmap->h, Texture::getRGBAPixelFormat());
 
 			for (int i = 0; i < bitmap->h; i++) {
-				memcpy(leftBitmap->getBasePtr(0, i),
-						bitmap->getBasePtr(0, i),
-						leftBitmap->w * 4);
+				memcpy(leftBitmap->getBasePtr(0, i), bitmap->getBasePtr(0, i), leftBitmap->w * 4);
 			}
 
 			bitmap->free();
diff --git a/engines/myst3/script.cpp b/engines/myst3/script.cpp
index 854be4b3ed3..98366844fe8 100644
--- a/engines/myst3/script.cpp
+++ b/engines/myst3/script.cpp
@@ -279,7 +279,7 @@ Script::Script(Myst3Engine *vm):
 		// The Xbox version inserted two new opcodes, one at position
 		// 27, the other at position 77, shifting all the other opcodes
 		shiftCommands(77, 1);
-		OP(77, varDecrementMinLooping,	              "vii"   );
+		OP(77, varDecrementMinLooping,                "vii"   );
 
 		shiftCommands(27, 1);
 		OP(27, movieInitCondScriptedPosition,         "ecvv"  );
@@ -365,8 +365,7 @@ const Common::String Script::describeCommand(uint16 op) {
 const Common::String Script::describeOpcode(const Opcode &opcode) {
 	const Script::Command &cmd = findCommand(opcode.op);
 
-	Common::String d = Common::String::format("    op %s ( ",
-			describeCommand(opcode.op).c_str());
+	Common::String d = Common::String::format("    op %s ( ", describeCommand(opcode.op).c_str());
 
 	for(uint k = 0; k < opcode.args.size(); k++) {
 		if (cmd.op != 0 && k < strlen(cmd.signature))
@@ -423,8 +422,7 @@ void Script::nodeCubeInit(Context &c, const Opcode &cmd) {
 }
 
 void Script::nodeCubeInitIndex(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Node cube init indexed %d",
-			cmd.op, cmd.args[0]);
+	debugC(kDebugScript, "Opcode %d: Node cube init indexed %d", cmd.op, cmd.args[0]);
 
 	uint16 var = _vm->_state->getVar(cmd.args[0]);
 
@@ -445,8 +443,7 @@ void Script::nodeFrameInit(Context &c, const Opcode &cmd) {
 }
 
 void Script::nodeFrameInitCond(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Node frame init condition %d ? %d : %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	debugC(kDebugScript, "Opcode %d: Node frame init condition %d ? %d : %d", cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	uint16 value;
 	if (_vm->_state->evaluate(cmd.args[0]))
@@ -459,8 +456,7 @@ void Script::nodeFrameInitCond(Context &c, const Opcode &cmd) {
 }
 
 void Script::nodeFrameInitIndex(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Node frame init indexed %d",
-			cmd.op, cmd.args[0]);
+	debugC(kDebugScript, "Opcode %d: Node frame init indexed %d", cmd.op, cmd.args[0]);
 
 	uint16 var = _vm->_state->getVar(cmd.args[0]);
 
@@ -563,8 +559,7 @@ void Script::movieInitCondPreload(Context &c, const Opcode &cmd) {
 }
 
 void Script::movieInitFrameVar(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Init movie %d with next frame var %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	debugC(kDebugScript, "Opcode %d: Init movie %d with next frame var %d", cmd.op, cmd.args[0], cmd.args[1]);
 
 	_vm->_state->setMovieScriptDriven(true);
 	_vm->_state->setMovieNextFrameGetVar(cmd.args[1]);
@@ -581,7 +576,7 @@ void Script::movieInitFrameVar(Context &c, const Opcode &cmd) {
 
 void Script::movieInitFrameVarPreload(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Preload movie %d with next frame var %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	_vm->_state->setMoviePreloadToMemory(true);
 	_vm->_state->setMovieScriptDriven(true);
@@ -599,7 +594,7 @@ void Script::movieInitFrameVarPreload(Context &c, const Opcode &cmd) {
 
 void Script::movieInitOverridePosition(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Preload movie %d with condition %d and position U %d V %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	_vm->_state->setMoviePreloadToMemory(true);
 	_vm->_state->setMovieScriptDriven(true);
@@ -613,7 +608,7 @@ void Script::movieInitOverridePosition(Context &c, const Opcode &cmd) {
 
 void Script::movieInitScriptedPosition(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Preload movie %d with position U-var %d V-var %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	_vm->_state->setMoviePreloadToMemory(true);
 	_vm->_state->setMovieScriptDriven(true);
@@ -626,7 +621,7 @@ void Script::movieInitScriptedPosition(Context &c, const Opcode &cmd) {
 
 void Script::movieInitCondScriptedPosition(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Preload movie %d with condition %d, position U-var %d V-var %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	_vm->_state->setMoviePreloadToMemory(true);
 	_vm->_state->setMovieScriptDriven(true);
@@ -638,16 +633,14 @@ void Script::movieInitCondScriptedPosition(Context &c, const Opcode &cmd) {
 }
 
 void Script::movieRemove(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Remove movie %d ",
-			cmd.op, cmd.args[0]);
+	debugC(kDebugScript, "Opcode %d: Remove movie %d ", cmd.op, cmd.args[0]);
 
 	uint16 movieid = _vm->_state->valueOrVarValue(cmd.args[0]);
 	_vm->removeMovie(movieid);
 }
 
 void Script::movieRemoveAll(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Remove all movies",
-			cmd.op);
+	debugC(kDebugScript, "Opcode %d: Remove all movies", cmd.op);
 
 	_vm->removeMovie(0);
 }
@@ -660,29 +653,26 @@ void Script::movieSetLooping(Context &c, const Opcode &cmd) {
 }
 
 void Script::movieSetNotLooping(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Set movie %d not to loop",
-			cmd.op, cmd.args[0]);
+	debugC(kDebugScript, "Opcode %d: Set movie %d not to loop", cmd.op, cmd.args[0]);
 
 	_vm->setMovieLooping(cmd.args[0], false);
 }
 
 void Script::waterEffectSetSpeed(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Set water effect speed to %d",
-			cmd.op, cmd.args[0]);
+	debugC(kDebugScript, "Opcode %d: Set water effect speed to %d", cmd.op, cmd.args[0]);
 
 	_vm->_state->setWaterEffectSpeed(cmd.args[0]);
 }
 
 void Script::waterEffectSetAttenuation(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Set water effect attenuation to %d",
-			cmd.op, cmd.args[0]);
+	debugC(kDebugScript, "Opcode %d: Set water effect attenuation to %d", cmd.op, cmd.args[0]);
 
 	_vm->_state->setWaterEffectAttenuation(cmd.args[0]);
 }
 
 void Script::waterEffectSetWave(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Set water effect frequency to %d and amplitude to %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	_vm->_state->setWaterEffectFrequency(cmd.args[0]);
 	_vm->_state->setWaterEffectAmpl(cmd.args[1]);
@@ -690,7 +680,7 @@ void Script::waterEffectSetWave(Context &c, const Opcode &cmd) {
 
 void Script::shakeEffectSet(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Set shake effect amplitude to %d and period to %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	uint16 ampl = _vm->_state->valueOrVarValue(cmd.args[0]);
 	uint16 period = _vm->_state->valueOrVarValue(cmd.args[1]);
@@ -917,7 +907,7 @@ void Script::varRandRange(Context &c, const Opcode &cmd) {
 	_vm->_state->setVar(cmd.args[0], value);
 }
 
-void Script::polarToRectSimple(Context &c, const Opcode &cmd)	{
+void Script::polarToRectSimple(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Polar to rect transformation for angle in var %d", cmd.op, cmd.args[5]);
 
 	int32 angleDeg = _vm->_state->getVar(cmd.args[5]);
@@ -941,7 +931,7 @@ void Script::polarToRectSimple(Context &c, const Opcode &cmd)	{
 	_vm->_state->setVar(cmd.args[1], posY);
 }
 
-void Script::polarToRect(Context &c, const Opcode &cmd)	{
+void Script::polarToRect(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Complex polar to rect transformation for angle in var %d", cmd.op, cmd.args[8]);
 
 	int32 angleDeg = _vm->_state->getVar(cmd.args[8]);
@@ -1066,7 +1056,7 @@ void Script::varIncrement(Context &c, const Opcode &cmd) {
 
 void Script::varIncrementMax(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Increment var %d with max value %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	int32 value = _vm->_state->getVar(cmd.args[0]);
 
@@ -1080,7 +1070,7 @@ void Script::varIncrementMax(Context &c, const Opcode &cmd) {
 
 void Script::varIncrementMaxLooping(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Increment var %d in range [%d, %d]",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	int32 value = _vm->_state->getVar(cmd.args[0]);
 
@@ -1094,7 +1084,7 @@ void Script::varIncrementMaxLooping(Context &c, const Opcode &cmd) {
 
 void Script::varAddValueMaxLooping(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Add %d to var %d in range [%d, %d]",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	int32 value = _vm->_state->getVar(cmd.args[1]);
 
@@ -1118,7 +1108,7 @@ void Script::varDecrement(Context &c, const Opcode &cmd) {
 
 void Script::varDecrementMin(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Decrement var %d with min value %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	int32 value = _vm->_state->getVar(cmd.args[0]);
 
@@ -1132,7 +1122,7 @@ void Script::varDecrementMin(Context &c, const Opcode &cmd) {
 
 void Script::varDecrementMinLooping(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Decrement var %d in range [%d, %d]",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	int32 value = _vm->_state->getVar(cmd.args[0]);
 
@@ -1146,7 +1136,7 @@ void Script::varDecrementMinLooping(Context &c, const Opcode &cmd) {
 
 void Script::varAddValueMax(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Add value %d to var %d with max value %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	int32 value = _vm->_state->getVar(cmd.args[1]);
 
@@ -1160,7 +1150,7 @@ void Script::varAddValueMax(Context &c, const Opcode &cmd) {
 
 void Script::varSubValueMin(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Substract value %d from var %d with min value %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	int32 value = _vm->_state->getVar(cmd.args[1]);
 
@@ -1184,7 +1174,7 @@ void Script::varZeroRange(Context &c, const Opcode &cmd) {
 
 void Script::varCopyRange(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Copy vars from %d to %d, length: %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	if (cmd.args[2] <= 0)
 		return;
@@ -1195,7 +1185,7 @@ void Script::varCopyRange(Context &c, const Opcode &cmd) {
 
 void Script::varSetRange(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Set vars from %d to %d to val %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	if (cmd.args[0] > cmd.args[1])
 		error("Opcode %d, Incorrect range, %d -> %d", cmd.op, cmd.args[0], cmd.args[1]);
@@ -1227,7 +1217,7 @@ void Script::varAddValue(Context &c, const Opcode &cmd) {
 
 void Script::varArrayAddValue(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Add value %d to array base var %d item var %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	int32 value = _vm->_state->getVar(cmd.args[1] + _vm->_state->getVar(cmd.args[2]));
 	value += cmd.args[0];
@@ -1300,7 +1290,7 @@ void Script::varDivVarValue(Context &c, const Opcode &cmd) {
 
 void Script::varCrossMultiplication(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Cross multiply var %d from range %d %d to range %d %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
 
 	int32 value = _vm->_state->getVar(cmd.args[0]);
 
@@ -1371,7 +1361,7 @@ void Script::varAbsoluteSubVar(Context &c, const Opcode &cmd) {
 
 void Script::varRatioToPercents(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Convert var %d to percents (max value %d, tare weight %d)",
-			cmd.op, cmd.args[0], cmd.args[2], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[2], cmd.args[1]);
 
 	int32 value = _vm->_state->getVar(cmd.args[0]);
 
@@ -1384,7 +1374,7 @@ void Script::varRatioToPercents(Context &c, const Opcode &cmd) {
 
 void Script::varRotateValue3(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Var take next value, var %d values %d %d %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	int32 value = _vm->_state->getVar(cmd.args[0]);
 
@@ -1437,8 +1427,7 @@ void Script::ifCond1AndCond2(Context &c, const Opcode &cmd) {
 void Script::ifCond1OrCond2(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If cond %d or cond %d", cmd.op, cmd.args[0], cmd.args[1]);
 
-	if (_vm->_state->evaluate(cmd.args[0])
-			|| _vm->_state->evaluate(cmd.args[1]))
+	if (_vm->_state->evaluate(cmd.args[0]) || _vm->_state->evaluate(cmd.args[1]))
 		return;
 
 	goToElse(c);
@@ -1446,7 +1435,7 @@ void Script::ifCond1OrCond2(Context &c, const Opcode &cmd) {
 
 void Script::ifOneVarSetInRange(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If one var set int range %d %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	uint16 var = cmd.args[0];
 	uint16 end = cmd.args[1];
@@ -1525,7 +1514,7 @@ void Script::ifVarInfEqValue(Context &c, const Opcode &cmd) {
 
 void Script::ifVarInRange(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If var %d in range %d %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	int32 value = _vm->_state->getVar(cmd.args[0]);
 	if(value >= cmd.args[1] && value <= cmd.args[2])
@@ -1536,7 +1525,7 @@ void Script::ifVarInRange(Context &c, const Opcode &cmd) {
 
 void Script::ifVarNotInRange(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If var %d not in range %d %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	int32 value = _vm->_state->getVar(cmd.args[0]);
 	if(value < cmd.args[1] || value > cmd.args[2])
@@ -1574,7 +1563,7 @@ void Script::ifVar1InfEqVar2(Context &c, const Opcode &cmd) {
 
 void Script::ifVarHasAllBitsSet(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If var %d & val %d == val %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[1]);
 
 	if ((_vm->_state->getVar(cmd.args[0]) & cmd.args[1]) == cmd.args[1])
 		return;
@@ -1584,7 +1573,7 @@ void Script::ifVarHasAllBitsSet(Context &c, const Opcode &cmd) {
 
 void Script::ifVarHasNoBitsSet(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If var %d & val %d == 0",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	if ((_vm->_state->getVar(cmd.args[0]) & cmd.args[1]) == 0)
 		return;
@@ -1594,7 +1583,7 @@ void Script::ifVarHasNoBitsSet(Context &c, const Opcode &cmd) {
 
 void Script::ifVarHasSomeBitsSet(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If var %d & val %d == val %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	if ((_vm->_state->getVar(cmd.args[0]) & cmd.args[1]) == cmd.args[2])
 		return;
@@ -1604,7 +1593,7 @@ void Script::ifVarHasSomeBitsSet(Context &c, const Opcode &cmd) {
 
 void Script::ifHeadingInRange(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If heading in range %d -> %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	float heading = _vm->_state->getLookAtHeading();
 
@@ -1625,7 +1614,7 @@ void Script::ifHeadingInRange(Context &c, const Opcode &cmd) {
 
 void Script::ifPitchInRange(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If pitch in range %d -> %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	float pitch = _vm->_state->getLookAtPitch();
 
@@ -1638,7 +1627,7 @@ void Script::ifPitchInRange(Context &c, const Opcode &cmd) {
 
 void Script::ifHeadingPitchInRect(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If heading in range %d -> %d",
-			cmd.op, cmd.args[0], cmd.args[1]);
+	       cmd.op, cmd.args[0], cmd.args[1]);
 
 	float heading = _vm->_state->getLookAtHeading();
 	float pitch = _vm->_state->getLookAtPitch();
@@ -1664,7 +1653,7 @@ void Script::ifHeadingPitchInRect(Context &c, const Opcode &cmd) {
 
 void Script::ifMouseIsInRect(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: If mouse in rect l%d t%d w%d h%d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	Common::Rect r = Common::Rect(cmd.args[2], cmd.args[3]);
 	r.translate(cmd.args[0], cmd.args[1]);
@@ -1836,7 +1825,8 @@ void Script::leverDragPositions(Context &c, const Opcode &cmd) {
 }
 
 void Script::leverDragXY(Context &c, const Opcode &cmd) {
-	debugC(kDebugScript, "Opcode %d: Drag 2D lever and update X (var %d) and Y (var %d) coordinates, while running script %d", cmd.op, cmd.args[0], cmd.args[1], cmd.args[4]);
+	debugC(kDebugScript, "Opcode %d: Drag 2D lever and update X (var %d) and Y (var %d) coordinates, while running script %d",
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[4]);
 
 	uint16 varX = cmd.args[0];
 	uint16 varY = cmd.args[1];
@@ -2330,8 +2320,7 @@ void Script::runScriptForVarDrawTicksHelper(uint16 var, int32 startValue, int32
 		bool positiveDirection = endValue > startValue;
 
 		while (1) {
-			if ((positiveDirection && (currentValue > endValue))
-					|| (!positiveDirection && (currentValue < endValue)))
+			if ((positiveDirection && (currentValue > endValue)) || (!positiveDirection && (currentValue < endValue)))
 				break;
 
 			_vm->_state->setVar(var, currentValue);
@@ -2353,49 +2342,49 @@ void Script::runScriptForVarDrawTicksHelper(uint16 var, int32 startValue, int32
 
 void Script::runScriptForVar(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from %d to %d, run script %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	runScriptForVarDrawTicksHelper(cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], 0);
 }
 
 void Script::runScriptForVarEachXFrames(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from %d to %d, run script %d every %d frames",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
 
 	runScriptForVarDrawTicksHelper(cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
 }
 
 void Script::runScriptForVarStartVar(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from var %d value to %d, run script %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	runScriptForVarDrawTicksHelper(cmd.args[0], _vm->_state->getVar(cmd.args[1]), cmd.args[2], cmd.args[3], 0);
 }
 
 void Script::runScriptForVarStartVarEachXFrames(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from var %d value to %d, run script %d every %d frames",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
 
 	runScriptForVarDrawTicksHelper(cmd.args[0], _vm->_state->getVar(cmd.args[1]), cmd.args[2], cmd.args[3], cmd.args[4]);
 }
 
 void Script::runScriptForVarEndVar(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from %d to var %d value, run script %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	runScriptForVarDrawTicksHelper(cmd.args[0], cmd.args[1], _vm->_state->getVar(cmd.args[2]), cmd.args[3], 0);
 }
 
 void Script::runScriptForVarEndVarEachXFrames(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from var %d value to var %d value, run script %d every %d frames",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
 
 	runScriptForVarDrawTicksHelper(cmd.args[0], cmd.args[1], _vm->_state->getVar(cmd.args[2]), cmd.args[3], cmd.args[4]);
 }
 
 void Script::runScriptForVarStartEndVar(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from var %d value to var %d value, run script %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	runScriptForVarDrawTicksHelper(cmd.args[0], _vm->_state->getVar(cmd.args[1]), _vm->_state->getVar(cmd.args[2]),
 	                               cmd.args[3], 0);
@@ -2403,7 +2392,7 @@ void Script::runScriptForVarStartEndVar(Context &c, const Opcode &cmd) {
 
 void Script::runScriptForVarStartEndVarEachXFrames(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from var %d value to var %d value, run script %d every %d frames",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3], cmd.args[4]);
 
 	runScriptForVarDrawTicksHelper(cmd.args[0], _vm->_state->getVar(cmd.args[1]), _vm->_state->getVar(cmd.args[2]),
 	                               cmd.args[3], cmd.args[4]);
@@ -2411,14 +2400,14 @@ void Script::runScriptForVarStartEndVarEachXFrames(Context &c, const Opcode &cmd
 
 void Script::drawFramesForVar(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from %d to %d, every %d frames",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	runScriptForVarDrawTicksHelper(cmd.args[0], cmd.args[1], cmd.args[2], 0, -cmd.args[3]);
 }
 
 void Script::drawFramesForVarEachTwoFrames(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from %d to %d draw 2 frames",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	uint numFrames = 2 * (-1 - abs(cmd.args[2] - cmd.args[1]));
 
@@ -2427,7 +2416,7 @@ void Script::drawFramesForVarEachTwoFrames(Context &c, const Opcode &cmd) {
 
 void Script::drawFramesForVarStartEndVarEachTwoFrames(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: For var %d from var %d value to var %d value draw 2 frames",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	uint numFrames = 2 * (-1 - abs(cmd.args[2] - cmd.args[1]));
 
@@ -2562,7 +2551,7 @@ void Script::soundPlayVolume(Context &c, const Opcode &cmd) {
 
 void Script::soundPlayVolumeDirection(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Play sound %d at volume %d in direction %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
 
 	int32 volume = _vm->_state->valueOrVarValue(cmd.args[1]);
 	int32 heading = _vm->_state->valueOrVarValue(cmd.args[2]);
@@ -2571,7 +2560,7 @@ void Script::soundPlayVolumeDirection(Context &c, const Opcode &cmd) {
 
 void Script::soundPlayVolumeDirectionAtt(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Play sound %d at volume %d in direction %d with attenuation %d",
-			cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
+	       cmd.op, cmd.args[0], cmd.args[1], cmd.args[2], cmd.args[3]);
 
 	int32 volume = _vm->_state->valueOrVarValue(cmd.args[1]);
 	int32 heading = _vm->_state->valueOrVarValue(cmd.args[2]);
@@ -2774,7 +2763,7 @@ void Script::ambientSetCue4(Context &c, const Opcode &cmd) {
 
 void Script::runAmbientScriptNode(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Run ambient script for node %d",
-			cmd.op, cmd.args[0]);
+	       cmd.op, cmd.args[0]);
 
 	int32 node = _vm->_state->valueOrVarValue(cmd.args[0]);
 	_vm->runAmbientScripts(node);
@@ -2782,7 +2771,7 @@ void Script::runAmbientScriptNode(Context &c, const Opcode &cmd) {
 
 void Script::runAmbientScriptNodeRoomAge(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Run sound script for node %d, room %d, age %d",
-			cmd.op, cmd.args[2], cmd.args[1], cmd.args[0]);
+	       cmd.op, cmd.args[2], cmd.args[1], cmd.args[0]);
 
 	int32 node = _vm->_state->valueOrVarValue(cmd.args[2]);
 	_vm->_ambient->_scriptRoom = _vm->_state->valueOrVarValue(cmd.args[1]);
@@ -2794,7 +2783,7 @@ void Script::runAmbientScriptNodeRoomAge(Context &c, const Opcode &cmd) {
 
 void Script::runSoundScriptNode(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Run sound script for node %d",
-			cmd.op, cmd.args[0]);
+	       cmd.op, cmd.args[0]);
 
 	int32 node = _vm->_state->valueOrVarValue(cmd.args[0]);
 	_vm->runBackgroundSoundScriptsFromNode(node);
@@ -2802,7 +2791,7 @@ void Script::runSoundScriptNode(Context &c, const Opcode &cmd) {
 
 void Script::runSoundScriptNodeRoom(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Run sound script for node %d, room %d",
-			cmd.op, cmd.args[1], cmd.args[0]);
+	       cmd.op, cmd.args[1], cmd.args[0]);
 
 	int32 node = _vm->_state->valueOrVarValue(cmd.args[1]);
 	int32 room = _vm->_state->valueOrVarValue(cmd.args[0]);
@@ -2811,7 +2800,7 @@ void Script::runSoundScriptNodeRoom(Context &c, const Opcode &cmd) {
 
 void Script::runSoundScriptNodeRoomAge(Context &c, const Opcode &cmd) {
 	debugC(kDebugScript, "Opcode %d: Run sound script for node %d, room %d, age %d",
-			cmd.op, cmd.args[2], cmd.args[1], cmd.args[0]);
+	       cmd.op, cmd.args[2], cmd.args[1], cmd.args[0]);
 
 	int32 node = _vm->_state->valueOrVarValue(cmd.args[2]);
 	int32 room = _vm->_state->valueOrVarValue(cmd.args[1]);
diff --git a/engines/myst3/shaders/myst3_box.fragment b/engines/myst3/shaders/myst3_box.fragment
index 694626fee84..4ac3fb24131 100644
--- a/engines/myst3/shaders/myst3_box.fragment
+++ b/engines/myst3/shaders/myst3_box.fragment
@@ -6,8 +6,7 @@ uniform UBOOL textured;
 uniform vec4 color;
 uniform sampler2D tex;
 
-void main()
-{
+void main() {
 	outColor = color;
 	if (UBOOL_TEST(textured))
 		outColor = outColor * texture(tex, Texcoord);
diff --git a/engines/myst3/shaders/myst3_box.vertex b/engines/myst3/shaders/myst3_box.vertex
index 8d1a5c364fd..881115b834f 100644
--- a/engines/myst3/shaders/myst3_box.vertex
+++ b/engines/myst3/shaders/myst3_box.vertex
@@ -9,8 +9,7 @@ uniform UBOOL flipY;
 
 out vec2 Texcoord;
 
-void main()
-{
+void main() {
 	Texcoord = texOffsetXY + texcoord * texSizeWH;
 
 	// Coordinates are [0.0;1.0], transform to [-1.0; 1.0]
diff --git a/engines/myst3/shaders/myst3_cube.fragment b/engines/myst3/shaders/myst3_cube.fragment
index 6f946a6cb73..ac293f3685d 100644
--- a/engines/myst3/shaders/myst3_cube.fragment
+++ b/engines/myst3/shaders/myst3_cube.fragment
@@ -4,7 +4,6 @@ OUTPUT
 
 uniform sampler2D tex;
 
-void main()
-{
+void main() {
 	outColor = texture(tex, Texcoord);
 }
diff --git a/engines/myst3/shaders/myst3_cube.vertex b/engines/myst3/shaders/myst3_cube.vertex
index ca77038db19..7a4c3a2ee06 100644
--- a/engines/myst3/shaders/myst3_cube.vertex
+++ b/engines/myst3/shaders/myst3_cube.vertex
@@ -6,8 +6,7 @@ uniform mat4 mvpMatrix;
 
 out vec2 Texcoord;
 
-void main()
-{
+void main() {
 	Texcoord = texcoord * texScale;
 
 	gl_Position = mvpMatrix * vec4(position, 1.0);
diff --git a/engines/myst3/shaders/myst3_text.fragment b/engines/myst3/shaders/myst3_text.fragment
index 6f946a6cb73..ac293f3685d 100644
--- a/engines/myst3/shaders/myst3_text.fragment
+++ b/engines/myst3/shaders/myst3_text.fragment
@@ -4,7 +4,6 @@ OUTPUT
 
 uniform sampler2D tex;
 
-void main()
-{
+void main() {
 	outColor = texture(tex, Texcoord);
 }
diff --git a/engines/myst3/shaders/myst3_text.vertex b/engines/myst3/shaders/myst3_text.vertex
index 117ba58043d..dbb4548fd9d 100644
--- a/engines/myst3/shaders/myst3_text.vertex
+++ b/engines/myst3/shaders/myst3_text.vertex
@@ -3,8 +3,7 @@ in vec2 texcoord;
 
 out vec2 Texcoord;
 
-void main()
-{
+void main() {
 	Texcoord = texcoord;
 
 	// Coordinates are [0.0;1.0], transform to [-1.0; 1.0]
diff --git a/engines/myst3/sound.cpp b/engines/myst3/sound.cpp
index a2ffb451c4e..6f89c21b96f 100644
--- a/engines/myst3/sound.cpp
+++ b/engines/myst3/sound.cpp
@@ -65,7 +65,7 @@ void Sound::playEffectLooping(uint32 id, uint32 volume, uint16 heading, uint16 a
 }
 
 void Sound::playEffectFadeInOut(uint32 id, uint32 volume, uint16 heading, uint16 attenuation,
-		uint32 fadeInDuration, uint32 playDuration, uint32 fadeOutDuration) {
+	                        uint32 fadeInDuration, uint32 playDuration, uint32 fadeOutDuration) {
 
 	SoundChannel *channel = getChannelForSound(id, kEffect);
 	channel->play(id, fadeInDuration == 0 ? volume : 0, heading, attenuation, true, kEffect);
@@ -278,7 +278,7 @@ bool Sound::isPlaying(uint32 id) {
 }
 
 void Sound::setupNextSound(SoundNextCommand command, int16 controlVar, int16 startSoundId, int16 soundCount,
-		int32 soundMinDelay, int32 soundMaxDelay, int32 controlSoundId, int32 controlSoundMaxPosition) {
+	                   int32 soundMinDelay, int32 soundMaxDelay, int32 controlSoundId, int32 controlSoundMaxPosition) {
 
 	bool playSeveralSounds = _vm->_state->getSoundNextMultipleSounds();
 
diff --git a/engines/myst3/sound.h b/engines/myst3/sound.h
index ecd9a4eb769..2cd35052816 100644
--- a/engines/myst3/sound.h
+++ b/engines/myst3/sound.h
@@ -113,7 +113,7 @@ public:
 	void playEffect(uint32 id, uint32 volume, uint16 heading = 0, uint16 attenuation = 0);
 	void playEffectLooping(uint32 id, uint32 volume, uint16 heading = 0, uint16 attenuation = 0);
 	void playEffectFadeInOut(uint32 id, uint32 volume, uint16 heading, uint16 attenuation,
-			uint32 fadeInDuration, uint32 playDuration, uint32 fadeOutDuration);
+	                         uint32 fadeInDuration, uint32 playDuration, uint32 fadeOutDuration);
 	void stopEffect(uint32 id, uint32 fadeDuration);
 
 	void playCue(uint32 id, uint32 volume, uint16 heading, uint16 attenuation);
diff --git a/engines/myst3/state.cpp b/engines/myst3/state.cpp
index 70d6d0063ec..f9f0196ee0c 100644
--- a/engines/myst3/state.cpp
+++ b/engines/myst3/state.cpp
@@ -354,7 +354,6 @@ GameState::GameState(const Common::Platform platform, Database *database):
 		VAR(1394, LanguageText, false)
 
 		VAR(1406, ShieldEffectActive, false)
-
 	} else {
 		shiftVariables(927, 1);
 		shiftVariables(1031, 2);
@@ -394,7 +393,7 @@ GameState::~GameState() {
 }
 
 void GameState::syncFloat(Common::Serializer &s, float &val,
-		Common::Serializer::Version minVersion, Common::Serializer::Version maxVersion) {
+	                  Common::Serializer::Version minVersion, Common::Serializer::Version maxVersion) {
 	static const float precision = 10000.0;
 
 	if (s.isLoading()) {
@@ -582,8 +581,8 @@ Common::String GameState::formatSaveTime() {
 
 	// TODO: Check the Xbox NTSC version, maybe it uses that strange MM/DD/YYYY format
 	return Common::String::format("%02d/%02d/%02d %02d:%02d",
-			_data.saveDay, _data.saveMonth, _data.saveYear,
-			_data.saveHour, _data.saveMinute);
+	                              _data.saveDay, _data.saveMonth, _data.saveYear,
+	                              _data.saveHour, _data.saveMinute);
 }
 
 Common::Array<uint16> GameState::getInventory() {
@@ -708,9 +707,9 @@ const Common::String GameState::describeCondition(int16 condition) {
 	int16 value = (unsignedCond >> 11) - 1;
 
 	return Common::String::format("c[%s %s %d]",
-			describeVar(var).c_str(),
-			(condition >= 0 && value >= 0) || (condition < 0 && value < 0) ? "==" : "!=",
-			value >= 0 ? value : 0);
+	                              describeVar(var).c_str(),
+	                              (condition >= 0 && value >= 0) || (condition < 0 && value < 0) ? "==" : "!=",
+	                              value >= 0 ? value : 0);
 }
 
 void GameState::limitCubeCamera(float minPitch, float maxPitch, float minHeading, float maxHeading) {
@@ -849,4 +848,5 @@ Common::StringArray Saves::list(Common::SaveFileManager *saveFileManager, Common
 
 	return filenames;
 }
+
 } // End of namespace Myst3
diff --git a/engines/myst3/state.h b/engines/myst3/state.h
index 409c40ca1a6..9e054570674 100644
--- a/engines/myst3/state.h
+++ b/engines/myst3/state.h
@@ -424,8 +424,8 @@ private:
 	void engineSet(const Common::String &varName, int32 value);
 
 	static void syncFloat(Common::Serializer &s, float &val,
-			Common::Serializer::Version minVersion = 0,
-			Common::Serializer::Version maxVersion = Common::Serializer::kLastVersion);
+	                      Common::Serializer::Version minVersion = 0,
+	                      Common::Serializer::Version maxVersion = Common::Serializer::kLastVersion);
 
 	void updateTickCounters();
 };
diff --git a/engines/myst3/subtitles.cpp b/engines/myst3/subtitles.cpp
index 8c1e5c134d4..ae41f93a109 100644
--- a/engines/myst3/subtitles.cpp
+++ b/engines/myst3/subtitles.cpp
@@ -248,10 +248,10 @@ static Common::CodePage getEncodingFromCharsetCode(uint32 gdiCharset) {
 		uint32 charset;
 		Common::CodePage encoding;
 	} codepages[] = {
-			{ 128, Common::kWindows932            }, // SHIFTJIS_CHARSET
-			{ 177, Common::kWindows1255           }, // HEBREW_CHARSET
-			{ 204, Common::kWindows1251           }, // RUSSIAN_CHARSET
-			{ 238, Common::kMacCentralEurope }  // EASTEUROPE_CHARSET
+		{ 128, Common::kWindows932       }, // SHIFTJIS_CHARSET
+		{ 177, Common::kWindows1255      }, // HEBREW_CHARSET
+		{ 204, Common::kWindows1251      }, // RUSSIAN_CHARSET
+		{ 238, Common::kMacCentralEurope }  // EASTEUROPE_CHARSET
 	};
 
 	for (uint i = 0; i < ARRAYSIZE(codepages); i++) {
@@ -474,7 +474,8 @@ void Subtitles::setFrame(int32 frame) {
 }
 
 void Subtitles::drawOverlay() {
-	if (!_texture) return;
+	if (!_texture)
+		return;
 
 	Common::Rect screen = _vm->_gfx->viewport();
 	Common::Rect bottomBorder = Common::Rect(Renderer::kOriginalWidth, _surfaceHeight);
diff --git a/engines/myst3/transition.cpp b/engines/myst3/transition.cpp
index 1496263762c..b1509ce878f 100644
--- a/engines/myst3/transition.cpp
+++ b/engines/myst3/transition.cpp
@@ -60,8 +60,7 @@ int Transition::computeDuration() {
 
 void Transition::playSound() {
 	if (_vm->_state->getTransitionSound()) {
-		_vm->_sound->playEffect(_vm->_state->getTransitionSound(),
-				_vm->_state->getTransitionSoundVolume());
+		_vm->_sound->playEffect(_vm->_state->getTransitionSound(), _vm->_state->getTransitionSoundVolume());
 	}
 	_vm->_state->setTransitionSound(0);
 }




More information about the Scummvm-git-logs mailing list