aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAndrei Prykhodko2018-06-27 22:45:45 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commitfeb3fde1cf0d026c761cda0ee05a93cfc93a38d7 (patch)
tree7a4acc11ff901fd79104ccecee02a93550f8025e /engines
parent8a606ed8a89cb4ef3d43beffb2b4225afa6ab18b (diff)
downloadscummvm-rg350-feb3fde1cf0d026c761cda0ee05a93cfc93a38d7.tar.gz
scummvm-rg350-feb3fde1cf0d026c761cda0ee05a93cfc93a38d7.tar.bz2
scummvm-rg350-feb3fde1cf0d026c761cda0ee05a93cfc93a38d7.zip
PINK: JANITORIAL: formatting fixes
Diffstat (limited to 'engines')
-rw-r--r--engines/pink/archive.cpp106
-rw-r--r--engines/pink/detection.cpp22
-rw-r--r--engines/pink/objects/actions/walk_action.cpp2
-rw-r--r--engines/pink/objects/actors/lead_actor.cpp10
-rw-r--r--engines/pink/objects/actors/lead_actor.h2
5 files changed, 70 insertions, 72 deletions
diff --git a/engines/pink/archive.cpp b/engines/pink/archive.cpp
index 331d3a3aec..a223c996b8 100644
--- a/engines/pink/archive.cpp
+++ b/engines/pink/archive.cpp
@@ -51,56 +51,56 @@ static const struct RuntimeClass {
const char *name;
int id;
} classMap[] = {
- {"ActionHide", kActionHide},
- {"ActionLoop", kActionLoop},
- {"ActionPlay", kActionPlay},
- {"ActionPlayWithSfx", kActionPlayWithSfx},
- {"ActionSfx", kActionSfx},
- {"ActionSound", kActionSound},
- {"ActionStill", kActionStill},
- {"ActionTalk", kActionTalk},
- {"ActionText", kActionText},
- {"Actor", kActor},
- {"AudioInfoPDAButton", kAudioInfoPDAButton},
- {"ConditionGameVariable", kConditionGameVariable},
- {"ConditionInventoryItemOwner", kConditionInventoryItemOwner},
- {"ConditionModuleVariable", kConditionModuleVariable},
- {"ConditionNotInventoryItemOwner", kConditionNotInventoryItemOwner},
- {"ConditionNotModuleVariable", kConditionNotModuleVariable},
- {"ConditionNotPageVariable", kConditionNotPageVariable},
- {"ConditionPageVariable", kConditionPageVariable},
- {"CursorActor", kCursorActor},
- {"GamePage", kGamePage},
- {"HandlerLeftClick", kHandlerLeftClick},
- {"HandlerStartPage", kHandlerStartPage},
- {"HandlerTimer", kHandlerTimer},
- {"HandlerTimerActions", kHandlerTimerActions},
- {"HandlerTimerSequences", kHandlerTimerSequences},
- {"HandlerUseClick", kHandlerUseClick},
- {"InventoryActor", kInventoryActor},
- {"InventoryItem", kInventoryItem},
- {"LeadActor", kLeadActor},
- {"ModuleProxy", kModuleProxy},
- {"PDAButtonActor", kPDAButtonActor},
- {"ParlSqPink", kParlSqPink},
- {"PubPink", kPubPink},
- {"SeqTimer", kSeqTimer},
- {"Sequence", kSequence},
- {"SequenceAudio", kSequenceAudio},
- {"SequenceItem", kSequenceItem},
- {"SequenceItemDefaultAction", kSequenceItemDefaultAction},
- {"SequenceItemLeader", kSequenceItemLeader},
- {"SequenceItemLeaderAudio", kSequenceItemLeaderAudio},
- {"SideEffectExit", kSideEffectExit},
- {"SideEffectGameVariable", kSideEffectGameVariable},
- {"SideEffectInventoryItemOwner", kSideEffectInventoryItemOwner},
- {"SideEffectLocation", kSideEffectLocation},
- {"SideEffectModuleVariable", kSideEffectModuleVariable},
- {"SideEffectPageVariable", kSideEffectPageVariable},
- {"SideEffectRandomPageVariable", kSideEffectRandomPageVariable},
- {"SupportingActor", kSupportingActor},
- {"WalkAction", kWalkAction},
- {"WalkLocation", kWalkLocation}
+ {"ActionHide", kActionHide},
+ {"ActionLoop", kActionLoop},
+ {"ActionPlay", kActionPlay},
+ {"ActionPlayWithSfx", kActionPlayWithSfx},
+ {"ActionSfx", kActionSfx},
+ {"ActionSound", kActionSound},
+ {"ActionStill", kActionStill},
+ {"ActionTalk", kActionTalk},
+ {"ActionText", kActionText},
+ {"Actor", kActor},
+ {"AudioInfoPDAButton", kAudioInfoPDAButton},
+ {"ConditionGameVariable", kConditionGameVariable},
+ {"ConditionInventoryItemOwner", kConditionInventoryItemOwner},
+ {"ConditionModuleVariable", kConditionModuleVariable},
+ {"ConditionNotInventoryItemOwner", kConditionNotInventoryItemOwner},
+ {"ConditionNotModuleVariable", kConditionNotModuleVariable},
+ {"ConditionNotPageVariable", kConditionNotPageVariable},
+ {"ConditionPageVariable", kConditionPageVariable},
+ {"CursorActor", kCursorActor},
+ {"GamePage", kGamePage},
+ {"HandlerLeftClick", kHandlerLeftClick},
+ {"HandlerStartPage", kHandlerStartPage},
+ {"HandlerTimer", kHandlerTimer},
+ {"HandlerTimerActions", kHandlerTimerActions},
+ {"HandlerTimerSequences", kHandlerTimerSequences},
+ {"HandlerUseClick", kHandlerUseClick},
+ {"InventoryActor", kInventoryActor},
+ {"InventoryItem", kInventoryItem},
+ {"LeadActor", kLeadActor},
+ {"ModuleProxy", kModuleProxy},
+ {"PDAButtonActor", kPDAButtonActor},
+ {"ParlSqPink", kParlSqPink},
+ {"PubPink", kPubPink},
+ {"SeqTimer", kSeqTimer},
+ {"Sequence", kSequence},
+ {"SequenceAudio", kSequenceAudio},
+ {"SequenceItem", kSequenceItem},
+ {"SequenceItemDefaultAction", kSequenceItemDefaultAction},
+ {"SequenceItemLeader", kSequenceItemLeader},
+ {"SequenceItemLeaderAudio", kSequenceItemLeaderAudio},
+ {"SideEffectExit", kSideEffectExit},
+ {"SideEffectGameVariable", kSideEffectGameVariable},
+ {"SideEffectInventoryItemOwner", kSideEffectInventoryItemOwner},
+ {"SideEffectLocation", kSideEffectLocation},
+ {"SideEffectModuleVariable", kSideEffectModuleVariable},
+ {"SideEffectPageVariable", kSideEffectPageVariable},
+ {"SideEffectRandomPageVariable", kSideEffectRandomPageVariable},
+ {"SupportingActor", kSupportingActor},
+ {"WalkAction", kWalkAction},
+ {"WalkLocation", kWalkLocation}
};
static Object *createObject(int objectId) {
@@ -266,12 +266,10 @@ Object *Archive::parseObject(bool &isCopyReturned) {
isCopyReturned = false;
} else if ((obTag & 0x8000) == 0) {
-
res = _objectMap[obTag];
isCopyReturned = true;
} else {
-
obTag &= ~0x8000;
objectId = _objectIdMap[obTag];
@@ -287,11 +285,11 @@ Object *Archive::parseObject(bool &isCopyReturned) {
}
static int runtimeClassCmp(const void *key, const void *elem) {
- return strcmp((const char *) key, *(const char **) elem);
+ return strcmp((const char *)key, *(const char **)elem);
}
uint Archive::findObjectId(const char *name) {
- RuntimeClass *found = (RuntimeClass *)bsearch(name, classMap, sizeof(classMap) / sizeof(RuntimeClass) , sizeof(RuntimeClass), runtimeClassCmp);
+ RuntimeClass *found = (RuntimeClass *)bsearch(name, classMap, sizeof(classMap) / sizeof(RuntimeClass), sizeof(RuntimeClass), runtimeClassCmp);
if (!found)
error("Class %s is not in class Map", name);
diff --git a/engines/pink/detection.cpp b/engines/pink/detection.cpp
index 28af99798a..3e3e177841 100644
--- a/engines/pink/detection.cpp
+++ b/engines/pink/detection.cpp
@@ -25,9 +25,9 @@
#include "pink/pink.h"
static const PlainGameDescriptor pinkGames[] = {
- {"peril", "The Pink Panther: Passport to Peril"},
- {"pokus", "The Pink Panther: Hokus Pokus Pink"},
- {0, 0}
+ {"peril", "The Pink Panther: Passport to Peril"},
+ {"pokus", "The Pink Panther: Hokus Pokus Pink"},
+ {0, 0}
};
#include "detection_tables.h"
@@ -64,14 +64,14 @@ public:
bool PinkMetaEngine::hasFeature(MetaEngineFeature f) const {
return
- (f == kSupportsListSaves) ||
- (f == kSupportsDeleteSave) ||
- (f == kSavesSupportMetaInfo) ||
- (f == kSavesSupportThumbnail) ||
- (f == kSavesSupportCreationDate) ||
- (f == kSavesSupportPlayTime) ||
- (f == kSupportsLoadingDuringStartup) ||
- (f == kSimpleSavesNames);
+ (f == kSupportsListSaves) ||
+ (f == kSupportsDeleteSave) ||
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail) ||
+ (f == kSavesSupportCreationDate) ||
+ (f == kSavesSupportPlayTime) ||
+ (f == kSupportsLoadingDuringStartup) ||
+ (f == kSimpleSavesNames);
}
SaveStateList PinkMetaEngine::listSaves(const char *target) const {
diff --git a/engines/pink/objects/actions/walk_action.cpp b/engines/pink/objects/actions/walk_action.cpp
index cc02ef611e..167cdec8cd 100644
--- a/engines/pink/objects/actions/walk_action.cpp
+++ b/engines/pink/objects/actions/walk_action.cpp
@@ -49,7 +49,7 @@ void WalkAction::onStart() {
_frameCount = _decoder.getFrameCount();
}
else {
- _frameCount = (uint) abs(3 * (_start.x - _end.x) / (int)_z);
+ _frameCount = (uint)abs(3 * (_start.x - _end.x) / (int)_z);
if (!_frameCount)
_frameCount = 1;
}
diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp
index 8c8f968bfb..ce0ceb11da 100644
--- a/engines/pink/objects/actors/lead_actor.cpp
+++ b/engines/pink/objects/actors/lead_actor.cpp
@@ -483,16 +483,16 @@ bool PubPink::sendUseClickMessage(Actor *actor) {
const char *roundName;
switch (_round++ % 3) {
- case 0:
+ case 0:
roundName = kFirstRound;
break;
- case 1:
+ case 1:
roundName = kSecondRound;
break;
- case 2:
+ case 2:
roundName = kThirdRound;
break;
- default:
+ default:
roundName = nullptr;
assert(0);
}
@@ -500,7 +500,7 @@ bool PubPink::sendUseClickMessage(Actor *actor) {
}
if (playingMiniGame())
- _isHaveItem = true;
+ _isHaveItem = true;
return true;
}
diff --git a/engines/pink/objects/actors/lead_actor.h b/engines/pink/objects/actors/lead_actor.h
index d7cafb021f..4275578b85 100644
--- a/engines/pink/objects/actors/lead_actor.h
+++ b/engines/pink/objects/actors/lead_actor.h
@@ -86,7 +86,7 @@ public:
bool isInteractingWith(Actor *actor);
- void setNextExecutors (const Common::String &nextModule, const Common::String &nextPage);
+ void setNextExecutors(const Common::String &nextModule, const Common::String &nextPage);
State getState() const { return _state; }