aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorEugene Sandulenko2005-07-30 21:11:48 +0000
committerEugene Sandulenko2005-07-30 21:11:48 +0000
commit6b4484472b79dc7ea7d1ce545a28fba7d3b7696f (patch)
treec44c4e61f18ddd537f7082cb48869cf33d422fbd /simon
parent86ab70b149e5cd00cf54f2e41896e2c4e16795e4 (diff)
downloadscummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.gz
scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.bz2
scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.zip
Remove trailing whitespaces.
svn-id: r18604
Diffstat (limited to 'simon')
-rw-r--r--simon/charset.cpp6
-rw-r--r--simon/cursor.cpp2
-rw-r--r--simon/debug.cpp10
-rw-r--r--simon/debugger.cpp8
-rw-r--r--simon/intern.h6
-rw-r--r--simon/items.cpp6
-rw-r--r--simon/midi.cpp2
-rw-r--r--simon/saveload.cpp4
-rw-r--r--simon/simon.cpp68
-rw-r--r--simon/simon.h8
-rw-r--r--simon/sound.cpp8
-rw-r--r--simon/sound.h2
-rw-r--r--simon/verb.cpp2
-rw-r--r--simon/vga.cpp6
14 files changed, 69 insertions, 69 deletions
diff --git a/simon/charset.cpp b/simon/charset.cpp
index 6d938c333e..d7470a8a6f 100644
--- a/simon/charset.cpp
+++ b/simon/charset.cpp
@@ -172,7 +172,7 @@ void SimonEngine::render_string(uint vga_sprite_id, uint color, uint width, uint
WRITE_BE_UINT16(p + 4, height);
WRITE_BE_UINT16(p + 6, width);
-
+
dst += READ_BE_UINT32(p);
memset(dst, 0, count);
@@ -307,7 +307,7 @@ void SimonEngine::video_putchar(FillOrCopyStruct *fcs, byte c, byte b) {
width = _hebrew_char_widths [b - 64];
if (fcs->textLength != 0) {
- fcs->textLength--;
+ fcs->textLength--;
fcs->textColumnOffset += width;
if (fcs->textColumnOffset >= 8) {
fcs->textColumnOffset -= 8;
@@ -912,7 +912,7 @@ static const byte spanish_video_font[] = {
112, 136, 136, 120, 8, 16, 96, 0,
0, 0, 48, 48, 0, 48, 48, 0,
32, 64, 0, 112, 8, 248, 120, 0,
- 32, 64, 0, 192, 64, 64, 224, 0,
+ 32, 64, 0, 192, 64, 64, 224, 0,
32, 64, 0, 112, 136, 136, 112, 0,
32, 64, 0, 144, 144, 144, 104, 0,
112, 136, 8, 16, 32, 0, 32, 0,
diff --git a/simon/cursor.cpp b/simon/cursor.cpp
index cc66507405..612f960467 100644
--- a/simon/cursor.cpp
+++ b/simon/cursor.cpp
@@ -84,7 +84,7 @@ static const byte _simon2_cursors[10][256] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xeb,0xe4,0xef,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xef,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff },
- // pick up
+ // pick up
{ 0xff,0xff,0xff,0xff,0xff,0xe5,0xe5,0xe5,0xe5,0xe5,0xe5,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xe5,0xe6,0xe6,0xe7,0xe7,0xe6,0xe6,0xe5,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xe5,0xe7,0xe7,0xe7,0xe7,0xe8,0xe8,0xe8,0xe8,0xe5,0xff,0xff,0xff,
diff --git a/simon/debug.cpp b/simon/debug.cpp
index 743783b5cb..4359d6c72a 100644
--- a/simon/debug.cpp
+++ b/simon/debug.cpp
@@ -191,7 +191,7 @@ void SimonEngine::dump_video_script(const byte *src, bool one_opcode_only) {
} else {
strn = str = simon2_video_opcode_name_table[opcode];
}
-
+
while (*strn != '|')
strn++;
fprintf(_dumpFile, "%.2d: %s ", opcode, strn + 1);
@@ -375,10 +375,10 @@ void pal_load(byte *pal, const byte *vga1, int a, int b) {
uint num = (a == 0) ? 0x20 : 0x10;
byte *palptr;
const byte *src;
-
+
palptr = (byte *)&pal[a << 4];
src = vga1 + 6 + b * 96;
-
+
do {
palptr[0] = src[0] << 2;
palptr[1] = src[1] << 2;
@@ -406,7 +406,7 @@ void SimonEngine::dump_vga_bitmaps(const byte *vga, byte *vga1, int res) {
}
int width, height, flags;
-
+
i = 538;
for (i = 1; ; i++) {
@@ -417,7 +417,7 @@ void SimonEngine::dump_vga_bitmaps(const byte *vga, byte *vga1, int res) {
* assume the end when offset >= 200kb */
if (offs >= 200*1024)
return;
-
+
width = READ_BE_UINT16(p2 + 6);
height = p2[5];
flags = p2[4];
diff --git a/simon/debugger.cpp b/simon/debugger.cpp
index 44bf9be047..53b3195630 100644
--- a/simon/debugger.cpp
+++ b/simon/debugger.cpp
@@ -27,10 +27,10 @@
namespace Simon {
-Debugger::Debugger(SimonEngine *vm)
+Debugger::Debugger(SimonEngine *vm)
: Common::Debugger<Debugger>() {
_vm = vm;
-
+
DCmd_Register("continue", &Debugger::Cmd_Exit);
DCmd_Register("exit", &Debugger::Cmd_Exit);
DCmd_Register("help", &Debugger::Cmd_Help);
@@ -58,9 +58,9 @@ void Debugger::postEnter() {
bool Debugger::Cmd_Exit(int argc, const char **argv) {
_detach_now = true;
- return false;
+ return false;
}
-
+
bool Debugger::Cmd_Help(int argc, const char **argv) {
// console normally has 39 line width
// wrap around nicely
diff --git a/simon/intern.h b/simon/intern.h
index 3b871892b4..a9fcbadff8 100644
--- a/simon/intern.h
+++ b/simon/intern.h
@@ -60,7 +60,7 @@ struct Item {
uint16 unk4;
uint16 xxx_1; /* unused? */
Child *children;
-
+
Item() { memset(this, 0, sizeof(*this)); }
};
@@ -95,7 +95,7 @@ struct FillOrCopyStruct {
FillOrCopyData *fcs_data;
FillOrCopyStruct() { memset(this, 0, sizeof(*this)); }
};
-// note on text offset:
+// note on text offset:
// the actual x-coordinate is: textColumn * 8 + textColumnOffset
// the actual y-coordinate is: textRow * 8
@@ -142,7 +142,7 @@ struct GameSpecificSettings {
const char mp3_effects_filename[12];
const char vorbis_effects_filename[12];
const char flac_effects_filename[12];
- const char gamepc_filename[12];
+ const char gamepc_filename[12];
#endif
};
diff --git a/simon/items.cpp b/simon/items.cpp
index a03f8fa33c..1a615dae43 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -977,7 +977,7 @@ int SimonEngine::runScript() {
const char *string_ptr = (const char *)getStringPtrByID(_stringIdArray3[string_id]);
TextLocation *tl = getTextLocation(vgaSpriteId);
- if (_game & GF_TALKIE)
+ if (_game & GF_TALKIE)
speech_id = _speechIdArray4[string_id];
if (_speech && speech_id != 0)
@@ -1491,7 +1491,7 @@ void SimonEngine::o_clear_character(FillOrCopyStruct *fcs, int x, byte b) {
if (_language == 20) { //Hebrew
x = 128;
- } else {
+ } else {
x += 120;
if (x != 128)
x = 129;
@@ -1522,7 +1522,7 @@ void SimonEngine::o_play_music_resource() {
midi.setLoop (loop != 0);
if (_lastMusicPlayed != music)
_nextMusicToPlay = music;
- else
+ else
midi.startTrack (track);
} else {
if (music != _lastMusicPlayed) {
diff --git a/simon/midi.cpp b/simon/midi.cpp
index 1968f02135..6b7088b540 100644
--- a/simon/midi.cpp
+++ b/simon/midi.cpp
@@ -42,7 +42,7 @@ MidiPlayer::MidiPlayer(OSystem *system) {
_driver = 0;
_map_mt32_to_gm = false;
_passThrough = false;
-
+
_enable_sfx = true;
_current = 0;
diff --git a/simon/saveload.cpp b/simon/saveload.cpp
index 56d4207f50..a9c35438df 100644
--- a/simon/saveload.cpp
+++ b/simon/saveload.cpp
@@ -359,7 +359,7 @@ void SimonEngine::o_file_error(FillOrCopyStruct *fcs, bool save_error) {
} else {
string = "\r Load failed.";
string2 = "\r File not found.";
- }
+ }
video_putchar(fcs, 0xC);
for (; *string; string++)
@@ -589,7 +589,7 @@ bool SimonEngine::load_game(uint slot) {
// Write the bits in array 1 & 2
for (i = 0; i != 32; i++)
_bitArray[i] = f->readUint16BE();
-
+
if (f->ioFailed()) {
error("load failed");
}
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 0c632b172f..b62c67a5e1 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -74,7 +74,7 @@ static const SimonGameSettings simon_settings[] = {
{"simon2win", "Simon the Sorcerer 2 Talkie (Windows)", GAME_SIMON2WIN, 0},
{"simon2mac", "Simon the Sorcerer 2 Talkie (Amiga or Mac)", GAME_SIMON2WIN, 0},
{"simon1cd32", "Simon the Sorcerer 1 Talkie (Amiga CD32)", GAME_SIMON1CD32, "gameamiga"},
- {"simon1demo", "Simon the Sorcerer 1 (DOS Demo)", GAME_SIMON1DEMO, "GDEMO"},
+ {"simon1demo", "Simon the Sorcerer 1 (DOS Demo)", GAME_SIMON1DEMO, "GDEMO"},
{NULL, NULL, 0, NULL}
};
@@ -275,7 +275,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
_vcPtr = 0;
_vc_get_out_of_code = 0;
_gameOffsetsPtr = 0;
-
+
const SimonGameSettings *g = simon_settings;
while (g->name) {
if (!scumm_stricmp(detector->_game.name, g->name))
@@ -305,11 +305,11 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
// Convert older targets
if (g->detectname == NULL) {
if (!strcmp("simon1win", g->name)) {
- ConfMan.set("gameid", "simon1talkie");
- ConfMan.set("platform", "Windows");
+ ConfMan.set("gameid", "simon1talkie");
+ ConfMan.set("platform", "Windows");
} else if (!strcmp("simon2win", g->name) || !strcmp("simon2mac", g->name)) {
- ConfMan.set("gameid", "simon2talkie");
- ConfMan.set("platform", "Windows");
+ ConfMan.set("gameid", "simon2talkie");
+ ConfMan.set("platform", "Windows");
}
ConfMan.flushToDisk();
} else {
@@ -321,7 +321,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
f.open(buf);
if (f.isOpen() == false)
strcat(buf, ".");
-
+
if (Common::md5_file(buf, md5sum)) {
char md5str[32+1];
for (j = 0; j < 16; j++) {
@@ -427,7 +427,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
_keyPressed = 0;
_gameFile = 0;
-
+
_strippedTxtMem = 0;
_textSize = 0;
_stringTabNum = 0;
@@ -547,14 +547,14 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
_firstTimeStruct = 0;
_pendingDeleteTimeEvent = 0;
-
+
_base_time = 0;
_mouseX = 0;
_mouseY = 0;
_mouseXOld = 0;
_mouseYOld = 0;
-
+
_dummyItem1 = new Item();
_dummyItem2 = new Item();
_dummyItem3 = new Item();
@@ -623,7 +623,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
memset(_fcsData2, 0, sizeof(_fcsData2));
_freeStringSlot = 0;
-
+
memset(_stringReturnBuffer, 0, sizeof(_stringReturnBuffer));
memset(_pathFindArray, 0, sizeof(_pathFindArray));
@@ -660,7 +660,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
_sdlMouseX = 0;
_sdlMouseY = 0;
-
+
_sdl_buf_3 = 0;
_sdl_buf = 0;
_sdl_buf_attached = 0;
@@ -731,7 +731,7 @@ int SimonEngine::init(GameDetector &detector) {
// FIXME Use auto dirty rects cleanup code to reduce CPU usage
g_system->setFeatureState(OSystem::kFeatureAutoComputeDirtyRects, true);
-
+
return 0;
}
@@ -751,9 +751,9 @@ SimonEngine::~SimonEngine() {
delete _dummyItem1;
delete _dummyItem2;
delete _dummyItem3;
-
+
delete [] _fcs_list;
-
+
delete _sound;
delete _debugger;
}
@@ -1684,7 +1684,7 @@ void SimonEngine::startSubroutine170() {
Subroutine *sub;
_sound->stopVoice();
-
+
sub = getSubroutineByID(170);
if (sub != NULL)
startSubroutineEx(sub);
@@ -1976,7 +1976,7 @@ void SimonEngine::f10_key() {
uint b, color;
_lockWord |= 0x8000;
-
+
if (_game & GF_SIMON2)
color = 0xec;
else
@@ -2094,7 +2094,7 @@ startOver:
if (_lastHitArea3 != 0)
break;
hitarea_stuff_helper();
- delay(100);
+ delay(100);
}
ha = _lastHitArea;
@@ -2662,7 +2662,7 @@ void SimonEngine::add_vga_timer(uint num, const byte *code_ptr, uint cur_sprite,
// When Simon talks to the Golum about stew in French version of
// Simon the Sorcerer 1 the code_ptr is at wrong location for
- // sprite 200. This was a bug in the original game, which
+ // sprite 200. This was a bug in the original game, which
// caused several glitches in this scene.
// We work around the problem by correcting the code_ptr for sprite
// 200 in this scene, if it is wrong.
@@ -2941,7 +2941,7 @@ void SimonEngine::o_vga_reset() {
_lockWord |= 0x4000;
vc27_resetSprite();
_lockWord &= ~0x4000;
- }
+ }
}
bool SimonEngine::itemIsSiblingOf(uint16 a) {
@@ -3307,7 +3307,7 @@ void SimonEngine::processSpecialKeys() {
_dumpImages ^=1;
break;
}
-
+
_keyPressed = 0;
}
@@ -3558,13 +3558,13 @@ void SimonEngine::talk_with_text(uint vgaSpriteId, uint color, const char *strin
render_string_amiga(vgaSpriteId, color, width, height, convertedString);
else
render_string(vgaSpriteId, color, width, height, convertedString);
-
+
int b = 4;
if (!(_bitArray[8] & 0x20))
b = 3;
x >>= 3;
-
+
if (y < 2)
y = 2;
@@ -3696,17 +3696,17 @@ void SimonEngine::read_vga_from_datfile_1(uint vga_id) {
File in;
char buf[15];
uint32 size;
- if (vga_id == 23)
+ if (vga_id == 23)
vga_id = 112;
if (vga_id == 328)
vga_id = 119;
if (_game == GAME_SIMON1CD32) {
- sprintf(buf, "0%d.out", vga_id);
+ sprintf(buf, "0%d.out", vga_id);
} else if (_game == GAME_SIMON1AMIGA) {
sprintf(buf, "0%d.pkd", vga_id);
} else {
- sprintf(buf, "0%d.VGA", vga_id);
+ sprintf(buf, "0%d.VGA", vga_id);
}
in.open(buf);
@@ -3816,7 +3816,7 @@ void SimonEngine::openGameFile() {
loadIconFile();
vc34_forceLock();
-
+
runSubroutine101();
startUp_helper_2();
}
@@ -4022,7 +4022,7 @@ int SimonEngine::go() {
_lastMusicPlayed = -1;
_vgaBaseDelay = 1;
-
+
_startMainScript = false;
_continousMainScript = false;
_startVgaScript = false;
@@ -4040,7 +4040,7 @@ int SimonEngine::go() {
if (_game & GF_TALKIE) {
// English and German versions of Simon the Sorcerer 1 don't have full subtitles
- if (!(_game & GF_SIMON2) && _language < 2)
+ if (!(_game & GF_SIMON2) && _language < 2)
_subtitles = false;
} else {
_subtitles = true;
@@ -4051,7 +4051,7 @@ int SimonEngine::go() {
handle_verb_clicked(_verbHitArea);
delay(100);
}
-
+
return 0;
}
@@ -4205,11 +4205,11 @@ void SimonEngine::loadMusic (uint music) {
midi.stop();
midi.setLoop (true); // Must do this BEFORE loading music. (GMF may have its own override.)
- if (_game & GF_TALKIE) {
+ if (_game & GF_TALKIE) {
// FIXME: The very last music resource, a cymbal crash for when the
- // two demons crash into each other, should NOT be looped like the
- // other music tracks. In simon1dos/talkie the GMF resource includes
- // a loop override that acomplishes this, but there seems to be nothing
+ // two demons crash into each other, should NOT be looped like the
+ // other music tracks. In simon1dos/talkie the GMF resource includes
+ // a loop override that acomplishes this, but there seems to be nothing
// for this in the SMF resources.
if (music == 35)
midi.setLoop (false);
diff --git a/simon/simon.h b/simon/simon.h
index 537554e513..3a19714f77 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -102,7 +102,7 @@ struct VgaTimerEntry {
};
struct GameSpecificSettings;
-
+
class Debugger;
class SimonEngine : public Engine {
@@ -111,7 +111,7 @@ class SimonEngine : public Engine {
void errorString(const char *buf_input, char *buf_output);
protected:
void playSting(uint a);
-
+
const byte *_vcPtr; /* video code ptr */
uint16 _vc_get_out_of_code;
@@ -139,7 +139,7 @@ protected:
} SoundFormat;
Common::File *_gameFile;
-
+
byte *_strippedTxtMem;
uint _textSize;
uint _stringTabNum, _stringTabPos, _stringtab_numalloc;
@@ -361,7 +361,7 @@ protected:
char _saveLoadName[32];
int _sdlMouseX, _sdlMouseY;
-
+
byte *_sdl_buf_3;
byte *_sdl_buf;
byte *_sdl_buf_attached;
diff --git a/simon/sound.cpp b/simon/sound.cpp
index 12f6948151..606328366d 100644
--- a/simon/sound.cpp
+++ b/simon/sound.cpp
@@ -118,7 +118,7 @@ BaseSound::~BaseSound() {
free(_offsets);
delete _file;
}
-
+
void WavSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags) {
if (_offsets == NULL)
return;
@@ -354,7 +354,7 @@ Sound::Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mix
Sound::~Sound() {
delete _voice;
delete _effects;
-
+
free(_filenums);
free(_offsets);
}
@@ -434,7 +434,7 @@ void Sound::playVoice(uint sound) {
if (file->isOpen() == false) {
warning("playVoice: Can't load voice file %s", filename);
return;
- }
+ }
delete _voice;
_voice = new WavSound(_mixer, file, _offsets);
}
@@ -450,7 +450,7 @@ void Sound::playVoice(uint sound) {
void Sound::playEffects(uint sound) {
if (!_effects)
return;
-
+
if (_effectsPaused)
return;
diff --git a/simon/sound.h b/simon/sound.h
index 641d90d2d0..89c41e89ac 100644
--- a/simon/sound.h
+++ b/simon/sound.h
@@ -55,7 +55,7 @@ private:
public:
Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mixer);
~Sound();
-
+
void readSfxFile(const char *filename);
void loadSfxTable(Common::File *gameFile, uint32 base);
void readVoiceFile(const char *filename);
diff --git a/simon/verb.cpp b/simon/verb.cpp
index 4f97a8054e..1d629d468e 100644
--- a/simon/verb.cpp
+++ b/simon/verb.cpp
@@ -572,7 +572,7 @@ bool SimonEngine::hitarea_proc_3(Item *item) {
else
x = 0;
showActionString(x, string_ptr);
-
+
return true;
}
diff --git a/simon/vga.cpp b/simon/vga.cpp
index b811a5e5b1..13b2dfa3d4 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -378,7 +378,7 @@ void SimonEngine::vc7_skip_if_sib_with_a() {
vc_skip_next_instruction();
}
-void SimonEngine::vc8_skip_if_parent_is() {
+void SimonEngine::vc8_skip_if_parent_is() {
uint a = vc_read_next_word();
uint b = vc_read_next_word();
if (!itemIsParentOf(a, b))
@@ -1101,7 +1101,7 @@ void SimonEngine::vc19_chain_to_script() {
/* helper routines */
void SimonEngine::vc20_set_code_word() {
- /* FIXME: This opcode is somewhat strange: it first reads a BE word from
+ /* FIXME: This opcode is somewhat strange: it first reads a BE word from
* the script (advancing the script pointer in doing so); then it writes
* back the same word, this time as LE, into the script.
*/
@@ -1695,7 +1695,7 @@ void SimonEngine::vc62_fadeOut() {
byte *old_file_1 = _curVgaFile1;
byte *old_file_2 = _curVgaFile2;
uint palmode = _videoPaletteMode;
-
+
vpe = &_vgaBufferPointers[vsp->fileId];
_curVgaFile1 = vpe->vgaFile1;
_curVgaFile2 = vpe->vgaFile2;