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/simon.h"
|
||||||
#include "simon/intern.h"
|
#include "simon/intern.h"
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
void SimonEngine::print_char_helper_1(const byte *src, uint len) {
|
void SimonEngine::print_char_helper_1(const byte *src, uint len) {
|
||||||
uint ind;
|
uint ind;
|
||||||
|
|
||||||
|
@ -931,4 +933,4 @@ void SimonEngine::video_putchar_drawchar(FillOrCopyStruct *fcs, uint x, uint y,
|
||||||
_lock_word &= ~0x8000;
|
_lock_word &= ~0x8000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
byte *SimonEngine::dumpOpcode(byte *p) {
|
byte *SimonEngine::dumpOpcode(byte *p) {
|
||||||
byte opcode;
|
byte opcode;
|
||||||
const char *s, *st;
|
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);
|
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] = {
|
static const char *const simon1dos_opcode_name_table[256] = {
|
||||||
/* 0 */
|
/* 0 */
|
||||||
"|INV_COND",
|
"|INV_COND",
|
||||||
|
@ -1157,3 +1162,7 @@ const char *const simon2_video_opcode_name_table[] = {
|
||||||
"bb|CLEAR_OP189_FLAG",
|
"bb|CLEAR_OP189_FLAG",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#ifndef SIMON_INTERN_H
|
#ifndef SIMON_INTERN_H
|
||||||
#define SIMON_INTERN_H
|
#define SIMON_INTERN_H
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
struct Child {
|
struct Child {
|
||||||
Child *next;
|
Child *next;
|
||||||
uint16 type;
|
uint16 type;
|
||||||
|
@ -134,6 +136,8 @@ struct GameSpecificSettings {
|
||||||
const char *gamepc_filename;
|
const char *gamepc_filename;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
GF_SIMON2 = 1 << 0,
|
GF_SIMON2 = 1 << 0,
|
||||||
GF_WIN = 1 << 1,
|
GF_WIN = 1 << 1,
|
||||||
|
|
|
@ -32,6 +32,8 @@ extern void force_keyboard(bool);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
int SimonEngine::runScript() {
|
int SimonEngine::runScript() {
|
||||||
byte opcode;
|
byte opcode;
|
||||||
bool flag, condition;
|
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);
|
showmessage_helper_3(_fcs_ptr_1->textLength, _fcs_ptr_1->textMaxLength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
|
@ -27,13 +27,15 @@
|
||||||
#include "sound/mixer.h"
|
#include "sound/mixer.h"
|
||||||
#include "simon/simon.h"
|
#include "simon/simon.h"
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
|
|
||||||
// MidiParser_S1D is not considered part of the standard
|
// MidiParser_S1D is not considered part of the standard
|
||||||
// MidiParser suite, but we still try to mask its details
|
// MidiParser suite, but we still try to mask its details
|
||||||
// and just provide a factory function.
|
// and just provide a factory function.
|
||||||
extern MidiParser *MidiParser_createS1D();
|
extern MidiParser *MidiParser_createS1D();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Instrument mapping for MT32 tracks emulated under GM.
|
// Instrument mapping for MT32 tracks emulated under GM.
|
||||||
static const byte mt32_to_gm[128] = {
|
static const byte mt32_to_gm[128] = {
|
||||||
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
// 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
|
p->parser = parser; // That plugs the power cord into the wall
|
||||||
_system->unlock_mutex(_mutex);
|
_system->unlock_mutex(_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
class File;
|
class File;
|
||||||
class OSystem;
|
class OSystem;
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
struct MusicInfo {
|
struct MusicInfo {
|
||||||
MidiParser *parser;
|
MidiParser *parser;
|
||||||
byte * data;
|
byte * data;
|
||||||
|
@ -116,4 +118,6 @@ public:
|
||||||
MidiChannel *getPercussionChannel() { return 0; }
|
MidiChannel *getPercussionChannel() { return 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Simon 1 Demo version of MidiParser
|
// Simon 1 Demo version of MidiParser
|
||||||
|
@ -160,3 +162,5 @@ void MidiParser_S1D::resetTracking() {
|
||||||
}
|
}
|
||||||
|
|
||||||
MidiParser *MidiParser_createS1D() { return new MidiParser_S1D; }
|
MidiParser *MidiParser_createS1D() { return new MidiParser_S1D; }
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
#include "simon/simon.h"
|
#include "simon/simon.h"
|
||||||
#include "simon/intern.h"
|
#include "simon/intern.h"
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
// Script opcodes to load into memory
|
// Script opcodes to load into memory
|
||||||
static const char *const opcode_arg_table_simon1win[256] = {
|
static const char *const opcode_arg_table_simon1win[256] = {
|
||||||
" ", "I ", "I ", "I ", "I ", "I ", "I ", "II ", "II ", "II ", "II ", "B ", "B ", "BN ", "BN ",
|
" ", "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) {
|
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);
|
REGISTER_PLUGIN("Simon the Sorcerer", Engine_SIMON_targetList, Engine_SIMON_create);
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
static const GameSpecificSettings simon1_settings = {
|
static const GameSpecificSettings simon1_settings = {
|
||||||
1, // VGA_DELAY_BASE
|
1, // VGA_DELAY_BASE
|
||||||
1576 / 4, // TABLE_INDEX_BASE
|
1576 / 4, // TABLE_INDEX_BASE
|
||||||
|
@ -5064,3 +5066,5 @@ void SimonEngine::set_volume(byte volume) {
|
||||||
byte SimonEngine::getByte() {
|
byte SimonEngine::getByte() {
|
||||||
return *_code_ptr++;
|
return *_code_ptr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include "sound/mixer.h"
|
#include "sound/mixer.h"
|
||||||
#include "simon/sound.h"
|
#include "simon/sound.h"
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
/* Various other settings */
|
/* Various other settings */
|
||||||
//#define DUMP_FILE_NR 8
|
//#define DUMP_FILE_NR 8
|
||||||
//#define DUMP_BITMAPS_FILE_NR 8
|
//#define DUMP_BITMAPS_FILE_NR 8
|
||||||
|
@ -800,4 +802,6 @@ protected:
|
||||||
|
|
||||||
void palette_fadeout(uint32 *pal_values, uint num);
|
void palette_fadeout(uint32 *pal_values, uint num);
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
#include "simon/sound.h"
|
#include "simon/sound.h"
|
||||||
#include "sound/voc.h"
|
#include "sound/voc.h"
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
#define SOUND_BIG_ENDIAN true
|
#define SOUND_BIG_ENDIAN true
|
||||||
|
|
||||||
class BaseSound {
|
class BaseSound {
|
||||||
|
@ -482,3 +484,5 @@ void SimonSound::ambientPause(bool b) {
|
||||||
playAmbient(tmp);
|
playAmbient(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
|
@ -17,9 +17,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef SIMON_SOUND_H
|
||||||
|
#define SIMON_SOUND_H
|
||||||
|
|
||||||
#include "sound/mixer.h"
|
#include "sound/mixer.h"
|
||||||
#include "simon/intern.h"
|
#include "simon/intern.h"
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
class BaseSound;
|
class BaseSound;
|
||||||
|
|
||||||
class SimonSound {
|
class SimonSound {
|
||||||
|
@ -67,3 +72,6 @@ public:
|
||||||
void ambientPause(bool b);
|
void ambientPause(bool b);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include "simon/simon.h"
|
#include "simon/simon.h"
|
||||||
#include "simon/intern.h"
|
#include "simon/intern.h"
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
static const char *const verb_names[] = {
|
static const char *const verb_names[] = {
|
||||||
"Walk to",
|
"Walk to",
|
||||||
"Look at",
|
"Look at",
|
||||||
|
@ -455,3 +457,5 @@ bool SimonEngine::hitarea_proc_3(Item *item) {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
#include "simon/intern.h"
|
#include "simon/intern.h"
|
||||||
#include "simon/vga.h"
|
#include "simon/vga.h"
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
typedef void (SimonEngine::*VgaOpcodeProc) ();
|
typedef void (SimonEngine::*VgaOpcodeProc) ();
|
||||||
static uint16 vc_get_out_of_code = 0;
|
static uint16 vc_get_out_of_code = 0;
|
||||||
|
|
||||||
|
@ -1905,3 +1907,5 @@ void SimonEngine::vc_74_clear_op189_flag() {
|
||||||
vc_read_next_byte();
|
vc_read_next_byte();
|
||||||
_op_189_flags &= ~(1 << vc_read_next_byte());
|
_op_189_flags &= ~(1 << vc_read_next_byte());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#ifndef SIMON_VGA_H
|
#ifndef SIMON_VGA_H
|
||||||
#define SIMON_VGA_H
|
#define SIMON_VGA_H
|
||||||
|
|
||||||
|
namespace Simon {
|
||||||
|
|
||||||
struct VgaFile1Header {
|
struct VgaFile1Header {
|
||||||
uint16 x_1, x_2;
|
uint16 x_1, x_2;
|
||||||
uint16 hdr2_start;
|
uint16 hdr2_start;
|
||||||
|
@ -79,5 +81,6 @@ struct VC10_state {
|
||||||
|
|
||||||
byte *vc_10_depack_column(VC10_state *vs);
|
byte *vc_10_depack_column(VC10_state *vs);
|
||||||
|
|
||||||
|
} // End of namespace Simon
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue