[Scummvm-cvs-logs] SF.net SVN: scummvm: [25781] scummvm/trunk/engines/lure

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Thu Feb 22 09:17:41 CET 2007


Revision: 25781
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25781&view=rev
Author:   dreammaster
Date:     2007-02-22 00:17:41 -0800 (Thu, 22 Feb 2007)

Log Message:
-----------
Syntax fixes to conform to ScummVM coding standards

Modified Paths:
--------------
    scummvm/trunk/engines/lure/hotspots.cpp
    scummvm/trunk/engines/lure/res.cpp
    scummvm/trunk/engines/lure/res_struct.cpp

Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp	2007-02-22 06:29:09 UTC (rev 25780)
+++ scummvm/trunk/engines/lure/hotspots.cpp	2007-02-22 08:17:41 UTC (rev 25781)
@@ -2621,8 +2621,7 @@
 	}
 
 	// Handle any pause countdown
-	if (countdownCtr > 0)
-	{
+	if (countdownCtr > 0) {
 		--countdownCtr;
 		standardCharacterAnimHandler(h);
 		return;
@@ -2637,18 +2636,15 @@
 	int actionIndex = rnd.getRandomNumber(set->numActions() - 1);
 	set->getEntry(actionIndex, actionType, scheduleId);
 
-	if (actionType == REPEAT_ONCE_DONE)
-	{
+	if (actionType == REPEAT_ONCE_DONE)	{
 		// Repeat once random action that's already done, so don't repeat it
 		standardCharacterAnimHandler(h);
 		return;
 	}
 
 	// For repeat once actions, make sure the character is in the same room as the player
-	if (actionType == REPEAT_ONCE)
-	{
-		if (player->roomNumber() != h.roomNumber())
-		{
+	if (actionType == REPEAT_ONCE) {
+		if (player->roomNumber() != h.roomNumber()) {
 			// Not in the same room, so don't do the action
 			standardCharacterAnimHandler(h);
 			return;
@@ -2658,13 +2654,10 @@
 		set->setDone(actionIndex);
 	}
 
-	if (scheduleId == 0)
-	{
+	if (scheduleId == 0) {
 		// No special schedule to perform, so simply set a random action
 		h.setRandomDest();
-	}
-	else
-	{
+	} else {
 		// Prepare the follower to standard the specified schedule
 		CharacterScheduleEntry *newEntry = res.charSchedules().getEntry(scheduleId);
 		assert(newEntry);

Modified: scummvm/trunk/engines/lure/res.cpp
===================================================================
--- scummvm/trunk/engines/lure/res.cpp	2007-02-22 06:29:09 UTC (rev 25780)
+++ scummvm/trunk/engines/lure/res.cpp	2007-02-22 08:17:41 UTC (rev 25781)
@@ -287,8 +287,7 @@
 	// Next load up the list of random actions your follower can do in each room
 
 	++offset;
-	while (READ_LE_UINT16(offset) != 0xffff)
-	{
+	while (READ_LE_UINT16(offset) != 0xffff) {
 		RandomActionSet *actionSet = new RandomActionSet(offset);
 		_randomActions.push_back(actionSet);
 	}
@@ -535,8 +534,7 @@
 			/*
 			if ((hotspot->hotspotId() >= RATPOUCH_ID) &&
 				(hotspot->hotspotId() < FIRST_NONCHARACTER_ID) &&
-				(hotspot->roomNumber() < 42))
-			{
+				(hotspot->roomNumber() < 42)) {
 				// Start wandering characters off in room 24
 				hotspot->setRoomNumber(24);
 				hotspot->setPosition(64, 116);

Modified: scummvm/trunk/engines/lure/res_struct.cpp
===================================================================
--- scummvm/trunk/engines/lure/res_struct.cpp	2007-02-22 06:29:09 UTC (rev 25780)
+++ scummvm/trunk/engines/lure/res_struct.cpp	2007-02-22 08:17:41 UTC (rev 25781)
@@ -776,8 +776,7 @@
 
 // This classes is used to store a list of random action sets - one set per room
 
-RandomActionSet::RandomActionSet(uint16 *&offset)
-{
+RandomActionSet::RandomActionSet(uint16 *&offset) {
 	_roomNumber = READ_LE_UINT16(offset++);
 	uint16 actionDetails = READ_LE_UINT16(offset++);
 	_numActions = (actionDetails & 0xff);
@@ -785,21 +784,18 @@
 	_types = new RandomActionType[_numActions];
 	_ids = new uint16[_numActions];
 
-	for (int actionIndex = 0; actionIndex < _numActions; ++actionIndex)
-	{
+	for (int actionIndex = 0; actionIndex < _numActions; ++actionIndex) {
 		_ids[actionIndex] = READ_LE_UINT16(offset++);
 		_types[actionIndex] = (actionDetails & (0x100 << actionIndex)) != 0 ? REPEATABLE : REPEAT_ONCE;
 	}
 }
 
-RandomActionSet::~RandomActionSet()
-{
+RandomActionSet::~RandomActionSet() {
 	delete _types;
 	delete _ids;
 }
 
-RandomActionSet *RandomActionList::getRoom(uint16 roomNumber)
-{
+RandomActionSet *RandomActionList::getRoom(uint16 roomNumber) {
 	iterator i;
 	for (i = begin(); i != end(); ++i) 
 	{
@@ -810,13 +806,11 @@
 	return NULL;
 }
 
-void RandomActionList::saveToStream(Common::WriteStream *stream)
-{
+void RandomActionList::saveToStream(Common::WriteStream *stream) {
 
 }
 
-void RandomActionList::loadFromStream(Common::ReadStream *stream)
-{
+void RandomActionList::loadFromStream(Common::ReadStream *stream) {
 
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list