aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/events/default/default-events.cpp4
-rw-r--r--backends/events/default/default-events.h2
-rw-r--r--backends/fs/ds/ds-fs.cpp2
-rw-r--r--backends/fs/ps2/ps2-fs.cpp8
-rw-r--r--backends/fs/symbian/symbian-fs.cpp6
-rw-r--r--backends/keymapper/action.cpp2
-rw-r--r--backends/keymapper/action.h10
-rw-r--r--backends/keymapper/hardware-key.h10
-rw-r--r--backends/keymapper/keymap.cpp16
-rw-r--r--backends/keymapper/keymap.h10
-rw-r--r--backends/keymapper/keymapper.cpp4
-rw-r--r--backends/keymapper/keymapper.h16
-rw-r--r--backends/keymapper/remap-dialog.cpp14
-rw-r--r--backends/platform/ds/arm9/source/dsmain.cpp12
-rw-r--r--backends/platform/ds/arm9/source/dsoptions.cpp2
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp4
-rw-r--r--backends/platform/ds/arm9/source/zipreader.cpp2
-rw-r--r--backends/platform/iphone/blit.cpp8
-rw-r--r--backends/platform/iphone/iphone_common.h2
-rw-r--r--backends/platform/iphone/iphone_video.h2
-rw-r--r--backends/platform/iphone/osys_iphone.cpp64
-rw-r--r--backends/platform/iphone/osys_iphone.h12
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp10
-rw-r--r--backends/platform/ps2/Gs2dScreen.h2
-rw-r--r--backends/platform/ps2/fileio.cpp2
-rw-r--r--backends/platform/ps2/fileio.h2
-rw-r--r--backends/platform/ps2/icon.h2
-rw-r--r--backends/platform/ps2/irxboot.cpp6
-rw-r--r--backends/platform/ps2/systemps2.cpp16
-rw-r--r--backends/platform/ps2/systemps2.h2
-rw-r--r--backends/platform/symbian/src/SymbianActions.cpp2
-rw-r--r--backends/platform/wince/wince-sdl.cpp4
-rw-r--r--backends/vkeybd/image-map.h2
-rw-r--r--backends/vkeybd/virtual-keyboard-gui.cpp38
-rw-r--r--backends/vkeybd/virtual-keyboard-gui.h14
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.cpp8
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.h48
-rw-r--r--backends/vkeybd/virtual-keyboard.cpp6
-rw-r--r--backends/vkeybd/virtual-keyboard.h30
-rw-r--r--base/main.cpp10
-rw-r--r--common/list_intern.h2
-rw-r--r--common/stack.h2
-rw-r--r--engines/agi/cycle.cpp2
-rw-r--r--engines/agi/detection.cpp4
-rw-r--r--engines/agi/preagi_mickey.cpp16
-rw-r--r--engines/agi/preagi_troll.cpp2
-rw-r--r--engines/agi/preagi_winnie.cpp4
-rw-r--r--engines/agi/sound.cpp6
-rw-r--r--engines/agi/text.cpp4
-rw-r--r--engines/agos/charset-fontdata.cpp196
-rw-r--r--engines/agos/debug.cpp4
-rw-r--r--engines/agos/icons.cpp10
-rw-r--r--engines/agos/input.cpp8
-rw-r--r--engines/agos/res.cpp2
-rw-r--r--engines/agos/script_pn.cpp18
-rw-r--r--engines/agos/string.cpp12
-rw-r--r--engines/agos/subroutine.cpp4
-rw-r--r--engines/agos/verb.cpp6
-rw-r--r--engines/cine/pal.cpp2
-rw-r--r--engines/cruise/actor.cpp4
-rw-r--r--engines/cruise/backgroundIncrust.cpp4
-rw-r--r--engines/cruise/cruise_main.cpp6
-rw-r--r--engines/cruise/dataLoader.cpp2
-rw-r--r--engines/cruise/debugger.cpp4
-rw-r--r--engines/cruise/function.cpp6
-rw-r--r--engines/cruise/saveload.cpp4
-rw-r--r--engines/cruise/sound.cpp2
-rw-r--r--engines/cruise/sound.h2
-rw-r--r--engines/cruise/staticres.cpp4
-rw-r--r--engines/gob/dataio.cpp2
-rw-r--r--engines/gob/demos/demoplayer.cpp2
-rw-r--r--engines/gob/detection.cpp10
-rw-r--r--engines/gob/inter.cpp2
-rw-r--r--engines/gob/inter_fascin.cpp12
-rw-r--r--engines/gob/inter_v5.cpp2
-rw-r--r--engines/gob/parse.h2
-rw-r--r--engines/groovie/graphics.cpp2
-rw-r--r--engines/lure/lure.h6
-rw-r--r--engines/made/database.cpp2
-rw-r--r--engines/made/detection.cpp2
-rw-r--r--engines/made/graphics.cpp2
-rw-r--r--engines/made/made.cpp2
-rw-r--r--engines/made/made.h2
-rw-r--r--engines/made/resource.cpp4
-rw-r--r--engines/made/screenfx.cpp6
-rw-r--r--engines/made/screenfx.h2
-rw-r--r--engines/made/scriptfuncs.cpp2
-rw-r--r--engines/made/sound.cpp6
-rw-r--r--engines/saga/actor.h2
-rw-r--r--engines/saga/saga.h2
-rw-r--r--engines/saga/scene.cpp2
-rw-r--r--engines/saga/script.cpp6
-rw-r--r--engines/saga/script.h2
-rw-r--r--engines/saga/sndres.cpp2
-rw-r--r--engines/sci/engine/ksound.cpp8
-rw-r--r--engines/sci/sfx/player/player.cpp4
-rw-r--r--engines/sci/sfx/player/polled.cpp2
-rw-r--r--engines/scumm/debugger.cpp2
-rw-r--r--engines/scumm/input.cpp4
-rw-r--r--engines/scumm/palette.cpp2
-rw-r--r--engines/sky/control.cpp4
-rw-r--r--engines/sword1/control.cpp30
-rw-r--r--engines/sword1/control.h2
-rw-r--r--engines/sword1/detection.cpp6
-rw-r--r--engines/sword1/mouse.cpp8
-rw-r--r--engines/sword1/music.cpp4
-rw-r--r--engines/sword1/resman.cpp6
-rw-r--r--engines/sword1/screen.cpp128
-rw-r--r--engines/sword1/sound.cpp40
-rw-r--r--engines/sword1/sword1.cpp2
-rw-r--r--engines/sword1/sword1.h4
-rw-r--r--engines/sword1/text.cpp8
-rw-r--r--engines/sword2/animation.cpp2
-rw-r--r--engines/sword2/anims.cpp2
-rw-r--r--engines/sword2/controls.cpp6
-rw-r--r--engines/sword2/function.cpp10
-rw-r--r--engines/sword2/header.h4
-rw-r--r--engines/sword2/layers.cpp6
-rw-r--r--engines/sword2/maketext.cpp18
-rw-r--r--engines/sword2/menu.cpp10
-rw-r--r--engines/sword2/mouse.cpp14
-rw-r--r--engines/sword2/music.cpp2
-rw-r--r--engines/sword2/palette.cpp10
-rw-r--r--engines/sword2/protocol.cpp32
-rw-r--r--engines/sword2/render.cpp16
-rw-r--r--engines/sword2/resman.cpp10
-rw-r--r--engines/sword2/resman.h2
-rw-r--r--engines/sword2/screen.cpp12
-rw-r--r--engines/sword2/screen.h4
-rw-r--r--engines/sword2/sound.cpp6
-rw-r--r--engines/sword2/sprite.cpp12
-rw-r--r--engines/sword2/sword2.cpp4
-rw-r--r--engines/sword2/sword2.h4
-rw-r--r--engines/tinsel/bmv.cpp2
-rw-r--r--engines/tinsel/coroutine.h2
-rw-r--r--engines/tinsel/graphics.cpp8
-rw-r--r--engines/tinsel/palette.cpp4
-rw-r--r--engines/tinsel/polygons.cpp2
-rw-r--r--engines/tinsel/sound.cpp6
-rw-r--r--engines/tinsel/tinlib.cpp2
-rw-r--r--engines/tucker/tucker.cpp4
-rw-r--r--graphics/VectorRendererSpec.cpp2
-rw-r--r--graphics/scaler.cpp4
-rw-r--r--graphics/video/dxa_decoder.cpp2
-rw-r--r--gui/GuiManager.cpp2
-rw-r--r--gui/ListWidget.cpp2
-rw-r--r--gui/ThemeEngine.cpp14
-rw-r--r--gui/ThemeLayout.cpp6
-rw-r--r--gui/launcher.cpp2
-rw-r--r--gui/themebrowser.cpp4
-rw-r--r--gui/widget.cpp2
-rw-r--r--gui/widget.h2
-rw-r--r--sound/adpcm.cpp10
-rw-r--r--sound/fmopl.h4
-rw-r--r--sound/softsynth/opl/dosbox.cpp22
-rw-r--r--sound/softsynth/opl/opl_impl.h14
-rw-r--r--sound/softsynth/opl/opl_inc.h8
-rw-r--r--sound/timestamp.h10
-rw-r--r--sound/vag.cpp18
-rw-r--r--sound/vag.h6
-rw-r--r--test/sound/timestamp.h2
-rw-r--r--tools/create_kyradat/create_kyradat.cpp2
-rw-r--r--tools/create_kyradat/lol_cd.h6
163 files changed, 734 insertions, 734 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 9c33e187a4..f610c6f8a5 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -469,7 +469,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
event.type = Common::EVENT_RTL;
}
}
-#ifdef ENABLE_VKEYBD
+#ifdef ENABLE_VKEYBD
else if (event.kbd.keycode == Common::KEYCODE_F7 && event.kbd.flags == 0) {
if (_vk->isDisplaying()) {
_vk->close(true);
@@ -483,7 +483,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
}
}
#endif
-#ifdef ENABLE_KEYMAPPER
+#ifdef ENABLE_KEYMAPPER
else if (event.kbd.keycode == Common::KEYCODE_F8 && event.kbd.flags == 0) {
if (!_remap) {
_remap = true;
diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h
index 58b5745b7d..5841318fd4 100644
--- a/backends/events/default/default-events.h
+++ b/backends/events/default/default-events.h
@@ -143,7 +143,7 @@ public:
virtual int shouldQuit() const { return _shouldQuit; }
virtual int shouldRTL() const { return _shouldRTL; }
virtual void resetRTL() { _shouldRTL = false; }
-
+
#ifdef ENABLE_KEYMAPPER
virtual Common::Keymapper *getKeymapper() { return _keymapper; }
#endif
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index 92bdba0650..93308ab38a 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -224,7 +224,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path) {
lastSlash = r;
}
}
-
+
if (path == "mp:/") {
// This is the root directory
_isDirectory = true;
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index 150e8f8a7a..c5abf31f8d 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -264,7 +264,7 @@ void Ps2FilesystemNode::doverify(void) {
_isHere = false;
_isDirectory = false;
return;
- }
+ }
switch (medium) {
#if 0
@@ -361,7 +361,7 @@ AbstractFSNode *Ps2FilesystemNode::getChild(const Common::String &n) const {
/*
int fd;
-
+
if (_path == "pfs0:")
fd = fio.dopen("pfs0:/");
else
@@ -442,7 +442,7 @@ bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
if ( (mode == Common::FSNode::kListAll) ||
- ((mode == Common::FSNode::kListDirectoriesOnly) &&
+ ((mode == Common::FSNode::kListDirectoriesOnly) &&
(dirent.stat.mode & FIO_S_IFDIR)) ||
((mode == Common::FSNode::kListFilesOnly) &&
@@ -499,7 +499,7 @@ char *Ps2FilesystemNode::getDeviceDescription() const {
return "Host";
else if (strncmp(_path.c_str(), "mc0", 3) == 0)
return "Memory Card";
- else
+ else
return "WTF ???";
}
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 7d56931fc0..2fa5d7b142 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -136,10 +136,10 @@ SymbianFilesystemNode::SymbianFilesystemNode(const Common::String &path) {
} else {
_isValid = ETrue;
_isDirectory = EFalse;
- TParsePtrC parser(fname);
- if(parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) {
+ TParsePtrC parser(fname);
+ if(parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) {
_isDirectory = ETrue;
- }
+ }
}
}
diff --git a/backends/keymapper/action.cpp b/backends/keymapper/action.cpp
index 2541f60ddd..3feb593f19 100644
--- a/backends/keymapper/action.cpp
+++ b/backends/keymapper/action.cpp
@@ -31,7 +31,7 @@
namespace Common {
-Action::Action(Keymap *boss, const char *i, String des, ActionType typ,
+Action::Action(Keymap *boss, const char *i, String des, ActionType typ,
KeyType prefKey, int pri, int flg)
: _boss(boss), description(des), type(typ), preferredKey(prefKey),
priority(pri), flags(flg), _hwKey(0) {
diff --git a/backends/keymapper/action.h b/backends/keymapper/action.h
index 04d8dd4067..31576e2960 100644
--- a/backends/keymapper/action.h
+++ b/backends/keymapper/action.h
@@ -63,12 +63,12 @@ private:
Keymap *_boss;
public:
- Action(Keymap *boss, const char *id, String des = "",
+ Action(Keymap *boss, const char *id, String des = "",
ActionType typ = kGenericActionType,
KeyType prefKey = kGenericKeyType,
int pri = 0, int flg = 0 );
- void addEvent(const Event &evt) {
+ void addEvent(const Event &evt) {
events.push_back(evt);
}
@@ -101,7 +101,7 @@ public:
addEvent(evt);
}
- Keymap *getParent() {
+ Keymap *getParent() {
return _boss;
}
@@ -111,10 +111,10 @@ public:
};
struct ActionPriorityComp : public BinaryFunction<Action, Action, bool> {
- bool operator()(const Action *x, const Action *y) const {
+ bool operator()(const Action *x, const Action *y) const {
return x->priority > y->priority;
}
- bool operator()(const Action &x, const Action &y) const {
+ bool operator()(const Action &x, const Action &y) const {
return x.priority > y.priority;
}
};
diff --git a/backends/keymapper/hardware-key.h b/backends/keymapper/hardware-key.h
index e70148cb0f..8ddeada51e 100644
--- a/backends/keymapper/hardware-key.h
+++ b/backends/keymapper/hardware-key.h
@@ -38,17 +38,17 @@ namespace Common {
#define HWKEY_ID_SIZE (30)
/**
-* Describes an available hardware key
+* Describes an available hardware key
*/
struct HardwareKey {
/** unique id used for saving/loading to config */
char hwKeyId[HWKEY_ID_SIZE];
/** Human readable description */
- String description;
+ String description;
- /**
- * The KeyState that is generated by the back-end
+ /**
+ * The KeyState that is generated by the back-end
* when this hardware key is pressed.
*/
KeyState key;
@@ -69,7 +69,7 @@ struct HardwareKey {
* Simple class to encapsulate a device's set of HardwareKeys.
* Each device should instantiate this and call addHardwareKey a number of times
* in its constructor to define the device's available keys.
- */
+ */
class HardwareKeySet {
public:
diff --git a/backends/keymapper/keymap.cpp b/backends/keymapper/keymap.cpp
index 13be1ad8bc..840ba5a0c5 100644
--- a/backends/keymapper/keymap.cpp
+++ b/backends/keymapper/keymap.cpp
@@ -124,7 +124,7 @@ void Keymap::loadMappings(const HardwareKeySet *hwKeys) {
if (!_configDomain)
return;
- ConfigManager::Domain::iterator it;
+ ConfigManager::Domain::iterator it;
String prefix = KEYMAP_KEY_PREFIX + _name + "_";
for (it = _configDomain->begin(); it != _configDomain->end(); it++) {
@@ -138,7 +138,7 @@ void Keymap::loadMappings(const HardwareKeySet *hwKeys) {
Action *ua = getAction(actionId);
if (!ua) {
- warning("'%s' keymap does not contain Action with ID %s",
+ warning("'%s' keymap does not contain Action with ID %s",
_name.c_str(), actionId);
_configDomain->erase(key);
@@ -199,7 +199,7 @@ bool Keymap::isComplete(const HardwareKeySet *hwKeys) {
// TODO:
// - current weakness:
-// - if an action finds a key with required type but a parent action with
+// - if an action finds a key with required type but a parent action with
// higher priority is using it, that key is never used
void Keymap::automaticMapping(HardwareKeySet *hwKeys) {
// Create copies of action and key lists.
@@ -208,7 +208,7 @@ void Keymap::automaticMapping(HardwareKeySet *hwKeys) {
List<Action*>::iterator actIt;
List<const HardwareKey*>::iterator keyIt, selectedKey;
-
+
// Remove actions and keys from local lists that have already been mapped.
actIt = actions.begin();
@@ -227,16 +227,16 @@ void Keymap::automaticMapping(HardwareKeySet *hwKeys) {
// Sort remaining actions by priority.
ActionPriorityComp priorityComp;
sort(actions.begin(), actions.end(), priorityComp);
-
+
// First mapping pass:
- // - Match if a key's preferred action type is the same as the action's
+ // - Match if a key's preferred action type is the same as the action's
// type, or vice versa.
// - Priority is given to:
// - keys that match action types over key types.
// - keys that have not been used by parent maps.
// - If a key has been used by a parent map the new action must have a
// higher priority than the parent action.
- // - As soon as the number of skipped actions equals the number of keys
+ // - As soon as the number of skipped actions equals the number of keys
// remaining we stop matching. This means that the second pass will assign keys
// to these higher priority skipped actions.
uint skipped = 0;
@@ -317,7 +317,7 @@ void Keymap::automaticMapping(HardwareKeySet *hwKeys) {
if (selectedKey != keys.end()) {
act->mapKey(*selectedKey);
keys.erase(selectedKey);
- } else {// no match = no keys left
+ } else {// no match = no keys left
break;
}
}
diff --git a/backends/keymapper/keymap.h b/backends/keymapper/keymap.h
index 35ad732bdc..615fd9097d 100644
--- a/backends/keymapper/keymap.h
+++ b/backends/keymapper/keymap.h
@@ -48,7 +48,7 @@ class HardwareKeySet;
template<> struct Hash<KeyState>
: public UnaryFunction<KeyState, uint> {
- uint operator()(const KeyState &val) const {
+ uint operator()(const KeyState &val) const {
return (uint)val.keycode | ((uint)val.flags << 24);
}
};
@@ -78,7 +78,7 @@ public:
* @return a pointer to the Action or 0 if no
*/
Action *getMappedAction(const KeyState& ks) const;
-
+
void setConfigDomain(ConfigManager::Domain *dom);
/**
@@ -94,7 +94,7 @@ public:
*/
void saveMappings();
-
+
void automaticMapping(HardwareKeySet *hwKeys);
/**
@@ -110,7 +110,7 @@ private:
friend struct Action;
/**
- * Adds a new Action to this Map,
+ * Adds a new Action to this Map,
* adding it at the back of the internal array
* @param action the Action to add
*/
@@ -141,7 +141,7 @@ private:
String _name;
Keymap *_parent;
List<Action*> _actions;
- HashMap<KeyState, Action*> _keymap;
+ HashMap<KeyState, Action*> _keymap;
ConfigManager::Domain *_configDomain;
};
diff --git a/backends/keymapper/keymapper.cpp b/backends/keymapper/keymapper.cpp
index 4668d34421..c74aa45b17 100644
--- a/backends/keymapper/keymapper.cpp
+++ b/backends/keymapper/keymapper.cpp
@@ -86,7 +86,7 @@ void Keymapper::addGlobalKeymap(Keymap *keymap) {
void Keymapper::addGameKeymap(Keymap *keymap) {
if (ConfMan.getActiveDomain() == 0)
error("Call to Keymapper::addGameKeymap when no game loaded");
-
+
// Detect whether the active game changed since last call.
// If so, flush the game key configuration.
if (_gameDomain.getConfigDomain() != ConfMan.getActiveDomain()) {
@@ -118,7 +118,7 @@ void Keymapper::initKeymap(Domain &domain, Keymap *map) {
void Keymapper::cleanupGameKeymaps() {
// Flush all game specific keymaps
_gameDomain.deleteAllKeyMaps();
-
+
// Now restore the stack of active maps. Re-add all global keymaps, drop
// the game specific (=deleted) ones.
Stack<MapRecord> newStack;
diff --git a/backends/keymapper/keymapper.h b/backends/keymapper/keymapper.h
index 3bc9ea2327..c82f64b0ed 100644
--- a/backends/keymapper/keymapper.h
+++ b/backends/keymapper/keymapper.h
@@ -41,7 +41,7 @@ namespace Common {
class Keymapper {
public:
-
+
struct MapRecord {
Keymap* keymap;
bool inherit;
@@ -53,11 +53,11 @@ public:
IgnoreCase_Hash, IgnoreCase_EqualTo> {
public:
Domain() : _configDomain(0) {}
- ~Domain() {
+ ~Domain() {
deleteAllKeyMaps();
}
- void setConfigDomain(ConfigManager::Domain *confDom) {
+ void setConfigDomain(ConfigManager::Domain *confDom) {
_configDomain = confDom;
}
ConfigManager::Domain *getConfigDomain() {
@@ -69,7 +69,7 @@ public:
void deleteAllKeyMaps();
Keymap *getKeymap(const String& name);
-
+
private:
ConfigManager::Domain *_configDomain;
};
@@ -120,10 +120,10 @@ public:
Keymap *getKeymap(const String& name, bool &global);
/**
- * Push a new keymap to the top of the active stack, activating
+ * Push a new keymap to the top of the active stack, activating
* it for use.
* @param name name of the keymap to push
- * @param inherit if true keymapper will iterate down the
+ * @param inherit if true keymapper will iterate down the
* stack if it cannot find a key in the new map
* @return true if succesful
*/
@@ -136,7 +136,7 @@ public:
/**
* @brief Map a key press event.
- * If the active keymap contains a Action mapped to the given key, then
+ * If the active keymap contains a Action mapped to the given key, then
* the Action's events are pushed into the EventManager's event queue.
* @param key key that was pressed
* @param keyDown true for key down, false for key up
@@ -180,7 +180,7 @@ private:
HardwareKeySet *_hardwareKeys;
void pushKeymap(Keymap *newMap, bool inherit, bool global);
-
+
Action *getAction(const KeyState& key);
void executeAction(const Action *act, bool keyDown);
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp
index 35706e89dd..389ca7d1f9 100644
--- a/backends/keymapper/remap-dialog.cpp
+++ b/backends/keymapper/remap-dialog.cpp
@@ -146,7 +146,7 @@ void RemapDialog::reflowLayout() {
_colCount = (areaW - scrollbarWidth) / colWidth;
_rowCount = (areaH + spacing) / (buttonHeight + spacing);
- if (_colCount <= 0 || _rowCount <= 0)
+ if (_colCount <= 0 || _rowCount <= 0)
error("Remap dialog too small to display any keymaps!");
_scrollBar->resize(areaX + areaW - scrollbarWidth, areaY, scrollbarWidth, areaH);
@@ -164,9 +164,9 @@ void RemapDialog::reflowLayout() {
ActionWidgets widg;
if (i >= _keymapWidgets.size()) {
- widg.actionText =
+ widg.actionText =
new GUI::StaticTextWidget(this, 0, 0, 0, 0, "", Graphics::kTextAlignRight);
- widg.keyButton =
+ widg.keyButton =
new GUI::ButtonWidget(this, 0, 0, 0, 0, "", kRemapCmd + i);
_keymapWidgets.push_back(widg);
} else {
@@ -208,7 +208,7 @@ void RemapDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 d
void RemapDialog::startRemapping(uint i) {
if (_topAction + i >= _currentActions.size())
- return;
+ return;
_remapTimeout = getMillis() + kRemapTimeoutDelay;
_activeRemapAction = _currentActions[_topAction + i].action;
@@ -287,7 +287,7 @@ void RemapDialog::loadKeymap() {
if (act->getMappedKey())
freeKeys.remove(act->getMappedKey());
}
-
+
// loop through remaining finding mappings for unmapped keys
if (top.inherit) {
for (int i = activeKeymaps.size() - 2; i >= 0; --i) {
@@ -365,7 +365,7 @@ void RemapDialog::refreshKeymap() {
widg.actionText->setVisible(true);
widg.keyButton->setVisible(true);
- actionI++;
+ actionI++;
} else {
widg.actionText->setVisible(false);
widg.keyButton->setVisible(false);
@@ -373,7 +373,7 @@ void RemapDialog::refreshKeymap() {
//widg.actionText->draw();
//widg.keyButton->draw();
}
- // need to redraw entire Dialog so that invisible
+ // need to redraw entire Dialog so that invisible
// widgets disappear
draw();
}
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index 621a2af082..ca2d2cb855 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -647,7 +647,7 @@ void displayMode8Bit() {
// ConsoleInit destroys the hardware palette :-(
OSystem_DS::instance()->restoreHardwarePalette();
-
+
// BG_PALETTE_SUB[255] = RGB15(31,31,31);//by default font will be rendered with color 255
// Do text stuff
@@ -893,7 +893,7 @@ void displayMode16Bit() {
BG3_XDX = isCpuScalerEnabled() ? 256 : (int) (1.25f * 256);
BG3_XDY = 0;
- BG3_YDX = 0;
+ BG3_YDX = 0;
BG3_YDY = (int) ((200.0f / 192.0f) * 256);
#ifdef HEAVY_LOGGING
@@ -1571,7 +1571,7 @@ void addEventsToQueue() {
}
- static int selectHoldCount = 0;
+ static int selectHoldCount = 0;
static const int SELECT_HOLD_TIME = 60;
if ((getKeysHeld() & KEY_SELECT)) {
@@ -1585,8 +1585,8 @@ void addEventsToQueue() {
selectHoldCount = 0;
}
-
-
+
+
if (getKeysReleased() & KEY_SELECT) {
if (selectHoldCount < SELECT_HOLD_TIME) {
// Just pressed select - show DS options screen
@@ -1838,7 +1838,7 @@ void soundBufferEmptyHandler() {
}
currentTimeMillis++;
// TIMER0 end
-
+
soundHiPart = !soundHiPart;
}
diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp
index 52027f3a15..90f371e0a8 100644
--- a/backends/platform/ds/arm9/source/dsoptions.cpp
+++ b/backends/platform/ds/arm9/source/dsoptions.cpp
@@ -335,7 +335,7 @@ void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint
close();
}
-
+
if ((!guard) && (cmd == 0x40000000)) {
close();
g_engine->openMainMenuDialog();
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index 057e107bb6..e35e5edea0 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -425,12 +425,12 @@ void OSystem_DS::grabOverlay(OverlayColor* buf, int pitch) {
for (int y = 0; y < 200; y++) {
u16* src = start + (y * 320);
u16* dest = ((u16 *) (buf)) + (y * pitch);
-
+
for (int x = 0; x < 320; x++) {
*dest++ = *src++;
}
}
-
+
}
void OSystem_DS::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp
index fa9a229348..fd6da4e9b9 100644
--- a/backends/platform/ds/arm9/source/zipreader.cpp
+++ b/backends/platform/ds/arm9/source/zipreader.cpp
@@ -171,7 +171,7 @@ bool ZipFile::findFile(const char *search) {
char searchName[128];
strcpy(searchName, search);
char *tmp = searchName;
-
+
// Change slashes to backslashes
for (; *tmp; ++tmp) {
if (*tmp == '/')
diff --git a/backends/platform/iphone/blit.cpp b/backends/platform/iphone/blit.cpp
index 1a3352945d..c28f931983 100644
--- a/backends/platform/iphone/blit.cpp
+++ b/backends/platform/iphone/blit.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -27,7 +27,7 @@
#include "blit_arm.h"
void blitLandscapeScreenRect16bpp(uint16 *dst, uint16 *src, int width, int height, int screenWidth, int screenHeight)
-{
+{
for (int x = width; x > 0; x--) {
for (int y = height; y > 0; y--) {
*(dst++) = *src;
@@ -47,5 +47,5 @@ void blitLandscapeScreenRect8bpp(uint16 *dst, byte *src, int width, int height,
}
dst -= screenHeight + height;
src += 1 - height * screenWidth;
- }
+ }
}
diff --git a/backends/platform/iphone/iphone_common.h b/backends/platform/iphone/iphone_common.h
index 57dc991e9d..90d9a50aad 100644
--- a/backends/platform/iphone/iphone_common.h
+++ b/backends/platform/iphone/iphone_common.h
@@ -66,7 +66,7 @@ void iPhone_updateScreenRect(unsigned short* screen, int x1, int y1, int x2, int
void iPhone_initSurface(int width, int height);
bool iPhone_fetchEvent(int *outEvent, float *outX, float *outY);
const char* iPhone_getDocumentsDir();
-
+
#ifdef __cplusplus
}
#endif
diff --git a/backends/platform/iphone/iphone_video.h b/backends/platform/iphone/iphone_video.h
index 3d5715bb95..daa5e1d18e 100644
--- a/backends/platform/iphone/iphone_video.h
+++ b/backends/platform/iphone/iphone_video.h
@@ -47,7 +47,7 @@
int _fullHeight;
int _widthOffset;
int _heightOffset;
-
+
EAGLContext* _context;
GLuint _viewRenderbuffer;
GLuint _viewFramebuffer;
diff --git a/backends/platform/iphone/osys_iphone.cpp b/backends/platform/iphone/osys_iphone.cpp
index 192ea096ae..b72e8b65d5 100644
--- a/backends/platform/iphone/osys_iphone.cpp
+++ b/backends/platform/iphone/osys_iphone.cpp
@@ -88,7 +88,7 @@ int OSystem_IPHONE::timerHandler(int t) {
void OSystem_IPHONE::initBackend() {
#ifdef IPHONE_OFFICIAL
- _savefile = new DefaultSaveFileManager(iPhone_getDocumentsDir());
+ _savefile = new DefaultSaveFileManager(iPhone_getDocumentsDir());
#else
_savefile = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH);
#endif
@@ -159,7 +159,7 @@ void OSystem_IPHONE::initSize(uint width, uint height) {
bzero(_fullscreen, fullSize);
iPhone_initSurface(width, height);
-
+
_fullScreenIsDirty = false;
dirtyFullScreen();
_mouseVisible = false;
@@ -300,9 +300,9 @@ void OSystem_IPHONE::internUpdateScreen() {
Common::Rect dirtyRect = _dirtyRects.remove_at(_dirtyRects.size() - 1);
//printf("Drawing: (%i, %i) -> (%i, %i)\n", dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom);
-
+
drawDirtyRect(dirtyRect);
-
+
if (_overlayVisible)
drawDirtyOverlayRect(dirtyRect);
@@ -315,7 +315,7 @@ void OSystem_IPHONE::internUpdateScreen() {
Common::Rect dirtyRect = _dirtyOverlayRects.remove_at(_dirtyOverlayRects.size() - 1);
//printf("Drawing: (%i, %i) -> (%i, %i)\n", dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom);
-
+
drawDirtyOverlayRect(dirtyRect);
drawMouseCursorOnRectUpdate(dirtyRect, mouseRect);
updateHardwareSurfaceForRect(dirtyRect);
@@ -332,7 +332,7 @@ void OSystem_IPHONE::drawDirtyRect(const Common::Rect& dirtyRect) {
for (int y = h; y > 0; y--) {
for (int x = w; x > 0; x--)
*dst++ = _palette[*src++];
-
+
dst += _screenWidth - w;
src += _screenWidth - w;
}
@@ -392,7 +392,7 @@ void OSystem_IPHONE::drawMouseCursorOnRectUpdate(const Common::Rect& updatedRect
}
void OSystem_IPHONE::updateHardwareSurfaceForRect(const Common::Rect& updatedRect) {
- iPhone_updateScreenRect(_fullscreen, updatedRect.left, updatedRect.top, updatedRect.right, updatedRect.bottom );
+ iPhone_updateScreenRect(_fullscreen, updatedRect.left, updatedRect.top, updatedRect.right, updatedRect.bottom );
}
Graphics::Surface *OSystem_IPHONE::lockScreen() {
@@ -610,7 +610,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
case kInputMouseDragged:
if (!handleEvent_mouseDragged(event, x, y))
return false;
- break;
+ break;
case kInputMouseSecondDragged:
if (!handleEvent_mouseSecondDragged(event, x, y))
return false;
@@ -618,13 +618,13 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
case kInputMouseSecondDown:
_secondaryTapped = true;
if (!handleEvent_secondMouseDown(event, x, y))
- return false;
+ return false;
break;
case kInputMouseSecondUp:
_secondaryTapped = false;
if (!handleEvent_secondMouseUp(event, x, y))
- return false;
- break;
+ return false;
+ break;
case kInputOrientationChanged:
handleEvent_orientationChanged((int)xUnit);
return false;
@@ -781,30 +781,30 @@ bool OSystem_IPHONE::handleEvent_mouseDragged(Common::Event &event, int x, int y
int deltaY = _lastPadY - y;
_lastPadX = x;
_lastPadY = y;
-
+
mouseNewPosX = (int)(_mouseX - deltaX / 0.5f);
mouseNewPosY = (int)(_mouseY - deltaY / 0.5f);
-
+
if (mouseNewPosX < 0)
mouseNewPosX = 0;
else if (mouseNewPosX > _screenWidth)
mouseNewPosX = _screenWidth;
-
+
if (mouseNewPosY < 0)
mouseNewPosY = 0;
else if (mouseNewPosY > _screenHeight)
mouseNewPosY = _screenHeight;
-
+
} else {
mouseNewPosX = x;
mouseNewPosY = y;
}
-
+
event.type = Common::EVENT_MOUSEMOVE;
event.mouse.x = mouseNewPosX;
event.mouse.y = mouseNewPosY;
warpMouse(mouseNewPosX, mouseNewPosY);
-
+
return true;
}
@@ -812,27 +812,27 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
if (_gestureStartX == -1 || _gestureStartY == -1) {
return false;
}
-
+
int vecX = (x - _gestureStartX);
int vecY = (y - _gestureStartY);
int lengthSq = vecX * vecX + vecY * vecY;
//printf("Lengthsq: %u\n", lengthSq);
-
+
if (lengthSq > 15000) { // Long enough gesture to react upon.
_gestureStartX = -1;
_gestureStartY = -1;
-
+
float vecLength = sqrt(lengthSq);
float vecXNorm = vecX / vecLength;
float vecYNorm = vecY / vecLength;
-
+
//printf("Swipe vector: (%.2f, %.2f)\n", vecXNorm, vecYNorm);
-
+
if (vecXNorm > -0.50 && vecXNorm < 0.50 && vecYNorm > 0.75) {
// Swipe down
event.type = Common::EVENT_KEYDOWN;
_queuedInputEvent.type = Common::EVENT_KEYUP;
-
+
event.kbd.flags = _queuedInputEvent.kbd.flags = 0;
event.kbd.keycode = _queuedInputEvent.kbd.keycode = Common::KEYCODE_F5;
event.kbd.ascii = _queuedInputEvent.kbd.ascii = Common::ASCII_F5;
@@ -849,7 +849,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
GUI::TimedMessageDialog dialog(dialogMsg, 1500);
dialog.runModal();
return false;
-
+
} else if (vecXNorm > 0.75 && vecYNorm > -0.5 && vecYNorm < 0.5) {
// Swipe right
_touchpadModeEnabled = !_touchpadModeEnabled;
@@ -861,12 +861,12 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
GUI::TimedMessageDialog dialog(dialogMsg, 1500);
dialog.runModal();
return false;
-
+
} else if (vecXNorm < -0.75 && vecYNorm > -0.5 && vecYNorm < 0.5) {
// Swipe left
return false;
}
- }
+ }
return false;
}
@@ -893,7 +893,7 @@ void OSystem_IPHONE::handleEvent_orientationChanged(int orientation) {
if (_screenOrientation != newOrientation) {
_screenOrientation = newOrientation;
iPhone_initSurface(_screenWidth, _screenHeight);
-
+
dirtyFullScreen();
if (_overlayVisible)
dirtyFullOverlayScreen();
@@ -1231,7 +1231,7 @@ Common::SeekableReadStream *OSystem_IPHONE::createConfigReadStream() {
strncat(buf, "/Preferences", 256 - strlen(buf) );
Common::FSNode file(buf);
#else
- Common::FSNode file(SCUMMVM_PREFS_PATH);
+ Common::FSNode file(SCUMMVM_PREFS_PATH);
#endif
return file.createReadStream();
}
@@ -1241,10 +1241,10 @@ Common::WriteStream *OSystem_IPHONE::createConfigWriteStream() {
char buf[256];
strncpy(buf, iPhone_getDocumentsDir(), 256);
strncat(buf, "/Preferences", 256 - strlen(buf) );
- Common::FSNode file(buf);
+ Common::FSNode file(buf);
#else
- Common::FSNode file(SCUMMVM_PREFS_PATH);
-#endif
+ Common::FSNode file(SCUMMVM_PREFS_PATH);
+#endif
return file.createWriteStream();
}
@@ -1288,7 +1288,7 @@ void iphone_main(int argc, char *argv[]) {
chdir("/var/mobile/");
#endif
-
+
g_system = OSystem_IPHONE_create();
assert(g_system);
diff --git a/backends/platform/iphone/osys_iphone.h b/backends/platform/iphone/osys_iphone.h
index 140133fb90..ceb2102a5f 100644
--- a/backends/platform/iphone/osys_iphone.h
+++ b/backends/platform/iphone/osys_iphone.h
@@ -104,7 +104,7 @@ protected:
TimerProc _timerCallback;
Common::Array<Common::Rect> _dirtyRects;
- Common::Array<Common::Rect> _dirtyOverlayRects;
+ Common::Array<Common::Rect> _dirtyOverlayRects;
ScreenOrientation _screenOrientation;
bool _fullScreenIsDirty;
bool _fullScreenOverlayIsDirty;
@@ -168,7 +168,7 @@ public:
virtual void quit();
FilesystemFactory *getFilesystemFactory() { return _fsFactory; }
- virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+ virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
virtual void getTimeAndDate(struct tm &t) const;
virtual void setWindowCaption(const char *caption);
@@ -186,13 +186,13 @@ public:
protected:
void internUpdateScreen();
void dirtyFullScreen();
- void dirtyFullOverlayScreen();
+ void dirtyFullOverlayScreen();
void clipRectToScreen(int16 &x, int16 &y, int16 &w, int16 &h);
void suspendLoop();
void drawDirtyRect(const Common::Rect& dirtyRect);
- void drawDirtyOverlayRect(const Common::Rect& dirtyRect);
+ void drawDirtyOverlayRect(const Common::Rect& dirtyRect);
void drawMouseCursorOnRectUpdate(const Common::Rect& updatedRect, const Common::Rect& mouseRect);
- void updateHardwareSurfaceForRect(const Common::Rect& updatedRect);
+ void updateHardwareSurfaceForRect(const Common::Rect& updatedRect);
static void AQBufferCallback(void *in, AudioQueueRef inQ, AudioQueueBufferRef outQB);
static int timerHandler(int t);
@@ -207,5 +207,5 @@ protected:
bool handleEvent_secondMouseUp(Common::Event &event, int x, int y);
bool handleEvent_mouseDragged(Common::Event &event, int x, int y);
- bool handleEvent_mouseSecondDragged(Common::Event &event, int x, int y);
+ bool handleEvent_mouseSecondDragged(Common::Event &event, int x, int y);
};
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index 380e28952f..e9a846f659 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -162,7 +162,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
// _tvMode = TV_NTSC;
printf("Setting up %s mode\n", (_tvMode == TV_PAL) ? "PAL" : "NTSC");
-
+
// set screen size, 640x512 for pal, 640x448 for ntsc
_tvWidth = 640;
_tvHeight = ((_tvMode == TV_PAL) ? 512 /*544*/ : 448);
@@ -188,7 +188,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_clutPtrs[TEXT] = _clutPtrs[SCREEN] + 0x2000;
_texPtrs[SCREEN] = _clutPtrs[SCREEN] + 0x3000;
_texPtrs[TEXT] = 0; // these buffers are stored in the alpha gaps of the frame buffers
- _texPtrs[MOUSE] = 128 * 256 * 4;
+ _texPtrs[MOUSE] = 128 * 256 * 4;
_texPtrs[PRINTF] = _texPtrs[MOUSE] + M_SIZE * M_SIZE * 4;
_showOverlay = false;
@@ -249,7 +249,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
updateScreen();
createAnimTextures();
-
+
// create anim thread
ee_thread_t animThread, thisThread;
ReferThreadStatus(GetThreadId(), &thisThread);
@@ -683,7 +683,7 @@ void Gs2dScreen::animThread(void) {
do {
WaitSema(g_AnimSema);
} while ((!_systemQuit) && (!g_RunAnim));
-
+
if (_systemQuit)
break;
@@ -808,7 +808,7 @@ const uint32 Gs2dScreen::_binaryClut[16] __attribute__((aligned(64))) = {
GS_RGBA( 0, 0, 0, 0x20), // scrPrintf: semitransparent
GS_RGBA(0xC0, 0xC0, 0xC0, 0), // scrPrintf: red
GS_RGBA(0x16, 0x16, 0xF0, 0), // scrPrintf: blue
-
+
GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), // unused
GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), GS_RGBA(0xFF, 0xFF, 0xFF, 0x80),
GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), GS_RGBA(0xFF, 0xFF, 0xFF, 0x80),
diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h
index 1c4de6ef5a..91dfc9d327 100644
--- a/backends/platform/ps2/Gs2dScreen.h
+++ b/backends/platform/ps2/Gs2dScreen.h
@@ -77,7 +77,7 @@ public:
void showOverlay(void);
void hideOverlay(void);
Graphics::PixelFormat getOverlayFormat(void);
- int16 getOverlayWidth(void);
+ int16 getOverlayWidth(void);
int16 getOverlayHeight(void);
//- mouse routines
diff --git a/backends/platform/ps2/fileio.cpp b/backends/platform/ps2/fileio.cpp
index d2186b6475..fc35306907 100644
--- a/backends/platform/ps2/fileio.cpp
+++ b/backends/platform/ps2/fileio.cpp
@@ -267,7 +267,7 @@ void Ps2File::cacheReadSync(void) {
}
}
-uint32 Ps2File::read(void *dest, uint32 len) {
+uint32 Ps2File::read(void *dest, uint32 len) {
// uint32 r=0, d=0, ds=0, sz=0;
#ifdef __PS2_FILE_SEMA__
WaitSema(_sema);
diff --git a/backends/platform/ps2/fileio.h b/backends/platform/ps2/fileio.h
index 6c2b9402a3..e793c29d4b 100644
--- a/backends/platform/ps2/fileio.h
+++ b/backends/platform/ps2/fileio.h
@@ -56,7 +56,7 @@ public:
virtual bool getErr(void);
virtual void setErr(bool);
-
+
private:
void cacheReadAhead(void);
void cacheReadSync(void);
diff --git a/backends/platform/ps2/icon.h b/backends/platform/ps2/icon.h
index 0e7d096c45..bc614bf70b 100644
--- a/backends/platform/ps2/icon.h
+++ b/backends/platform/ps2/icon.h
@@ -23,7 +23,7 @@
class PS2Icon {
public:
PS2Icon() {};
-
+
~PS2Icon() {};
uint16 decompressData(uint16 **data);
diff --git a/backends/platform/ps2/irxboot.cpp b/backends/platform/ps2/irxboot.cpp
index fa3e047bf6..daa592522a 100644
--- a/backends/platform/ps2/irxboot.cpp
+++ b/backends/platform/ps2/irxboot.cpp
@@ -41,7 +41,7 @@ static const char netArg[] = "192.168.0.10" "\0" "255.255.255.0" "\0" "192.168.0
IrxFile irxFiles[] = {
{ "SIO2MAN", BIOS, NOTHING, NULL, 0 },
- { "MCMAN", BIOS, NOTHING, NULL, 0 },
+ { "MCMAN", BIOS, NOTHING, NULL, 0 },
{ "MCSERV", BIOS, NOTHING, NULL, 0 },
{ "PADMAN", BIOS, NOTHING, NULL, 0 },
{ "LIBSD", BIOS, NOTHING, NULL, 0 },
@@ -73,7 +73,7 @@ PS2Device detectBootPath(const char *elfPath, char *bootPath) {
PS2Device device = _getDev(elfPath);
printf("elf path: %s, device %d\n", elfPath, device);
-
+
strcpy(bootPath, elfPath);
char *pathPos = bootPath;
@@ -115,7 +115,7 @@ PS2Device detectBootPath(const char *elfPath, char *bootPath) {
return device;
}
-int loadIrxModules(int device, const char *irxPath, IrxReference **modules) {
+int loadIrxModules(int device, const char *irxPath, IrxReference **modules) {
IrxReference *resModules = (IrxReference *)malloc(numIrxFiles * sizeof(IrxReference));
IrxReference *curModule = resModules;
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index 1a69e5377a..f29caf2279 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -209,7 +209,7 @@ void OSystem_PS2::startIrxModules(int numModules, IrxReference *modules) {
}
} else
sioprintf("Module \"%s\" wasn't found: %d\n", modules[i].path, modules[i].errorCode);
-
+
if ((modules[i].errorCode < 0) || (res < 0) || (rv < 0)) {
if (!(modules[i].fileRef->flags & OPTIONAL)) {
if (modules[i].errorCode < 0)
@@ -220,7 +220,7 @@ void OSystem_PS2::startIrxModules(int numModules, IrxReference *modules) {
quit();
}
}
-
+
if (modules[i].buffer)
free(modules[i].buffer);
} else {
@@ -723,7 +723,7 @@ void OSystem_PS2::msgPrintf(int millis, char *format, ...) {
while ((*lnEnd) && (*lnEnd != '\n'))
lnEnd++;
*lnEnd = '\0';
-
+
Common::String str(lnSta);
int width = Graphics::g_sysfont.getStringWidth(str);
if (width > maxWidth)
@@ -821,17 +821,17 @@ void OSystem_PS2::quit(void) {
// ("", 0, NULL);
/* back to PS2 Browser */
-/*
+/*
__asm__ __volatile__(
" li $3, 0x04;"
" syscall;"
" nop;"
);
*/
-
+
/*
SifIopReset("rom0:UNDL ", 0);
- while (!SifIopSync()) ;
+ while (!SifIopSync()) ;
// SifIopReboot(...);
*/
#else
@@ -959,7 +959,7 @@ void OSystem_PS2::makeConfigPath() {
sprintf(path, "mc0:ScummVM/ScummVM.ini");
else
ps2_fclose(src);
-
+
_configFile = strdup(path);
}
@@ -967,7 +967,7 @@ Common::SeekableReadStream *OSystem_PS2::createConfigReadStream() {
Common::FSNode file(_configFile);
return file.createReadStream();
}
-
+
Common::WriteStream *OSystem_PS2::createConfigWriteStream() {
Common::FSNode file(_configFile);
return file.createWriteStream();
diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h
index 67f3078f59..29747c0943 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -84,7 +84,7 @@ public:
virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
virtual int16 getOverlayWidth(void);
virtual int16 getOverlayHeight(void);
-
+
virtual bool showMouse(bool visible);
virtual void warpMouse(int x, int y);
diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp
index 9bbbec399d..c45cef32bd 100644
--- a/backends/platform/symbian/src/SymbianActions.cpp
+++ b/backends/platform/symbian/src/SymbianActions.cpp
@@ -164,7 +164,7 @@ void SymbianActions::initInstanceGame() {
// Pause
if(is_cruise) {
_key_action[ACTION_PAUSE].setKey('P');
- }
+ }
else {
_key_action[ACTION_PAUSE].setKey(' ');
}
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 6d27b46813..344edd7143 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -1737,8 +1737,8 @@ void OSystem_WINCE3::internUpdateScreen() {
toolbarScaler = Normal2x;
else if (_videoMode.scaleFactor == 3)
toolbarScaler = Normal3x;
- toolbarScaler((byte *)toolbarSurface->pixels, srcPitch,
- (byte *)_hwscreen->pixels + (_toolbarHandler.getOffset() * _scaleFactorYm / _scaleFactorYd * dstPitch),
+ toolbarScaler((byte *)toolbarSurface->pixels, srcPitch,
+ (byte *)_hwscreen->pixels + (_toolbarHandler.getOffset() * _scaleFactorYm / _scaleFactorYd * dstPitch),
dstPitch, toolbar_rect[0].w, toolbar_rect[0].h);
SDL_UnlockSurface(toolbarSurface);
SDL_UnlockSurface(_hwscreen);
diff --git a/backends/vkeybd/image-map.h b/backends/vkeybd/image-map.h
index 6e31720abb..269ad265cd 100644
--- a/backends/vkeybd/image-map.h
+++ b/backends/vkeybd/image-map.h
@@ -41,7 +41,7 @@ class ImageMap {
public:
~ImageMap();
-
+
Polygon *createArea(const String& id);
void removeArea(const String& id);
void removeAllAreas();
diff --git a/backends/vkeybd/virtual-keyboard-gui.cpp b/backends/vkeybd/virtual-keyboard-gui.cpp
index a4b6d63aad..54b9b3d43d 100644
--- a/backends/vkeybd/virtual-keyboard-gui.cpp
+++ b/backends/vkeybd/virtual-keyboard-gui.cpp
@@ -62,31 +62,31 @@ static void blit(Graphics::Surface *surf_dst, Graphics::Surface *surf_src, int16
int dstAdd = surf_dst->w - blitW;
int srcAdd = surf_src->w - blitW;
- for (int i = 0; i < blitH; ++i) {
- for (int j = 0; j < blitW; ++j, ++dst, ++src) {
+ for (int i = 0; i < blitH; ++i) {
+ for (int j = 0; j < blitW; ++j, ++dst, ++src) {
OverlayColor col = *src;
if (col != transparent)
*dst = col;
}
dst += dstAdd;
- src += srcAdd;
+ src += srcAdd;
}
}
VirtualKeyboardGUI::VirtualKeyboardGUI(VirtualKeyboard *kbd)
- : _kbd(kbd), _displaying(false), _drag(false),
- _drawCaret(false), _displayEnabled(false), _firstRun(true),
+ : _kbd(kbd), _displaying(false), _drag(false),
+ _drawCaret(false), _displayEnabled(false), _firstRun(true),
_cursorAnimateTimer(0), _cursorAnimateCounter(0) {
-
+
assert(_kbd);
assert(g_system);
_system = g_system;
-
+
_lastScreenChanged = _system->getScreenChangeID();
_screenW = _system->getOverlayWidth();
_screenH = _system->getOverlayHeight();
-
+
memset(_cursor, 0xFF, sizeof(_cursor));
}
@@ -138,7 +138,7 @@ bool VirtualKeyboardGUI::fontIsSuitable(const Graphics::Font *font, const Rect&
void VirtualKeyboardGUI::checkScreenChanged() {
if (_lastScreenChanged != _system->getScreenChangeID())
- screenChanged();
+ screenChanged();
}
void VirtualKeyboardGUI::initSize(int16 w, int16 h) {
@@ -297,7 +297,7 @@ void VirtualKeyboardGUI::mainLoop() {
break;
case Common::EVENT_MOUSEMOVE:
if (_drag)
- move(event.mouse.x - _dragPoint.x,
+ move(event.mouse.x - _dragPoint.x,
event.mouse.y - _dragPoint.y);
break;
case Common::EVENT_SCREEN_CHANGED:
@@ -349,7 +349,7 @@ void VirtualKeyboardGUI::redraw() {
int16 w = _dirtyRect.width();
int16 h = _dirtyRect.height();
if (w <= 0 || h <= 0) return;
-
+
Graphics::Surface surf;
surf.create(w, h, sizeof(OverlayColor));
@@ -362,17 +362,17 @@ void VirtualKeyboardGUI::redraw() {
src += _overlayBackup.w;
}
- blit(&surf, _kbdSurface, _kbdBound.left - _dirtyRect.left,
+ blit(&surf, _kbdSurface, _kbdBound.left - _dirtyRect.left,
_kbdBound.top - _dirtyRect.top, _kbdTransparentColor);
if (_displayEnabled) {
- blit(&surf, &_dispSurface, _dispX - _dirtyRect.left,
+ blit(&surf, &_dispSurface, _dispX - _dirtyRect.left,
_dispY - _dirtyRect.top, _dispBackColor);
}
- _system->copyRectToOverlay((OverlayColor*)surf.pixels, surf.w,
+ _system->copyRectToOverlay((OverlayColor*)surf.pixels, surf.w,
_dirtyRect.left, _dirtyRect.top, surf.w, surf.h);
surf.free();
-
+
resetDirtyRect();
}
@@ -390,7 +390,7 @@ void VirtualKeyboardGUI::animateCaret() {
if (_system->getMillis() % kCaretBlinkTime < kCaretBlinkTime / 2) {
if (!_drawCaret) {
- _drawCaret = true;
+ _drawCaret = true;
_dispSurface.drawLine(_caretX, 0, _caretX, _dispSurface.h, _dispForeColor);
extendDirtyRect(Rect(_dispX + _caretX, _dispY, _dispX + _caretX + 1, _dispY + _dispSurface.h));
}
@@ -412,17 +412,17 @@ void VirtualKeyboardGUI::updateDisplay() {
uint dispTextEnd;
if (_dispI > cursorPos)
_dispI = cursorPos;
-
+
dispTextEnd = calculateEndIndex(wholeText, _dispI);
while (cursorPos > dispTextEnd)
dispTextEnd = calculateEndIndex(wholeText, ++_dispI);
-
+
String dispText = String(wholeText.c_str() + _dispI, wholeText.c_str() + dispTextEnd);
// draw to display surface
_dispSurface.fillRect(Rect(_dispSurface.w, _dispSurface.h), _dispBackColor);
_dispFont->drawString(&_dispSurface, dispText, 0, 0, _dispSurface.w, _dispForeColor);
-
+
String beforeCaret(wholeText.c_str() + _dispI, wholeText.c_str() + cursorPos);
_caretX = _dispFont->getStringWidth(beforeCaret);
if (_drawCaret) _dispSurface.drawLine(_caretX, 0, _caretX, _dispSurface.h, _dispForeColor);
diff --git a/backends/vkeybd/virtual-keyboard-gui.h b/backends/vkeybd/virtual-keyboard-gui.h
index 7c2e4a88a6..bd6f72d64a 100644
--- a/backends/vkeybd/virtual-keyboard-gui.h
+++ b/backends/vkeybd/virtual-keyboard-gui.h
@@ -62,9 +62,9 @@ public:
/**
* Interrupts the event loop and resets the overlay to its initial state.
- */
+ */
void close();
-
+
bool isDisplaying() { return _displaying; }
/**
@@ -73,7 +73,7 @@ public:
void reset();
/**
- * Activates drag mode. Takes the keyboard-relative coordinates of the
+ * Activates drag mode. Takes the keyboard-relative coordinates of the
* cursor as an argument.
*/
void startDrag(int16 x, int16 y);
@@ -82,16 +82,16 @@ public:
* Deactivates drag mode
* */
void endDrag();
-
+
/**
- * Checks for a screen change in the backend and re-inits the virtual
+ * Checks for a screen change in the backend and re-inits the virtual
* keyboard if it has.
*/
void checkScreenChanged();
-
+
/**
* Sets the GUI's internal screen size variables
- */
+ */
void initSize(int16 w, int16 h);
private:
diff --git a/backends/vkeybd/virtual-keyboard-parser.cpp b/backends/vkeybd/virtual-keyboard-parser.cpp
index 73575d0d9a..3e40ffc1fa 100644
--- a/backends/vkeybd/virtual-keyboard-parser.cpp
+++ b/backends/vkeybd/virtual-keyboard-parser.cpp
@@ -38,7 +38,7 @@
namespace Common {
-VirtualKeyboardParser::VirtualKeyboardParser(VirtualKeyboard *kbd)
+VirtualKeyboardParser::VirtualKeyboardParser(VirtualKeyboard *kbd)
: XMLParser(), _keyboard(kbd) {
}
@@ -59,7 +59,7 @@ bool VirtualKeyboardParser::closedKeyCallback(ParserNode *node) {
return parserError("Initial mode of keyboard pack not defined");
} else if (node->name.equalsIgnoreCase("mode")) {
if (!_layoutParsed) {
- return parserError("'%s' layout missing from '%s' mode",
+ return parserError("'%s' layout missing from '%s' mode",
_mode->resolution.c_str(), _mode->name.c_str());
}
}
@@ -119,7 +119,7 @@ bool VirtualKeyboardParser::parserCallback_mode(ParserNode *node) {
String resolutions = node->values["resolutions"];
StringTokenizer tok (resolutions, " ,");
- // select best resolution simply by minimising the difference between the
+ // select best resolution simply by minimising the difference between the
// overlay size and the resolution dimensions.
// TODO: improve this by giving preference to a resolution that is smaller
// than the overlay res (so the keyboard can't be too big for the screen)
@@ -200,7 +200,7 @@ bool VirtualKeyboardParser::parserCallback_event(ParserNode *node) {
delete evt;
return parserError("Key modifier element must contain modifier attributes");
}
-
+
evt->type = VirtualKeyboard::kVKEventModifier;
byte *flags = (byte*) malloc(sizeof(byte));
*(flags) = parseFlags(node->values["modifiers"]);
diff --git a/backends/vkeybd/virtual-keyboard-parser.h b/backends/vkeybd/virtual-keyboard-parser.h
index 12adcd61c2..eeea1995c7 100644
--- a/backends/vkeybd/virtual-keyboard-parser.h
+++ b/backends/vkeybd/virtual-keyboard-parser.h
@@ -38,13 +38,13 @@
** Virtual Keyboard Pack File Format **
***************************************
-The new virtual keyboard for ScummVM is implemented in the same way as a HTML
-ImageMap. It uses a single bitmap of the entire keyboard layout and then a
-image map description allows certain areas of the bitmap to be given special
-actions. Most of these actions will be a virtual key press event, but there
-will also be special keys that will change the keyboard layout or close the
+The new virtual keyboard for ScummVM is implemented in the same way as a HTML
+ImageMap. It uses a single bitmap of the entire keyboard layout and then a
+image map description allows certain areas of the bitmap to be given special
+actions. Most of these actions will be a virtual key press event, but there
+will also be special keys that will change the keyboard layout or close the
keyboard. The HTML image map description is contained in a larger XML file that
-can describe all the different modes of the keyboard, and also different
+can describe all the different modes of the keyboard, and also different
keyboard layouts for different screen resolutions.
********************************************
@@ -92,7 +92,7 @@ keyboard layouts for different screen resolutions.
<keyboard>
-This is the required, root element of the file format.
+This is the required, root element of the file format.
required attributes:
- initial_mode: name of the mode the keyboard will show initially
@@ -108,12 +108,12 @@ child tags:
<mode>
-This tag encapsulates a single mode of the keyboard. Within are a number of
+This tag encapsulates a single mode of the keyboard. Within are a number of
layouts, which provide the specific implementation at different resolutions.
required attributes:
- - name: the name of the mode
- - resolutions: list of the different layout resolutions
+ - name: the name of the mode
+ - resolutions: list of the different layout resolutions
child tags:
- layout
@@ -129,12 +129,12 @@ same as an event's name.
required attributes:
- name: name of the event
- - type: key | modifier | switch_mode | submit | cancel | clear | delete |
+ - type: key | modifier | switch_mode | submit | cancel | clear | delete |
move_left | move_right - see VirtualKeyboard::EventType for explanation
for key events
- code / ascii: describe a key press in ScummVM KeyState format
for key and modifier events
- - modifiers: modifier keystate as comma-separated list of shift, ctrl and/or
+ - modifiers: modifier keystate as comma-separated list of shift, ctrl and/or
alt.
for switch_mode events
- mode: name of the mode that should be switched to
@@ -148,8 +148,8 @@ required attributes:
- resolution: the screen resolution that this layout is designed for
- bitmap: filename of the 24-bit bitmap that will be used for this layout
-optional attributes:
- - transparent_color: color in r,g,b format that will be used for keycolor
+optional attributes:
+ - transparent_color: color in r,g,b format that will be used for keycolor
transparency (defaults to (255,0,255).
- display_font_color: color in r,g,b format that will be used for the text of
the keyboard display (defaults to (0,0,0).
@@ -161,13 +161,13 @@ child nodes:
<map>
-These tags describe the image map for a particular layout. It uses the same
-format as HTML image maps. The only area shapes that are supported are
+These tags describe the image map for a particular layout. It uses the same
+format as HTML image maps. The only area shapes that are supported are
rectangles and polygons. The target attribute of each area should be the name
of an event for this mode (see <event> tag). They will usually be generated by
-an external tool such as GIMP's Image Map plugin, and so will not be written
-by hand, but for more information on HTML image map format see
- - http://www.w3schools.com/TAGS/tag_map.asp
+an external tool such as GIMP's Image Map plugin, and so will not be written
+by hand, but for more information on HTML image map format see
+ - http://www.w3schools.com/TAGS/tag_map.asp
- http://www.w3schools.com/TAGS/tag_area.asp
*/
@@ -177,21 +177,21 @@ namespace Common {
/**
* Subclass of Common::XMLParser that parses the virtual keyboard pack
* description file
- */
+ */
class VirtualKeyboardParser : public XMLParser {
public:
/**
- * Enum dictating how extensive a parse will be
+ * Enum dictating how extensive a parse will be
*/
enum ParseMode {
/**
* Full parse - when loading keyboard pack for first time
*/
- kParseFull,
- /**
- * Just check resolutions and reload layouts if needed - following a
+ kParseFull,
+ /**
+ * Just check resolutions and reload layouts if needed - following a
* change in screen size
*/
kParseCheckResolutions
diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp
index 1314ab7370..a95b79d213 100644
--- a/backends/vkeybd/virtual-keyboard.cpp
+++ b/backends/vkeybd/virtual-keyboard.cpp
@@ -97,7 +97,7 @@ bool VirtualKeyboard::loadKeyboardPack(String packName) {
// uncompressed keyboard pack
if (!_parser->loadFile(vkDir.getChild(packName + ".xml")))
return false;
-
+
} else if (vkDir.getChild(packName + ".zip").exists()) {
// compressed keyboard pack
#ifdef USE_ZLIB
@@ -239,7 +239,7 @@ void VirtualKeyboard::close(bool submit) {
_kbdGUI->close();
}
-bool VirtualKeyboard::isDisplaying() {
+bool VirtualKeyboard::isDisplaying() {
return _kbdGUI->isDisplaying();
}
@@ -359,7 +359,7 @@ void VirtualKeyboard::KeyPressQueue::clear() {
_strChanged = true;
}
-bool VirtualKeyboard::KeyPressQueue::empty() {
+bool VirtualKeyboard::KeyPressQueue::empty() {
return _keys.empty();
}
diff --git a/backends/vkeybd/virtual-keyboard.h b/backends/vkeybd/virtual-keyboard.h
index 4fdcb8b453..e3a9cd3600 100644
--- a/backends/vkeybd/virtual-keyboard.h
+++ b/backends/vkeybd/virtual-keyboard.h
@@ -54,7 +54,7 @@ class VirtualKeyboardParser;
* This includes storage of the virtual key press events when the user clicks
* a key and delivery of them when the keyboard is closed, as well as managing
* the internal state of the keyboard, such as its active mode.
- */
+ */
class VirtualKeyboard {
protected:
@@ -73,7 +73,7 @@ protected:
kVKEventSubmit,
/** Close the keyboard, without submitting keypresses */
kVKEventCancel,
- /** Clear the virtual keypress queue */
+ /** Clear the virtual keypress queue */
kVKEventClear,
/** Move the keypress queue insert position backwards */
kVKEventMoveLeft,
@@ -87,23 +87,23 @@ protected:
struct VKEvent {
String name;
VKEventType type;
- /**
+ /**
* Void pointer that will point to different types of data depending
* on the type of the event, these are:
* - KeyState struct for kVKEventKey events
* - a flags byte for kVKEventModifier events
* - c-string stating the name of the new mode for kSwitchMode events
- */
+ */
void *data;
-
+
VKEvent() : data(0) {}
~VKEvent() {
if (data)
free(data);
}
};
-
- typedef HashMap<String, VKEvent*> VKEventMap;
+
+ typedef HashMap<String, VKEvent*> VKEventMap;
/**
* Mode struct encapsulates all the data for each mode of the keyboard
@@ -122,7 +122,7 @@ protected:
Mode() : image(0) {}
~Mode() { delete image; }
};
-
+
typedef HashMap<String, Mode, IgnoreCase_Hash, IgnoreCase_EqualTo> ModeMap;
enum HorizontalAlignment {
@@ -143,7 +143,7 @@ protected:
uint strLen;
};
- /**
+ /**
* Class that stores the queue of virtual key presses, as well as
* maintaining a string that represents a preview of the queue
*/
@@ -182,11 +182,11 @@ public:
VirtualKeyboard();
virtual ~VirtualKeyboard();
-
+
/**
* Loads the keyboard pack with the given name.
- * The system first looks for an uncompressed keyboard pack by searching
- * for packName.xml in the filesystem, if this does not exist then it
+ * The system first looks for an uncompressed keyboard pack by searching
+ * for packName.xml in the filesystem, if this does not exist then it
* searches for a compressed keyboard pack by looking for packName.zip.
* @param packName name of the keyboard pack
*/
@@ -201,7 +201,7 @@ public:
/**
* Hides the keyboard, ending the event loop.
- * @param submit if true all accumulated key presses are submitted to
+ * @param submit if true all accumulated key presses are submitted to
* the event manager
*/
void close(bool submit);
@@ -218,7 +218,7 @@ public:
return _loaded;
}
-protected:
+protected:
OSystem *_system;
Archive *_fileArchive;
@@ -227,7 +227,7 @@ protected:
VirtualKeyboardGUI *_kbdGUI;
KeyPressQueue _keyQueue;
-
+
friend class VirtualKeyboardParser;
VirtualKeyboardParser *_parser;
diff --git a/base/main.cpp b/base/main.cpp
index e45af96c12..dba4aeccaa 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -221,7 +221,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
}
static void setupGraphics(OSystem &system) {
-
+
system.beginGFXTransaction();
// Set the user specified graphics mode (if any).
system.setGraphicsMode(ConfMan.get("gfx_mode").c_str());
@@ -265,13 +265,13 @@ static void setupKeymapper(OSystem &system) {
// Now create the global keymap
act = new Action(globalMap, "MENU", "Menu", kGenericActionType, kSelectKeyType);
act->addKeyEvent(KeyState(KEYCODE_F5, ASCII_F5, 0));
-
+
act = new Action(globalMap, "SKCT", "Skip", kGenericActionType, kActionKeyType);
act->addKeyEvent(KeyState(KEYCODE_ESCAPE, ASCII_ESCAPE, 0));
act = new Action(globalMap, "PAUS", "Pause", kGenericActionType, kStartKeyType);
act->addKeyEvent(KeyState(KEYCODE_SPACE, ' ', 0));
-
+
act = new Action(globalMap, "SKLI", "Skip line", kGenericActionType, kActionKeyType);
act->addKeyEvent(KeyState(KEYCODE_PERIOD, '.', 0));
@@ -344,7 +344,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
setupGraphics(system);
- // Init the event manager. As the virtual keyboard is loaded here, it must
+ // Init the event manager. As the virtual keyboard is loaded here, it must
// take place after the backend is initiated and the screen has been setup
system.getEventManager()->init();
@@ -395,7 +395,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
// screen to draw on yet.
warning("Could not find any engine capable of running the selected game");
}
-
+
// reset the graphics to default
setupGraphics(system);
launcherDialog();
diff --git a/common/list_intern.h b/common/list_intern.h
index 7ec7fdfd41..11d03fd6ff 100644
--- a/common/list_intern.h
+++ b/common/list_intern.h
@@ -159,7 +159,7 @@ namespace ListInternal {
bool operator==(const Iterator<T>& a, const ConstIterator<T>& b) {
return a._node == b._node;
}
-
+
template<typename T>
bool operator!=(const Iterator<T>& a, const ConstIterator<T>& b) {
return a._node != b._node;
diff --git a/common/stack.h b/common/stack.h
index e76404bf4c..5d447d5424 100644
--- a/common/stack.h
+++ b/common/stack.h
@@ -89,7 +89,7 @@ private:
public:
Stack<T>() {}
Stack<T>(const Array<T> &stackContent) : _stack(stackContent) {}
-
+
bool empty() const {
return _stack.empty();
}
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index cf987e66dc..f3828e00d2 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -347,7 +347,7 @@ int AgiEngine::playGame() {
}
interpretCycle();
-
+
// Check if the user has asked to load a game from the command line
// or the launcher
if (firstLoop) {
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index b99c24043a..86422a7d01 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -195,7 +195,7 @@ static const AGIGameDescription gameDescriptions[] = {
// Black Cauldron (PC 5.25") 2.10 11/10/88 [AGI 3.002.098]
GAME3("bc", "2.10 1988-11-10 5.25\"", "bcdir", "0c5a9acbcc7e51127c34818e75806df6", 0x3149, GID_BC),
-
+
// Black Cauldron (PC) 2.10 [AGI 3.002.097]
GAME3("bc", "2.10", "bcdir", "0de3953c9225009dc91e5b0d1692967b", 0x3149, GID_BC),
@@ -524,7 +524,7 @@ static const AGIGameDescription gameDescriptions[] = {
// Troll's Tale
GAMEpre_PS("troll", "", "troll.img", "62903f264b3d849be4214b3a5c42a2fa", 184320, 0x0000, GID_TROLL, Common::kPlatformPC),
-
+
// Winnie the Pooh in the Hundred Acre Wood
GAMEpre_P("winnie", "", "title.pic", "2e7900c1ccaa7671d65405f6d1efed30", 0x0000, GID_WINNIE, Common::kPlatformPC),
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index ca8b47aded..155fe1ad06 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -115,7 +115,7 @@ bool Mickey::chooseY_N(int ofsPrompt, bool fErrorMsg) {
break;
}
}
-
+
return false;
}
@@ -509,7 +509,7 @@ bool Mickey::getMenuSelRow(MSA_MENU menu, int *sel0, int *sel1, int iRow) {
animate();
drawMenu(menu, *sel0, *sel1);
}
-
+
return false;
}
@@ -535,7 +535,7 @@ void Mickey::getMenuSel(char *buffer, int *sel0, int *sel1) {
}
}
}
-
+
if (_clickToMove || getMenuSelRow(menu, sel0, sel1, 2)) {
break;
}
@@ -1358,11 +1358,11 @@ void Mickey::intro() {
// show copyright and play theme
printExeMsg(IDO_MSA_COPYRIGHT);
-
+
// Quit if necessary
if (_vm->shouldQuit())
return;
-
+
playSound(IDI_MSA_SND_THEME);
// load game
@@ -1375,7 +1375,7 @@ void Mickey::intro() {
return;
}
}
-
+
// Quit if necessary
if (_vm->shouldQuit())
return;
@@ -1386,7 +1386,7 @@ void Mickey::intro() {
drawRoom();
printRoomDesc();
-
+
// Quit if necessary
if (_vm->shouldQuit())
return;
@@ -2104,7 +2104,7 @@ void Mickey::waitAnyKey(bool anim) {
break;
}
}
-
+
if (anim) {
animate();
_vm->_gfx->doUpdate();
diff --git a/engines/agi/preagi_troll.cpp b/engines/agi/preagi_troll.cpp
index f6d3fffd24..b72a617948 100644
--- a/engines/agi/preagi_troll.cpp
+++ b/engines/agi/preagi_troll.cpp
@@ -565,7 +565,7 @@ void Troll::gameLoop() {
memset(_roomStates, 0, sizeof(_roomStates));
memset(_inventory, 0, sizeof(_inventory));
-
+
while (!done && !_vm->shouldQuit()) {
*menu = 0;
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index 81305e9590..1341adcef8 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -446,7 +446,7 @@ int Winnie::parser(int pc, int index, uint8 *buffer) {
_vm->_gfx->doUpdate();
_vm->_system->updateScreen();
}
-
+
return IDI_WTP_PAR_OK;
}
@@ -1016,7 +1016,7 @@ phase2:
if (parser(hdr.ofsDesc[iBlock] - _roomOffset, iBlock, roomdata) == IDI_WTP_PAR_BACK)
goto phase1;
}
-
+
while (!_vm->shouldQuit()) {
for (iBlock = 0; iBlock < IDI_WTP_MAX_BLOCK; iBlock++) {
switch(parser(hdr.ofsBlock[iBlock] - _roomOffset, iBlock, roomdata)) {
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 403709ddde..73d64eee4d 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -46,11 +46,11 @@ AgiSound *AgiSound::createFromRawResource(uint8 *data, uint32 len, int resnum, S
uint16 type = READ_LE_UINT16(data);
switch (type) { // Create a sound object based on the type
- case AGI_SOUND_SAMPLE:
+ case AGI_SOUND_SAMPLE:
return new IIgsSample(data, len, resnum, manager);
- case AGI_SOUND_MIDI:
+ case AGI_SOUND_MIDI:
return new IIgsMidi (data, len, resnum, manager);
- case AGI_SOUND_4CHN:
+ case AGI_SOUND_4CHN:
return new PCjrSound (data, len, resnum, manager);
}
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index da7f34fc19..63b109ee83 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -272,9 +272,9 @@ char *AgiEngine::wordWrapString(const char *s, int *len) {
if (wLen) {
memcpy(outStr, pWord, wLen);
outStr += wLen;
- }
+ }
lnLen += wLen+1;
-
+
if (lnLen > msgWidth) {
msgWidth = lnLen;
diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp
index 0c1e731d80..b7f9af427e 100644
--- a/engines/agos/charset-fontdata.cpp
+++ b/engines/agos/charset-fontdata.cpp
@@ -1770,104 +1770,104 @@ static const byte english_elvira1Font[] = {
};
static const byte english_pnFont[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00,
- 0x00, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x24, 0x7E, 0x24, 0x24, 0x7E, 0x24, 0x00,
- 0x00, 0x08, 0x3E, 0x28, 0x3E, 0x0A, 0x3E, 0x08,
- 0x00, 0x62, 0x64, 0x08, 0x10, 0x26, 0x46, 0x00,
- 0x00, 0x10, 0x28, 0x10, 0x2A, 0x44, 0x3A, 0x00,
- 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00,
- 0x00, 0x20, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00,
- 0x00, 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00,
- 0x00, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10,
- 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
- 0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
- 0x00, 0x3C, 0x46, 0x4A, 0x52, 0x62, 0x3C, 0x00,
- 0x00, 0x18, 0x28, 0x08, 0x08, 0x08, 0x3E, 0x00,
- 0x00, 0x3C, 0x42, 0x02, 0x3C, 0x40, 0x7E, 0x00,
- 0x00, 0x3C, 0x42, 0x0C, 0x02, 0x42, 0x3C, 0x00,
- 0x00, 0x08, 0x18, 0x28, 0x48, 0x7E, 0x08, 0x00,
- 0x00, 0x7E, 0x40, 0x7C, 0x02, 0x42, 0x3C, 0x00,
- 0x00, 0x3C, 0x40, 0x7C, 0x42, 0x42, 0x3C, 0x00,
- 0x00, 0x7E, 0x02, 0x04, 0x08, 0x10, 0x10, 0x00,
- 0x00, 0x3C, 0x42, 0x3C, 0x42, 0x42, 0x3C, 0x00,
- 0x00, 0x3C, 0x42, 0x42, 0x3E, 0x02, 0x3C, 0x00,
- 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00,
- 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x20,
- 0x00, 0x00, 0x04, 0x08, 0x10, 0x08, 0x04, 0x00,
- 0x00, 0x00, 0x00, 0x3E, 0x00, 0x3E, 0x00, 0x00,
- 0x00, 0x00, 0x10, 0x08, 0x04, 0x08, 0x10, 0x00,
- 0x00, 0x3C, 0x42, 0x04, 0x08, 0x00, 0x08, 0x00,
- 0x00, 0x3C, 0x4A, 0x56, 0x5E, 0x40, 0x3C, 0x00,
- 0x00, 0x3C, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x00,
- 0x00, 0x7C, 0x42, 0x7C, 0x42, 0x42, 0x7C, 0x00,
- 0x00, 0x3C, 0x42, 0x40, 0x40, 0x42, 0x3C, 0x00,
- 0x00, 0x78, 0x44, 0x42, 0x42, 0x44, 0x78, 0x00,
- 0x00, 0x7E, 0x40, 0x7C, 0x40, 0x40, 0x7E, 0x00,
- 0x00, 0x7E, 0x40, 0x7C, 0x40, 0x40, 0x40, 0x00,
- 0x00, 0x3C, 0x42, 0x40, 0x4E, 0x42, 0x3C, 0x00,
- 0x00, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x42, 0x00,
- 0x00, 0x3E, 0x08, 0x08, 0x08, 0x08, 0x3E, 0x00,
- 0x00, 0x02, 0x02, 0x02, 0x42, 0x42, 0x3C, 0x00,
- 0x00, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, 0x00,
- 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7E, 0x00,
- 0x00, 0x42, 0x66, 0x5A, 0x42, 0x42, 0x42, 0x00,
- 0x00, 0x42, 0x62, 0x52, 0x4A, 0x46, 0x42, 0x00,
- 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00,
- 0x00, 0x7C, 0x42, 0x42, 0x7C, 0x40, 0x40, 0x00,
- 0x00, 0x3C, 0x42, 0x42, 0x52, 0x4A, 0x3C, 0x00,
- 0x00, 0x7C, 0x42, 0x42, 0x7C, 0x44, 0x42, 0x00,
- 0x00, 0x3C, 0x40, 0x3C, 0x02, 0x42, 0x3C, 0x00,
- 0x00, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
- 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00,
- 0x00, 0x42, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00,
- 0x00, 0x42, 0x42, 0x42, 0x42, 0x5A, 0x24, 0x00,
- 0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00,
- 0x00, 0x82, 0x44, 0x28, 0x10, 0x10, 0x10, 0x00,
- 0x00, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x00,
- 0x00, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x0E, 0x00,
- 0x00, 0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x00,
- 0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00,
- 0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
- 0x00, 0x1C, 0x22, 0x78, 0x20, 0x20, 0x7E, 0x00,
- 0x00, 0x00, 0x38, 0x04, 0x3C, 0x44, 0x3C, 0x00,
- 0x00, 0x20, 0x20, 0x3C, 0x22, 0x22, 0x3C, 0x00,
- 0x00, 0x00, 0x1C, 0x20, 0x20, 0x20, 0x1C, 0x00,
- 0x00, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3C, 0x00,
- 0x00, 0x00, 0x38, 0x44, 0x78, 0x40, 0x3C, 0x00,
- 0x00, 0x0C, 0x10, 0x18, 0x10, 0x10, 0x10, 0x00,
- 0x00, 0x00, 0x3C, 0x44, 0x44, 0x3C, 0x04, 0x38,
- 0x00, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x00,
- 0x00, 0x10, 0x00, 0x30, 0x10, 0x10, 0x38, 0x00,
- 0x00, 0x04, 0x00, 0x04, 0x04, 0x04, 0x24, 0x18,
- 0x00, 0x20, 0x28, 0x30, 0x30, 0x28, 0x24, 0x00,
- 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x00,
- 0x00, 0x00, 0x68, 0x54, 0x54, 0x54, 0x54, 0x00,
- 0x00, 0x00, 0x78, 0x44, 0x44, 0x44, 0x44, 0x00,
- 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
- 0x00, 0x00, 0x78, 0x44, 0x44, 0x78, 0x40, 0x40,
- 0x00, 0x00, 0x3C, 0x44, 0x44, 0x3C, 0x04, 0x06,
- 0x00, 0x00, 0x1C, 0x20, 0x20, 0x20, 0x20, 0x00,
- 0x00, 0x00, 0x38, 0x40, 0x38, 0x04, 0x78, 0x00,
- 0x00, 0x10, 0x38, 0x10, 0x10, 0x10, 0x0C, 0x00,
- 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00,
- 0x00, 0x00, 0x44, 0x44, 0x28, 0x28, 0x10, 0x00,
- 0x00, 0x00, 0x44, 0x54, 0x54, 0x54, 0x28, 0x00,
- 0x00, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
- 0x00, 0x00, 0x44, 0x44, 0x44, 0x3C, 0x04, 0x38,
- 0x00, 0x00, 0x7C, 0x08, 0x10, 0x20, 0x7C, 0x00,
- 0x00, 0x0E, 0x08, 0x30, 0x08, 0x08, 0x0E, 0x00,
- 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
- 0x00, 0x70, 0x10, 0x0C, 0x10, 0x10, 0x70, 0x00,
- 0x00, 0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x3C, 0x42, 0x99, 0xA1, 0xA1, 0x99, 0x42, 0x3C,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00,
+ 0x00, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x24, 0x7E, 0x24, 0x24, 0x7E, 0x24, 0x00,
+ 0x00, 0x08, 0x3E, 0x28, 0x3E, 0x0A, 0x3E, 0x08,
+ 0x00, 0x62, 0x64, 0x08, 0x10, 0x26, 0x46, 0x00,
+ 0x00, 0x10, 0x28, 0x10, 0x2A, 0x44, 0x3A, 0x00,
+ 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00,
+ 0x00, 0x20, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00,
+ 0x00, 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00,
+ 0x00, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10,
+ 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
+ 0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
+ 0x00, 0x3C, 0x46, 0x4A, 0x52, 0x62, 0x3C, 0x00,
+ 0x00, 0x18, 0x28, 0x08, 0x08, 0x08, 0x3E, 0x00,
+ 0x00, 0x3C, 0x42, 0x02, 0x3C, 0x40, 0x7E, 0x00,
+ 0x00, 0x3C, 0x42, 0x0C, 0x02, 0x42, 0x3C, 0x00,
+ 0x00, 0x08, 0x18, 0x28, 0x48, 0x7E, 0x08, 0x00,
+ 0x00, 0x7E, 0x40, 0x7C, 0x02, 0x42, 0x3C, 0x00,
+ 0x00, 0x3C, 0x40, 0x7C, 0x42, 0x42, 0x3C, 0x00,
+ 0x00, 0x7E, 0x02, 0x04, 0x08, 0x10, 0x10, 0x00,
+ 0x00, 0x3C, 0x42, 0x3C, 0x42, 0x42, 0x3C, 0x00,
+ 0x00, 0x3C, 0x42, 0x42, 0x3E, 0x02, 0x3C, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x20,
+ 0x00, 0x00, 0x04, 0x08, 0x10, 0x08, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x3E, 0x00, 0x3E, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x08, 0x04, 0x08, 0x10, 0x00,
+ 0x00, 0x3C, 0x42, 0x04, 0x08, 0x00, 0x08, 0x00,
+ 0x00, 0x3C, 0x4A, 0x56, 0x5E, 0x40, 0x3C, 0x00,
+ 0x00, 0x3C, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x00,
+ 0x00, 0x7C, 0x42, 0x7C, 0x42, 0x42, 0x7C, 0x00,
+ 0x00, 0x3C, 0x42, 0x40, 0x40, 0x42, 0x3C, 0x00,
+ 0x00, 0x78, 0x44, 0x42, 0x42, 0x44, 0x78, 0x00,
+ 0x00, 0x7E, 0x40, 0x7C, 0x40, 0x40, 0x7E, 0x00,
+ 0x00, 0x7E, 0x40, 0x7C, 0x40, 0x40, 0x40, 0x00,
+ 0x00, 0x3C, 0x42, 0x40, 0x4E, 0x42, 0x3C, 0x00,
+ 0x00, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x42, 0x00,
+ 0x00, 0x3E, 0x08, 0x08, 0x08, 0x08, 0x3E, 0x00,
+ 0x00, 0x02, 0x02, 0x02, 0x42, 0x42, 0x3C, 0x00,
+ 0x00, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, 0x00,
+ 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7E, 0x00,
+ 0x00, 0x42, 0x66, 0x5A, 0x42, 0x42, 0x42, 0x00,
+ 0x00, 0x42, 0x62, 0x52, 0x4A, 0x46, 0x42, 0x00,
+ 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00,
+ 0x00, 0x7C, 0x42, 0x42, 0x7C, 0x40, 0x40, 0x00,
+ 0x00, 0x3C, 0x42, 0x42, 0x52, 0x4A, 0x3C, 0x00,
+ 0x00, 0x7C, 0x42, 0x42, 0x7C, 0x44, 0x42, 0x00,
+ 0x00, 0x3C, 0x40, 0x3C, 0x02, 0x42, 0x3C, 0x00,
+ 0x00, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
+ 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00,
+ 0x00, 0x42, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00,
+ 0x00, 0x42, 0x42, 0x42, 0x42, 0x5A, 0x24, 0x00,
+ 0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00,
+ 0x00, 0x82, 0x44, 0x28, 0x10, 0x10, 0x10, 0x00,
+ 0x00, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x00,
+ 0x00, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x0E, 0x00,
+ 0x00, 0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x00,
+ 0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00,
+ 0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0x00, 0x1C, 0x22, 0x78, 0x20, 0x20, 0x7E, 0x00,
+ 0x00, 0x00, 0x38, 0x04, 0x3C, 0x44, 0x3C, 0x00,
+ 0x00, 0x20, 0x20, 0x3C, 0x22, 0x22, 0x3C, 0x00,
+ 0x00, 0x00, 0x1C, 0x20, 0x20, 0x20, 0x1C, 0x00,
+ 0x00, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3C, 0x00,
+ 0x00, 0x00, 0x38, 0x44, 0x78, 0x40, 0x3C, 0x00,
+ 0x00, 0x0C, 0x10, 0x18, 0x10, 0x10, 0x10, 0x00,
+ 0x00, 0x00, 0x3C, 0x44, 0x44, 0x3C, 0x04, 0x38,
+ 0x00, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x00,
+ 0x00, 0x10, 0x00, 0x30, 0x10, 0x10, 0x38, 0x00,
+ 0x00, 0x04, 0x00, 0x04, 0x04, 0x04, 0x24, 0x18,
+ 0x00, 0x20, 0x28, 0x30, 0x30, 0x28, 0x24, 0x00,
+ 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x00,
+ 0x00, 0x00, 0x68, 0x54, 0x54, 0x54, 0x54, 0x00,
+ 0x00, 0x00, 0x78, 0x44, 0x44, 0x44, 0x44, 0x00,
+ 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
+ 0x00, 0x00, 0x78, 0x44, 0x44, 0x78, 0x40, 0x40,
+ 0x00, 0x00, 0x3C, 0x44, 0x44, 0x3C, 0x04, 0x06,
+ 0x00, 0x00, 0x1C, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x00, 0x00, 0x38, 0x40, 0x38, 0x04, 0x78, 0x00,
+ 0x00, 0x10, 0x38, 0x10, 0x10, 0x10, 0x0C, 0x00,
+ 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00,
+ 0x00, 0x00, 0x44, 0x44, 0x28, 0x28, 0x10, 0x00,
+ 0x00, 0x00, 0x44, 0x54, 0x54, 0x54, 0x28, 0x00,
+ 0x00, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
+ 0x00, 0x00, 0x44, 0x44, 0x44, 0x3C, 0x04, 0x38,
+ 0x00, 0x00, 0x7C, 0x08, 0x10, 0x20, 0x7C, 0x00,
+ 0x00, 0x0E, 0x08, 0x30, 0x08, 0x08, 0x0E, 0x00,
+ 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x00, 0x70, 0x10, 0x0C, 0x10, 0x10, 0x70, 0x00,
+ 0x00, 0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3C, 0x42, 0x99, 0xA1, 0xA1, 0x99, 0x42, 0x3C,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp
index d52bcc175a..8bdb35d3ae 100644
--- a/engines/agos/debug.cpp
+++ b/engines/agos/debug.cpp
@@ -539,7 +539,7 @@ void AGOSEngine::dumpBitmap(const char *filename, const byte *offs, uint16 w, ui
src += 5;
} while (--count);
dst += w;
- }
+ }
} else if (flags & 0x80) {
for (i = 0; i != w; i += 2) {
byte *c = vc10_depackColumn(&state);
@@ -580,7 +580,7 @@ void AGOSEngine::palLoad(byte *pal, const byte *vga1, int a, int b) {
const byte *src;
uint16 num, palSize;
byte *palptr = (byte *)&pal[0];
-
+
if (getGameType() == GType_FF || getGameType() == GType_PP) {
num = 256;
palSize = 768;
diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp
index 58599ce5f6..0472b1192b 100644
--- a/engines/agos/icons.cpp
+++ b/engines/agos/icons.cpp
@@ -354,11 +354,11 @@ void AGOSEngine::drawIcon(WindowBlock *window, uint icon, uint x, uint y) {
dst += _dxSurfacePitch;
}
} else {
- uint8 palette[4];
- palette[0] = *src >> 4;
- palette[1] = *src++ & 0xf;
- palette[2] = *src >> 4;
- palette[3] = *src++ & 0xf;
+ uint8 palette[4];
+ palette[0] = *src >> 4;
+ palette[1] = *src++ & 0xf;
+ palette[2] = *src >> 4;
+ palette[3] = *src++ & 0xf;
for (int yp = 0; yp < 24; ++yp, src += 6) {
// Get bit-set representing the 24 pixels for the line
uint32 v1 = (READ_BE_UINT16(src) << 8) | *(src + 4);
diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp
index a8c1bf4bfa..cf6e808384 100644
--- a/engines/agos/input.cpp
+++ b/engines/agos/input.cpp
@@ -463,9 +463,9 @@ bool AGOSEngine::processSpecialKeys() {
_lastMinute = t1;
}
}
-
+
if (shouldQuit())
- _exitCutscene = true;
+ _exitCutscene = true;
switch (_keyPressed.keycode) {
case Common::KEYCODE_UP:
@@ -694,7 +694,7 @@ void AGOSEngine_PN::interact(char *buffer, uint8 size) {
_inputting = true;
_inputReady = true;
}
-
+
while (!shouldQuit() && _inputReady) {
if (!_noScanFlag && _scanFlag) {
buffer[0] = 1;
@@ -744,7 +744,7 @@ void AGOSEngine_PN::clearCursor(WindowBlock *window) {
bool AGOSEngine_PN::processSpecialKeys() {
if (shouldQuit())
- _exitCutscene = true;
+ _exitCutscene = true;
switch (_keyPressed.keycode) {
case Common::KEYCODE_ESCAPE:
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index f6cac8c36a..4278ed11e6 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -704,7 +704,7 @@ static bool getBit(Common::Stack<uint32> &dataList, uint32 &srcVal) {
static uint32 copyBits(Common::Stack<uint32> &dataList, uint32 &srcVal, int numBits) {
uint32 destVal = 0;
-
+
for (int i = 0; i < numBits; ++i) {
bool f = getBit(dataList, srcVal);
destVal = (destVal << 1) | (f ? 1 : 0);
diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp
index 2dbd4e52fb..62ca94e387 100644
--- a/engines/agos/script_pn.cpp
+++ b/engines/agos/script_pn.cpp
@@ -147,7 +147,7 @@ void AGOSEngine_PN::opn_opcode01() {
int32 sp = varval() + varval();
_variableArray[12] = sp % 65536;
_variableArray[13] = sp / 65536;
- if (sp > 65535)
+ if (sp > 65535)
sp=65535;
writeval(str, (int)sp);
setScriptReturn(true);
@@ -329,7 +329,7 @@ void AGOSEngine_PN::opn_opcode25() {
void AGOSEngine_PN::opn_opcode26() {
while ((_stackbase->classnum != -1) && (_stackbase != NULL))
junkstack();
- dumpstack();
+ dumpstack();
setScriptReturn(true);
}
@@ -371,10 +371,10 @@ void AGOSEngine_PN::opn_opcode31() {
slot = matchSaveGame(_saveFile, countSaveGames());
strcpy(bf, genSaveName(slot));
break;
- case 1:
+ case 1:
strcpy(bf, "test.sav");
break;
- case 2:
+ case 2:
// NOTE: Is this case ever used?
error("opn_opcode31: case 2");
break;
@@ -776,7 +776,7 @@ void AGOSEngine_PN::writeval(uint8 *ptr, int val) {
_workptr = ptr;
_linct = 255;
- if ((a = readfromline()) < 247)
+ if ((a = readfromline()) < 247)
error("writeval: Write to constant (%d)", a);
switch (a) {
@@ -836,7 +836,7 @@ int AGOSEngine_PN::actCallD(int n) {
funcentry(pf, n);
addstack(-1);
funccpy(pf);
- setposition(n, 0);
+ setposition(n, 0);
return(doline(1));
}
@@ -1065,7 +1065,7 @@ void AGOSEngine_PN::dumpstack() {
if (_stackbase == NULL)
error("dumpstack: Stack underflow or unknown longjmp");
- a = _stackbase->nextframe;
+ a = _stackbase->nextframe;
free((char *)_stackbase);
_stackbase = a;
}
@@ -1076,7 +1076,7 @@ void AGOSEngine_PN::junkstack() {
if (_stackbase == NULL)
error("junkstack: Stack underflow or unknown longjmp");
- a = _stackbase->nextframe;
+ a = _stackbase->nextframe;
if (_stackbase->classnum == -1)
free((char *)_stackbase->savearea);
free((char *)_stackbase);
@@ -1100,7 +1100,7 @@ void AGOSEngine_PN::popstack(int type) {
b = 0;
while (a < 6)
_variableArray[b++] = _stackbase->flag[a++];
- b = 24;
+ b = 24;
a = 0;
while (a < 8)
_variableArray[b++] = _stackbase->param[a++];
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index 6f5fb391e5..4a88e3aad1 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -56,7 +56,7 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) {
if (a == 0xFF || a == 0xFE || a == 0xFD) {
if (a == 0xFF)
ptr2 = _twoByteTokenStrings;
- if (a == 0xFE)
+ if (a == 0xFE)
ptr2 = _secondTwoByteTokenStrings;
if (a == 0xFD)
ptr2 = _thirdTwoByteTokenStrings;
@@ -79,7 +79,7 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) {
count1++;
}
ptr1 = _byteTokenStrings; /* Find it */
- while (count1--) {
+ while (count1--) {
while (*ptr1++)
;
}
@@ -224,7 +224,7 @@ l1: _stringTabPtr[i++] = mem;
;
mem++;
}
-
+
_stringTabPos = i;
}
}
@@ -936,7 +936,7 @@ char *AGOSEngine_PN::unctok(char *c, int n) {
*c = 0;
return c;
}
-
+
void AGOSEngine_PN::uncomstr(char *c, uint32 x) {
if (x > _textBaseSize)
error("UNCOMSTR: TBASE over-run\n");
@@ -1441,7 +1441,7 @@ void AGOSEngine_PN::getResponse(uint16 charNum, uint16 objNum, uint16 &msgNum1,
}
ptr++;
}
-
+
while ((num = *ptr++) != 0) {
if (num == objNum) {
msgNum2 = *ptr++;
@@ -1534,7 +1534,7 @@ char *AGOSEngine_PN::getMessage(char *msg, uint16 num) {
char *tmpPtr = strPtr1;
char *strPtr2 = strPtr1;
- while (*strPtr2 != 0 && *strPtr2 != 32)
+ while (*strPtr2 != 0 && *strPtr2 != 32)
strPtr2++;
while (*strPtr2) {
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index aee42f001b..742ac48ac8 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -540,7 +540,7 @@ int AGOSEngine::startSubroutine(Subroutine *sub) {
// WORKAROUND: If the game is saved, right after Simon is thrown in the dungeon of Sordid's Fortress of Doom,
// the saved game fails to load correctly. When loading the saved game, the sequence of Simon waking is started,
- // before the scene is actually reloaded, due to a script bug. We manually add the extra script code from the
+ // before the scene is actually reloaded, due to a script bug. We manually add the extra script code from the
// updated DOS CD release, which fixed this particular script bug.
if (getGameType() == GType_SIMON2 && sub->id == 12101) {
const byte bit = 228;
@@ -577,7 +577,7 @@ restart:
}
// WORKAROUND: Feeble walks in the incorrect direction, when looking at the Vent in the Research and Testing area of
- // the Company Central Command Compound. We manually add the extra script code from the updated English 2CD release,
+ // the Company Central Command Compound. We manually add the extra script code from the updated English 2CD release,
// which fixed this particular script bug.
if (getGameType() == GType_FF && _language == Common::EN_ANY) {
if (sub->id == 39125 && readVariable(84) == 2) {
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp
index c348401968..2486f09626 100644
--- a/engines/agos/verb.cpp
+++ b/engines/agos/verb.cpp
@@ -754,7 +754,7 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) {
if (_clickOnly)
return;
-
+
if (best_ha->flags & kBFInvertTouch) {
if (!(best_ha->flags & kBFBoxSelected)) {
hitarea_leave(best_ha, false);
@@ -763,7 +763,7 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) {
} else {
if (mode == 0)
return;
-
+
if (!(best_ha->flags & kBFInvertSelect))
return;
@@ -1145,7 +1145,7 @@ void AGOSEngine_PN::hitBox1(HitArea *ha) {
_mousePrintFG++;
_mouseString1 = _mouseString;
_mouseString = (const char*)"showname \0";
-
+
}
}
diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp
index 0a8db1855b..49edaef5e4 100644
--- a/engines/cine/pal.cpp
+++ b/engines/cine/pal.cpp
@@ -331,7 +331,7 @@ Palette &Palette::load(const byte *buf, const uint size, const Graphics::PixelFo
const int rBytePos = bytePos(format.rShift, format.bytesPerPixel, isBigEndian(endian));
const int gBytePos = bytePos(format.gShift, format.bytesPerPixel, isBigEndian(endian));
const int bBytePos = bytePos(format.bShift, format.bytesPerPixel, isBigEndian(endian));
-
+
for (uint i = 0; i < numColors; i++) {
// format.rMax(), format.gMax(), format.bMax() are also used as masks here
_colors[i].r = (buf[i * format.bytesPerPixel + rBytePos] >> (format.rShift % 8)) & format.rMax();
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp
index 4d68773fec..535620c7df 100644
--- a/engines/cruise/actor.cpp
+++ b/engines/cruise/actor.cpp
@@ -750,7 +750,7 @@ void processAnimation(void) {
currentActor->flag = 1;
}
- currentActor->pathId = computePathfinding(moveInfo, params.X, params.Y,
+ currentActor->pathId = computePathfinding(moveInfo, params.X, params.Y,
aniX, aniY, currentActor->stepX, currentActor->stepY, currentActor->pathId);
if (currentActor->pathId == ANIM_WAIT) {
@@ -804,7 +804,7 @@ void processAnimation(void) {
// , so 'break' statements should *not* be used at the end of case areas
switch (currentActor->phase) {
case ANIM_PHASE_STATIC_END:
- case ANIM_PHASE_STATIC:
+ case ANIM_PHASE_STATIC:
{
// In-place (on the spot) animationos
diff --git a/engines/cruise/backgroundIncrust.cpp b/engines/cruise/backgroundIncrust.cpp
index 3d9abacea3..03ed552018 100644
--- a/engines/cruise/backgroundIncrust.cpp
+++ b/engines/cruise/backgroundIncrust.cpp
@@ -81,7 +81,7 @@ void restoreBackground(backgroundIncrustStruct *pIncrust) {
int xp = j + X;
int yp = i + Y;
- if ((xp >= 0) && (yp >= 0) && (xp < 320) && (yp < 200))
+ if ((xp >= 0) && (yp >= 0) && (xp < 320) && (yp < 200))
pBackground[yp * 320 + xp] = pIncrust->ptr[i * width + j];
}
}
@@ -101,7 +101,7 @@ backgroundIncrustStruct *addBackgroundIncrust(int16 overlayIdx, int16 objectIdx,
// Don't process any further if not a sprite or polygon
if (!ptr) return NULL;
- if ((filesDatabase[params.fileIdx].subData.resourceType != OBJ_TYPE_SPRITE) &&
+ if ((filesDatabase[params.fileIdx].subData.resourceType != OBJ_TYPE_SPRITE) &&
(filesDatabase[params.fileIdx].subData.resourceType != OBJ_TYPE_POLY)) {
return NULL;
}
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index ee3d87b940..522e0a0d81 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -570,8 +570,8 @@ int findObject(int mouseX, int mouseY, int *outObjOvl, int *outObjIdx) {
cellStruct *currentObject = cellHead.prev;
while (currentObject) {
- if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded &&
- (currentObject->type == OBJ_TYPE_SPRITE || currentObject->type == OBJ_TYPE_MASK ||
+ if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded &&
+ (currentObject->type == OBJ_TYPE_SPRITE || currentObject->type == OBJ_TYPE_MASK ||
currentObject->type == OBJ_TYPE_EXIT || currentObject->type == OBJ_TYPE_VIRTUAL)) {
const char* pObjectName = getObjectName(currentObject->idx, overlayTable[currentObject->overlay].ovlData->arrayNameObj);
@@ -633,7 +633,7 @@ int findObject(int mouseX, int mouseY, int *outObjOvl, int *outObjIdx) {
offset += j;
if (offset >= 0) {
- if (filesDatabase[offset].resType == OBJ_TYPE_LINE &&
+ if (filesDatabase[offset].resType == OBJ_TYPE_LINE &&
filesDatabase[offset].subData.ptr) {
dataPtr = (int16 *)filesDatabase[offset].subData.ptr;
}
diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index 2e62fb8657..df0a39d2fa 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -424,7 +424,7 @@ int loadSetEntry(const char *name, uint8 *ptr, int currentEntryIdx, int currentD
localBuffer.hotspotY = s4.readUint16BE();
localBuffer.hotspotX = s4.readUint16BE();
- if (sec == 1)
+ if (sec == 1)
// Type 1: Width - (1*2) , Type 5: Width - (5*2)
localBuffer.width -= localBuffer.type * 2;
diff --git a/engines/cruise/debugger.cpp b/engines/cruise/debugger.cpp
index eb1cf585fc..3d3d69be58 100644
--- a/engines/cruise/debugger.cpp
+++ b/engines/cruise/debugger.cpp
@@ -47,8 +47,8 @@ bool Debugger::cmd_hotspots(int argc, const char **argv) {
cellStruct *currentObject = cellHead.prev;
while (currentObject) {
- if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded &&
- (currentObject->type == OBJ_TYPE_SPRITE || currentObject->type == OBJ_TYPE_MASK ||
+ if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded &&
+ (currentObject->type == OBJ_TYPE_SPRITE || currentObject->type == OBJ_TYPE_MASK ||
currentObject->type == OBJ_TYPE_EXIT || currentObject->type == OBJ_TYPE_VIRTUAL)) {
const char *pObjectName = getObjectName(currentObject->idx, overlayTable[currentObject->overlay].ovlData->arrayNameObj);
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 59a9fd50bb..0f601a582b 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -1394,7 +1394,7 @@ int16 Op_SongSize(void) {
*pSize = size;
} else
oldSize = 0;
-
+
return oldSize;
}
@@ -1412,7 +1412,7 @@ int16 Op_SetPattern(void) {
int16 Op_FadeSong(void) {
_vm->music().fadeSong();
-
+
return 0;
}
@@ -1646,7 +1646,7 @@ int16 Op_SetVolume(void) {
int volume = 63 - newVolume;
_vm->music().setVolume(volume << 2);
}
-
+
return oldVolume >> 2;
}
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index 0df77b60e9..0c393ca568 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -180,7 +180,7 @@ static void syncFilesDatabase(Common::Serializer &s) {
s.syncAsUint16LE(fe.width);
s.syncAsUint16LE(fe.resType);
s.syncAsUint16LE(fe.height);
-
+
// TODO: Have a look at the saving/loading of this pointer
tmp = (fe.subData.ptr) ? 1 : 0;
s.syncAsUint32LE(tmp);
@@ -602,7 +602,7 @@ static void DoSync(Common::Serializer &s) {
syncBackgroundTable(s);
syncPalScreen(s);
syncSoundList(s);
-
+
for (int i = 0; i < stateID; ++i)
s.syncAsSint16LE(globalVars[i]);
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index 114e37679a..fd638e6be5 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -188,7 +188,7 @@ void MusicPlayer::removeSong() {
}
_songPlayed = false;
-
+
strcpy(_musicName, "");
}
diff --git a/engines/cruise/sound.h b/engines/cruise/sound.h
index 2a2d6864ce..faf3df995d 100644
--- a/engines/cruise/sound.h
+++ b/engines/cruise/sound.h
@@ -45,7 +45,7 @@ private:
byte _masterVolume;
byte *_songPointer;
- // TODO: lib_SongSize
+ // TODO: lib_SongSize
int _songSize;
void patchMidi(uint32 adr, const byte *data, int size);
diff --git a/engines/cruise/staticres.cpp b/engines/cruise/staticres.cpp
index 1d6f26ac7b..d49d12c05b 100644
--- a/engines/cruise/staticres.cpp
+++ b/engines/cruise/staticres.cpp
@@ -135,8 +135,8 @@ int16 german_fontCharacterTable[256] = {
86, 87, 88, 89, 90, 91, 92,
-1, -1, -1,
0x72,
- -1, -1,
- 0x5e,
+ -1, -1,
+ 0x5e,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
0x6a,
-1, -1, -1, -1, -1,
diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp
index d9a217e84c..58a62ed564 100644
--- a/engines/gob/dataio.cpp
+++ b/engines/gob/dataio.cpp
@@ -371,7 +371,7 @@ void DataIO::openDataFile(const char *src, bool itk) {
ChunkDesc *dataDesc;
char path[128];
int16 file;
- char *fakeTotPtr;
+ char *fakeTotPtr;
strncpy0(path, src, 127);
if (!strchr(path, '.')) {
diff --git a/engines/gob/demos/demoplayer.cpp b/engines/gob/demos/demoplayer.cpp
index d9d6b1e949..29f638b33b 100644
--- a/engines/gob/demos/demoplayer.cpp
+++ b/engines/gob/demos/demoplayer.cpp
@@ -44,7 +44,7 @@ DemoPlayer::Script DemoPlayer::_scripts[] = {
{kScriptSourceFile, "e.scn"},
{kScriptSourceFile, "i.scn"},
{kScriptSourceFile, "s.scn"},
- {kScriptSourceDirect,
+ {kScriptSourceDirect,
"slide machu.imd 20\nslide conseil.imd 20\nslide cons.imd 20\n" \
"slide tumia.imd 1\nslide tumib.imd 1\nslide tumic.imd 1\n" \
"slide tumid.imd 1\nslide post.imd 1\nslide posta.imd 1\n" \
diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp
index 1982cff27f..fc6478e5d5 100644
--- a/engines/gob/detection.cpp
+++ b/engines/gob/detection.cpp
@@ -849,7 +849,7 @@ static const GOBGameDescription gameDescriptions[] = {
kFeaturesNone,
0, 0, 0
},
- { // Supplied by goodoldgeorg in bug report #2563539
+ { // Supplied by goodoldgeorg in bug report #2563539
{
"ween",
"",
@@ -1489,7 +1489,7 @@ static const GOBGameDescription gameDescriptions[] = {
kGameTypeFascination,
kFeaturesNone,
"disk0.stk", 0, 0
- },
+ },
{
{
"fascination",
@@ -1502,7 +1502,7 @@ static const GOBGameDescription gameDescriptions[] = {
kGameTypeFascination,
kFeaturesNone,
"disk0.stk", 0, 0
- },
+ },
{
{
"fascination",
@@ -1515,7 +1515,7 @@ static const GOBGameDescription gameDescriptions[] = {
kGameTypeFascination,
kFeaturesNone,
"disk0.stk", 0, 0
- },
+ },
{
{
"fascination",
@@ -1528,7 +1528,7 @@ static const GOBGameDescription gameDescriptions[] = {
kGameTypeFascination,
kFeaturesNone,
"disk0.stk", 0, 0
- },
+ },
{
{
"geisha",
diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp
index cd9685db2e..4bcf3c81cd 100644
--- a/engines/gob/inter.cpp
+++ b/engines/gob/inter.cpp
@@ -234,7 +234,7 @@ void Inter::funcBlock(int16 retFlag) {
// The EGA, Mac and Windows versions of gob1 doesn't add a delay after
// showing images between levels. We manually add it here.
if ((_vm->getGameType() == kGameTypeGob1) &&
- ( _vm->isEGA() ||
+ ( _vm->isEGA() ||
(_vm->getPlatform() == Common::kPlatformMacintosh) ||
(_vm->getPlatform() == Common::kPlatformWindows))) {
diff --git a/engines/gob/inter_fascin.cpp b/engines/gob/inter_fascin.cpp
index 6be278295e..c325c29713 100644
--- a/engines/gob/inter_fascin.cpp
+++ b/engines/gob/inter_fascin.cpp
@@ -55,8 +55,8 @@ const int Inter_Fascination::_goblinFuncLookUp[][2] = {
{10, 9},
{11, 10},
{12, 11},
- {1000, 12},
- {1001, 13},
+ {1000, 12},
+ {1001, 13},
{1002, 14}
};
@@ -515,7 +515,7 @@ void Inter_Fascination::setupOpcodes() {
_opcodesDrawFascination = opcodesDraw;
_opcodesFuncFascination = opcodesFunc;
- _opcodesGoblinFascination = opcodesGoblin;
+ _opcodesGoblinFascination = opcodesGoblin;
}
void Inter_Fascination::executeDrawOpcode(byte i) {
@@ -676,14 +676,14 @@ void Inter_Fascination::oFascin_cdUnknown6() {
void Inter_Fascination::oFascin_setRenderFlags() {
int16 expr;
-// warning("Fascination oFascin_cdUnknown10 (set render flags)");
+// warning("Fascination oFascin_cdUnknown10 (set render flags)");
evalExpr(&expr);
warning("_draw_renderFlags <- %d",expr);
_vm->_draw->_renderFlags = expr;
}
void Inter_Fascination::oFascin_cdUnknown11() {
-// warning("Fascination oFascin_cdUnknown11 (set variable)");
+// warning("Fascination oFascin_cdUnknown11 (set variable)");
evalExpr(0);
}
@@ -744,7 +744,7 @@ const char *Inter_Fascination::getOpcodeGoblinDesc(int i) {
for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++)
if (_goblinFuncLookUp[j][0] == i)
return _opcodesGoblinFascination[_goblinFuncLookUp[j][1]].desc;
- warning("Error in getOpcodeGoblinDesc %d",i);
+ warning("Error in getOpcodeGoblinDesc %d",i);
return "";
}
diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp
index eeb935fdc0..46621582e5 100644
--- a/engines/gob/inter_v5.cpp
+++ b/engines/gob/inter_v5.cpp
@@ -1001,7 +1001,7 @@ void Inter_v5::o5_gob96(OpGobParams &params) {
warning("Dynasty Stub: GobFunc 96: %d, %d, %d, %d",
speedThrottle4, speedThrottle3, speedThrottle2, speedThrottle1);
- // TODO
+ // TODO
}
void Inter_v5::o5_gob97(OpGobParams &params) {
diff --git a/engines/gob/parse.h b/engines/gob/parse.h
index 058d94afa6..d72b4d5c2b 100644
--- a/engines/gob/parse.h
+++ b/engines/gob/parse.h
@@ -86,7 +86,7 @@ enum {
enum {
// FIXME: The following two 'truth values' are stored inside the list
// of "operators". So they somehow coincide with OP_LOAD_VAR_UINT32
- // and OP_LOAD_VAR_UINT32_AS_UINT16. I haven't yet quite understood
+ // and OP_LOAD_VAR_UINT32_AS_UINT16. I haven't yet quite understood
// how, resp. what that means. You have been warned.
GOB_TRUE = 24,
GOB_FALSE = 23
diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp
index 716d52c564..647eaa913b 100644
--- a/engines/groovie/graphics.cpp
+++ b/engines/groovie/graphics.cpp
@@ -60,7 +60,7 @@ void GraphicsMan::update() {
_fading = 0;
// Clear the buffer when ending the fade out
- if (_fading == 2)
+ if (_fading == 2)
_foreground.fillRect(Common::Rect(640, 320), 0);
}
}
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index ecf8269fd3..12494870ad 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -99,17 +99,17 @@ public:
virtual GUI::Debugger *getDebugger();
bool isEGA() const { return (getFeatures() & GF_EGA) != 0; }
- virtual Common::Error loadGameState(int slot) {
+ virtual Common::Error loadGameState(int slot) {
return loadGame(slot) ? Common::kReadingFailed : Common::kNoError;
}
virtual Common::Error saveGameState(int slot, const char *desc) {
String s(desc);
return saveGame(slot, s) ? Common::kReadingFailed : Common::kNoError;
}
- virtual bool canLoadGameStateCurrently() {
+ virtual bool canLoadGameStateCurrently() {
return _saveLoadAllowed && !Fights.isFighting();
}
- virtual bool canSaveGameStateCurrently() {
+ virtual bool canSaveGameStateCurrently() {
return _saveLoadAllowed && !Fights.isFighting();
}
};
diff --git a/engines/made/database.cpp b/engines/made/database.cpp
index 7656d9c5c4..763ea0840d 100644
--- a/engines/made/database.cpp
+++ b/engines/made/database.cpp
@@ -431,7 +431,7 @@ void GameDatabaseV2::load(Common::SeekableReadStream &sourceS) {
// "Decrypt" the text data
for (uint32 i = 0; i < textSize; i++)
_gameText[i] += 0x1E;
-
+
sourceS.seek(objectsOffs);
if (version == 40) {
diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp
index 950db959f3..e43b00146f 100644
--- a/engines/made/detection.cpp
+++ b/engines/made/detection.cpp
@@ -244,7 +244,7 @@ static const MadeGameDescription gameDescriptions[] = {
GF_CD_COMPRESSED,
3,
},
-
+
{
// Return to Zork - French CD version 1.2 5/13/95 (installed)
// Patch #2685032 submitted by goodoldgeorg
diff --git a/engines/made/graphics.cpp b/engines/made/graphics.cpp
index 89ec7b20a4..7e8330d3f4 100644
--- a/engines/made/graphics.cpp
+++ b/engines/made/graphics.cpp
@@ -77,7 +77,7 @@ void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, u
byte *cmdBuffer = source + cmdOffs;
ValueReader maskReader(source + maskOffs, (maskFlags & 2) != 0);
ValueReader pixelReader(source + pixelOffs, (pixelFlags & 2) != 0);
-
+
if ((maskFlags != 0) && (maskFlags != 2) && (pixelFlags != 0) && (pixelFlags != 2) && (cmdFlags != 0))
error("decompressImage() Unsupported flags: cmdFlags = %02X; maskFlags = %02X, pixelFlags = %02X", cmdFlags, maskFlags, pixelFlags);
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index 10e8c5d7e9..50a14c3e34 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -280,7 +280,7 @@ Common::Error MadeEngine::run() {
} else {
error ("Unknown MADE game");
}
-
+
if ((getFeatures() & GF_CD) || (getFeatures() & GF_CD_COMPRESSED))
checkCD();
diff --git a/engines/made/made.h b/engines/made/made.h
index be369053cb..c512ecde1d 100644
--- a/engines/made/made.h
+++ b/engines/made/made.h
@@ -117,7 +117,7 @@ public:
bool _autoStopSound;
uint _soundEnergyIndex;
SoundEnergyArray *_soundEnergyArray;
-
+
uint32 _musicBeatStart;
uint32 _cdTimeStart;
diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp
index b44c2d100c..b8742b1327 100644
--- a/engines/made/resource.cpp
+++ b/engines/made/resource.cpp
@@ -64,7 +64,7 @@ void PictureResource::load(byte *source, int size) {
void PictureResource::loadRaw(byte *source, int size) {
// Loads a "raw" picture as used in RtZ, LGoP2, Manhole:N&E and Rodney's Funscreen
-
+
Common::MemoryReadStream *sourceS = new Common::MemoryReadStream(source, size);
_hasPalette = (sourceS->readByte() != 0);
@@ -118,7 +118,7 @@ void PictureResource::loadChunked(byte *source, int size) {
uint32 chunkType = sourceS->readUint32BE();
uint32 chunkSize = sourceS->readUint32BE();
-
+
if (sourceS->eos())
break;
diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp
index b89ecce70a..7d1c3ed0a7 100644
--- a/engines/made/screenfx.cpp
+++ b/engines/made/screenfx.cpp
@@ -51,15 +51,15 @@ ScreenEffects::ScreenEffects(Screen *screen) : _screen(screen) {
vfxY1 = 0;
vfxWidth = 0;
vfxHeight = 0;
-
+
_fxPalette = new byte[768];
-
+
}
ScreenEffects::~ScreenEffects() {
delete[] _fxPalette;
}
-
+
void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
// Workaround: we set up the final palette beforehand, to reduce CPU usage during the screen effect.
// The visual difference is not noticeable, but CPU load is much much less (as palette updates are very expensive).
diff --git a/engines/made/screenfx.h b/engines/made/screenfx.h
index 9004cc9a35..912eb8e0f7 100644
--- a/engines/made/screenfx.h
+++ b/engines/made/screenfx.h
@@ -53,7 +53,7 @@ private:
void setPalette(byte *palette);
void setBlendedPalette(byte *palette, byte *newPalette, int colorCount, int16 value, int16 maxValue);
void copyFxRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2);
-
+
void vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
void vfx01(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
void vfx02(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp
index 5b6ff37905..c0373dfa0d 100644
--- a/engines/made/scriptfuncs.cpp
+++ b/engines/made/scriptfuncs.cpp
@@ -632,7 +632,7 @@ int16 ScriptFunctions::sfClearMono(int16 argc, int16 *argv) {
}
int16 ScriptFunctions::sfGetSoundEnergy(int16 argc, int16 *argv) {
- // This is called while in-game voices are played to animate
+ // This is called while in-game voices are played to animate
// mouths when NPCs are talking
int result = 0;
if (_vm->_mixer->isSoundHandleActive(_audioStreamHandle) && _vm->_soundEnergyArray) {
diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp
index 99186fc008..5ff1f73b05 100644
--- a/engines/made/sound.cpp
+++ b/engines/made/sound.cpp
@@ -150,7 +150,7 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
uint16 ofs = 0;
uint16 i = 0, l = 0;
byte val;
-
+
SoundEnergyItem soundEnergyItem;
const int modeValues[3][4] = {
@@ -225,11 +225,11 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
for (i = 0; i < workChunkSize; i++)
soundBuffer[i] = *source++;
workSample = soundBuffer[workChunkSize - 1] - 128;
-
+
soundEnergyItem.energy = 4;
if (soundEnergyArray)
soundEnergyArray->push_back(soundEnergyItem);
-
+
break;
default:
diff --git a/engines/saga/actor.h b/engines/saga/actor.h
index d2ef43caf3..d998c65240 100644
--- a/engines/saga/actor.h
+++ b/engines/saga/actor.h
@@ -649,7 +649,7 @@ public:
struct DebugPoint {
Point point;
byte color;
-
+
DebugPoint() : color(0) {}
DebugPoint(const Point &p, byte c): point(p), color(c) {}
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 27a1e2ae9b..7265860d86 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -104,7 +104,7 @@ enum GameFileTypes {
GAME_SOUNDFILE = 1 << 2, // SFX (also contains voices and MIDI music in SAGA 2 games)
GAME_VOICEFILE = 1 << 3, // Voices (also contains SFX in the ITE floppy version)
// ITE specific
- GAME_DIGITALMUSICFILE = 1 << 4, // ITE digital music, added by Wyrmkeep
+ GAME_DIGITALMUSICFILE = 1 << 4, // ITE digital music, added by Wyrmkeep
GAME_MACBINARY = 1 << 5, // ITE Mac CD Guild
GAME_DEMOFILE = 1 << 6, // Early ITE demo
GAME_SWAPENDIAN = 1 << 7, // Used to identify the BE voice file in the ITE combined version
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index 5546e81992..a7c802f0c9 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -399,7 +399,7 @@ void Scene::skipScene() {
_sceneQueue.erase(_sceneQueue.begin(), queueIterator);
endScene();
-
+
loadScene(*_sceneQueue.begin());
break;
}
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index 7a7e15c249..6fd6adfa10 100644
--- a/engines/saga/script.cpp
+++ b/engines/saga/script.cpp
@@ -316,7 +316,7 @@ void Script::setupScriptOpcodeList() {
// String manipulation
OPCODE(opDummy), // 71: opStrCat, string concatenation (unused)
OPCODE(opDummy), // 72: opStrFormat, string formatting (unused)
- // Assignment
+ // Assignment
OPCODE(opDummy), // 73: assign (unused)
OPCODE(opDummy), // 74: += (unused)
OPCODE(opDummy), // 75: -= (unused)
@@ -434,7 +434,7 @@ void Script::setupScriptOpcodeList() {
// String manipulation
OPCODE(opDummy), // 80: opStrCat, string concatenation (unused)
OPCODE(opDummy), // 81: opStrFormat, string formatting (unused)
- // Assignment
+ // Assignment
OPCODE(opDummy), // 82: assign (unused)
OPCODE(opDummy), // 83: += (unused)
OPCODE(opDummy), // 84: -= (unused)
@@ -660,7 +660,7 @@ void Script::opCcallV(SCRIPTOP_PARAMS) {
(this->*scriptFunction)(thread, argumentsCount, stopParsing);
if (stopParsing)
return;
-
+
if (scriptFunction == &Saga::Script::sfScriptGotoScene) {
stopParsing = true;
breakOut = true;
diff --git a/engines/saga/script.h b/engines/saga/script.h
index 85eb92b96c..fa2ea35c5d 100644
--- a/engines/saga/script.h
+++ b/engines/saga/script.h
@@ -444,7 +444,7 @@ protected:
void setupScriptOpcodeList();
void opDummy(SCRIPTOP_PARAMS) { warning("Dummy opcode called"); }
- void opNextBlock(SCRIPTOP_PARAMS) {
+ void opNextBlock(SCRIPTOP_PARAMS) {
thread->_instructionOffset = (((thread->_instructionOffset) >> 10) + 1) << 10;
}
void opDup(SCRIPTOP_PARAMS);
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp
index 29f2ab28ce..b2744482bd 100644
--- a/engines/saga/sndres.cpp
+++ b/engines/saga/sndres.cpp
@@ -219,7 +219,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
file->open(soundFileName);
soundResourceLength = file->size();
context->isBigEndian = true;
- } else
+ } else
#endif
{
ResourceData* resourceData = context->getResourceData(resourceId);
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 7cd39d3c7e..74a62da356 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -1042,7 +1042,7 @@ reg_t kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (audioRes) {
audioStream = Audio::makeLinearInputStream(audioRes->data, audioRes->size, _audioRate, Audio::Mixer::FLAG_UNSIGNED, 0, 0);
- sampleLen = audioRes->size * 60 / _audioRate;
+ sampleLen = audioRes->size * 60 / _audioRate;
} else {
// No patch file found, read it from the audio volume
byte volume;
@@ -1057,8 +1057,8 @@ reg_t kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) {
sprintf(filename, "AUDIO%03d.%03d", _lang, volume);
// Try to load compressed
- audioStream = Audio::AudioStream::openStreamFile(filename, start, duration);
- if (!audioStream) {
+ audioStream = Audio::AudioStream::openStreamFile(filename, start, duration);
+ if (!audioStream) {
// Compressed file load failed, try to load original raw data
byte *soundbuff = (byte *)malloc(size);
Common::File* audioFile = new Common::File();
@@ -1094,7 +1094,7 @@ reg_t kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) {
case kSci1AudioPosition:
if (mixer->isSoundHandleActive(_audioHandle)) {
return make_reg(0, mixer->getSoundElapsedTime(_audioHandle) * 6 / 100); // return elapsed time in ticks
- } else {
+ } else {
return make_reg(0, -1); // Sound finished
}
case kSci1AudioRate:
diff --git a/engines/sci/sfx/player/player.cpp b/engines/sci/sfx/player/player.cpp
index 2336978743..5c811f8ab8 100644
--- a/engines/sci/sfx/player/player.cpp
+++ b/engines/sci/sfx/player/player.cpp
@@ -91,8 +91,8 @@ static void play_song(SongIterator *it) {
}
static void player_tell_synth(int buf_nr, byte *buf) {
- byte op1 = (buf_nr < 2 ? 0 : buf[1]);
- byte op2 = (buf_nr < 3 ? 0 : buf[2]);
+ byte op1 = (buf_nr < 2 ? 0 : buf[1]);
+ byte op2 = (buf_nr < 3 ? 0 : buf[2]);
static_cast<MidiDriver *>(mididrv)->send(buf[0], op1, op2);
}
diff --git a/engines/sci/sfx/player/polled.cpp b/engines/sci/sfx/player/polled.cpp
index 27d0f88ffe..842b7c5df5 100644
--- a/engines/sci/sfx/player/polled.cpp
+++ b/engines/sci/sfx/player/polled.cpp
@@ -99,7 +99,7 @@ protected:
void PolledPlayerAudioStream::queryTimestamp() {
Audio::Timestamp stamp;
-
+
if (!new_song) {
_mode = FEED_MODE_IDLE;
} else {
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 297d0a0d12..63feeb9385 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -522,7 +522,7 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
} else if (argv[1][0] == '-') {
result = Common::disableDebugChannel(argv[1] + 1);
}
-
+
if (result) {
DebugPrintf("%s %s\n", (argv[1][0] == '+') ? "Enabled" : "Disabled", argv[1] + 1);
} else {
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index d886ec4af3..f378f2225e 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -440,9 +440,9 @@ void ScummEngine_v3::processKeyboard(Common::KeyState lastKeyHit) {
// SCUMM var 244 is the episode score
// and var 245 is the series score
char text[50];
-
+
updateIQPoints();
-
+
sprintf(text, "IQ Points: Episode = %d, Series = %d", _scummVars[244], _scummVars[245]);
Indy3IQPointsDialog indy3IQPointsDialog(this, text);
runDialog(indy3IQPointsDialog);
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index c5b7effd6a..a2cd4a0d4d 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -829,7 +829,7 @@ int ScummEngine::remapPaletteColor(int r, int g, int b, int threshold) {
uint sum, bestsum, bestitem = 0;
int startColor = (_game.version == 8) ? 24 : 1;
-
+
if (_game.heversion >= 99)
pal = _hePalettes + 1024 + startColor * 3;
else
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index a24e3eeb04..f40391778c 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -452,7 +452,7 @@ void Control::doControlPanel(void) {
if (SkyEngine::isDemo()) {
return;
}
-
+
initPanel();
_savedCharSet = _skyText->giveCurrentCharSet();
@@ -783,7 +783,7 @@ uint16 Control::shiftDown(uint8 speed) {
else
return 0;
}
-
+
return SHIFTED;
}
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 9077e4f8c3..3ff943a3f0 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -149,14 +149,14 @@ void ControlButton::draw(void) {
memset(HIFbuf, 0, _resMan->readUint16(&fHead->height) * _resMan->readUint16(&fHead->width));
Screen::decompressHIF(src, HIFbuf);
src = HIFbuf;
-
+
if (_resMan->readUint16(&fHead->width) < 300)
for (uint16 cnt = 0; cnt < _resMan->readUint16(&fHead->height); cnt++) {
for (uint16 cntx = 0; cntx < _resMan->readUint16(&fHead->width); cntx++)
if (src[cntx])
dst[cntx] = src[cntx];
-
- dst += SCREEN_WIDTH;
+
+ dst += SCREEN_WIDTH;
for (uint16 cntx = 0; cntx < _resMan->readUint16(&fHead->width); cntx++)
if (src[cntx])
dst[cntx] = src[cntx];
@@ -191,14 +191,14 @@ void ControlButton::draw(void) {
dst[cntx * 2] = src[cntx];
dst[cntx * 2 + 1] = src[cntx];
}
-
- dst += SCREEN_WIDTH;
+
+ dst += SCREEN_WIDTH;
for (uint16 cntx = 0; cntx < _resMan->readUint16(&fHead->width) / 2; cntx++)
if (src[cntx]) {
dst[cntx * 2] = src[cntx];
dst[cntx * 2 + 1] = src[cntx];
}
-
+
dst += SCREEN_WIDTH;
src += _resMan->readUint16(&fHead->width)/2;
}
@@ -214,7 +214,7 @@ void ControlButton::draw(void) {
dst += SCREEN_WIDTH;
src += _resMan->readUint16(&fHead->width);
}
-
+
_system->copyRectToScreen(_dstBuf, SCREEN_WIDTH, _x, _y, _width, _height);
}
@@ -1022,15 +1022,15 @@ void Control::renderText(const uint8 *str, uint16 x, uint16 y, uint8 mode) {
Screen::decompressHIF(sprData, HIFbuf);
sprData = HIFbuf;
}
-
+
for (uint16 cnty = 0; cnty < _resMan->getUint16(chSpr->height); cnty++) {
for (uint16 cntx = 0; cntx < _resMan->getUint16(chSpr->width); cntx++) {
if (sprData[cntx])
dst[cntx] = sprData[cntx];
}
-
+
if(SwordEngine::isPsx()) { //On PSX version we need to double horizontal lines
- dst += SCREEN_WIDTH;
+ dst += SCREEN_WIDTH;
for (uint16 cntx = 0; cntx < _resMan->getUint16(chSpr->width); cntx++)
if (sprData[cntx])
dst[cntx] = sprData[cntx];
@@ -1041,10 +1041,10 @@ void Control::renderText(const uint8 *str, uint16 x, uint16 y, uint8 mode) {
}
destX += _resMan->getUint16(chSpr->width) - 3;
str++;
-
+
free(HIFbuf);
}
-
+
_system->copyRectToScreen(_screenBuf + y * SCREEN_WIDTH + x, SCREEN_WIDTH, x, y, (destX - x) + 3, 28);
}
@@ -1070,7 +1070,7 @@ void Control::renderVolumeBar(uint8 id, uint8 volL, uint8 volR) {
for (uint16 cnty = 0; cnty < barHeight; cnty++) {
memcpy(destMem, srcMem, _resMan->getUint16(frHead->width));
-
+
if(SwordEngine::isPsx()) { //linedoubling
destMem += SCREEN_WIDTH;
memcpy(destMem, srcMem, _resMan->getUint16(frHead->width));
@@ -1079,7 +1079,7 @@ void Control::renderVolumeBar(uint8 id, uint8 volL, uint8 volR) {
srcMem += _resMan->getUint16(frHead->width);
destMem += SCREEN_WIDTH;
}
-
+
_system->copyRectToScreen(_screenBuf + destY * SCREEN_WIDTH + destX, SCREEN_WIDTH, destX, destY, _resMan->getUint16(frHead->width), _resMan->getUint16(frHead->height));
_resMan->resClose(SR_VLIGHT);
destX += 32;
@@ -1106,7 +1106,7 @@ void Control::saveGameToFile(uint8 slot) {
outf->writeByte(SAVEGAME_VERSION);
if (!isPanelShown()) // Generate a thumbnail only if we are outside of game menu
- Graphics::saveThumbnail(*outf);
+ Graphics::saveThumbnail(*outf);
// Date / time
tm curTime;
diff --git a/engines/sword1/control.h b/engines/sword1/control.h
index 6b0d838f96..d6adc61c3a 100644
--- a/engines/sword1/control.h
+++ b/engines/sword1/control.h
@@ -44,7 +44,7 @@ class Music;
class Sound;
#define SAVEGAME_HEADER MKID_BE('BS_1')
-#define SAVEGAME_VERSION 2
+#define SAVEGAME_VERSION 2
#define MAX_BUTTONS 16
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 2c3678d020..c51d311e16 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -54,7 +54,7 @@ static const char *g_dirNames[] = { "clusters", "speech" };
#define NUM_COMMON_FILES_TO_CHECK 1
#define NUM_PC_FILES_TO_CHECK 3
#define NUM_MAC_FILES_TO_CHECK 4
-#define NUM_PSX_FILES_TO_CHECK 2
+#define NUM_PSX_FILES_TO_CHECK 2
#define NUM_DEMO_FILES_TO_CHECK 1
#define NUM_MAC_DEMO_FILES_TO_CHECK 1
#define NUM_FILES_TO_CHECK NUM_COMMON_FILES_TO_CHECK + NUM_PC_FILES_TO_CHECK + NUM_MAC_FILES_TO_CHECK + NUM_PSX_FILES_TO_CHECK + NUM_DEMO_FILES_TO_CHECK + NUM_MAC_DEMO_FILES_TO_CHECK
@@ -264,7 +264,7 @@ SaveStateDescriptor SwordMetaEngine::querySaveMetaInfos(const char *target, int
if (versionSave < 2) // These older version of the savegames used a flag to signal presence of thumbnail
in->skip(1);
-
+
if (Graphics::checkThumbnailHeader(*in)) {
Graphics::Surface *thumbnail = new Graphics::Surface();
assert(thumbnail);
@@ -323,7 +323,7 @@ Common::Error SwordEngine::loadGameState(int slot) {
_control->restoreGameFromFile(slot);
reinitialize();
_control->doRestore();
- reinitRes();
+ reinitRes();
return Common::kNoError; // TODO: return success/failure
}
diff --git a/engines/sword1/mouse.cpp b/engines/sword1/mouse.cpp
index 18fb9908fc..020586d702 100644
--- a/engines/sword1/mouse.cpp
+++ b/engines/sword1/mouse.cpp
@@ -210,7 +210,7 @@ void Mouse::createPointer(uint32 ptrId, uint32 luggageId) {
uint16 resSizeX;
uint16 resSizeY;
- if (SwordEngine::isPsx()) //PSX pointers are half height
+ if (SwordEngine::isPsx()) //PSX pointers are half height
ptrSizeY *= 2;
if (luggageId) {
@@ -244,7 +244,7 @@ void Mouse::createPointer(uint32 ptrId, uint32 luggageId) {
for (uint32 cntx = 0; cntx < luggSizeX; cntx++)
if (luggSrc[cntx])
dstData[cntx] = luggSrc[cntx];
-
+
if(SwordEngine::isPsx()) {
dstData += resSizeX;
for (uint32 cntx = 0; cntx < luggSizeX; cntx++)
@@ -258,7 +258,7 @@ void Mouse::createPointer(uint32 ptrId, uint32 luggageId) {
}
_resMan->resClose(luggageId);
}
-
+
uint8 *dstData = ptrData;
uint8 *srcData = (uint8*)ptr + sizeof(MousePtr);
for (uint32 frameCnt = 0; frameCnt < noFrames; frameCnt++) {
@@ -267,7 +267,7 @@ void Mouse::createPointer(uint32 ptrId, uint32 luggageId) {
if (srcData[cntx])
dstData[cntx] = srcData[cntx];
- if(SwordEngine::isPsx()) {
+ if(SwordEngine::isPsx()) {
dstData +=resSizeX;
for (uint32 cntx = 0; cntx < ptrSizeX; cntx++)
if (srcData[cntx])
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index 850a861f67..feb48b0750 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -261,7 +261,7 @@ bool MusicHandle::playPSX(uint16 id, bool loop) {
if (!_file.isOpen())
if (!_file.open("tunes.dat"))
return false;
-
+
Common::File tableFile;
if (!tableFile.open("tunes.tab"))
return false;
@@ -280,7 +280,7 @@ bool MusicHandle::playPSX(uint16 id, bool loop) {
_audioSource = NULL;
return false;
}
-
+
return true;
}
diff --git a/engines/sword1/resman.cpp b/engines/sword1/resman.cpp
index d0b5827a13..7e067cd1a0 100644
--- a/engines/sword1/resman.cpp
+++ b/engines/sword1/resman.cpp
@@ -354,8 +354,8 @@ MemHandle *ResMan::resHandle(uint32 id) {
// portuguese subtitles (cluster file 2, group 6) with a version that do not
// contain subtitles for this languages (i.e. has only 6 languages and not 7).
if (cluster >= _prj.noClu || group >= _prj.clu[cluster].noGrp)
- return NULL;
-
+ return NULL;
+
return &(_prj.clu[cluster].grp[group].resHandle[id & 0xFFFF]);
}
@@ -376,7 +376,7 @@ uint32 ResMan::resOffset(uint32 id) {
id = _srIdList[id & 0xFFFF];
uint8 cluster = (uint8)((id >> 24) - 1);
uint8 group = (uint8)(id >> 16);
-
+
if (cluster >= _prj.noClu || group >= _prj.clu[cluster].noGrp)
return 0;
diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp
index 3f2544d8cf..e6193e4137 100644
--- a/engines/sword1/screen.cpp
+++ b/engines/sword1/screen.cpp
@@ -348,7 +348,7 @@ void Screen::newScreen(uint32 screen) {
void Screen::quitScreen(void) {
uint8 cnt;
- if (SwordEngine::isPsx())
+ if (SwordEngine::isPsx())
flushPsxCache();
for (cnt = 0; cnt < _roomDefTable[_currentScreen].totalLayers; cnt++)
_resMan->resClose(_roomDefTable[_currentScreen].layers[cnt]);
@@ -363,9 +363,9 @@ void Screen::quitScreen(void) {
void Screen::draw(void) {
uint8 cnt;
-
+
debug(8, "Screen::draw() -> _currentScreen %u", _currentScreen);
-
+
if (_currentScreen == 54) {
// rm54 has a BACKGROUND parallax layer in parallax[0]
if (_parallax[0] && !SwordEngine::isPsx() ) //Avoid drawing this parallax on PSX edition, it gets occluded by background
@@ -400,7 +400,7 @@ void Screen::draw(void) {
} else { //We are using PSX version
if(_currentScreen == 45 || _currentScreen == 55 ||
_currentScreen == 57 || _currentScreen == 63 || _currentScreen == 71) { // Width shrinked backgrounds
- if (!_psxCache.decodedBackground)
+ if (!_psxCache.decodedBackground)
_psxCache.decodedBackground = psxShrinkedBackgroundToIndexed(_layerBlocks[0], _scrnSizeX, _scrnSizeY);
} else {
if (!_psxCache.decodedBackground)
@@ -425,11 +425,11 @@ void Screen::draw(void) {
if (_parallax[1])
renderParallax(_parallax[1]);
- // PSX version has parallax layer for this room in an external file (TRAIN.PLX)
+ // PSX version has parallax layer for this room in an external file (TRAIN.PLX)
if(SwordEngine::isPsx() && _currentScreen == 63) {
// FIXME: this should be handled in a cleaner way...
if (!_psxCache.extPlxCache) {
- Common::File parallax;
+ Common::File parallax;
parallax.open("TRAIN.PLX");
_psxCache.extPlxCache = (uint8*) malloc(parallax.size());
parallax.read(_psxCache.extPlxCache, parallax.size());
@@ -448,9 +448,9 @@ void Screen::processImage(uint32 id) {
Object *compact;
FrameHeader *frameHead;
int scale;
-
+
compact = _objMan->fetchObject(id);
-
+
if (compact->o_type == TYPE_TEXT)
frameHead = _textMan->giveSpriteData((uint8)compact->o_target);
else
@@ -460,7 +460,7 @@ void Screen::processImage(uint32 id) {
uint16 spriteX = compact->o_anim_x;
uint16 spriteY = compact->o_anim_y;
-
+
if (compact->o_status & STAT_SHRINK) {
scale = (compact->o_scale_a * compact->o_ycoord + compact->o_scale_b) / 256;
spriteX += ((int16)_resMan->readUint16(&frameHead->offsetX) * scale) / 256;
@@ -514,7 +514,7 @@ void Screen::processImage(uint32 id) {
} else
sprSizeY = (_resMan->readUint16(&frameHead->height));
}
-
+
if (!(compact->o_status & STAT_OVERRIDE)) {
//mouse size linked to exact size & coordinates of sprite box - shrink friendly
if (_resMan->readUint16(&frameHead->offsetX) || _resMan->readUint16(&frameHead->offsetY)) {
@@ -537,7 +537,7 @@ void Screen::processImage(uint32 id) {
spriteClipAndSet(&spriteX, &spriteY, &sprSizeX, &sprSizeY, &incr);
if ((sprSizeX > 0) && (sprSizeY > 0)) {
- if( (!(SwordEngine::isPsx()) || (compact->o_type == TYPE_TEXT)
+ if( (!(SwordEngine::isPsx()) || (compact->o_type == TYPE_TEXT)
|| (compact->o_resource == LVSFLY) || (!(compact->o_resource == GEORGE_MEGA) && (sprSizeX < 260))))
drawSprite(sprData + incr, spriteX, spriteY, sprSizeX, sprSizeY, sprPitch);
else if (((sprSizeX >= 260) && (sprSizeX < 450)) || ((compact->o_resource == GMWRITH) && (sprSizeX < 515)) // a psx shrinked sprite (1/2 width)
@@ -550,13 +550,13 @@ void Screen::processImage(uint32 id) {
if (!(compact->o_status&STAT_FORE) && !(SwordEngine::isPsx() && (compact->o_resource == MOUBUSY))) // Check fixes moue sprite being masked by layer, happens only on psx
verticalMask(spriteX, spriteY, sprSizeX, sprSizeY);
}
-
+
if (compact->o_type != TYPE_TEXT)
_resMan->resClose(compact->o_resource);
-
+
if (tonyBuf)
free(tonyBuf);
-
+
if (hifBuf)
free(hifBuf);
}
@@ -569,7 +569,7 @@ void Screen::verticalMask(uint16 x, uint16 y, uint16 bWidth, uint16 bHeight) {
bHeight *= 2;
bWidth *= 2;
}
-
+
bWidth = (bWidth + (x & (SCRNGRID_X - 1)) + (SCRNGRID_X - 1)) / SCRNGRID_X;
bHeight = (bHeight + (y & (SCRNGRID_Y - 1)) + (SCRNGRID_Y - 1)) / SCRNGRID_Y;
@@ -615,14 +615,14 @@ void Screen::blitBlockClear(uint16 x, uint16 y, uint8 *data) {
for (uint8 cntx = 0; cntx < SCRNGRID_X; cntx++)
if (data[cntx])
dest[cntx] = data[cntx];
-
+
if (SwordEngine::isPsx()) {
dest += _scrnSizeX;
for (uint8 cntx = 0; cntx < SCRNGRID_X; cntx++)
if (data[cntx])
dest[cntx] = data[cntx];
- }
-
+ }
+
data += SCRNGRID_X;
dest += _scrnSizeX;
}
@@ -717,19 +717,19 @@ void Screen::renderParallax(uint8 *data) {
void Screen::drawSprite(uint8 *sprData, uint16 sprX, uint16 sprY, uint16 sprWidth, uint16 sprHeight, uint16 sprPitch) {
uint8 *dest = _screenBuf + (sprY * _scrnSizeX) + sprX;
-
+
for (uint16 cnty = 0; cnty < sprHeight; cnty++) {
for (uint16 cntx = 0; cntx < sprWidth; cntx++)
if (sprData[cntx])
dest[cntx] = sprData[cntx];
-
+
if (SwordEngine::isPsx()) { //On PSX version we need to double horizontal lines
- dest += _scrnSizeX;
+ dest += _scrnSizeX;
for (uint16 cntx = 0; cntx < sprWidth; cntx++)
if (sprData[cntx])
dest[cntx] = sprData[cntx];
}
-
+
sprData += sprPitch;
dest += _scrnSizeX;
}
@@ -738,14 +738,14 @@ void Screen::drawSprite(uint8 *sprData, uint16 sprX, uint16 sprY, uint16 sprWidt
// Used to draw psx sprites which are 1/2 of original width
void Screen::drawPsxHalfShrinkedSprite(uint8 *sprData, uint16 sprX, uint16 sprY, uint16 sprWidth, uint16 sprHeight, uint16 sprPitch) {
uint8 *dest = _screenBuf + (sprY * _scrnSizeX) + sprX;
-
+
for (uint16 cnty = 0; cnty < sprHeight; cnty++) {
for (uint16 cntx = 0; cntx < sprWidth; cntx++)
if (sprData[cntx]) {
dest[cntx * 2] = sprData[cntx]; //In these sprites we need to double vetical lines too...
dest[cntx * 2 + 1] = sprData[cntx];
}
-
+
dest += _scrnSizeX;
for (uint16 cntx = 0; cntx < sprWidth; cntx++)
if (sprData[cntx]) {
@@ -754,7 +754,7 @@ void Screen::drawPsxHalfShrinkedSprite(uint8 *sprData, uint16 sprX, uint16 sprY,
}
sprData += sprPitch;
- dest += _scrnSizeX;
+ dest += _scrnSizeX;
}
}
@@ -769,7 +769,7 @@ void Screen::drawPsxFullShrinkedSprite(uint8 *sprData, uint16 sprX, uint16 sprY,
dest[cntx * 3 + 1] = sprData[cntx];
dest[cntx * 3 + 2] = sprData[cntx];
}
-
+
dest += _scrnSizeX;
for (uint16 cntx = 0; cntx < sprWidth; cntx++)
if (sprData[cntx]) {
@@ -777,7 +777,7 @@ void Screen::drawPsxFullShrinkedSprite(uint8 *sprData, uint16 sprX, uint16 sprY,
dest[cntx * 3 + 1] = sprData[cntx];
dest[cntx * 3 + 2] = sprData[cntx];
}
-
+
sprData += sprPitch;
dest += _scrnSizeX;
}
@@ -790,7 +790,7 @@ void Screen::fastShrink(uint8 *src, uint32 width, uint32 height, uint32 scale, u
uint32 step = 0x10000 / scale;
uint8 columnTab[160];
uint32 res = step >> 1;
-
+
for (uint16 cnt = 0; cnt < resWidth; cnt++) {
columnTab[cnt] = (uint8)(res >> 8);
res += step;
@@ -865,8 +865,8 @@ uint8* Screen::psxBackgroundToIndexed(uint8 *psxBackground, uint32 bakXres, uint
psxBackground += 4; //We skip the id tag
for (uint32 currentTile = 0; currentTile < totTiles; currentTile++) {
- uint32 tileOffset = READ_LE_UINT32(psxBackground + 4 * currentTile);
-
+ uint32 tileOffset = READ_LE_UINT32(psxBackground + 4 * currentTile);
+
if(isCompressed)
decompressHIF(psxBackground + tileOffset - 4, decomp_tile); //Decompress the tile into decomp_tile
else
@@ -875,10 +875,10 @@ uint8* Screen::psxBackgroundToIndexed(uint8 *psxBackground, uint32 bakXres, uint
if (currentTile > 0 && !(currentTile % xresInTiles)) { //Finished a line of tiles, going down
tileYpos++;
tileXpos = 0;
- }
-
+ }
+
for (byte tileLine = 0; tileLine < 16; tileLine++) { // Copy data to destination buffer
- memcpy(fullres_buffer + tileLine * bakXres * 2 + tileXpos * 16 + tileYpos * bakXres * 16 * 2, decomp_tile + tileLine * 16, 16);
+ memcpy(fullres_buffer + tileLine * bakXres * 2 + tileXpos * 16 + tileYpos * bakXres * 16 * 2, decomp_tile + tileLine * 16, 16);
memcpy(fullres_buffer + tileLine * bakXres * 2 + bakXres + tileXpos * 16 + tileYpos * bakXres * 16 * 2, decomp_tile + tileLine * 16, 16);
}
tileXpos++;
@@ -909,8 +909,8 @@ uint8* Screen::psxShrinkedBackgroundToIndexed(uint8 *psxBackground, uint32 bakXr
uint32 currentTile;
for (currentTile = 0; currentTile < totTiles; currentTile++) {
- uint32 tileOffset = READ_LE_UINT32(psxBackground + 4 * currentTile);
-
+ uint32 tileOffset = READ_LE_UINT32(psxBackground + 4 * currentTile);
+
if(isCompressed)
decompressHIF(psxBackground + tileOffset - 4, decomp_tile); //Decompress the tile into decomp_tile
else
@@ -919,8 +919,8 @@ uint8* Screen::psxShrinkedBackgroundToIndexed(uint8 *psxBackground, uint32 bakXr
if (currentTile > 0 && !(currentTile % xresInTiles)) { //Finished a line of tiles, going down
tileYpos++;
tileXpos = 0;
- }
-
+ }
+
for (byte tileLine = 0; tileLine < 16; tileLine++) {
uint8 *dest = fullres_buffer + tileLine * bakXres * 2 + tileXpos * 32 + tileYpos * bakXres * 16 * 2;
for (byte tileColumn = 0; tileColumn < 16; tileColumn++) {
@@ -947,7 +947,7 @@ uint8* Screen::psxShrinkedBackgroundToIndexed(uint8 *psxBackground, uint32 bakXr
tileXpos = 0;
for (; currentTile < totTiles + remainingTiles; currentTile++) {
- uint32 tileOffset = READ_LE_UINT32(psxBackground + 4 * currentTile);
+ uint32 tileOffset = READ_LE_UINT32(psxBackground + 4 * currentTile);
if(isCompressed)
decompressHIF(psxBackground + tileOffset - 4, decomp_tile); //Decompress the tile into decomp_tile
@@ -955,7 +955,7 @@ uint8* Screen::psxShrinkedBackgroundToIndexed(uint8 *psxBackground, uint32 bakXr
memcpy(decomp_tile, psxBackground + tileOffset - 4, 256);
for (byte tileLine = 0; tileLine < tileHeight; tileLine++) { // Write the decoded tiles into last lines of background
- memcpy(fullres_buffer + tileXpos * 16 + (tileLine + (yresInTiles - 1) * 16) * bakXres * 2, decomp_tile + tileLine * 16, 16);
+ memcpy(fullres_buffer + tileXpos * 16 + (tileLine + (yresInTiles - 1) * 16) * bakXres * 2, decomp_tile + tileLine * 16, 16);
memcpy(fullres_buffer + tileXpos * 16 + (tileLine + (yresInTiles - 1) * 16) * bakXres * 2 + bakXres, decomp_tile + tileLine * 16, 16);
}
tileXpos++;
@@ -997,10 +997,10 @@ void Screen::drawPsxParallax(uint8 *psxParallax, uint16 paraScrlX, uint16 scrnSc
int32 tileBegin = (tileXpos * 16) - paraScrlX;
tileBegin = (tileBegin < 0) ? 0 : tileBegin;
uint16 currentLine = (tileYpos * 16); //Current line of the image we are drawing upon, used to avoid going out of screen
-
+
if (tileXpos >= skipRow) { // Tiles not needed in the screen buffer are not uncompressed
uint32 tileOffset = READ_LE_UINT32(plxOff + 4 * currentTile);
- uint16 rightScreenLimit = _scrnSizeX - scrnScrlX; // Do not write over and beyond this limit, lest we get memory corruption
+ uint16 rightScreenLimit = _scrnSizeX - scrnScrlX; // Do not write over and beyond this limit, lest we get memory corruption
uint8 *dest = _screenBuf + (tileYpos * 16 * _scrnSizeX) + tileBegin + scrnScrlX;
uint8 *src = tile_buffer;
@@ -1008,15 +1008,15 @@ void Screen::drawPsxParallax(uint8 *psxParallax, uint16 paraScrlX, uint16 scrnSc
if (tileXpos != skipRow) { // This tile will surely be drawn fully in the buffer
for (byte tileLine = 0; (tileLine < 16) && (currentLine < SCREEN_DEPTH); tileLine++) { // Check that we are not going outside the bottom screen part
- for (byte tileColumn = 0; (tileColumn < 16) && (tileBegin + tileColumn) < rightScreenLimit; tileColumn++)
- if (*(src + tileColumn)) *(dest + tileColumn) = *(src + tileColumn);
- dest += _scrnSizeX;
+ for (byte tileColumn = 0; (tileColumn < 16) && (tileBegin + tileColumn) < rightScreenLimit; tileColumn++)
+ if (*(src + tileColumn)) *(dest + tileColumn) = *(src + tileColumn);
+ dest += _scrnSizeX;
currentLine++;
if (currentLine < SCREEN_DEPTH) {
- for (byte tileColumn = 0; (tileColumn < 16) && (tileBegin + tileColumn) < rightScreenLimit; tileColumn++)
- if (*(src + tileColumn)) *(dest + tileColumn) = *(src + tileColumn);
- dest += _scrnSizeX;
+ for (byte tileColumn = 0; (tileColumn < 16) && (tileBegin + tileColumn) < rightScreenLimit; tileColumn++)
+ if (*(src + tileColumn)) *(dest + tileColumn) = *(src + tileColumn);
+ dest += _scrnSizeX;
currentLine++;
}
src += 16; // get to next line of decoded tile
@@ -1024,15 +1024,15 @@ void Screen::drawPsxParallax(uint8 *psxParallax, uint16 paraScrlX, uint16 scrnSc
} else { // This tile may be drawn only partially
src += leftPixelSkip; //Skip hidden pixels
for (byte tileLine = 0; (tileLine < 16) && (currentLine < SCREEN_DEPTH); tileLine++) {
- for (byte tileColumn = 0; tileColumn < (16 - leftPixelSkip); tileColumn++)
- if (*(src + tileColumn)) *(dest + tileColumn) = *(src + tileColumn);
- dest += _scrnSizeX;
+ for (byte tileColumn = 0; tileColumn < (16 - leftPixelSkip); tileColumn++)
+ if (*(src + tileColumn)) *(dest + tileColumn) = *(src + tileColumn);
+ dest += _scrnSizeX;
currentLine++;
if (currentLine < SCREEN_DEPTH) {
- for (byte tileColumn = 0; tileColumn < (16 - leftPixelSkip); tileColumn++)
- if (*(src + tileColumn)) *(dest + tileColumn) = *(src + tileColumn);
- dest += _scrnSizeX;
+ for (byte tileColumn = 0; tileColumn < (16 - leftPixelSkip); tileColumn++)
+ if (*(src + tileColumn)) *(dest + tileColumn) = *(src + tileColumn);
+ dest += _scrnSizeX;
currentLine++;
}
src += 16;
@@ -1100,9 +1100,9 @@ void Screen::decompressHIF(uint8 *src, uint8 *dest) {
src += 2;
if (info_word == 0xFFFF) return; //Got 0xFFFF code, finished.
- int32 repeat_count = (info_word >> 12) + 2; //How many time data needs to be refetched
+ int32 repeat_count = (info_word >> 12) + 2; //How many time data needs to be refetched
while(repeat_count >= 0) {
- uint8 *old_data_src = dest - ((info_word & 0xFFF) + 1);
+ uint8 *old_data_src = dest - ((info_word & 0xFFF) + 1);
*dest++ = *old_data_src;
repeat_count--;
}
@@ -1178,7 +1178,7 @@ void Screen::spriteClipAndSet(uint16 *pSprX, uint16 *pSprY, uint16 *pSprWidth, u
*pSprWidth = 0;
else
*pSprWidth = (uint16)sprW;
-
+
*pSprX = (uint16)sprX;
*pSprY = (uint16)sprY;
@@ -1186,18 +1186,18 @@ void Screen::spriteClipAndSet(uint16 *pSprX, uint16 *pSprY, uint16 *pSprWidth, u
// sprite will be drawn, so mark it in the grid buffer
uint16 gridH = (*pSprHeight + (sprY & (SCRNGRID_Y - 1)) + (SCRNGRID_Y - 1)) / SCRNGRID_Y;
uint16 gridW = (*pSprWidth + (sprX & (SCRNGRID_X - 1)) + (SCRNGRID_X - 1)) / SCRNGRID_X;
-
- if(SwordEngine::isPsx()) {
+
+ if(SwordEngine::isPsx()) {
gridH *= 2; // This will correct the PSX sprite being cut at half height
gridW *= 2; // and masking problems when sprites are stretched in width
-
+
uint16 bottomSprPos = (*pSprY + (*pSprHeight) * 2); //Position of bottom line of sprite
if ( bottomSprPos > _scrnSizeY ) { //Check that resized psx sprite isn't drawn outside of screen boundaries
uint16 outScreen = bottomSprPos - _scrnSizeY;
*pSprHeight -= (outScreen % 2) ? (outScreen + 1) / 2 : outScreen / 2;
}
- }
+ }
uint16 gridX = sprX / SCRNGRID_X;
uint16 gridY = sprY / SCRNGRID_Y;
@@ -1226,7 +1226,7 @@ void Screen::showFrame(uint16 x, uint16 y, uint32 resId, uint32 frameNo, const b
int i, j;
if(SwordEngine::isPsx())
- memset(frame, 0, sizeof(frame)); // PSX top menu is black
+ memset(frame, 0, sizeof(frame)); // PSX top menu is black
else
memset(frame, 199, sizeof(frame)); // Dark gray background
@@ -1245,11 +1245,11 @@ void Screen::showFrame(uint16 x, uint16 y, uint32 resId, uint32 frameNo, const b
frame[(i * 2 + 1 + 4) * 40 + j + 2] = data; //Linedoubling the sprite
}
}
-
+
free(frameBufferPSX);
} else {
- for (i = 0; i < _resMan->getUint16(frameHead->height); i++)
- for (j = 0; j < _resMan->getUint16(frameHead->height); j++)
+ for (i = 0; i < _resMan->getUint16(frameHead->height); i++)
+ for (j = 0; j < _resMan->getUint16(frameHead->height); j++)
frame[(i + 4) * 40 + j + 2] = frameData[i * _resMan->getUint16(frameHead->width) + j];
}
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index d03afa809a..1f2ad04f08 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -161,12 +161,12 @@ void Sound::playSample(QueueElement *elem) {
if (_fxList[elem->id].roomVolList[cnt].roomNo) {
if ((_fxList[elem->id].roomVolList[cnt].roomNo == (int)Logic::_scriptVars[SCREEN]) ||
(_fxList[elem->id].roomVolList[cnt].roomNo == -1)) {
-
+
uint8 volL = (_fxList[elem->id].roomVolList[cnt].leftVol * 10 * _sfxVolL) / 255;
uint8 volR = (_fxList[elem->id].roomVolList[cnt].rightVol * 10 * _sfxVolR) / 255;
int8 pan = (volR - volL) / 2;
uint8 volume = (volR + volL) / 2;
-
+
if (SwordEngine::isPsx()) { ;
uint32 size = READ_LE_UINT32(sampleData);
Audio::AudioStream *audStream = new Audio::VagStream(new Common::MemoryReadStream(sampleData + 4, size-4), _fxList[elem->id].type == FX_LOOP);
@@ -195,7 +195,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
warning("Sound::startSpeech: COW file isn't open");
return false;
}
-
+
uint32 locIndex = 0xFFFFFFFF;
uint32 sampleSize = 0;
uint32 index = 0;
@@ -203,49 +203,49 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
if (_cowMode == CowPSX) {
Common::File file;
uint16 i;
-
+
if (!file.open("speech.lis")) {
warning ("Could not open speech.lis");
return false;
}
- for (i = 0; !file.eos() && !file.err(); i++)
+ for (i = 0; !file.eos() && !file.err(); i++)
if (file.readUint16LE() == roomNo) {
locIndex = i;
break;
}
file.close();
-
+
if (locIndex == 0xFFFFFFFF) {
warning ("Could not find room %d in speech.lis", roomNo);
return false;
}
-
+
if (!file.open("speech.inf")) {
warning ("Could not open speech.inf");
return false;
}
-
+
file.seek(locIndex * 4 + 2); // 4 bytes per room, skip first 2 bytes
-
+
uint16 numLines = file.readUint16LE();
- uint16 roomOffset = file.readUint16LE();
+ uint16 roomOffset = file.readUint16LE();
file.seek(0x112 + roomOffset * 2); // The offset is in terms of uint16's, so multiply by 2. Skip the 0x112 byte header too.
-
+
locIndex = 0xFFFFFFFF;
-
+
for (i = 0; i < numLines; i++)
if (file.readUint16LE() == localNo) {
locIndex = i;
break;
}
-
+
if (locIndex == 0xFFFFFFFF) {
warning ("Could not find local number %d in room %d in speech.inf", roomNo, localNo);
return false;
}
-
+
file.close();
index = _cowHeader[(roomOffset + locIndex) * 2];
@@ -255,9 +255,9 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
sampleSize = _cowHeader[locIndex + (localNo * 2)];
index = _cowHeader[locIndex + (localNo * 2) - 1];
}
-
+
debug(6, "startSpeech(%d, %d): locIndex %d, sampleSize %d, index %d", roomNo, localNo, locIndex, sampleSize, index);
-
+
if (sampleSize) {
uint8 speechVol = (_speechVolR + _speechVolL) / 2;
int8 speechPan = (_speechVolR - _speechVolL) / 2;
@@ -493,7 +493,7 @@ void Sound::initCowSystem(void) {
debug(1, "Using uncompressed Speech Cluster");
_cowMode = CowWave;
}
-
+
if (SwordEngine::isPsx()) {
// There's only one file on the PSX, so set it to the current disc.
_currentCowFile = SwordEngine::_systemVars.currentCD;
@@ -503,16 +503,16 @@ void Sound::initCowSystem(void) {
_cowMode = CowPSX;
}
}
-
+
if (!_cowFile.isOpen())
_cowFile.open("speech.clu");
-
+
if (!_cowFile.isOpen()) {
_cowFile.open("cows.mad");
if (_cowFile.isOpen())
_cowMode = CowDemo;
}
-
+
if (_cowFile.isOpen()) {
if (SwordEngine::isPsx()) {
// Get data from the external table file
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 1fb6a265aa..18a3f2a7c4 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -380,7 +380,7 @@ void SwordEngine::showFileErrorMsg(uint8 type, bool *fileExists) {
warning("\"%s\"", _macCdFileList[i].name);
pos += sprintf(pos, "\"%s\"\n", _macCdFileList[i].name);
}
- }
+ }
} else {
for (int i = 0; i < ARRAYSIZE(_pcCdFileList); i++)
if (!fileExists[i]) {
diff --git a/engines/sword1/sword1.h b/engines/sword1/sword1.h
index 1aaa5da5e0..6c336a35ae 100644
--- a/engines/sword1/sword1.h
+++ b/engines/sword1/sword1.h
@@ -66,7 +66,7 @@ struct SystemVars {
uint8 showText;
uint8 language;
bool isDemo;
- uint32 engineStartTime; // Used for playtime
+ uint32 engineStartTime; // Used for playtime
Common::Platform platform;
};
@@ -80,7 +80,7 @@ public:
uint32 _features;
bool mouseIsActive();
-
+
static bool isMac() { return _systemVars.platform == Common::kPlatformMacintosh; }
static bool isPsx() { return _systemVars.platform == Common::kPlatformPSX; }
diff --git a/engines/sword1/text.cpp b/engines/sword1/text.cpp
index fd9b9dea28..1ca6fdd27d 100644
--- a/engines/sword1/text.cpp
+++ b/engines/sword1/text.cpp
@@ -80,7 +80,7 @@ uint32 Text::lowTextManager(uint8 *ascii, int32 width, uint8 pen) {
void Text::makeTextSprite(uint8 slot, uint8 *text, uint16 maxWidth, uint8 pen) {
LineInfo lines[MAX_LINES];
uint16 numLines = analyzeSentence(text, maxWidth, lines);
-
+
uint16 sprWidth = 0;
uint16 lineCnt;
for (lineCnt = 0; lineCnt < numLines; lineCnt++)
@@ -103,7 +103,7 @@ void Text::makeTextSprite(uint8 slot, uint8 *text, uint16 maxWidth, uint8 pen) {
memset(linePtr, NO_COL, sprSize);
for (lineCnt = 0; lineCnt < numLines; lineCnt++) {
uint8 *sprPtr = linePtr + (sprWidth - lines[lineCnt].width) / 2; // center the text
- for (uint16 pos = 0; pos < lines[lineCnt].length; pos++)
+ for (uint16 pos = 0; pos < lines[lineCnt].length; pos++)
sprPtr += copyChar(*text++, sprPtr, sprWidth, pen) - OVERLAP;
text++; // skip space at the end of the line
if(SwordEngine::isPsx()) //Chars are half height in psx version
@@ -166,7 +166,7 @@ uint16 Text::copyChar(uint8 ch, uint8 *sprPtr, uint16 sprWidth, uint8 pen) {
uint8 *decBuf = NULL;
uint8 *decChr;
uint16 frameHeight = 0;
-
+
if(SwordEngine::isPsx()) {
frameHeight = _resMan->getUint16(chFrame->height)/2;
if(_fontId == CZECH_GAME_FONT) { //Czech game fonts are compressed
@@ -179,7 +179,7 @@ uint16 Text::copyChar(uint8 ch, uint8 *sprPtr, uint16 sprWidth, uint8 pen) {
frameHeight = _resMan->getUint16(chFrame->height);
decChr = chData;
}
-
+
for (uint16 cnty = 0; cnty < frameHeight; cnty++) {
for (uint16 cntx = 0; cntx < _resMan->getUint16(chFrame->width); cntx++) {
if (*decChr == LETTER_COL)
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index e0b8bcbe52..21ab645bfe 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -197,7 +197,7 @@ void MoviePlayer::drawTextObject(uint32 index, byte *screen) {
uint16 height = text->_textSprite.h;
// Resize text sprites for PSX version
- if (Sword2Engine::isPsx()) {
+ if (Sword2Engine::isPsx()) {
height *= 2;
byte *buffer = (byte *)malloc(width * height);
Screen::resizePsxSprite(buffer, src, width, height);
diff --git a/engines/sword2/anims.cpp b/engines/sword2/anims.cpp
index dae300d0bd..1bf3967047 100644
--- a/engines/sword2/anims.cpp
+++ b/engines/sword2/anims.cpp
@@ -103,7 +103,7 @@ int Router::doAnimate(byte *ob_logic, byte *ob_graph, int32 animRes, bool revers
// point to anim header
anim_head.read(_vm->fetchAnimHeader(anim_file));
-
+
// now running an anim, looping back to this call again
obLogic.setLooping(1);
obGraph.setAnimResource(animRes);
diff --git a/engines/sword2/controls.cpp b/engines/sword2/controls.cpp
index 2de831aebf..7428cbb534 100644
--- a/engines/sword2/controls.cpp
+++ b/engines/sword2/controls.cpp
@@ -269,9 +269,9 @@ Dialog::Dialog(Sword2Engine *vm)
// Usually the mouse pointer will already be "normal", but not always.
_vm->_mouse->setMouse(NORMAL_MOUSE_ID);
- // Force mouse mode as system menu: normally not needed,
- // but value is not correct in case of game start dialog
- // (when asking to restart or load a game).
+ // Force mouse mode as system menu: normally not needed,
+ // but value is not correct in case of game start dialog
+ // (when asking to restart or load a game).
// This is forced to avoid GMM loading/saving being enabled
// during initial dialog.
_vm->_mouse->setMouseMode(MOUSE_system_menu);
diff --git a/engines/sword2/function.cpp b/engines/sword2/function.cpp
index 259fdb2f5d..7a0da04925 100644
--- a/engines/sword2/function.cpp
+++ b/engines/sword2/function.cpp
@@ -71,7 +71,7 @@ int32 Logic::fnInitBackground(int32 *params) {
// params: 0 res id of normal background layer - cannot be 0
// 1 1 yes 0 no for a new palette
-
+
if (Sword2Engine::isPsx())
_vm->_screen->initPsxBackground(params[0], params[1]);
else
@@ -395,13 +395,13 @@ int32 Logic::fnSetFrame(int32 *params) {
assert(_vm->_resman->fetchType(res) == ANIMATION_FILE);
// set up pointer to the animation header
- AnimHeader anim_head;
-
+ AnimHeader anim_head;
+
anim_head.read(_vm->fetchAnimHeader(anim_file));
-
+
// set up anim resource in graphic object
ObjectGraphic obGraph(decodePtr(params[0]));
-
+
obGraph.setAnimResource(res);
obGraph.setAnimPc(params[2] ? anim_head.noAnimFrames - 1 : 0);
diff --git a/engines/sword2/header.h b/engines/sword2/header.h
index 875ccbfc4d..67cbba35af 100644
--- a/engines/sword2/header.h
+++ b/engines/sword2/header.h
@@ -168,7 +168,7 @@ struct AnimHeader {
blend = readS.readUint16LE();
runTimeComp = readS.readByte();
feetStartDir = readS.readByte();
- feetEndDir = readS.readByte();
+ feetEndDir = readS.readByte();
} else {
runTimeComp = readS.readByte();
noAnimFrames = readS.readUint16LE();
@@ -631,7 +631,7 @@ struct PSXFontEntry {
writeS.writeUint16LE(skipLines);
writeS.writeUint16LE(charWidth);
writeS.writeUint16LE(charHeight);
- }
+ }
};
} // End of namespace Sword2
diff --git a/engines/sword2/layers.cpp b/engines/sword2/layers.cpp
index c54003920f..d97b1395d5 100644
--- a/engines/sword2/layers.cpp
+++ b/engines/sword2/layers.cpp
@@ -179,7 +179,7 @@ void Screen::initBackground(int32 res, int32 new_palette) {
}
// Background parallax layers
-
+
for (i = 0; i < 2; i++) {
if (screenLayerTable.bg_parallax[i])
initialiseBackgroundLayer(_vm->fetchBackgroundParallaxLayer(file, i));
@@ -188,11 +188,11 @@ void Screen::initBackground(int32 res, int32 new_palette) {
}
// Normal backround layer
-
+
initialiseBackgroundLayer(_vm->fetchBackgroundLayer(file));
// Foreground parallax layers
-
+
for (i = 0; i < 2; i++) {
if (screenLayerTable.fg_parallax[i])
initialiseBackgroundLayer(_vm->fetchForegroundParallaxLayer(file, i));
diff --git a/engines/sword2/maketext.cpp b/engines/sword2/maketext.cpp
index ccfeda24a2..0c29e5719c 100644
--- a/engines/sword2/maketext.cpp
+++ b/engines/sword2/maketext.cpp
@@ -224,7 +224,7 @@ byte *FontRenderer::buildTextSprite(byte *sentence, uint32 fontRes, uint8 pen, L
// Check that text sprite has even horizontal resolution in PSX version
// (needed to work around a problem in some sprites, which reports an odd
// number as horiz resolution, but then have the next even number as true width)
- if (Sword2Engine::isPsx())
+ if (Sword2Engine::isPsx())
spriteWidth = (spriteWidth % 2) ? spriteWidth + 1 : spriteWidth;
// Find the total height of the text sprite: the total height of the
@@ -297,7 +297,7 @@ byte *FontRenderer::buildTextSprite(byte *sentence, uint32 fontRes, uint8 pen, L
// Skip space at end of last word in this line
pos++;
-
+
if (Sword2Engine::isPsx())
linePtr += (char_height / 2 + _lineSpacing) * spriteWidth;
else
@@ -369,11 +369,11 @@ uint16 FontRenderer::charHeight(uint32 fontRes) {
*/
byte *FontRenderer::findChar(byte ch, byte *charSet) {
-
+
// PSX version doesn't use an animation table to keep all letters,
// instead a big sprite (char atlas) is used, and the single char
// must be extracted from that.
-
+
if (Sword2Engine::isPsx()) {
byte *buffer;
PSXFontEntry header;
@@ -390,7 +390,7 @@ byte *FontRenderer::findChar(byte ch, byte *charSet) {
// We have no such character, generate an empty one
// on the fly, size 6x12.
if (header.charWidth == 0) {
-
+
// Prepare a "bogus" FrameHeader to be returned with
// "empty" character data.
bogusHeader.compSize = 0;
@@ -400,7 +400,7 @@ byte *FontRenderer::findChar(byte ch, byte *charSet) {
buffer = (byte *)malloc(24 * 3 + FrameHeader::size());
memset(buffer, 0, 24 * 3 + FrameHeader::size());
bogusHeader.write(buffer);
-
+
return buffer;
}
@@ -471,8 +471,8 @@ void FontRenderer::copyChar(byte *charPtr, byte *spritePtr, uint16 spriteWidth,
// Do nothing if source pixel is zero,
// ie. transparent
break;
- case LETTER_COL_PSX1: // Values for colored zone
- case LETTER_COL_PSX2:
+ case LETTER_COL_PSX1: // Values for colored zone
+ case LETTER_COL_PSX2:
case LETTER_COL:
*dest = pen;
break;
@@ -516,7 +516,7 @@ uint32 FontRenderer::buildNewBloc(byte *ascii, int16 x, int16 y, uint16 width, u
assert(i < MAX_text_blocs);
// Create and position the sprite
-
+
_blocList[i].text_mem = makeTextSprite(ascii, width, pen, fontRes);
// 'NO_JUSTIFICATION' means print sprite with top-left at (x,y)
diff --git a/engines/sword2/menu.cpp b/engines/sword2/menu.cpp
index c90a1a9df3..921a3c77b5 100644
--- a/engines/sword2/menu.cpp
+++ b/engines/sword2/menu.cpp
@@ -43,7 +43,7 @@ void Mouse::clearIconArea(int menu, int pocket, Common::Rect *r) {
byte *buf = _vm->_screen->getScreen();
int16 screenWide = _vm->_screen->getScreenWide();
byte menuIconWidth;
-
+
// Initialize menu icon width at correct size
// depending if we are using pc or psx version.
if (Sword2Engine::isPsx())
@@ -80,8 +80,8 @@ void Mouse::processMenu() {
byte *buf = _vm->_screen->getScreen();
int16 screenWide = _vm->_screen->getScreenWide();
- byte menuIconWidth;
-
+ byte menuIconWidth;
+
if (Sword2Engine::isPsx())
menuIconWidth = RDMENU_PSXICONWIDE;
else
@@ -219,7 +219,7 @@ int32 Mouse::showMenu(uint8 menu) {
// Do not show menu in PSX version, as there was really
// nothing similar in the original game (menu was started
// using SELECT button in psx pad)
- if (Sword2Engine::isPsx() && menu == RDMENU_TOP)
+ if (Sword2Engine::isPsx() && menu == RDMENU_TOP)
return RD_OK;
// Check for invalid menu parameter
@@ -296,7 +296,7 @@ void Mouse::closeMenuImmediately() {
int32 Mouse::setMenuIcon(uint8 menu, uint8 pocket, byte *icon) {
Common::Rect r;
byte menuIconWidth;
-
+
if (Sword2Engine::isPsx())
menuIconWidth = RDMENU_PSXICONWIDE;
else
diff --git a/engines/sword2/mouse.cpp b/engines/sword2/mouse.cpp
index d940ec8a2d..65175a759e 100644
--- a/engines/sword2/mouse.cpp
+++ b/engines/sword2/mouse.cpp
@@ -339,8 +339,8 @@ void Mouse::systemMenuMouse() {
// Do nothing if using PSX version and are on TOP menu.
- if ((icon_list[hit] == OPTIONS_ICON || icon_list[hit] == QUIT_ICON
- || icon_list[hit] == SAVE_ICON || icon_list[hit] == RESTORE_ICON
+ if ((icon_list[hit] == OPTIONS_ICON || icon_list[hit] == QUIT_ICON
+ || icon_list[hit] == SAVE_ICON || icon_list[hit] == RESTORE_ICON
|| icon_list[hit] == RESTART_ICON ) && Sword2Engine::isPsx() )
return;
@@ -1522,9 +1522,9 @@ void Mouse::decompressMouse(byte *decomp, byte *comp, uint8 frame, int width, in
}
free(buffer);
-
+
} else {
- comp = comp + READ_LE_UINT32(comp + frame * 4) - MOUSE_ANIM_HEADER_SIZE;
+ comp = comp + READ_LE_UINT32(comp + frame * 4) - MOUSE_ANIM_HEADER_SIZE;
while (i < size) {
if (*comp > 183) {
@@ -1604,12 +1604,12 @@ void Mouse::drawMouse() {
_mouseAnim.mousew, _mouseAnim.mouseh, mouse_width);
// Fix height for mouse sprite in PSX version
- if (Sword2Engine::isPsx()) {
+ if (Sword2Engine::isPsx()) {
mouse_height *= 2;
-
+
byte *buffer = (byte *)malloc(mouse_width * mouse_height);
Screen::resizePsxSprite(buffer, mouseData, mouse_width, mouse_height);
-
+
free(mouseData);
mouseData = buffer;
}
diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp
index 4e20eebcf1..fee75f7638 100644
--- a/engines/sword2/music.cpp
+++ b/engines/sword2/music.cpp
@@ -295,7 +295,7 @@ Audio::AudioStream *makeCLUStream(Common::File *file, int size) {
}
Audio::AudioStream *makePSXCLUStream(Common::File *file, int size) {
-
+
// Buffer audio file data, and ask MemoryReadStream to dispose of it
// when not needed anymore.
diff --git a/engines/sword2/palette.cpp b/engines/sword2/palette.cpp
index 6015f4bcf6..1ac863c3fb 100644
--- a/engines/sword2/palette.cpp
+++ b/engines/sword2/palette.cpp
@@ -50,9 +50,9 @@ void Screen::startNewPalette() {
// Don't fetch palette match table while using PSX version,
// because it is not present.
- if(!Sword2Engine::isPsx())
+ if(!Sword2Engine::isPsx())
memcpy(_paletteMatch, _vm->fetchPaletteMatchTable(screenFile), PALTABLESIZE);
-
+
setPalette(0, 256, _vm->fetchPalette(screenFile), RDPAL_FADE);
// Indicating that it's a screen palette
@@ -120,12 +120,12 @@ void Screen::setFullPalette(int32 palRes) {
} else {
if (_thisScreen.background_layer_id) {
byte *data = _vm->_resman->openResource(_thisScreen.background_layer_id);
-
+
// Do not fetch palette match table when using PSX version,
// because it is not present.
- if (!Sword2Engine::isPsx())
+ if (!Sword2Engine::isPsx())
memcpy(_paletteMatch, _vm->fetchPaletteMatchTable(data), PALTABLESIZE);
-
+
setPalette(0, 256, _vm->fetchPalette(data), RDPAL_INSTANT);
_vm->_resman->closeResource(_thisScreen.background_layer_id);
} else
diff --git a/engines/sword2/protocol.cpp b/engines/sword2/protocol.cpp
index e5fbf53ee9..dcb5b5f5b0 100644
--- a/engines/sword2/protocol.cpp
+++ b/engines/sword2/protocol.cpp
@@ -72,7 +72,7 @@ byte *Sword2Engine::fetchPalette(byte *screenFile) {
*/
byte *Sword2Engine::fetchPaletteMatchTable(byte *screenFile) {
-
+
if (isPsx()) return NULL;
MultiScreenHeader mscreenHeader;
@@ -90,7 +90,7 @@ byte *Sword2Engine::fetchPaletteMatchTable(byte *screenFile) {
byte *Sword2Engine::fetchScreenHeader(byte *screenFile) {
if (isPsx()) { // In PSX version there's no MultiScreenHeader, so just skip resource header
return screenFile + ResHeader::size();
- } else {
+ } else {
MultiScreenHeader mscreenHeader;
mscreenHeader.read(screenFile + ResHeader::size());
@@ -116,7 +116,7 @@ byte *Sword2Engine::fetchLayerHeader(byte *screenFile, uint16 layerNo) {
return screenFile + ResHeader::size() + ScreenHeader::size() + 2 + 0x400 + layerNo * LayerHeader::size();
} else {
MultiScreenHeader mscreenHeader;
-
+
mscreenHeader.read(screenFile + ResHeader::size());
return screenFile + ResHeader::size() + mscreenHeader.layers + layerNo * LayerHeader::size();
}
@@ -174,7 +174,7 @@ byte *Sword2Engine::fetchCdtEntry(byte *animFile, uint16 frameNo) {
byte *Sword2Engine::fetchFrameHeader(byte *animFile, uint16 frameNo) {
// required address = (address of the start of the anim header) + frameOffset
-
+
CdtEntry cdt;
cdt.read(fetchCdtEntry(animFile, frameNo));
@@ -231,7 +231,7 @@ byte *Sword2Engine::fetchBackgroundLayer(byte *screenFile) {
psxBackground = fetchPsxBackground(locNo);
_screen->setPsxScrCache(psxBackground, 1);
return psxBackground;
- }
+ }
} else {
MultiScreenHeader mscreenHeader;
@@ -259,7 +259,7 @@ byte *Sword2Engine::fetchForegroundParallaxLayer(byte *screenFile, int layer) {
psxParallax = fetchPsxParallax(locNo, 1);
_screen->setPsxScrCache(psxParallax, 2);
return psxParallax;
- }
+ }
} else {
MultiScreenHeader mscreenHeader;
@@ -310,7 +310,7 @@ byte *Sword2Engine::fetchPsxBackground(uint32 location) {
}
file.seek(location * 4, SEEK_SET);
- screenOffset = file.readUint32LE();
+ screenOffset = file.readUint32LE();
if (screenOffset == 0) { // We don't have screen data for this location number.
file.close();
@@ -319,10 +319,10 @@ byte *Sword2Engine::fetchPsxBackground(uint32 location) {
// Get to the beginning of PSXScreensEntry
file.seek(screenOffset + ResHeader::size(), SEEK_SET);
-
+
buffer = (byte *)malloc(PSXScreensEntry::size());
file.read(buffer, PSXScreensEntry::size());
-
+
// Prepare the header
header.read(buffer);
free(buffer);
@@ -336,7 +336,7 @@ byte *Sword2Engine::fetchPsxBackground(uint32 location) {
buffer = (byte *)malloc(totSize);
// Write some informations before background data
- WRITE_LE_UINT16(buffer, header.bgXres);
+ WRITE_LE_UINT16(buffer, header.bgXres);
WRITE_LE_UINT16(buffer + 2, header.bgYres);
WRITE_LE_UINT32(buffer + 4, header.bgOffset);
@@ -378,17 +378,17 @@ byte *Sword2Engine::fetchPsxParallax(uint32 location, uint8 level) {
}
file.seek(location * 4, SEEK_SET);
- screenOffset = file.readUint32LE();
+ screenOffset = file.readUint32LE();
if (screenOffset == 0) // There is no screen here
return NULL;
// Get to the beginning of PSXScreensEntry
file.seek(screenOffset + ResHeader::size(), SEEK_SET);
-
+
buffer = (byte *)malloc(PSXScreensEntry::size());
file.read(buffer, PSXScreensEntry::size());
-
+
// Initialize the header
header.read(buffer);
free(buffer);
@@ -422,14 +422,14 @@ byte *Sword2Engine::fetchPsxParallax(uint32 location, uint8 level) {
// Insert parallax resolution information in the buffer,
// preceding parallax data.
- WRITE_LE_UINT16(buffer, plxXres);
+ WRITE_LE_UINT16(buffer, plxXres);
WRITE_LE_UINT16(buffer + 2, plxYres);
- WRITE_LE_UINT16(buffer + 4, horTiles);
+ WRITE_LE_UINT16(buffer + 4, horTiles);
WRITE_LE_UINT16(buffer + 6, verTiles);
// Read parallax data from file and store it inside the buffer,
// skipping the generated header.
- file.read(buffer + 8, totSize - 8);
+ file.read(buffer + 8, totSize - 8);
file.close();
return buffer;
diff --git a/engines/sword2/render.cpp b/engines/sword2/render.cpp
index f9032187b9..7d41ccd207 100644
--- a/engines/sword2/render.cpp
+++ b/engines/sword2/render.cpp
@@ -260,13 +260,13 @@ void Screen::renderParallax(byte *ptr, int16 l) {
return;
// Fetch resolution data from parallax
-
+
if (Sword2Engine::isPsx()) {
xRes = READ_LE_UINT16(ptr);
yRes = READ_LE_UINT16(ptr + 2) * 2;
} else {
Parallax p;
-
+
p.read(ptr);
xRes = p.w;
yRes = p.h;
@@ -588,7 +588,7 @@ int32 Screen::initialisePsxBackgroundLayer(byte *parallax) {
_xBlocks[_layer] = (bgXres + BLOCKWIDTH - 1) / BLOCKWIDTH;
_yBlocks[_layer] = (bgYres + BLOCKHEIGHT - 1) / BLOCKHEIGHT;
-
+
uint16 remLines = bgYres % 64;
byte *tileChunk = (byte *)malloc(BLOCKHEIGHT * BLOCKWIDTH);
@@ -615,7 +615,7 @@ int32 Screen::initialisePsxBackgroundLayer(byte *parallax) {
memset(tileChunk, 1, BLOCKHEIGHT * BLOCKWIDTH);
- if (!(remLines && posY == _yBlocks[_layer] - 1))
+ if (!(remLines && posY == _yBlocks[_layer] - 1))
remLines = 32;
for(j = 0; j < remLines; j++) {
@@ -628,7 +628,7 @@ int32 Screen::initialisePsxBackgroundLayer(byte *parallax) {
block_has_data = true;
else
block_is_transparent = true;
- }
+ }
int tileIndex = totStripes * posY + posX;
@@ -657,7 +657,7 @@ int32 Screen::initialisePsxBackgroundLayer(byte *parallax) {
free(tileChunk);
_layer++;
- return RD_OK;
+ return RD_OK;
}
/**
@@ -728,7 +728,7 @@ int32 Screen::initialisePsxParallaxLayer(byte *parallax) {
block_has_data = true;
// If one of the two grouped blocks is without data, then we also have transparency
- if(!firstTilePresent || !secondTilePresent)
+ if(!firstTilePresent || !secondTilePresent)
block_is_transparent = true;
}
@@ -747,7 +747,7 @@ int32 Screen::initialisePsxParallaxLayer(byte *parallax) {
// If we didn't find transparency in first block and we have
// a second tile, check it
- if (secondTilePresent && !block_is_transparent) {
+ if (secondTilePresent && !block_is_transparent) {
for (k = 0; k < 0x400; k++) {
if ( *(block + k) == 0) {
block_is_transparent = true;
diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp
index 3b6592c9f4..e29a73f225 100644
--- a/engines/sword2/resman.cpp
+++ b/engines/sword2/resman.cpp
@@ -217,7 +217,7 @@ bool ResourceManager::init() {
file.close();
- // We check the presence of resource files in cd.inf
+ // We check the presence of resource files in cd.inf
// This is ok in PC version, but in PSX version we don't
// have cd.inf so we'll have to skip this.
if (!Sword2Engine::isPsx()) {
@@ -264,7 +264,7 @@ byte *ResourceManager::openResource(uint32 res, bool dump) {
// FIXME: In PSX edition, not all top menu icons are present (TOP menu is not used).
// Though, at present state, the engine still ask for the resources.
- if (Sword2Engine::isPsx()) { // We need to "rewire" missing icons
+ if (Sword2Engine::isPsx()) { // We need to "rewire" missing icons
if (res == 342) res = 364; // Rewire RESTORE ICON to SAVE ICON
}
@@ -273,7 +273,7 @@ byte *ResourceManager::openResource(uint32 res, bool dump) {
if (!_resList[res].ptr) {
// Fetch the correct file and read in the correct portion.
uint16 cluFileNum = _resConvTable[res * 2]; // points to the number of the ascii filename
-
+
assert(cluFileNum != 0xffff);
// Relative resource within the file
@@ -286,7 +286,7 @@ byte *ResourceManager::openResource(uint32 res, bool dump) {
// of the CDs, remember which one so that we can play the
// correct speech and music.
- if (Sword2Engine::isPsx()) // We have only one disk in PSX version
+ if (Sword2Engine::isPsx()) // We have only one disk in PSX version
setCD(CD1);
else
setCD(_resFiles[cluFileNum].cd);
@@ -513,7 +513,7 @@ uint8 ResourceManager::fetchType(byte *ptr) {
if (!Sword2Engine::isPsx()) {
return ptr[0];
} else { // in PSX version, some files got a "garbled" resource header, with type stored in ninth byte
- if (ptr[0]) {
+ if (ptr[0]) {
return ptr[0];
} else if (ptr[8]) {
return ptr[8];
diff --git a/engines/sword2/resman.h b/engines/sword2/resman.h
index fb253a010f..72bdf73b98 100644
--- a/engines/sword2/resman.h
+++ b/engines/sword2/resman.h
@@ -64,7 +64,7 @@ private:
void removeFromCacheList(Resource *res);
void addToCacheList(Resource *res);
void checkMemUsage();
-
+
Sword2Engine *_vm;
int _curCD;
diff --git a/engines/sword2/screen.cpp b/engines/sword2/screen.cpp
index 6782a0691c..79818945dd 100644
--- a/engines/sword2/screen.cpp
+++ b/engines/sword2/screen.cpp
@@ -76,7 +76,7 @@ Screen::Screen(Sword2Engine *vm, int16 width, int16 height) {
_needFullRedraw = false;
memset(&_thisScreen, 0, sizeof(_thisScreen));
-
+
_fps = 0;
_frameCount = 0;
_cycleTime = 0;
@@ -101,7 +101,7 @@ Screen::Screen(Sword2Engine *vm, int16 width, int16 height) {
_pauseTicks = 0;
_pauseStartTick = 0;
- // Clean the cache for PSX version SCREENS.CLU
+ // Clean the cache for PSX version SCREENS.CLU
_psxScrCache[0] = NULL;
_psxScrCache[1] = NULL;
_psxScrCache[2] = NULL;
@@ -521,7 +521,7 @@ void Screen::processLayer(byte *file, uint32 layer_number) {
// Layers are uncompressed in PSX version, RLE256 compressed
// in PC version.
- if (Sword2Engine::isPsx()) {
+ if (Sword2Engine::isPsx()) {
spriteInfo.type = RDSPR_TRANS | RDSPR_NOCOMPRESSION;
spriteInfo.data = file + layer_head.offset;
} else {
@@ -554,9 +554,9 @@ void Screen::processImage(BuildUnit *build_unit) {
// We have some problematic animation frames in PSX demo (looks like there is missing data),
// so we just skip them.
if ( (Sword2Engine::isPsx() && _vm->_logic->readVar(DEMO)) &&
- ((build_unit->anim_resource == 369 && build_unit->anim_pc == 0) ||
+ ((build_unit->anim_resource == 369 && build_unit->anim_pc == 0) ||
(build_unit->anim_resource == 296 && build_unit->anim_pc == 5) ||
- (build_unit->anim_resource == 534 && build_unit->anim_pc == 13)) )
+ (build_unit->anim_resource == 534 && build_unit->anim_pc == 13)) )
return;
byte *file = _vm->_resman->openResource(build_unit->anim_resource);
@@ -1309,7 +1309,7 @@ bool Screen::getPsxScrCacheStatus(uint8 level) {
if (level > 3) {
level = 0;
}
-
+
return _psxCacheEnabled[level];
}
diff --git a/engines/sword2/screen.h b/engines/sword2/screen.h
index c098b155ed..2f72b75980 100644
--- a/engines/sword2/screen.h
+++ b/engines/sword2/screen.h
@@ -215,7 +215,7 @@ private:
// positions, etc.
ScreenInfo _thisScreen;
-
+
int32 _renderCaps;
int8 _renderLevel;
@@ -459,7 +459,7 @@ public:
void rollCredits();
void splashScreen();
- // Some sprites are compressed in HIF format
+ // Some sprites are compressed in HIF format
static uint32 decompressHIF(byte *src, byte *dst, uint32 *skipData = NULL);
// This is used to resize psx sprites back to original resolution
static void resizePsxSprite(byte *dst, byte *src, uint16 destW, uint16 destH);
diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp
index 706143aded..ed27622000 100644
--- a/engines/sword2/sound.cpp
+++ b/engines/sword2/sound.cpp
@@ -211,9 +211,9 @@ void Sound::playMovieSound(int32 res, int type) {
byte *data = _vm->_resman->openResource(res);
uint32 len = _vm->_resman->fetchLen(res);
-
+
assert(_vm->_resman->fetchType(data) == WAV_FILE);
-
+
// In PSX version we have nothing to skip here, as data starts right away
if (!Sword2Engine::isPsx()) {
data += ResHeader::size();
@@ -300,7 +300,7 @@ void Sound::queueFx(int32 res, int32 type, int32 delay, int32 volume, int32 pan)
_fxQueue[i].data = data;
else
_fxQueue[i].data = data + ResHeader::size();
-
+
_fxQueue[i].len = len;
_fxQueue[i].delay = delay;
_fxQueue[i].volume = volume;
diff --git a/engines/sword2/sprite.cpp b/engines/sword2/sprite.cpp
index 2474293500..1e55792adb 100644
--- a/engines/sword2/sprite.cpp
+++ b/engines/sword2/sprite.cpp
@@ -141,7 +141,7 @@ int32 Screen::decompressRLE256(byte *dst, byte *src, int32 decompSize) {
void Screen::unwindRaw16(byte *dst, byte *src, uint16 blockSize, byte *colTable) {
// for each pair of pixels
while (blockSize > 1) {
-
+
if (Sword2Engine::isPsx()) {
// 1st colour = number in table at position given by upper
// nibble of source byte
@@ -282,7 +282,7 @@ uint32 Screen::decompressHIF(byte *src, byte *dst, uint32 *skipData) {
while(repeat_count >= 0) {
uint16 refetchData = (info_word & 0xFFF) + 1;
if (refetchData > decompSize) return 0; // We have a problem here...
- uint8 *old_data_src = dst - refetchData;
+ uint8 *old_data_src = dst - refetchData;
*dst++ = *old_data_src;
decompSize++;
repeat_count--;
@@ -298,7 +298,7 @@ uint32 Screen::decompressHIF(byte *src, byte *dst, uint32 *skipData) {
}
}
-// Double line image to keep aspect ratio.
+// Double line image to keep aspect ratio.
// Used in PSX version.
void Screen::resizePsxSprite(byte *dst, byte *src, uint16 destW, uint16 destH) {
for (int i = 0; i < destH / 2; i++) {
@@ -547,7 +547,7 @@ int32 Screen::drawSprite(SpriteInfo *s) {
free(tempBuf);
} else { // PC RLE16 sprites
sprite = (byte *)malloc(s->w * s->h);
-
+
if (!sprite)
return RDERR_OUTOFMEMORY;
@@ -573,7 +573,7 @@ int32 Screen::drawSprite(SpriteInfo *s) {
s->w = (decompData / (s->h / 2));
sprite = (byte *)malloc(s->w * s->h);
-
+
if (!sprite)
return RDERR_OUTOFMEMORY;
@@ -695,7 +695,7 @@ int32 Screen::drawSprite(SpriteInfo *s) {
return RDERR_OUTOFMEMORY;
}
- // We cannot use good scaling for PSX version, as we are missing
+ // We cannot use good scaling for PSX version, as we are missing
// some required data.
if (_renderCaps & RDBLTFX_EDGEBLEND && !Sword2Engine::isPsx())
scaleImageGood(newSprite, s->scaledWidth, s->scaledWidth, s->scaledHeight, sprite, s->w, s->w, s->h, _buffer + _screenWide * rd.top + rd.left);
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 54c646c326..01e6d432cf 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -473,11 +473,11 @@ Common::Error Sword2Engine::run() {
// Handle GMM Loading
if (_gmmLoadSlot != -1) {
-
+
// Hide mouse cursor and fade screen
_mouse->hideMouse();
_screen->fadeDown();
-
+
// Clean up and load game
_logic->_router->freeAllRouteMem();
diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h
index 84530fc4f2..457f585841 100644
--- a/engines/sword2/sword2.h
+++ b/engines/sword2/sword2.h
@@ -163,7 +163,7 @@ public:
Common::Error saveGameState(int slot, const char *desc);
bool canSaveGameStateCurrently();
Common::Error loadGameState(int slot);
- bool canLoadGameStateCurrently();
+ bool canLoadGameStateCurrently();
uint32 _features;
@@ -218,7 +218,7 @@ public:
byte *fetchTextLine(byte *file, uint32 text_line);
bool checkTextLine(byte *file, uint32 text_line);
byte *fetchPaletteMatchTable(byte *screenFile);
-
+
uint32 saveGame(uint16 slotNo, const byte *description);
uint32 restoreGame(uint16 slotNo);
uint32 getSaveDescription(uint16 slotNo, byte *description);
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp
index edfc8c1243..dad86f9d43 100644
--- a/engines/tinsel/bmv.cpp
+++ b/engines/tinsel/bmv.cpp
@@ -596,7 +596,7 @@ static int MovieCommand(char cmd, int commandOffset) {
PPRINT_CMD pCmd;
pCmd = (PPRINT_CMD)(bigBuffer + commandOffset);
-
+
MovieText(nullContext, (int16)READ_LE_UINT16(&pCmd->stringId),
(int16)READ_LE_UINT16(&pCmd->x),
(int16)READ_LE_UINT16(&pCmd->y),
diff --git a/engines/tinsel/coroutine.h b/engines/tinsel/coroutine.h
index aec2e6cdad..c562ecdabb 100644
--- a/engines/tinsel/coroutine.h
+++ b/engines/tinsel/coroutine.h
@@ -137,7 +137,7 @@ public:
#define CORO_END_CONTEXT(x) } *x = (CoroContextTag *)coroParam
/**
- * Begin the code section of a coroutine.
+ * Begin the code section of a coroutine.
* @param x name of the coroutine context
* @see CORO_BEGIN_CODE
*/
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index 8bf9fb1896..26c912a24a 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -53,7 +53,7 @@ extern uint8 transPalette[MAX_COLOURS];
uint8* psxPJCRLEUnwinder(uint16 imageWidth, uint16 imageHeight, uint8 *srcIdx) {
uint32 remainingBlocks = 0;
- uint16 compressionType = 0; // Kind of decompression to apply
+ uint16 compressionType = 0; // Kind of decompression to apply
uint16 controlBits = 0; // Control bits used to calculate the number of decompressed indexes
uint16 baseIndex = 0; // Base index to be repeated / incremented.
@@ -82,7 +82,7 @@ uint8* psxPJCRLEUnwinder(uint16 imageWidth, uint16 imageHeight, uint8 *srcIdx) {
// else there is no compression.
if (controlData & 0x4000)
compressionType = 2;
- else if (controlData & 0x8000)
+ else if (controlData & 0x8000)
compressionType = 1;
else
compressionType = 0;
@@ -749,10 +749,10 @@ void DrawObject(DRAWOBJECT *pObj) {
if (TinselV1PSX) {
uint8 paletteType = *(srcPtr); // if 0x88 we are using an 8bit palette type, if 0x44 we are using a 4 bit PSX CLUT
uint8 indexType = *(srcPtr + 1); // if 0xCC indexes for this image are compressed with PCJRLE, if 0xDD indexes are not compressed
-
+
switch (paletteType) {
case 0x88: // Normal 8-bit palette
- psxFourBitClut = false;
+ psxFourBitClut = false;
psxSkipBytes = 0;
switch (indexType) {
case 0xDD: // Normal uncompressed indexes
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index 9fb40f8d09..065fc24ae6 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -107,12 +107,12 @@ COLORREF* psxClutToRGBPal(uint8 *srcClut, int *colours) {
clutEntry = READ_LE_UINT16(srcClut); // Read PSX CLUT entry
srcClut += sizeof(uint16);
- if ((clutEntry == 0) && (coloursInPalette == 0))
+ if ((clutEntry == 0) && (coloursInPalette == 0))
coloursInPalette++;
else if ((clutEntry == 0) && (coloursInPalette != 0)) {
*colours = coloursInPalette;
return dstPal;
- } else
+ } else
coloursInPalette++;
// Extract color data
diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp
index 5631d5551a..f7309bc38c 100644
--- a/engines/tinsel/polygons.cpp
+++ b/engines/tinsel/polygons.cpp
@@ -138,7 +138,7 @@ struct LINEINFO {
/**
* POLY structure class. This is implemented as a class, because the structure
* of POLY's changed between TINSEL v1 and v2.
- *
+ *
* FIXME: Right now, we always read *all* data in a polygon, even if only a single
* field is needed. This is rather inefficient.
*/
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index 47b7ffc51a..a07a417723 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -100,16 +100,16 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound
uint32 sampleLen = _sampleStream.readUint32LE();
if (_sampleStream.ioFailed())
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
-
+
if (TinselV1PSX) {
// Read the stream and create a VAG Audio stream
Audio::AudioStream *vagStream = new Audio::VagStream(_sampleStream.readStream(sampleLen), false, 44100);
-
+
// FIXME: Should set this in a different place ;)
_vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, volSound);
//_vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
_vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, volVoice);
-
+
// Play the audio stream
_vm->_mixer->playInputStream(type, &curChan.handle, vagStream);
} else {
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index b4e7e14016..54d678c198 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -646,7 +646,7 @@ void CdDoChange(CORO_PARAM) {
return;
CORO_INVOKE_0(CdCD);
-
+
CdHasChanged();
CORO_END_CODE;
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index 1e4878291b..cedd9ec723 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -3120,7 +3120,7 @@ int TuckerEngine::executeTableInstruction() {
case kCode_bso:
_backgroundSprOffset = readTableInstructionParam(3);
return 0;
- case kCode_bus:
+ case kCode_bus:
_speechSoundNum = readTableInstructionParam(3) - 1;
rememberSpeechSound();
startSpeechSound(_partNum * 3000 + _ptTextOffset + _speechSoundNum - 3000, _speechVolume);
@@ -3130,7 +3130,7 @@ int TuckerEngine::executeTableInstruction() {
_actionCharacterNum = 99;
_charSpeechSoundCounter = kDefaultCharSpeechSoundCounter;
return 0;
- case kCode_buw:
+ case kCode_buw:
_selectedObject.xPos = readTableInstructionParam(3);
_selectedObject.yPos = readTableInstructionParam(3);
_locationMaskIgnore = 1;
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index b48dec4a8c..49dc2c0ef0 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -399,7 +399,7 @@ inline void VectorRendererSpec<PixelType>::
blendPixelPtr(PixelType *ptr, PixelType color, uint8 alpha) {
register int idst = *ptr;
register int isrc = color;
-
+
*ptr = (PixelType)(
(_redMask & ((idst & _redMask) +
((int)(((int)(isrc & _redMask) -
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp
index da84938bc5..11767848ed 100644
--- a/graphics/scaler.cpp
+++ b/graphics/scaler.cpp
@@ -116,12 +116,12 @@ void InitLUT(Graphics::PixelFormat format) {
hqx_low3bits = (7 << format.rShift) | (7 << format.gShift) | (7 << format.bShift),
hqx_highbits = format.RGBToColor(255,255,255) ^ hqx_lowbits;
-
+
// FIXME: The following code only does the right thing
// if the color order is RGB or BGR, i.e., green is in the middle.
hqx_greenMask = format.RGBToColor(0,255,0);
hqx_redBlueMask = format.RGBToColor(255,0,255);
-
+
hqx_green_redBlue_Mask = (hqx_greenMask << 16) | hqx_redBlueMask;
#endif
}
diff --git a/graphics/video/dxa_decoder.cpp b/graphics/video/dxa_decoder.cpp
index e514050942..827ee0846f 100644
--- a/graphics/video/dxa_decoder.cpp
+++ b/graphics/video/dxa_decoder.cpp
@@ -155,7 +155,7 @@ bool DXADecoder::loadFile(const char *fileName) {
} while (tag != 0);
}
#endif
-
+
// Read the sound header
_soundTag = _fileStream->readUint32BE();
diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp
index 6f31ff9658..cf8b7b2d9d 100644
--- a/gui/GuiManager.cpp
+++ b/gui/GuiManager.cpp
@@ -95,7 +95,7 @@ void GuiManager::initKeymap() {
act = new Action(guiMap, "CLOS", "Close", kGenericActionType, kStartKeyType);
act->addKeyEvent(KeyState(KEYCODE_ESCAPE, ASCII_ESCAPE, 0));
-
+
act = new Action(guiMap, "CLIK", "Mouse click");
act->addLeftClickEvent();
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index 7f6c315ac0..06cbcdcbd9 100644
--- a/gui/ListWidget.cpp
+++ b/gui/ListWidget.cpp
@@ -403,7 +403,7 @@ void ListWidget::drawWidget() {
buffer = _list[pos];
width = _w - r.left - scrollbarW;
g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight - 2),
- buffer, _state, Graphics::kTextAlignLeft, inverted, pad, true);
+ buffer, _state, Graphics::kTextAlignLeft, inverted, pad, true);
}
_textWidth[i] = width;
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 30aab03812..fe93a1f7d6 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -382,7 +382,7 @@ bool ThemeEngine::init() {
if (node.getName().hasSuffix(".zip") && !node.isDirectory()) {
#ifdef USE_ZLIB
Common::ZipArchive *zipArchive = new Common::ZipArchive(node);
-
+
if (!zipArchive || !zipArchive->isOpen()) {
delete zipArchive;
zipArchive = 0;
@@ -397,7 +397,7 @@ bool ThemeEngine::init() {
_themeArchive = new Common::FSDirectory(node);
}
}
-
+
// Load the theme
// We pass the theme file here by default, so the user will
// have a descriptive error message. The only exception will
@@ -415,7 +415,7 @@ void ThemeEngine::clearAll() {
}
void ThemeEngine::refresh() {
-
+
// Flush all bitmaps if the overlay pixel format changed.
if (_overlayFormat != _system->getOverlayFormat()) {
for (ImagesMap::iterator i = _bitmaps.begin(); i != _bitmaps.end(); ++i) {
@@ -622,7 +622,7 @@ void ThemeEngine::loadTheme(const Common::String &themeId) {
// Load the archive containing image and XML data
_themeOk = loadThemeXML(themeId);
}
-
+
if (!_themeOk) {
warning("Failed to load theme '%s'", themeId.c_str());
return;
@@ -1487,10 +1487,10 @@ void ThemeEngine::listUsableThemes(Common::FSNode node, Common::List<ThemeDescri
list.push_back(td);
}
}
-
+
fileList.clear();
#endif
-
+
// Check if we exceeded the given recursion depth
if (depth - 1 == -1)
return;
@@ -1509,7 +1509,7 @@ Common::String ThemeEngine::getThemeFile(const Common::String &id) {
// of the builtin one.
if (id.equalsIgnoreCase("default"))
return Common::String();
-
+
// For our builtin theme we don't have to do anything for now too
if (id.equalsIgnoreCase("builtin"))
return Common::String();
diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp
index ab6d4c7a0e..3afded5504 100644
--- a/gui/ThemeLayout.cpp
+++ b/gui/ThemeLayout.cpp
@@ -192,7 +192,7 @@ void ThemeLayoutStacked::reflowLayoutVertical() {
// Advance the vertical offset by the height of the newest item, plus
// the item spacing value.
curY += _children[i]->getHeight() + _spacing;
-
+
// Update width and height of this stack layout
_w = MAX(_w, (int16)(_children[i]->getWidth() + _padding.left + _padding.right));
_h += _children[i]->getHeight() + _spacing;
@@ -205,7 +205,7 @@ void ThemeLayoutStacked::reflowLayoutVertical() {
// If there were any items with undetermined height, then compute and set
// their height now. We do so by determining how much space is left, and
- // then distributing this equally over all items which need auto-resizing.
+ // then distributing this equally over all items which need auto-resizing.
if (rescount) {
int newh = (getParentHeight() - _h - _padding.bottom) / rescount;
@@ -268,7 +268,7 @@ void ThemeLayoutStacked::reflowLayoutHorizontal() {
// If there were any items with undetermined width, then compute and set
// their width now. We do so by determining how much space is left, and
- // then distributing this equally over all items which need auto-resizing.
+ // then distributing this equally over all items which need auto-resizing.
if (rescount) {
int neww = (getParentWidth() - _w - _padding.right) / rescount;
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index b2841b2781..de58fe463d 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -915,7 +915,7 @@ void LauncherDialog::updateButtons() {
? "Mass Add"
: "Add Game";
- if (_addButton->getLabel() != newAddButtonLabel)
+ if (_addButton->getLabel() != newAddButtonLabel)
_addButton->setLabel(newAddButtonLabel);
}
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index f5dfd5950c..0dd6aef401 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -72,7 +72,7 @@ void ThemeBrowser::handleCommand(CommandSender *sender, uint32 cmd, uint32 data)
if (selection < 0)
break;
- // TODO:
+ // TODO:
// Currently ThemeEngine::listUseableThemes uses a
// list. Thus we can not use operator[] here but
// need to iterate through the list. We might want
@@ -97,7 +97,7 @@ void ThemeBrowser::updateListing() {
ThemeEngine::listUsableThemes(_themes);
- const Common::String currentThemeId = g_gui.theme()->getThemeId();
+ const Common::String currentThemeId = g_gui.theme()->getThemeId();
int currentThemeIndex = 0, index = 0;
Common::StringList list;
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 478e1d87f4..12da012c7b 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -228,7 +228,7 @@ void StaticTextWidget::drawWidget() {
#pragma mark -
ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, uint32 cmd, uint8 hotkey)
- : StaticTextWidget(boss, x, y, w, h, label, Graphics::kTextAlignCenter), CommandSender(boss),
+ : StaticTextWidget(boss, x, y, w, h, label, Graphics::kTextAlignCenter), CommandSender(boss),
_cmd(cmd), _hotkey(hotkey) {
setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);
_type = kButtonWidget;
diff --git a/gui/widget.h b/gui/widget.h
index 3f4b4c04ae..95f146a414 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -45,7 +45,7 @@ enum {
WIDGET_CLEARBG = 1 << 5,
WIDGET_WANT_TICKLE = 1 << 7,
WIDGET_TRACK_MOUSE = 1 << 8,
- // Retain focus on mouse up. By default widgets lose focus on mouseup,
+ // Retain focus on mouse up. By default widgets lose focus on mouseup,
// but some widgets might want to retain it - widgets where you enter
// text, for instance
WIDGET_RETAIN_FOCUS = 1 << 9,
diff --git a/sound/adpcm.cpp b/sound/adpcm.cpp
index a5f2f7c4eb..37b14140b7 100644
--- a/sound/adpcm.cpp
+++ b/sound/adpcm.cpp
@@ -112,12 +112,12 @@ public:
ADPCMInputStream::ADPCMInputStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign, uint numLoops)
: _stream(stream), _disposeAfterUse(disposeAfterUse), _channels(channels), _type(type), _blockAlign(blockAlign), _rate(rate), _numLoops(numLoops) {
-
+
if (type == kADPCMMSIma && blockAlign == 0)
error("ADPCMInputStream(): blockAlign isn't specified for MS IMA ADPCM");
if (type == kADPCMMS && blockAlign == 0)
error("ADPCMInputStream(): blockAlign isn't specified for MS ADPCM");
-
+
if (type == kADPCMTinsel4 && blockAlign == 0)
error("ADPCMInputStream(): blockAlign isn't specified for Tinsel 4-bit ADPCM");
if (type == kADPCMTinsel6 && blockAlign == 0)
@@ -131,7 +131,7 @@ ADPCMInputStream::ADPCMInputStream(Common::SeekableReadStream *stream, bool disp
error("ADPCMInputStream(): Tinsel 6-bit ADPCM only supports mono");
if (type == kADPCMTinsel8 && channels != 1)
error("ADPCMInputStream(): Tinsel 8-bit ADPCM only supports mono");
-
+
_startpos = stream->pos();
_endpos = _startpos + size;
_curLoop = 0;
@@ -182,7 +182,7 @@ int ADPCMInputStream::readBuffer(int16 *buffer, const int numSamples) {
error("Unsupported ADPCM encoding");
break;
}
-
+
// Loop if necessary
if (samplesDecoded < numSamples || _stream->pos() == _endpos) {
_curLoop++;
@@ -192,7 +192,7 @@ int ADPCMInputStream::readBuffer(int16 *buffer, const int numSamples) {
return samplesDecoded + readBuffer(buffer + samplesDecoded, numSamples - samplesDecoded);
}
}
-
+
return samplesDecoded;
}
diff --git a/sound/fmopl.h b/sound/fmopl.h
index 81d9610a44..d0b15368e0 100644
--- a/sound/fmopl.h
+++ b/sound/fmopl.h
@@ -76,7 +76,7 @@ public:
/**
* Creates the specific driver with a specific type setup.
- */
+ */
static OPL *create(DriverId driver, OplType type);
/**
@@ -86,7 +86,7 @@ public:
static OPL *create(OplType type = kOpl2) { return create(detect(type), type); }
private:
- static const EmulatorDescription _drivers[];
+ static const EmulatorDescription _drivers[];
};
class OPL {
diff --git a/sound/softsynth/opl/dosbox.cpp b/sound/softsynth/opl/dosbox.cpp
index cbb3090608..25fda7f2e6 100644
--- a/sound/softsynth/opl/dosbox.cpp
+++ b/sound/softsynth/opl/dosbox.cpp
@@ -40,7 +40,7 @@
#include <string.h>
namespace OPL {
-namespace DOSBox {
+namespace DOSBox {
Timer::Timer() {
masked = false;
@@ -51,7 +51,7 @@ Timer::Timer() {
}
void Timer::update(double time) {
- if (!enabled || !delay)
+ if (!enabled || !delay)
return;
double deltaStart = time - startTime;
// Only set the overflow flag when not masked
@@ -66,7 +66,7 @@ void Timer::reset(double time) {
double delta = (time - startTime);
double rem = fmod(delta, delay);
double next = delay - rem;
- startTime = time + next;
+ startTime = time + next;
}
void Timer::stop() {
@@ -116,7 +116,7 @@ bool Chip::write(uint32 reg, uint8 val) {
timer[1].stop();
timer[1].masked = (val & 0x20) > 0;
-
+
if (timer[1].masked)
timer[1].overflow = false;
}
@@ -148,7 +148,7 @@ namespace OPL2 {
#include "opl_impl.h"
struct Handler : public DOSBox::Handler {
- void writeReg(uint32 reg, uint8 val) {
+ void writeReg(uint32 reg, uint8 val) {
adlib_write(reg, val);
}
@@ -171,7 +171,7 @@ namespace OPL3 {
#include "opl_impl.h"
struct Handler : public DOSBox::Handler {
- void writeReg(uint32 reg, uint8 val) {
+ void writeReg(uint32 reg, uint8 val) {
adlib_write(reg, val);
}
@@ -217,13 +217,13 @@ bool OPL::init(int rate) {
case Config::kOpl3:
_handler = new OPL3::Handler();
break;
-
+
default:
return false;
}
_handler->init(rate);
-
+
if (_type == Config::kDualOpl2) {
// Setup opl3 mode in the hander
_handler->writeReg(0x105, 1);
@@ -234,7 +234,7 @@ bool OPL::init(int rate) {
}
void OPL::reset() {
- init(_rate);
+ init(_rate);
}
void OPL::write(int port, int val) {
@@ -325,7 +325,7 @@ void OPL::writeReg(int r, int v) {
void OPL::dualWrite(uint8 index, uint8 reg, uint8 val) {
// Make sure you don't use opl3 features
- // Don't allow write to disable opl3
+ // Don't allow write to disable opl3
if (reg == 5)
return;
@@ -334,7 +334,7 @@ void OPL::dualWrite(uint8 index, uint8 reg, uint8 val) {
val &= 3;
// Write to the timer?
- if (_chip[index].write(reg, val))
+ if (_chip[index].write(reg, val))
return;
// Enabling panning
diff --git a/sound/softsynth/opl/opl_impl.h b/sound/softsynth/opl/opl_impl.h
index c5ef87ce3c..5c68baa485 100644
--- a/sound/softsynth/opl/opl_impl.h
+++ b/sound/softsynth/opl/opl_impl.h
@@ -6,12 +6,12 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -131,7 +131,7 @@ static fltype decrelconst[4] = {1/39.28064,1/31.41608,1/26.17344,1/22.44608};
void operator_advance(op_type* op_pt, Bit32s vib) {
op_pt->wfpos = op_pt->tcount; // waveform position
-
+
// advance waveform time
op_pt->tcount += op_pt->tinc;
op_pt->tcount += (Bit32s)(op_pt->tinc)*vib/FIXEDPT;
@@ -311,7 +311,7 @@ void change_attackrate(Bitu regbase, op_type* op_pt) {
op_pt->env_step_a = (1<<(steps<=12?12-steps:0))-1;
Bits step_num = (step_skip<=48)?(4-(step_skip&3)):0;
- static Bit8u step_skip_mask[5] = {0xff, 0xfe, 0xee, 0xba, 0xaa};
+ static Bit8u step_skip_mask[5] = {0xff, 0xfe, 0xee, 0xba, 0xaa};
op_pt->env_step_skip_a = step_skip_mask[step_num];
#if defined(OPLTYPE_IS_OPL3)
@@ -1001,7 +1001,7 @@ void adlib_getsample(Bit16s* sndptr, Bits numsamples) {
operator_advance(&cptr[9],vibval1[i]);
opfuncs[cptr[9].op_state](&cptr[9]);
operator_output(&cptr[9],0,tremval1[i]);
-
+
Bit32s chanval = cptr[9].cval*2;
CHANVAL_OUT
}
@@ -1033,7 +1033,7 @@ void adlib_getsample(Bit16s* sndptr, Bits numsamples) {
operator_advance(&cptr[9],vibval2[i]);
opfuncs[cptr[9].op_state](&cptr[9]);
operator_output(&cptr[9],cptr[0].cval*FIXEDPT,tremval2[i]);
-
+
Bit32s chanval = cptr[9].cval*2;
CHANVAL_OUT
}
@@ -1347,7 +1347,7 @@ void adlib_getsample(Bit16s* sndptr, Bits numsamples) {
} else {
// FM-FM-style synthesis (op1[fb] * op2 * op3 * op4)
- if ((cptr[0].op_state != OF_TYPE_OFF) || (cptr[9].op_state != OF_TYPE_OFF) ||
+ if ((cptr[0].op_state != OF_TYPE_OFF) || (cptr[9].op_state != OF_TYPE_OFF) ||
(cptr[3].op_state != OF_TYPE_OFF) || (cptr[3+9].op_state != OF_TYPE_OFF)) {
if ((cptr[0].vibrato) && (cptr[0].op_state != OF_TYPE_OFF)) {
vibval1 = vibval_var1;
diff --git a/sound/softsynth/opl/opl_inc.h b/sound/softsynth/opl/opl_inc.h
index 0798bd9f6a..b7b6ac1d41 100644
--- a/sound/softsynth/opl/opl_inc.h
+++ b/sound/softsynth/opl/opl_inc.h
@@ -6,12 +6,12 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -132,7 +132,7 @@ typedef struct operator_struct {
Bit32u act_state; // activity state (regular, percussion)
bool sus_keep; // keep sustain level when decay finished
bool vibrato,tremolo; // vibrato/tremolo enable bits
-
+
// variables used to provide non-continuous envelopes
Bit32u generator_pos; // for non-standard sample rates we need to determine how many samples have passed
Bits cur_env_step; // current (standardized) sample position
@@ -151,7 +151,7 @@ Bitu chip_num;
op_type op[MAXOPERATORS];
Bits int_samplerate;
-
+
Bit8u status;
Bit32u index;
#if defined(OPLTYPE_IS_OPL3)
diff --git a/sound/timestamp.h b/sound/timestamp.h
index af0cf96ff9..deb86bc2d7 100644
--- a/sound/timestamp.h
+++ b/sound/timestamp.h
@@ -45,23 +45,23 @@ protected:
public:
Timestamp();
-
+
/**
* Set up a timestamp with a given time and framerate.
* @param msecs staring time in milliseconds
* @param frameRate number of frames per second
*/
Timestamp(uint32 msecs, int frameRate);
-
+
/** Adds a number of frames to a timestamp. */
Timestamp addFrames(int frames) const;
-
+
/** Computes the difference (# of frames) between this timestamp and b. */
int frameDiff(const Timestamp &b) const;
-
+
/** Computes the difference (# of milliseconds) between this timestamp and b. */
int msecsDiff(const Timestamp &b) const;
-
+
/** Determines the time in milliseconds described by this timestamp. */
uint32 msecs() const;
};
diff --git a/sound/vag.cpp b/sound/vag.cpp
index 46e6a64233..a08c1c0a72 100644
--- a/sound/vag.cpp
+++ b/sound/vag.cpp
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#include "sound/vag.h"
namespace Audio {
@@ -48,10 +48,10 @@ double f[5][2] = { { 0.0, 0.0 },
int VagStream::readBuffer(int16 *buffer, const int numSamples) {
int32 samplesDecoded = 0;
-
+
if (_samplesRemaining) {
byte i = 0;
-
+
for (i = 28 - _samplesRemaining; i < 28 && samplesDecoded < numSamples; i++) {
_samples[i] = _samples[i] + _s1 * f[_predictor][0] + _s2 * f[_predictor][1];
_s2 = _s1;
@@ -70,17 +70,17 @@ int VagStream::readBuffer(int16 *buffer, const int numSamples) {
_samplesRemaining = 0;
}
-
+
while (samplesDecoded < numSamples) {
byte i = 0;
-
+
_predictor = _stream->readByte();
byte shift = _predictor & 0xf;
_predictor >>= 4;
-
+
if (_stream->readByte() == 7)
return samplesDecoded;
-
+
for (i = 0; i < 28; i += 2) {
byte d = _stream->readByte();
int16 s = (d & 0xf) << 12;
@@ -92,7 +92,7 @@ int VagStream::readBuffer(int16 *buffer, const int numSamples) {
s |= 0xffff0000;
_samples[i + 1] = (double)(s >> shift);
}
-
+
for (i = 0; i < 28 && samplesDecoded < numSamples; i++) {
_samples[i] = _samples[i] + _s1 * f[_predictor][0] + _s2 * f[_predictor][1];
_s2 = _s1;
@@ -101,7 +101,7 @@ int VagStream::readBuffer(int16 *buffer, const int numSamples) {
buffer[samplesDecoded] = d;
samplesDecoded++;
}
-
+
if (i != 27)
_samplesRemaining = 28 - i;
}
diff --git a/sound/vag.h b/sound/vag.h
index 228f68279e..f6f79d2b81 100644
--- a/sound/vag.h
+++ b/sound/vag.h
@@ -33,19 +33,19 @@
#include "sound/audiostream.h"
#include "common/stream.h"
-
+
namespace Audio {
class VagStream : public Audio::AudioStream {
public:
VagStream(Common::SeekableReadStream *stream, bool loop = false, int rate = 11025);
~VagStream();
-
+
bool isStereo() const { return false; }
bool endOfData() const { return _stream->pos() == _stream->size(); }
int getRate() const { return _rate; }
int readBuffer(int16 *buffer, const int numSamples);
- void rewind();
+ void rewind();
private:
Common::SeekableReadStream *_stream;
diff --git a/test/sound/timestamp.h b/test/sound/timestamp.h
index a774c64109..89fc851a80 100644
--- a/test/sound/timestamp.h
+++ b/test/sound/timestamp.h
@@ -9,7 +9,7 @@ class TimestampTestSuite : public CxxTest::TestSuite
const Audio::Timestamp a(10000, 1000);
const Audio::Timestamp b(10001, 1000);
const Audio::Timestamp c(10002, 1000);
-
+
TS_ASSERT_EQUALS(a.frameDiff(b), -1);
TS_ASSERT_EQUALS(b.frameDiff(a), 1);
TS_ASSERT_EQUALS(c.frameDiff(a), 2);
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp
index c5ef12809a..a87a6eeaa6 100644
--- a/tools/create_kyradat/create_kyradat.cpp
+++ b/tools/create_kyradat/create_kyradat.cpp
@@ -344,7 +344,7 @@ const ExtractFilename extractFilenames[] = {
{ lolSpellbookAnim, k3TypeRaw16to8, "MBOOKA.DEF" },
{ lolSpellbookCoords, k3TypeRaw16to8, "MBOOKC.DEF" },
{ lolHealShapeFrames, kTypeRawData, "MHEAL.SHP" },
- { lolLightningDefs, kTypeRawData, "MLGHTNG.DEF" },
+ { lolLightningDefs, kTypeRawData, "MLGHTNG.DEF" },
{ lolFireballCoords, lolTypeRaw16, "MFIREBLL.DEF" },
{ -1, 0, 0 }
diff --git a/tools/create_kyradat/lol_cd.h b/tools/create_kyradat/lol_cd.h
index c140516e31..fa36d1b91d 100644
--- a/tools/create_kyradat/lol_cd.h
+++ b/tools/create_kyradat/lol_cd.h
@@ -2,15 +2,15 @@ const ExtractEntry lolCDFile2[] = {
{ lolCharacterDefs, 0x00029D60, 0x0002A1F2 },
{ lolIngameSfxFiles, 0x0002A330, 0x0002AC22 },
{ lolIngameSfxIndex, 0x0002AC22, 0x0002B00A },
- { lolMusicTrackMap, 0x0002A240, 0x0002A330 },
+ { lolMusicTrackMap, 0x0002A240, 0x0002A330 },
{ lolGMSfxIndex, 0x0002B010, 0x0002B10A },
{ lolMT32SfxIndex, 0x0002B110, 0x0002B20A },
//{ lolADLSfxIndex, 0x0002B210, 0x0002B30A },
{ lolSpellProperties, 0x0002B5E0, 0x0002B6F8 },
{ lolGameShapeMap, 0x0002B35C, 0x0002B470 },
- { lolSceneItemOffs, 0x0003200F, 0x00032017 },
+ { lolSceneItemOffs, 0x0003200F, 0x00032017 },
{ lolCharInvIndex, 0x0002B470, 0x0002B47A },
- { lolCharInvDefs, 0x0002B47A, 0x0002B4D2 },
+ { lolCharInvDefs, 0x0002B47A, 0x0002B4D2 },
{ lolCharDefsMan, 0x0002B4D2, 0x0002B4E4 },
{ lolCharDefsWoman, 0x0002B4E4, 0x0002B4F6 },
{ lolCharDefsKieran, 0x0002B4F6, 0x0002B508 },