Simon namespace
svn-id: r10574
This commit is contained in:
parent
5fa23e5fee
commit
a4b72c9d6e
16 changed files with 72 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue