aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorPaul Gilbert2007-02-22 08:17:41 +0000
committerPaul Gilbert2007-02-22 08:17:41 +0000
commit0c899f82ab32c4d9da3700bbf54201db620c2ec4 (patch)
treead2f883cad43ba58b3dc6647697219cd260c2d66 /engines/lure
parent7ac767a2bae0bcc97bd46a7a29ced6b21dbc12a3 (diff)
downloadscummvm-rg350-0c899f82ab32c4d9da3700bbf54201db620c2ec4.tar.gz
scummvm-rg350-0c899f82ab32c4d9da3700bbf54201db620c2ec4.tar.bz2
scummvm-rg350-0c899f82ab32c4d9da3700bbf54201db620c2ec4.zip
Syntax fixes to conform to ScummVM coding standards
svn-id: r25781
Diffstat (limited to 'engines/lure')
-rw-r--r--engines/lure/hotspots.cpp19
-rw-r--r--engines/lure/res.cpp6
-rw-r--r--engines/lure/res_struct.cpp18
3 files changed, 14 insertions, 29 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index 25684e2e4a..da8b9bc5cd 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -2621,8 +2621,7 @@ void HotspotTickHandlers::followerAnimHandler(Hotspot &h) {
}
// Handle any pause countdown
- if (countdownCtr > 0)
- {
+ if (countdownCtr > 0) {
--countdownCtr;
standardCharacterAnimHandler(h);
return;
@@ -2637,18 +2636,15 @@ void HotspotTickHandlers::followerAnimHandler(Hotspot &h) {
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 @@ void HotspotTickHandlers::followerAnimHandler(Hotspot &h) {
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);
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 6277dab4c9..0ad28bbb86 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -287,8 +287,7 @@ void Resources::reloadData() {
// 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 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
/*
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);
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp
index c1ff323f20..6a3985e097 100644
--- a/engines/lure/res_struct.cpp
+++ b/engines/lure/res_struct.cpp
@@ -776,8 +776,7 @@ uint16 CharacterScheduleSet::getId(CharacterScheduleEntry *rec) {
// 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 @@ RandomActionSet::RandomActionSet(uint16 *&offset)
_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 @@ RandomActionSet *RandomActionList::getRoom(uint16 roomNumber)
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) {
}