aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAdrian Frühwirth2018-05-07 13:00:15 +0200
committerAdrian Frühwirth2018-05-07 20:06:29 +0200
commit4bf0eac94d65b5f5fd11c54d6c29dac058097dd7 (patch)
tree7b760cac12210d2de65a68b7cd8d954f2a2b6054 /engines
parent8885b37abb842af63e0836263b0db245530fef03 (diff)
downloadscummvm-rg350-4bf0eac94d65b5f5fd11c54d6c29dac058097dd7.tar.gz
scummvm-rg350-4bf0eac94d65b5f5fd11c54d6c29dac058097dd7.tar.bz2
scummvm-rg350-4bf0eac94d65b5f5fd11c54d6c29dac058097dd7.zip
TOON: Enforce code formatting guidelines
Diffstat (limited to 'engines')
-rw-r--r--engines/toon/hotspot.cpp16
-rw-r--r--engines/toon/hotspot.h8
-rw-r--r--engines/toon/script_func.cpp8
-rw-r--r--engines/toon/toon.cpp24
4 files changed, 28 insertions, 28 deletions
diff --git a/engines/toon/hotspot.cpp b/engines/toon/hotspot.cpp
index 04368df5ca..cdc6dc40d9 100644
--- a/engines/toon/hotspot.cpp
+++ b/engines/toon/hotspot.cpp
@@ -57,8 +57,8 @@ void Hotspots::save(Common::WriteStream *Stream) {
}
}
-int32 Hotspots::FindBasedOnCorner(int16 x, int16 y) {
- debugC(1, kDebugHotspot, "FindBasedOnCorner(%d, %d)", x, y);
+int32 Hotspots::findBasedOnCorner(int16 x, int16 y) {
+ debugC(1, kDebugHotspot, "findBasedOnCorner(%d, %d)", x, y);
for (int32 i = 0; i < _numItems; i++) {
if (x == _items[i].getX1()) {
@@ -73,8 +73,8 @@ int32 Hotspots::FindBasedOnCorner(int16 x, int16 y) {
return -1;
}
-int32 Hotspots::Find(int16 x, int16 y) {
- debugC(6, kDebugHotspot, "Find(%d, %d)", x, y);
+int32 Hotspots::find(int16 x, int16 y) {
+ debugC(6, kDebugHotspot, "find(%d, %d)", x, y);
int32 priority = -1;
int32 foundId = -1;
@@ -96,8 +96,8 @@ int32 Hotspots::Find(int16 x, int16 y) {
return foundId;
}
-bool Hotspots::LoadRif(const Common::String &rifName, const Common::String &additionalRifName) {
- debugC(1, kDebugHotspot, "LoadRif(%s, %s)", rifName.c_str(), additionalRifName.c_str());
+bool Hotspots::loadRif(const Common::String &rifName, const Common::String &additionalRifName) {
+ debugC(1, kDebugHotspot, "loadRif(%s, %s)", rifName.c_str(), additionalRifName.c_str());
uint32 size = 0;
uint8 *rifData = _vm->resources()->getFileData(rifName, &size);
@@ -139,8 +139,8 @@ bool Hotspots::LoadRif(const Common::String &rifName, const Common::String &addi
return true;
}
-HotspotData *Hotspots::Get(int32 id) {
- debugC(5, kDebugHotspot, "Get(%d)", id);
+HotspotData *Hotspots::get(int32 id) {
+ debugC(5, kDebugHotspot, "get(%d)", id);
if (id < 0 || id >= _numItems)
return 0;
diff --git a/engines/toon/hotspot.h b/engines/toon/hotspot.h
index 782d06a9fe..387007cbf6 100644
--- a/engines/toon/hotspot.h
+++ b/engines/toon/hotspot.h
@@ -50,10 +50,10 @@ public:
Hotspots(ToonEngine *vm);
~Hotspots();
- bool LoadRif(const Common::String &rifName, const Common::String &additionalRifName);
- int32 Find(int16 x, int16 y);
- int32 FindBasedOnCorner(int16 x, int16 y);
- HotspotData *Get(int32 id);
+ bool loadRif(const Common::String &rifName, const Common::String &additionalRifName);
+ int32 find(int16 x, int16 y);
+ int32 findBasedOnCorner(int16 x, int16 y);
+ HotspotData *get(int32 id);
int32 getCount() const { return _numItems; }
void load(Common::ReadStream *Stream);
diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp
index 7a8925b766..d2a9de3c02 100644
--- a/engines/toon/script_func.cpp
+++ b/engines/toon/script_func.cpp
@@ -379,9 +379,9 @@ int32 ScriptFunc::sys_Cmd_Visited_Scene(EMCState *state) {
int32 ScriptFunc::sys_Cmd_Query_Rif_Flag(EMCState *state) {
- int32 hs = _vm->getHotspots()->FindBasedOnCorner(stackPos(0), stackPos(1));
+ int32 hs = _vm->getHotspots()->findBasedOnCorner(stackPos(0), stackPos(1));
if (hs >= 0)
- return _vm->getHotspots()->Get(hs)->getData(stackPos(2));
+ return _vm->getHotspots()->get(hs)->getData(stackPos(2));
return 0;
}
@@ -472,9 +472,9 @@ int32 ScriptFunc::sys_Cmd_Say_Lines(EMCState *state) {
}
int32 ScriptFunc::sys_Cmd_Set_Rif_Flag(EMCState *state) {
- int32 hs = _vm->getHotspots()->FindBasedOnCorner(stackPos(0), stackPos(1));
+ int32 hs = _vm->getHotspots()->findBasedOnCorner(stackPos(0), stackPos(1));
if (hs >= 0)
- _vm->getHotspots()->Get(hs)->setData(stackPos(2), stackPos(3));
+ _vm->getHotspots()->get(hs)->setData(stackPos(2), stackPos(3));
return 0;
}
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 05192ae65e..248057d539 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -1559,9 +1559,9 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) {
if (state()->_locations[SceneId]._flags & 0x40) {
Common::String cutaway = state()->_locations[SceneId]._cutaway;
- _hotspots->LoadRif(locationName + ".RIC", cutaway + ".RIC");
+ _hotspots->loadRif(locationName + ".RIC", cutaway + ".RIC");
} else {
- _hotspots->LoadRif(locationName + ".RIC", "");
+ _hotspots->loadRif(locationName + ".RIC", "");
}
restoreRifFlags(_gameState->_currentScene);
@@ -1837,10 +1837,10 @@ void ToonEngine::clickEvent() {
}
// find hotspot
- int32 hot = _hotspots->Find(mouseX + state()->_currentScrollValue , _mouseY);
+ int32 hot = _hotspots->find(mouseX + state()->_currentScrollValue , _mouseY);
HotspotData *currentHot = 0;
if (hot > -1) {
- currentHot = _hotspots->Get(hot);
+ currentHot = _hotspots->get(hot);
}
if (_currentHotspotItem == -3) {
@@ -2012,9 +2012,9 @@ void ToonEngine::selectHotspot() {
}
}
- int32 hot = _hotspots->Find(mouseX + state()->_currentScrollValue, _mouseY);
+ int32 hot = _hotspots->find(mouseX + state()->_currentScrollValue, _mouseY);
if (hot != -1) {
- HotspotData *hotspot = _hotspots->Get(hot);
+ HotspotData *hotspot = _hotspots->get(hot);
int32 item = hotspot->getData(14);
if (hotspot->getType() == 3)
item += 2000;
@@ -2271,8 +2271,8 @@ void ToonEngine::storeRifFlags(int32 location) {
}
for (int32 i = 0; i < _hotspots->getCount(); i++) {
- _gameState->_locations[location]._rifBoxesFlags[i * 2 + 0] = _hotspots->Get(i)->getData(4);
- _gameState->_locations[location]._rifBoxesFlags[i * 2 + 1] = _hotspots->Get(i)->getData(7);
+ _gameState->_locations[location]._rifBoxesFlags[i * 2 + 0] = _hotspots->get(i)->getData(4);
+ _gameState->_locations[location]._rifBoxesFlags[i * 2 + 1] = _hotspots->get(i)->getData(7);
}
}
@@ -2280,8 +2280,8 @@ void ToonEngine::restoreRifFlags(int32 location) {
if (_hotspots) {
if (!_gameState->_locations[location]._visited) {
for (int32 i = 0; i < _hotspots->getCount(); i++) {
- _gameState->_locations[location]._rifBoxesFlags[i * 2 + 0] = _hotspots->Get(i)->getData(4);
- _gameState->_locations[location]._rifBoxesFlags[i * 2 + 1] = _hotspots->Get(i)->getData(7);
+ _gameState->_locations[location]._rifBoxesFlags[i * 2 + 0] = _hotspots->get(i)->getData(4);
+ _gameState->_locations[location]._rifBoxesFlags[i * 2 + 1] = _hotspots->get(i)->getData(7);
}
_gameState->_locations[location]._numRifBoxes = _hotspots->getCount();
} else {
@@ -2289,8 +2289,8 @@ void ToonEngine::restoreRifFlags(int32 location) {
return;
for (int32 i = 0; i < _hotspots->getCount(); i++) {
- _hotspots->Get(i)->setData(4, _gameState->_locations[location]._rifBoxesFlags[i * 2 + 0]);
- _hotspots->Get(i)->setData(7, _gameState->_locations[location]._rifBoxesFlags[i * 2 + 1]);
+ _hotspots->get(i)->setData(4, _gameState->_locations[location]._rifBoxesFlags[i * 2 + 0]);
+ _hotspots->get(i)->setData(7, _gameState->_locations[location]._rifBoxesFlags[i * 2 + 1]);
}
}
}