aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorĽubomír Remák2018-03-09 22:42:20 +0100
committerEugene Sandulenko2018-08-25 23:12:01 +0200
commit5854d310eee2c4a6fc4d189009631d4042ce0df8 (patch)
tree8023c7933051afa020da7ded94908bf42e8cedf0 /engines
parentd3e281e24cb0ce522dc943b2d2a6bdde0766b62c (diff)
downloadscummvm-rg350-5854d310eee2c4a6fc4d189009631d4042ce0df8.tar.gz
scummvm-rg350-5854d310eee2c4a6fc4d189009631d4042ce0df8.tar.bz2
scummvm-rg350-5854d310eee2c4a6fc4d189009631d4042ce0df8.zip
MUTATIONOFJB: Fix some code formatting issues.
Diffstat (limited to 'engines')
-rw-r--r--engines/mutationofjb/commands/changecommand.h8
-rw-r--r--engines/mutationofjb/commands/endblockcommand.cpp2
-rw-r--r--engines/mutationofjb/commands/ifcommand.cpp4
-rw-r--r--engines/mutationofjb/commands/seqcommand.cpp2
-rw-r--r--engines/mutationofjb/commands/seqcommand.h3
-rw-r--r--engines/mutationofjb/game.cpp6
-rw-r--r--engines/mutationofjb/game.h3
-rw-r--r--engines/mutationofjb/inventory.cpp1
-rw-r--r--engines/mutationofjb/mutationofjb.cpp8
-rw-r--r--engines/mutationofjb/room.cpp2
-rw-r--r--engines/mutationofjb/script.cpp4
-rw-r--r--engines/mutationofjb/script.h2
-rw-r--r--engines/mutationofjb/util.cpp12
-rw-r--r--engines/mutationofjb/util.h4
14 files changed, 29 insertions, 32 deletions
diff --git a/engines/mutationofjb/commands/changecommand.h b/engines/mutationofjb/commands/changecommand.h
index d590fa5518..af9a608e03 100644
--- a/engines/mutationofjb/commands/changecommand.h
+++ b/engines/mutationofjb/commands/changecommand.h
@@ -110,7 +110,7 @@ public:
class ChangeDoorCommand : public ChangeCommand {
public:
- ChangeDoorCommand(uint8 sceneId, uint8 doorId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue& val)
+ ChangeDoorCommand(uint8 sceneId, uint8 doorId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue &val)
: ChangeCommand(sceneId, doorId, reg, op, val)
{}
virtual ExecuteResult execute(GameData &gameData) override;
@@ -119,7 +119,7 @@ public:
class ChangeObjectCommand : public ChangeCommand {
public:
- ChangeObjectCommand(uint8 sceneId, uint8 objectId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue& val)
+ ChangeObjectCommand(uint8 sceneId, uint8 objectId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue &val)
: ChangeCommand(sceneId, objectId, reg, op, val)
{}
virtual ExecuteResult execute(GameData &gameData) override;
@@ -128,7 +128,7 @@ public:
class ChangeStaticCommand : public ChangeCommand {
public:
- ChangeStaticCommand(uint8 sceneId, uint8 staticId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue& val)
+ ChangeStaticCommand(uint8 sceneId, uint8 staticId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue &val)
: ChangeCommand(sceneId, staticId, reg, op, val)
{}
virtual ExecuteResult execute(GameData &gameData) override;
@@ -137,7 +137,7 @@ public:
class ChangeSceneCommand : public ChangeCommand {
public:
- ChangeSceneCommand(uint8 sceneId, uint8 staticId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue& val)
+ ChangeSceneCommand(uint8 sceneId, uint8 staticId, ChangeRegister reg, ChangeOperation op, const ChangeCommandValue &val)
: ChangeCommand(sceneId, staticId, reg, op, val)
{}
virtual ExecuteResult execute(GameData &gameData) override;
diff --git a/engines/mutationofjb/commands/endblockcommand.cpp b/engines/mutationofjb/commands/endblockcommand.cpp
index af9282f81c..2f1901ddce 100644
--- a/engines/mutationofjb/commands/endblockcommand.cpp
+++ b/engines/mutationofjb/commands/endblockcommand.cpp
@@ -28,7 +28,7 @@
namespace MutationOfJB {
-bool EndBlockCommandParser::parse(const Common::String &line, ScriptParseContext &parseCtx, Command *& command) {
+bool EndBlockCommandParser::parse(const Common::String &line, ScriptParseContext &parseCtx, Command *&command) {
if (line.empty()) {
return false;
}
diff --git a/engines/mutationofjb/commands/ifcommand.cpp b/engines/mutationofjb/commands/ifcommand.cpp
index a2816c7edd..da8efc1846 100644
--- a/engines/mutationofjb/commands/ifcommand.cpp
+++ b/engines/mutationofjb/commands/ifcommand.cpp
@@ -94,12 +94,12 @@ IfCommand::IfCommand(uint8 sceneId, uint8 objectId, uint16 value, bool negative)
{}
Command::ExecuteResult IfCommand::execute(GameData &gameData) {
- Scene* const scene = gameData.getScene(_sceneId);
+ Scene *const scene = gameData.getScene(_sceneId);
if (!scene) {
return Finished;
}
- Object* const object = scene->getObject(_objectId);
+ Object *const object = scene->getObject(_objectId);
if (!object) {
return Finished;
}
diff --git a/engines/mutationofjb/commands/seqcommand.cpp b/engines/mutationofjb/commands/seqcommand.cpp
index 6c167e946a..03d9538145 100644
--- a/engines/mutationofjb/commands/seqcommand.cpp
+++ b/engines/mutationofjb/commands/seqcommand.cpp
@@ -25,7 +25,7 @@
namespace MutationOfJB {
-void SeqCommandParser::transition(ScriptParseContext &, Command * oldCommand, Command * newCommand, CommandParser *) {
+void SeqCommandParser::transition(ScriptParseContext &, Command *oldCommand, Command *newCommand, CommandParser *) {
if (!oldCommand || !newCommand) {
warning(_("Unexpected empty command in transition"));
return;
diff --git a/engines/mutationofjb/commands/seqcommand.h b/engines/mutationofjb/commands/seqcommand.h
index 0fa30abaad..c3455cec89 100644
--- a/engines/mutationofjb/commands/seqcommand.h
+++ b/engines/mutationofjb/commands/seqcommand.h
@@ -28,8 +28,7 @@
namespace MutationOfJB {
-class SeqCommandParser : public CommandParser
-{
+class SeqCommandParser : public CommandParser {
public:
virtual void transition(ScriptParseContext &parseCtx, Command *oldCommand, Command *newCommand, CommandParser *newCommandParser) override;
};
diff --git a/engines/mutationofjb/game.cpp b/engines/mutationofjb/game.cpp
index c79f8d95b1..4b6d98e77b 100644
--- a/engines/mutationofjb/game.cpp
+++ b/engines/mutationofjb/game.cpp
@@ -27,8 +27,7 @@
namespace MutationOfJB {
-static bool readString(Common::ReadStream &stream, char *str)
-{
+static bool readString(Common::ReadStream &stream, char *str) {
char buf[MAX_STR_LENGTH];
memset(str, 0, MAX_STR_LENGTH + 1);
@@ -172,8 +171,7 @@ Static *Scene::getStatic(uint8 staticId) {
GameData::GameData() : _currentScene(0) {}
-Scene *GameData::getScene(uint8 sceneId)
-{
+Scene *GameData::getScene(uint8 sceneId) {
if (sceneId == 0 || sceneId > ARRAYSIZE(_scenes)) {
warning(_("Scene %d does not exist"), sceneId);
return nullptr;
diff --git a/engines/mutationofjb/game.h b/engines/mutationofjb/game.h
index 550be2efc8..26f4d3823d 100644
--- a/engines/mutationofjb/game.h
+++ b/engines/mutationofjb/game.h
@@ -144,8 +144,7 @@ struct Scene {
bool loadFromStream(Common::ReadStream &stream);
};
-struct GameData
-{
+struct GameData {
public:
GameData();
Scene *getScene(uint8 sceneId);
diff --git a/engines/mutationofjb/inventory.cpp b/engines/mutationofjb/inventory.cpp
index 0f91a93203..8dcec8d9b5 100644
--- a/engines/mutationofjb/inventory.cpp
+++ b/engines/mutationofjb/inventory.cpp
@@ -60,7 +60,6 @@ void Inventory::rotateItemsRight(uint n) {
}
n %= _items.size();
-
reverseItems(0, _items.size() - 1);
reverseItems(0, n - 1);
reverseItems(n, _items.size() - 1);
diff --git a/engines/mutationofjb/mutationofjb.cpp b/engines/mutationofjb/mutationofjb.cpp
index 3576fd5ca8..17ff7b5018 100644
--- a/engines/mutationofjb/mutationofjb.cpp
+++ b/engines/mutationofjb/mutationofjb.cpp
@@ -47,8 +47,7 @@ MutationOfJBEngine::MutationOfJBEngine(OSystem *syst)
_room(nullptr),
_screen(nullptr),
_globalScript(nullptr),
- _localScript(nullptr)
-{
+ _localScript(nullptr) {
debug("MutationOfJBEngine::MutationOfJBEngine");
}
@@ -72,8 +71,7 @@ bool MutationOfJBEngine::loadGameData(bool partB) {
return true;
}
-void MutationOfJBEngine::setupCursor()
-{
+void MutationOfJBEngine::setupCursor() {
const uint8 white[] = {0xFF, 0xFF, 0xFF};
const uint8 cursor[] = {0xFF};
@@ -120,7 +118,7 @@ Common::Error MutationOfJBEngine::run() {
}
case Common::EVENT_LBUTTONDOWN:
{
- const Scene* const scene = _gameData->getScene(_gameData->_currentScene);
+ const Scene *const scene = _gameData->getScene(_gameData->_currentScene);
if (scene) {
for (int i = 0; i < MIN(ARRAYSIZE(scene->_doors), (int) scene->_noDoors); ++i) {
const Door &door = scene->_doors[i];
diff --git a/engines/mutationofjb/room.cpp b/engines/mutationofjb/room.cpp
index eae430a1d5..8d8fbdbafb 100644
--- a/engines/mutationofjb/room.cpp
+++ b/engines/mutationofjb/room.cpp
@@ -98,7 +98,7 @@ void Room::loadPalette(EncryptedFile &file) {
void Room::loadBackground(EncryptedFile &file, uint32 size) {
_screen->clear();
- uint8 * const pixels = static_cast<uint8 *>(_screen->getPixels());
+ uint8 *const pixels = static_cast<uint8 *>(_screen->getPixels());
uint8 *ptr = pixels;
uint32 readBytes = 0;
uint32 lines = 0;
diff --git a/engines/mutationofjb/script.cpp b/engines/mutationofjb/script.cpp
index 1b11545741..5f4b526966 100644
--- a/engines/mutationofjb/script.cpp
+++ b/engines/mutationofjb/script.cpp
@@ -37,8 +37,8 @@
namespace MutationOfJB {
-static CommandParser** getParsers() {
- static CommandParser* parsers[] = {
+static CommandParser **getParsers() {
+ static CommandParser *parsers[] = {
new IfCommandParser,
new EndBlockCommandParser,
new ChangeDoorCommandParser,
diff --git a/engines/mutationofjb/script.h b/engines/mutationofjb/script.h
index be04dc5e85..275ed78b1b 100644
--- a/engines/mutationofjb/script.h
+++ b/engines/mutationofjb/script.h
@@ -34,7 +34,7 @@ namespace MutationOfJB {
class Command;
class ConditionalCommand;
-typedef Common::Array<Command*> Commands;
+typedef Common::Array<Command *> Commands;
struct ActionInfo {
diff --git a/engines/mutationofjb/util.cpp b/engines/mutationofjb/util.cpp
index 41d2a3a039..0878748d42 100644
--- a/engines/mutationofjb/util.cpp
+++ b/engines/mutationofjb/util.cpp
@@ -26,10 +26,12 @@
#include "engines/engine.h"
namespace MutationOfJB {
- void reportFileMissingError(const char *fileName) {
- Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), fileName);
- GUIErrorMessage(errorMessage);
- warning("%s", errorMessage.c_str());
- }
+
+void reportFileMissingError(const char *fileName) {
+ Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), fileName);
+ GUIErrorMessage(errorMessage);
+ warning("%s", errorMessage.c_str());
+}
+
}
diff --git a/engines/mutationofjb/util.h b/engines/mutationofjb/util.h
index 7dd74953ec..95a896d336 100644
--- a/engines/mutationofjb/util.h
+++ b/engines/mutationofjb/util.h
@@ -24,7 +24,9 @@
#define MUTATIONOFJB_UTIL_H
namespace MutationOfJB {
- void reportFileMissingError(const char *fileName);
+
+void reportFileMissingError(const char *fileName);
+
}
#endif