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

bonki bonki at users.noreply.github.com
Mon May 7 20:17:36 CEST 2018


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

Summary:
8885b37abb TITANIC: Enforce code formatting guidelines
4bf0eac94d TOON: Enforce code formatting guidelines
273e88b61d TONY: Enforce code formatting guidelines
990a0c203a TSAGE: Enforce code formatting guidelines
dcd4785009 DRACI: Enforce code formatting guidelines
0cbea68e76 SAGA: Fix whitespace
f58731cfae SAGA: Enforce code formatting guidelines


Commit: 8885b37abb842af63e0836263b0db245530fef03
    https://github.com/scummvm/scummvm/commit/8885b37abb842af63e0836263b0db245530fef03
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-07T20:06:29+02:00

Commit Message:
TITANIC: Enforce code formatting guidelines

Changed paths:
    engines/titanic/core/list.h
    engines/titanic/core/project_item.cpp
    engines/titanic/support/simple_file.cpp
    engines/titanic/support/simple_file.h


diff --git a/engines/titanic/core/list.h b/engines/titanic/core/list.h
index 09068fb..6da3a92 100644
--- a/engines/titanic/core/list.h
+++ b/engines/titanic/core/list.h
@@ -106,7 +106,7 @@ public:
 
 		for (uint idx = 0; idx < count; ++idx) {
 			// Validate the class start header
-			if (!file->IsClassStart())
+			if (!file->isClassStart())
 				error("Unexpected class end");
 
 			// Get item's class name and use it to instantiate an item
@@ -120,7 +120,7 @@ public:
 			Common::List<T *>::push_back(newItem);
 
 			// Validate the class end footer
-			if (file->IsClassStart())
+			if (file->isClassStart())
 				error("Unexpected class start");
 		}
 	}
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp
index 17b506a..99eec80 100644
--- a/engines/titanic/core/project_item.cpp
+++ b/engines/titanic/core/project_item.cpp
@@ -195,7 +195,7 @@ void CProjectItem::loadGame(int slotId) {
 
 	// Load the contents in
 	CProjectItem *newProject = loadData(&file);
-	file.IsClassStart();
+	file.isClassStart();
 	getGameManager()->load(&file);
 
 	file.close();
@@ -250,7 +250,7 @@ void CProjectItem::clear() {
 }
 
 CProjectItem *CProjectItem::loadData(SimpleFile *file) {
-	if (!file->IsClassStart())
+	if (!file->isClassStart())
 		return nullptr;
 
 	CProjectItem *root = nullptr;
@@ -291,8 +291,8 @@ CProjectItem *CProjectItem::loadData(SimpleFile *file) {
 			item->load(file);
 		}
 
-		file->IsClassStart();
-	} while (file->IsClassStart());
+		file->isClassStart();
+	} while (file->isClassStart());
 
 	return root;
 }
diff --git a/engines/titanic/support/simple_file.cpp b/engines/titanic/support/simple_file.cpp
index 103f062..83d731f 100644
--- a/engines/titanic/support/simple_file.cpp
+++ b/engines/titanic/support/simple_file.cpp
@@ -388,7 +388,7 @@ void SimpleFile::writeIndent(uint indent) const {
 		write("\t", 1);
 }
 
