aboutsummaryrefslogtreecommitdiff
path: root/engines/pink
diff options
context:
space:
mode:
authorEugene Sandulenko2018-06-20 13:58:00 +0200
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commitc3e1157d18022795f23b37a876ae51e31c38adba (patch)
treecafefec29b7db1e84511a17426432b602a68f4e5 /engines/pink
parent5142ed203c241386b620237d7fd8814d9273dac2 (diff)
downloadscummvm-rg350-c3e1157d18022795f23b37a876ae51e31c38adba.tar.gz
scummvm-rg350-c3e1157d18022795f23b37a876ae51e31c38adba.tar.bz2
scummvm-rg350-c3e1157d18022795f23b37a876ae51e31c38adba.zip
PINK: JANITORIAL: More formatting fixes
Diffstat (limited to 'engines/pink')
-rw-r--r--engines/pink/archive.cpp4
-rw-r--r--engines/pink/cel_decoder.cpp14
-rw-r--r--engines/pink/cursor_mgr.cpp2
-rw-r--r--engines/pink/director.cpp2
-rw-r--r--engines/pink/director.h4
-rw-r--r--engines/pink/file.cpp8
-rw-r--r--engines/pink/objects/actions/action.cpp2
-rw-r--r--engines/pink/objects/actions/action_play_with_sfx.cpp2
-rw-r--r--engines/pink/objects/actors/actor.cpp2
-rw-r--r--engines/pink/objects/actors/lead_actor.cpp6
-rw-r--r--engines/pink/objects/inventory.h2
-rw-r--r--engines/pink/objects/pages/game_page.cpp10
-rw-r--r--engines/pink/objects/sequences/seq_timer.cpp2
-rw-r--r--engines/pink/objects/sequences/sequence.cpp4
-rw-r--r--engines/pink/objects/sequences/sequence_context.cpp2
-rw-r--r--engines/pink/objects/walk/walk_mgr.cpp2
-rw-r--r--engines/pink/pda_mgr.cpp5
-rw-r--r--engines/pink/resource_mgr.cpp2
18 files changed, 38 insertions, 37 deletions
diff --git a/engines/pink/archive.cpp b/engines/pink/archive.cpp
index 2c156c2dc9..c96cd8fa15 100644
--- a/engines/pink/archive.cpp
+++ b/engines/pink/archive.cpp
@@ -104,7 +104,7 @@ static const struct RuntimeClass {
{"WalkLocation", kWalkLocation}
};
-static Object* createObject(int objectId) {
+static Object *createObject(int objectId) {
switch (objectId) {
case kActionHide:
return new ActionHide;
@@ -303,7 +303,7 @@ static int runtimeClassCmp(const void *key, const void *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/cel_decoder.cpp b/engines/pink/cel_decoder.cpp
index 5dbe9430c0..77aedc459b 100644
--- a/engines/pink/cel_decoder.cpp
+++ b/engines/pink/cel_decoder.cpp
@@ -55,33 +55,33 @@ bool CelDecoder::loadStream(Common::SeekableReadStream *stream) {
uint16 CelDecoder::getTransparentColourIndex() {
- CelVideoTrack *track = (CelVideoTrack*) getTrack(0);
+ CelVideoTrack *track = (CelVideoTrack *)getTrack(0);
if (!track)
return 0;
return track->getTransparentColourIndex();
}
const Graphics::Surface *CelDecoder::getCurrentFrame() {
- CelVideoTrack *track = (CelVideoTrack*) getTrack(0);
+ CelVideoTrack *track = (CelVideoTrack *)getTrack(0);
if (!track)
return 0;
return track->getCurrentFrame();
}
Common::Point CelDecoder::getCenter() {
- CelVideoTrack *track = (CelVideoTrack*) getTrack(0);
+ CelVideoTrack *track = (CelVideoTrack *)getTrack(0);
if (!track)
return Common::Point(0, 0);
return track->getCenter();
}
void CelDecoder::skipFrame() {
- CelVideoTrack *track = (CelVideoTrack*) getTrack(0);
+ CelVideoTrack *track = (CelVideoTrack *)getTrack(0);
track->skipFrame();
}
void CelDecoder::setEndOfTrack() {
- CelVideoTrack *track = (CelVideoTrack*) getTrack(0);
+ CelVideoTrack *track = (CelVideoTrack *)getTrack(0);
track->setEndOfTrack();
}
@@ -170,7 +170,7 @@ void CelDecoder::CelVideoTrack::skipFrame() {
}
if (_curFrame == 0)
- _transparentColourIndex = *(byte*)_surface->getBasePtr(0,0);
+ _transparentColourIndex = *(byte *)_surface->getBasePtr(0,0);
}
@@ -201,7 +201,7 @@ const Graphics::Surface *CelDecoder::CelVideoTrack::decodeNextFrame() {
}
if (_curFrame == 0)
- _transparentColourIndex = *(byte*)_surface->getBasePtr(0,0);
+ _transparentColourIndex = *(byte *)_surface->getBasePtr(0,0);
return _surface;
}
diff --git a/engines/pink/cursor_mgr.cpp b/engines/pink/cursor_mgr.cpp
index 084578a9c3..fe70c9fc45 100644
--- a/engines/pink/cursor_mgr.cpp
+++ b/engines/pink/cursor_mgr.cpp
@@ -97,7 +97,7 @@ void CursorMgr::startAnimation(uint index) {
void CursorMgr::showItem(const Common::String &itemName, const Common::Point point) {
if (!_actor)
- _actor = static_cast<CursorActor*>(_page->findActor(kCursor));
+ _actor = static_cast<CursorActor *>(_page->findActor(kCursor));
_actor->setCursorItem(itemName, point);
}
diff --git a/engines/pink/director.cpp b/engines/pink/director.cpp
index fb298b9cef..221118588e 100644
--- a/engines/pink/director.cpp
+++ b/engines/pink/director.cpp
@@ -107,7 +107,7 @@ Actor *Director::getActorByPoint(const Common::Point point) {
const Graphics::Surface *frame = decoder->getCurrentFrame();
const Common::Rect &rect = _sprites[i]->getBounds();
if (rect.contains(point)) {
- byte spritePixel = *(const byte*) frame->getBasePtr(point.x - rect.left, point.y - rect.top);
+ byte spritePixel = *(const byte *)frame->getBasePtr(point.x - rect.left, point.y - rect.top);
if (spritePixel != decoder->getTransparentColourIndex())
return _sprites[i]->getActor();
}
diff --git a/engines/pink/director.h b/engines/pink/director.h
index 9c8945225d..3fdb7539ca 100644
--- a/engines/pink/director.h
+++ b/engines/pink/director.h
@@ -50,8 +50,8 @@ public:
void addDirtyRect(const Common::Rect &rect);
void addDirtyRects(ActionCEL *sprite);
- void addSound(ActionSound* sound) { _sounds.push_back(sound); };
- void removeSound(ActionSound* sound);
+ void addSound(ActionSound *sound) { _sounds.push_back(sound); };
+ void removeSound(ActionSound *sound);
void clear();
diff --git a/engines/pink/file.cpp b/engines/pink/file.cpp
index 34a7218642..c0a24c10b4 100644
--- a/engines/pink/file.cpp
+++ b/engines/pink/file.cpp
@@ -28,7 +28,7 @@ void ObjectDescription::load(Common::File &file) {
file.read(name, sizeof(name));
objectsOffset = file.readUint32LE();
- /*objectsCount*/ file.readUint32LE();
+ /* objectsCount = */ file.readUint32LE();
resourcesOffset = file.readUint32LE();
resourcesCount = file.readUint32LE();
}
@@ -80,7 +80,7 @@ bool OrbFile::open(const Common::String &name) {
void OrbFile::loadGame(PinkEngine *game) {
seekToObject(kPinkGame);
Archive archive(this);
- archive.mapObject(reinterpret_cast<Object*>(game)); // hack
+ archive.mapObject(reinterpret_cast<Object *>(game)); // hack
game->load(archive);
}
@@ -97,11 +97,11 @@ void OrbFile::loadObject(Object *obj, ObjectDescription *objDesc) {
}
static int objDescComp(const void *a, const void *b) {
- return scumm_stricmp((char *) a, (char *) b);
+ return scumm_stricmp((char *)a, (char *)b);
}
ObjectDescription *OrbFile::getObjDesc(const char *name) {
- ObjectDescription *desc = (ObjectDescription*) bsearch(name, _table, _tableSize, sizeof(ObjectDescription), objDescComp);
+ ObjectDescription *desc = (ObjectDescription *)bsearch(name, _table, _tableSize, sizeof(ObjectDescription), objDescComp);
assert(desc != nullptr);
return desc;
}
diff --git a/engines/pink/objects/actions/action.cpp b/engines/pink/objects/actions/action.cpp
index 24233ad253..6a306b94c7 100644
--- a/engines/pink/objects/actions/action.cpp
+++ b/engines/pink/objects/actions/action.cpp
@@ -28,7 +28,7 @@ namespace Pink {
void Action::deserialize(Archive &archive) {
NamedObject::deserialize(archive);
- _actor = static_cast<Actor*>(archive.readObject());
+ _actor = static_cast<Actor *>(archive.readObject());
}
bool Action::initPalette(Director *director) {
diff --git a/engines/pink/objects/actions/action_play_with_sfx.cpp b/engines/pink/objects/actions/action_play_with_sfx.cpp
index 2e94098f39..b70cb56086 100644
--- a/engines/pink/objects/actions/action_play_with_sfx.cpp
+++ b/engines/pink/objects/actions/action_play_with_sfx.cpp
@@ -74,7 +74,7 @@ void ActionSfx::deserialize(Pink::Archive &archive) {
_volume = archive.readDWORD();
assert(_volume <= 100);
_sfxName = archive.readString();
- _sprite = (ActionPlayWithSfx*) archive.readObject();
+ _sprite = (ActionPlayWithSfx *)archive.readObject();
}
void ActionSfx::toConsole() {
diff --git a/engines/pink/objects/actors/actor.cpp b/engines/pink/objects/actors/actor.cpp
index 0fc6e89a3c..4a70e1daef 100644
--- a/engines/pink/objects/actors/actor.cpp
+++ b/engines/pink/objects/actors/actor.cpp
@@ -41,7 +41,7 @@ Actor::~Actor() {
void Actor::deserialize(Archive &archive) {
NamedObject::deserialize(archive);
- _page = static_cast<Page*>(archive.readObject());
+ _page = static_cast<Page *>(archive.readObject());
_actions.deserialize(archive);
}
diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp
index 4168568b98..872428d926 100644
--- a/engines/pink/objects/actors/lead_actor.cpp
+++ b/engines/pink/objects/actors/lead_actor.cpp
@@ -41,9 +41,9 @@ LeadActor::LeadActor()
void LeadActor::deserialize(Archive &archive) {
_state = kReady;
Actor::deserialize(archive);
- _cursorMgr = static_cast<CursorMgr*>(archive.readObject());
- _walkMgr = static_cast<WalkMgr*>(archive.readObject());
- _sequencer = static_cast<Sequencer*>(archive.readObject());
+ _cursorMgr = static_cast<CursorMgr *>(archive.readObject());
+ _walkMgr = static_cast<WalkMgr *>(archive.readObject());
+ _sequencer = static_cast<Sequencer *>(archive.readObject());
}
void LeadActor::toConsole() {
diff --git a/engines/pink/objects/inventory.h b/engines/pink/objects/inventory.h
index c9357fc62a..15c21bf153 100644
--- a/engines/pink/objects/inventory.h
+++ b/engines/pink/objects/inventory.h
@@ -62,7 +62,7 @@ public:
bool start(bool paused);
void setLeadActor(LeadActor *lead) { _lead = lead; }
- InventoryItem* findInventoryItem(const Common::String &name);
+ InventoryItem *findInventoryItem(const Common::String &name);
bool isPinkOwnsAnyItems();
void setItemOwner(const Common::String &owner, InventoryItem *item);
diff --git a/engines/pink/objects/pages/game_page.cpp b/engines/pink/objects/pages/game_page.cpp
index 4c05da012e..5b69be1dd3 100644
--- a/engines/pink/objects/pages/game_page.cpp
+++ b/engines/pink/objects/pages/game_page.cpp
@@ -50,8 +50,8 @@ void GamePage::toConsole() {
void GamePage::deserialize(Archive &archive) {
Page::deserialize(archive);
- _module = static_cast<Module*>(archive.readObject());
- assert(dynamic_cast<Module*>(_module) != 0);
+ _module = static_cast<Module *>(archive.readObject());
+ assert(dynamic_cast<Module *>(_module) != 0);
}
void GamePage::load(Archive &archive) {
@@ -62,7 +62,7 @@ void GamePage::load(Archive &archive) {
Page::load(archive);
- _leadActor = static_cast<LeadActor*>(archive.readObject());
+ _leadActor = static_cast<LeadActor *>(archive.readObject());
_walkMgr->deserialize(archive);
_sequencer->deserialize(archive);
@@ -131,7 +131,7 @@ void GamePage::setVariable(Common::String &variable, Common::String &value) {
}
void GamePage::loadStateFromMem() {
- Archive archive(static_cast<Common::SeekableReadStream*>(_memFile));
+ Archive archive(static_cast<Common::SeekableReadStream *>(_memFile));
_variables.deserialize(archive);
for (uint i = 0; i < _actors.size(); ++i) {
@@ -141,7 +141,7 @@ void GamePage::loadStateFromMem() {
void GamePage::saveStateToMem() {
_memFile = new Common::MemoryReadWriteStream(DisposeAfterUse::YES);
- Archive archive(static_cast<Common::WriteStream*>(_memFile));
+ Archive archive(static_cast<Common::WriteStream *>(_memFile));
_variables.serialize(archive);
for (uint i = 0; i < _actors.size(); ++i) {
diff --git a/engines/pink/objects/sequences/seq_timer.cpp b/engines/pink/objects/sequences/seq_timer.cpp
index 8d639acb85..c1eff0765f 100644
--- a/engines/pink/objects/sequences/seq_timer.cpp
+++ b/engines/pink/objects/sequences/seq_timer.cpp
@@ -38,7 +38,7 @@ void SeqTimer::deserialize(Archive &archive) {
_actor = archive.readString();
_period = archive.readDWORD();
_range = archive.readDWORD();
- _sequencer = static_cast<Sequencer*>(archive.readObject());
+ _sequencer = static_cast<Sequencer *>(archive.readObject());
}
void SeqTimer::toConsole() {
diff --git a/engines/pink/objects/sequences/sequence.cpp b/engines/pink/objects/sequences/sequence.cpp
index a700e99196..3c0c69d269 100644
--- a/engines/pink/objects/sequences/sequence.cpp
+++ b/engines/pink/objects/sequences/sequence.cpp
@@ -45,7 +45,7 @@ Sequence::~Sequence() {
void Sequence::deserialize(Archive &archive) {
NamedObject::deserialize(archive);
- _sequencer = static_cast<Sequencer*>(archive.readObject());
+ _sequencer = static_cast<Sequencer *>(archive.readObject());
_items.deserialize(archive);
}
@@ -144,7 +144,7 @@ void SequenceAudio::start(bool loadingSave) {
Sequence::start(loadingSave);
uint index = _context->getNextItemIndex();
if (index < _items.size()) {
- SequenceItemLeaderAudio* leaderAudio = (SequenceItemLeaderAudio*) _items[index];
+ SequenceItemLeaderAudio *leaderAudio = (SequenceItemLeaderAudio *) _items[index];
_sample = leaderAudio->getSample();
}
}
diff --git a/engines/pink/objects/sequences/sequence_context.cpp b/engines/pink/objects/sequences/sequence_context.cpp
index 2e48554325..2c8d10d7fb 100644
--- a/engines/pink/objects/sequences/sequence_context.cpp
+++ b/engines/pink/objects/sequences/sequence_context.cpp
@@ -46,7 +46,7 @@ SequenceContext::SequenceContext(Sequence *sequence)
_segment(1), _actor(nullptr)
{
sequence->setContext(this);
- Common::Array<SequenceItem*> &items = sequence->getItems();
+ Common::Array<SequenceItem *> &items = sequence->getItems();
debug("SequenceContext for %s", _sequence->getName().c_str());
for (uint i = 0; i < items.size(); ++i) {
diff --git a/engines/pink/objects/walk/walk_mgr.cpp b/engines/pink/objects/walk/walk_mgr.cpp
index 7e88ac95cf..e9d2bb06c9 100644
--- a/engines/pink/objects/walk/walk_mgr.cpp
+++ b/engines/pink/objects/walk/walk_mgr.cpp
@@ -98,7 +98,7 @@ WalkAction *WalkMgr::getWalkAction() {
Action *action = _leadActor->findAction(walkActionName);
- return static_cast<WalkAction*>(action);
+ return static_cast<WalkAction *>(action);
}
double WalkMgr::getLengthBetweenLocations(WalkLocation *first, WalkLocation *second) {
diff --git a/engines/pink/pda_mgr.cpp b/engines/pink/pda_mgr.cpp
index 1b7b8dddba..db6f1e4d49 100644
--- a/engines/pink/pda_mgr.cpp
+++ b/engines/pink/pda_mgr.cpp
@@ -77,9 +77,10 @@ void PDAMgr::onLeftButtonClick(Common::Point point) {
void PDAMgr::onMouseMove(Common::Point point) {
Actor *actor = _game->getDirector()->getActorByPoint(point);
- if (actor && dynamic_cast<PDAButtonActor*>(actor))
+ if (actor && dynamic_cast<PDAButtonActor *>(actor))
actor->onMouseOver(point, &_cursorMgr);
- else _cursorMgr.setCursor(kPDADefaultCursor, point,Common::String());
+ else
+ _cursorMgr.setCursor(kPDADefaultCursor, point,Common::String());
}
void PDAMgr::close() {
diff --git a/engines/pink/resource_mgr.cpp b/engines/pink/resource_mgr.cpp
index 35aecb7106..90cf4aa109 100644
--- a/engines/pink/resource_mgr.cpp
+++ b/engines/pink/resource_mgr.cpp
@@ -68,7 +68,7 @@ static int resDescComp(const void *a, const void *b) {
Common::SafeSeekableSubReadStream *ResourceMgr::getResourceStream(const Common::String &name) {
Common::SeekableReadStream *stream;
- ResourceDescription *desc = (ResourceDescription*) bsearch(name.c_str(), _resDescTable, _resCount, sizeof(ResourceDescription), resDescComp);
+ ResourceDescription *desc = (ResourceDescription *)bsearch(name.c_str(), _resDescTable, _resCount, sizeof(ResourceDescription), resDescComp);
if (desc->inBro)
stream = _game->getBro();