[Scummvm-cvs-logs] scummvm master -> 34cbdd8a1deddfc8d04263ec90c546a906543366

sev- sev at scummvm.org
Mon Aug 1 11:28:31 CEST 2016


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:
34cbdd8a1d TITANIC: Fix warnings


Commit: 34cbdd8a1deddfc8d04263ec90c546a906543366
    https://github.com/scummvm/scummvm/commit/34cbdd8a1deddfc8d04263ec90c546a906543366
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-01T12:26:58+03:00

Commit Message:
TITANIC: Fix warnings

Changed paths:
    engines/titanic/npcs/true_talk_npc.cpp
    engines/titanic/pet_control/pet_glyphs.cpp
    engines/titanic/pet_control/pet_inventory_glyphs.cpp
    engines/titanic/pet_control/pet_rooms.cpp
    engines/titanic/pet_control/pet_rooms_glyphs.cpp
    engines/titanic/true_talk/tt_npc_script.cpp



diff --git a/engines/titanic/npcs/true_talk_npc.cpp b/engines/titanic/npcs/true_talk_npc.cpp
index 51d7c2e..faadc2d 100644
--- a/engines/titanic/npcs/true_talk_npc.cpp
+++ b/engines/titanic/npcs/true_talk_npc.cpp
@@ -156,14 +156,14 @@ bool CTrueTalkNPC::MovieEndMsg(CMovieEndMsg *msg) {
 		CNPCPlayAnimationMsg msg2(msg1._names, msg1._value1);
 		msg2.execute(this);
 	}
-	
+
 	return true;
 }
 
 bool CTrueTalkNPC::NPCQueueIdleAnimMsg(CNPCQueueIdleAnimMsg *msg) {
 	int rndVal = g_vm->getRandomNumber(_fieldF8 - 1) - (_fieldF8 / 2);
 	_speechTimerId = startAnimTimer("NPCIdleAnim", _fieldF4 + rndVal, 0);
-	
+
 	return true;
 }
 
@@ -222,13 +222,13 @@ void CTrueTalkNPC::startTalker(CViewItem *view) {
 		gameManager->getTalkManager()->start4(this, view);
 }
 
-void CTrueTalkNPC::performAction(bool startTalking, CViewItem *view) {
+void CTrueTalkNPC::performAction(bool startTalking, CViewItem *view_) {
 	CPetControl *pet = getPetControl();
 	if (pet)
 		pet->resetActiveNPC();
 
 	if (startTalking)
-		startTalker(view);
+		startTalker(view_);
 
 	if (pet)
 		pet->convResetNPC();
diff --git a/engines/titanic/pet_control/pet_glyphs.cpp b/engines/titanic/pet_control/pet_glyphs.cpp
index c36bae6..bd05342 100644
--- a/engines/titanic/pet_control/pet_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_glyphs.cpp
@@ -32,7 +32,7 @@ bool CPetGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
 	return true;
 }
 
-void CPetGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted) {
+void CPetGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted_) {
 	_element.translate(pt.x, pt.y);
 	_element.draw(screenManager);
 	_element.translate(-pt.x, -pt.y);
@@ -149,7 +149,7 @@ void CPetGlyphs::draw(CScreenManager *screenManager) {
 		}
 	}
 
