aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--simon/charset.cpp4
-rw-r--r--simon/debug.cpp3
-rw-r--r--simon/debug.h9
-rw-r--r--simon/intern.h4
-rw-r--r--simon/items.cpp4
-rw-r--r--simon/midi.cpp6
-rw-r--r--simon/midi.h4
-rw-r--r--simon/midiparser_s1d.cpp4
-rw-r--r--simon/res.cpp4
-rw-r--r--simon/simon.cpp6
-rw-r--r--simon/simon.h4
-rw-r--r--simon/sound.cpp4
-rw-r--r--simon/sound.h8
-rw-r--r--simon/verb.cpp4
-rw-r--r--simon/vga.cpp4
-rw-r--r--simon/vga.h3
16 files changed, 72 insertions, 3 deletions
diff --git a/simon/charset.cpp b/simon/charset.cpp
index 9bb8665c93..a9cc31cb3f 100644
--- a/simon/charset.cpp
+++ b/simon/charset.cpp
@@ -23,6 +23,8 @@
#include "simon/simon.h"
#include "simon/intern.h"
+namespace Simon {
+
void SimonEngine::print_char_helper_1(const byte *src, uint len) {
uint ind;
@@ -931,4 +933,4 @@ void SimonEngine::video_putchar_drawchar(FillOrCopyStruct *fcs, uint x, uint y,
_lock_word &= ~0x8000;
}
-
+} // End of namespace Simon
diff --git a/simon/debug.cpp b/simon/debug.cpp
index 0077b9f7ed..c594b6385b 100644
--- a/simon/debug.cpp
+++ b/simon/debug.cpp
@@ -30,6 +30,8 @@
#include <sys/stat.h>
#endif
+namespace Simon {
+
byte *SimonEngine::dumpOpcode(byte *p) {
byte opcode;
const char *s, *st;
@@ -455,3 +457,4 @@ void SimonEngine::dump_vga_script(byte *ptr, uint res, uint sprite_id) {
dump_vga_script_always(ptr, res, sprite_id);
}
+} // End of namespace Simon
diff --git a/simon/debug.h b/simon/debug.h
index 5824a5dc55..0d26a04200 100644
--- a/simon/debug.h
+++ b/simon/debug.h
@@ -17,6 +17,11 @@
*
*/
+#ifndef SIMON_DEBUG_H
+#define SIMON_DEBUG_H
+
+namespace Simon {
+
static const char *const simon1dos_opcode_name_table[256] = {
/* 0 */
"|INV_COND",
@@ -1157,3 +1162,7 @@ const char *const simon2_video_opcode_name_table[] = {
"bb|CLEAR_OP189_FLAG",
};
+} // End of namespace Simon
+
+#endif
+
diff --git a/simon/intern.h b/simon/intern.h
index 84570bf1e0..b47b78ca14 100644
--- a/simon/intern.h
+++ b/simon/intern.h
@@ -22,6 +22,8 @@
#ifndef SIMON_INTERN_H
#define SIMON_INTERN_H
+namespace Simon {
+
struct Child {
Child *next;
uint16 type;
@@ -134,6 +136,8 @@ struct GameSpecificSettings {
const char *gamepc_filename;
};
+} // End of namespace Simon
+
enum {
GF_SIMON2 = 1 << 0,
GF_WIN = 1 << 1,
diff --git a/simon/items.cpp b/simon/items.cpp
index 02d738041b..3c2e647420 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -32,6 +32,8 @@ extern void force_keyboard(bool);
#endif
+namespace Simon {
+
int SimonEngine::runScript() {
byte opcode;
bool flag, condition;
@@ -1601,3 +1603,5 @@ void SimonEngine::o_unk26_helper(uint a, uint b, uint c, uint d, uint e, uint f,
showmessage_helper_3(_fcs_ptr_1->textLength, _fcs_ptr_1->textMaxLength);
}
}
+
+} // End of namespace Simon
diff --git a/simon/midi.cpp b/simon/midi.cpp
index 04bf64c4da..dc8644e0e7 100644
--- a/simon/midi.cpp
+++ b/simon/midi.cpp
@@ -27,13 +27,15 @@
#include "sound/mixer.h"
#include "simon/simon.h"
+namespace Simon {
+
+
// MidiParser_S1D is not considered part of the standard
// MidiParser suite, but we still try to mask its details
// and just provide a factory function.
extern MidiParser *MidiParser_createS1D();
-
// Instrument mapping for MT32 tracks emulated under GM.
static const byte mt32_to_gm[128] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
@@ -555,3 +557,5 @@ void MidiPlayer::loadS1D (File *in, bool sfx) {
p->parser = parser; // That plugs the power cord into the wall
_system->unlock_mutex(_mutex);
}
+
+} // End of namespace Simon
diff --git a/simon/midi.h b/simon/midi.h
index 331bbce02f..5d87fcaf56 100644
--- a/simon/midi.h
+++ b/simon/midi.h
@@ -28,6 +28,8 @@
class File;
class OSystem;
+namespace Simon {
+
struct MusicInfo {
MidiParser *parser;
byte * data;
@@ -116,4 +118,6 @@ public:
MidiChannel *getPercussionChannel() { return 0; }
};
+} // End of namespace Simon
+
#endif
diff --git a/simon/midiparser_s1d.cpp b/simon/midiparser_s1d.cpp
index ffe51cd441..ba844fe4b2 100644
--- a/simon/midiparser_s1d.cpp
+++ b/simon/midiparser_s1d.cpp
@@ -26,6 +26,8 @@
#include <stdio.h>
+namespace Simon {
+
//////////////////////////////////////////////////
//
// Simon 1 Demo version of MidiParser
@@ -160,3 +162,5 @@ void MidiParser_S1D::resetTracking() {
}
MidiParser *MidiParser_createS1D() { return new MidiParser_S1D; }
+
+} // End of namespace Simon
diff --git a/simon/res.cpp b/simon/res.cpp
index cd8183f53a..9cb116afc3 100644
--- a/simon/res.cpp
+++ b/simon/res.cpp
@@ -25,6 +25,8 @@
#include "simon/simon.h"
#include "simon/intern.h"
+namespace Simon {
+
// Script opcodes to load into memory
static const char *const opcode_arg_table_simon1win[256] = {
" ", "I ", "I ", "I ", "I ", "I ", "I ", "II ", "II ", "II ", "II ", "B ", "B ", "BN ", "BN ",
@@ -343,3 +345,5 @@ byte *SimonEngine::readSingleOpcode(File *in, byte *ptr) {
}
}
}
+
+} // End of namespace Simon
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 4a1e01b199..c26f84f689 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -67,11 +67,13 @@ const TargetSettings *Engine_SIMON_targetList() {
}
Engine *Engine_SIMON_create(GameDetector *detector, OSystem *syst) {
- return new SimonEngine(detector, syst);
+ return new Simon::SimonEngine(detector, syst);
}
REGISTER_PLUGIN("Simon the Sorcerer", Engine_SIMON_targetList, Engine_SIMON_create);
+namespace Simon {
+
static const GameSpecificSettings simon1_settings = {
1, // VGA_DELAY_BASE
1576 / 4, // TABLE_INDEX_BASE
@@ -5064,3 +5066,5 @@ void SimonEngine::set_volume(byte volume) {
byte SimonEngine::getByte() {
return *_code_ptr++;
}
+
+} // End of namespace Simon
diff --git a/simon/simon.h b/simon/simon.h
index 173b327d49..e9a4ce92c0 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -29,6 +29,8 @@
#include "sound/mixer.h"
#include "simon/sound.h"
+namespace Simon {
+
/* Various other settings */
//#define DUMP_FILE_NR 8
//#define DUMP_BITMAPS_FILE_NR 8
@@ -800,4 +802,6 @@ protected:
void palette_fadeout(uint32 *pal_values, uint num);
+} // End of namespace Simon
+
#endif
diff --git a/simon/sound.cpp b/simon/sound.cpp
index 5c559a8160..7ded523a17 100644
--- a/simon/sound.cpp
+++ b/simon/sound.cpp
@@ -23,6 +23,8 @@
#include "simon/sound.h"
#include "sound/voc.h"
+namespace Simon {
+
#define SOUND_BIG_ENDIAN true
class BaseSound {
@@ -482,3 +484,5 @@ void SimonSound::ambientPause(bool b) {
playAmbient(tmp);
}
}
+
+} // End of namespace Simon
diff --git a/simon/sound.h b/simon/sound.h
index d6faaff251..52882ea2f6 100644
--- a/simon/sound.h
+++ b/simon/sound.h
@@ -17,9 +17,14 @@
*
*/
+#ifndef SIMON_SOUND_H
+#define SIMON_SOUND_H
+
#include "sound/mixer.h"
#include "simon/intern.h"
+namespace Simon {
+
class BaseSound;
class SimonSound {
@@ -67,3 +72,6 @@ public:
void ambientPause(bool b);
};
+} // End of namespace Simon
+
+#endif
diff --git a/simon/verb.cpp b/simon/verb.cpp
index dcc89b9885..108ce5406c 100644
--- a/simon/verb.cpp
+++ b/simon/verb.cpp
@@ -24,6 +24,8 @@
#include "simon/simon.h"
#include "simon/intern.h"
+namespace Simon {
+
static const char *const verb_names[] = {
"Walk to",
"Look at",
@@ -455,3 +457,5 @@ bool SimonEngine::hitarea_proc_3(Item *item) {
return true;
}
+
+} // End of namespace Simon
diff --git a/simon/vga.cpp b/simon/vga.cpp
index 22d5c78ef1..8c57bd03ec 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -25,6 +25,8 @@
#include "simon/intern.h"
#include "simon/vga.h"
+namespace Simon {
+
typedef void (SimonEngine::*VgaOpcodeProc) ();
static uint16 vc_get_out_of_code = 0;
@@ -1905,3 +1907,5 @@ void SimonEngine::vc_74_clear_op189_flag() {
vc_read_next_byte();
_op_189_flags &= ~(1 << vc_read_next_byte());
}
+
+} // End of namespace Simon
diff --git a/simon/vga.h b/simon/vga.h
index a0d87cfd1e..e65a46595b 100644
--- a/simon/vga.h
+++ b/simon/vga.h
@@ -22,6 +22,8 @@
#ifndef SIMON_VGA_H
#define SIMON_VGA_H
+namespace Simon {
+
struct VgaFile1Header {
uint16 x_1, x_2;
uint16 hdr2_start;
@@ -79,5 +81,6 @@ struct VC10_state {
byte *vc_10_depack_column(VC10_state *vs);
+} // End of namespace Simon
#endif