aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorEugene Sandulenko2006-09-29 09:44:30 +0000
committerEugene Sandulenko2006-09-29 09:44:30 +0000
commitbb1547ab1ce3eb0a586814949e59864888f99c83 (patch)
tree66e780855ef521dab3cfc5dcaad8e3d90f764f00 /engines/agos
parentabf4ede05ba070478cf942817140a6744015dfab (diff)
downloadscummvm-rg350-bb1547ab1ce3eb0a586814949e59864888f99c83.tar.gz
scummvm-rg350-bb1547ab1ce3eb0a586814949e59864888f99c83.tar.bz2
scummvm-rg350-bb1547ab1ce3eb0a586814949e59864888f99c83.zip
Phase 5 of Simon engine renaming. Renamed namespace Simon -> AGOS and
SimonEngine -> AGOSEngine. Source is compilable and runnable again. I'm done. svn-id: r24013
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/agos.cpp146
-rw-r--r--engines/agos/agos.h14
-rw-r--r--engines/agos/animation.cpp6
-rw-r--r--engines/agos/animation.h10
-rw-r--r--engines/agos/charset.cpp46
-rw-r--r--engines/agos/cursor.cpp20
-rw-r--r--engines/agos/debug.cpp26
-rw-r--r--engines/agos/debug.h4
-rw-r--r--engines/agos/debugger.cpp6
-rw-r--r--engines/agos/debugger.h10
-rw-r--r--engines/agos/draw.cpp38
-rw-r--r--engines/agos/event.cpp30
-rw-r--r--engines/agos/game.cpp18
-rw-r--r--engines/agos/icons.cpp24
-rw-r--r--engines/agos/intern.h4
-rw-r--r--engines/agos/items.cpp926
-rw-r--r--engines/agos/midi.cpp4
-rw-r--r--engines/agos/midi.h4
-rw-r--r--engines/agos/midiparser_s1d.cpp4
-rw-r--r--engines/agos/oracle.cpp34
-rw-r--r--engines/agos/res.cpp38
-rw-r--r--engines/agos/rooms.cpp10
-rw-r--r--engines/agos/saveload.cpp28
-rw-r--r--engines/agos/sound.cpp6
-rw-r--r--engines/agos/sound.h10
-rw-r--r--engines/agos/string.cpp32
-rw-r--r--engines/agos/subroutine.cpp44
-rw-r--r--engines/agos/verb.cpp56
-rw-r--r--engines/agos/vga.cpp398
-rw-r--r--engines/agos/vga.h4
-rw-r--r--engines/agos/window.cpp24
31 files changed, 1012 insertions, 1012 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index b5115df955..806d1bf726 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -43,7 +43,7 @@
using Common::File;
-namespace Simon {
+namespace AGOS {
#ifdef PALMOS_68K
#define PTR(a) a
@@ -73,7 +73,7 @@ static const GameSpecificSettings puzzlepack_settings = {
};
#endif
-SimonEngine::SimonEngine(OSystem *syst)
+AGOSEngine::AGOSEngine(OSystem *syst)
: Engine(syst), midi(syst) {
_vcPtr = 0;
_vc_get_out_of_code = 0;
@@ -415,7 +415,7 @@ SimonEngine::SimonEngine(OSystem *syst)
File::addDefaultDirectory(_gameDataPath + "SPEECH");
}
-int SimonEngine::init() {
+int AGOSEngine::init() {
// Detect game
if (!initGame()) {
GUIErrorMessage("No valid games were found in the specified directory.");
@@ -529,7 +529,7 @@ int SimonEngine::init() {
return 0;
}
-void SimonEngine::setupGame() {
+void AGOSEngine::setupGame() {
if (getGameType() == GType_PP) {
gss = PTR(puzzlepack_settings);
_numTextBoxes = 40;
@@ -617,7 +617,7 @@ void SimonEngine::setupGame() {
_variableArrayPtr = _variableArray;
}
-SimonEngine::~SimonEngine() {
+AGOSEngine::~AGOSEngine() {
delete _gameFile;
midi.close();
@@ -649,11 +649,11 @@ SimonEngine::~SimonEngine() {
delete _sound;
}
-GUI::Debugger *SimonEngine::getDebugger() {
+GUI::Debugger *AGOSEngine::getDebugger() {
return _debugger;
}
-void SimonEngine::paletteFadeOut(byte *palPtr, uint num, uint size) {
+void AGOSEngine::paletteFadeOut(byte *palPtr, uint num, uint size) {
byte *p = palPtr;
do {
@@ -673,7 +673,7 @@ void SimonEngine::paletteFadeOut(byte *palPtr, uint num, uint size) {
} while (--num);
}
-byte *SimonEngine::allocateItem(uint size) {
+byte *AGOSEngine::allocateItem(uint size) {
byte *org = _itemHeapPtr;
size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
@@ -686,7 +686,7 @@ byte *SimonEngine::allocateItem(uint size) {
return org;
}
-void SimonEngine::setUserFlag(Item *item, int a, int b) {
+void AGOSEngine::setUserFlag(Item *item, int a, int b) {
SubUserFlag *subUserFlag;
subUserFlag = (SubUserFlag *) findChildOfType(item, 9);
@@ -698,7 +698,7 @@ void SimonEngine::setUserFlag(Item *item, int a, int b) {
subUserFlag->userFlags[a] = b;
}
-void SimonEngine::createPlayer() {
+void AGOSEngine::createPlayer() {
Child *child;
_currentPlayer = _itemArrayPtr[1];
@@ -712,7 +712,7 @@ void SimonEngine::createPlayer() {
setUserFlag(_currentPlayer, 0, 0);
}
-Child *SimonEngine::findChildOfType(Item *i, uint type) {
+Child *AGOSEngine::findChildOfType(Item *i, uint type) {
Child *child = i->children;
for (; child; child = child->next)
if (child->type == type)
@@ -720,15 +720,15 @@ Child *SimonEngine::findChildOfType(Item *i, uint type) {
return NULL;
}
-bool SimonEngine::isRoom(Item *item) {
+bool AGOSEngine::isRoom(Item *item) {
return findChildOfType(item, 1) != NULL;
}
-bool SimonEngine::isObject(Item *item) {
+bool AGOSEngine::isObject(Item *item) {
return findChildOfType(item, 2) != NULL;
}
-uint SimonEngine::getOffsetOfChild2Param(SubObject *child, uint prop) {
+uint AGOSEngine::getOffsetOfChild2Param(SubObject *child, uint prop) {
uint m = 1;
uint offset = 0;
while (m != prop) {
@@ -739,7 +739,7 @@ uint SimonEngine::getOffsetOfChild2Param(SubObject *child, uint prop) {
return offset;
}
-Child *SimonEngine::allocateChildBlock(Item *i, uint type, uint size) {
+Child *AGOSEngine::allocateChildBlock(Item *i, uint type, uint size) {
Child *child = (Child *)allocateItem(size);
child->next = i->children;
i->children = child;
@@ -747,44 +747,44 @@ Child *SimonEngine::allocateChildBlock(Item *i, uint type, uint size) {
return child;
}
-void SimonEngine::allocItemHeap() {
+void AGOSEngine::allocItemHeap() {
_itemHeapSize = 64000;
_itemHeapCurPos = 0;
_itemHeapPtr = (byte *)calloc(64000, 1);
}
-void SimonEngine::allocTablesHeap() {
+void AGOSEngine::allocTablesHeap() {
_tablesHeapSize = _tableMemSize;
_tablesHeapCurPos = 0;
_tablesHeapPtr = (byte *)calloc(_tableMemSize, 1);
}
-void SimonEngine::setItemState(Item *item, int value) {
+void AGOSEngine::setItemState(Item *item, int value) {
item->state = value;
}
-byte SimonEngine::getByte() {
+byte AGOSEngine::getByte() {
return *_codePtr++;
}
-int SimonEngine::getNextWord() {
+int AGOSEngine::getNextWord() {
int16 a = (int16)READ_BE_UINT16(_codePtr);
_codePtr += 2;
return a;
}
-uint SimonEngine::getNextStringID() {
+uint AGOSEngine::getNextStringID() {
return (uint16)getNextWord();
}
-uint SimonEngine::getVarOrByte() {
+uint AGOSEngine::getVarOrByte() {
uint a = *_codePtr++;
if (a != 255)
return a;
return readVariable(*_codePtr++);
}
-uint SimonEngine::getVarOrWord() {
+uint AGOSEngine::getVarOrWord() {
uint a = READ_BE_UINT16(_codePtr);
_codePtr += 2;
if (getGameType() == GType_PP) {
@@ -799,14 +799,14 @@ uint SimonEngine::getVarOrWord() {
return a;
}
-uint SimonEngine::getVarWrapper() {
+uint AGOSEngine::getVarWrapper() {
if (getGameType() == GType_PP)
return getVarOrWord();
else
return getVarOrByte();
}
-Item *SimonEngine::getNextItemPtr() {
+Item *AGOSEngine::getNextItemPtr() {
int a = getNextWord();
switch (a) {
@@ -825,7 +825,7 @@ Item *SimonEngine::getNextItemPtr() {
}
}
-Item *SimonEngine::getNextItemPtrStrange() {
+Item *AGOSEngine::getNextItemPtrStrange() {
int a = getNextWord();
switch (a) {
case -1:
@@ -843,7 +843,7 @@ Item *SimonEngine::getNextItemPtrStrange() {
}
}
-uint SimonEngine::getNextItemID() {
+uint AGOSEngine::getNextItemID() {
int a = getNextWord();
switch (a) {
case -1:
@@ -861,24 +861,24 @@ uint SimonEngine::getNextItemID() {
}
}
-Item *SimonEngine::me() {
+Item *AGOSEngine::me() {
if (_currentPlayer)
return _currentPlayer;
return _dummyItem1;
}
-Item *SimonEngine::actor() {
+Item *AGOSEngine::actor() {
error("actor: is this code ever used?");
//if (_actorPlayer)
// return _actorPlayer;
return _dummyItem1;
}
-uint SimonEngine::getNextVarContents() {
+uint AGOSEngine::getNextVarContents() {
return (uint16)readVariable(getVarWrapper());
}
-uint SimonEngine::readVariable(uint variable) {
+uint AGOSEngine::readVariable(uint variable) {
if (variable >= _numVars)
error("readVariable: Variable %d out of range", variable);
@@ -894,11 +894,11 @@ uint SimonEngine::readVariable(uint variable) {
}
}
-void SimonEngine::writeNextVarContents(uint16 contents) {
+void AGOSEngine::writeNextVarContents(uint16 contents) {
writeVariable(getVarWrapper(), contents);
}
-void SimonEngine::writeVariable(uint variable, uint16 contents) {
+void AGOSEngine::writeVariable(uint variable, uint16 contents) {
if (variable >= _numVars)
error("writeVariable: Variable %d out of range", variable);
@@ -908,7 +908,7 @@ void SimonEngine::writeVariable(uint variable, uint16 contents) {
_variableArray[variable] = contents;
}
-void SimonEngine::setItemParent(Item *item, Item *parent) {
+void AGOSEngine::setItemParent(Item *item, Item *parent) {
Item *old_parent = derefItem(item->parent);
if (item == parent)
@@ -922,7 +922,7 @@ void SimonEngine::setItemParent(Item *item, Item *parent) {
itemChildrenChanged(parent);
}
-void SimonEngine::itemChildrenChanged(Item *item) {
+void AGOSEngine::itemChildrenChanged(Item *item) {
int i;
WindowBlock *window;
@@ -946,7 +946,7 @@ void SimonEngine::itemChildrenChanged(Item *item) {
mouseOn();
}
-void SimonEngine::unlinkItem(Item *item) {
+void AGOSEngine::unlinkItem(Item *item) {
Item *first, *parent, *next;
// can't unlink item without parent
@@ -984,7 +984,7 @@ void SimonEngine::unlinkItem(Item *item) {
}
}
-void SimonEngine::linkItem(Item *item, Item *parent) {
+void AGOSEngine::linkItem(Item *item, Item *parent) {
uint id;
// Don't allow that an item that is already linked is relinked
if (item->parent)
@@ -1001,7 +1001,7 @@ void SimonEngine::linkItem(Item *item, Item *parent) {
}
}
-void SimonEngine::setup_cond_c_helper() {
+void AGOSEngine::setup_cond_c_helper() {
HitArea *last;
uint id;
@@ -1119,7 +1119,7 @@ out_of_here:
_noRightClick = 0;
}
-void SimonEngine::endCutscene() {
+void AGOSEngine::endCutscene() {
Subroutine *sub;
_sound->stopVoice();
@@ -1131,12 +1131,12 @@ void SimonEngine::endCutscene() {
_runScriptReturn1 = true;
}
-bool SimonEngine::has_item_childflag_0x10(Item *item) {
+bool AGOSEngine::has_item_childflag_0x10(Item *item) {
SubObject *child = (SubObject *)findChildOfType(item, 2);
return child && (child->objectFlags & kOFIcon) != 0;
}
-uint SimonEngine::itemGetIconNumber(Item *item) {
+uint AGOSEngine::itemGetIconNumber(Item *item) {
SubObject *child = (SubObject *)findChildOfType(item, 2);
uint offs;
@@ -1147,7 +1147,7 @@ uint SimonEngine::itemGetIconNumber(Item *item) {
return child->objectFlagValue[offs];
}
-void SimonEngine::hitarea_stuff() {
+void AGOSEngine::hitarea_stuff() {
HitArea *ha;
uint id;
@@ -1229,7 +1229,7 @@ startOver:
_needHitAreaRecalc++;
}
-void SimonEngine::hitarea_stuff_helper() {
+void AGOSEngine::hitarea_stuff_helper() {
time_t cur_time;
if (getGameType() == GType_SIMON2 || getGameType() == GType_FF || getGameType() == GType_PP) {
@@ -1257,7 +1257,7 @@ void SimonEngine::hitarea_stuff_helper() {
}
}
-void SimonEngine::hitarea_stuff_helper_2() {
+void AGOSEngine::hitarea_stuff_helper_2() {
uint subr_id;
Subroutine *sub;
@@ -1286,7 +1286,7 @@ void SimonEngine::hitarea_stuff_helper_2() {
_runScriptReturn1 = false;
}
-void SimonEngine::permitInput() {
+void AGOSEngine::permitInput() {
if (!_mortalFlag) {
_mortalFlag = true;
showmessage_print_char(0);
@@ -1302,7 +1302,7 @@ void SimonEngine::permitInput() {
}
}
-TextLocation *SimonEngine::getTextLocation(uint a) {
+TextLocation *AGOSEngine::getTextLocation(uint a) {
switch (a) {
case 1:
return &_textLocation1;
@@ -1318,7 +1318,7 @@ TextLocation *SimonEngine::getTextLocation(uint a) {
return NULL;
}
-void SimonEngine::loadZone(uint vga_res) {
+void AGOSEngine::loadZone(uint vga_res) {
VgaPointersEntry *vpe;
uint32 size;
@@ -1341,7 +1341,7 @@ void SimonEngine::loadZone(uint vga_res) {
}
}
-void SimonEngine::setZoneBuffers() {
+void AGOSEngine::setZoneBuffers() {
_zoneBuffers = (byte *)malloc(_vgaMemSize);
_vgaMemPtr = _zoneBuffers;
@@ -1351,7 +1351,7 @@ void SimonEngine::setZoneBuffers() {
_vgaMemEnd = _zoneBuffers + _vgaMemSize;
}
-byte *SimonEngine::allocBlock(uint32 size) {
+byte *AGOSEngine::allocBlock(uint32 size) {
byte *block, *blockEnd;
uint i;
@@ -1378,7 +1378,7 @@ byte *SimonEngine::allocBlock(uint32 size) {
error("allocBlock: Couldn't find free block");
}
-void SimonEngine::checkNoOverWrite(byte *end) {
+void AGOSEngine::checkNoOverWrite(byte *end) {
VgaPointersEntry *vpe;
if (_noOverWrite == 0xFFFF)
@@ -1410,7 +1410,7 @@ void SimonEngine::checkNoOverWrite(byte *end) {
}
}
-void SimonEngine::checkRunningAnims(byte *end) {
+void AGOSEngine::checkRunningAnims(byte *end) {
VgaSprite *vsp;
if (getGameType() != GType_FF && getGameType() != GType_PP && (_lockWord & 0x20)) {
return;
@@ -1423,7 +1423,7 @@ void SimonEngine::checkRunningAnims(byte *end) {
}
}
-void SimonEngine::checkAnims(uint a, byte *end) {
+void AGOSEngine::checkAnims(uint a, byte *end) {
VgaPointersEntry *vpe;
vpe = &_vgaBufferPointers[a];
@@ -1452,7 +1452,7 @@ void SimonEngine::checkAnims(uint a, byte *end) {
}
}
-void SimonEngine::checkZonePtrs(byte *end) {
+void AGOSEngine::checkZonePtrs(byte *end) {
uint count = ARRAYSIZE(_vgaBufferPointers);
VgaPointersEntry *vpe = _vgaBufferPointers;
do {
@@ -1477,7 +1477,7 @@ void SimonEngine::checkZonePtrs(byte *end) {
} while (++vpe, --count);
}
-void SimonEngine::set_video_mode_internal(uint16 mode, uint16 vga_res_id) {
+void AGOSEngine::set_video_mode_internal(uint16 mode, uint16 vga_res_id) {
uint num, num_lines;
VgaPointersEntry *vpe;
byte *bb, *b;
@@ -1633,7 +1633,7 @@ void SimonEngine::set_video_mode_internal(uint16 mode, uint16 vga_res_id) {
}
}
-void SimonEngine::waitForSync(uint a) {
+void AGOSEngine::waitForSync(uint a) {
const uint maxCount = (getGameType() == GType_SIMON1) ? 500 : 1000;
if (getGameType() == GType_SIMON1 && (getFeatures() & GF_TALKIE)) {
@@ -1674,7 +1674,7 @@ void SimonEngine::waitForSync(uint a) {
}
}
-void SimonEngine::skipSpeech() {
+void AGOSEngine::skipSpeech() {
_sound->stopVoice();
if (!getBitFlag(28)) {
setBitFlag(14, true);
@@ -1697,13 +1697,13 @@ void SimonEngine::skipSpeech() {
}
}
-Item *SimonEngine::derefItem(uint item) {
+Item *AGOSEngine::derefItem(uint item) {
if (item >= _itemArraySize)
error("derefItem: invalid item %d", item);
return _itemArrayPtr[item];
}
-uint SimonEngine::itemPtrToID(Item *id) {
+uint AGOSEngine::itemPtrToID(Item *id) {
uint i;
for (i = 0; i != _itemArraySize; i++)
if (_itemArrayPtr[i] == id)
@@ -1712,7 +1712,7 @@ uint SimonEngine::itemPtrToID(Item *id) {
return 0;
}
-bool SimonEngine::isSpriteLoaded(uint16 id, uint16 zoneNum) {
+bool AGOSEngine::isSpriteLoaded(uint16 id, uint16 zoneNum) {
VgaSprite *vsp = _vgaSprites;
while (vsp->id) {
if (getGameType() == GType_SIMON1 || getGameType() == GType_WW) {
@@ -1727,7 +1727,7 @@ bool SimonEngine::isSpriteLoaded(uint16 id, uint16 zoneNum) {
return false;
}
-void SimonEngine::processSpecialKeys() {
+void AGOSEngine::processSpecialKeys() {
switch (_keyPressed) {
case 27: // escape
_exitCutscene = true;
@@ -1830,7 +1830,7 @@ void SimonEngine::processSpecialKeys() {
_keyPressed = 0;
}
-void SimonEngine::pause() {
+void AGOSEngine::pause() {
_keyPressed = 1;
_pause = 1;
bool ambient_status = _ambientPaused;
@@ -1848,7 +1848,7 @@ void SimonEngine::pause() {
}
-void SimonEngine::loadSprite(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette) {
+void AGOSEngine::loadSprite(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette) {
VgaSprite *vsp;
VgaPointersEntry *vpe;
byte *p, *pp;
@@ -1951,7 +1951,7 @@ void SimonEngine::loadSprite(uint windowNum, uint zoneNum, uint vgaSpriteId, uin
_lockWord &= ~0x40;
}
-void SimonEngine::playSpeech(uint speech_id, uint vgaSpriteId) {
+void AGOSEngine::playSpeech(uint speech_id, uint vgaSpriteId) {
if (getGameType() == GType_SIMON1) {
if (speech_id == 9999) {
if (_subtitles)
@@ -2003,7 +2003,7 @@ void SimonEngine::playSpeech(uint speech_id, uint vgaSpriteId) {
}
}
-int SimonEngine::go() {
+int AGOSEngine::go() {
loadGamePcFile();
@@ -2035,7 +2035,7 @@ int SimonEngine::go() {
return 0;
}
-void SimonEngine::shutdown() {
+void AGOSEngine::shutdown() {
delete _gameFile;
midi.close();
@@ -2052,7 +2052,7 @@ void SimonEngine::shutdown() {
_system->quit();
}
-void SimonEngine::delay(uint amount) {
+void AGOSEngine::delay(uint amount) {
OSystem::Event event;
uint32 start = _system->getMillis();
@@ -2163,7 +2163,7 @@ void SimonEngine::delay(uint amount) {
} while (cur < start + amount);
}
-void SimonEngine::loadMusic(uint music) {
+void AGOSEngine::loadMusic(uint music) {
char buf[4];
if (getGameType() == GType_SIMON2) { // Simon 2 music
@@ -2244,7 +2244,7 @@ void SimonEngine::loadMusic(uint music) {
}
}
-void SimonEngine::playSting(uint a) {
+void AGOSEngine::playSting(uint a) {
if (!midi._enable_sfx)
return;
@@ -2268,19 +2268,19 @@ void SimonEngine::playSting(uint a) {
midi.startTrack(0);
}
-void SimonEngine::set_volume(int volume) {
+void AGOSEngine::set_volume(int volume) {
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, volume);
}
-} // End of namespace Simon
+} // End of namespace AGOS
#ifdef PALMOS_68K
#include "scumm_globals.h"
_GINIT(AGOS_AGOS)
-_GSETPTR(Simon::simon1_settings, GBVARS_SIMON1SETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_AGOS)
-_GSETPTR(Simon::simon2_settings, GBVARS_SIMON2SETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_AGOS)
-_GSETPTR(Simon::feeblefiles_settings, GBVARS_FEEBLEFILESSETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_AGOS)
+_GSETPTR(AGOS::simon1_settings, GBVARS_SIMON1SETTINGS_INDEX, AGOS::GameSpecificSettings, GBVARS_AGOS)
+_GSETPTR(AGOS::simon2_settings, GBVARS_SIMON2SETTINGS_INDEX, AGOS::GameSpecificSettings, GBVARS_AGOS)
+_GSETPTR(AGOS::feeblefiles_settings, GBVARS_FEEBLEFILESSETTINGS_INDEX, AGOS::GameSpecificSettings, GBVARS_AGOS)
_GEND
_GRELEASE(AGOS_AGOS)
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 90f3a1506c..444789bac0 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -34,7 +34,7 @@
#include "agos/sound.h"
#include "agos/vga.h"
-namespace Simon {
+namespace AGOS {
/* Various other settings */
//#define DUMP_FILE_NR 8
@@ -141,18 +141,18 @@ struct GameSpecificSettings;
class Debugger;
-class SimonEngine : public Engine {
+class AGOSEngine : public Engine {
friend class Debugger;
friend class MoviePlayer;
GUI::Debugger *getDebugger();
- typedef void (SimonEngine::*OpcodeProc) ();
+ typedef void (AGOSEngine::*OpcodeProc) ();
void setupOpcodes();
const OpcodeProc *_opcode_table;
int _numOpcodes;
- typedef void (SimonEngine::*VgaOpcodeProc) ();
+ typedef void (AGOSEngine::*VgaOpcodeProc) ();
void setupVgaOpcodes();
const VgaOpcodeProc *_vga_opcode_table;
@@ -492,8 +492,8 @@ protected:
byte _hebrewCharWidths[32];
public:
- SimonEngine(OSystem *syst);
- virtual ~SimonEngine();
+ AGOSEngine(OSystem *syst);
+ virtual ~AGOSEngine();
protected:
uint16 to16Wrapper(uint value);
@@ -1186,6 +1186,6 @@ protected:
char *genSaveName(int slot);
};
-} // End of namespace Simon
+} // End of namespace AGOS
#endif
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index 9302055241..0faaba4d54 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -35,9 +35,9 @@
#include "sound/audiostream.h"
#include "sound/wave.h"
-namespace Simon {
+namespace AGOS {
-MoviePlayer::MoviePlayer(SimonEngine *vm, Audio::Mixer *mixer)
+MoviePlayer::MoviePlayer(AGOSEngine *vm, Audio::Mixer *mixer)
: DXAPlayer(), _vm(vm), _mixer(mixer) {
_omniTV = false;
@@ -403,4 +403,4 @@ const char * MoviePlayer::_sequenceList[90] = {
"wurbatak"
};
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/animation.h b/engines/agos/animation.h
index 782cea87a9..2f092bae1a 100644
--- a/engines/agos/animation.h
+++ b/engines/agos/animation.h
@@ -30,12 +30,12 @@
#include "graphics/dxa_player.h"
#include "sound/mixer.h"
-namespace Simon {
+namespace AGOS {
-class SimonEngine;
+class AGOSEngine;
class MoviePlayer : public Graphics::DXAPlayer {
- SimonEngine *_vm;
+ AGOSEngine *_vm;
Audio::Mixer *_mixer;
@@ -51,7 +51,7 @@ class MoviePlayer : public Graphics::DXAPlayer {
static const char *_sequenceList[90];
uint8 _sequenceNum;
public:
- MoviePlayer(SimonEngine *vm, Audio::Mixer *mixer);
+ MoviePlayer(AGOSEngine *vm, Audio::Mixer *mixer);
bool load(const char *filename);
void play();
@@ -66,6 +66,6 @@ private:
void startSound();
};
-} // End of namespace Simon
+} // End of namespace AGOS
#endif
diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp
index 987c953223..d530118229 100644
--- a/engines/agos/charset.cpp
+++ b/engines/agos/charset.cpp
@@ -26,9 +26,9 @@
#include "agos/agos.h"
#include "agos/intern.h"
-namespace Simon {
+namespace AGOS {
-void SimonEngine::print_char_helper_1(const byte *src, uint len) {
+void AGOSEngine::print_char_helper_1(const byte *src, uint len) {
uint idx;
if (_textWindow == NULL)
@@ -72,13 +72,13 @@ void SimonEngine::print_char_helper_1(const byte *src, uint len) {
}
}
-void SimonEngine::print_char_helper_5(WindowBlock *window) {
+void AGOSEngine::print_char_helper_5(WindowBlock *window) {
uint index = getWindowNum(window);
tidyIconArray(index);
_fcsData1[index] = 0;
}
-void SimonEngine::tidyIconArray(uint i) {
+void AGOSEngine::tidyIconArray(uint i) {
WindowBlock *window;
if (_fcsData2[i]) {
@@ -90,7 +90,7 @@ void SimonEngine::tidyIconArray(uint i) {
}
}
-void SimonEngine::renderStringAmiga(uint vga_sprite_id, uint color, uint width, uint height, const char *txt) {
+void AGOSEngine::renderStringAmiga(uint vga_sprite_id, uint color, uint width, uint height, const char *txt) {
VgaPointersEntry *vpe = &_vgaBufferPointers[2];
byte *src, *dst, *dst_org, chr;
uint count;
@@ -181,7 +181,7 @@ void SimonEngine::renderStringAmiga(uint vga_sprite_id, uint color, uint width,
}
}
-void SimonEngine::renderString(uint vga_sprite_id, uint color, uint width, uint height, const char *txt) {
+void AGOSEngine::renderString(uint vga_sprite_id, uint color, uint width, uint height, const char *txt) {
VgaPointersEntry *vpe = &_vgaBufferPointers[2];
byte *src, *dst, *p, *dst_org, chr;
const int textHeight = (getGameType() == GType_FF || getGameType() == GType_PP) ? 15: 10;
@@ -297,11 +297,11 @@ static const byte feebleFontSize[208] = {
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
};
-uint SimonEngine::getFeebleFontSize(byte chr) {
+uint AGOSEngine::getFeebleFontSize(byte chr) {
return feebleFontSize[chr - 32];
}
-void SimonEngine::showMessageFormat(const char *s, ...) {
+void AGOSEngine::showMessageFormat(const char *s, ...) {
char buf[STRINGBUFLEN];
char *str;
va_list va;
@@ -327,7 +327,7 @@ void SimonEngine::showMessageFormat(const char *s, ...) {
showmessage_print_char(*str);
}
-void SimonEngine::showmessage_print_char(byte chr) {
+void AGOSEngine::showmessage_print_char(byte chr) {
if (chr == 12) {
_numLettersToPrint = 0;
_printCharCurPos = 0;
@@ -382,7 +382,7 @@ void SimonEngine::showmessage_print_char(byte chr) {
}
}
-void SimonEngine::openTextWindow() {
+void AGOSEngine::openTextWindow() {
if (_textWindow)
return;
@@ -392,7 +392,7 @@ void SimonEngine::openTextWindow() {
_textWindow = openWindow(8, 144, 24, 6, 1, 0, 15);
}
-void SimonEngine::showmessage_helper_3(uint a, uint b) {
+void AGOSEngine::showmessage_helper_3(uint a, uint b) {
_printCharCurPos = a;
_printCharMaxPos = b;
_printCharPixelCount = 0;
@@ -400,7 +400,7 @@ void SimonEngine::showmessage_helper_3(uint a, uint b) {
_newLines = 0;
}
-void SimonEngine::windowPutChar(WindowBlock *window, byte c, byte b) {
+void AGOSEngine::windowPutChar(WindowBlock *window, byte c, byte b) {
byte width = 6;
if (c == 12) {
@@ -472,7 +472,7 @@ void SimonEngine::windowPutChar(WindowBlock *window, byte c, byte b) {
}
}
-void SimonEngine::video_putchar_newline(WindowBlock *window) {
+void AGOSEngine::video_putchar_newline(WindowBlock *window) {
if (getGameType() == GType_FF) {
if (_noOracleScroll == 0) {
if (window->height < window->textRow + 30) {
@@ -1525,7 +1525,7 @@ static const byte feeble_video_font[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,
};
-void SimonEngine::video_putchar_drawchar(WindowBlock *window, uint x, uint y, byte chr) {
+void AGOSEngine::video_putchar_drawchar(WindowBlock *window, uint x, uint y, byte chr) {
const byte *src;
byte color, *dst;
uint h, w, i;
@@ -1599,20 +1599,20 @@ void SimonEngine::video_putchar_drawchar(WindowBlock *window, uint x, uint y, by
_lockWord &= ~0x8000;
}
-} // End of namespace Simon
+} // End of namespace AGOS
#ifdef PALMOS_68K
#include "scumm_globals.h"
_GINIT(AGOS_Charset)
-_GSETPTR(Simon::russian_video_font, GBVARS_RUSSIANVIDEOFONT_INDEX, byte, GBVARS_AGOS)
-//_GSETPTR(Simon::polish_video_font, GBVARS_POLISHVIDEOFONT_INDEX, byte, GBVARS_AGOS)
-_GSETPTR(Simon::french_video_font, GBVARS_FRENCHVIDEOFONT_INDEX, byte, GBVARS_AGOS)
-_GSETPTR(Simon::german_video_font, GBVARS_GERMANVIDEOFONT_INDEX, byte, GBVARS_AGOS)
-_GSETPTR(Simon::hebrew_video_font, GBVARS_HEBREWVIDEOFONT_INDEX, byte, GBVARS_AGOS)
-_GSETPTR(Simon::italian_video_font, GBVARS_ITALIANVIDEOFONT_INDEX, byte, GBVARS_AGOS)
-_GSETPTR(Simon::spanish_video_font, GBVARS_SPANISHVIDEOFONT_INDEX, byte, GBVARS_AGOS)
-_GSETPTR(Simon::video_font, GBVARS_VIDEOFONT_INDEX, byte, GBVARS_AGOS)
+_GSETPTR(AGOS::russian_video_font, GBVARS_RUSSIANVIDEOFONT_INDEX, byte, GBVARS_AGOS)
+//_GSETPTR(AGOS::polish_video_font, GBVARS_POLISHVIDEOFONT_INDEX, byte, GBVARS_AGOS)
+_GSETPTR(AGOS::french_video_font, GBVARS_FRENCHVIDEOFONT_INDEX, byte, GBVARS_AGOS)
+_GSETPTR(AGOS::german_video_font, GBVARS_GERMANVIDEOFONT_INDEX, byte, GBVARS_AGOS)
+_GSETPTR(AGOS::hebrew_video_font, GBVARS_HEBREWVIDEOFONT_INDEX, byte, GBVARS_AGOS)
+_GSETPTR(AGOS::italian_video_font, GBVARS_ITALIANVIDEOFONT_INDEX, byte, GBVARS_AGOS)
+_GSETPTR(AGOS::spanish_video_font, GBVARS_SPANISHVIDEOFONT_INDEX, byte, GBVARS_AGOS)
+_GSETPTR(AGOS::video_font, GBVARS_VIDEOFONT_INDEX, byte, GBVARS_AGOS)
_GEND
_GRELEASE(AGOS_Charset)
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index dfae34c543..70318f649e 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -29,7 +29,7 @@
#include "agos/agos.h"
-namespace Simon {
+namespace AGOS {
#ifdef PALMOS_68K
static const byte *_simon1_cursor;
@@ -226,7 +226,7 @@ static const byte _simon2_cursors[10][256] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xe5,0xe5,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff },
};
-void SimonEngine::drawMousePointer() {
+void AGOSEngine::drawMousePointer() {
if (getGameType() == GType_SIMON2) {
CursorMan.replaceCursor(_simon2_cursors[_mouseCursor], 16, 16, 7, 7);
} else {
@@ -234,7 +234,7 @@ void SimonEngine::drawMousePointer() {
}
}
-void SimonEngine::handleMouseMoved() {
+void AGOSEngine::handleMouseMoved() {
uint x;
if (_mouseHideCount) {
@@ -335,11 +335,11 @@ get_out:
_needHitAreaRecalc = 0;
}
-void SimonEngine::mouseOff() {
+void AGOSEngine::mouseOff() {
_mouseHideCount++;
}
-void SimonEngine::mouseOn() {
+void AGOSEngine::mouseOn() {
_lockWord |= 1;
if (_mouseHideCount != 0)
@@ -348,7 +348,7 @@ void SimonEngine::mouseOn() {
_lockWord &= ~1;
}
-void SimonEngine::pollMouseXY() {
+void AGOSEngine::pollMouseXY() {
_mouseX = _sdlMouseX;
_mouseY = _sdlMouseY;
}
@@ -396,7 +396,7 @@ static const byte _mouseOffs[29 * 32] = {
0,0,10,7,10,6,10,5,10,4,10,3,10,4,10,5,10,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
};
-void SimonEngine::drawMousePointer_FF() {
+void AGOSEngine::drawMousePointer_FF() {
uint cursor;
int image, offs;
@@ -453,7 +453,7 @@ void SimonEngine::drawMousePointer_FF() {
}
}
-void SimonEngine::drawMousePart(int image, byte x, byte y) {
+void AGOSEngine::drawMousePart(int image, byte x, byte y) {
VgaPointersEntry *vpe = &_vgaBufferPointers[7];
byte *src;
int width, height;
@@ -479,13 +479,13 @@ void SimonEngine::drawMousePart(int image, byte x, byte y) {
}
}
-} // End of namespace Simon
+} // End of namespace AGOS
#ifdef PALMOS_68K
#include "scumm_globals.h"
_GINIT(AGOS_Cursor)
-_GSETPTR(Simon::_simon1_cursor, GBVARS_SIMON1CURSOR_INDEX, byte, GBVARS_AGOS)
+_GSETPTR(AGOS::_simon1_cursor, GBVARS_SIMON1CURSOR_INDEX, byte, GBVARS_AGOS)
_GEND
_GRELEASE(AGOS_Cursor)
diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp
index a0e980f807..d8d8bc5f45 100644
--- a/engines/agos/debug.cpp
+++ b/engines/agos/debug.cpp
@@ -31,9 +31,9 @@
#include <sys/stat.h>
-namespace Simon {
+namespace AGOS {
-const byte *SimonEngine::dumpOpcode(const byte *p) {
+const byte *AGOSEngine::dumpOpcode(const byte *p) {
uint opcode;
const char *s, *st;
@@ -147,7 +147,7 @@ const byte *SimonEngine::dumpOpcode(const byte *p) {
}
}
-void SimonEngine::dumpSubroutineLine(SubroutineLine *sl, Subroutine *sub) {
+void AGOSEngine::dumpSubroutineLine(SubroutineLine *sl, Subroutine *sub) {
const byte *p;
printf("; ****\n");
@@ -165,7 +165,7 @@ void SimonEngine::dumpSubroutineLine(SubroutineLine *sl, Subroutine *sub) {
}
}
-void SimonEngine::dumpSubroutine(Subroutine *sub) {
+void AGOSEngine::dumpSubroutine(Subroutine *sub) {
SubroutineLine *sl;
printf("\n******************************************\n;Subroutine, ID=%d:\nSUB_%d:\n", sub->id, sub->id);
@@ -176,14 +176,14 @@ void SimonEngine::dumpSubroutine(Subroutine *sub) {
printf("\nEND ******************************************\n");
}
-void SimonEngine::dumpSubroutines() {
+void AGOSEngine::dumpSubroutines() {
Subroutine *sub = _subroutineList;
for (; sub; sub = sub->next) {
dumpSubroutine(sub);
}
}
-void SimonEngine::dump_video_script(const byte *src, bool one_opcode_only) {
+void AGOSEngine::dump_video_script(const byte *src, bool one_opcode_only) {
uint opcode;
const char *str, *strn;
@@ -252,7 +252,7 @@ void SimonEngine::dump_video_script(const byte *src, bool one_opcode_only) {
} while (!one_opcode_only);
}
-void SimonEngine::dump_vga_file(const byte *vga) {
+void AGOSEngine::dump_vga_file(const byte *vga) {
const byte *pp;
const byte *p;
int count;
@@ -335,7 +335,7 @@ void dump_bmp(const char *filename, int w, int h, const byte *bytes, const uint3
fclose(out);
}
-void SimonEngine::dump_bitmap(const char *filename, const byte *offs, int w, int h, int flags, const byte *palette,
+void AGOSEngine::dump_bitmap(const char *filename, const byte *offs, int w, int h, int flags, const byte *palette,
byte base) {
if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2)
@@ -375,7 +375,7 @@ void SimonEngine::dump_bitmap(const char *filename, const byte *offs, int w, int
free(b);
}
-void SimonEngine::dump_single_bitmap(int file, int image, const byte *offs, int w, int h, byte base) {
+void AGOSEngine::dump_single_bitmap(int file, int image, const byte *offs, int w, int h, byte base) {
char buf[40];
#if !defined(PALMOS_MODE) && !defined(__DC__) && !defined(__PSP__) && !defined(__PLAYSTATION2__)
struct stat statbuf;
@@ -414,7 +414,7 @@ void pal_load(byte *pal, const byte *vga1, int a, int b) {
} while (--num);
}
-void SimonEngine::dump_vga_bitmaps(const byte *vga, byte *vga1, int res) {
+void AGOSEngine::dump_vga_bitmaps(const byte *vga, byte *vga1, int res) {
int i;
uint32 offs;
@@ -459,15 +459,15 @@ void SimonEngine::dump_vga_bitmaps(const byte *vga, byte *vga1, int res) {
}
}
-void SimonEngine::dump_vga_script_always(const byte *ptr, uint res, uint sprite_id) {
+void AGOSEngine::dump_vga_script_always(const byte *ptr, uint res, uint sprite_id) {
printf("; address=%x, vgafile=%d vgasprite=%d\n",
(unsigned int)(ptr - _vgaBufferPointers[res].vgaFile1), res, sprite_id);
dump_video_script(ptr, false);
printf("; end\n");
}
-void SimonEngine::dump_vga_script(const byte *ptr, uint res, uint sprite_id) {
+void AGOSEngine::dump_vga_script(const byte *ptr, uint res, uint sprite_id) {
dump_vga_script_always(ptr, res, sprite_id);
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/debug.h b/engines/agos/debug.h
index e6f478deee..9dbfa4f247 100644
--- a/engines/agos/debug.h
+++ b/engines/agos/debug.h
@@ -24,7 +24,7 @@
#ifndef AGOS_DEBUG_H
#define AGOS_DEBUG_H
-namespace Simon {
+namespace AGOS {
static const char *const ww_opcode_name_table[256] = {
/* 0 */
@@ -1849,7 +1849,7 @@ const char *const feeblefiles_video_opcode_name_table[] = {
"|STOPSOUNDLOOP",
};
-} // End of namespace Simon
+} // End of namespace AGOS
#endif
diff --git a/engines/agos/debugger.cpp b/engines/agos/debugger.cpp
index 8fc4702d1e..398861d49a 100644
--- a/engines/agos/debugger.cpp
+++ b/engines/agos/debugger.cpp
@@ -28,9 +28,9 @@
#include "agos/debugger.h"
#include "agos/agos.h"
-namespace Simon {
+namespace AGOS {
-Debugger::Debugger(SimonEngine *vm)
+Debugger::Debugger(AGOSEngine *vm)
: GUI::Debugger() {
_vm = vm;
@@ -175,5 +175,5 @@ bool Debugger::Cmd_StartSubroutine(int argc, const char **argv) {
return true;
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/debugger.h b/engines/agos/debugger.h
index cd43f3e1eb..fc1ae748ac 100644
--- a/engines/agos/debugger.h
+++ b/engines/agos/debugger.h
@@ -26,17 +26,17 @@
#include "gui/debugger.h"
-namespace Simon {
+namespace AGOS {
-class SimonEngine;
+class AGOSEngine;
class Debugger : public GUI::Debugger {
public:
- Debugger(SimonEngine *vm);
+ Debugger(AGOSEngine *vm);
virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ
protected:
- SimonEngine *_vm;
+ AGOSEngine *_vm;
virtual void preEnter();
virtual void postEnter();
@@ -50,6 +50,6 @@ protected:
bool Cmd_StartSubroutine(int argc, const char **argv);
};
-} // End of namespace Simon
+} // End of namespace AGOS
#endif
diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp
index ab65cd0af2..87255334ce 100644
--- a/engines/agos/draw.cpp
+++ b/engines/agos/draw.cpp
@@ -28,29 +28,29 @@
#include "agos/agos.h"
#include "agos/intern.h"
-namespace Simon {
+namespace AGOS {
-byte *SimonEngine::getFrontBuf() {
+byte *AGOSEngine::getFrontBuf() {
_dxSurfacePitch = _screenWidth;
return _frontBuf;
}
-byte *SimonEngine::getBackBuf() {
+byte *AGOSEngine::getBackBuf() {
_dxSurfacePitch = _screenWidth;
return _useBackGround ? _backGroundBuf : _backBuf;
}
-byte *SimonEngine::getBackGround() {
+byte *AGOSEngine::getBackGround() {
_dxSurfacePitch = _screenWidth;
return _backGroundBuf;
}
-byte *SimonEngine::getScaleBuf() {
+byte *AGOSEngine::getScaleBuf() {
_dxSurfacePitch = _screenWidth;
return _scaleBuf;
}
-void SimonEngine::animateSprites() {
+void AGOSEngine::animateSprites() {
VgaSprite *vsp;
VgaPointersEntry *vpe;
const byte *vc_ptr_org = _vcPtr;
@@ -114,7 +114,7 @@ void SimonEngine::animateSprites() {
_vcPtr = vc_ptr_org;
}
-void SimonEngine::animateSpritesDebug() {
+void AGOSEngine::animateSpritesDebug() {
VgaSprite *vsp;
VgaPointersEntry *vpe;
const byte *vc_ptr_org = _vcPtr;
@@ -164,7 +164,7 @@ void SimonEngine::animateSpritesDebug() {
_vcPtr = vc_ptr_org;
}
-void SimonEngine::animateSpritesByY() {
+void AGOSEngine::animateSpritesByY() {
VgaSprite *vsp;
VgaPointersEntry *vpe;
const byte *vc_ptr_org = _vcPtr;
@@ -240,7 +240,7 @@ void SimonEngine::animateSpritesByY() {
_vcPtr = vc_ptr_org;
}
-void SimonEngine::displayBoxStars() {
+void AGOSEngine::displayBoxStars() {
HitArea *ha, *dha;
uint count;
uint y_, x_;
@@ -338,7 +338,7 @@ void SimonEngine::displayBoxStars() {
_lockWord &= ~0x8000;
}
-void SimonEngine::scrollScreen() {
+void AGOSEngine::scrollScreen() {
byte *dst = getFrontBuf();
const byte *src;
uint x, y;
@@ -397,11 +397,11 @@ void SimonEngine::scrollScreen() {
_scrollFlag = 0;
}
-void SimonEngine::clearBackFromTop(uint lines) {
+void AGOSEngine::clearBackFromTop(uint lines) {
memset(_backBuf, 0, lines * _screenWidth);
}
-void SimonEngine::dx_clear_surfaces(uint num_lines) {
+void AGOSEngine::dx_clear_surfaces(uint num_lines) {
memset(_backBuf, 0, num_lines * _screenWidth);
_system->copyRectToScreen(_backBuf, _screenWidth, 0, 0, _screenWidth, num_lines);
@@ -412,7 +412,7 @@ void SimonEngine::dx_clear_surfaces(uint num_lines) {
}
}
-void SimonEngine::fillFrontFromBack(uint x, uint y, uint w, uint h) {
+void AGOSEngine::fillFrontFromBack(uint x, uint y, uint w, uint h) {
uint offs = x + y * _screenWidth;
byte *s = _backBuf + offs;
byte *d = _frontBuf + offs;
@@ -424,7 +424,7 @@ void SimonEngine::fillFrontFromBack(uint x, uint y, uint w, uint h) {
} while (--h);
}
-void SimonEngine::fillBackFromFront(uint x, uint y, uint w, uint h) {
+void AGOSEngine::fillBackFromFront(uint x, uint y, uint w, uint h) {
uint offs = x + y * _screenWidth;
byte *s = _frontBuf + offs;
byte *d = _backBuf + offs;
@@ -436,11 +436,11 @@ void SimonEngine::fillBackFromFront(uint x, uint y, uint w, uint h) {
} while (--h);
}
-void SimonEngine::fillBackGroundFromBack(uint lines) {
+void AGOSEngine::fillBackGroundFromBack(uint lines) {
memcpy(_backGroundBuf, _backBuf, lines * _screenWidth);
}
-void SimonEngine::dx_update_screen_and_palette() {
+void AGOSEngine::dx_update_screen_and_palette() {
if (_fastFadeInFlag == 0 && _paletteFlag == 1) {
_paletteFlag = 0;
if (memcmp(_displayPalette, _currentPalette, 1024)) {
@@ -467,7 +467,7 @@ void SimonEngine::dx_update_screen_and_palette() {
}
}
-void SimonEngine::fastFadeIn() {
+void AGOSEngine::fastFadeIn() {
if (_fastFadeInFlag & 0x8000) {
slowFadeIn();
} else {
@@ -478,7 +478,7 @@ void SimonEngine::fastFadeIn() {
}
}
-void SimonEngine::slowFadeIn() {
+void AGOSEngine::slowFadeIn() {
uint8 *src, *dst;
int c, p;
@@ -509,4 +509,4 @@ void SimonEngine::slowFadeIn() {
_fastFadeInFlag = 0;
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index 4755dea987..a69b40f35d 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -26,9 +26,9 @@
#include "agos/agos.h"
#include "agos/intern.h"
-namespace Simon {
+namespace AGOS {
-void SimonEngine::addTimeEvent(uint timeout, uint subroutine_id) {
+void AGOSEngine::addTimeEvent(uint timeout, uint subroutine_id) {
TimeEvent *te = (TimeEvent *)malloc(sizeof(TimeEvent)), *first, *last = NULL;
time_t cur_time;
@@ -65,7 +65,7 @@ void SimonEngine::addTimeEvent(uint timeout, uint subroutine_id) {
}
}
-void SimonEngine::delTimeEvent(TimeEvent *te) {
+void AGOSEngine::delTimeEvent(TimeEvent *te) {
TimeEvent *cur;
if (te == _pendingDeleteTimeEvent)
@@ -93,7 +93,7 @@ void SimonEngine::delTimeEvent(TimeEvent *te) {
}
}
-void SimonEngine::invokeTimeEvent(TimeEvent *te) {
+void AGOSEngine::invokeTimeEvent(TimeEvent *te) {
Subroutine *sub;
_scriptVerb = 0;
@@ -108,7 +108,7 @@ void SimonEngine::invokeTimeEvent(TimeEvent *te) {
_runScriptReturn1 = false;
}
-void SimonEngine::killAllTimers() {
+void AGOSEngine::killAllTimers() {
TimeEvent *cur, *next;
for (cur = _firstTimeStruct; cur; cur = next) {
@@ -117,7 +117,7 @@ void SimonEngine::killAllTimers() {
}
}
-bool SimonEngine::kickoffTimeEvents() {
+bool AGOSEngine::kickoffTimeEvents() {
time_t cur_time;
TimeEvent *te;
bool result = false;
@@ -141,7 +141,7 @@ bool SimonEngine::kickoffTimeEvents() {
return result;
}
-void SimonEngine::addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum, int32 param) {
+void AGOSEngine::addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum, int32 param) {
VgaTimerEntry *vte;
// When Simon talks to the Golum about stew in French version of
@@ -168,7 +168,7 @@ void SimonEngine::addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprit
_lockWord &= ~1;
}
-void SimonEngine::deleteVgaEvent(VgaTimerEntry * vte) {
+void AGOSEngine::deleteVgaEvent(VgaTimerEntry * vte) {
_lockWord |= 1;
if (vte + 1 <= _nextVgaTimerToProcess) {
@@ -183,7 +183,7 @@ void SimonEngine::deleteVgaEvent(VgaTimerEntry * vte) {
_lockWord &= ~1;
}
-void SimonEngine::processVgaEvents() {
+void AGOSEngine::processVgaEvents() {
VgaTimerEntry *vte = _vgaTimerList;
uint timer = (getGameType() == GType_FF) ? 5 : 1;
@@ -214,7 +214,7 @@ void SimonEngine::processVgaEvents() {
}
}
-void SimonEngine::animateEvent(const byte *code_ptr, uint16 curZoneNum, uint16 cur_sprite) {
+void AGOSEngine::animateEvent(const byte *code_ptr, uint16 curZoneNum, uint16 cur_sprite) {
VgaPointersEntry *vpe;
_vgaCurSpriteId = cur_sprite;
@@ -232,7 +232,7 @@ void SimonEngine::animateEvent(const byte *code_ptr, uint16 curZoneNum, uint16 c
runVgaScript();
}
-void SimonEngine::panEvent(uint16 curZoneNum, uint16 cur_sprite, int32 param) {
+void AGOSEngine::panEvent(uint16 curZoneNum, uint16 cur_sprite, int32 param) {
_vgaCurSpriteId = cur_sprite;
_vgaCurZoneNum = curZoneNum;
@@ -253,7 +253,7 @@ void SimonEngine::panEvent(uint16 curZoneNum, uint16 cur_sprite, int32 param) {
debug(0, "panEvent: param %d pan %d", param, pan);
}
-void SimonEngine::scrollEvent() {
+void AGOSEngine::scrollEvent() {
if (_scrollCount == 0)
return;
@@ -288,7 +288,7 @@ void SimonEngine::scrollEvent() {
}
}
-void SimonEngine::timer_callback() {
+void AGOSEngine::timer_callback() {
if (_timer5 != 0) {
_syncFlag2 = true;
_timer5--;
@@ -297,7 +297,7 @@ void SimonEngine::timer_callback() {
}
}
-void SimonEngine::timer_proc1() {
+void AGOSEngine::timer_proc1() {
_timer4++;
if (_lockWord & 0x80E9 || _lockWord & 2)
@@ -373,4 +373,4 @@ void SimonEngine::timer_proc1() {
_lockWord &= ~2;
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/game.cpp b/engines/agos/game.cpp
index f4997520ab..8224712ec9 100644
--- a/engines/agos/game.cpp
+++ b/engines/agos/game.cpp
@@ -34,7 +34,7 @@
#include "agos/agos.h"
-namespace Simon {
+namespace AGOS {
static DetectedGameList GAME_detectGames(const FSList &fslist);
}
@@ -116,7 +116,7 @@ GameDescriptor Engine_AGOS_findGameID(const char *gameid) {
}
DetectedGameList Engine_AGOS_detectGames(const FSList &fslist) {
- return Simon::GAME_detectGames(fslist);
+ return AGOS::GAME_detectGames(fslist);
}
PluginError Engine_AGOS_create(OSystem *syst, Engine **engine) {
@@ -142,7 +142,7 @@ PluginError Engine_AGOS_create(OSystem *syst, Engine **engine) {
FSList fslist;
FilesystemNode dir(ConfMan.get("path"));
if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
- warning("SimonEngine: invalid game path '%s'", dir.path().c_str());
+ warning("AGOSEngine: invalid game path '%s'", dir.path().c_str());
return kInvalidPathError;
}
@@ -151,18 +151,18 @@ PluginError Engine_AGOS_create(OSystem *syst, Engine **engine) {
for (uint i = 0; i < detectedGames.size(); i++) {
if (detectedGames[i].gameid == gameid) {
- *engine = new Simon::SimonEngine(syst);
+ *engine = new AGOS::AGOSEngine(syst);
return kNoError;
}
}
- warning("SimonEngine: Unable to locate game data at path '%s'", dir.path().c_str());
+ warning("AGOSEngine: Unable to locate game data at path '%s'", dir.path().c_str());
return kNoGameDataFoundError;
}
REGISTER_PLUGIN(AGOS, "AGOS", "AGOS (C) Adventure Soft");
-namespace Simon {
+namespace AGOS {
#define FILE_MD5_BYTES 5000
@@ -1649,7 +1649,7 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P
return j;
}
-bool SimonEngine::initGame() {
+bool AGOSEngine::initGame() {
uint16 gameCount = ARRAYSIZE(gameDescriptions);
int gameNumber = -1;
@@ -1679,7 +1679,7 @@ bool SimonEngine::initGame() {
free(matches);
if (gameNumber >= gameCount || gameNumber == -1) {
- error("SimonEngine::loadGame wrong gameNumber");
+ error("AGOSEngine::loadGame wrong gameNumber");
}
debug(2, "Running %s", toDetectedGame(gameDescriptions[gameNumber]).description.c_str());
@@ -1701,4 +1701,4 @@ DetectedGameList GAME_detectGames(const FSList &fslist) {
return detectedGames;
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp
index 2904d9024d..1844499866 100644
--- a/engines/agos/icons.cpp
+++ b/engines/agos/icons.cpp
@@ -27,9 +27,9 @@
#include "agos/agos.h"
-namespace Simon {
+namespace AGOS {
-void SimonEngine::loadIconFile() {
+void AGOSEngine::loadIconFile() {
Common::File in;
uint size;
@@ -47,7 +47,7 @@ void SimonEngine::loadIconFile() {
in.close();
}
-void SimonEngine::loadIconData() {
+void AGOSEngine::loadIconData() {
loadZone(8);
VgaPointersEntry *vpe = &_vgaBufferPointers[8];
@@ -163,7 +163,7 @@ static void decompressIcon(byte *dst, byte *src, uint w, uint h_org, byte base,
}
}
-void SimonEngine::draw_icon_c(WindowBlock *window, uint icon, uint x, uint y) {
+void AGOSEngine::draw_icon_c(WindowBlock *window, uint icon, uint x, uint y) {
byte *dst;
byte *src;
@@ -202,7 +202,7 @@ void SimonEngine::draw_icon_c(WindowBlock *window, uint icon, uint x, uint y) {
_lockWord &= ~0x8000;
}
-void SimonEngine::drawIconArray(uint num, Item *itemRef, int line, int classMask) {
+void AGOSEngine::drawIconArray(uint num, Item *itemRef, int line, int classMask) {
if (getGameType() == GType_FF) {
drawIconArray_FF(num, itemRef, line, classMask);
} else {
@@ -210,7 +210,7 @@ void SimonEngine::drawIconArray(uint num, Item *itemRef, int line, int classMask
}
}
-void SimonEngine::drawIconArray_Simon(uint num, Item *itemRef, int line, int classMask) {
+void AGOSEngine::drawIconArray_Simon(uint num, Item *itemRef, int line, int classMask) {
Item *item_ptr_org = itemRef;
WindowBlock *window;
uint width, height;
@@ -306,7 +306,7 @@ void SimonEngine::drawIconArray_Simon(uint num, Item *itemRef, int line, int cla
}
}
-void SimonEngine::drawIconArray_FF(uint num, Item *itemRef, int line, int classMask) {
+void AGOSEngine::drawIconArray_FF(uint num, Item *itemRef, int line, int classMask) {
Item *item_ptr_org = itemRef;
WindowBlock *window;
uint16 flagnumber = 201;
@@ -410,7 +410,7 @@ l1:; itemRef = derefItem(itemRef->sibling);
window->iconPtr->downArrow = _scrollDownHitArea;
}
-void SimonEngine::defineArrowBoxes(WindowBlock *window) {
+void AGOSEngine::defineArrowBoxes(WindowBlock *window) {
HitArea *ha;
ha = findEmptyHitArea();
@@ -486,7 +486,7 @@ void SimonEngine::defineArrowBoxes(WindowBlock *window) {
}
}
-uint SimonEngine::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr) {
+uint AGOSEngine::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr) {
HitArea *ha;
ha = findEmptyHitArea();
@@ -526,7 +526,7 @@ uint SimonEngine::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y
return ha - _hitAreas;
}
-void SimonEngine::removeIconArray(uint num) {
+void AGOSEngine::removeIconArray(uint num) {
WindowBlock *window;
uint16 curWindow;
uint16 i;
@@ -564,8 +564,8 @@ void SimonEngine::removeIconArray(uint num) {
_fcsData2[num] = 0;
}
-void SimonEngine::removeArrows(WindowBlock *window, uint num) {
+void AGOSEngine::removeArrows(WindowBlock *window, uint num) {
stopAnimateSimon1(128);
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/intern.h b/engines/agos/intern.h
index 587eca621c..13ed39156f 100644
--- a/engines/agos/intern.h
+++ b/engines/agos/intern.h
@@ -24,7 +24,7 @@
#ifndef AGOS_INTERN_H
#define AGOS_INTERN_H
-namespace Simon {
+namespace AGOS {
struct Child {
Child *next;
@@ -257,6 +257,6 @@ enum GameIds {
GID_SWAMPY
};
-} // End of namespace Simon
+} // End of namespace AGOS
#endif
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index b908d0f5ab..8c102898df 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -34,187 +34,187 @@
extern bool isSmartphone(void);
#endif
-namespace Simon {
+namespace AGOS {
// Opcode table
-void SimonEngine::setupOpcodes() {
+void AGOSEngine::setupOpcodes() {
// This opcode table is for Simon 1. Changes for Simon 2 and FF are
// made below.
static OpcodeProc opcode_table[200] = {
// 0 - 4
NULL,
- &SimonEngine::o_at,
- &SimonEngine::o_notAt,
+ &AGOSEngine::o_at,
+ &AGOSEngine::o_notAt,
NULL,
NULL,
// 5 - 9
- &SimonEngine::o_carried,
- &SimonEngine::o_notCarried,
- &SimonEngine::o_isAt,
+ &AGOSEngine::o_carried,
+ &AGOSEngine::o_notCarried,
+ &AGOSEngine::o_isAt,
NULL,
NULL,
// 10 - 14
NULL,
- &SimonEngine::o_zero,
- &SimonEngine::o_notZero,
- &SimonEngine::o_eq,
- &SimonEngine::o_notEq,
+ &AGOSEngine::o_zero,
+ &AGOSEngine::o_notZero,
+ &AGOSEngine::o_eq,
+ &AGOSEngine::o_notEq,
// 15 - 19
- &SimonEngine::o_gt,
- &SimonEngine::o_lt,
- &SimonEngine::o_eqf,
- &SimonEngine::o_notEqf,
- &SimonEngine::o_ltf,
+ &AGOSEngine::o_gt,
+ &AGOSEngine::o_lt,
+ &AGOSEngine::o_eqf,
+ &AGOSEngine::o_notEqf,
+ &AGOSEngine::o_ltf,
// 20 - 24
- &SimonEngine::o_gtf,
+ &AGOSEngine::o_gtf,
NULL,
NULL,
- &SimonEngine::o_chance,
+ &AGOSEngine::o_chance,
NULL,
// 25 - 29
- &SimonEngine::o_isRoom,
- &SimonEngine::o_isObject,
- &SimonEngine::o_state,
- &SimonEngine::o_oflag,
+ &AGOSEngine::o_isRoom,
+ &AGOSEngine::o_isObject,
+ &AGOSEngine::o_state,
+ &AGOSEngine::o_oflag,
NULL,
// 30 - 34
NULL,
- &SimonEngine::o_destroy,
+ &AGOSEngine::o_destroy,
NULL,
- &SimonEngine::o_place,
+ &AGOSEngine::o_place,
NULL,
// 35 - 39
NULL,
- &SimonEngine::o_copyff,
+ &AGOSEngine::o_copyff,
NULL,
NULL,
NULL,
// 40 - 44
NULL,
- &SimonEngine::o_clear,
- &SimonEngine::o_let,
- &SimonEngine::o_add,
- &SimonEngine::o_sub,
+ &AGOSEngine::o_clear,
+ &AGOSEngine::o_let,
+ &AGOSEngine::o_add,
+ &AGOSEngine::o_sub,
// 45 - 49
- &SimonEngine::o_addf,
- &SimonEngine::o_subf,
- &SimonEngine::o_mul,
- &SimonEngine::o_div,
- &SimonEngine::o_mulf,
+ &AGOSEngine::o_addf,
+ &AGOSEngine::o_subf,
+ &AGOSEngine::o_mul,
+ &AGOSEngine::o_div,
+ &AGOSEngine::o_mulf,
// 50 - 54
- &SimonEngine::o_divf,
- &SimonEngine::o_mod,
- &SimonEngine::o_modf,
- &SimonEngine::o_random,
+ &AGOSEngine::o_divf,
+ &AGOSEngine::o_mod,
+ &AGOSEngine::o_modf,
+ &AGOSEngine::o_random,
NULL,
// 55 - 59
- &SimonEngine::o_goto,
- &SimonEngine::o_oset,
- &SimonEngine::o_oclear,
- &SimonEngine::o_putBy,
- &SimonEngine::o_inc,
+ &AGOSEngine::o_goto,
+ &AGOSEngine::o_oset,
+ &AGOSEngine::o_oclear,
+ &AGOSEngine::o_putBy,
+ &AGOSEngine::o_inc,
// 60 - 64
- &SimonEngine::o_dec,
- &SimonEngine::o_setState,
- &SimonEngine::o_print,
- &SimonEngine::o_message,
- &SimonEngine::o_msg,
+ &AGOSEngine::o_dec,
+ &AGOSEngine::o_setState,
+ &AGOSEngine::o_print,
+ &AGOSEngine::o_message,
+ &AGOSEngine::o_msg,
// 65 - 69
- &SimonEngine::o_addTextBox,
- &SimonEngine::o_setShortText,
- &SimonEngine::o_setLongText,
- &SimonEngine::o_end,
- &SimonEngine::o_done,
+ &AGOSEngine::o_addTextBox,
+ &AGOSEngine::o_setShortText,
+ &AGOSEngine::o_setLongText,
+ &AGOSEngine::o_end,
+ &AGOSEngine::o_done,
// 70 - 74
NULL,
- &SimonEngine::o_process,
+ &AGOSEngine::o_process,
NULL,
NULL,
NULL,
// 75 - 79
NULL,
- &SimonEngine::o_when,
- &SimonEngine::o_if1,
- &SimonEngine::o_if2,
- &SimonEngine::o_isCalled,
+ &AGOSEngine::o_when,
+ &AGOSEngine::o_if1,
+ &AGOSEngine::o_if2,
+ &AGOSEngine::o_isCalled,
// 80 - 84
- &SimonEngine::o_is,
+ &AGOSEngine::o_is,
NULL,
- &SimonEngine::o_debug,
+ &AGOSEngine::o_debug,
NULL,
NULL,
// 85 - 89
NULL,
NULL,
- &SimonEngine::o_comment,
- &SimonEngine::o_haltAnimation,
- &SimonEngine::o_restartAnimation,
+ &AGOSEngine::o_comment,
+ &AGOSEngine::o_haltAnimation,
+ &AGOSEngine::o_restartAnimation,
// 90 - 94
- &SimonEngine::o_getParent,
- &SimonEngine::o_getNext,
- &SimonEngine::o_getChildren,
+ &AGOSEngine::o_getParent,
+ &AGOSEngine::o_getNext,
+ &AGOSEngine::o_getChildren,
NULL,
NULL,
// 95 - 99
NULL,
- &SimonEngine::o_picture,
- &SimonEngine::o_loadZone,
+ &AGOSEngine::o_picture,
+ &AGOSEngine::o_loadZone,
NULL,
NULL,
// 100 - 104
- &SimonEngine::o_killAnimate,
- &SimonEngine::o_defWindow,
- &SimonEngine::o_window,
- &SimonEngine::o_cls,
- &SimonEngine::o_closeWindow,
+ &AGOSEngine::o_killAnimate,
+ &AGOSEngine::o_defWindow,
+ &AGOSEngine::o_window,
+ &AGOSEngine::o_cls,
+ &AGOSEngine::o_closeWindow,
// 105 - 109
NULL,
NULL,
- &SimonEngine::o_addBox,
- &SimonEngine::o_delBox,
- &SimonEngine::o_enableBox,
+ &AGOSEngine::o_addBox,
+ &AGOSEngine::o_delBox,
+ &AGOSEngine::o_enableBox,
// 110 - 114
- &SimonEngine::o_disableBox,
- &SimonEngine::o_moveBox,
+ &AGOSEngine::o_disableBox,
+ &AGOSEngine::o_moveBox,
NULL,
NULL,
- &SimonEngine::o_doIcons,
+ &AGOSEngine::o_doIcons,
// 115 - 119
- &SimonEngine::o_isClass,
- &SimonEngine::o_setClass,
- &SimonEngine::o_unsetClass,
+ &AGOSEngine::o_isClass,
+ &AGOSEngine::o_setClass,
+ &AGOSEngine::o_unsetClass,
NULL,
- &SimonEngine::o_waitSync,
+ &AGOSEngine::o_waitSync,
// 120 - 124
- &SimonEngine::o_sync,
- &SimonEngine::o_defObj,
+ &AGOSEngine::o_sync,
+ &AGOSEngine::o_defObj,
NULL,
NULL,
NULL,
// 125 - 129
- &SimonEngine::o_here,
- &SimonEngine::o_doClassIcons,
+ &AGOSEngine::o_here,
+ &AGOSEngine::o_doClassIcons,
NULL,
- &SimonEngine::o_waitEndTune,
- &SimonEngine::o_ifEndTune,
+ &AGOSEngine::o_waitEndTune,
+ &AGOSEngine::o_ifEndTune,
// 130 - 134
- &SimonEngine::o_setAdjNoun,
+ &AGOSEngine::o_setAdjNoun,
NULL,
- &SimonEngine::o_saveUserGame,
- &SimonEngine::o_loadUserGame,
- &SimonEngine::o_stopTune,
+ &AGOSEngine::o_saveUserGame,
+ &AGOSEngine::o_loadUserGame,
+ &AGOSEngine::o_stopTune,
// 135 - 139
- &SimonEngine::o_pauseGame,
- &SimonEngine::o_copysf,
- &SimonEngine::o_restoreIcons,
- &SimonEngine::o_freezeZones,
- &SimonEngine::o_placeNoIcons,
+ &AGOSEngine::o_pauseGame,
+ &AGOSEngine::o_copysf,
+ &AGOSEngine::o_restoreIcons,
+ &AGOSEngine::o_freezeZones,
+ &AGOSEngine::o_placeNoIcons,
// 140 - 144
- &SimonEngine::o_clearTimers,
- &SimonEngine::o_setDollar,
- &SimonEngine::o_isBox,
- &SimonEngine::o_doTable,
+ &AGOSEngine::o_clearTimers,
+ &AGOSEngine::o_setDollar,
+ &AGOSEngine::o_isBox,
+ &AGOSEngine::o_doTable,
NULL,
// 145 - 149
NULL,
@@ -224,28 +224,28 @@ void SimonEngine::setupOpcodes() {
NULL,
// 150 - 154
NULL,
- &SimonEngine::o_storeItem,
- &SimonEngine::o_getItem,
- &SimonEngine::o_bSet,
- &SimonEngine::o_bClear,
+ &AGOSEngine::o_storeItem,
+ &AGOSEngine::o_getItem,
+ &AGOSEngine::o_bSet,
+ &AGOSEngine::o_bClear,
// 155 - 159
- &SimonEngine::o_bZero,
- &SimonEngine::o_bNotZero,
- &SimonEngine::o_getOValue,
- &SimonEngine::o_setOValue,
+ &AGOSEngine::o_bZero,
+ &AGOSEngine::o_bNotZero,
+ &AGOSEngine::o_getOValue,
+ &AGOSEngine::o_setOValue,
NULL,
// 160 - 164
- &SimonEngine::o_ink,
- &SimonEngine::o_screenTextBox,
- &SimonEngine::o_screenTextMsg,
- &SimonEngine::o_playEffect,
- &SimonEngine::o_getDollar2,
+ &AGOSEngine::o_ink,
+ &AGOSEngine::o_screenTextBox,
+ &AGOSEngine::o_screenTextMsg,
+ &AGOSEngine::o_playEffect,
+ &AGOSEngine::o_getDollar2,
// 165 - 169
- &SimonEngine::o_isAdjNoun,
- &SimonEngine::o_b2Set,
- &SimonEngine::o_b2Clear,
- &SimonEngine::o_b2Zero,
- &SimonEngine::o_b2NotZero,
+ &AGOSEngine::o_isAdjNoun,
+ &AGOSEngine::o_b2Set,
+ &AGOSEngine::o_b2Clear,
+ &AGOSEngine::o_b2Zero,
+ &AGOSEngine::o_b2NotZero,
// 170 - 174
NULL,
NULL,
@@ -253,20 +253,20 @@ void SimonEngine::setupOpcodes() {
NULL,
NULL,
// 175 - 179
- &SimonEngine::o_lockZones,
- &SimonEngine::o_unlockZones,
+ &AGOSEngine::o_lockZones,
+ &AGOSEngine::o_unlockZones,
NULL,
- &SimonEngine::o_getPathPosn,
- &SimonEngine::o_scnTxtLongText,
+ &AGOSEngine::o_getPathPosn,
+ &AGOSEngine::o_scnTxtLongText,
// 180 - 184
- &SimonEngine::o_mouseOn,
+ &AGOSEngine::o_mouseOn,
NULL,
NULL,
NULL,
- &SimonEngine::o_unloadZone,
+ &AGOSEngine::o_unloadZone,
// 185 - 189
NULL,
- &SimonEngine::o_unfreezeZones,
+ &AGOSEngine::o_unfreezeZones,
NULL,
NULL,
NULL,
@@ -291,24 +291,24 @@ void SimonEngine::setupOpcodes() {
case GType_ELVIRA:
case GType_ELVIRA2:
// Confirmed
- opcode_table[48] = &SimonEngine::o_destroy;
- opcode_table[51] = &SimonEngine::o_place;
- opcode_table[91] = &SimonEngine::o_message;
-
- opcode_table[70] = &SimonEngine::o1_printLongText;
- opcode_table[83] = &SimonEngine::o1_rescan;
- opcode_table[98] = &SimonEngine::o1_animate;
- opcode_table[99] = &SimonEngine::o1_stopAnimate;
- opcode_table[85] = &SimonEngine::oww_whereTo;
- opcode_table[105] = &SimonEngine::oww_menu;
- opcode_table[106] = &SimonEngine::oww_textMenu;
- opcode_table[127] = &SimonEngine::o1_playTune;
- opcode_table[148] = &SimonEngine::oww_ifDoorOpen;
- opcode_table[179] = &SimonEngine::o_isAdjNoun;
- opcode_table[180] = &SimonEngine::o_b2Set;
- opcode_table[181] = &SimonEngine::o_b2Clear;
- opcode_table[182] = &SimonEngine::o_b2Zero;
- opcode_table[183] = &SimonEngine::o_b2NotZero;
+ opcode_table[48] = &AGOSEngine::o_destroy;
+ opcode_table[51] = &AGOSEngine::o_place;
+ opcode_table[91] = &AGOSEngine::o_message;
+
+ opcode_table[70] = &AGOSEngine::o1_printLongText;
+ opcode_table[83] = &AGOSEngine::o1_rescan;
+ opcode_table[98] = &AGOSEngine::o1_animate;
+ opcode_table[99] = &AGOSEngine::o1_stopAnimate;
+ opcode_table[85] = &AGOSEngine::oww_whereTo;
+ opcode_table[105] = &AGOSEngine::oww_menu;
+ opcode_table[106] = &AGOSEngine::oww_textMenu;
+ opcode_table[127] = &AGOSEngine::o1_playTune;
+ opcode_table[148] = &AGOSEngine::oww_ifDoorOpen;
+ opcode_table[179] = &AGOSEngine::o_isAdjNoun;
+ opcode_table[180] = &AGOSEngine::o_b2Set;
+ opcode_table[181] = &AGOSEngine::o_b2Clear;
+ opcode_table[182] = &AGOSEngine::o_b2Zero;
+ opcode_table[183] = &AGOSEngine::o_b2NotZero;
// Code difference, check if triggered
opcode_table[161] = NULL;
@@ -339,20 +339,20 @@ void SimonEngine::setupOpcodes() {
break;
case GType_WW:
// Confirmed
- opcode_table[70] = &SimonEngine::o1_printLongText;
- opcode_table[83] = &SimonEngine::o1_rescan;
- opcode_table[98] = &SimonEngine::o1_animate;
- opcode_table[99] = &SimonEngine::o1_stopAnimate;
- opcode_table[85] = &SimonEngine::oww_whereTo;
- opcode_table[105] = &SimonEngine::oww_menu;
- opcode_table[106] = &SimonEngine::oww_textMenu;
- opcode_table[127] = &SimonEngine::o1_playTune;
- opcode_table[148] = &SimonEngine::oww_ifDoorOpen;
- opcode_table[179] = &SimonEngine::o_isAdjNoun;
- opcode_table[180] = &SimonEngine::o_b2Set;
- opcode_table[181] = &SimonEngine::o_b2Clear;
- opcode_table[182] = &SimonEngine::o_b2Zero;
- opcode_table[183] = &SimonEngine::o_b2NotZero;
+ opcode_table[70] = &AGOSEngine::o1_printLongText;
+ opcode_table[83] = &AGOSEngine::o1_rescan;
+ opcode_table[98] = &AGOSEngine::o1_animate;
+ opcode_table[99] = &AGOSEngine::o1_stopAnimate;
+ opcode_table[85] = &AGOSEngine::oww_whereTo;
+ opcode_table[105] = &AGOSEngine::oww_menu;
+ opcode_table[106] = &AGOSEngine::oww_textMenu;
+ opcode_table[127] = &AGOSEngine::o1_playTune;
+ opcode_table[148] = &AGOSEngine::oww_ifDoorOpen;
+ opcode_table[179] = &AGOSEngine::o_isAdjNoun;
+ opcode_table[180] = &AGOSEngine::o_b2Set;
+ opcode_table[181] = &AGOSEngine::o_b2Clear;
+ opcode_table[182] = &AGOSEngine::o_b2Zero;
+ opcode_table[183] = &AGOSEngine::o_b2NotZero;
// Code difference, check if triggered
opcode_table[161] = NULL;
@@ -382,138 +382,138 @@ void SimonEngine::setupOpcodes() {
opcode_table[190] = NULL;
break;
case GType_SIMON1:
- opcode_table[70] = &SimonEngine::o1_printLongText;
- opcode_table[83] = &SimonEngine::o1_rescan;
- opcode_table[98] = &SimonEngine::o1_animate;
- opcode_table[99] = &SimonEngine::o1_stopAnimate;
- opcode_table[127] = &SimonEngine::o1_playTune;
- opcode_table[177] = &SimonEngine::o1_screenTextPObj;
- opcode_table[181] = &SimonEngine::o1_mouseOff;
- opcode_table[182] = &SimonEngine::o1_loadBeard;
- opcode_table[183] = &SimonEngine::o1_unloadBeard;
- opcode_table[185] = &SimonEngine::o1_loadStrings;
- opcode_table[187] = &SimonEngine::o1_specialFade;
+ opcode_table[70] = &AGOSEngine::o1_printLongText;
+ opcode_table[83] = &AGOSEngine::o1_rescan;
+ opcode_table[98] = &AGOSEngine::o1_animate;
+ opcode_table[99] = &AGOSEngine::o1_stopAnimate;
+ opcode_table[127] = &AGOSEngine::o1_playTune;
+ opcode_table[177] = &AGOSEngine::o1_screenTextPObj;
+ opcode_table[181] = &AGOSEngine::o1_mouseOff;
+ opcode_table[182] = &AGOSEngine::o1_loadBeard;
+ opcode_table[183] = &AGOSEngine::o1_unloadBeard;
+ opcode_table[185] = &AGOSEngine::o1_loadStrings;
+ opcode_table[187] = &AGOSEngine::o1_specialFade;
break;
case GType_SIMON2:
- opcode_table[70] = &SimonEngine::o2_printLongText;
- opcode_table[83] = &SimonEngine::o2_rescan;
- opcode_table[98] = &SimonEngine::o2_animate;
- opcode_table[99] = &SimonEngine::o2_stopAnimate;
- opcode_table[127] = &SimonEngine::o2_playTune;
- opcode_table[177] = &SimonEngine::o2_screenTextPObj;
- opcode_table[181] = &SimonEngine::o2_mouseOff;
- opcode_table[188] = &SimonEngine::o2_isShortText;
- opcode_table[189] = &SimonEngine::o2_clearMarks;
- opcode_table[190] = &SimonEngine::o2_waitMark;
+ opcode_table[70] = &AGOSEngine::o2_printLongText;
+ opcode_table[83] = &AGOSEngine::o2_rescan;
+ opcode_table[98] = &AGOSEngine::o2_animate;
+ opcode_table[99] = &AGOSEngine::o2_stopAnimate;
+ opcode_table[127] = &AGOSEngine::o2_playTune;
+ opcode_table[177] = &AGOSEngine::o2_screenTextPObj;
+ opcode_table[181] = &AGOSEngine::o2_mouseOff;
+ opcode_table[188] = &AGOSEngine::o2_isShortText;
+ opcode_table[189] = &AGOSEngine::o2_clearMarks;
+ opcode_table[190] = &AGOSEngine::o2_waitMark;
break;
case GType_FF:
- opcode_table[23] = &SimonEngine::o3_chance;
- opcode_table[37] = &SimonEngine::o3_jumpOut;
- opcode_table[65] = &SimonEngine::o3_addTextBox;
- opcode_table[70] = &SimonEngine::o3_printLongText;
- opcode_table[83] = &SimonEngine::o2_rescan;
- opcode_table[98] = &SimonEngine::o2_animate;
- opcode_table[99] = &SimonEngine::o2_stopAnimate;
- opcode_table[107] = &SimonEngine::o3_addBox;
- opcode_table[122] = &SimonEngine::o3_oracleTextDown;
- opcode_table[123] = &SimonEngine::o3_oracleTextUp;
- opcode_table[124] = &SimonEngine::o3_ifTime;
- opcode_table[127] = &SimonEngine::o3_playTune;
- opcode_table[131] = &SimonEngine::o3_setTime;
- opcode_table[132] = &SimonEngine::o3_saveUserGame,
- opcode_table[133] = &SimonEngine::o3_loadUserGame;
- opcode_table[134] = &SimonEngine::o3_listSaveGames;
- opcode_table[135] = &SimonEngine::o3_checkCD;
- opcode_table[161] = &SimonEngine::o3_screenTextBox;
- opcode_table[165] = &SimonEngine::o3_isAdjNoun;
- opcode_table[171] = &SimonEngine::o3_hyperLinkOn;
- opcode_table[172] = &SimonEngine::o3_hyperLinkOff;
- opcode_table[173] = &SimonEngine::o3_checkPaths;
- opcode_table[177] = &SimonEngine::o3_screenTextPObj;
- opcode_table[181] = &SimonEngine::o3_mouseOff;
- opcode_table[182] = &SimonEngine::o3_loadVideo;
- opcode_table[183] = &SimonEngine::o3_playVideo;
- opcode_table[187] = &SimonEngine::o3_centreScroll;
- opcode_table[188] = &SimonEngine::o2_isShortText;
- opcode_table[189] = &SimonEngine::o2_clearMarks;
- opcode_table[190] = &SimonEngine::o2_waitMark;
- opcode_table[191] = &SimonEngine::o3_resetPVCount;
- opcode_table[192] = &SimonEngine::o3_setPathValues;
- opcode_table[193] = &SimonEngine::o3_stopClock;
- opcode_table[194] = &SimonEngine::o3_restartClock;
- opcode_table[195] = &SimonEngine::o3_setColour;
- opcode_table[196] = &SimonEngine::o3_b3Set;
- opcode_table[197] = &SimonEngine::o3_b3Clear;
- opcode_table[198] = &SimonEngine::o3_b3Zero;
- opcode_table[199] = &SimonEngine::o3_b3NotZero;
+ opcode_table[23] = &AGOSEngine::o3_chance;
+ opcode_table[37] = &AGOSEngine::o3_jumpOut;
+ opcode_table[65] = &AGOSEngine::o3_addTextBox;
+ opcode_table[70] = &AGOSEngine::o3_printLongText;
+ opcode_table[83] = &AGOSEngine::o2_rescan;
+ opcode_table[98] = &AGOSEngine::o2_animate;
+ opcode_table[99] = &AGOSEngine::o2_stopAnimate;
+ opcode_table[107] = &AGOSEngine::o3_addBox;
+ opcode_table[122] = &AGOSEngine::o3_oracleTextDown;
+ opcode_table[123] = &AGOSEngine::o3_oracleTextUp;
+ opcode_table[124] = &AGOSEngine::o3_ifTime;
+ opcode_table[127] = &AGOSEngine::o3_playTune;
+ opcode_table[131] = &AGOSEngine::o3_setTime;
+ opcode_table[132] = &AGOSEngine::o3_saveUserGame,
+ opcode_table[133] = &AGOSEngine::o3_loadUserGame;
+ opcode_table[134] = &AGOSEngine::o3_listSaveGames;
+ opcode_table[135] = &AGOSEngine::o3_checkCD;
+ opcode_table[161] = &AGOSEngine::o3_screenTextBox;
+ opcode_table[165] = &AGOSEngine::o3_isAdjNoun;
+ opcode_table[171] = &AGOSEngine::o3_hyperLinkOn;
+ opcode_table[172] = &AGOSEngine::o3_hyperLinkOff;
+ opcode_table[173] = &AGOSEngine::o3_checkPaths;
+ opcode_table[177] = &AGOSEngine::o3_screenTextPObj;
+ opcode_table[181] = &AGOSEngine::o3_mouseOff;
+ opcode_table[182] = &AGOSEngine::o3_loadVideo;
+ opcode_table[183] = &AGOSEngine::o3_playVideo;
+ opcode_table[187] = &AGOSEngine::o3_centreScroll;
+ opcode_table[188] = &AGOSEngine::o2_isShortText;
+ opcode_table[189] = &AGOSEngine::o2_clearMarks;
+ opcode_table[190] = &AGOSEngine::o2_waitMark;
+ opcode_table[191] = &AGOSEngine::o3_resetPVCount;
+ opcode_table[192] = &AGOSEngine::o3_setPathValues;
+ opcode_table[193] = &AGOSEngine::o3_stopClock;
+ opcode_table[194] = &AGOSEngine::o3_restartClock;
+ opcode_table[195] = &AGOSEngine::o3_setColour;
+ opcode_table[196] = &AGOSEngine::o3_b3Set;
+ opcode_table[197] = &AGOSEngine::o3_b3Clear;
+ opcode_table[198] = &AGOSEngine::o3_b3Zero;
+ opcode_table[199] = &AGOSEngine::o3_b3NotZero;
break;
case GType_PP:
// Confirmed
- opcode_table[30] = &SimonEngine::o4_opcode30;
- opcode_table[37] = &SimonEngine::o4_checkTiles;
- opcode_table[38] = &SimonEngine::o4_opcode38;
- opcode_table[105] = &SimonEngine::o4_loadHiScores;
- opcode_table[106] = &SimonEngine::o4_checkHiScores;
- opcode_table[133] = &SimonEngine::o4_loadUserGame;
+ opcode_table[30] = &AGOSEngine::o4_opcode30;
+ opcode_table[37] = &AGOSEngine::o4_checkTiles;
+ opcode_table[38] = &AGOSEngine::o4_opcode38;
+ opcode_table[105] = &AGOSEngine::o4_loadHiScores;
+ opcode_table[106] = &AGOSEngine::o4_checkHiScores;
+ opcode_table[133] = &AGOSEngine::o4_loadUserGame;
opcode_table[166] = NULL;
opcode_table[167] = NULL;
opcode_table[168] = NULL;
opcode_table[169] = NULL;
- opcode_table[173] = &SimonEngine::o4_saveOopsPosition;
- opcode_table[191] = &SimonEngine::o4_resetPVCount;
- opcode_table[192] = &SimonEngine::o4_setPathValues;
+ opcode_table[173] = &AGOSEngine::o4_saveOopsPosition;
+ opcode_table[191] = &AGOSEngine::o4_resetPVCount;
+ opcode_table[192] = &AGOSEngine::o4_setPathValues;
// Code difference, check if triggered
- opcode_table[132] = &SimonEngine::o3_saveUserGame,
- opcode_table[187] = &SimonEngine::o4_resetGameTime;
+ opcode_table[132] = &AGOSEngine::o3_saveUserGame,
+ opcode_table[187] = &AGOSEngine::o4_resetGameTime;
// Code difference. Some kind of logging?
- opcode_table[190] = &SimonEngine::o2_waitMark;
+ opcode_table[190] = &AGOSEngine::o2_waitMark;
// To check
- opcode_table[23] = &SimonEngine::o3_chance;
- opcode_table[65] = &SimonEngine::o3_addTextBox;
- opcode_table[70] = &SimonEngine::o3_printLongText;
- opcode_table[83] = &SimonEngine::o2_rescan;
- opcode_table[98] = &SimonEngine::o2_animate;
- opcode_table[99] = &SimonEngine::o2_stopAnimate;
- opcode_table[107] = &SimonEngine::o3_addBox;
- opcode_table[122] = &SimonEngine::o3_oracleTextDown;
- opcode_table[123] = &SimonEngine::o3_oracleTextUp;
- opcode_table[124] = &SimonEngine::o3_ifTime;
- opcode_table[127] = &SimonEngine::o3_playTune;
- opcode_table[131] = &SimonEngine::o3_setTime;
- opcode_table[134] = &SimonEngine::o3_listSaveGames;
- opcode_table[161] = &SimonEngine::o3_screenTextBox;
- opcode_table[165] = &SimonEngine::o3_isAdjNoun;
- opcode_table[171] = &SimonEngine::o3_hyperLinkOn;
- opcode_table[172] = &SimonEngine::o3_hyperLinkOff;
- opcode_table[177] = &SimonEngine::o3_screenTextPObj;
- opcode_table[181] = &SimonEngine::o3_mouseOff;
- opcode_table[188] = &SimonEngine::o2_isShortText;
- opcode_table[189] = &SimonEngine::o2_clearMarks;
- opcode_table[193] = &SimonEngine::o3_stopClock;
- opcode_table[194] = &SimonEngine::o3_restartClock;
- opcode_table[195] = &SimonEngine::o3_setColour;
+ opcode_table[23] = &AGOSEngine::o3_chance;
+ opcode_table[65] = &AGOSEngine::o3_addTextBox;
+ opcode_table[70] = &AGOSEngine::o3_printLongText;
+ opcode_table[83] = &AGOSEngine::o2_rescan;
+ opcode_table[98] = &AGOSEngine::o2_animate;
+ opcode_table[99] = &AGOSEngine::o2_stopAnimate;
+ opcode_table[107] = &AGOSEngine::o3_addBox;
+ opcode_table[122] = &AGOSEngine::o3_oracleTextDown;
+ opcode_table[123] = &AGOSEngine::o3_oracleTextUp;
+ opcode_table[124] = &AGOSEngine::o3_ifTime;
+ opcode_table[127] = &AGOSEngine::o3_playTune;
+ opcode_table[131] = &AGOSEngine::o3_setTime;
+ opcode_table[134] = &AGOSEngine::o3_listSaveGames;
+ opcode_table[161] = &AGOSEngine::o3_screenTextBox;
+ opcode_table[165] = &AGOSEngine::o3_isAdjNoun;
+ opcode_table[171] = &AGOSEngine::o3_hyperLinkOn;
+ opcode_table[172] = &AGOSEngine::o3_hyperLinkOff;
+ opcode_table[177] = &AGOSEngine::o3_screenTextPObj;
+ opcode_table[181] = &AGOSEngine::o3_mouseOff;
+ opcode_table[188] = &AGOSEngine::o2_isShortText;
+ opcode_table[189] = &AGOSEngine::o2_clearMarks;
+ opcode_table[193] = &AGOSEngine::o3_stopClock;
+ opcode_table[194] = &AGOSEngine::o3_restartClock;
+ opcode_table[195] = &AGOSEngine::o3_setColour;
break;
default:
error("setupOpcodes: Unknown game");
}
}
-void SimonEngine::setScriptCondition(bool cond) {
+void AGOSEngine::setScriptCondition(bool cond) {
_runScriptCondition[_recursionDepth] = cond;
}
-bool SimonEngine::getScriptCondition() {
+bool AGOSEngine::getScriptCondition() {
return _runScriptCondition[_recursionDepth];
}
-void SimonEngine::setScriptReturn(int ret) {
+void AGOSEngine::setScriptReturn(int ret) {
_runScriptReturn[_recursionDepth] = ret;
}
-int SimonEngine::getScriptReturn() {
+int AGOSEngine::getScriptReturn() {
return _runScriptReturn[_recursionDepth];
}
@@ -521,91 +521,91 @@ int SimonEngine::getScriptReturn() {
// Common Opcodes
// -----------------------------------------------------------------------
-void SimonEngine::o_at() {
+void AGOSEngine::o_at() {
// 1: ptrA parent is
setScriptCondition(me()->parent == getNextItemID());
}
-void SimonEngine::o_notAt() {
+void AGOSEngine::o_notAt() {
// 2: ptrA parent is not
setScriptCondition(me()->parent != getNextItemID());
}
-void SimonEngine::o_carried() {
+void AGOSEngine::o_carried() {
// 5: parent is 1
setScriptCondition(getNextItemPtr()->parent == getItem1ID());
}
-void SimonEngine::o_notCarried() {
+void AGOSEngine::o_notCarried() {
// 6: parent isnot 1
setScriptCondition(getNextItemPtr()->parent != getItem1ID());
}
-void SimonEngine::o_isAt() {
+void AGOSEngine::o_isAt() {
// 7: parent is
Item *item = getNextItemPtr();
setScriptCondition(item->parent == getNextItemID());
}
-void SimonEngine::o_zero() {
+void AGOSEngine::o_zero() {
// 11: is zero
setScriptCondition(getNextVarContents() == 0);
}
-void SimonEngine::o_notZero() {
+void AGOSEngine::o_notZero() {
// 12: isnot zero
setScriptCondition(getNextVarContents() != 0);
}
-void SimonEngine::o_eq() {
+void AGOSEngine::o_eq() {
// 13: equal
uint tmp = getNextVarContents();
setScriptCondition(tmp == getVarOrWord());
}
-void SimonEngine::o_notEq() {
+void AGOSEngine::o_notEq() {
// 14: not equal
uint tmp = getNextVarContents();
setScriptCondition(tmp != getVarOrWord());
}
-void SimonEngine::o_gt() {
+void AGOSEngine::o_gt() {
// 15: is greater
uint tmp = getNextVarContents();
setScriptCondition(tmp > getVarOrWord());
}
-void SimonEngine::o_lt() {
+void AGOSEngine::o_lt() {
// 16: is less
uint tmp = getNextVarContents();
setScriptCondition(tmp < getVarOrWord());
}
-void SimonEngine::o_eqf() {
+void AGOSEngine::o_eqf() {
// 17: is eq f
uint tmp = getNextVarContents();
setScriptCondition(tmp == getNextVarContents());
}
-void SimonEngine::o_notEqf() {
+void AGOSEngine::o_notEqf() {
// 18: is not equal f
uint tmp = getNextVarContents();
setScriptCondition(tmp != getNextVarContents());
}
-void SimonEngine::o_ltf() {
+void AGOSEngine::o_ltf() {
// 19: is greater f
uint tmp = getNextVarContents();
setScriptCondition(tmp < getNextVarContents());
}
-void SimonEngine::o_gtf() {
+void AGOSEngine::o_gtf() {
// 20: is less f
uint tmp = getNextVarContents();
setScriptCondition(tmp > getNextVarContents());
}
-void SimonEngine::o_chance() {
+void AGOSEngine::o_chance() {
// 23
uint a = getVarOrWord();
@@ -639,88 +639,88 @@ void SimonEngine::o_chance() {
}
}
-void SimonEngine::o_isRoom() {
+void AGOSEngine::o_isRoom() {
// 25: is room
setScriptCondition(isRoom(getNextItemPtr()));
}
-void SimonEngine::o_isObject() {
+void AGOSEngine::o_isObject() {
// 26: is object
setScriptCondition(isObject(getNextItemPtr()));
}
-void SimonEngine::o_state() {
+void AGOSEngine::o_state() {
// 27: item state is
Item *item = getNextItemPtr();
setScriptCondition((uint) item->state == getVarOrWord());
}
-void SimonEngine::o_oflag() {
+void AGOSEngine::o_oflag() {
// 28: item has prop
SubObject *subObject = (SubObject *)findChildOfType(getNextItemPtr(), 2);
byte num = getVarOrByte();
setScriptCondition(subObject != NULL && (subObject->objectFlags & (1 << num)) != 0);
}
-void SimonEngine::o_destroy() {
+void AGOSEngine::o_destroy() {
// 31: set no parent
setItemParent(getNextItemPtr(), NULL);
}
-void SimonEngine::o_place() {
+void AGOSEngine::o_place() {
// 33: set item parent
Item *item = getNextItemPtr();
setItemParent(item, getNextItemPtr());
}
-void SimonEngine::o_copyff() {
+void AGOSEngine::o_copyff() {
// 36: copy var
uint value = getNextVarContents();
writeNextVarContents(value);
}
-void SimonEngine::o_clear() {
+void AGOSEngine::o_clear() {
// 41: zero var
writeNextVarContents(0);
}
-void SimonEngine::o_let() {
+void AGOSEngine::o_let() {
// 42: set var
uint var = getVarWrapper();
writeVariable(var, getVarOrWord());
}
-void SimonEngine::o_add() {
+void AGOSEngine::o_add() {
// 43: add
uint var = getVarWrapper();
writeVariable(var, readVariable(var) + getVarOrWord());
}
-void SimonEngine::o_sub() {
+void AGOSEngine::o_sub() {
// 44: sub
uint var = getVarWrapper();
writeVariable(var, readVariable(var) - getVarOrWord());
}
-void SimonEngine::o_addf() {
+void AGOSEngine::o_addf() {
// 45: add f
uint var = getVarWrapper();
writeVariable(var, readVariable(var) + getNextVarContents());
}
-void SimonEngine::o_subf() {
+void AGOSEngine::o_subf() {
// 46: sub f
uint var = getVarWrapper();
writeVariable(var, readVariable(var) - getNextVarContents());
}
-void SimonEngine::o_mul() {
+void AGOSEngine::o_mul() {
// 47: mul
uint var = getVarWrapper();
writeVariable(var, readVariable(var) * getVarOrWord());
}
-void SimonEngine::o_div() {
+void AGOSEngine::o_div() {
// 48: div
uint var = getVarWrapper();
int value = getVarOrWord();
@@ -729,13 +729,13 @@ void SimonEngine::o_div() {
writeVariable(var, readVariable(var) / value);
}
-void SimonEngine::o_mulf() {
+void AGOSEngine::o_mulf() {
// 49: mul f
uint var = getVarWrapper();
writeVariable(var, readVariable(var) * getNextVarContents());
}
-void SimonEngine::o_divf() {
+void AGOSEngine::o_divf() {
// 50: div f
uint var = getVarWrapper();
int value = getNextVarContents();
@@ -744,7 +744,7 @@ void SimonEngine::o_divf() {
writeVariable(var, readVariable(var) / value);
}
-void SimonEngine::o_mod() {
+void AGOSEngine::o_mod() {
// 51: mod
uint var = getVarWrapper();
int value = getVarOrWord();
@@ -753,7 +753,7 @@ void SimonEngine::o_mod() {
writeVariable(var, readVariable(var) % value);
}
-void SimonEngine::o_modf() {
+void AGOSEngine::o_modf() {
// 52: mod f
uint var = getVarWrapper();
int value = getNextVarContents();
@@ -762,14 +762,14 @@ void SimonEngine::o_modf() {
writeVariable(var, readVariable(var) % value);
}
-void SimonEngine::o_random() {
+void AGOSEngine::o_random() {
// 53: random
uint var = getVarWrapper();
uint value = (uint16)getVarOrWord();
writeVariable(var, _rnd.getRandomNumber(value - 1));
}
-void SimonEngine::o_goto() {
+void AGOSEngine::o_goto() {
// 55: set itemA parent
uint item = getNextItemID();
if (_itemArrayPtr[item] == NULL) {
@@ -779,7 +779,7 @@ void SimonEngine::o_goto() {
setItemParent(me(), _itemArrayPtr[item]);
}
-void SimonEngine::o_oset() {
+void AGOSEngine::o_oset() {
// 56: set child2 fr bit
SubObject *subObject = (SubObject *)findChildOfType(getNextItemPtr(), 2);
int value = getVarOrByte();
@@ -787,7 +787,7 @@ void SimonEngine::o_oset() {
subObject->objectFlags |= (1 << value);
}
-void SimonEngine::o_oclear() {
+void AGOSEngine::o_oclear() {
// 57: clear child2 fr bit
SubObject *subObject = (SubObject *)findChildOfType(getNextItemPtr(), 2);
int value = getVarOrByte();
@@ -795,27 +795,27 @@ void SimonEngine::o_oclear() {
subObject->objectFlags &= ~(1 << value);
}
-void SimonEngine::o_putBy() {
+void AGOSEngine::o_putBy() {
// 58: make siblings
Item *item = getNextItemPtr();
setItemParent(item, derefItem(getNextItemPtr()->parent));
}
-void SimonEngine::o_inc() {
+void AGOSEngine::o_inc() {
// 59: item inc state
Item *item = getNextItemPtr();
if (item->state <= 30000)
setItemState(item, item->state + 1);
}
-void SimonEngine::o_dec() {
+void AGOSEngine::o_dec() {
// 60: item dec state
Item *item = getNextItemPtr();
if (item->state >= 0)
setItemState(item, item->state - 1);
}
-void SimonEngine::o_setState() {
+void AGOSEngine::o_setState() {
// 61: item set state
Item *item = getNextItemPtr();
int value = getVarOrWord();
@@ -826,22 +826,22 @@ void SimonEngine::o_setState() {
setItemState(item, value);
}
-void SimonEngine::o_print() {
+void AGOSEngine::o_print() {
// 62: show int
showMessageFormat("%d", getNextVarContents());
}
-void SimonEngine::o_message() {
+void AGOSEngine::o_message() {
// 63: show string nl
showMessageFormat("%s\n", getStringPtrByID(getNextStringID()));
}
-void SimonEngine::o_msg() {
+void AGOSEngine::o_msg() {
// 64: show string
showMessageFormat("%s", getStringPtrByID(getNextStringID()));
}
-void SimonEngine::o_addTextBox() {
+void AGOSEngine::o_addTextBox() {
// 65: add hit area
uint id = getVarOrWord();
uint x = getVarOrWord();
@@ -853,7 +853,7 @@ void SimonEngine::o_addTextBox() {
defineBox(id, x, y, w, h, (number << 8) + 129, 208, _dummyItem2);
}
-void SimonEngine::o_setShortText() {
+void AGOSEngine::o_setShortText() {
// 66: set item name
uint var = getVarOrByte();
uint stringId = getNextStringID();
@@ -866,7 +866,7 @@ void SimonEngine::o_setShortText() {
}
}
-void SimonEngine::o_setLongText() {
+void AGOSEngine::o_setLongText() {
// 67: set item description
uint var = getVarOrByte();
uint stringId = getNextStringID();
@@ -883,72 +883,72 @@ void SimonEngine::o_setLongText() {
}
}
-void SimonEngine::o_end() {
+void AGOSEngine::o_end() {
// 68: exit interpreter
shutdown();
}
-void SimonEngine::o_done() {
+void AGOSEngine::o_done() {
// 69: return 1
setScriptReturn(1);
}
-void SimonEngine::o_process() {
+void AGOSEngine::o_process() {
// 71: start subroutine
Subroutine *sub = getSubroutineByID(getVarOrWord());
if (sub != NULL)
startSubroutine(sub);
}
-void SimonEngine::o_when() {
+void AGOSEngine::o_when() {
// 76: add timeout
uint timeout = getVarOrWord();
addTimeEvent(timeout, getVarOrWord());
}
-void SimonEngine::o_if1() {
+void AGOSEngine::o_if1() {
// 77: has item minus 1
setScriptCondition(_subjectItem != NULL);
}
-void SimonEngine::o_if2() {
+void AGOSEngine::o_if2() {
// 78: has item minus 3
setScriptCondition(_objectItem != NULL);
}
-void SimonEngine::o_isCalled() {
+void AGOSEngine::o_isCalled() {
// 79: childstruct fr2 is
SubObject *subObject = (SubObject *)findChildOfType(getNextItemPtr(), 2);
uint stringId = getNextStringID();
setScriptCondition((subObject != NULL) && subObject->objectName == stringId);
}
-void SimonEngine::o_is() {
+void AGOSEngine::o_is() {
// 80: item equal
setScriptCondition(getNextItemPtr() == getNextItemPtr());
}
-void SimonEngine::o_debug() {
+void AGOSEngine::o_debug() {
// 82: debug opcode
getVarOrByte();
}
-void SimonEngine::o_comment() {
+void AGOSEngine::o_comment() {
// 87: comment
getNextStringID();
}
-void SimonEngine::o_haltAnimation() {
+void AGOSEngine::o_haltAnimation() {
// 88: stop animation
_lockWord |= 0x10;
}
-void SimonEngine::o_restartAnimation() {
+void AGOSEngine::o_restartAnimation() {
// 89: restart animation
_lockWord &= ~0x10;
}
-void SimonEngine::o_getParent() {
+void AGOSEngine::o_getParent() {
// 90: set minusitem to parent
Item *item = derefItem(getNextItemPtr()->parent);
switch (getVarOrByte()) {
@@ -963,7 +963,7 @@ void SimonEngine::o_getParent() {
}
}
-void SimonEngine::o_getNext() {
+void AGOSEngine::o_getNext() {
// 91: set minusitem to sibling
Item *item = derefItem(getNextItemPtr()->sibling);
switch (getVarOrByte()) {
@@ -978,7 +978,7 @@ void SimonEngine::o_getNext() {
}
}
-void SimonEngine::o_getChildren() {
+void AGOSEngine::o_getChildren() {
// 92: set minusitem to child
Item *item = derefItem(getNextItemPtr()->child);
switch (getVarOrByte()) {
@@ -993,7 +993,7 @@ void SimonEngine::o_getChildren() {
}
}
-void SimonEngine::o_picture() {
+void AGOSEngine::o_picture() {
// 96
uint vga_res = getVarOrWord();
uint mode = getVarOrByte();
@@ -1007,7 +1007,7 @@ void SimonEngine::o_picture() {
set_video_mode_internal(mode, vga_res);
}
-void SimonEngine::o_loadZone() {
+void AGOSEngine::o_loadZone() {
// 97: load vga
uint vga_res = getVarOrWord();
@@ -1016,14 +1016,14 @@ void SimonEngine::o_loadZone() {
_lockWord &= ~0x80;
}
-void SimonEngine::o_killAnimate() {
+void AGOSEngine::o_killAnimate() {
// 100: vga reset
_lockWord |= 0x8000;
vc27_resetSprite();
_lockWord &= ~0x8000;
}
-void SimonEngine::o_defWindow() {
+void AGOSEngine::o_defWindow() {
// 101
uint num = getVarOrByte();
uint x = getVarOrWord();
@@ -1050,12 +1050,12 @@ void SimonEngine::o_defWindow() {
}
}
-void SimonEngine::o_window() {
+void AGOSEngine::o_window() {
// 102
changeWindow(getVarOrByte() & 7);
}
-void SimonEngine::o_cls() {
+void AGOSEngine::o_cls() {
// 103
mouseOff();
removeIconArray(_curWindow);
@@ -1065,12 +1065,12 @@ void SimonEngine::o_cls() {
mouseOn();
}
-void SimonEngine::o_closeWindow() {
+void AGOSEngine::o_closeWindow() {
// 104
closeWindow(getVarOrByte() & 7);
}
-void SimonEngine::o_addBox() {
+void AGOSEngine::o_addBox() {
// 107: add item hitarea
uint flags = 0;
uint id = getVarOrWord();
@@ -1104,22 +1104,22 @@ void SimonEngine::o_addBox() {
defineBox(id, x, y, w, h, flags, verb, item);
}
-void SimonEngine::o_delBox() {
+void AGOSEngine::o_delBox() {
// 108: delete hitarea
undefineBox(getVarOrWord());
}
-void SimonEngine::o_enableBox() {
+void AGOSEngine::o_enableBox() {
// 109: clear hitarea bit 0x40
enableBox(getVarOrWord());
}
-void SimonEngine::o_disableBox() {
+void AGOSEngine::o_disableBox() {
// 110: set hitarea bit 0x40
disableBox(getVarOrWord());
}
-void SimonEngine::o_moveBox() {
+void AGOSEngine::o_moveBox() {
// 111: set hitarea xy
uint hitarea_id = getVarOrWord();
uint x = getVarOrWord();
@@ -1127,7 +1127,7 @@ void SimonEngine::o_moveBox() {
moveBox(hitarea_id, x, y);
}
-void SimonEngine::o_doIcons() {
+void AGOSEngine::o_doIcons() {
// 114
Item *item = getNextItemPtr();
uint num = getVarOrByte();
@@ -1136,25 +1136,25 @@ void SimonEngine::o_doIcons() {
mouseOn();
}
-void SimonEngine::o_isClass() {
+void AGOSEngine::o_isClass() {
// 115: item has flag
Item *item = getNextItemPtr();
setScriptCondition((item->classFlags & (1 << getVarOrByte())) != 0);
}
-void SimonEngine::o_setClass() {
+void AGOSEngine::o_setClass() {
// 116: item set flag
Item *item = getNextItemPtr();
item->classFlags |= (1 << getVarOrByte());
}
-void SimonEngine::o_unsetClass() {
+void AGOSEngine::o_unsetClass() {
// 117: item clear flag
Item *item = getNextItemPtr();
item->classFlags &= ~(1 << getVarOrByte());
}
-void SimonEngine::o_waitSync() {
+void AGOSEngine::o_waitSync() {
// 119: wait vga
uint var = getVarOrWord();
_scriptVar2 = (var == 200);
@@ -1164,24 +1164,24 @@ void SimonEngine::o_waitSync() {
_skipVgaWait = false;
}
-void SimonEngine::o_sync() {
+void AGOSEngine::o_sync() {
// 120: sync
sendSync(getVarOrWord());
}
-void SimonEngine::o_defObj() {
+void AGOSEngine::o_defObj() {
// 121: set vga item
uint slot = getVarOrByte();
_objectArray[slot] = getNextItemPtr();
}
-void SimonEngine::o_here() {
+void AGOSEngine::o_here() {
// 125: item is sibling with item 1
Item *item = getNextItemPtr();
setScriptCondition(me()->parent == item->parent);
}
-void SimonEngine::o_doClassIcons() {
+void AGOSEngine::o_doClassIcons() {
// 126
Item *item = getNextItemPtr();
uint num = getVarOrByte();
@@ -1191,18 +1191,18 @@ void SimonEngine::o_doClassIcons() {
mouseOn();
}
-void SimonEngine::o_waitEndTune() {
+void AGOSEngine::o_waitEndTune() {
// 128: dummy instruction
getVarOrWord();
}
-void SimonEngine::o_ifEndTune() {
+void AGOSEngine::o_ifEndTune() {
// 129: dummy instruction
getVarOrWord();
setScriptCondition(true);
}
-void SimonEngine::o_setAdjNoun() {
+void AGOSEngine::o_setAdjNoun() {
// 130: set adj noun
uint var = getVarOrByte();
if (var == 1) {
@@ -1214,27 +1214,27 @@ void SimonEngine::o_setAdjNoun() {
}
}
-void SimonEngine::o_saveUserGame() {
+void AGOSEngine::o_saveUserGame() {
// 132: save game
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
userGame(false);
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
}
-void SimonEngine::o_loadUserGame() {
+void AGOSEngine::o_loadUserGame() {
// 133: load game
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
userGame(true);
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
}
-void SimonEngine::o_stopTune() {
+void AGOSEngine::o_stopTune() {
// 134: dummy opcode?
midi.stop();
_lastMusicPlayed = -1;
}
-void SimonEngine::o_pauseGame() {
+void AGOSEngine::o_pauseGame() {
// 135: quit if user presses y
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
@@ -1288,13 +1288,13 @@ void SimonEngine::o_pauseGame() {
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
}
-void SimonEngine::o_copysf() {
+void AGOSEngine::o_copysf() {
// 136: set var to item unk3
Item *item = getNextItemPtr();
writeNextVarContents(item->state);
}
-void SimonEngine::o_restoreIcons() {
+void AGOSEngine::o_restoreIcons() {
// 137
uint num = getVarOrByte();
WindowBlock *window = _windowArray[num & 7];
@@ -1302,12 +1302,12 @@ void SimonEngine::o_restoreIcons() {
drawIconArray(num, window->iconPtr->itemRef, window->iconPtr->line, window->iconPtr->classMask);
}
-void SimonEngine::o_freezeZones() {
+void AGOSEngine::o_freezeZones() {
// 138: vga pointer op 4
freezeBottom();
}
-void SimonEngine::o_placeNoIcons() {
+void AGOSEngine::o_placeNoIcons() {
// 139: set parent special
Item *item = getNextItemPtr();
_noParentNotify = true;
@@ -1315,13 +1315,13 @@ void SimonEngine::o_placeNoIcons() {
_noParentNotify = false;
}
-void SimonEngine::o_clearTimers() {
+void AGOSEngine::o_clearTimers() {
// 140: del te and add one
killAllTimers();
addTimeEvent(3, 0xA0);
}
-void SimonEngine::o_setDollar() {
+void AGOSEngine::o_setDollar() {
// 141: set m1 to m3
uint which = getVarOrByte();
Item *item = getNextItemPtr();
@@ -1332,12 +1332,12 @@ void SimonEngine::o_setDollar() {
}
}
-void SimonEngine::o_isBox() {
+void AGOSEngine::o_isBox() {
// 142: is hitarea 0x40 clear
setScriptCondition(isBoxDead(getVarOrWord()));
}
-void SimonEngine::o_doTable() {
+void AGOSEngine::o_doTable() {
// 143: start item sub
SubRoom *subRoom = (SubRoom *)findChildOfType(getNextItemPtr(), 1);
if (subRoom != NULL) {
@@ -1347,14 +1347,14 @@ void SimonEngine::o_doTable() {
}
}
-void SimonEngine::o_storeItem() {
+void AGOSEngine::o_storeItem() {
// 151: set array6 to item
uint var = getVarOrByte();
Item *item = getNextItemPtr();
_itemStore[var] = item;
}
-void SimonEngine::o_getItem() {
+void AGOSEngine::o_getItem() {
// 152: set m1 to m3 to array 6
Item *item = _itemStore[getVarOrByte()];
uint var = getVarOrByte();
@@ -1365,22 +1365,22 @@ void SimonEngine::o_getItem() {
}
}
-void SimonEngine::o_bSet() {
+void AGOSEngine::o_bSet() {
// 153: set bit
setBitFlag(getVarWrapper(), true);
}
-void SimonEngine::o_bClear() {
+void AGOSEngine::o_bClear() {
// 154: clear bit
setBitFlag(getVarWrapper(), false);
}
-void SimonEngine::o_bZero() {
+void AGOSEngine::o_bZero() {
// 155: is bit clear
setScriptCondition(!getBitFlag(getVarWrapper()));
}
-void SimonEngine::o_bNotZero() {
+void AGOSEngine::o_bNotZero() {
// 156: is bit set
uint bit = getVarWrapper();
@@ -1392,7 +1392,7 @@ void SimonEngine::o_bNotZero() {
setScriptCondition(getBitFlag(bit));
}
-void SimonEngine::o_getOValue() {
+void AGOSEngine::o_getOValue() {
// 157: get item int prop
Item *item = getNextItemPtr();
SubObject *subObject = (SubObject *)findChildOfType(item, 2);
@@ -1406,7 +1406,7 @@ void SimonEngine::o_getOValue() {
}
}
-void SimonEngine::o_setOValue() {
+void AGOSEngine::o_setOValue() {
// 158: set item prop
Item *item = getNextItemPtr();
SubObject *subObject = (SubObject *)findChildOfType(item, 2);
@@ -1419,12 +1419,12 @@ void SimonEngine::o_setOValue() {
}
}
-void SimonEngine::o_ink() {
+void AGOSEngine::o_ink() {
// 160
setTextColor(getVarOrByte());
}
-void SimonEngine::o_screenTextBox() {
+void AGOSEngine::o_screenTextBox() {
// 161: setup text
TextLocation *tl = getTextLocation(getVarOrByte());
@@ -1433,7 +1433,7 @@ void SimonEngine::o_screenTextBox() {
tl->width = getVarOrWord();
}
-void SimonEngine::o_screenTextMsg() {
+void AGOSEngine::o_screenTextMsg() {
// 162: print string
uint vgaSpriteId = getVarOrByte();
uint color = getVarOrByte();
@@ -1468,7 +1468,7 @@ void SimonEngine::o_screenTextMsg() {
}
-void SimonEngine::o_playEffect() {
+void AGOSEngine::o_playEffect() {
// 163: play sound
uint soundId = getVarOrWord();
@@ -1481,7 +1481,7 @@ void SimonEngine::o_playEffect() {
_sound->playEffects(soundId);
}
-void SimonEngine::o_getDollar2() {
+void AGOSEngine::o_getDollar2() {
// 164
_showPreposition = true;
@@ -1506,49 +1506,49 @@ void SimonEngine::o_getDollar2() {
_showPreposition = false;
}
-void SimonEngine::o_isAdjNoun() {
+void AGOSEngine::o_isAdjNoun() {
// 165: item unk1 unk2 is
Item *item = getNextItemPtr();
int16 a = getNextWord(), b = getNextWord();
setScriptCondition(item->adjective == a && item->noun == b);
}
-void SimonEngine::o_b2Set() {
+void AGOSEngine::o_b2Set() {
// 166: set bit2
uint bit = getVarOrByte();
_bitArrayTwo[bit / 16] |= (1 << (bit & 15));
}
-void SimonEngine::o_b2Clear() {
+void AGOSEngine::o_b2Clear() {
// 167: clear bit2
uint bit = getVarOrByte();
_bitArrayTwo[bit / 16] &= ~(1 << (bit & 15));
}
-void SimonEngine::o_b2Zero() {
+void AGOSEngine::o_b2Zero() {
// 168: is bit2 clear
uint bit = getVarOrByte();
setScriptCondition((_bitArrayTwo[bit / 16] & (1 << (bit & 15))) == 0);
}
-void SimonEngine::o_b2NotZero() {
+void AGOSEngine::o_b2NotZero() {
// 169: is bit2 set
uint bit = getVarOrByte();
setScriptCondition((_bitArrayTwo[bit / 16] & (1 << (bit & 15))) != 0);
}
-void SimonEngine::o_lockZones() {
+void AGOSEngine::o_lockZones() {
// 175: vga pointer op 1
_vgaMemBase = _vgaMemPtr;
}
-void SimonEngine::o_unlockZones() {
+void AGOSEngine::o_unlockZones() {
// 176: vga pointer op 2
_vgaMemPtr = _vgaFrozenBase;
_vgaMemBase = _vgaFrozenBase;
}
-void SimonEngine::o_getPathPosn() {
+void AGOSEngine::o_getPathPosn() {
// 178: path find
uint x = getVarOrWord();
uint y = getVarOrWord();
@@ -1598,7 +1598,7 @@ void SimonEngine::o_getPathPosn() {
writeVariable(var_2, best_j);
}
-void SimonEngine::o_scnTxtLongText() {
+void AGOSEngine::o_scnTxtLongText() {
// 179: conversation responses and room descriptions
uint vgaSpriteId = getVarOrByte();
uint color = getVarOrByte();
@@ -1620,12 +1620,12 @@ void SimonEngine::o_scnTxtLongText() {
printScreenText(vgaSpriteId, color, string_ptr, tl->x, tl->y, tl->width);
}
-void SimonEngine::o_mouseOn() {
+void AGOSEngine::o_mouseOn() {
// 180: force mouseOn
scriptMouseOn();
}
-void SimonEngine::o_unloadZone() {
+void AGOSEngine::o_unloadZone() {
// 184: clear vgapointer entry
uint a = getVarOrWord();
VgaPointersEntry *vpe = &_vgaBufferPointers[a];
@@ -1635,7 +1635,7 @@ void SimonEngine::o_unloadZone() {
vpe->vgaFile2 = NULL;
}
-void SimonEngine::o_unfreezeZones() {
+void AGOSEngine::o_unfreezeZones() {
// 186: vga pointer op 3
unfreezeBottom();
}
@@ -1644,7 +1644,7 @@ void SimonEngine::o_unfreezeZones() {
// Waxworks 1 Opcodes
// -----------------------------------------------------------------------
-void SimonEngine::oww_whereTo() {
+void AGOSEngine::oww_whereTo() {
// 85: where to
Item *i = getNextItemPtr();
int16 d = getVarOrByte();
@@ -1656,12 +1656,12 @@ void SimonEngine::oww_whereTo() {
_objectItem = _itemArrayPtr[getExitOf(i, d)];
}
-void SimonEngine::oww_menu() {
+void AGOSEngine::oww_menu() {
// 105: menu
getVarOrByte();
}
-void SimonEngine::oww_textMenu() {
+void AGOSEngine::oww_textMenu() {
// 106: text menu
/* byte tmp = getVarOrByte();
@@ -1671,7 +1671,7 @@ void SimonEngine::oww_textMenu() {
getVarOrByte();
}
-void SimonEngine::oww_ifDoorOpen() {
+void AGOSEngine::oww_ifDoorOpen() {
// 148: if door open
Item *item = getNextItemPtr();
uint16 d = getVarOrByte();
@@ -1682,18 +1682,18 @@ void SimonEngine::oww_ifDoorOpen() {
// Simon 1 Opcodes
// -----------------------------------------------------------------------
-void SimonEngine::o1_printLongText() {
+void AGOSEngine::o1_printLongText() {
// 70: show string from array
const char *str = (const char *)getStringPtrByID(_longText[getVarOrByte()]);
showMessageFormat("%s\n", str);
}
-void SimonEngine::o1_rescan() {
+void AGOSEngine::o1_rescan() {
// 83: restart subroutine
setScriptReturn(-10);
}
-void SimonEngine::o1_animate() {
+void AGOSEngine::o1_animate() {
// 98: start vga
uint vga_res, vgaSpriteId, windowNum, x, y, palette;
vgaSpriteId = getVarOrWord();
@@ -1705,12 +1705,12 @@ void SimonEngine::o1_animate() {
loadSprite(windowNum, vga_res, vgaSpriteId, x, y, palette);
}
-void SimonEngine::o1_stopAnimate() {
+void AGOSEngine::o1_stopAnimate() {
// 99: kill sprite
stopAnimateSimon1(getVarOrWord());
}
-void SimonEngine::o1_playTune() {
+void AGOSEngine::o1_playTune() {
// 127: deals with music
int music = getVarOrWord();
int track = getVarOrWord();
@@ -1731,7 +1731,7 @@ void SimonEngine::o1_playTune() {
}
}
-void SimonEngine::o1_screenTextPObj() {
+void AGOSEngine::o1_screenTextPObj() {
// 177: inventory descriptions
uint vgaSpriteId = getVarOrByte();
uint color = getVarOrByte();
@@ -1772,12 +1772,12 @@ void SimonEngine::o1_screenTextPObj() {
}
}
-void SimonEngine::o1_mouseOff() {
+void AGOSEngine::o1_mouseOff() {
// 181: force mouseOff
scriptMouseOff();
}
-void SimonEngine::o1_loadBeard() {
+void AGOSEngine::o1_loadBeard() {
// 182: load beard
if (_beardLoaded == false) {
_beardLoaded = true;
@@ -1787,7 +1787,7 @@ void SimonEngine::o1_loadBeard() {
}
}
-void SimonEngine::o1_unloadBeard() {
+void AGOSEngine::o1_unloadBeard() {
// 183: unload beard
if (_beardLoaded == true) {
_beardLoaded = false;
@@ -1797,7 +1797,7 @@ void SimonEngine::o1_unloadBeard() {
}
}
-void SimonEngine::o1_loadStrings() {
+void AGOSEngine::o1_loadStrings() {
// 185: load sound files
_soundFileId = getVarOrWord();
if (getPlatform() == Common::kPlatformAmiga && getFeatures() & GF_TALKIE) {
@@ -1809,7 +1809,7 @@ void SimonEngine::o1_loadStrings() {
}
}
-void SimonEngine::o1_specialFade() {
+void AGOSEngine::o1_specialFade() {
// 187: fade to black
uint i;
@@ -1831,14 +1831,14 @@ void SimonEngine::o1_specialFade() {
// Simon 2 Opcodes
// -----------------------------------------------------------------------
-void SimonEngine::o2_printLongText() {
+void AGOSEngine::o2_printLongText() {
// 70: show string from array
const char *str = (const char *)getStringPtrByID(_longText[getVarOrByte()]);
writeVariable(51, strlen(str) / 53 * 8 + 8);
showMessageFormat("%s\n", str);
}
-void SimonEngine::o2_rescan() {
+void AGOSEngine::o2_rescan() {
// 83: restart subroutine
if (_exitCutscene) {
if (getBitFlag(9)) {
@@ -1851,7 +1851,7 @@ void SimonEngine::o2_rescan() {
setScriptReturn(-10);
}
-void SimonEngine::o2_animate() {
+void AGOSEngine::o2_animate() {
// 98: start vga
uint vga_res = getVarOrWord();
uint vgaSpriteId = getVarOrWord();
@@ -1862,14 +1862,14 @@ void SimonEngine::o2_animate() {
loadSprite(windowNum, vga_res, vgaSpriteId, x, y, palette);
}
-void SimonEngine::o2_stopAnimate() {
+void AGOSEngine::o2_stopAnimate() {
// 99: kill sprite
uint a = getVarOrWord();
uint b = getVarOrWord();
stopAnimateSimon2(a, b);
}
-void SimonEngine::o2_playTune() {
+void AGOSEngine::o2_playTune() {
// 127: deals with music
int music = getVarOrWord();
int track = getVarOrWord();
@@ -1891,7 +1891,7 @@ void SimonEngine::o2_playTune() {
midi.startTrack(track);
}
-void SimonEngine::o2_screenTextPObj() {
+void AGOSEngine::o2_screenTextPObj() {
// 177: inventory descriptions
uint vgaSpriteId = getVarOrByte();
uint color = getVarOrByte();
@@ -1976,26 +1976,26 @@ void SimonEngine::o2_screenTextPObj() {
}
}
-void SimonEngine::o2_mouseOff() {
+void AGOSEngine::o2_mouseOff() {
// 181: force mouseOff
scriptMouseOff();
changeWindow(1);
showMessageFormat("\xC");
}
-void SimonEngine::o2_isShortText() {
+void AGOSEngine::o2_isShortText() {
// 188: string2 is
uint i = getVarOrByte();
uint str = getNextStringID();
setScriptCondition(str < _numTextBoxes && _shortText[i] == str);
}
-void SimonEngine::o2_clearMarks() {
+void AGOSEngine::o2_clearMarks() {
// 189: clear_op189_flag
_marks = 0;
}
-void SimonEngine::o2_waitMark() {
+void AGOSEngine::o2_waitMark() {
// 190
uint i = getVarOrByte();
if (!(_marks & (1 << i)))
@@ -2006,7 +2006,7 @@ void SimonEngine::o2_waitMark() {
// Feeble Files Opcodes
// -----------------------------------------------------------------------
-void SimonEngine::o3_chance() {
+void AGOSEngine::o3_chance() {
// 23
uint a = getVarOrWord();
@@ -2026,13 +2026,13 @@ void SimonEngine::o3_chance() {
setScriptCondition(false);
}
-void SimonEngine::o3_jumpOut() {
+void AGOSEngine::o3_jumpOut() {
// 37
getVarOrByte();
setScriptReturn(1);
}
-void SimonEngine::o3_addTextBox() {
+void AGOSEngine::o3_addTextBox() {
// 65: add hit area
uint flags = kBFTextBox | kBFBoxItem;
uint id = getVarOrWord();
@@ -2053,14 +2053,14 @@ void SimonEngine::o3_addTextBox() {
defineBox(id, x, y, w, h, flags + (num << 8), 208, _dummyItem2);
}
-void SimonEngine::o3_printLongText() {
+void AGOSEngine::o3_printLongText() {
// 70: show string from array
int num = getVarOrByte();
const char *str = (const char *)getStringPtrByID(_longText[num]);
sendInteractText(num, "%d. %s\n", num, str);
}
-void SimonEngine::o3_addBox() {
+void AGOSEngine::o3_addBox() {
// 107: add item hitarea
uint flags = 0;
uint id = getVarOrWord();
@@ -2090,17 +2090,17 @@ void SimonEngine::o3_addBox() {
defineBox(id, x, y, w, h, flags, verb, item);
}
-void SimonEngine::o3_oracleTextDown() {
+void AGOSEngine::o3_oracleTextDown() {
// 122: oracle text down
oracleTextDown();
}
-void SimonEngine::o3_oracleTextUp() {
+void AGOSEngine::o3_oracleTextUp() {
// 123: oracle text up
oracleTextUp();
}
-void SimonEngine::o3_ifTime() {
+void AGOSEngine::o3_ifTime() {
// 124: if time
time_t t;
@@ -2114,20 +2114,20 @@ void SimonEngine::o3_ifTime() {
setScriptCondition(false);
}
-void SimonEngine::o3_playTune() {
+void AGOSEngine::o3_playTune() {
// 127: usually deals with music, but is a no-op in FF.
getVarOrWord();
getVarOrWord();
getVarOrByte();
}
-void SimonEngine::o3_setTime() {
+void AGOSEngine::o3_setTime() {
// 131
time(&_timeStore);
_timeStore -= _gameStoppedClock;
}
-void SimonEngine::o3_saveUserGame() {
+void AGOSEngine::o3_saveUserGame() {
// 132: save game
_noOracleScroll = 0;
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
@@ -2135,17 +2135,17 @@ void SimonEngine::o3_saveUserGame() {
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
}
-void SimonEngine::o3_loadUserGame() {
+void AGOSEngine::o3_loadUserGame() {
// 133: load game
loadGame(readVariable(55));
}
-void SimonEngine::o3_listSaveGames() {
+void AGOSEngine::o3_listSaveGames() {
// 134: dummy opcode?
listSaveGames(1);
}
-void SimonEngine::o3_checkCD() {
+void AGOSEngine::o3_checkCD() {
// 135: switch CD
uint disc = readVariable(97);
@@ -2161,7 +2161,7 @@ void SimonEngine::o3_checkCD() {
debug(0, "Switch to CD number %d", disc);
}
-void SimonEngine::o3_screenTextBox() {
+void AGOSEngine::o3_screenTextBox() {
// 161: setup text
TextLocation *tl = getTextLocation(getVarOrByte());
@@ -2170,7 +2170,7 @@ void SimonEngine::o3_screenTextBox() {
tl->width = getVarOrWord();
}
-void SimonEngine::o3_isAdjNoun() {
+void AGOSEngine::o3_isAdjNoun() {
// 165: item unk1 unk2 is
Item *item = getNextItemPtr();
int16 a = getNextWord(), b = getNextWord();
@@ -2182,17 +2182,17 @@ void SimonEngine::o3_isAdjNoun() {
setScriptCondition(false);
}
-void SimonEngine::o3_hyperLinkOn() {
+void AGOSEngine::o3_hyperLinkOn() {
// 171: oracle hyperlink on
hyperLinkOn(getVarOrWord());
}
-void SimonEngine::o3_hyperLinkOff() {
+void AGOSEngine::o3_hyperLinkOff() {
// 172: oracle hyperlink off
hyperLinkOff();
}
-void SimonEngine::o3_checkPaths() {
+void AGOSEngine::o3_checkPaths() {
// 173 check paths
int i, count;
const uint8 *pathVal1 = _pathValues1;
@@ -2228,7 +2228,7 @@ void SimonEngine::o3_checkPaths() {
_variableArray2[52] = result;
}
-void SimonEngine::o3_screenTextPObj() {
+void AGOSEngine::o3_screenTextPObj() {
// 177: inventory descriptions
uint vgaSpriteId = getVarOrByte();
uint color = getVarOrByte();
@@ -2257,29 +2257,29 @@ void SimonEngine::o3_screenTextPObj() {
}
}
-void SimonEngine::o3_mouseOff() {
+void AGOSEngine::o3_mouseOff() {
// 181: force mouseOff
scriptMouseOff();
clearName();
}
-void SimonEngine::o3_loadVideo() {
+void AGOSEngine::o3_loadVideo() {
// 182: load video file
const byte *filename = getStringPtrByID(getNextStringID());
_moviePlay->load((const char *)filename);
}
-void SimonEngine::o3_playVideo() {
+void AGOSEngine::o3_playVideo() {
// 183: play video
_moviePlay->play();
}
-void SimonEngine::o3_centreScroll() {
+void AGOSEngine::o3_centreScroll() {
// 187
centreScroll();
}
-void SimonEngine::o3_resetPVCount() {
+void AGOSEngine::o3_resetPVCount() {
// 191
if (getBitFlag(83)) {
_PVCount1 = 0;
@@ -2290,7 +2290,7 @@ void SimonEngine::o3_resetPVCount() {
}
}
-void SimonEngine::o3_setPathValues() {
+void AGOSEngine::o3_setPathValues() {
// 192
uint8 a = getVarOrByte();
uint8 b = getVarOrByte();
@@ -2309,19 +2309,19 @@ void SimonEngine::o3_setPathValues() {
}
}
-void SimonEngine::o3_stopClock() {
+void AGOSEngine::o3_stopClock() {
// 193: pause clock
_clockStopped = time(NULL);
}
-void SimonEngine::o3_restartClock() {
+void AGOSEngine::o3_restartClock() {
// 194: resume clock
if (_clockStopped != 0)
_gameStoppedClock += time(NULL) - _clockStopped;
_clockStopped = 0;
}
-void SimonEngine::o3_setColour() {
+void AGOSEngine::o3_setColour() {
// 195: set palette colour
uint c = getVarOrByte() * 4;
uint r = getVarOrByte();
@@ -2335,25 +2335,25 @@ void SimonEngine::o3_setColour() {
_paletteFlag = 2;
}
-void SimonEngine::o3_b3Set() {
+void AGOSEngine::o3_b3Set() {
// 196: set bit3
uint bit = getVarOrByte();
_bitArrayThree[bit / 16] |= (1 << (bit & 15));
}
-void SimonEngine::o3_b3Clear() {
+void AGOSEngine::o3_b3Clear() {
// 197: clear bit3
uint bit = getVarOrByte();
_bitArrayThree[bit / 16] &= ~(1 << (bit & 15));
}
-void SimonEngine::o3_b3Zero() {
+void AGOSEngine::o3_b3Zero() {
// 198: is bit3 clear
uint bit = getVarOrByte();
setScriptCondition((_bitArrayThree[bit / 16] & (1 << (bit & 15))) == 0);
}
-void SimonEngine::o3_b3NotZero() {
+void AGOSEngine::o3_b3NotZero() {
// 199: is bit3 set
uint bit = getVarOrByte();
setScriptCondition((_bitArrayThree[bit / 16] & (1 << (bit & 15))) != 0);
@@ -2363,52 +2363,52 @@ void SimonEngine::o3_b3NotZero() {
// Puzzle Pack Opcodes
// -----------------------------------------------------------------------
-void SimonEngine::o4_opcode30() {
+void AGOSEngine::o4_opcode30() {
// 30
getNextItemPtr();
}
-void SimonEngine::o4_checkTiles() {
+void AGOSEngine::o4_checkTiles() {
// 37: for MahJongg game
getVarOrByte();
}
-void SimonEngine::o4_opcode38() {
+void AGOSEngine::o4_opcode38() {
// 38
getVarOrByte();
getNextItemPtr();
}
-void SimonEngine::o4_loadHiScores() {
+void AGOSEngine::o4_loadHiScores() {
// 105
getVarOrByte();
}
-void SimonEngine::o4_checkHiScores() {
+void AGOSEngine::o4_checkHiScores() {
// 106
getVarOrByte();
getVarOrByte();
}
-void SimonEngine::o4_loadUserGame() {
+void AGOSEngine::o4_loadUserGame() {
// 133
}
-void SimonEngine::o4_saveOopsPosition() {
+void AGOSEngine::o4_saveOopsPosition() {
// 173
}
-void SimonEngine::o4_resetGameTime() {
+void AGOSEngine::o4_resetGameTime() {
// 187
}
-void SimonEngine::o4_resetPVCount() {
+void AGOSEngine::o4_resetPVCount() {
// 191
_PVCount = 0;
_GPVCount = 0;
}
-void SimonEngine::o4_setPathValues() {
+void AGOSEngine::o4_setPathValues() {
// 192
_pathValues[_PVCount++] = getVarOrByte();
_pathValues[_PVCount++] = getVarOrByte();
@@ -2418,7 +2418,7 @@ void SimonEngine::o4_setPathValues() {
// -----------------------------------------------------------------------
-int SimonEngine::runScript() {
+int AGOSEngine::runScript() {
int opcode;
bool flag;
@@ -2470,7 +2470,7 @@ int SimonEngine::runScript() {
return getScriptReturn();
}
-void SimonEngine::scriptMouseOn() {
+void AGOSEngine::scriptMouseOn() {
if (getGameType() == GType_FF && _mouseCursor != 5) {
resetVerbs();
_noRightClick = 0;
@@ -2481,13 +2481,13 @@ void SimonEngine::scriptMouseOn() {
_mouseHideCount = 0;
}
-void SimonEngine::scriptMouseOff() {
+void AGOSEngine::scriptMouseOff() {
_lockWord |= 0x8000;
vc34_setMouseOff();
_lockWord &= ~0x8000;
}
-void SimonEngine::waitForMark(uint i) {
+void AGOSEngine::waitForMark(uint i) {
_exitCutscene = false;
while (!(_marks & (1 << i))) {
if (_exitCutscene) {
@@ -2503,18 +2503,18 @@ void SimonEngine::waitForMark(uint i) {
}
}
-void SimonEngine::freezeBottom() {
+void AGOSEngine::freezeBottom() {
_vgaMemBase = _vgaMemPtr;
_vgaFrozenBase = _vgaMemPtr;
}
-void SimonEngine::unfreezeBottom() {
+void AGOSEngine::unfreezeBottom() {
_vgaMemPtr = _vgaRealBase;
_vgaMemBase = _vgaRealBase;
_vgaFrozenBase = _vgaRealBase;
}
-void SimonEngine::sendSync(uint a) {
+void AGOSEngine::sendSync(uint a) {
uint16 id = to16Wrapper(a);
_lockWord |= 0x8000;
_vcPtr = (byte *)&id;
@@ -2522,14 +2522,14 @@ void SimonEngine::sendSync(uint a) {
_lockWord &= ~0x8000;
}
-void SimonEngine::setTextColor(uint color) {
+void AGOSEngine::setTextColor(uint color) {
WindowBlock *window;
window = _windowArray[_curWindow];
window->text_color = color;
}
-void SimonEngine::stopAnimateSimon1(uint a) {
+void AGOSEngine::stopAnimateSimon1(uint a) {
uint16 b = to16Wrapper(a);
_lockWord |= 0x8000;
_vcPtr = (byte *)&b;
@@ -2537,7 +2537,7 @@ void SimonEngine::stopAnimateSimon1(uint a) {
_lockWord &= ~0x8000;
}
-void SimonEngine::stopAnimateSimon2(uint a, uint b) {
+void AGOSEngine::stopAnimateSimon2(uint a, uint b) {
uint16 items[2];
items[0] = to16Wrapper(a);
@@ -2549,4 +2549,4 @@ void SimonEngine::stopAnimateSimon2(uint a, uint b) {
_lockWord &= ~0x8000;
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index 2ff9bbd8ad..977c054e67 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -30,7 +30,7 @@
#include "agos/agos.h"
-namespace Simon {
+namespace AGOS {
// MidiParser_S1D is not considered part of the standard
@@ -571,4 +571,4 @@ void MidiPlayer::loadS1D(Common::File *in, bool sfx) {
p->parser = parser; // That plugs the power cord into the wall
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/midi.h b/engines/agos/midi.h
index cf055bffac..36faf1cbb2 100644
--- a/engines/agos/midi.h
+++ b/engines/agos/midi.h
@@ -32,7 +32,7 @@ namespace Common {
class File;
}
-namespace Simon {
+namespace AGOS {
struct MusicInfo {
MidiParser *parser;
@@ -123,6 +123,6 @@ public:
MidiChannel *getPercussionChannel() { return 0; }
};
-} // End of namespace Simon
+} // End of namespace AGOS
#endif
diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp
index 2b58c9ffa1..85abd4fbe0 100644
--- a/engines/agos/midiparser_s1d.cpp
+++ b/engines/agos/midiparser_s1d.cpp
@@ -30,7 +30,7 @@
#include <stdio.h>
-namespace Simon {
+namespace AGOS {
/**
* Simon 1 Demo version of MidiParser.
@@ -152,4 +152,4 @@ void MidiParser_S1D::resetTracking() {
MidiParser *MidiParser_createS1D() { return new MidiParser_S1D; }
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/oracle.cpp b/engines/agos/oracle.cpp
index 3e6448fbae..a3804367a6 100644
--- a/engines/agos/oracle.cpp
+++ b/engines/agos/oracle.cpp
@@ -29,9 +29,9 @@
#include "agos/intern.h"
#include "agos/vga.h"
-namespace Simon {
+namespace AGOS {
-void SimonEngine::checkLinkBox() { // Check for boxes spilling over to next row of text
+void AGOSEngine::checkLinkBox() { // Check for boxes spilling over to next row of text
if (_hyperLink != 0) {
_variableArray[52] = _textWindow->x + _textWindow->textColumn - _variableArray[50];
if (_variableArray[52] != 0) {
@@ -43,7 +43,7 @@ void SimonEngine::checkLinkBox() { // Check for boxes spilling over to next row
}
}
-void SimonEngine::hyperLinkOn(uint16 x) {
+void AGOSEngine::hyperLinkOn(uint16 x) {
if (!getBitFlag(51))
return;
@@ -53,7 +53,7 @@ void SimonEngine::hyperLinkOn(uint16 x) {
}
-void SimonEngine::hyperLinkOff() {
+void AGOSEngine::hyperLinkOff() {
if (!getBitFlag(51))
return;
@@ -63,28 +63,28 @@ void SimonEngine::hyperLinkOff() {
_hyperLink = 0;
}
-void SimonEngine::linksUp() { // Scroll Oracle Links
+void AGOSEngine::linksUp() { // Scroll Oracle Links
uint16 j;
for (j = 700; j < _variableArray[53]; j++) {
moveBox(j, 0, -15);
}
}
-void SimonEngine::linksDown() {
+void AGOSEngine::linksDown() {
uint16 i;
for (i = 700; i < _variableArray[53]; i++) {
moveBox(i,0, 15);
}
}
-void SimonEngine::scrollOracle() {
+void AGOSEngine::scrollOracle() {
int i;
for (i = 0; i < 5; i++)
scrollOracleUp();
}
-void SimonEngine::oracleTextUp() {
+void AGOSEngine::oracleTextUp() {
Subroutine *sub;
int i = 0;
changeWindow(3);
@@ -118,7 +118,7 @@ void SimonEngine::oracleTextUp() {
}
}
-void SimonEngine::oracleTextDown() {
+void AGOSEngine::oracleTextDown() {
Subroutine *sub;
int i = 0;
changeWindow(3);
@@ -152,7 +152,7 @@ void SimonEngine::oracleTextDown() {
}
}
-void SimonEngine::scrollOracleUp() {
+void AGOSEngine::scrollOracleUp() {
byte *src, *dst;
uint16 w, h;
@@ -181,7 +181,7 @@ void SimonEngine::scrollOracleUp() {
}
}
-void SimonEngine::scrollOracleDown() {
+void AGOSEngine::scrollOracleDown() {
byte *src, *dst;
uint16 w, h;
@@ -209,7 +209,7 @@ void SimonEngine::scrollOracleDown() {
}
}
-void SimonEngine::oracleLogo() {
+void AGOSEngine::oracleLogo() {
Common::Rect srcRect, dstRect;
byte *src, *dst;
uint16 w, h;
@@ -237,7 +237,7 @@ void SimonEngine::oracleLogo() {
}
}
-void SimonEngine::swapCharacterLogo() {
+void AGOSEngine::swapCharacterLogo() {
Common::Rect srcRect, dstRect;
byte *src, *dst;
uint16 w, h;
@@ -277,7 +277,7 @@ void SimonEngine::swapCharacterLogo() {
}
}
-void SimonEngine::listSaveGames(int n) {
+void AGOSEngine::listSaveGames(int n) {
char b[108];
Common::InSaveFile *in;
uint16 j, k, z, maxFiles;
@@ -344,7 +344,7 @@ void SimonEngine::listSaveGames(int n) {
}
}
-void SimonEngine::saveUserGame(int slot) {
+void AGOSEngine::saveUserGame(int slot) {
WindowBlock *window;
Common::InSaveFile *in;
char name[108];
@@ -407,7 +407,7 @@ void SimonEngine::saveUserGame(int slot) {
}
}
-void SimonEngine::windowBackSpace(WindowBlock *window) {
+void AGOSEngine::windowBackSpace(WindowBlock *window) {
byte *dst;
uint x, y, h, w;
@@ -429,4 +429,4 @@ void SimonEngine::windowBackSpace(WindowBlock *window) {
_lockWord &= ~0x8000;
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index e8d4f2fd04..8d6ba275f9 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -37,7 +37,7 @@
using Common::File;
-namespace Simon {
+namespace AGOS {
// Script opcodes to load into memory
static const char *const opcode_arg_table_elvira[300] = {
@@ -183,28 +183,28 @@ static const char *const opcode_arg_table_puzzlepack[256] = {
" ", " ", "BT ", " ", "B ", " ", "BBBB ", " ", " ", "BBBB ", "B ", "B ", "B ", "B "
};
-uint16 SimonEngine::to16Wrapper(uint value) {
+uint16 AGOSEngine::to16Wrapper(uint value) {
if (getGameType() == GType_FF || getGameType() == GType_PP)
return TO_LE_16(value);
else
return TO_BE_16(value);
}
-uint16 SimonEngine::readUint16Wrapper(const void *src) {
+uint16 AGOSEngine::readUint16Wrapper(const void *src) {
if (getGameType() == GType_FF || getGameType() == GType_PP)
return READ_LE_UINT16(src);
else
return READ_BE_UINT16(src);
}
-uint32 SimonEngine::readUint32Wrapper(const void *src) {
+uint32 AGOSEngine::readUint32Wrapper(const void *src) {
if (getGameType() == GType_FF || getGameType() == GType_PP)
return READ_LE_UINT32(src);
else
return READ_BE_UINT32(src);
}
-void SimonEngine::decompressData(const char *srcName, byte *dst, uint32 offset, uint32 srcSize, uint32 dstSize) {
+void AGOSEngine::decompressData(const char *srcName, byte *dst, uint32 offset, uint32 srcSize, uint32 dstSize) {
#ifdef USE_ZLIB
File in;
in.open(srcName);
@@ -233,7 +233,7 @@ void SimonEngine::decompressData(const char *srcName, byte *dst, uint32 offset,
#endif
}
-void SimonEngine::loadOffsets(const char *filename, int number, uint32 &file, uint32 &offset, uint32 &srcSize, uint32 &dstSize) {
+void AGOSEngine::loadOffsets(const char *filename, int number, uint32 &file, uint32 &offset, uint32 &srcSize, uint32 &dstSize) {
Common::File in;
int offsSize = (getPlatform() == Common::kPlatformAmiga) ? 16 : 12;
@@ -252,7 +252,7 @@ void SimonEngine::loadOffsets(const char *filename, int number, uint32 &file, ui
in.close();
}
-int SimonEngine::allocGamePcVars(File *in) {
+int AGOSEngine::allocGamePcVars(File *in) {
uint item_array_size, item_array_inited, stringtable_num;
uint32 version;
uint i, start;
@@ -292,7 +292,7 @@ int SimonEngine::allocGamePcVars(File *in) {
return item_array_inited;
}
-void SimonEngine::loadGamePcFile() {
+void AGOSEngine::loadGamePcFile() {
Common::File in;
int num_inited_objects;
int i, file_size;
@@ -398,7 +398,7 @@ void SimonEngine::loadGamePcFile() {
}
-void SimonEngine::readGamePcText(Common::File *in) {
+void AGOSEngine::readGamePcText(Common::File *in) {
_textSize = in->readUint32BE();
_textMem = (byte *)malloc(_textSize);
if (_textMem == NULL)
@@ -409,7 +409,7 @@ void SimonEngine::readGamePcText(Common::File *in) {
setupStringTable(_textMem, _stringTabNum);
}
-void SimonEngine::readItemFromGamePc(Common::File *in, Item *item) {
+void AGOSEngine::readItemFromGamePc(Common::File *in, Item *item) {
uint32 type;
if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2) {
@@ -447,7 +447,7 @@ void SimonEngine::readItemFromGamePc(Common::File *in, Item *item) {
}
}
-void SimonEngine::readItemChildren(Common::File *in, Item *item, uint type) {
+void AGOSEngine::readItemChildren(Common::File *in, Item *item, uint type) {
if (type == 1) {
if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2) {
// FIXME
@@ -548,7 +548,7 @@ uint fileReadItemID(Common::File *in) {
return val + 2;
}
-byte *SimonEngine::readSingleOpcode(Common::File *in, byte *ptr) {
+byte *AGOSEngine::readSingleOpcode(Common::File *in, byte *ptr) {
int i, l;
const char *string_ptr;
uint opcode, val;
@@ -664,7 +664,7 @@ byte *SimonEngine::readSingleOpcode(Common::File *in, byte *ptr) {
}
}
-void SimonEngine::openGameFile() {
+void AGOSEngine::openGameFile() {
if (!(getFeatures() & GF_OLD_BUNDLE)) {
_gameFile = new File();
_gameFile->open(getFileName(GAME_GMEFILE));
@@ -686,7 +686,7 @@ void SimonEngine::openGameFile() {
}
}
-void SimonEngine::readGameFile(void *dst, uint32 offs, uint32 size) {
+void AGOSEngine::readGameFile(void *dst, uint32 offs, uint32 size) {
_gameFile->seek(offs, SEEK_SET);
if (_gameFile->read(dst, size) != size)
error("readGameFile: Read failed (%d,%d)", offs, size);
@@ -809,7 +809,7 @@ static bool decrunchFile(byte *src, byte *dst, uint32 size) {
#undef SD_TYPE_LITERAL
#undef SD_TYPE_MATCH
-void SimonEngine::loadSimonVGAFile(uint vga_id) {
+void AGOSEngine::loadSimonVGAFile(uint vga_id) {
uint32 offs, size;
if (getFeatures() & GF_OLD_BUNDLE) {
@@ -853,7 +853,7 @@ void SimonEngine::loadSimonVGAFile(uint vga_id) {
}
}
-byte *SimonEngine::loadVGAFile(uint id, uint type, uint32 &dstSize) {
+byte *AGOSEngine::loadVGAFile(uint id, uint type, uint32 &dstSize) {
File in;
char filename[15];
byte *dst = NULL;
@@ -968,7 +968,7 @@ static const char *dimpSoundList[32] = {
};
-void SimonEngine::loadSound(uint sound, int pan, int vol, uint type) {
+void AGOSEngine::loadSound(uint sound, int pan, int vol, uint type) {
byte *dst;
if (getGameId() == GID_DIMP) {
@@ -1019,7 +1019,7 @@ void SimonEngine::loadSound(uint sound, int pan, int vol, uint type) {
_sound->playSfxData(dst, sound, pan, vol);
}
-void SimonEngine::loadVoice(uint speechId) {
+void AGOSEngine::loadVoice(uint speechId) {
if (getGameType() == GType_PP && speechId == 99)
return;
@@ -1052,4 +1052,4 @@ void SimonEngine::loadVoice(uint speechId) {
}
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp
index ca2b84e9f9..2af76d8c60 100644
--- a/engines/agos/rooms.cpp
+++ b/engines/agos/rooms.cpp
@@ -28,9 +28,9 @@
using Common::File;
-namespace Simon {
+namespace AGOS {
-uint16 SimonEngine::getDoorState(Item *item, uint16 d) {
+uint16 AGOSEngine::getDoorState(Item *item, uint16 d) {
uint16 mask = 3;
uint16 n;
@@ -46,7 +46,7 @@ uint16 SimonEngine::getDoorState(Item *item, uint16 d) {
return n;
}
-uint16 SimonEngine::getExitOf(Item *item, uint16 d) {
+uint16 AGOSEngine::getExitOf(Item *item, uint16 d) {
uint16 x;
uint16 y = 0;
@@ -62,7 +62,7 @@ uint16 SimonEngine::getExitOf(Item *item, uint16 d) {
return subRoom->roomExit[d];
}
-bool SimonEngine::loadRoomItems(uint item) {
+bool AGOSEngine::loadRoomItems(uint item) {
byte *p;
uint i, min_num, max_num;
char filename[30];
@@ -111,4 +111,4 @@ bool SimonEngine::loadRoomItems(uint item) {
return 0;
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 37907024b6..956d3aed32 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -32,9 +32,9 @@
#include "agos/agos.h"
#include "agos/intern.h"
-namespace Simon {
+namespace AGOS {
-int SimonEngine::countSaveGames() {
+int AGOSEngine::countSaveGames() {
Common::InSaveFile *f;
uint i = 1;
bool marks[256];
@@ -54,7 +54,7 @@ int SimonEngine::countSaveGames() {
return i;
}
-int SimonEngine::displaySaveGameList(int curpos, bool load, char *dst) {
+int AGOSEngine::displaySaveGameList(int curpos, bool load, char *dst) {
int slot, last_slot;
Common::InSaveFile *in;
@@ -107,7 +107,7 @@ int SimonEngine::displaySaveGameList(int curpos, bool load, char *dst) {
return slot - curpos;
}
-char *SimonEngine::genSaveName(int slot) {
+char *AGOSEngine::genSaveName(int slot) {
static char buf[15];
if (getGameType() == GType_FF) {
@@ -128,7 +128,7 @@ char *SimonEngine::genSaveName(int slot) {
return buf;
}
-void SimonEngine::quickLoadOrSave() {
+void AGOSEngine::quickLoadOrSave() {
// The demo of Simon 1 (DOS Floppy) is missing too many segments
// and the Feeble Files doesn't always allow a load or save
if (getGameId() == GID_SIMON1DEMO || getGameType() == GType_FF)
@@ -173,7 +173,7 @@ void SimonEngine::quickLoadOrSave() {
_saveLoadType = 0;
}
-void SimonEngine::listSaveGames(char *buf) {
+void AGOSEngine::listSaveGames(char *buf) {
int i;
disableFileBoxes();
@@ -207,7 +207,7 @@ const byte hebrewKeyTable[96] = {
123, 124, 125, 126, 127,
};
-void SimonEngine::userGame(bool load) {
+void AGOSEngine::userGame(bool load) {
time_t save_time;
int number_of_savegames;
int i, name_len, result;
@@ -382,7 +382,7 @@ get_out:;
} while (i == _timer4);
}
-int SimonEngine::userGameGetKey(bool *b, char *buf) {
+int AGOSEngine::userGameGetKey(bool *b, char *buf) {
HitArea *ha;
*b = true;
@@ -434,12 +434,12 @@ int SimonEngine::userGameGetKey(bool *b, char *buf) {
}
}
-void SimonEngine::disableFileBoxes() {
+void AGOSEngine::disableFileBoxes() {
for (int i = 208; i != 214; i++)
disableBox(i);
}
-void SimonEngine::userGameBackSpace(WindowBlock *window, int x, byte b) {
+void AGOSEngine::userGameBackSpace(WindowBlock *window, int x, byte b) {
byte old_text;
windowPutChar(window, x, b);
@@ -460,7 +460,7 @@ void SimonEngine::userGameBackSpace(WindowBlock *window, int x, byte b) {
windowPutChar(window, 8);
}
-void SimonEngine::fileError(WindowBlock *window, bool save_error) {
+void AGOSEngine::fileError(WindowBlock *window, bool save_error) {
HitArea *ha;
const char *string1, *string2;
@@ -576,7 +576,7 @@ loop:;
undefineBox(0x7FFF);
}
-bool SimonEngine::saveGame(uint slot, char *caption) {
+bool AGOSEngine::saveGame(uint slot, char *caption) {
Common::WriteStream *f;
uint item_index, num_item, i, j;
TimeEvent *te;
@@ -683,7 +683,7 @@ bool SimonEngine::saveGame(uint slot, char *caption) {
return result;
}
-bool SimonEngine::loadGame(uint slot) {
+bool AGOSEngine::loadGame(uint slot) {
char ident[100];
Common::SeekableReadStream *f = NULL;
uint num, item_index, i, j;
@@ -818,4 +818,4 @@ bool SimonEngine::loadGame(uint slot) {
return true;
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 42c2df1723..5af4340804 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -39,7 +39,7 @@
using Common::File;
-namespace Simon {
+namespace AGOS {
#define SOUND_BIG_ENDIAN true
@@ -252,7 +252,7 @@ void FlacSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags)
}
#endif
-Sound::Sound(SimonEngine *vm, const GameSpecificSettings *gss, Audio::Mixer *mixer)
+Sound::Sound(AGOSEngine *vm, const GameSpecificSettings *gss, Audio::Mixer *mixer)
: _vm(vm), _mixer(mixer) {
_voice = 0;
_effects = 0;
@@ -711,4 +711,4 @@ void Sound::switchVoiceFile(const GameSpecificSettings *gss, uint disc) {
}
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/sound.h b/engines/agos/sound.h
index ce7b655b90..606dad5b59 100644
--- a/engines/agos/sound.h
+++ b/engines/agos/sound.h
@@ -28,15 +28,15 @@
#include "agos/intern.h"
#include "common/str.h"
-namespace Simon {
+namespace AGOS {
class BaseSound;
-class SimonEngine;
+class AGOSEngine;
class Sound {
private:
- SimonEngine *_vm;
+ AGOSEngine *_vm;
Audio::Mixer *_mixer;
@@ -61,7 +61,7 @@ private:
uint _ambientPlaying;
public:
- Sound(SimonEngine *vm, const GameSpecificSettings *gss, Audio::Mixer *mixer);
+ Sound(AGOSEngine *vm, const GameSpecificSettings *gss, Audio::Mixer *mixer);
~Sound();
void loadVoiceFile(const GameSpecificSettings *gss);
@@ -93,6 +93,6 @@ public:
void ambientPause(bool b);
};
-} // End of namespace Simon
+} // End of namespace AGOS
#endif
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index b85eb9a9dd..64dd443669 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -28,9 +28,9 @@
using Common::File;
-namespace Simon {
+namespace AGOS {
-const byte *SimonEngine::getStringPtrByID(uint stringId) {
+const byte *AGOSEngine::getStringPtrByID(uint stringId) {
const byte *string_ptr;
byte *dst;
@@ -47,20 +47,20 @@ const byte *SimonEngine::getStringPtrByID(uint stringId) {
return dst;
}
-const byte *SimonEngine::getLocalStringByID(uint stringId) {
+const byte *AGOSEngine::getLocalStringByID(uint stringId) {
if (stringId < _stringIdLocalMin || stringId >= _stringIdLocalMax) {
loadTextIntoMem(stringId);
}
return _localStringtable[stringId - _stringIdLocalMin];
}
-void SimonEngine::allocateStringTable(int num) {
+void AGOSEngine::allocateStringTable(int num) {
_stringTabPtr = (byte **)calloc(num, sizeof(byte *));
_stringTabPos = 0;
_stringtab_numalloc = num;
}
-void SimonEngine::setupStringTable(byte *mem, int num) {
+void AGOSEngine::setupStringTable(byte *mem, int num) {
int i = 0;
for (;;) {
_stringTabPtr[i++] = mem;
@@ -73,7 +73,7 @@ void SimonEngine::setupStringTable(byte *mem, int num) {
_stringTabPos = i;
}
-void SimonEngine::setupLocalStringTable(byte *mem, int num) {
+void AGOSEngine::setupLocalStringTable(byte *mem, int num) {
int i = 0;
for (;;) {
_localStringtable[i++] = mem;
@@ -84,14 +84,14 @@ void SimonEngine::setupLocalStringTable(byte *mem, int num) {
}
}
-uint SimonEngine::loadTextFile(const char *filename, byte *dst) {
+uint AGOSEngine::loadTextFile(const char *filename, byte *dst) {
if (getFeatures() & GF_OLD_BUNDLE)
return loadTextFile_simon1(filename, dst);
else
return loadTextFile_gme(filename, dst);
}
-uint SimonEngine::loadTextFile_simon1(const char *filename, byte *dst) {
+uint AGOSEngine::loadTextFile_simon1(const char *filename, byte *dst) {
File fo;
fo.open(filename);
uint32 size;
@@ -108,7 +108,7 @@ uint SimonEngine::loadTextFile_simon1(const char *filename, byte *dst) {
return size;
}
-uint SimonEngine::loadTextFile_gme(const char *filename, byte *dst) {
+uint AGOSEngine::loadTextFile_gme(const char *filename, byte *dst) {
uint res;
uint32 offs;
uint32 size;
@@ -122,7 +122,7 @@ uint SimonEngine::loadTextFile_gme(const char *filename, byte *dst) {
return size;
}
-void SimonEngine::loadTextIntoMem(uint stringId) {
+void AGOSEngine::loadTextIntoMem(uint stringId) {
byte *p;
char filename[30];
int i;
@@ -212,7 +212,7 @@ const char *getPixelLength(const char *string, uint16 maxWidth, uint16 &pixels)
return string;
}
-bool SimonEngine::printTextOf(uint a, uint x, uint y) {
+bool AGOSEngine::printTextOf(uint a, uint x, uint y) {
const byte *stringPtr;
uint16 pixels, w;
@@ -244,7 +244,7 @@ bool SimonEngine::printTextOf(uint a, uint x, uint y) {
return true;
}
-bool SimonEngine::printNameOf(Item *item, uint x, uint y) {
+bool AGOSEngine::printNameOf(Item *item, uint x, uint y) {
SubObject *subObject;
const byte *stringPtr;
uint16 pixels, w;
@@ -269,7 +269,7 @@ bool SimonEngine::printNameOf(Item *item, uint x, uint y) {
return true;
}
-void SimonEngine::printInteractText(uint16 num, const char *string) {
+void AGOSEngine::printInteractText(uint16 num, const char *string) {
char convertedString[320];
char *convertedString2 = convertedString;
const char *string2 = string;
@@ -324,7 +324,7 @@ void SimonEngine::printInteractText(uint16 num, const char *string) {
_interactY += height;
}
-void SimonEngine::sendInteractText(uint16 num, const char *fmt, ...) {
+void AGOSEngine::sendInteractText(uint16 num, const char *fmt, ...) {
va_list arglist;
char string[256];
@@ -335,7 +335,7 @@ void SimonEngine::sendInteractText(uint16 num, const char *fmt, ...) {
printInteractText(num, string);
}
-void SimonEngine::printScreenText(uint vgaSpriteId, uint color, const char *string, int16 x, int16 y, int16 width) {
+void AGOSEngine::printScreenText(uint vgaSpriteId, uint color, const char *string, int16 x, int16 y, int16 width) {
char convertedString[320];
char *convertedString2 = convertedString;
const char *string2 = string;
@@ -467,4 +467,4 @@ void SimonEngine::printScreenText(uint vgaSpriteId, uint color, const char *stri
loadSprite(b, 2, vgaSpriteId, x, y, 12);
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index b5a7c1f9f7..24bdf23b06 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -28,9 +28,9 @@
using Common::File;
-namespace Simon {
+namespace AGOS {
-Subroutine *SimonEngine::getSubroutineByID(uint subroutine_id) {
+Subroutine *AGOSEngine::getSubroutineByID(uint subroutine_id) {
Subroutine *cur;
_subroutine = subroutine_id;
@@ -59,14 +59,14 @@ Subroutine *SimonEngine::getSubroutineByID(uint subroutine_id) {
return NULL;
}
-void SimonEngine::alignTableMem() {
+void AGOSEngine::alignTableMem() {
if ((unsigned long)_tablesHeapPtr & 3) {
_tablesHeapPtr += 2;
_tablesHeapCurPos += 2;
}
}
-byte *SimonEngine::allocateTable(uint size) {
+byte *AGOSEngine::allocateTable(uint size) {
byte *org = _tablesHeapPtr;
size = (size + 1) & ~1;
@@ -80,14 +80,14 @@ byte *SimonEngine::allocateTable(uint size) {
return org;
}
-File *SimonEngine::openTablesFile(const char *filename) {
+File *AGOSEngine::openTablesFile(const char *filename) {
if (getFeatures() & GF_OLD_BUNDLE)
return openTablesFile_simon1(filename);
else
return openTablesFile_gme(filename);
}
-File *SimonEngine::openTablesFile_simon1(const char *filename) {
+File *AGOSEngine::openTablesFile_simon1(const char *filename) {
File *fo = new File();
fo->open(filename);
if (fo->isOpen() == false)
@@ -95,7 +95,7 @@ File *SimonEngine::openTablesFile_simon1(const char *filename) {
return fo;
}
-File *SimonEngine::openTablesFile_gme(const char *filename) {
+File *AGOSEngine::openTablesFile_gme(const char *filename) {
uint res;
uint32 offs;
@@ -106,7 +106,7 @@ File *SimonEngine::openTablesFile_gme(const char *filename) {
return _gameFile;
}
-bool SimonEngine::loadTablesIntoMem(uint subr_id) {
+bool AGOSEngine::loadTablesIntoMem(uint subr_id) {
if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2)
return loadTablesOldIntoMem(subr_id);
else
@@ -114,7 +114,7 @@ bool SimonEngine::loadTablesIntoMem(uint subr_id) {
}
-bool SimonEngine::loadTablesOldIntoMem(uint subr_id) {
+bool AGOSEngine::loadTablesOldIntoMem(uint subr_id) {
byte *p;
uint16 min_num, max_num, file_num;
File *in;
@@ -163,7 +163,7 @@ bool SimonEngine::loadTablesOldIntoMem(uint subr_id) {
return 0;
}
-bool SimonEngine::loadTablesNewIntoMem(uint subr_id) {
+bool AGOSEngine::loadTablesNewIntoMem(uint subr_id) {
byte *p;
int i;
uint min_num, max_num;
@@ -221,7 +221,7 @@ bool SimonEngine::loadTablesNewIntoMem(uint subr_id) {
return 0;
}
-bool SimonEngine::loadXTablesIntoMem(uint subr_id) {
+bool AGOSEngine::loadXTablesIntoMem(uint subr_id) {
byte *p;
int i;
uint min_num, max_num;
@@ -276,14 +276,14 @@ bool SimonEngine::loadXTablesIntoMem(uint subr_id) {
return 0;
}
-void SimonEngine::closeTablesFile(File *in) {
+void AGOSEngine::closeTablesFile(File *in) {
if (getFeatures() & GF_OLD_BUNDLE) {
in->close();
delete in;
}
}
-Subroutine *SimonEngine::createSubroutine(uint id) {
+Subroutine *AGOSEngine::createSubroutine(uint id) {
Subroutine *sub;
alignTableMem();
@@ -296,7 +296,7 @@ Subroutine *SimonEngine::createSubroutine(uint id) {
return sub;
}
-SubroutineLine *SimonEngine::createSubroutineLine(Subroutine *sub, int where) {
+SubroutineLine *AGOSEngine::createSubroutineLine(Subroutine *sub, int where) {
SubroutineLine *sl, *cur_sl = NULL, *last_sl = NULL;
if (sub->id == 0)
@@ -329,7 +329,7 @@ SubroutineLine *SimonEngine::createSubroutineLine(Subroutine *sub, int where) {
return sl;
}
-void SimonEngine::runSubroutine101() {
+void AGOSEngine::runSubroutine101() {
Subroutine *sub;
sub = getSubroutineByID(101);
@@ -339,7 +339,7 @@ void SimonEngine::runSubroutine101() {
permitInput();
}
-int SimonEngine::startSubroutine(Subroutine *sub) {
+int AGOSEngine::startSubroutine(Subroutine *sub) {
int result = -1;
SubroutineLine *sl;
const byte *old_code_ptr;
@@ -395,11 +395,11 @@ int SimonEngine::startSubroutine(Subroutine *sub) {
return result;
}
-int SimonEngine::startSubroutineEx(Subroutine *sub) {
+int AGOSEngine::startSubroutineEx(Subroutine *sub) {
return startSubroutine(sub);
}
-bool SimonEngine::checkIfToRunSubroutineLine(SubroutineLine *sl, Subroutine *sub) {
+bool AGOSEngine::checkIfToRunSubroutineLine(SubroutineLine *sl, Subroutine *sub) {
if (sub->id)
return true;
@@ -418,13 +418,13 @@ bool SimonEngine::checkIfToRunSubroutineLine(SubroutineLine *sl, Subroutine *sub
return true;
}
-void SimonEngine::readSubroutine(File *in, Subroutine *sub) {
+void AGOSEngine::readSubroutine(File *in, Subroutine *sub) {
while (in->readUint16BE() == 0) {
readSubroutineLine(in, createSubroutineLine(sub, 0xFFFF), sub);
}
}
-void SimonEngine::readSubroutineLine(File *in, SubroutineLine *sl, Subroutine *sub) {
+void AGOSEngine::readSubroutineLine(File *in, SubroutineLine *sl, Subroutine *sub) {
byte line_buffer[2048], *q = line_buffer;
int size;
@@ -470,10 +470,10 @@ void SimonEngine::readSubroutineLine(File *in, SubroutineLine *sl, Subroutine *s
}
}
-void SimonEngine::readSubroutineBlock(File *in) {
+void AGOSEngine::readSubroutineBlock(File *in) {
while (in->readUint16BE() == 0) {
readSubroutine(in, createSubroutine(in->readUint16BE()));
}
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp
index 014ca36df7..8431570e7f 100644
--- a/engines/agos/verb.cpp
+++ b/engines/agos/verb.cpp
@@ -27,7 +27,7 @@
#include "agos/agos.h"
#include "agos/intern.h"
-namespace Simon {
+namespace AGOS {
static const char *const russian_verb_names[] = {
"Ietj _",
@@ -176,7 +176,7 @@ static const char *const english_verb_prep_names[] = {
"", "", "", "to whom ?"
};
-void SimonEngine::clearName() {
+void AGOSEngine::clearName() {
HitArea *last;
HitArea *ha;
@@ -208,7 +208,7 @@ void SimonEngine::clearName() {
printVerbOf(last->id);
}
-void SimonEngine::printVerbOf(uint hitarea_id) {
+void AGOSEngine::printVerbOf(uint hitarea_id) {
const char *txt;
const char * const *verb_names;
const char * const *verb_prep_names;
@@ -271,7 +271,7 @@ void SimonEngine::printVerbOf(uint hitarea_id) {
showActionString((const byte *)txt);
}
-void SimonEngine::showActionString(const byte *string) {
+void AGOSEngine::showActionString(const byte *string) {
WindowBlock *window;
uint x;
@@ -292,7 +292,7 @@ void SimonEngine::showActionString(const byte *string) {
windowPutChar(window, *string);
}
-void SimonEngine::handleVerbClicked(uint verb) {
+void AGOSEngine::handleVerbClicked(uint verb) {
Subroutine *sub;
int result;
@@ -350,7 +350,7 @@ void SimonEngine::handleVerbClicked(uint verb) {
permitInput();
}
-void SimonEngine::resetNameWindow() {
+void AGOSEngine::resetNameWindow() {
WindowBlock *window;
if (getGameType() == GType_SIMON2 && getBitFlag(79))
@@ -364,7 +364,7 @@ void SimonEngine::resetNameWindow() {
_lastVerbOn = NULL;
}
-HitArea *SimonEngine::findBox(uint hitarea_id) {
+HitArea *AGOSEngine::findBox(uint hitarea_id) {
HitArea *ha = _hitAreas;
uint count = ARRAYSIZE(_hitAreas);
@@ -375,7 +375,7 @@ HitArea *SimonEngine::findBox(uint hitarea_id) {
return NULL;
}
-HitArea *SimonEngine::findEmptyHitArea() {
+HitArea *AGOSEngine::findEmptyHitArea() {
HitArea *ha = _hitAreas;
uint count = ARRAYSIZE(_hitAreas);
@@ -386,18 +386,18 @@ HitArea *SimonEngine::findEmptyHitArea() {
return NULL;
}
-void SimonEngine::delete_hitarea_by_index(uint index) {
+void AGOSEngine::delete_hitarea_by_index(uint index) {
CHECK_BOUNDS(index, _hitAreas);
_hitAreas[index].flags = 0;
}
-void SimonEngine::enableBox(uint hitarea) {
+void AGOSEngine::enableBox(uint hitarea) {
HitArea *ha = findBox(hitarea);
if (ha != NULL)
ha->flags &= ~kBFBoxDead;
}
-void SimonEngine::disableBox(uint hitarea) {
+void AGOSEngine::disableBox(uint hitarea) {
HitArea *ha = findBox(hitarea);
if (ha != NULL) {
ha->flags |= kBFBoxDead;
@@ -407,7 +407,7 @@ void SimonEngine::disableBox(uint hitarea) {
}
}
-void SimonEngine::moveBox(uint hitarea, int x, int y) {
+void AGOSEngine::moveBox(uint hitarea, int x, int y) {
HitArea *ha = findBox(hitarea);
if (ha != NULL) {
if (getGameType() == GType_FF || getGameType() == GType_PP) {
@@ -420,7 +420,7 @@ void SimonEngine::moveBox(uint hitarea, int x, int y) {
}
}
-void SimonEngine::undefineBox(uint hitarea) {
+void AGOSEngine::undefineBox(uint hitarea) {
HitArea *ha = findBox(hitarea);
if (ha != NULL) {
ha->flags = 0;
@@ -430,14 +430,14 @@ void SimonEngine::undefineBox(uint hitarea) {
}
}
-bool SimonEngine::isBoxDead(uint hitarea) {
+bool AGOSEngine::isBoxDead(uint hitarea) {
HitArea *ha = findBox(hitarea);
if (ha == NULL)
return false;
return (ha->flags & kBFBoxDead) == 0;
}
-void SimonEngine::defineBox(int id, int x, int y, int width, int height, int flags, int verb, Item *item_ptr) {
+void AGOSEngine::defineBox(int id, int x, int y, int width, int height, int flags, int verb, Item *item_ptr) {
HitArea *ha;
undefineBox(id);
@@ -460,7 +460,7 @@ void SimonEngine::defineBox(int id, int x, int y, int width, int height, int fla
_needHitAreaRecalc++;
}
-void SimonEngine::resetVerbs() {
+void AGOSEngine::resetVerbs() {
if (getGameType() == GType_PP) {
_verbHitArea = 300;
return;
@@ -516,7 +516,7 @@ void SimonEngine::resetVerbs() {
}
}
-void SimonEngine::setVerb(HitArea *ha) {
+void AGOSEngine::setVerb(HitArea *ha) {
if (getGameType() == GType_PP) {
return;
} else if (getGameType() == GType_FF) {
@@ -572,7 +572,7 @@ void SimonEngine::setVerb(HitArea *ha) {
}
}
-void SimonEngine::hitarea_leave(HitArea *ha, bool state) {
+void AGOSEngine::hitarea_leave(HitArea *ha, bool state) {
if (getGameType() == GType_FF) {
invertBox_FF(ha, state);
} else if (getGameType() == GType_SIMON2) {
@@ -582,13 +582,13 @@ void SimonEngine::hitarea_leave(HitArea *ha, bool state) {
}
}
-void SimonEngine::leaveHitAreaById(uint hitarea_id) {
+void AGOSEngine::leaveHitAreaById(uint hitarea_id) {
HitArea *ha = findBox(hitarea_id);
if (ha)
hitarea_leave(ha);
}
-void SimonEngine::checkUp(WindowBlock *window) {
+void AGOSEngine::checkUp(WindowBlock *window) {
uint16 j, k;
if (((_variableArray[31] - _variableArray[30]) == 40) && (_variableArray[31] > 52)) {
@@ -617,7 +617,7 @@ void SimonEngine::checkUp(WindowBlock *window) {
}
}
-void SimonEngine::checkDown(WindowBlock *window) {
+void AGOSEngine::checkDown(WindowBlock *window) {
uint16 j, k;
if (((_variableArray[31] - _variableArray[30]) == 24) && (_iOverflow == 1)) {
@@ -642,7 +642,7 @@ void SimonEngine::checkDown(WindowBlock *window) {
}
}
-void SimonEngine::inventoryUp(WindowBlock *window) {
+void AGOSEngine::inventoryUp(WindowBlock *window) {
if (getGameType() == GType_FF) {
_marks = 0;
checkUp(window);
@@ -669,7 +669,7 @@ void SimonEngine::inventoryUp(WindowBlock *window) {
}
}
-void SimonEngine::inventoryDown(WindowBlock *window) {
+void AGOSEngine::inventoryDown(WindowBlock *window) {
if (getGameType() == GType_FF) {
_marks = 0;
checkDown(window);
@@ -693,7 +693,7 @@ void SimonEngine::inventoryDown(WindowBlock *window) {
}
}
-void SimonEngine::boxController(uint x, uint y, uint mode) {
+void AGOSEngine::boxController(uint x, uint y, uint mode) {
HitArea *best_ha;
HitArea *ha = _hitAreas;
uint count = ARRAYSIZE(_hitAreas);
@@ -766,7 +766,7 @@ void SimonEngine::boxController(uint x, uint y, uint mode) {
return;
}
-void SimonEngine::displayName(HitArea *ha) {
+void AGOSEngine::displayName(HitArea *ha) {
bool result;
int x = 0, y = 0;
@@ -822,7 +822,7 @@ void SimonEngine::displayName(HitArea *ha) {
_lastNameOn = ha;
}
-void SimonEngine::invertBox_FF(HitArea *ha, bool state) {
+void AGOSEngine::invertBox_FF(HitArea *ha, bool state) {
if (getBitFlag(205) || getBitFlag(206)) {
if (state != 0) {
_mouseAnimMax = _oldMouseAnimMax;
@@ -865,7 +865,7 @@ void SimonEngine::invertBox_FF(HitArea *ha, bool state) {
}
}
-void SimonEngine::invertBox(HitArea * ha, byte a, byte b, byte c, byte d) {
+void AGOSEngine::invertBox(HitArea * ha, byte a, byte b, byte c, byte d) {
byte *src, color;
int w, h, i;
@@ -903,4 +903,4 @@ void SimonEngine::invertBox(HitArea * ha, byte a, byte b, byte c, byte d) {
_lockWord &= ~0x8000;
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index d7deb2fbc0..5095c9a108 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -30,103 +30,103 @@
#include "common/system.h"
-namespace Simon {
+namespace AGOS {
// Opcode tables
-void SimonEngine::setupVgaOpcodes() {
+void AGOSEngine::setupVgaOpcodes() {
static const VgaOpcodeProc vga_opcode_table[] = {
NULL,
- &SimonEngine::vc1_fadeOut,
- &SimonEngine::vc2_call,
- &SimonEngine::vc3_loadSprite,
- &SimonEngine::vc4_fadeIn,
- &SimonEngine::vc5_skip_if_neq,
- &SimonEngine::vc6_skip_ifn_sib_with_a,
- &SimonEngine::vc7_skip_if_sib_with_a,
- &SimonEngine::vc8_skip_if_parent_is,
- &SimonEngine::vc9_skip_if_unk3_is,
- &SimonEngine::vc10_draw,
- &SimonEngine::vc11_clearPathFinder,
- &SimonEngine::vc12_delay,
- &SimonEngine::vc13_addToSpriteX,
- &SimonEngine::vc14_addToSpriteY,
- &SimonEngine::vc15_sync,
- &SimonEngine::vc16_waitSync,
- &SimonEngine::vc17_setPathfinderItem,
- &SimonEngine::vc18_jump,
- &SimonEngine::vc19_chain_to_script,
- &SimonEngine::vc20_setRepeat,
- &SimonEngine::vc21_endRepeat,
- &SimonEngine::vc22_setSpritePalette,
- &SimonEngine::vc23_setSpritePriority,
- &SimonEngine::vc24_setSpriteXY,
- &SimonEngine::vc25_halt_sprite,
- &SimonEngine::vc26_setSubWindow,
- &SimonEngine::vc27_resetSprite,
- &SimonEngine::vc28_dummy_op,
- &SimonEngine::vc29_stopAllSounds,
- &SimonEngine::vc30_setFrameRate,
- &SimonEngine::vc31_setWindow,
- &SimonEngine::vc32_copyVar,
- &SimonEngine::vc33_setMouseOn,
- &SimonEngine::vc34_setMouseOff,
- &SimonEngine::vc35_clearWindow,
- &SimonEngine::vc36_setWindowImage,
- &SimonEngine::vc37_addToSpriteY,
- &SimonEngine::vc38_skipIfVarZero,
- &SimonEngine::vc39_setVar,
- &SimonEngine::vc40,
- &SimonEngine::vc41,
- &SimonEngine::vc42_delayIfNotEQ,
- &SimonEngine::vc43_skipIfBitClear,
- &SimonEngine::vc44_skipIfBitSet,
- &SimonEngine::vc45_setSpriteX,
- &SimonEngine::vc46_setSpriteY,
- &SimonEngine::vc47_addToVar,
- &SimonEngine::vc48_setPathFinder,
- &SimonEngine::vc49_setBit,
- &SimonEngine::vc50_clearBit,
- &SimonEngine::vc51_enableBox,
- &SimonEngine::vc52_playSound,
- &SimonEngine::vc53_panSFX,
- &SimonEngine::vc54_no_op,
- &SimonEngine::vc55_moveBox,
- &SimonEngine::vc56_delay,
- &SimonEngine::vc57_blackPalette,
- &SimonEngine::vc58,
- &SimonEngine::vc59,
- &SimonEngine::vc60_killSprite,
- &SimonEngine::vc61_setMaskImage,
- &SimonEngine::vc62_fastFadeOut,
- &SimonEngine::vc63_fastFadeIn,
- &SimonEngine::vc64_skipIfSpeechEnded,
- &SimonEngine::vc65_slowFadeIn,
- &SimonEngine::vc66_skipIfNotEqual,
- &SimonEngine::vc67_skipIfGE,
- &SimonEngine::vc68_skipIfLE,
- &SimonEngine::vc69_playTrack,
- &SimonEngine::vc70_queueMusic,
- &SimonEngine::vc71_checkMusicQueue,
- &SimonEngine::vc72_play_track_2,
- &SimonEngine::vc73_setMark,
- &SimonEngine::vc74_clearMark,
- &SimonEngine::vc75_setScale,
- &SimonEngine::vc76_setScaleXOffs,
- &SimonEngine::vc77_setScaleYOffs,
- &SimonEngine::vc78_computeXY,
- &SimonEngine::vc79_computePosNum,
- &SimonEngine::vc80_setOverlayImage,
- &SimonEngine::vc81_setRandom,
- &SimonEngine::vc82_getPathValue,
- &SimonEngine::vc83_playSoundLoop,
- &SimonEngine::vc84_stopSoundLoop,
+ &AGOSEngine::vc1_fadeOut,
+ &AGOSEngine::vc2_call,
+ &AGOSEngine::vc3_loadSprite,
+ &AGOSEngine::vc4_fadeIn,
+ &AGOSEngine::vc5_skip_if_neq,
+ &AGOSEngine::vc6_skip_ifn_sib_with_a,
+ &AGOSEngine::vc7_skip_if_sib_with_a,
+ &AGOSEngine::vc8_skip_if_parent_is,
+ &AGOSEngine::vc9_skip_if_unk3_is,
+ &AGOSEngine::vc10_draw,
+ &AGOSEngine::vc11_clearPathFinder,
+ &AGOSEngine::vc12_delay,
+ &AGOSEngine::vc13_addToSpriteX,
+ &AGOSEngine::vc14_addToSpriteY,
+ &AGOSEngine::vc15_sync,
+ &AGOSEngine::vc16_waitSync,
+ &AGOSEngine::vc17_setPathfinderItem,
+ &AGOSEngine::vc18_jump,
+ &AGOSEngine::vc19_chain_to_script,
+ &AGOSEngine::vc20_setRepeat,
+ &AGOSEngine::vc21_endRepeat,
+ &AGOSEngine::vc22_setSpritePalette,
+ &AGOSEngine::vc23_setSpritePriority,
+ &AGOSEngine::vc24_setSpriteXY,
+ &AGOSEngine::vc25_halt_sprite,
+ &AGOSEngine::vc26_setSubWindow,
+ &AGOSEngine::vc27_resetSprite,
+ &AGOSEngine::vc28_dummy_op,
+ &AGOSEngine::vc29_stopAllSounds,
+ &AGOSEngine::vc30_setFrameRate,
+ &AGOSEngine::vc31_setWindow,
+ &AGOSEngine::vc32_copyVar,
+ &AGOSEngine::vc33_setMouseOn,
+ &AGOSEngine::vc34_setMouseOff,
+ &AGOSEngine::vc35_clearWindow,
+ &AGOSEngine::vc36_setWindowImage,
+ &AGOSEngine::vc37_addToSpriteY,
+ &AGOSEngine::vc38_skipIfVarZero,
+ &AGOSEngine::vc39_setVar,
+ &AGOSEngine::vc40,
+ &AGOSEngine::vc41,
+ &AGOSEngine::vc42_delayIfNotEQ,
+ &AGOSEngine::vc43_skipIfBitClear,
+ &AGOSEngine::vc44_skipIfBitSet,
+ &AGOSEngine::vc45_setSpriteX,
+ &AGOSEngine::vc46_setSpriteY,
+ &AGOSEngine::vc47_addToVar,
+ &AGOSEngine::vc48_setPathFinder,
+ &AGOSEngine::vc49_setBit,
+ &AGOSEngine::vc50_clearBit,
+ &AGOSEngine::vc51_enableBox,
+ &AGOSEngine::vc52_playSound,
+ &AGOSEngine::vc53_panSFX,
+ &AGOSEngine::vc54_no_op,
+ &AGOSEngine::vc55_moveBox,
+ &AGOSEngine::vc56_delay,
+ &AGOSEngine::vc57_blackPalette,
+ &AGOSEngine::vc58,
+ &AGOSEngine::vc59,
+ &AGOSEngine::vc60_killSprite,
+ &AGOSEngine::vc61_setMaskImage,
+ &AGOSEngine::vc62_fastFadeOut,
+ &AGOSEngine::vc63_fastFadeIn,
+ &AGOSEngine::vc64_skipIfSpeechEnded,
+ &AGOSEngine::vc65_slowFadeIn,
+ &AGOSEngine::vc66_skipIfNotEqual,
+ &AGOSEngine::vc67_skipIfGE,
+ &AGOSEngine::vc68_skipIfLE,
+ &AGOSEngine::vc69_playTrack,
+ &AGOSEngine::vc70_queueMusic,
+ &AGOSEngine::vc71_checkMusicQueue,
+ &AGOSEngine::vc72_play_track_2,
+ &AGOSEngine::vc73_setMark,
+ &AGOSEngine::vc74_clearMark,
+ &AGOSEngine::vc75_setScale,
+ &AGOSEngine::vc76_setScaleXOffs,
+ &AGOSEngine::vc77_setScaleYOffs,
+ &AGOSEngine::vc78_computeXY,
+ &AGOSEngine::vc79_computePosNum,
+ &AGOSEngine::vc80_setOverlayImage,
+ &AGOSEngine::vc81_setRandom,
+ &AGOSEngine::vc82_getPathValue,
+ &AGOSEngine::vc83_playSoundLoop,
+ &AGOSEngine::vc84_stopSoundLoop,
};
_vga_opcode_table = vga_opcode_table;
}
// Script parser
-void SimonEngine::runVgaScript() {
+void AGOSEngine::runVgaScript() {
for (;;) {
uint opcode;
@@ -154,7 +154,7 @@ void SimonEngine::runVgaScript() {
}
}
-bool SimonEngine::itemIsSiblingOf(uint16 a) {
+bool AGOSEngine::itemIsSiblingOf(uint16 a) {
Item *item;
CHECK_BOUNDS(a, _objectArray);
@@ -166,7 +166,7 @@ bool SimonEngine::itemIsSiblingOf(uint16 a) {
return me()->parent == item->parent;
}
-bool SimonEngine::itemIsParentOf(uint16 a, uint16 b) {
+bool AGOSEngine::itemIsParentOf(uint16 a, uint16 b) {
Item *item_a, *item_b;
CHECK_BOUNDS(a, _objectArray);
@@ -181,7 +181,7 @@ bool SimonEngine::itemIsParentOf(uint16 a, uint16 b) {
return derefItem(item_a->parent) == item_b;
}
-bool SimonEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
+bool AGOSEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
Item *item;
CHECK_BOUNDS(a, _objectArray);
@@ -192,7 +192,7 @@ bool SimonEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
return item->state == b;
}
-VgaSprite *SimonEngine::findCurSprite() {
+VgaSprite *AGOSEngine::findCurSprite() {
VgaSprite *vsp = _vgaSprites;
while (vsp->id) {
if (getGameType() == GType_SIMON1 || getGameType() == GType_WW) {
@@ -207,35 +207,35 @@ VgaSprite *SimonEngine::findCurSprite() {
return vsp;
}
-int SimonEngine::vcReadVarOrWord() {
+int AGOSEngine::vcReadVarOrWord() {
int16 var = vcReadNextWord();
if (var < 0)
var = vcReadVar(-var);
return var;
}
-uint SimonEngine::vcReadNextWord() {
+uint AGOSEngine::vcReadNextWord() {
uint a;
a = readUint16Wrapper(_vcPtr);
_vcPtr += 2;
return a;
}
-uint SimonEngine::vcReadNextByte() {
+uint AGOSEngine::vcReadNextByte() {
return *_vcPtr++;
}
-uint SimonEngine::vcReadVar(uint var) {
+uint AGOSEngine::vcReadVar(uint var) {
assert(var < _numVars);
return (uint16)_variableArrayPtr[var];
}
-void SimonEngine::vcWriteVar(uint var, int16 value) {
+void AGOSEngine::vcWriteVar(uint var, int16 value) {
assert(var < _numVars);
_variableArrayPtr[var] = value;
}
-void SimonEngine::vcSkipNextInstruction() {
+void AGOSEngine::vcSkipNextInstruction() {
static const byte opcodeParamLenWW[] = {
0, 6, 2, 10, 6, 4, 2, 2,
4, 4, 8, 2, 2, 2, 2, 2,
@@ -305,12 +305,12 @@ void SimonEngine::vcSkipNextInstruction() {
}
// VGA Script commands
-void SimonEngine::vc1_fadeOut() {
+void AGOSEngine::vc1_fadeOut() {
/* dummy opcode */
_vcPtr += 6;
}
-void SimonEngine::vc2_call() {
+void AGOSEngine::vc2_call() {
VgaPointersEntry *vpe;
uint16 count, num, res;
byte *old_file_1, *old_file_2;
@@ -395,7 +395,7 @@ void SimonEngine::vc2_call() {
_vcPtr = vcPtrOrg;
}
-void SimonEngine::vc3_loadSprite() {
+void AGOSEngine::vc3_loadSprite() {
uint16 windowNum, zoneNum, palette, x, y, vgaSpriteId;
uint16 count, res;
VgaSprite *vsp;
@@ -530,36 +530,36 @@ void SimonEngine::vc3_loadSprite() {
_curVgaFile1 = old_file_1;
}
-void SimonEngine::vc4_fadeIn() {
+void AGOSEngine::vc4_fadeIn() {
/* dummy opcode */
_vcPtr += 6;
}
-void SimonEngine::vc5_skip_if_neq() {
+void AGOSEngine::vc5_skip_if_neq() {
uint16 var = vcReadNextWord();
uint16 value = vcReadNextWord();
if (vcReadVar(var) != value)
vcSkipNextInstruction();
}
-void SimonEngine::vc6_skip_ifn_sib_with_a() {
+void AGOSEngine::vc6_skip_ifn_sib_with_a() {
if (!itemIsSiblingOf(vcReadNextWord()))
vcSkipNextInstruction();
}
-void SimonEngine::vc7_skip_if_sib_with_a() {
+void AGOSEngine::vc7_skip_if_sib_with_a() {
if (itemIsSiblingOf(vcReadNextWord()))
vcSkipNextInstruction();
}
-void SimonEngine::vc8_skip_if_parent_is() {
+void AGOSEngine::vc8_skip_if_parent_is() {
uint16 a = vcReadNextWord();
uint16 b = vcReadNextWord();
if (!itemIsParentOf(a, b))
vcSkipNextInstruction();
}
-void SimonEngine::vc9_skip_if_unk3_is() {
+void AGOSEngine::vc9_skip_if_unk3_is() {
uint16 a = vcReadNextWord();
uint16 b = vcReadNextWord();
if (!vc_maybe_skip_proc_1(a, b))
@@ -615,7 +615,7 @@ void vc10_skip_cols(VC10_state *vs) {
}
}
-byte *SimonEngine::vc10_uncompressFlip(const byte *src, uint w, uint h) {
+byte *AGOSEngine::vc10_uncompressFlip(const byte *src, uint w, uint h) {
w *= 8;
byte *src_org, *dst_org;
@@ -683,7 +683,7 @@ byte *SimonEngine::vc10_uncompressFlip(const byte *src, uint w, uint h) {
return _videoBuf1;
}
-byte *SimonEngine::vc10_flip(const byte *src, uint w, uint h) {
+byte *AGOSEngine::vc10_flip(const byte *src, uint w, uint h) {
if (src == _vc10BasePtrOld)
return _videoBuf1;
@@ -729,7 +729,7 @@ static uint16 _video_windows[128] = {
};
*/
-void SimonEngine::decodeColumn(byte *dst, const byte *src, int height) {
+void AGOSEngine::decodeColumn(byte *dst, const byte *src, int height) {
const uint pitch = _dxSurfacePitch;
int8 reps = (int8)0x80;
byte color;
@@ -773,7 +773,7 @@ void SimonEngine::decodeColumn(byte *dst, const byte *src, int height) {
}
}
-void SimonEngine::decodeRow(byte *dst, const byte *src, int width) {
+void AGOSEngine::decodeRow(byte *dst, const byte *src, int width) {
const uint pitch = _dxSurfacePitch;
int8 reps = (int8)0x80;
byte color;
@@ -817,7 +817,7 @@ void SimonEngine::decodeRow(byte *dst, const byte *src, int width) {
}
}
-void SimonEngine::vc10_draw() {
+void AGOSEngine::vc10_draw() {
byte *p2;
uint width, height;
byte flags;
@@ -925,7 +925,7 @@ void SimonEngine::vc10_draw() {
}
}
-bool SimonEngine::drawImages_clip(VC10_state *state) {
+bool AGOSEngine::drawImages_clip(VC10_state *state) {
const uint16 *vlut;
uint maxWidth, maxHeight;
int cur;
@@ -983,7 +983,7 @@ bool SimonEngine::drawImages_clip(VC10_state *state) {
return 1;
}
-void SimonEngine::drawImages_Feeble(VC10_state *state) {
+void AGOSEngine::drawImages_Feeble(VC10_state *state) {
if (state->flags & kDFCompressed) {
if (state->flags & kDFScaled) {
state->surf_addr = getScaleBuf();
@@ -1146,7 +1146,7 @@ void SimonEngine::drawImages_Feeble(VC10_state *state) {
}
}
-void SimonEngine::drawImages(VC10_state *state) {
+void AGOSEngine::drawImages(VC10_state *state) {
const uint16 *vlut = &_video_windows[_windowNum * 4];
if (drawImages_clip(state) == 0)
@@ -1365,7 +1365,7 @@ void SimonEngine::drawImages(VC10_state *state) {
}
}
-void SimonEngine::horizontalScroll(VC10_state *state) {
+void AGOSEngine::horizontalScroll(VC10_state *state) {
const byte *src;
byte *dst;
int w;
@@ -1398,7 +1398,7 @@ void SimonEngine::horizontalScroll(VC10_state *state) {
}
}
-void SimonEngine::verticalScroll(VC10_state *state) {
+void AGOSEngine::verticalScroll(VC10_state *state) {
const byte *src;
byte *dst;
int h;
@@ -1424,7 +1424,7 @@ void SimonEngine::verticalScroll(VC10_state *state) {
}
}
-void SimonEngine::scaleClip(int16 h, int16 w, int16 y, int16 x, int16 scrollY) {
+void AGOSEngine::scaleClip(int16 h, int16 w, int16 y, int16 x, int16 scrollY) {
Common::Rect srcRect, dstRect;
float factor, xscale;
@@ -1488,7 +1488,7 @@ void SimonEngine::scaleClip(int16 h, int16 w, int16 y, int16 x, int16 scrollY) {
}
}
-void SimonEngine::vc11_clearPathFinder() {
+void AGOSEngine::vc11_clearPathFinder() {
if (getGameType() == GType_WW) {
// FIXME
vcReadNextWord();
@@ -1497,7 +1497,7 @@ void SimonEngine::vc11_clearPathFinder() {
}
}
-void SimonEngine::vc12_delay() {
+void AGOSEngine::vc12_delay() {
VgaSprite *vsp = findCurSprite();
uint16 num;
@@ -1520,19 +1520,19 @@ void SimonEngine::vc12_delay() {
_vcPtr = (byte *)&_vc_get_out_of_code;
}
-void SimonEngine::vc13_addToSpriteX() {
+void AGOSEngine::vc13_addToSpriteX() {
VgaSprite *vsp = findCurSprite();
vsp->x += (int16)vcReadNextWord();
_vgaSpriteChanged++;
}
-void SimonEngine::vc14_addToSpriteY() {
+void AGOSEngine::vc14_addToSpriteY() {
VgaSprite *vsp = findCurSprite();
vsp->y += (int16)vcReadNextWord();
_vgaSpriteChanged++;
}
-void SimonEngine::vc15_sync() {
+void AGOSEngine::vc15_sync() {
VgaSleepStruct *vfs = _vgaSleepStructs, *vfs_tmp;
uint16 id = vcReadNextWord();
while (vfs->ident != 0) {
@@ -1554,7 +1554,7 @@ void SimonEngine::vc15_sync() {
_vgaWaitFor = 0;
}
-void SimonEngine::vc16_waitSync() {
+void AGOSEngine::vc16_waitSync() {
VgaSleepStruct *vfs = _vgaSleepStructs;
while (vfs->ident)
vfs++;
@@ -1567,7 +1567,7 @@ void SimonEngine::vc16_waitSync() {
_vcPtr = (byte *)&_vc_get_out_of_code;
}
-void SimonEngine::vc17_setPathfinderItem() {
+void AGOSEngine::vc17_setPathfinderItem() {
if (getGameType() == GType_WW) {
// FIXME
vcReadNextWord();
@@ -1582,20 +1582,20 @@ void SimonEngine::vc17_setPathfinderItem() {
}
}
-void SimonEngine::vc18_jump() {
+void AGOSEngine::vc18_jump() {
int16 offs = vcReadNextWord();
_vcPtr += offs;
}
/* chain to script? */
-void SimonEngine::vc19_chain_to_script() {
+void AGOSEngine::vc19_chain_to_script() {
/* unused */
error("vc19_chain_to_script: not implemented");
}
/* helper routines */
-void SimonEngine::vc20_setRepeat() {
+void AGOSEngine::vc20_setRepeat() {
/* 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.
@@ -1605,7 +1605,7 @@ void SimonEngine::vc20_setRepeat() {
_vcPtr += 2;
}
-void SimonEngine::vc21_endRepeat() {
+void AGOSEngine::vc21_endRepeat() {
int16 a = vcReadNextWord();
const byte *tmp = _vcPtr + a;
if (getGameType() == GType_SIMON1 || getGameType() == GType_WW)
@@ -1621,7 +1621,7 @@ void SimonEngine::vc21_endRepeat() {
}
}
-void SimonEngine::vc22_setSpritePalette() {
+void AGOSEngine::vc22_setSpritePalette() {
byte *offs, *palptr, *src;
uint16 a, b, num, palSize;
@@ -1671,7 +1671,7 @@ void SimonEngine::vc22_setSpritePalette() {
_vgaSpriteChanged++;
}
-void SimonEngine::vc23_setSpritePriority() {
+void AGOSEngine::vc23_setSpritePriority() {
VgaSprite *vsp = findCurSprite(), *vus2;
uint16 pri = vcReadNextWord();
VgaSprite bak;
@@ -1707,7 +1707,7 @@ void SimonEngine::vc23_setSpritePriority() {
_vgaSpriteChanged++;
}
-void SimonEngine::vc24_setSpriteXY() {
+void AGOSEngine::vc24_setSpriteXY() {
VgaSprite *vsp = findCurSprite();
vsp->image = vcReadVarOrWord();
@@ -1722,7 +1722,7 @@ void SimonEngine::vc24_setSpriteXY() {
_vgaSpriteChanged++;
}
-void SimonEngine::vc25_halt_sprite() {
+void AGOSEngine::vc25_halt_sprite() {
VgaSprite *vsp = findCurSprite();
while (vsp->id != 0) {
memcpy(vsp, vsp + 1, sizeof(VgaSprite));
@@ -1732,7 +1732,7 @@ void SimonEngine::vc25_halt_sprite() {
_vgaSpriteChanged++;
}
-void SimonEngine::vc26_setSubWindow() {
+void AGOSEngine::vc26_setSubWindow() {
uint16 *as = &_video_windows[vcReadNextWord() * 4]; // number
as[0] = vcReadNextWord(); // x
as[1] = vcReadNextWord(); // y
@@ -1740,7 +1740,7 @@ void SimonEngine::vc26_setSubWindow() {
as[3] = vcReadNextWord(); // height
}
-void SimonEngine::vc27_resetSprite() {
+void AGOSEngine::vc27_resetSprite() {
VgaSprite bak, *vsp;
VgaSleepStruct *vfs;
VgaTimerEntry *vte, *vte2;
@@ -1790,27 +1790,27 @@ void SimonEngine::vc27_resetSprite() {
_lockWord &= ~8;
}
-void SimonEngine::vc28_dummy_op() {
+void AGOSEngine::vc28_dummy_op() {
/* unused */
_vcPtr += 8;
}
-void SimonEngine::vc29_stopAllSounds() {
+void AGOSEngine::vc29_stopAllSounds() {
if (getGameType() != GType_PP)
_sound->stopVoice();
_sound->stopAllSfx();
}
-void SimonEngine::vc30_setFrameRate() {
+void AGOSEngine::vc30_setFrameRate() {
_frameRate = vcReadNextWord();
}
-void SimonEngine::vc31_setWindow() {
+void AGOSEngine::vc31_setWindow() {
_windowNum = vcReadNextWord();
}
-void SimonEngine::vc32_copyVar() {
+void AGOSEngine::vc32_copyVar() {
if (getGameType() == GType_WW) {
// FIXME
} else {
@@ -1819,26 +1819,26 @@ void SimonEngine::vc32_copyVar() {
}
}
-void SimonEngine::vc33_setMouseOn() {
+void AGOSEngine::vc33_setMouseOn() {
if (_mouseHideCount != 0) {
_mouseHideCount = 1;
mouseOn();
}
}
-void SimonEngine::vc34_setMouseOff() {
+void AGOSEngine::vc34_setMouseOff() {
mouseOff();
_mouseHideCount = 200;
_leftButtonDown = 0;
}
-void SimonEngine::vc35_clearWindow() {
+void AGOSEngine::vc35_clearWindow() {
/* unused */
_vcPtr += 4;
_vgaSpriteChanged++;
}
-void SimonEngine::vc36_setWindowImage() {
+void AGOSEngine::vc36_setWindowImage() {
_updateScreen = false;
uint16 vga_res = vcReadNextWord();
uint16 windowNum = vcReadNextWord();
@@ -1856,7 +1856,7 @@ void SimonEngine::vc36_setWindowImage() {
}
}
-void SimonEngine::vc37_addToSpriteY() {
+void AGOSEngine::vc37_addToSpriteY() {
if (getGameType() == GType_WW) {
// FIXME
vcReadNextWord();
@@ -1868,19 +1868,19 @@ void SimonEngine::vc37_addToSpriteY() {
}
}
-void SimonEngine::vc38_skipIfVarZero() {
+void AGOSEngine::vc38_skipIfVarZero() {
uint16 var = vcReadNextWord();
if (vcReadVar(var) == 0)
vcSkipNextInstruction();
}
-void SimonEngine::vc39_setVar() {
+void AGOSEngine::vc39_setVar() {
uint16 var = vcReadNextWord();
int16 value = vcReadNextWord();
vcWriteVar(var, value);
}
-void SimonEngine::vc40() {
+void AGOSEngine::vc40() {
uint16 var = vcReadNextWord();
int16 value = vcReadVar(var) + vcReadNextWord();
@@ -1909,7 +1909,7 @@ no_scroll:;
vcWriteVar(var, value);
}
-void SimonEngine::vc41() {
+void AGOSEngine::vc41() {
uint16 var = vcReadNextWord();
int16 value = vcReadVar(var) - vcReadNextWord();
@@ -1935,7 +1935,7 @@ no_scroll:;
vcWriteVar(var, value);
}
-void SimonEngine::vc42_delayIfNotEQ() {
+void AGOSEngine::vc42_delayIfNotEQ() {
uint16 val = vcReadVar(vcReadNextWord());
if (val != vcReadNextWord()) {
@@ -1944,19 +1944,19 @@ void SimonEngine::vc42_delayIfNotEQ() {
}
}
-void SimonEngine::vc43_skipIfBitClear() {
+void AGOSEngine::vc43_skipIfBitClear() {
if (!getBitFlag(vcReadNextWord())) {
vcSkipNextInstruction();
}
}
-void SimonEngine::vc44_skipIfBitSet() {
+void AGOSEngine::vc44_skipIfBitSet() {
if (getBitFlag(vcReadNextWord())) {
vcSkipNextInstruction();
}
}
-void SimonEngine::vc45_setSpriteX() {
+void AGOSEngine::vc45_setSpriteX() {
if (getGameType() == GType_WW) {
//FIXME
vcReadNextWord();
@@ -1968,13 +1968,13 @@ void SimonEngine::vc45_setSpriteX() {
}
}
-void SimonEngine::vc46_setSpriteY() {
+void AGOSEngine::vc46_setSpriteY() {
VgaSprite *vsp = findCurSprite();
vsp->y = vcReadVar(vcReadNextWord());
_vgaSpriteChanged++;
}
-void SimonEngine::vc47_addToVar() {
+void AGOSEngine::vc47_addToVar() {
if (getGameType() == GType_WW) {
//FIXME
vcReadNextWord();
@@ -1984,7 +1984,7 @@ void SimonEngine::vc47_addToVar() {
}
}
-void SimonEngine::vc48_setPathFinder() {
+void AGOSEngine::vc48_setPathFinder() {
uint16 a = (uint16)_variableArrayPtr[12];
const uint16 *p = _pathFindArray[a - 1];
@@ -2060,17 +2060,17 @@ void SimonEngine::vc48_setPathFinder() {
}
}
-void SimonEngine::setBitFlag(uint bit, bool value) {
+void AGOSEngine::setBitFlag(uint bit, bool value) {
uint16 *bits = &_bitArray[bit / 16];
*bits = (*bits & ~(1 << (bit & 15))) | (value << (bit & 15));
}
-bool SimonEngine::getBitFlag(uint bit) {
+bool AGOSEngine::getBitFlag(uint bit) {
uint16 *bits = &_bitArray[bit / 16];
return (*bits & (1 << (bit & 15))) != 0;
}
-void SimonEngine::vc49_setBit() {
+void AGOSEngine::vc49_setBit() {
uint16 bit = vcReadNextWord();
if (getGameType() == GType_FF && bit == 82) {
_variableArrayPtr = _variableArray2;
@@ -2078,7 +2078,7 @@ void SimonEngine::vc49_setBit() {
setBitFlag(bit, true);
}
-void SimonEngine::vc50_clearBit() {
+void AGOSEngine::vc50_clearBit() {
uint16 bit = vcReadNextWord();
if (getGameType() == GType_FF && bit == 82) {
_variableArrayPtr = _variableArray;
@@ -2086,11 +2086,11 @@ void SimonEngine::vc50_clearBit() {
setBitFlag(bit, false);
}
-void SimonEngine::vc51_enableBox() {
+void AGOSEngine::vc51_enableBox() {
enableBox(vcReadNextWord());
}
-void SimonEngine::vc52_playSound() {
+void AGOSEngine::vc52_playSound() {
bool ambient = false;
uint16 sound = vcReadNextWord();
@@ -2119,7 +2119,7 @@ void SimonEngine::vc52_playSound() {
}
}
-void SimonEngine::vc53_panSFX() {
+void AGOSEngine::vc53_panSFX() {
VgaSprite *vsp = findCurSprite();
int pan;
@@ -2142,12 +2142,12 @@ void SimonEngine::vc53_panSFX() {
debug(0, "vc53_panSFX: snd %d xoffs %d vol %d", sound, xoffs, vol);
}
-void SimonEngine::vc54_no_op() {
+void AGOSEngine::vc54_no_op() {
/* unused */
_vcPtr += 6;
}
-void SimonEngine::vc55_moveBox() {
+void AGOSEngine::vc55_moveBox() {
HitArea *ha = _hitAreas;
uint count = ARRAYSIZE(_hitAreas);
uint16 id = vcReadNextWord();
@@ -2168,7 +2168,7 @@ void SimonEngine::vc55_moveBox() {
_needHitAreaRecalc++;
}
-void SimonEngine::vc56_delay() {
+void AGOSEngine::vc56_delay() {
if (getGameType() == GType_WW) {
byte *src = _curVgaFile2 + 32;
byte *dst = getBackBuf();
@@ -2191,7 +2191,7 @@ void SimonEngine::vc56_delay() {
}
}
-void SimonEngine::vc57_blackPalette() {
+void AGOSEngine::vc57_blackPalette() {
if (getGameType() == GType_WW) {
uint8 palette[1024];
memset(palette, 0, sizeof(palette));
@@ -2199,7 +2199,7 @@ void SimonEngine::vc57_blackPalette() {
}
}
-void SimonEngine::vc58() {
+void AGOSEngine::vc58() {
if (getGameType() == GType_WW)
return;
@@ -2222,7 +2222,7 @@ void SimonEngine::vc58() {
_vgaCurZoneNum = file;
}
-void SimonEngine::vc59() {
+void AGOSEngine::vc59() {
if (getGameType() == GType_SIMON2 || getGameType() == GType_FF || getGameType() == GType_PP) {
uint16 file = vcReadNextWord();
uint16 start = vcReadNextWord();
@@ -2240,7 +2240,7 @@ void SimonEngine::vc59() {
}
}
-void SimonEngine::vc_kill_sprite(uint file, uint sprite) {
+void AGOSEngine::vc_kill_sprite(uint file, uint sprite) {
uint16 old_sprite_id, old_cur_file_id;
VgaSleepStruct *vfs;
VgaSprite *vsp;
@@ -2285,7 +2285,7 @@ void SimonEngine::vc_kill_sprite(uint file, uint sprite) {
_vcPtr = vcPtrOrg;
}
-void SimonEngine::vc60_killSprite() {
+void AGOSEngine::vc60_killSprite() {
uint16 zoneNum;
if (getGameType() == GType_SIMON1) {
@@ -2297,7 +2297,7 @@ void SimonEngine::vc60_killSprite() {
vc_kill_sprite(zoneNum, sprite);
}
-void SimonEngine::vc61_setMaskImage() {
+void AGOSEngine::vc61_setMaskImage() {
if (getGameType() == GType_WW) {
// FIXME
vcReadVarOrWord();
@@ -2313,7 +2313,7 @@ void SimonEngine::vc61_setMaskImage() {
}
}
-void SimonEngine::vc62_fastFadeOut() {
+void AGOSEngine::vc62_fastFadeOut() {
vc29_stopAllSounds();
if (!_fastFadeOutFlag) {
@@ -2396,7 +2396,7 @@ void SimonEngine::vc62_fastFadeOut() {
}
}
-void SimonEngine::vc63_fastFadeIn() {
+void AGOSEngine::vc63_fastFadeIn() {
if (getGameType() == GType_FF || getGameType() == GType_PP) {
_fastFadeInFlag = 256;
} else {
@@ -2408,14 +2408,14 @@ void SimonEngine::vc63_fastFadeIn() {
_fastFadeOutFlag = false;
}
-void SimonEngine::vc64_skipIfSpeechEnded() {
+void AGOSEngine::vc64_skipIfSpeechEnded() {
if ((getGameType() == GType_SIMON2 && _subtitles && _language != Common::HB_ISR) ||
!_sound->isVoiceActive()) {
vcSkipNextInstruction();
}
}
-void SimonEngine::vc65_slowFadeIn() {
+void AGOSEngine::vc65_slowFadeIn() {
_fastFadeInFlag = 624;
_fastFadeCount = 208;
if (_windowNum != 4) {
@@ -2426,7 +2426,7 @@ void SimonEngine::vc65_slowFadeIn() {
_fastFadeOutFlag = false;
}
-void SimonEngine::vc66_skipIfNotEqual() {
+void AGOSEngine::vc66_skipIfNotEqual() {
uint16 a = vcReadNextWord();
uint16 b = vcReadNextWord();
@@ -2434,7 +2434,7 @@ void SimonEngine::vc66_skipIfNotEqual() {
vcSkipNextInstruction();
}
-void SimonEngine::vc67_skipIfGE() {
+void AGOSEngine::vc67_skipIfGE() {
uint16 a = vcReadNextWord();
uint16 b = vcReadNextWord();
@@ -2442,7 +2442,7 @@ void SimonEngine::vc67_skipIfGE() {
vcSkipNextInstruction();
}
-void SimonEngine::vc68_skipIfLE() {
+void AGOSEngine::vc68_skipIfLE() {
uint16 a = vcReadNextWord();
uint16 b = vcReadNextWord();
@@ -2450,7 +2450,7 @@ void SimonEngine::vc68_skipIfLE() {
vcSkipNextInstruction();
}
-void SimonEngine::vc69_playTrack() {
+void AGOSEngine::vc69_playTrack() {
int16 track = vcReadNextWord();
int16 loop = vcReadNextWord();
@@ -2473,7 +2473,7 @@ void SimonEngine::vc69_playTrack() {
midi.startTrack(track);
}
-void SimonEngine::vc70_queueMusic() {
+void AGOSEngine::vc70_queueMusic() {
// Simon2
uint16 track = vcReadNextWord();
uint16 loop = vcReadNextWord();
@@ -2489,7 +2489,7 @@ void SimonEngine::vc70_queueMusic() {
midi.setLoop(loop != 0);
}
-void SimonEngine::vc71_checkMusicQueue() {
+void AGOSEngine::vc71_checkMusicQueue() {
// Jamieson630:
// This command skips the next instruction
// unless (1) there is a track playing, AND
@@ -2498,7 +2498,7 @@ void SimonEngine::vc71_checkMusicQueue() {
vcSkipNextInstruction();
}
-void SimonEngine::vc72_play_track_2() {
+void AGOSEngine::vc72_play_track_2() {
// Jamieson630:
// This is a "play or stop track". Note that
// this opcode looks very similar in function
@@ -2523,15 +2523,15 @@ void SimonEngine::vc72_play_track_2() {
}
}
-void SimonEngine::vc73_setMark() {
+void AGOSEngine::vc73_setMark() {
_marks |= (1 << vcReadNextWord());
}
-void SimonEngine::vc74_clearMark() {
+void AGOSEngine::vc74_clearMark() {
_marks &= ~(1 << vcReadNextWord());
}
-int SimonEngine::getScale(int16 y, int16 x) {
+int AGOSEngine::getScale(int16 y, int16 x) {
int16 z;
if (y > _baseY) {
@@ -2554,12 +2554,12 @@ int SimonEngine::getScale(int16 y, int16 x) {
}
}
-void SimonEngine::vc75_setScale() {
+void AGOSEngine::vc75_setScale() {
_baseY = vcReadNextWord();
_scale = (float)vcReadNextWord() / 1000000.;
}
-void SimonEngine::vc76_setScaleXOffs() {
+void AGOSEngine::vc76_setScaleXOffs() {
VgaSprite *vsp = findCurSprite();
vsp->image = vcReadNextWord();
@@ -2574,7 +2574,7 @@ void SimonEngine::vc76_setScaleXOffs() {
vsp->flags = kDFScaled;
}
-void SimonEngine::vc77_setScaleYOffs() {
+void AGOSEngine::vc77_setScaleYOffs() {
VgaSprite *vsp = findCurSprite();
vsp->image = vcReadNextWord();
@@ -2590,7 +2590,7 @@ void SimonEngine::vc77_setScaleYOffs() {
vsp->flags = kDFScaled;
}
-void SimonEngine::vc78_computeXY() {
+void AGOSEngine::vc78_computeXY() {
VgaSprite *vsp = findCurSprite();
uint16 a = (uint16)_variableArrayPtr[12];
@@ -2613,7 +2613,7 @@ void SimonEngine::vc78_computeXY() {
}
}
-void SimonEngine::vc79_computePosNum() {
+void AGOSEngine::vc79_computePosNum() {
uint a = (uint16)_variableArrayPtr[12];
const uint16 *p = _pathFindArray[a - 1];
uint pos = 0;
@@ -2627,7 +2627,7 @@ void SimonEngine::vc79_computePosNum() {
_variableArrayPtr[13] = pos;
}
-void SimonEngine::vc80_setOverlayImage() {
+void AGOSEngine::vc80_setOverlayImage() {
VgaSprite *vsp = findCurSprite();
vsp->image = vcReadVarOrWord();
@@ -2639,14 +2639,14 @@ void SimonEngine::vc80_setOverlayImage() {
_vgaSpriteChanged++;
}
-void SimonEngine::vc81_setRandom() {
+void AGOSEngine::vc81_setRandom() {
uint16 var = vcReadNextWord();
uint16 value = vcReadNextWord();
_variableArray[var] = _rnd.getRandomNumber(value - 1);
}
-void SimonEngine::vc82_getPathValue() {
+void AGOSEngine::vc82_getPathValue() {
uint8 val;
uint16 var = vcReadNextWord();
@@ -2660,7 +2660,7 @@ void SimonEngine::vc82_getPathValue() {
vcWriteVar(var, val);
}
-void SimonEngine::vc83_playSoundLoop() {
+void AGOSEngine::vc83_playSoundLoop() {
uint16 sound = vcReadNextWord();
int16 vol = vcReadNextWord();
int16 pan = vcReadNextWord();
@@ -2668,12 +2668,12 @@ void SimonEngine::vc83_playSoundLoop() {
loadSound(sound, pan, vol, 3);
}
-void SimonEngine::vc84_stopSoundLoop() {
+void AGOSEngine::vc84_stopSoundLoop() {
_sound->stopSfx5();
}
// Scrolling functions for Feeble Files
-void SimonEngine::checkScrollX(int16 x, int16 xpos) {
+void AGOSEngine::checkScrollX(int16 x, int16 xpos) {
if (_scrollXMax == 0 || getBitFlag(80) || getBitFlag(82) || x == 0)
return;
@@ -2712,7 +2712,7 @@ void SimonEngine::checkScrollX(int16 x, int16 xpos) {
}
}
-void SimonEngine::checkScrollY(int16 y, int16 ypos) {
+void AGOSEngine::checkScrollY(int16 y, int16 ypos) {
if (_scrollYMax == 0 || getBitFlag(80))
return;
@@ -2749,7 +2749,7 @@ void SimonEngine::checkScrollY(int16 y, int16 ypos) {
}
}
-void SimonEngine::centreScroll() {
+void AGOSEngine::centreScroll() {
int16 x, y, tmp;
if (_scrollXMax != 0) {
@@ -2785,4 +2785,4 @@ void SimonEngine::centreScroll() {
}
}
-} // End of namespace Simon
+} // End of namespace AGOS
diff --git a/engines/agos/vga.h b/engines/agos/vga.h
index e963d0350b..e9403f12b2 100644
--- a/engines/agos/vga.h
+++ b/engines/agos/vga.h
@@ -24,7 +24,7 @@
#ifndef AGOS_VGA_H
#define AGOS_VGA_H
-namespace Simon {
+namespace AGOS {
#include "common/pack-start.h" // START STRUCT PACKING
@@ -162,6 +162,6 @@ struct VC10_state {
byte *vc10_depackColumn(VC10_state *vs);
-} // End of namespace Simon
+} // End of namespace AGOS
#endif
diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp
index c21f8ad6d2..e38a42d126 100644
--- a/engines/agos/window.cpp
+++ b/engines/agos/window.cpp
@@ -26,9 +26,9 @@
#include "agos/agos.h"
#include "agos/intern.h"
-namespace Simon {
+namespace AGOS {
-uint SimonEngine::getWindowNum(WindowBlock *window) {
+uint AGOSEngine::getWindowNum(WindowBlock *window) {
uint i;
for (i = 0; i != ARRAYSIZE(_windowArray); i++)
@@ -39,7 +39,7 @@ uint SimonEngine::getWindowNum(WindowBlock *window) {
return 0;
}
-WindowBlock *SimonEngine::openWindow(uint x, uint y, uint w, uint h, uint flags, uint fill_color, uint text_color) {
+WindowBlock *AGOSEngine::openWindow(uint x, uint y, uint w, uint h, uint flags, uint fill_color, uint text_color) {
WindowBlock *window;
window = _windowList;
@@ -62,7 +62,7 @@ WindowBlock *SimonEngine::openWindow(uint x, uint y, uint w, uint h, uint flags,
return window;
}
-void SimonEngine::changeWindow(uint a) {
+void AGOSEngine::changeWindow(uint a) {
a &= 7;
if (_windowArray[a] == NULL || _curWindow == a)
@@ -78,7 +78,7 @@ void SimonEngine::changeWindow(uint a) {
showmessage_helper_3(_textWindow->textLength, _textWindow->textMaxLength);
}
-void SimonEngine::closeWindow(uint a) {
+void AGOSEngine::closeWindow(uint a) {
if (_windowArray[a] == NULL)
return;
removeIconArray(a);
@@ -90,7 +90,7 @@ void SimonEngine::closeWindow(uint a) {
}
}
-void SimonEngine::clearWindow(WindowBlock *window) {
+void AGOSEngine::clearWindow(WindowBlock *window) {
if (window->flags & 0x10)
restoreWindow(window);
else
@@ -103,7 +103,7 @@ void SimonEngine::clearWindow(WindowBlock *window) {
window->scrollY = 0;
}
-void SimonEngine::colorWindow(WindowBlock *window) {
+void AGOSEngine::colorWindow(WindowBlock *window) {
byte *dst;
uint h, w;
@@ -133,13 +133,13 @@ void SimonEngine::colorWindow(WindowBlock *window) {
_lockWord &= ~0x8000;
}
-void SimonEngine::resetWindow(WindowBlock *window) {
+void AGOSEngine::resetWindow(WindowBlock *window) {
if (window->flags & 8)
restoreWindow(window);
window->mode = 0;
}
-void SimonEngine::restoreWindow(WindowBlock *window) {
+void AGOSEngine::restoreWindow(WindowBlock *window) {
_lockWord |= 0x8000;
if (getGameType() == GType_FF || getGameType() == GType_PP) {
@@ -158,7 +158,7 @@ void SimonEngine::restoreWindow(WindowBlock *window) {
_lockWord &= ~0x8000;
}
-void SimonEngine::restoreBlock(uint h, uint w, uint y, uint x) {
+void AGOSEngine::restoreBlock(uint h, uint w, uint y, uint x) {
byte *dst, *src;
uint i;
@@ -177,9 +177,9 @@ void SimonEngine::restoreBlock(uint h, uint w, uint y, uint x) {
}
}
-void SimonEngine::windowPutChar(uint a) {
+void AGOSEngine::windowPutChar(uint a) {
if (_textWindow != _windowArray[0])
windowPutChar(_textWindow, a);
}
-} // End of namespace Simon
+} // End of namespace AGOS