aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2014-05-27 00:58:25 +0200
committerJohannes Schickel2014-05-27 00:58:25 +0200
commit9866aba2e43da914a17d17b695456ca25a875469 (patch)
tree205c6a554d622cbcd6b60462c5fc6105d7071b09
parent57c5656169d4736e2867aad60983b9a9ad9400a3 (diff)
downloadscummvm-rg350-9866aba2e43da914a17d17b695456ca25a875469.tar.gz
scummvm-rg350-9866aba2e43da914a17d17b695456ca25a875469.tar.bz2
scummvm-rg350-9866aba2e43da914a17d17b695456ca25a875469.zip
MADS: Slight formatting fixes.
-rw-r--r--engines/mads/dialogs.cpp16
-rw-r--r--engines/mads/dragonsphere/game_dragonsphere.cpp3
-rw-r--r--engines/mads/dragonsphere/game_dragonsphere.h2
-rw-r--r--engines/mads/game.cpp5
-rw-r--r--engines/mads/game_data.h2
-rw-r--r--engines/mads/inventory.h2
-rw-r--r--engines/mads/messages.cpp3
-rw-r--r--engines/mads/nebular/game_nebular.cpp3
-rw-r--r--engines/mads/nebular/game_nebular.h2
-rw-r--r--engines/mads/nebular/globals_nebular.cpp3
-rw-r--r--engines/mads/nebular/sound_nebular.cpp3
-rw-r--r--engines/mads/palette.cpp3
-rw-r--r--engines/mads/phantom/game_phantom.cpp3
-rw-r--r--engines/mads/phantom/game_phantom.h2
-rw-r--r--engines/mads/player.cpp3
-rw-r--r--engines/mads/resources.cpp7
-rw-r--r--engines/mads/resources.h4
-rw-r--r--engines/mads/scene.cpp9
-rw-r--r--engines/mads/scene_data.h5
-rw-r--r--engines/mads/sprites.cpp9
20 files changed, 52 insertions, 37 deletions
diff --git a/engines/mads/dialogs.cpp b/engines/mads/dialogs.cpp
index b1a0b53b5a..dc8c846beb 100644
--- a/engines/mads/dialogs.cpp
+++ b/engines/mads/dialogs.cpp
@@ -29,8 +29,9 @@
namespace MADS {
-Dialog::Dialog(MADSEngine *vm): _vm(vm), _savedSurface(nullptr),
- _position(Common::Point(-1, -1)), _width(0), _height(0) {
+Dialog::Dialog(MADSEngine *vm)
+ : _vm(vm), _savedSurface(nullptr), _position(Common::Point(-1, -1)),
+ _width(0), _height(0) {
TEXTDIALOG_CONTENT1 = 0XF8;
TEXTDIALOG_CONTENT2 = 0XF9;
TEXTDIALOG_EDGE = 0XFA;
@@ -136,8 +137,8 @@ void Dialog::drawContent(const Common::Rect &r, int seed, byte color1, byte colo
/*------------------------------------------------------------------------*/
TextDialog::TextDialog(MADSEngine *vm, const Common::String &fontName,
- const Common::Point &pos, int maxChars):
- Dialog(vm) {
+ const Common::Point &pos, int maxChars)
+ : Dialog(vm) {
_vm = vm;
_font = _vm->_font->getFont(fontName);
_position = pos;
@@ -363,8 +364,8 @@ void TextDialog::show() {
/*------------------------------------------------------------------------*/
-MessageDialog::MessageDialog(MADSEngine *vm, int maxChars, ...):
- TextDialog(vm, FONT_INTERFACE, Common::Point(-1, -1), maxChars) {
+MessageDialog::MessageDialog(MADSEngine *vm, int maxChars, ...)
+ : TextDialog(vm, FONT_INTERFACE, Common::Point(-1, -1), maxChars) {
// Add in passed line list
va_list va;
va_start(va, maxChars);
@@ -389,7 +390,8 @@ Dialogs *Dialogs::init(MADSEngine *vm) {
return new Nebular::DialogsNebular(vm);
}
-Dialogs::Dialogs(MADSEngine *vm): _vm(vm) {
+Dialogs::Dialogs(MADSEngine *vm)
+ : _vm(vm) {
_pendingDialog = DIALOG_NONE;
}
diff --git a/engines/mads/dragonsphere/game_dragonsphere.cpp b/engines/mads/dragonsphere/game_dragonsphere.cpp
index bee5312660..c6097125b1 100644
--- a/engines/mads/dragonsphere/game_dragonsphere.cpp
+++ b/engines/mads/dragonsphere/game_dragonsphere.cpp
@@ -35,7 +35,8 @@ namespace MADS {
namespace Dragonsphere {
-GameDragonsphere::GameDragonsphere(MADSEngine *vm): Game(vm) {
+GameDragonsphere::GameDragonsphere(MADSEngine *vm)
+ : Game(vm) {
_surface = new MSurface(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
_storyMode = STORYMODE_NAUGHTY;
}
diff --git a/engines/mads/dragonsphere/game_dragonsphere.h b/engines/mads/dragonsphere/game_dragonsphere.h
index 259c4168c1..b4c4c41d20 100644
--- a/engines/mads/dragonsphere/game_dragonsphere.h
+++ b/engines/mads/dragonsphere/game_dragonsphere.h
@@ -127,7 +127,7 @@ public:
class Section1Handler: public SectionHandler {
public:
- Section1Handler(MADSEngine *vm): SectionHandler(vm) {}
+ Section1Handler(MADSEngine *vm) : SectionHandler(vm) {}
// TODO: Properly implement handler methods
virtual void preLoadSection() {}
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index 3f424711f7..f1744d8407 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -56,8 +56,9 @@ Game *Game::init(MADSEngine *vm) {
return nullptr;
}
-Game::Game(MADSEngine *vm): _vm(vm), _surface(nullptr), _objects(vm),
- _scene(vm), _screenObjects(vm), _player(vm) {
+Game::Game(MADSEngine *vm)
+ : _vm(vm), _surface(nullptr), _objects(vm), _scene(vm),
+ _screenObjects(vm), _player(vm) {
_sectionNumber = _priorSectionNumber = 0;
_loadGameSlot = -1;
_lastSave = -1;
diff --git a/engines/mads/game_data.h b/engines/mads/game_data.h
index 6ea59d6d2b..cf2d0bdf60 100644
--- a/engines/mads/game_data.h
+++ b/engines/mads/game_data.h
@@ -59,7 +59,7 @@ class SectionHandler {
protected:
MADSEngine *_vm;
public:
- SectionHandler(MADSEngine *vm): _vm(vm) {}
+ SectionHandler(MADSEngine *vm) : _vm(vm) {}
virtual ~SectionHandler() {}
virtual void preLoadSection() = 0;
diff --git a/engines/mads/inventory.h b/engines/mads/inventory.h
index 7fb123e047..a2f35c333d 100644
--- a/engines/mads/inventory.h
+++ b/engines/mads/inventory.h
@@ -87,7 +87,7 @@ public:
/**
* Constructor
*/
- InventoryObjects(MADSEngine *vm): _vm(vm) {}
+ InventoryObjects(MADSEngine *vm) : _vm(vm) {}
/**
* Loads the game's object list
diff --git a/engines/mads/messages.cpp b/engines/mads/messages.cpp
index e85a582cda..f5d1047a86 100644
--- a/engines/mads/messages.cpp
+++ b/engines/mads/messages.cpp
@@ -42,7 +42,8 @@ void RandomMessages::reset() {
}
-KernelMessages::KernelMessages(MADSEngine *vm): _vm(vm) {
+KernelMessages::KernelMessages(MADSEngine *vm)
+ : _vm(vm) {
for (int i = 0; i < KERNEL_MESSAGES_SIZE; ++i) {
KernelMessage rec;
_entries.push_back(rec);
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 28daf74488..db9ea2c7d1 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -35,7 +35,8 @@ namespace MADS {
namespace Nebular {
-GameNebular::GameNebular(MADSEngine *vm): Game(vm) {
+GameNebular::GameNebular(MADSEngine *vm)
+ : Game(vm) {
_surface = new MSurface(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
_storyMode = STORYMODE_NAUGHTY;
_difficulty = DIFFICULTY_EASY;
diff --git a/engines/mads/nebular/game_nebular.h b/engines/mads/nebular/game_nebular.h
index 56bcf44a3f..ee30492792 100644
--- a/engines/mads/nebular/game_nebular.h
+++ b/engines/mads/nebular/game_nebular.h
@@ -129,7 +129,7 @@ public:
class Section1Handler: public SectionHandler {
public:
- Section1Handler(MADSEngine *vm): SectionHandler(vm) {}
+ Section1Handler(MADSEngine *vm) : SectionHandler(vm) {}
// TODO: Properly implement handler methods
virtual void preLoadSection() {}
diff --git a/engines/mads/nebular/globals_nebular.cpp b/engines/mads/nebular/globals_nebular.cpp
index 7bb89a570c..9f8b8a7888 100644
--- a/engines/mads/nebular/globals_nebular.cpp
+++ b/engines/mads/nebular/globals_nebular.cpp
@@ -28,7 +28,8 @@ namespace MADS {
namespace Nebular {
-NebularGlobals::NebularGlobals(): Globals() {
+NebularGlobals::NebularGlobals()
+ : Globals() {
// Initialize lists
resize(210);
_spriteIndexes.resize(30);
diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp
index 5d1daf1b3c..608a31cb25 100644
--- a/engines/mads/nebular/sound_nebular.cpp
+++ b/engines/mads/nebular/sound_nebular.cpp
@@ -934,7 +934,8 @@ const ASound1::CommandPtr ASound1::_commandList[42] = {
&ASound1::command40, &ASound1::command41
};
-ASound1::ASound1(Audio::Mixer *mixer): ASound(mixer, "asound.001", 0x1520) {
+ASound1::ASound1(Audio::Mixer *mixer)
+ : ASound(mixer, "asound.001", 0x1520) {
_cmd23Toggle = false;
// Load sound samples
diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp
index 9f56223aa6..b5a379dfde 100644
--- a/engines/mads/palette.cpp
+++ b/engines/mads/palette.cpp
@@ -336,7 +336,8 @@ void RGBList::copy(RGBList &src) {
/*------------------------------------------------------------------------*/
-Fader::Fader(MADSEngine *vm): _vm(vm) {
+Fader::Fader(MADSEngine *vm)
+ : _vm(vm) {
_colorFlags[0] = _colorFlags[1] = _colorFlags[2] = true;
_colorFlags[3] = false;
_colorValues[0] = _colorValues[1] = 0;
diff --git a/engines/mads/phantom/game_phantom.cpp b/engines/mads/phantom/game_phantom.cpp
index bcaec8e648..15ac241d8c 100644
--- a/engines/mads/phantom/game_phantom.cpp
+++ b/engines/mads/phantom/game_phantom.cpp
@@ -35,7 +35,8 @@ namespace MADS {
namespace Phantom {
-GamePhantom::GamePhantom(MADSEngine *vm): Game(vm) {
+GamePhantom::GamePhantom(MADSEngine *vm)
+ : Game(vm) {
_surface = new MSurface(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
_storyMode = STORYMODE_NAUGHTY;
}
diff --git a/engines/mads/phantom/game_phantom.h b/engines/mads/phantom/game_phantom.h
index c99e81ee70..326a1dc077 100644
--- a/engines/mads/phantom/game_phantom.h
+++ b/engines/mads/phantom/game_phantom.h
@@ -103,7 +103,7 @@ public:
class Section1Handler: public SectionHandler {
public:
- Section1Handler(MADSEngine *vm): SectionHandler(vm) {}
+ Section1Handler(MADSEngine *vm) : SectionHandler(vm) {}
// TODO: Properly implement handler methods
virtual void preLoadSection() {}
diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp
index 077771306e..aaef9dffdf 100644
--- a/engines/mads/player.cpp
+++ b/engines/mads/player.cpp
@@ -32,7 +32,8 @@ const int Player::_directionListIndexes[32] = {
0, 7, 4, 3, 6, 0, 2, 5, 0, 1, 9, 4, 1, 2, 7, 9, 3, 8, 9, 6, 7, 2, 3, 6, 1, 7, 9, 4, 7, 8, 0, 0
};
-Player::Player(MADSEngine *vm): _vm(vm) {
+Player::Player(MADSEngine *vm)
+ : _vm(vm) {
_action = nullptr;
_facing = FACING_NORTH;
_turnToFacing = FACING_NORTH;
diff --git a/engines/mads/resources.cpp b/engines/mads/resources.cpp
index 0bb95debdf..1fb75e6ba2 100644
--- a/engines/mads/resources.cpp
+++ b/engines/mads/resources.cpp
@@ -44,9 +44,10 @@ private:
uint32 _offset;
uint32 _size;
- HagEntry(): _offset(0), _size(0) {}
- HagEntry(Common::String resourceName, uint32 offset, uint32 size):
- _resourceName(resourceName), _offset(offset), _size(size) {}
+ HagEntry() : _offset(0), _size(0) {}
+ HagEntry(Common::String resourceName, uint32 offset, uint32 size)
+ : _resourceName(resourceName), _offset(offset), _size(size) {
+ }
};
class HagIndex {
diff --git a/engines/mads/resources.h b/engines/mads/resources.h
index 003684ef84..8d9ab1e39f 100644
--- a/engines/mads/resources.h
+++ b/engines/mads/resources.h
@@ -58,12 +58,12 @@ public:
/**
* Derived file class
*/
-class File: public Common::File {
+class File : public Common::File {
public:
/**
* Constructor
*/
- File(): Common::File() {}
+ File() : Common::File() {}
/**
* Constructor
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 4af956a9f6..7b54034753 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -30,10 +30,11 @@
namespace MADS {
-Scene::Scene(MADSEngine *vm): _vm(vm), _action(_vm), _depthSurface(vm),
- _dirtyAreas(_vm), _dynamicHotspots(vm), _hotspots(vm),
- _kernelMessages(vm), _sequences(vm), _sprites(vm), _spriteSlots(vm),
- _textDisplay(vm), _userInterface(vm) {
+Scene::Scene(MADSEngine *vm)
+ : _vm(vm), _action(_vm), _depthSurface(vm),
+ _dirtyAreas(_vm), _dynamicHotspots(vm), _hotspots(vm),
+ _kernelMessages(vm), _sequences(vm), _sprites(vm), _spriteSlots(vm),
+ _textDisplay(vm), _userInterface(vm) {
_priorSceneId = 0;
_nextSceneId = 0;
_currentSceneId = 0;
diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h
index 392383af2f..78b43fb03b 100644
--- a/engines/mads/scene_data.h
+++ b/engines/mads/scene_data.h
@@ -65,8 +65,9 @@ public:
PrepType _prepType;
VerbInit() {}
- VerbInit(int id, VerbType verbType, PrepType prepType): _id(id),
- _verbType(verbType), _prepType(prepType) {}
+ VerbInit(int id, VerbType verbType, PrepType prepType)
+ : _id(id), _verbType(verbType), _prepType(prepType) {
+ }
};
class SceneLogic {
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp
index c98a0963f6..89d610f2f1 100644
--- a/engines/mads/sprites.cpp
+++ b/engines/mads/sprites.cpp
@@ -54,13 +54,14 @@ typedef Common::List<DepthEntry> DepthList;
/*------------------------------------------------------------------------*/
-MSprite::MSprite(): MSurface() {
+MSprite::MSprite()
+ : MSurface() {
}
MSprite::MSprite(Common::SeekableReadStream *source, const Common::Array<RGB6> &palette,
- const Common::Rect &bounds):
- MSurface(bounds.width(), bounds.height()),
- _offset(Common::Point(bounds.left, bounds.top)) {
+ const Common::Rect &bounds)
+ : MSurface(bounds.width(), bounds.height()),
+ _offset(Common::Point(bounds.left, bounds.top)) {
// Load the sprite data
loadSprite(source, palette);
}