-bool SimpleFile::IsClassStart() {
+bool SimpleFile::isClassStart() {
 	char c;
 
 	do {
diff --git a/engines/titanic/support/simple_file.h b/engines/titanic/support/simple_file.h
index 01aaa86..f71ef5b 100644
--- a/engines/titanic/support/simple_file.h
+++ b/engines/titanic/support/simple_file.h
@@ -238,7 +238,7 @@ public:
 	 * an opening or closing squiggly bracket denoting a class
 	 * definition start or end. Returns true if it's a class start
 	 */
-	bool IsClassStart();
+	bool isClassStart();
 
 	/**
 	 * Write the starting header for a class definition


Commit: 4bf0eac94d65b5f5fd11c54d6c29dac058097dd7
    https://github.com/scummvm/scummvm/commit/4bf0eac94d65b5f5fd11c54d6c29dac058097dd7
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-07T20:06:29+02:00

Commit Message:
TOON: Enforce code formatting guidelines

Changed paths:
    engines/toon/hotspot.cpp
    engines/toon/hotspot.h
    engines/toon/script_func.cpp
    engines/toon/toon.cpp


diff --git a/engines/toon/hotspot.cpp b/engines/toon/hotspot.cpp
index 04368df..cdc6dc4 100644
--- a/engines/toon/hotspot.cpp
+++ b/engines/toon/hotspot.cpp
@@ -57,8 +57,8 @@ void Hotspots::save(Common::WriteStream *Stream) {
 	}
 }
 
-int32 Hotspots::FindBasedOnCorner(int16 x, int16 y) {
-	debugC(1, kDebugHotspot, "FindBasedOnCorner(%d, %d)", x, y);
+int32 Hotspots::findBasedOnCorner(int16 x, int16 y) {
+	debugC(1, kDebugHotspot, "findBasedOnCorner(%d, %d)", x, y);
 
 	for (int32 i = 0; i < _numItems; i++) {
 		if (x == _items[i].getX1()) {
@@ -73,8 +73,8 @@ int32 Hotspots::FindBasedOnCorner(int16 x, int16 y) {
 	return -1;
 }
 
-int32 Hotspots::Find(int16 x, int16 y) {
-	debugC(6, kDebugHotspot, "Find(%d, %d)", x, y);
+int32 Hotspots::find(int16 x, int16 y) {
+	debugC(6, kDebugHotspot, "find(%d, %d)", x, y);
 
 	int32 priority = -1;
 	int32 foundId = -1;
@@ -96,8 +96,8 @@ int32 Hotspots::Find(int16 x, int16 y) {
 	return foundId;
 }
 
-bool Hotspots::LoadRif(const Common::String &rifName, const Common::String &additionalRifName) {
-	debugC(1, kDebugHotspot, "LoadRif(%s, %s)", rifName.c_str(), additionalRifName.c_str());
+bool Hotspots::loadRif(const Common::String &rifName, const Common::String &additionalRifName) {
+	debugC(1, kDebugHotspot, "loadRif(%s, %s)", rifName.c_str(), additionalRifName.c_str());
 
 	uint32 size = 0;
 	uint8 *rifData = _vm->resources()->getFileData(rifName, &size);
@@ -139,8 +139,8 @@ bool Hotspots::LoadRif(const Common::String &rifName, const Common::String &addi
 	return true;
 }
 
-HotspotData *Hotspots::Get(int32 id) {
-	debugC(5, kDebugHotspot, "Get(%d)", id);
+HotspotData *Hotspots::get(int32 id) {
+	debugC(5, kDebugHotspot, "get(%d)", id);
 
 	if (id < 0 || id >= _numItems)
 		return 0;
diff --git a/engines/toon/hotspot.h b/engines/toon/hotspot.h
index 782d06a..387007c 100644
--- a/engines/toon/hotspot.h
+++ b/engines/toon/hotspot.h
@@ -50,10 +50,10 @@ public:
 	Hotspots(ToonEngine *vm);
 	~Hotspots();
 
-	bool LoadRif(const Common::String &rifName, const Common::String &additionalRifName);
-	int32 Find(int16 x, int16 y);
-	int32 FindBasedOnCorner(int16 x, int16 y);
-	HotspotData *Get(int32 id);
+	bool loadRif(const Common::String &rifName, const Common::String &additionalRifName);
+	int32 find(int16 x, int16 y);
+	int32 findBasedOnCorner(int16 x, int16 y);
+	HotspotData *get(int32 id);
 	int32 getCount() const { return _numItems; }
 
 	void load(Common::ReadStream *Stream);
diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp
index 7a8925b..d2a9de3 100644
--- a/engines/toon/script_func.cpp
+++ b/engines/toon/script_func.cpp
@@ -379,9 +379,9 @@ int32 ScriptFunc::sys_Cmd_Visited_Scene(EMCState *state) {
 
 int32 ScriptFunc::sys_Cmd_Query_Rif_Flag(EMCState *state) {
 
-	int32 hs = _vm->getHotspots()->FindBasedOnCorner(stackPos(0), stackPos(1));
+	int32 hs = _vm->getHotspots()->findBasedOnCorner(stackPos(0), stackPos(1));
 	if (hs >= 0)
-		return _vm->getHotspots()->Get(hs)->getData(stackPos(2));
+		return _vm->getHotspots()->get(hs)->getData(stackPos(2));
 
 	return 0;
 }
@@ -472,9 +472,9 @@ int32 ScriptFunc::sys_Cmd_Say_Lines(EMCState *state) {
 }
 
 int32 ScriptFunc::sys_Cmd_Set_Rif_Flag(EMCState *state) {
-	int32 hs = _vm->getHotspots()->FindBasedOnCorner(stackPos(0), stackPos(1));
+	int32 hs = _vm->getHotspots()->findBasedOnCorner(stackPos(0), stackPos(1));
 	if (hs >= 0)
-		_vm->getHotspots()->Get(hs)->setData(stackPos(2), stackPos(3));
+		_vm->getHotspots()->get(hs)->setData(stackPos(2), stackPos(3));
 	return 0;
 }
 
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 05192ae..248057d 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -1559,9 +1559,9 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) {
 
 	if (state()->_locations[SceneId]._flags & 0x40) {
 		Common::String cutaway = state()->_locations[SceneId]._cutaway;
-		_hotspots->LoadRif(locationName + ".RIC", cutaway + ".RIC");
+		_hotspots->loadRif(locationName + ".RIC", cutaway + ".RIC");
 	} else {
-		_hotspots->LoadRif(locationName + ".RIC", "");
+		_hotspots->loadRif(locationName + ".RIC", "");
 	}
 	restoreRifFlags(_gameState->_currentScene);
 
@@ -1837,10 +1837,10 @@ void ToonEngine::clickEvent() {
 	}
 
 	// find hotspot
-	int32 hot = _hotspots->Find(mouseX + state()->_currentScrollValue , _mouseY);
+	int32 hot = _hotspots->find(mouseX + state()->_currentScrollValue , _mouseY);
 	HotspotData *currentHot = 0;
 	if (hot > -1) {
-		currentHot = _hotspots->Get(hot);
+		currentHot = _hotspots->get(hot);
 	}
 
 	if (_currentHotspotItem == -3) {
@@ -2012,9 +2012,9 @@ void ToonEngine::selectHotspot() {
 		}
 	}
 
-	int32 hot = _hotspots->Find(mouseX + state()->_currentScrollValue, _mouseY);
+	int32 hot = _hotspots->find(mouseX + state()->_currentScrollValue, _mouseY);
 	if (hot != -1) {
-		HotspotData *hotspot = _hotspots->Get(hot);
+		HotspotData *hotspot = _hotspots->get(hot);
 		int32 item = hotspot->getData(14);
 		if (hotspot->getType() == 3)
 			item += 2000;
@@ -2271,8 +2271,8 @@ void ToonEngine::storeRifFlags(int32 location) {
 	}
 
 	for (int32 i = 0; i < _hotspots->getCount(); i++) {
-		_gameState->_locations[location]._rifBoxesFlags[i * 2 + 0] = _hotspots->Get(i)->getData(4);
-		_gameState->_locations[location]._rifBoxesFlags[i * 2 + 1] = _hotspots->Get(i)->getData(7);
+		_gameState->_locations[location]._rifBoxesFlags[i * 2 + 0] = _hotspots->get(i)->getData(4);
+		_gameState->_locations[location]._rifBoxesFlags[i * 2 + 1] = _hotspots->get(i)->getData(7);
 	}
 }
 
@@ -2280,8 +2280,8 @@ void ToonEngine::restoreRifFlags(int32 location) {
 	if (_hotspots) {
 		if (!_gameState->_locations[location]._visited) {
 			for (int32 i = 0; i < _hotspots->getCount(); i++) {
-				_gameState->_locations[location]._rifBoxesFlags[i * 2 + 0] = _hotspots->Get(i)->getData(4);
-				_gameState->_locations[location]._rifBoxesFlags[i * 2 + 1] = _hotspots->Get(i)->getData(7);
+				_gameState->_locations[location]._rifBoxesFlags[i * 2 + 0] = _hotspots->get(i)->getData(4);
+				_gameState->_locations[location]._rifBoxesFlags[i * 2 + 1] = _hotspots->get(i)->getData(7);
 			}
 			_gameState->_locations[location]._numRifBoxes = _hotspots->getCount();
 		} else {
@@ -2289,8 +2289,8 @@ void ToonEngine::restoreRifFlags(int32 location) {
 				return;
 
 			for (int32 i = 0; i < _hotspots->getCount(); i++) {
-				_hotspots->Get(i)->setData(4, _gameState->_locations[location]._rifBoxesFlags[i * 2 + 0]);
-				_hotspots->Get(i)->setData(7, _gameState->_locations[location]._rifBoxesFlags[i * 2 + 1]);
+				_hotspots->get(i)->setData(4, _gameState->_locations[location]._rifBoxesFlags[i * 2 + 0]);
+				_hotspots->get(i)->setData(7, _gameState->_locations[location]._rifBoxesFlags[i * 2 + 1]);
 			}
 		}
 	}


Commit: 273e88b61d14ae31f342a92459f3b8ad385ff825
    https://github.com/scummvm/scummvm/commit/273e88b61d14ae31f342a92459f3b8ad385ff825
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-07T20:06:29+02:00

Commit Message:
TONY: Enforce code formatting guidelines

These are all commented out but let's update them nevertheless to
reflect earlier renames of the methods in question.

Changed paths:
    engines/tony/gfxcore.cpp


diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 27145d7..a59d14d 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -912,7 +912,7 @@ void RMGfxSourceBuffer8RLE::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPri
 	if (prim->isFlipped()) {
 // Eliminate horizontal clipping
 //		width = m_dimx;
-//		x1=prim->Dst().x1;
+//		x1=prim->getDst()._x1;
 
 		// Clipping
 		u = _dimx - (width + u);
@@ -1699,7 +1699,7 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
 	}
 
 	//width = _dimx;
-	//x1 = prim->Dst().x1;
+	//x1 = prim->getDst()._x1;
 
 	// Position into the destination buffer
 	buf = bigBuf;
@@ -1714,7 +1714,7 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
 	// Loop
 	buf += bigBuf.getDimx(); // Skip the first line
 	for (int y = 1; y < height - 1; y++) {
-		// if (prim->IsFlipped())
+		// if (prim->isFlipped())
 		//	mybuf=&buf[x1+m_dimx-1];
 		// else
 		mybuf = &buf[x1];
@@ -1748,7 +1748,7 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
 	// Looppone
 	buf += bigBuf.getDimx();
 	for (int y = 1; y < height - 1; y++) {
-		// if (prim->IsFlipped())
+		// if (prim->isFlipped())
 		// 	mybuf=&buf[x1+m_dimx-1];
 		// else
 		mybuf = &buf[x1];


Commit: 990a0c203a76186a477f3fe3e68feea021d1456d
    https://github.com/scummvm/scummvm/commit/990a0c203a76186a477f3fe3e68feea021d1456d
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-07T20:06:30+02:00

Commit Message:
TSAGE: Enforce code formatting guidelines

Changed paths:
    engines/tsage/blue_force/blueforce_scenes9.cpp
    engines/tsage/blue_force/blueforce_scenes9.h


diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp
index 5bcc44a..28023cf 100644
--- a/engines/tsage/blue_force/blueforce_scenes9.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes9.cpp
@@ -3165,7 +3165,7 @@ bool Scene930::Object4::startAction(CursorType action, Event &event) {
 		if (BF_GLOBALS._bookmark >= bFlashBackTwo) {
 			_lookLineNum = 71;
 			NamedObject::startAction(action, event);
-			scene->ShowSoleInset();
+			scene->showSoleInset();
 			remove();
 		} else
 			NamedObject::startAction(action, event);
@@ -3304,7 +3304,7 @@ void Scene930::Action2::signal() {
 				SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2,
 				SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9,
 				SET_EXT_FGCOLOR, 13, LIST_END);
-		scene->ShowBoxInset();
+		scene->showBoxInset();
 		BF_GLOBALS._player.enableControl();
 		remove();
 		break;
@@ -3460,7 +3460,7 @@ void Scene930::showBootInset() {
 	_bootsInset.setDetails(930, 69, 70, 93);
 }
 
-void Scene930::ShowBoxInset() {
+void Scene930::showBoxInset() {
 	_boxInset.postInit();
 	_boxInset.setVisage(930);
 	_boxInset.setStrip(1);
@@ -3470,7 +3470,7 @@ void Scene930::ShowBoxInset() {
 	_boxInset.setDetails(930, 73, 74, 75);
 }
 
-void Scene930::ShowSoleInset() {
+void Scene930::showSoleInset() {
 	_soleInset.postInit();
 	_soleInset.setVisage(930);
 	_soleInset.setStrip(3);
diff --git a/engines/tsage/blue_force/blueforce_scenes9.h b/engines/tsage/blue_force/blueforce_scenes9.h
index 52935de..eb6f481 100644
--- a/engines/tsage/blue_force/blueforce_scenes9.h
+++ b/engines/tsage/blue_force/blueforce_scenes9.h
@@ -380,8 +380,8 @@ class Scene930: public PalettedScene {
 	};
 
 	void showBootInset();
-	void ShowBoxInset();
-	void ShowSoleInset();
+	void showBoxInset();
+	void showSoleInset();
 public:
 	SequenceManager _sequenceManager1;
 	Object1 _box;


Commit: dcd4785009691530f3162c838be39c12f6d6fec6
    https://github.com/scummvm/scummvm/commit/dcd4785009691530f3162c838be39c12f6d6fec6
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-07T20:06:30+02:00

Commit Message:
DRACI: Enforce code formatting guidelines

Changed paths:
    engines/draci/game.cpp
    engines/draci/game.h
    engines/draci/saveload.cpp


diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 4fbf2d3..af57b1e 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -1594,7 +1594,7 @@ Game::~Game() {
 	delete[] _items;
 }
 
-void Game::DoSync(Common::Serializer &s, uint8 saveVersion) {
+void Game::synchronize(Common::Serializer &s, uint8 saveVersion) {
 	s.syncAsUint16LE(_currentRoom._roomNum);
 
 	for (uint i = 0; i < _info._numObjects; ++i) {
diff --git a/engines/draci/game.h b/engines/draci/game.h
index 53a472a..1e3cca9 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -330,7 +330,7 @@ public:
 	void setEnableSpeedText(bool value) { _enableSpeedText = value; }
 	bool getEnableSpeedText() const { return _enableSpeedText; }
 
-	void DoSync(Common::Serializer &s, uint8 saveVersion);
+	void synchronize(Common::Serializer &s, uint8 saveVersion);
 
 private:
 	void updateOrdinaryCursor();
diff --git a/engines/draci/saveload.cpp b/engines/draci/saveload.cpp
index e30af53..83c64b5 100644
--- a/engines/draci/saveload.cpp
+++ b/engines/draci/saveload.cpp
@@ -106,7 +106,7 @@ Common::Error saveSavegameData(int saveGameIdx, const Common::String &saveName,
 	} else {
 		// Create the remainder of the savegame
 		Common::Serializer s(NULL, f);
-		vm._game->DoSync(s, header.version);
+		vm._game->synchronize(s, header.version);
 
 		f->finalize();
 		delete f;
@@ -136,7 +136,7 @@ Common::Error loadSavegameData(int saveGameIdx, DraciEngine *vm) {
 
 	// Synchronise the remaining data of the savegame
 	Common::Serializer s(f, NULL);
-	vm->_game->DoSync(s, header.version);
+	vm->_game->synchronize(s, header.version);
 	delete f;
 
 	// Post-processing


Commit: 0cbea68e760c299b03589105ad1798e3f28a4c43
    https://github.com/scummvm/scummvm/commit/0cbea68e760c299b03589105ad1798e3f28a4c43
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-07T20:06:30+02:00

Commit Message:
SAGA: Fix whitespace

Changed paths:
    engines/saga/events.cpp
    engines/saga/isomap.cpp
    engines/saga/puzzle.cpp


diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index b7c3fa4..912e62d 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -176,7 +176,7 @@ int Events::handleContinuous(Event *event) {
 			rect.setWidth(w);
 			rect.setHeight(h);
 
-			_vm->_render->getBackGroundSurface()->transitionDissolve( maskBuffer, rect, 1, event_pc);
+			_vm->_render->getBackGroundSurface()->transitionDissolve(maskBuffer, rect, 1, event_pc);
 			_vm->_render->setFullRefresh(true);
 			break;
 		default:
diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp
index afbe68c..768fbd2 100644
--- a/engines/saga/isomap.cpp
+++ b/engines/saga/isomap.cpp
@@ -443,7 +443,7 @@ void IsoMap::drawTiles(const Location *location) {
 
 			if (uc != u2 || vc != v2) {
 				metaTileIndex = 0;
-				switch ( _tileMap.edgeType) {
+				switch (_tileMap.edgeType) {
 				case kEdgeTypeBlack:
 					continue;
 				case kEdgeTypeFill0:
@@ -487,7 +487,7 @@ void IsoMap::drawTiles(const Location *location) {
 
 			if (uc != u2 || vc != v2) {
 				metaTileIndex = 0;
-				switch ( _tileMap.edgeType) {
+				switch (_tileMap.edgeType) {
 				case kEdgeTypeBlack:
 					continue;
 				case kEdgeTypeFill0:
@@ -1005,7 +1005,7 @@ int16 IsoMap::getTileIndex(int16 u, int16 v, int16 z) {
 
 	if ((uc != mtileU) || (vc != mtileV)) {
 		metaTileIndex = 0;
-		switch ( _tileMap.edgeType) {
+		switch (_tileMap.edgeType) {
 		case kEdgeTypeBlack:
 			return 0;
 		case kEdgeTypeFill0:
@@ -1183,7 +1183,7 @@ void IsoMap::placeOnTileMap(const Location &start, Location &result, int16 dista
 
 	_platformHeight = _vm->_actor->_protagonist->_location.z / 8;
 
-	memset( &_searchArray, 0, sizeof(_searchArray));
+	memset(&_searchArray, 0, sizeof(_searchArray));
 
 	for (ActorDataArray::const_iterator actor = _vm->_actor->_actors.begin(); actor != _vm->_actor->_actors.end(); ++actor) {
 		if (!actor->_inScene) continue;
@@ -1238,7 +1238,7 @@ void IsoMap::placeOnTileMap(const Location &start, Location &result, int16 dista
 				}
 			}
 
-			pushPoint(tilePoint.u + tdir->u,tilePoint.v + tdir->v, tilePoint.cost + tdir->cost, dir);
+			pushPoint(tilePoint.u + tdir->u, tilePoint.v + tdir->v, tilePoint.cost + tdir->cost, dir);
 		}
 	}
 
@@ -1253,35 +1253,35 @@ bool IsoMap::findNearestChasm(int16 &u0, int16 &v0, uint16 &direction) {
 	v = v0;
 
 	for (i = 1; i < 5; i++) {
-		if (getTile( u - i, v, 6) == NULL) {
+		if (getTile(u - i, v, 6) == NULL) {
 			u0 = u - i - 1;
 			v0 = v;
 			direction = kDirDownLeft;
 			return true;
 		}
 
-		if (getTile( u, v - i, 6) == NULL) {
+		if (getTile(u, v - i, 6) == NULL) {
 			u0 = u;
 			v0 = v - i - 1;
 			direction = kDirDownRight;
 			return true;
 		}
 
-		if (getTile( u - i, v - i, 6) == NULL) {
+		if (getTile(u - i, v - i, 6) == NULL) {
 			u0 = u - i - 1;
 			v0 = v - i - 1;
 			direction = kDirDown;
 			return true;
 		}
 
-		if (getTile( u + i, v - i, 6) == NULL) {
+		if (getTile(u + i, v - i, 6) == NULL) {
 			u0 = u + i + 1;
 			v0 = v - i - 1;
 			direction = kDirDownRight;
 			return true;
 		}
 
-		if (getTile( u - i, v + i, 6) == NULL) {
+		if (getTile(u - i, v + i, 6) == NULL) {
 			u0 = u + i + 1;
 			v0 = v - i - 1;
 			direction = kDirLeft;
@@ -1290,21 +1290,21 @@ bool IsoMap::findNearestChasm(int16 &u0, int16 &v0, uint16 &direction) {
 	}
 
 	for (i = 1; i < 5; i++) {
-		if (getTile( u + i, v, 6) == NULL) {
+		if (getTile(u + i, v, 6) == NULL) {
 			u0 = u + i + 1;
 			v0 = v;
 			direction = kDirUpRight;
 			return true;
 		}
 
-		if (getTile( u, v + i, 6) == NULL) {
+		if (getTile(u, v + i, 6) == NULL) {
 			u0 = u;
 			v0 = v + i + 1;
 			direction = kDirUpLeft;
 			return true;
 		}
 
-		if (getTile( u + i, v + i, 6) == NULL) {
+		if (getTile(u + i, v + i, 6) == NULL) {
 			u0 = u + i + 1;
 			v0 = v + i + 1;
 			direction = kDirUp;
@@ -1314,7 +1314,7 @@ bool IsoMap::findNearestChasm(int16 &u0, int16 &v0, uint16 &direction) {
 	return false;
 }
 
-void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Location &end, uint16 initialDirection) {
+void IsoMap::findDragonTilePath(ActorData* actor, const Location &start, const Location &end, uint16 initialDirection) {
 	byte *res;
 	int i;
 	int16 u;
@@ -1350,7 +1350,7 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
 
 	_platformHeight = _vm->_actor->_protagonist->_location.z / 8;
 
-	memset( &_dragonSearchArray, 0, sizeof(_dragonSearchArray));
+	memset(&_dragonSearchArray, 0, sizeof(_dragonSearchArray));
 
 	for (u = 0; u < SAGA_DRAGON_SEARCH_DIAMETER; u++) {
 		for (v = 0; v < SAGA_DRAGON_SEARCH_DIAMETER; v++) {
@@ -1380,7 +1380,7 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
 
 	first = true;
 	_queueCount = _readCount = 0;
-	pushDragonPoint( SAGA_DRAGON_SEARCH_CENTER, SAGA_DRAGON_SEARCH_CENTER, initialDirection);
+	pushDragonPoint(SAGA_DRAGON_SEARCH_CENTER, SAGA_DRAGON_SEARCH_CENTER, initialDirection);
 
 	while (_queueCount != _readCount) {
 
@@ -1404,40 +1404,40 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
 
 		switch (tilePoint->direction) {
 			case kDirUpRight:
-				if (checkDragonPoint( tilePoint->u + 1, tilePoint->v + 0, kDirUpRight)) {
-					pushDragonPoint( tilePoint->u + 2, tilePoint->v + 0, kDirUpRight);
-					pushDragonPoint( tilePoint->u + 1, tilePoint->v + 1, kDirUpLeft);
-					pushDragonPoint( tilePoint->u + 1, tilePoint->v - 1, kDirDownRight);
+				if (checkDragonPoint(tilePoint->u + 1, tilePoint->v + 0, kDirUpRight)) {
+					pushDragonPoint(tilePoint->u + 2, tilePoint->v + 0, kDirUpRight);
+					pushDragonPoint(tilePoint->u + 1, tilePoint->v + 1, kDirUpLeft);
+					pushDragonPoint(tilePoint->u + 1, tilePoint->v - 1, kDirDownRight);
 				}
 				break;
 			case kDirDownRight:
-				if (checkDragonPoint( tilePoint->u + 0, tilePoint->v - 1, kDirDownRight)) {
-					pushDragonPoint( tilePoint->u + 0, tilePoint->v - 2, kDirDownRight);
-					pushDragonPoint( tilePoint->u + 1, tilePoint->v - 1, kDirUpRight);
-					pushDragonPoint( tilePoint->u - 1, tilePoint->v - 1, kDirDownLeft);
+				if (checkDragonPoint(tilePoint->u + 0, tilePoint->v - 1, kDirDownRight)) {
+					pushDragonPoint(tilePoint->u + 0, tilePoint->v - 2, kDirDownRight);
+					pushDragonPoint(tilePoint->u + 1, tilePoint->v - 1, kDirUpRight);
+					pushDragonPoint(tilePoint->u - 1, tilePoint->v - 1, kDirDownLeft);
 				}
 				break;
 			case kDirDownLeft:
-				if (checkDragonPoint( tilePoint->u - 1, tilePoint->v + 0, kDirDownLeft)) {
-					pushDragonPoint( tilePoint->u - 2, tilePoint->v + 0, kDirDownLeft);
-					pushDragonPoint( tilePoint->u - 1, tilePoint->v - 1, kDirDownRight);
-					pushDragonPoint( tilePoint->u - 1, tilePoint->v + 1, kDirUpLeft);
+				if (checkDragonPoint(tilePoint->u - 1, tilePoint->v + 0, kDirDownLeft)) {
+					pushDragonPoint(tilePoint->u - 2, tilePoint->v + 0, kDirDownLeft);
+					pushDragonPoint(tilePoint->u - 1, tilePoint->v - 1, kDirDownRight);
+					pushDragonPoint(tilePoint->u - 1, tilePoint->v + 1, kDirUpLeft);
 				}
 				break;
 			case kDirUpLeft:
-				if (checkDragonPoint( tilePoint->u + 0, tilePoint->v + 1, kDirUpLeft)) {
-					pushDragonPoint( tilePoint->u + 0, tilePoint->v + 2, kDirUpLeft);
-					pushDragonPoint( tilePoint->u - 1, tilePoint->v + 1, kDirDownLeft);
-					pushDragonPoint( tilePoint->u + 1, tilePoint->v + 1, kDirUpRight);
+				if (checkDragonPoint(tilePoint->u + 0, tilePoint->v + 1, kDirUpLeft)) {
+					pushDragonPoint(tilePoint->u + 0, tilePoint->v + 2, kDirUpLeft);
+					pushDragonPoint(tilePoint->u - 1, tilePoint->v + 1, kDirDownLeft);
+					pushDragonPoint(tilePoint->u + 1, tilePoint->v + 1, kDirUpRight);
 				}
 				break;
 		}
 
 		if (first && (_queueCount == _readCount)) {
-			pushDragonPoint( tilePoint->u + 1, tilePoint->v + 0, kDirUpRight);
-			pushDragonPoint( tilePoint->u + 0, tilePoint->v - 1, kDirDownRight);
-			pushDragonPoint( tilePoint->u - 1, tilePoint->v + 0, kDirDownLeft);
-			pushDragonPoint( tilePoint->u + 0, tilePoint->v + 1, kDirUpLeft);
+			pushDragonPoint(tilePoint->u + 1, tilePoint->v + 0, kDirUpRight);
+			pushDragonPoint(tilePoint->u + 0, tilePoint->v - 1, kDirDownRight);
+			pushDragonPoint(tilePoint->u - 1, tilePoint->v + 0, kDirDownLeft);
+			pushDragonPoint(tilePoint->u + 0, tilePoint->v + 1, kDirUpLeft);
 		}
 		first = false;
 	}
@@ -1507,7 +1507,7 @@ void IsoMap::findTilePath(ActorData* actor, const Location &start, const Locatio
 
 
 
-	memset( &_searchArray, 0, sizeof(_searchArray));
+	memset(&_searchArray, 0, sizeof(_searchArray));
 
 	if (!(actor->_actorFlags & kActorNoCollide) &&
 		(_vm->_scene->currentSceneResourceId() != ITE_SCENE_OVERMAP)) {
@@ -1648,7 +1648,7 @@ bool IsoMap::nextTileTarget(ActorData* actor) {
 
 void IsoMap::screenPointToTileCoords(const Point &position, Location &location) {
 	Point mPos(position);
-	int x,y;
+	int x, y;
 
 	if (_vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP){
 		if (mPos.y < 16) {
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index 1d01405..7709086 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -93,25 +93,25 @@ Puzzle::Puzzle(SagaEngine *vm) : _vm(vm), _solved(false), _active(false) {
 	_hintSpeaker = 0;
 	_slidePointX = _slidePointY = 0;
 
-	initPieceInfo( 0, 268,  18,  0, 0,  0 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 3,
-		  Point(0, 1),  Point(0, 62), Point(15, 31), Point(0, 0), Point(0, 0), Point(0,0));
-	initPieceInfo( 1, 270,  52,  0, 0,  0 + PUZZLE_X_OFFSET,  32 + PUZZLE_Y_OFFSET, 0, 4,
+	initPieceInfo(0, 268,  18,  0, 0,  0 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 3,
+		  Point(0, 1),  Point(0, 62), Point(15, 31), Point(0, 0), Point(0, 0), Point(0, 0));
+	initPieceInfo(1, 270,  52,  0, 0,  0 + PUZZLE_X_OFFSET,  32 + PUZZLE_Y_OFFSET, 0, 4,
 		  Point(0, 31), Point(0, 47), Point(39, 47), Point(15, 1), Point(0, 0), Point(0, 0));
-	initPieceInfo( 2, 19,  51,  0, 0,  0 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 4,
+	initPieceInfo(2, 19,  51,  0, 0,  0 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 4,
 		  Point(0, 0), Point(23, 46), Point(39, 15), Point(31, 0), Point(0, 0), Point(0, 0));
-	initPieceInfo( 3, 73,   0,  0, 0,   32 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 6,
+	initPieceInfo(3, 73,   0,  0, 0,   32 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 6,
 		  Point(0, 0), Point(8, 16), Point(0, 31), Point(31, 31), Point(39, 15), Point(31, 0));
-	initPieceInfo( 4, 0,  35,  0, 0,   64 + PUZZLE_X_OFFSET,  16 + PUZZLE_Y_OFFSET, 0, 4,
+	initPieceInfo(4, 0,  35,  0, 0,   64 + PUZZLE_X_OFFSET,  16 + PUZZLE_Y_OFFSET, 0, 4,
 		  Point(0, 15), Point(15, 46), Point(23, 32), Point(7, 1), Point(0, 0), Point(0, 0));
-	initPieceInfo( 5, 215,   0,  0, 0,   24 + PUZZLE_X_OFFSET,  32 + PUZZLE_Y_OFFSET, 0, 6,
+	initPieceInfo(5, 215,   0,  0, 0,   24 + PUZZLE_X_OFFSET,  32 + PUZZLE_Y_OFFSET, 0, 6,
 		  Point(0, 15), Point(8, 31), Point(39, 31), Point(47, 16), Point(39, 0), Point(8, 0));
-	initPieceInfo( 6, 159,   0,  0, 0,   32 + PUZZLE_X_OFFSET,  48 + PUZZLE_Y_OFFSET, 0, 5,
+	initPieceInfo(6, 159,   0,  0, 0,   32 + PUZZLE_X_OFFSET,  48 + PUZZLE_Y_OFFSET, 0, 5,
 		  Point(0, 16), Point(8, 31), Point(55, 31), Point(39, 1), Point(32, 15), Point(0, 0));
-	initPieceInfo( 7, 9,  70,  0, 0,   80 + PUZZLE_X_OFFSET,  32 + PUZZLE_Y_OFFSET, 0, 5,
+	initPieceInfo(7, 9,  70,  0, 0,   80 + PUZZLE_X_OFFSET,  32 + PUZZLE_Y_OFFSET, 0, 5,
 		  Point(0, 31), Point(8, 47), Point(23, 47), Point(31, 31), Point(15, 1), Point(0, 0));
-	initPieceInfo( 8, 288,  18,  0, 0,   96 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 4,
+	initPieceInfo(8, 288,  18,  0, 0,   96 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 4,
 		  Point(0, 31), Point(15, 62), Point(31, 32), Point(15, 1), Point(0, 0), Point(0, 0));
-	initPieceInfo( 9, 112,   0,  0, 0,  112 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 4,
+	initPieceInfo(9, 112,   0,  0, 0,  112 + PUZZLE_X_OFFSET,   0 + PUZZLE_Y_OFFSET, 0, 4,
 		  Point(0, 0), Point(16, 31), Point(47, 31), Point(31, 0), Point(0, 0), Point(0, 0));
 	initPieceInfo(10, 27,  89,  0, 0,  104 + PUZZLE_X_OFFSET,  32 + PUZZLE_Y_OFFSET, 0, 4,
 		  Point(0, 47), Point(31, 47), Point(31, 0), Point(24, 0), Point(0, 0), Point(0, 0));


Commit: f58731cfae973c95a79520b2462ee991218509d2
    https://github.com/scummvm/scummvm/commit/f58731cfae973c95a79520b2462ee991218509d2
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-07T20:06:31+02:00

Commit Message:
SAGA: Enforce code formatting guidelines

Changed paths:
    engines/saga/isomap.cpp
    engines/saga/isomap.h


diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp
index 768fbd2..ae2b458 100644
--- a/engines/saga/isomap.cpp
+++ b/engines/saga/isomap.cpp
@@ -740,7 +740,7 @@ void IsoMap::drawTile(uint16 tileIndex, const Point &point, const Location *loca
 			if (location->z >= 16) {
 				return;
 			} else {
-				switch (_tilesTable[tileIndex].GetMaskRule()) {
+				switch (_tilesTable[tileIndex].getMaskRule()) {
 				case kMaskRuleNever:
 					return;
 				case kMaskRuleAlways:
@@ -1078,8 +1078,8 @@ void IsoMap::testPossibleDirections(int16 u, int16 v, uint16 terraComp[8], int s
 #define TEST_TILE_PROLOG(offsetU, offsetV)						\
 	tile = getTile(u + offsetU, v + offsetV , _platformHeight);	\
 	if (tile != NULL) {											\
-		fgdMask = tile->GetFGDMask();							\
-		bgdMask = tile->GetBGDMask();							\
+		fgdMask = tile->getFGDMask();							\
+		bgdMask = tile->getBGDMask();							\
 		mask = tile->terrainMask;
 
 #define TEST_TILE_EPILOG(index)									\
@@ -1368,8 +1368,8 @@ void IsoMap::findDragonTilePath(ActorData* actor, const Location &start, const L
 			tile = getTile(u1, v1, _platformHeight);
 			if (tile != NULL) {
 				mask = tile->terrainMask;
-				if (((mask != 0) && (tile->GetFGDAttr() >= kTerrBlock)) ||
-					((mask != 0xFFFF) && (tile->GetBGDAttr() >= kTerrBlock))) {
+				if (((mask != 0     ) && (tile->getFGDAttr() >= kTerrBlock)) ||
+				    ((mask != 0xFFFF) && (tile->getBGDAttr() >= kTerrBlock))) {
 					pcell->visited = 1;
 				}
 			} else {
diff --git a/engines/saga/isomap.h b/engines/saga/isomap.h
index 155d9b8..83dfd98 100644
--- a/engines/saga/isomap.h
+++ b/engines/saga/isomap.h
@@ -95,20 +95,20 @@ struct IsoTileData {
 	byte *tilePointer;
 	uint16 terrainMask;
 	byte FGDBGDAttr;
-	int8 GetMaskRule() const {
+	int8 getMaskRule() const {
 		return attributes & 0x0F;
 	}
-	byte GetFGDAttr() const {
+	byte getFGDAttr() const {
 		return FGDBGDAttr >> 4;
 	}
-	byte GetBGDAttr() const {
+	byte getBGDAttr() const {
 		return FGDBGDAttr & 0x0F;
 	}
-	uint16 GetFGDMask() const {
-		return 1 << GetFGDAttr();
+	uint16 getFGDMask() const {
+		return 1 << getFGDAttr();
 	}
-	uint16 GetBGDMask() const {
-		return 1 << GetBGDAttr();
+	uint16 getBGDMask() const {
+		return 1 << getBGDAttr();
 	}
 };
 





More information about the Scummvm-git-logs mailing list