-	// Iterate through displaying glyphs on the screen 
+	// Iterate through displaying glyphs on the screen
 	int listSize = size();
 	for (int index = 0; index < _numVisibleGlyphs; ++index) {
 		int itemIndex = getItemIndex(index);
@@ -267,7 +267,7 @@ void CPetGlyphs::setFirstVisible(int index) {
 
 		if ((_flags & GFLAG_8) && _highlightIndex != -1) {
 			CPetGlyph *glyph = getGlyph(_highlightIndex);
-			
+
 			if (glyph) {
 				int idx = getHighlightedIndex(_highlightIndex);
 				if (idx != -1) {
diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.cpp b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
index deea8ee..ae30664 100644
--- a/engines/titanic/pet_control/pet_inventory_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
@@ -43,13 +43,13 @@ void CPetInventoryGlyph::leave() {
 	stopMovie();
 }
 
-void CPetInventoryGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted) {
+void CPetInventoryGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted_) {
 	if (!_field34)
 		return;
 
 	if (_image) {
 		if (_image->hasActiveMovie()) {
-			if (isHighlighted)
+			if (isHighlighted_)
 				_image->draw(screenManager);
 			else
 				_image->draw(screenManager, pt);
@@ -57,14 +57,14 @@ void CPetInventoryGlyph::drawAt(CScreenManager *screenManager, const Point &pt,
 		}
 
 		_image = nullptr;
-		if (_background && isHighlighted) {
+		if (_background && isHighlighted_) {
 			_background->setPosition(pt);
 			startBackgroundMovie();
 		}
 	}
 
 	if (_background) {
-		if (isHighlighted)
+		if (isHighlighted_)
 			_background->draw(screenManager);
 		else
 			_background->draw(screenManager, pt);
diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp
index dfaa040..fcf8238 100644
--- a/engines/titanic/pet_control/pet_rooms.cpp
+++ b/engines/titanic/pet_control/pet_rooms.cpp
@@ -235,7 +235,7 @@ void CPetRooms::resetHighlight() {
 uint CPetRooms::getRoomFlags() const {
 	CRoomFlags roomFlags;
 	CString roomName = _petControl->getRoomName();
-	
+
 	uint flags = roomFlags.getSpecialRoomFlags(roomName);
 	if (flags)
 		return flags;
@@ -258,7 +258,7 @@ uint CPetRooms::getRoomFlags() const {
 				roomFlags.setElevatorNum(_elevatorNum == 1 || _elevatorNum == 2 ? 2 : 4);
 			}
 
-			roomFlags.setRoomBits(((_roomNum - 1) & 1) + (_field1CC > 1 ? 3 : 2));			
+			roomFlags.setRoomBits(((_roomNum - 1) & 1) + (_field1CC > 1 ? 3 : 2));
 		} else {
 			roomFlags.setRoomBits(0);
 		}
@@ -292,11 +292,11 @@ void CPetRooms::reassignRoom(int passClassNum) {
 	}
 }
 
-CPetRoomsGlyph *CPetRooms::addRoom(uint roomFlags, bool highlight) {
+CPetRoomsGlyph *CPetRooms::addRoom(uint roomFlags, bool highlight_) {
 	// Ensure that we don't add room if the room is already present
 	if (_glyphs.hasFlags(roomFlags))
 		return nullptr;
-	
+
 	if (_glyphs.size() >= 32)
 		// Too many rooms already
 		return nullptr;
@@ -312,17 +312,17 @@ CPetRoomsGlyph *CPetRooms::addRoom(uint roomFlags, bool highlight) {
 	}
 
 	// Add the glyph
-	return addGlyph(roomFlags, highlight);
+	return addGlyph(roomFlags, highlight_);
 }
 
-CPetRoomsGlyph *CPetRooms::addGlyph(uint roomFlags, bool highlight) {
+CPetRoomsGlyph *CPetRooms::addGlyph(uint roomFlags, bool highlight_) {
 	CPetRoomsGlyph *glyph = new CPetRoomsGlyph(roomFlags);
 	if (!glyph->setup(_petControl, &_glyphs)) {
 		delete glyph;
 		return nullptr;
 	} else {
 		_glyphs.push_back(glyph);
-		if (highlight)
+		if (highlight_)
 			_glyphs.highlight(glyph);
 
 		return glyph;
diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
index 810342a..851ca0c 100644
--- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
@@ -57,7 +57,7 @@ bool CPetRoomsGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
 	return true;
 }
 
-void CPetRoomsGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted) {
+void CPetRoomsGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted_) {
 	// Clear background
 	Rect rect(pt.x, pt.y, pt.x + 52, pt.y + 52);
 	screenManager->fillRect(SURFACE_BACKBUFFER, &rect, 0, 0, 0);
@@ -74,7 +74,7 @@ void CPetRoomsGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool
 	CGameObject *obj4 = _object4;
 	CGameObject *obj5 = _object5;
 
-	if (_field38 == 1 || isHighlighted) {
+	if (_field38 == 1 || isHighlighted_) {
 		_object0 = _object2;
 		_object1 = _object3;
 		_object4 = _object6;
@@ -203,7 +203,7 @@ int CPetRoomsGlyph::getSelection(const Point &topLeft, const Point &pt) {
 		for (int i = 0; i < 4; ++i) {
 			if (rects[i].contains(pt))
 				return btnIndex - i;
-			
+
 			rects[i].translate(0, 10);
 		}
 	}
diff --git a/engines/titanic/true_talk/tt_npc_script.cpp b/engines/titanic/true_talk/tt_npc_script.cpp
index e680ed0..61c3b0e 100644
--- a/engines/titanic/true_talk/tt_npc_script.cpp
+++ b/engines/titanic/true_talk/tt_npc_script.cpp
@@ -115,10 +115,10 @@ void TTnpcData::resetFlags() {
 
 /*------------------------------------------------------------------------*/
 
-TTnpcScriptBase::TTnpcScriptBase(int charId, const char *charClass, int v2,
+TTnpcScriptBase::TTnpcScriptBase(int charId_, const char *charClass, int v2,
 		const char *charName, int v3, int val2, int v4, int v5, int v6, int v7) :
 		TTscriptBase(0, charClass, v2, charName, v3, v4, v5, v6, v7),
-		_charId(charId), _field54(0), _val2(val2) {
+		_charId(charId_), _field54(0), _val2(val2) {
 }
 
 /*------------------------------------------------------------------------*/
@@ -133,9 +133,9 @@ void TTnpcScript::deinit() {
 	_defaultEntries = nullptr;
 }
 
-TTnpcScript::TTnpcScript(int charId, const char *charClass, int v2,
+TTnpcScript::TTnpcScript(int charId_, const char *charClass, int v2,
 		const char *charName, int v3, int val2, int v4, int v5, int v6, int v7) :
-		TTnpcScriptBase(charId, charClass, v2, charName, v3, val2, v4, v5, v6, v7),
+		TTnpcScriptBase(charId_, charClass, v2, charName, v3, val2, v4, v5, v6, v7),
 		_entryCount(0), _field68(0), _field6C(0), _rangeResetCtr(0),
 		_currentDialNum(0), _dialDelta(0), _field7C(0), _itemStringP(nullptr), _field2CC(false) {
 	CTrueTalkManager::_v2 = 0;
@@ -158,7 +158,7 @@ void TTnpcScript::loadResponses(const char *name, int valuesPerResponse) {
 		sr._tag = r->readUint32LE();
 		for (int idx = 0; idx < valuesPerResponse; ++idx)
 			sr._values[idx] = r->readUint32LE();
-		
+
 		_responses.push_back(sr);
 	}
 
@@ -222,7 +222,7 @@ int TTnpcScript::chooseResponse(const TTroomScript *roomScript, const TTsentence
 				uint diagId = getDialogueId(response._values[valIndex]);
 				addResponse(diagId);
 			}
-			
+
 			applyResponse();
 			return 2;
 		}
@@ -306,7 +306,7 @@ int TTnpcScript::handleQuote(const TTroomScript *roomScript, const TTsentence *s
 				dialogueId -= _quotes._rangeStart;
 				if (dialogueId > 3)
 					error("Invalid dialogue index in BarbotScript");
-				
+
 				const int RANDOM_LIMITS[4] = { 30, 50, 70, 60 };
 				int rangeLimit = RANDOM_LIMITS[dialogueId];
 				int dialRegion = getDialRegion(0);
@@ -315,7 +315,7 @@ int TTnpcScript::handleQuote(const TTroomScript *roomScript, const TTsentence *s
 					rangeLimit = MAX(rangeLimit - 20, 20);
 				}
 
-				dialogueId = (((int)remainder + 25) % 100) >= rangeLimit 
+				dialogueId = (((int)remainder + 25) % 100) >= rangeLimit
 					? _quotes._tag1 : _quotes._tag2;
 			}
 
@@ -364,7 +364,7 @@ uint TTnpcScript::getRangeValue(uint id) {
 	default:
 		if (range->_values[range->_priorIndex])
 			return range->_values[range->_priorIndex++];
-		
+
 		range->_priorIndex = 1;
 		++_rangeResetCtr;
 		return range->_values[0];
@@ -404,7 +404,7 @@ void TTnpcScript::save(SimpleFile *file) {
 	file->writeNumber(_currentDialNum);
 	file->writeNumber(_dialDelta);
 	file->writeNumber(_field7C);
-	
+
 	file->writeNumber(10);
 	for (int idx = 0; idx < 10; ++idx)
 		file->writeNumber(_data[idx]);
@@ -565,7 +565,7 @@ int TTnpcScript::getValue(int testNum) const {
 	switch (testNum) {
 	case 0:
 		return CTrueTalkManager::_v2;
-	
+
 	case 1:
 		if (g_vm->_trueTalkManager)
 			CTrueTalkManager::_v3 = g_vm->_trueTalkManager->getPassengerClass();
@@ -576,7 +576,7 @@ int TTnpcScript::getValue(int testNum) const {
 
 	case 3:
 		return CTrueTalkManager::_v5 != 0;
-	
+
 	case 4:
 		if (g_vm->_trueTalkManager) {
 			switch (g_vm->_trueTalkManager->getState14()) {
@@ -593,7 +593,7 @@ int TTnpcScript::getValue(int testNum) const {
 				CTrueTalkManager::_v6 = 2;
 				break;
 			}
-		}		
+		}
 		return CTrueTalkManager::_v6;
 
 	case 5:
@@ -665,13 +665,13 @@ uint TTnpcScript::getDialogueId(uint tagId) {
 	if (idx == 4)
 		return newVal;
 	arrP[idx] = origId;
-	
+
 	// Second slot dialogue Ids
 	idx = 0;
 	arrP = _data.getSlot(1);
 	while (idx < 4 && arrP[idx])
 		++idx;
-	
+
 	if (idx == 4)
 		return newVal;
 	arrP[idx] = newVal;
@@ -745,7 +745,7 @@ int TTnpcScript::processEntries(const TTsentenceEntries *entries, uint entryCoun
 					if (!dialogueId)
 						return 1;
 					else if (dialogueId == 4)
-						return 2;	
+						return 2;
 					addResponse(dialogueId);
 
 					id = preResponse(dialogueId);
@@ -867,7 +867,7 @@ bool TTnpcScript::addRandomResponse(bool flag) {
 
 	if (flag)
 		addResponse(getDialogueId(290224));
-	
+
 	addResponse(id);
 	applyResponse();
 	return true;
@@ -991,7 +991,7 @@ void TTnpcScript::setResponseFromArray(int index, int id) {
 		deleteResponses();
 		if (id)
 			addResponse(getDialogueId(id));
-		
+
 		// Add any loaded responses
 		int *vals = _data.getSlot(index + 1);
 		for (int idx = 0; idx < 4; ++idx) {






More information about the Scummvm-git-logs mailing list