aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorMax Horn2011-06-20 00:59:48 +0200
committerMax Horn2011-06-20 00:59:48 +0200
commit88913c0139ac6d1dfb356d3048702b7bc8ef4079 (patch)
treea7436d20333c28f87f2ed0bc15c743b5eb8144ee /engines/tsage
parent3853e76202b132e769ae149720eca931cd87104a (diff)
downloadscummvm-rg350-88913c0139ac6d1dfb356d3048702b7bc8ef4079.tar.gz
scummvm-rg350-88913c0139ac6d1dfb356d3048702b7bc8ef4079.tar.bz2
scummvm-rg350-88913c0139ac6d1dfb356d3048702b7bc8ef4079.zip
ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/blueforce_logic.cpp2
-rw-r--r--engines/tsage/debugger.cpp8
-rw-r--r--engines/tsage/dialogs.cpp2
-rw-r--r--engines/tsage/events.cpp4
-rw-r--r--engines/tsage/globals.cpp2
-rw-r--r--engines/tsage/graphics.cpp4
-rw-r--r--engines/tsage/ringworld_demo.cpp6
-rw-r--r--engines/tsage/ringworld_logic.cpp38
-rw-r--r--engines/tsage/ringworld_scenes1.cpp2
-rw-r--r--engines/tsage/ringworld_scenes1.h4
-rw-r--r--engines/tsage/ringworld_scenes3.cpp2
-rw-r--r--engines/tsage/ringworld_scenes5.cpp4
-rw-r--r--engines/tsage/sound.cpp104
-rw-r--r--engines/tsage/sound.h2
14 files changed, 92 insertions, 92 deletions
diff --git a/engines/tsage/blueforce_logic.cpp b/engines/tsage/blueforce_logic.cpp
index 9813bef6f7..d266d5e1d9 100644
--- a/engines/tsage/blueforce_logic.cpp
+++ b/engines/tsage/blueforce_logic.cpp
@@ -30,7 +30,7 @@ namespace tSage {
void BlueForceGame::start() {
// Start the game
_globals->_sceneManager.changeScene(20);
-
+
_globals->_events.setCursor(CURSOR_WALK);
}
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index 5288c98b72..9277fd429a 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -63,7 +63,7 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) {
if (argc < 2) {
DebugPrintf("Usage: %s <scene number> [prior scene #]\n", argv[0]);
return true;
- }
+ }
if (argc == 3)
_globals->_sceneManager._sceneNumber = strToInt(argv[2]);
@@ -222,7 +222,7 @@ bool Debugger::Cmd_ListObjects(int argc, const char **argv) {
DebugPrintf("Usage: %s\n", argv[0]);
return true;
}
-
+
DebugPrintf("Available objects for this game are:\n");
DebugPrintf("0 - Stunner\n");
DebugPrintf("1 - Scanner\n");
@@ -393,7 +393,7 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
// Lock the background surface for access
Graphics::Surface destSurface = _globals->_sceneManager._scene->_backSurface.lockSurface();
-
+
// Iterate through the scene items
SynchronizedList<SceneItem *>::iterator i;
for (i = _globals->_sceneItems.reverse_begin(); i != _globals->_sceneItems.end(); --i, ++colIndex) {
@@ -418,7 +418,7 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
LineSliceSet set = r.getLineSlices(y);
for (uint p = 0; p < set.items.size(); ++p)
- destSurface.hLine(set.items[p].xs - sceneBounds.left, y - sceneBounds.top,
+ destSurface.hLine(set.items[p].xs - sceneBounds.left, y - sceneBounds.top,
set.items[p].xe - sceneBounds.left - 1, colIndex);
}
}
diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp
index c1bd1d027f..86fbbc8e43 100644
--- a/engines/tsage/dialogs.cpp
+++ b/engines/tsage/dialogs.cpp
@@ -43,7 +43,7 @@ MessageDialog::MessageDialog(const Common::String &message, const Common::String
const Common::String &btn2Message) : GfxDialog() {
// Set up the message
addElements(&_msg, &_btn1, NULL);
-
+
_msg.set(message, 200, ALIGN_LEFT);
_msg._bounds.moveTo(0, 0);
_defaultButton = &_btn1;
diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index 50077fecaf..94c074a50b 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -282,7 +282,7 @@ void EventsClass::hideCursor() {
setCursor(CURSOR_NONE);
}
-bool EventsClass::isCursorVisible() const {
+bool EventsClass::isCursorVisible() const {
return !_globals->getFlag(122);
}
@@ -312,7 +312,7 @@ void EventsClass::delay(int numFrames) {
void EventsClass::listenerSynchronize(Serializer &s) {
s.syncAsUint32LE(_frameNumber);
s.syncAsUint32LE(_prevDelayFrame);
-
+
if (s.getVersion() >= 5) {
s.syncAsSint16LE(_currentCursor);
s.syncAsSint16LE(_lastCursor);
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index b0f6db53c6..e54f1073b0 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -140,7 +140,7 @@ void Globals::synchronize(Serializer &s) {
s.syncAsSint32LE(_gfxColors.foreground);
s.syncAsSint32LE(_fontColors.background);
s.syncAsSint32LE(_fontColors.foreground);
-
+
if (s.getVersion() >= 4) {
s.syncAsByte(_unkColor1);
s.syncAsByte(_unkColor2);
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 25dc897ecd..23f5f22573 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -846,7 +846,7 @@ void GfxButton::setDefaults() {
gfxManager._font.getStringBounds(_message.c_str(), tempRect, 240);
tempRect.right = ((tempRect.right + 15) / 16) * 16;
- // Set the button bounds
+ // Set the button bounds
tempRect.collapse(-_globals->_gfxEdgeAdjust, -_globals->_gfxEdgeAdjust);
if (_vm->getFeatures() & GF_CD)
--tempRect.top;
@@ -866,7 +866,7 @@ void GfxButton::draw() {
// Set the font and color
gfxManager._font.setFontNumber(_fontNumber);
- //
+ //
gfxManager._font._colors.foreground = this->_unkColor1;
gfxManager._font._colors2.background = this->_unkColor2;
gfxManager._font._colors2.foreground = this->_unkColor3;
diff --git a/engines/tsage/ringworld_demo.cpp b/engines/tsage/ringworld_demo.cpp
index 4f905d5bec..fa7511808f 100644
--- a/engines/tsage/ringworld_demo.cpp
+++ b/engines/tsage/ringworld_demo.cpp
@@ -30,7 +30,7 @@ namespace tSage {
void RingworldDemoGame::start() {
// Start the demo's single scene
_globals->_sceneManager.changeScene(1);
-
+
_globals->_events.setCursor(CURSOR_NONE);
}
@@ -108,12 +108,12 @@ void RingworldDemoScene::signal() {
_actor4.postInit();
_actor5.postInit();
_actor6.postInit();
-
+
setAction(&_sequenceManager, this, 22, &_actor1, &_actor2, &_actor3, &_actor4, &_actor5, &_actor6, NULL);
}
void RingworldDemoScene::process(Event &event) {
-
+
}
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 4c60e5fea9..2b5b84ab64 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -268,7 +268,7 @@ void SceneArea::setup(int resNum, int rlbNum, int subNum, int actionId) {
}
void SceneArea::draw2() {
- _surface.draw(Common::Point(_bounds.left, _bounds.top));
+ _surface.draw(Common::Point(_bounds.left, _bounds.top));
}
void SceneArea::display() {
@@ -619,7 +619,7 @@ void SpeakerSKL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(203, 120));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(7013);
_object2.setStrip2(1);
@@ -651,7 +651,7 @@ void SpeakerQL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(128, 146));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2612);
_object2.setStrip2(1);
@@ -684,7 +684,7 @@ void SpeakerSR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(224, 198));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2813);
_object2.setStrip2(1);
@@ -725,7 +725,7 @@ void SpeakerSL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(95, 198));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2812);
_object2.setStrip2(1);
@@ -757,7 +757,7 @@ void SpeakerQR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(191, 146));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2613);
_object2.setStrip2(1);
@@ -789,7 +789,7 @@ void SpeakerQU::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(116, 120));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(7021);
_object2.setStrip2(1);
@@ -818,7 +818,7 @@ void SpeakerCR::setText(const Common::String &msg) {
_object1.fixPriority(255);
_object1.setPosition(Common::Point(219, 168));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(9011);
_object2.setStrip2(1);
@@ -847,7 +847,7 @@ void SpeakerMR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(220, 143));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2713);
_object2.setStrip2(1);
@@ -879,7 +879,7 @@ void SpeakerSAL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(185, 200));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2853);
_object2.setStrip2(1);
@@ -910,7 +910,7 @@ void SpeakerML::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(99, 143));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2712);
_object2.setStrip2(1);
@@ -941,7 +941,7 @@ void SpeakerCHFL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(205, 116));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4113);
_object2.setStrip2(1);
@@ -972,7 +972,7 @@ void SpeakerCHFR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(103, 116));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4112);
_object2.setStrip2(1);
@@ -1003,7 +1003,7 @@ void SpeakerPL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(107, 117));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4062);
_object2.setStrip2(1);
@@ -1048,7 +1048,7 @@ void SpeakerPR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(212, 117));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4063);
_object2.setStrip2(2);
@@ -1093,7 +1093,7 @@ void SpeakerCDR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(208, 97));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4163);
_object2.setStrip2(2);
@@ -1124,7 +1124,7 @@ void SpeakerCDL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(112, 97));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4162);
_object2.setStrip2(2);
@@ -1155,7 +1155,7 @@ void SpeakerFLL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(216, 129));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(5223);
_object2.setStrip2(1);
@@ -1186,7 +1186,7 @@ void SpeakerBatR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(137, 122));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(5361);
_object2.setStrip2(1);
diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp
index 9f8aedbfc1..717841d4fc 100644
--- a/engines/tsage/ringworld_scenes1.cpp
+++ b/engines/tsage/ringworld_scenes1.cpp
@@ -2890,7 +2890,7 @@ void Scene6100::Action3::signal() {
scene->_sunflower3.hide();
scene->_rocks.hide();
scene->_sceneText.hide();
-
+
_globals->_events.setCursor(CURSOR_WALK);
scene->_stripManager.start(8120, this);
break;
diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h
index 712a16c612..283cf68e07 100644
--- a/engines/tsage/ringworld_scenes1.h
+++ b/engines/tsage/ringworld_scenes1.h
@@ -272,7 +272,7 @@ class Scene50 : public Scene {
public:
virtual void signal();
};
-
+
/* Objects */
class Object1 : public SceneObject {
public:
@@ -312,7 +312,7 @@ public:
virtual void dispatch();
};
-class Scene60 : public Scene {
+class Scene60 : public Scene {
class Action1 : public Action {
public:
virtual void signal();
diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp
index 5d2732d36c..824a96a18b 100644
--- a/engines/tsage/ringworld_scenes3.cpp
+++ b/engines/tsage/ringworld_scenes3.cpp
@@ -1962,7 +1962,7 @@ void Scene2100::signal() {
void Scene2100::synchronize(Serializer &s) {
Scene::synchronize(s);
if (s.getVersion() >= 3)
- s.syncAsSint16LE(_sitFl);
+ s.syncAsSint16LE(_sitFl);
}
/*--------------------------------------------------------------------------
diff --git a/engines/tsage/ringworld_scenes5.cpp b/engines/tsage/ringworld_scenes5.cpp
index c884f9f6e4..fccc7e1b50 100644
--- a/engines/tsage/ringworld_scenes5.cpp
+++ b/engines/tsage/ringworld_scenes5.cpp
@@ -1921,7 +1921,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
_miranda.setStrip(3);
_miranda.setFrame(2);
_miranda.changeZoom(-1);
-
+
_miranda.setPosition(Common::Point(66, 209));
_globals->_sceneItems.push_back(&_miranda);
}
@@ -4268,7 +4268,7 @@ void Scene4301::Action1::signal() {
_actionIndex = 2;
break;
case 10:
- // Puzzle: Wrong code
+ // Puzzle: Wrong code
_globals->_events.setCursor(CURSOR_NONE);
scene->_soundHandler.play(337);
if (scene->_hotspot3._flags & OBJFLAG_HIDE)
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 1288ba9367..0c0d93be03 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -205,7 +205,7 @@ void SoundManager::installDriver(int driverNum) {
// Unmute currently active sounds
for (Common::List<Sound *>::iterator i = _playList.begin(); i != _playList.end(); ++i)
(*i)->mute(false);
-
+
enableSoundServer();
}
break;
@@ -239,14 +239,14 @@ void SoundManager::unInstallDriver(int driverNum) {
// Uninstall the driver
_sfUnInstallDriver(*i);
- // Re-orient all the loaded sounds
+ // Re-orient all the loaded sounds
for (j = _soundList.begin(); j != _soundList.end(); ++j)
(*j)->orientAfterDriverChange();
// Unmute currently active sounds
for (j = _playList.begin(); j != _playList.end(); ++j)
(*j)->mute(false);
-
+
enableSoundServer();
}
}
@@ -361,7 +361,7 @@ void SoundManager::_sfSoundServer() {
} while (sfManager()._serverSuspendedCount > 0);
// Poll all sound drivers in case they need it
- for (Common::List<SoundDriver *>::iterator i = sfManager()._installedDrivers.begin();
+ for (Common::List<SoundDriver *>::iterator i = sfManager()._installedDrivers.begin();
i != sfManager()._installedDrivers.end(); ++i) {
(*i)->poll();
}
@@ -479,7 +479,7 @@ void SoundManager::_sfUpdateVoiceStructs2() {
vse._priority2 = vse._priority;
}
}
- }
+ }
}
/*--------------------------------------------------------------------------*/
@@ -532,7 +532,7 @@ void SoundManager::_sfAddToPlayList(Sound *sound) {
_sfRethinkVoiceTypes();
--sfManager()._serverSuspendedCount;
}
-
+
void SoundManager::_sfRemoveFromPlayList(Sound *sound) {
++sfManager()._serverSuspendedCount;
if (_sfDoRemoveFromPlayList(sound))
@@ -541,7 +541,7 @@ void SoundManager::_sfRemoveFromPlayList(Sound *sound) {
}
bool SoundManager::_sfIsOnPlayList(Sound *sound) {
- ++_soundManager->_serverSuspendedCount;
+ ++_soundManager->_serverSuspendedCount;
bool result = contains(_soundManager->_playList, sound);
--_soundManager->_serverSuspendedCount;
@@ -619,7 +619,7 @@ void SoundManager::_sfRethinkSoundDrivers() {
while (*groupData != 0xff) {
byte byteVal = *groupData++;
-
+
if (byteVal == idx) {
++groupData;
@@ -666,7 +666,7 @@ void SoundManager::_sfRethinkSoundDrivers() {
}
}
}
- }
+ }
}
}
}
@@ -764,7 +764,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
if (vtStruct->_voiceType != VOICETYPE_0) {
// Type 1
int numVoices = vtStruct->_numVoices;
-
+
if (numVoices >= chNumVoices) {
int channelCount = chNumVoices, idx = 0;
while (channelCount > 0) {
@@ -821,7 +821,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
// Type 0
if (sound->_isEmpty) {
uint idx = 0;
- while ((idx < vtStruct->_entries.size()) &&
+ while ((idx < vtStruct->_entries.size()) &&
(vtStruct->_entries[idx]._voiceNum == foundIndex))
++idx;
if (idx == vtStruct->_entries.size())
@@ -832,7 +832,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
if (flagsVal != 1) {
// All modes except mode 1 (loc_23EDF)
int entryIndex = -1, maxVoiceNum = 0;
-
+
for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
if (!vtStruct->_entries[idx]._type0._sound2 && (vtStruct->_entries[idx]._field1 != 0) &&
(vtStruct->_entries[idx]._voiceNum > maxVoiceNum)) {
@@ -848,7 +848,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
vtStruct->_entries[entryIndex]._type0._field12 = 0;
continue;
}
-
+
if (foundPriority != 0)
continue;
@@ -874,7 +874,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
break;
} else {
// Channel mode 1 handling (loc_23FAC)
-
+
bool foundMatch = false;
int entryIndex = -1;
for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
@@ -894,14 +894,14 @@ void SoundManager::_sfRethinkVoiceTypes() {
vtStruct->_entries[entryIndex]._type0._field12 = 0;
continue;
}
-
+
if (!foundMatch) {
if (foundPriority)
continue;
if (entryIndex == -1) {
_sfUpdateVoiceStructs2();
break;
- }
+ }
}
// Find the entry with the highest priority
@@ -921,7 +921,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
entryIndex = -1;
}
}
-
+
if (!foundMatch) {
if (foundPriority)
continue;
@@ -966,12 +966,12 @@ void SoundManager::_sfRethinkVoiceTypes() {
vteDest._sound2 = vteSrc._sound2;
vteDest._channelNum2 = vteSrc._channelNum2;
vteDest._priority2 = vteSrc._priority2;
-
+
vteSrc._sound2 = sound;
vteSrc._channelNum2 = foundIndex;
vteSrc._priority2 = foundPriority;
vteSrc._field12 = 1;
- continue;
+ continue;
}
if (!foundPriority)
@@ -1031,7 +1031,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
if (total) {
driver->proc24(vse._channelNum, idx, vse._sound, 123, 0);
driver->proc24(vse._channelNum, idx, vse._sound, 1, vse._sound->_chModulation[vse._channelNum]);
- driver->proc24(vse._channelNum, idx, vse._sound, 7,
+ driver->proc24(vse._channelNum, idx, vse._sound, 7,
vse._sound->_chVolume[vse._channelNum] * vse._sound->_volume / 127);
driver->proc24(vse._channelNum, idx, vse._sound, 10, vse._sound->_chPan[vse._channelNum]);
driver->proc24(vse._channelNum, idx, vse._sound, 64, vse._sound->_chDamper[vse._channelNum]);
@@ -1105,7 +1105,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
1, vseFound._sound->_chModulation[vseFound._channelNum]);
driver->proc24(vseFound._channelNum, voiceIndex, vseFound._sound,
7, vseFound._sound->_chVolume[vseFound._channelNum] * vseFound._sound->_volume / 127);
- driver->proc24(vseFound._channelNum, voiceIndex, vseFound._sound,
+ driver->proc24(vseFound._channelNum, voiceIndex, vseFound._sound,
10, vseFound._sound->_chPan[vseFound._channelNum]);
driver->setProgram(vseFound._channelNum, vseFound._sound->_chProgram[vseFound._channelNum]);
driver->setPitchBlend(vseFound._channelNum, vseFound._sound->_chPitchBlend[vseFound._channelNum]);
@@ -1175,7 +1175,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
driver->updateVoice(vs->_entries[idx2]._voiceNum);
driver->proc38(vs->_entries[idx2]._voiceNum, 1, vse2._sound->_chModulation[vse2._channelNum]);
- driver->proc38(vs->_entries[idx2]._voiceNum, 7,
+ driver->proc38(vs->_entries[idx2]._voiceNum, 7,
vse2._sound->_chVolume[vse2._channelNum] * vse2._sound->_volume / 127);
driver->proc38(vs->_entries[idx2]._voiceNum, 10, vse2._sound->_chPan[vse2._channelNum]);
driver->setPitch(vs->_entries[idx2]._voiceNum, vse2._sound->_chPitchBlend[vse2._channelNum]);
@@ -1206,13 +1206,13 @@ void SoundManager::_sfUpdateVolume(Sound *sound) {
}
void SoundManager::_sfDereferenceAll() {
- // Orignal used handles for both the driver list and voiceStructPtrs list. This method then refreshed
+ // Orignal used handles for both the driver list and voiceStructPtrs list. This method then refreshed
// pointer lists based on the handles. Since in ScummVM we're just using pointers directly, this
// method doesn't need any implementation
}
void SoundManager::_sfUpdatePriority(Sound *sound) {
- ++_soundManager->_serverSuspendedCount;
+ ++_soundManager->_serverSuspendedCount;
int tempPriority = (sound->_fixedPriority == 255) ? sound->_sndResPriority : sound->_priority;
if (sound->_priority != tempPriority) {
@@ -1240,7 +1240,7 @@ void SoundManager::_sfSetMasterVol(int volume) {
if (volume != _soundManager->_masterVol) {
_soundManager->_masterVol = volume;
- for (Common::List<SoundDriver *>::iterator i = _soundManager->_installedDrivers.begin();
+ for (Common::List<SoundDriver *>::iterator i = _soundManager->_installedDrivers.begin();
i != _soundManager->_installedDrivers.end(); ++i) {
(*i)->setMasterVolume(volume);
}
@@ -1283,8 +1283,8 @@ void SoundManager::_sfTerminate() {
void SoundManager::_sfExtractGroupMask() {
uint32 mask = 0;
- for (Common::List<SoundDriver *>::iterator i = sfManager()._installedDrivers.begin();
- i != sfManager()._installedDrivers.end(); ++i)
+ for (Common::List<SoundDriver *>::iterator i = sfManager()._installedDrivers.begin();
+ i != sfManager()._installedDrivers.end(); ++i)
mask |= (*i)->_groupMask;
_soundManager->_groupsAvail = mask;
@@ -1293,7 +1293,7 @@ void SoundManager::_sfExtractGroupMask() {
bool SoundManager::_sfInstallDriver(SoundDriver *driver) {
if (!driver->open())
return false;
-
+
sfManager()._installedDrivers.push_back(driver);
driver->_groupOffset = driver->getGroupData();
driver->_groupMask = READ_LE_UINT32(driver->_groupOffset);
@@ -1345,13 +1345,13 @@ bool SoundManager::_sfDoRemoveFromPlayList(Sound *sound) {
break;
}
}
-
+
--sfManager()._serverSuspendedCount;
return result;
}
void SoundManager::_sfDoUpdateVolume(Sound *sound) {
- ++_soundManager->_serverSuspendedCount;
+ ++_soundManager->_serverSuspendedCount;
for (int voiceIndex = 0; voiceIndex < SOUND_ARR_SIZE; ++voiceIndex) {
VoiceTypeStruct *vs = sfManager()._voiceTypeStructPtrs[voiceIndex];
@@ -1375,7 +1375,7 @@ void SoundManager::_sfDoUpdateVolume(Sound *sound) {
}
}
}
-
+
--_soundManager->_serverSuspendedCount;
}
@@ -1408,7 +1408,7 @@ Sound::Sound() {
_isEmpty = false;
_remoteReceiver = NULL;
-
+
memset(_chProgram, 0, SOUND_ARR_SIZE * sizeof(int));
memset(_chModulation, 0, SOUND_ARR_SIZE * sizeof(int));
memset(_chVolume, 0, SOUND_ARR_SIZE * sizeof(int));
@@ -1519,7 +1519,7 @@ void Sound::orientAfterDriverChange() {
for (int idx = 0; idx < _trackInfo._numTracks; ++idx)
DEALLOCATE(_channelData[idx]);
-
+
_trackInfo._numTracks = 0;
_primed = false;
_prime(_soundResID, true);
@@ -1723,8 +1723,8 @@ bool Sound::_soServiceTracks() {
if (_isEmpty) {
_soRemoteReceive();
return false;
- }
-
+ }
+
bool flag = true;
for (int trackCtr = 0; trackCtr < _trackInfo._numTracks; ++trackCtr) {
int mode = *_channelData[trackCtr];
@@ -1784,12 +1784,12 @@ void Sound::_soPrimeChannelData() {
for (int idx = 0; idx < _trackInfo._numTracks; ++idx) {
byte *d = _channelData[idx];
- int mode = *d;
+ int mode = *d;
int channelNum = (int8)*(d + 1);
_trkChannel[idx] = channelNum;
assert((channelNum >= -1) && (channelNum < 16));
-
+
if (channelNum >= 0) {
_chProgram[channelNum] = *(d + 10);
_chModulation[channelNum] = 0;
@@ -1841,7 +1841,7 @@ void Sound::_soServiceTrackType0(int trackIndex, const byte *channelData) {
int chFlags = (channelNum == -1) ? 0 : _chFlags[channelNum];
int voiceNum = -1;
SoundDriver *driver = NULL;
-
+
VoiceTypeStruct *vtStruct;
VoiceType voiceType = VOICETYPE_0, chVoiceType = VOICETYPE_0;
@@ -1856,7 +1856,7 @@ void Sound::_soServiceTrackType0(int trackIndex, const byte *channelData) {
voiceType = vtStruct->_voiceType;
if (voiceType == VOICETYPE_0) {
for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
- if (!vtStruct->_entries[idx]._type0._sound &&
+ if (!vtStruct->_entries[idx]._type0._sound &&
(vtStruct->_entries[idx]._type0._channelNum != channelNum)) {
voiceNum = vtStruct->_entries[idx]._voiceNum;
driver = vtStruct->_entries[idx]._driver;
@@ -1870,7 +1870,7 @@ void Sound::_soServiceTrackType0(int trackIndex, const byte *channelData) {
const byte *pData = channelData + _trkIndex[trackIndex];
for (;;) {
- byte v = *pData++;
+ byte v = *pData++;
if (!(v & 0x80)) {
// Area #1
if (!_soundManager->_soTimeIndexFlag) {
@@ -1883,7 +1883,7 @@ void Sound::_soServiceTrackType0(int trackIndex, const byte *channelData) {
driver->proc18(voiceNum, chVoiceType);
}
}
- }
+ }
} else if (!(v & 0x40)) {
// Area #2
if (!_soundManager->_soTimeIndexFlag) {
@@ -1927,7 +1927,7 @@ void Sound::_soServiceTrackType0(int trackIndex, const byte *channelData) {
} else if (!(v & 0x10)) {
// Area #4
v = (v & 0xf) << 1;
-
+
byte b = *pData++;
if (b & 0x80)
v |= 1;
@@ -2023,7 +2023,7 @@ void Sound::_soServiceTrackType0(int trackIndex, const byte *channelData) {
}
}
} else {
- _soSetTrackPos(trackIndex, pData - channelData, program);
+ _soSetTrackPos(trackIndex, pData - channelData, program);
}
} else {
@@ -2173,7 +2173,7 @@ void Sound::_soDoTrackCommand(int channelNum, int command, int value) {
bool Sound::_soDoUpdateTracks(int command, int value) {
if ((command == 76) || (_hold != value))
return false;
-
+
for (int trackIndex = 0; trackIndex < _trackInfo._numTracks; ++trackIndex) {
_trkState[trackIndex] = _trkLoopState[trackIndex];
_trkRest[trackIndex] = _trkLoopRest[trackIndex];
@@ -2225,7 +2225,7 @@ void Sound::_soServiceTrackType1(int trackIndex, const byte *channelData) {
vtStruct->_entries[entryIndex]._type1._field4 = *(channelData + 1);
vtStruct->_entries[entryIndex]._type1._field5 = 0;
- driver->proc32(vtStruct->_entries[entryIndex]._voiceNum, -1, *(channelData + 1), 0x7f);
+ driver->proc32(vtStruct->_entries[entryIndex]._voiceNum, -1, *(channelData + 1), 0x7f);
}
} else {
@@ -2310,7 +2310,7 @@ void ASound::dispatch() {
void ASound::play(int soundNum, Action *action, int volume) {
_action = action;
_cueValue = 0;
-
+
setVol(volume);
_sound.play(soundNum);
}
@@ -2355,14 +2355,14 @@ const byte v440B0[9] = { 0, 1, 2, 6, 7, 8, 12, 13, 14 };
const byte v440B9[9] = { 3, 4, 5, 9, 10, 11, 15, 16, 17 };
-const byte v440C2[18] = {
+const byte v440C2[18] = {
0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21
};
const byte v44134[64] = {
0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 47, 48, 49, 50, 50, 51, 52, 52, 53, 54, 54, 55,
+ 46, 47, 47, 48, 49, 50, 50, 51, 52, 52, 53, 54, 54, 55,
56, 56, 57, 57, 58, 58, 59, 59, 59, 60, 60, 60, 61, 61,
61, 62, 62, 62, 62, 63, 63, 63
};
@@ -2526,7 +2526,7 @@ void AdlibSoundDriver::updateChannelVolume(int channelNum) {
int level1 = !_v44082[channelNum] ? 63 - _v44070[channelNum] :
63 - v44134[volume * _v44070[channelNum] / 63];
- int portNum = v440C2[v440B0[channelNum]] + 0x40;
+ int portNum = v440C2[v440B0[channelNum]] + 0x40;
write(portNum, (_portContents[portNum] & 0x80) | level1);
portNum = v440C2[v440B9[channelNum]] + 0x40;
@@ -2589,7 +2589,7 @@ void AdlibSoundDriver::updateChannel(int channel) {
write(0x80 + portOffset, *(dataP + 27) | (*(dataP + 26) << 4));
write(0xE0 + portOffset, (_portContents[0xE0 + portOffset] & 0xFC) | *(dataP + 28));
- write(0xC0 + channel, (_portContents[0xC0 + channel] & 0xF0)
+ write(0xC0 + channel, (_portContents[0xC0 + channel] & 0xF0)
| (*(dataP + 16) << 1) | *(dataP + 3));
_v44082[channel] = *(dataP + 3);
@@ -2607,7 +2607,7 @@ void AdlibSoundDriver::setFrequency(int channel) {
v -= 0x2000;
if (v == 0x1fff)
v = 0x2000;
-
+
offset = (v / 170) & 3;
ch += (v / 170) >> 2;
@@ -2636,7 +2636,7 @@ void AdlibSoundDriver::setFrequency(int channel) {
int dataWord = v440D4[((ch % 12) << 2) + offset];
write(0xA0 + channel, dataWord & 0xff);
- write(0xB0 + channel, (_portContents[0xB0 + channel] & 0xE0) |
+ write(0xB0 + channel, (_portContents[0xB0 + channel] & 0xE0) |
((dataWord >> 8) & 3) | (var2 << 2));
}
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index 8fcb1c38ff..4cda2cd1d9 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -372,7 +372,7 @@ public:
void mute(bool flag) { _sound.mute(flag); }
void fadeIn() { fade(127, 5, 10, 0, NULL); }
void fadeOut(Action *action) { fade(0, 5, 10, 1, action); }
- void fade(int v1, int v2, int v3, int v4, Action *action);
+ void fade(int v1, int v2, int v3, int v4, Action *action);
void setTimeIndex(uint32 timeIndex) { _sound.setTimeIndex(timeIndex); }
uint32 getTimeIndex() const { return _sound.getTimeIndex(); }
void setPri(int v) { _sound.setPri(v); }