mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-17 14:09:59 +00:00
ADL: Refactor opcode tables
This commit is contained in:
parent
b37a412860
commit
76a0c20481
@ -415,69 +415,42 @@ bool AdlEngine::isInputValid(const Commands &commands, byte verb, byte noun, boo
|
||||
return false;
|
||||
}
|
||||
|
||||
typedef Common::Functor1Mem<ScriptEnv &, int, AdlEngine> OpcodeV1;
|
||||
#define SetOpcodeTable(x) table = &x;
|
||||
#define Opcode(x) table->push_back(new OpcodeV1(this, &AdlEngine::x))
|
||||
#define OpcodeUnImpl() table->push_back(new OpcodeV1(this, 0))
|
||||
|
||||
void AdlEngine::setupOpcodeTables() {
|
||||
Common::Array<const Opcode *> *table = 0;
|
||||
_condOpcodes.resize(0x0b);
|
||||
_condOpcodes[0x03] = opcode(o1_isItemInRoom);
|
||||
_condOpcodes[0x05] = opcode(o1_isMovesGT);
|
||||
_condOpcodes[0x06] = opcode(o1_isVarEQ);
|
||||
_condOpcodes[0x09] = opcode(o1_isCurPicEQ);
|
||||
_condOpcodes[0x0a] = opcode(o1_isItemPicEQ);
|
||||
|
||||
SetOpcodeTable(_condOpcodes);
|
||||
// 0x00
|
||||
OpcodeUnImpl();
|
||||
OpcodeUnImpl();
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_isItemInRoom);
|
||||
// 0x04
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_isMovesGT);
|
||||
Opcode(o1_isVarEQ);
|
||||
OpcodeUnImpl();
|
||||
// 0x08
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_isCurPicEQ);
|
||||
Opcode(o1_isItemPicEQ);
|
||||
|
||||
SetOpcodeTable(_actOpcodes);
|
||||
// 0x00
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_varAdd);
|
||||
Opcode(o1_varSub);
|
||||
Opcode(o1_varSet);
|
||||
// 0x04
|
||||
Opcode(o1_listInv);
|
||||
Opcode(o1_moveItem);
|
||||
Opcode(o1_setRoom);
|
||||
Opcode(o1_setCurPic);
|
||||
// 0x08
|
||||
Opcode(o1_setPic);
|
||||
Opcode(o1_printMsg);
|
||||
Opcode(o1_setLight);
|
||||
Opcode(o1_setDark);
|
||||
// 0x0c
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_quit);
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_save);
|
||||
// 0x10
|
||||
Opcode(o1_restore);
|
||||
Opcode(o1_restart);
|
||||
Opcode(o1_placeItem);
|
||||
Opcode(o1_setItemPic);
|
||||
// 0x14
|
||||
Opcode(o1_resetPic);
|
||||
Opcode(o1_goDirection<IDI_DIR_NORTH>);
|
||||
Opcode(o1_goDirection<IDI_DIR_SOUTH>);
|
||||
Opcode(o1_goDirection<IDI_DIR_EAST>);
|
||||
// 0x18
|
||||
Opcode(o1_goDirection<IDI_DIR_WEST>);
|
||||
Opcode(o1_goDirection<IDI_DIR_UP>);
|
||||
Opcode(o1_goDirection<IDI_DIR_DOWN>);
|
||||
Opcode(o1_takeItem);
|
||||
// 0x1c
|
||||
Opcode(o1_dropItem);
|
||||
Opcode(o1_setRoomPic);
|
||||
_actOpcodes.resize(0x1e);
|
||||
_actOpcodes[0x01] = opcode(o1_varAdd);
|
||||
_actOpcodes[0x02] = opcode(o1_varSub);
|
||||
_actOpcodes[0x03] = opcode(o1_varSet);
|
||||
_actOpcodes[0x04] = opcode(o1_listInv);
|
||||
_actOpcodes[0x05] = opcode(o1_moveItem);
|
||||
_actOpcodes[0x06] = opcode(o1_setRoom);
|
||||
_actOpcodes[0x07] = opcode(o1_setCurPic);
|
||||
_actOpcodes[0x08] = opcode(o1_setPic);
|
||||
_actOpcodes[0x09] = opcode(o1_printMsg);
|
||||
_actOpcodes[0x0a] = opcode(o1_setLight);
|
||||
_actOpcodes[0x0b] = opcode(o1_setDark);
|
||||
_actOpcodes[0x0d] = opcode(o1_quit);
|
||||
_actOpcodes[0x0f] = opcode(o1_save);
|
||||
_actOpcodes[0x10] = opcode(o1_restore);
|
||||
_actOpcodes[0x11] = opcode(o1_restart);
|
||||
_actOpcodes[0x12] = opcode(o1_placeItem);
|
||||
_actOpcodes[0x13] = opcode(o1_setItemPic);
|
||||
_actOpcodes[0x14] = opcode(o1_resetPic);
|
||||
_actOpcodes[0x15] = opcode(o1_goDirection<IDI_DIR_NORTH>);
|
||||
_actOpcodes[0x16] = opcode(o1_goDirection<IDI_DIR_SOUTH>);
|
||||
_actOpcodes[0x17] = opcode(o1_goDirection<IDI_DIR_EAST>);
|
||||
_actOpcodes[0x18] = opcode(o1_goDirection<IDI_DIR_WEST>);
|
||||
_actOpcodes[0x19] = opcode(o1_goDirection<IDI_DIR_UP>);
|
||||
_actOpcodes[0x1a] = opcode(o1_goDirection<IDI_DIR_DOWN>);
|
||||
_actOpcodes[0x1b] = opcode(o1_takeItem);
|
||||
_actOpcodes[0x1c] = opcode(o1_dropItem);
|
||||
_actOpcodes[0x1d] = opcode(o1_setRoomPic);
|
||||
}
|
||||
|
||||
void AdlEngine::initState() {
|
||||
|
@ -284,6 +284,13 @@ protected:
|
||||
void loadDroppedItemOffsets(Common::ReadStream &stream, byte count);
|
||||
|
||||
// Opcodes
|
||||
typedef Common::Functor1<ScriptEnv &, int> Opcode;
|
||||
|
||||
template <class T>
|
||||
Opcode *opcode(int (T::*f)(ScriptEnv &)) {
|
||||
return new Common::Functor1Mem<ScriptEnv &, int, T>(static_cast<T *>(this), f);
|
||||
}
|
||||
|
||||
int o1_isItemInRoom(ScriptEnv &e);
|
||||
int o1_isMovesGT(ScriptEnv &e);
|
||||
int o1_isVarEQ(ScriptEnv &e);
|
||||
@ -357,7 +364,6 @@ protected:
|
||||
bool _textMode;
|
||||
|
||||
// Opcodes
|
||||
typedef Common::Functor1<ScriptEnv &, int> Opcode;
|
||||
Common::Array<const Opcode *> _condOpcodes, _actOpcodes;
|
||||
// Message strings in data file
|
||||
Common::Array<DataBlockPtr> _messages;
|
||||
|
@ -54,73 +54,50 @@ void AdlEngine_v2::insertDisk(byte volume) {
|
||||
_currentVolume = volume;
|
||||
}
|
||||
|
||||
typedef Common::Functor1Mem<ScriptEnv &, int, AdlEngine_v2> OpcodeV2;
|
||||
#define SetOpcodeTable(x) table = &x;
|
||||
#define Opcode(x) table->push_back(new OpcodeV2(this, &AdlEngine_v2::x))
|
||||
#define OpcodeUnImpl() table->push_back(new OpcodeV2(this, 0))
|
||||
|
||||
void AdlEngine_v2::setupOpcodeTables() {
|
||||
Common::Array<const Opcode *> *table = 0;
|
||||
_condOpcodes.resize(0x0b);
|
||||
_condOpcodes[0x01] = opcode(o2_isFirstTime);
|
||||
_condOpcodes[0x02] = opcode(o2_isRandomGT);
|
||||
_condOpcodes[0x03] = opcode(o1_isItemInRoom);
|
||||
_condOpcodes[0x04] = opcode(o2_isNounNotInRoom);
|
||||
_condOpcodes[0x05] = opcode(o1_isMovesGT);
|
||||
_condOpcodes[0x06] = opcode(o1_isVarEQ);
|
||||
_condOpcodes[0x07] = opcode(o2_isCarryingSomething);
|
||||
_condOpcodes[0x09] = opcode(o1_isCurPicEQ);
|
||||
_condOpcodes[0x0a] = opcode(o1_isItemPicEQ);
|
||||
|
||||
SetOpcodeTable(_condOpcodes);
|
||||
// 0x00
|
||||
OpcodeUnImpl();
|
||||
Opcode(o2_isFirstTime);
|
||||
Opcode(o2_isRandomGT);
|
||||
Opcode(o1_isItemInRoom);
|
||||
// 0x04
|
||||
Opcode(o2_isNounNotInRoom);
|
||||
Opcode(o1_isMovesGT);
|
||||
Opcode(o1_isVarEQ);
|
||||
Opcode(o2_isCarryingSomething);
|
||||
// 0x08
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_isCurPicEQ);
|
||||
Opcode(o1_isItemPicEQ);
|
||||
|
||||
SetOpcodeTable(_actOpcodes);
|
||||
// 0x00
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_varAdd);
|
||||
Opcode(o1_varSub);
|
||||
Opcode(o1_varSet);
|
||||
// 0x04
|
||||
Opcode(o1_listInv);
|
||||
Opcode(o2_moveItem);
|
||||
Opcode(o1_setRoom);
|
||||
Opcode(o2_setCurPic);
|
||||
// 0x08
|
||||
Opcode(o2_setPic);
|
||||
Opcode(o1_printMsg);
|
||||
Opcode(o1_setLight);
|
||||
Opcode(o1_setDark);
|
||||
// 0x0c
|
||||
Opcode(o2_moveAllItems);
|
||||
Opcode(o1_quit);
|
||||
OpcodeUnImpl();
|
||||
Opcode(o2_save);
|
||||
// 0x10
|
||||
Opcode(o2_restore);
|
||||
Opcode(o1_restart);
|
||||
Opcode(o2_placeItem);
|
||||
Opcode(o1_setItemPic);
|
||||
// 0x14
|
||||
Opcode(o1_resetPic);
|
||||
Opcode(o1_goDirection<IDI_DIR_NORTH>);
|
||||
Opcode(o1_goDirection<IDI_DIR_SOUTH>);
|
||||
Opcode(o1_goDirection<IDI_DIR_EAST>);
|
||||
// 0x18
|
||||
Opcode(o1_goDirection<IDI_DIR_WEST>);
|
||||
Opcode(o1_goDirection<IDI_DIR_UP>);
|
||||
Opcode(o1_goDirection<IDI_DIR_DOWN>);
|
||||
Opcode(o1_takeItem);
|
||||
// 0x1c
|
||||
Opcode(o1_dropItem);
|
||||
Opcode(o1_setRoomPic);
|
||||
Opcode(o2_tellTime);
|
||||
Opcode(o2_setRoomFromVar);
|
||||
// 0x20
|
||||
Opcode(o2_initDisk);
|
||||
_actOpcodes.resize(0x21);
|
||||
_actOpcodes[0x01] = opcode(o1_varAdd);
|
||||
_actOpcodes[0x02] = opcode(o1_varSub);
|
||||
_actOpcodes[0x03] = opcode(o1_varSet);
|
||||
_actOpcodes[0x04] = opcode(o1_listInv);
|
||||
_actOpcodes[0x05] = opcode(o2_moveItem);
|
||||
_actOpcodes[0x06] = opcode(o1_setRoom);
|
||||
_actOpcodes[0x07] = opcode(o2_setCurPic);
|
||||
_actOpcodes[0x08] = opcode(o2_setPic);
|
||||
_actOpcodes[0x09] = opcode(o1_printMsg);
|
||||
_actOpcodes[0x0a] = opcode(o1_setLight);
|
||||
_actOpcodes[0x0b] = opcode(o1_setDark);
|
||||
_actOpcodes[0x0c] = opcode(o2_moveAllItems);
|
||||
_actOpcodes[0x0d] = opcode(o1_quit);
|
||||
_actOpcodes[0x0f] = opcode(o2_save);
|
||||
_actOpcodes[0x10] = opcode(o2_restore);
|
||||
_actOpcodes[0x11] = opcode(o1_restart);
|
||||
_actOpcodes[0x12] = opcode(o2_placeItem);
|
||||
_actOpcodes[0x13] = opcode(o1_setItemPic);
|
||||
_actOpcodes[0x14] = opcode(o1_resetPic);
|
||||
_actOpcodes[0x15] = opcode(o1_goDirection<IDI_DIR_NORTH>);
|
||||
_actOpcodes[0x16] = opcode(o1_goDirection<IDI_DIR_SOUTH>);
|
||||
_actOpcodes[0x17] = opcode(o1_goDirection<IDI_DIR_EAST>);
|
||||
_actOpcodes[0x18] = opcode(o1_goDirection<IDI_DIR_WEST>);
|
||||
_actOpcodes[0x19] = opcode(o1_goDirection<IDI_DIR_UP>);
|
||||
_actOpcodes[0x1a] = opcode(o1_goDirection<IDI_DIR_DOWN>);
|
||||
_actOpcodes[0x1b] = opcode(o1_takeItem);
|
||||
_actOpcodes[0x1c] = opcode(o1_dropItem);
|
||||
_actOpcodes[0x1d] = opcode(o1_setRoomPic);
|
||||
_actOpcodes[0x1e] = opcode(o2_tellTime);
|
||||
_actOpcodes[0x1f] = opcode(o2_setRoomFromVar);
|
||||
_actOpcodes[0x20] = opcode(o2_initDisk);
|
||||
}
|
||||
|
||||
void AdlEngine_v2::initState() {
|
||||
|
@ -56,12 +56,10 @@ void AdlEngine_v3::loadItemDescriptions(Common::SeekableReadStream &stream, byte
|
||||
error("Error loading item descriptions");
|
||||
}
|
||||
|
||||
typedef Common::Functor1Mem<ScriptEnv &, int, AdlEngine_v3> OpcodeV3;
|
||||
|
||||
void AdlEngine_v3::setupOpcodeTables() {
|
||||
AdlEngine_v2::setupOpcodeTables();
|
||||
delete _condOpcodes[0x04];
|
||||
_condOpcodes[0x04] = new OpcodeV3(this, &AdlEngine_v3::o3_isNounNotInRoom);
|
||||
_condOpcodes[0x04] = opcode(o3_isNounNotInRoom);
|
||||
}
|
||||
|
||||
int AdlEngine_v3::o3_isNounNotInRoom(ScriptEnv &e) {
|
||||
|
@ -134,73 +134,50 @@ void HiRes5Engine::animateLights() const {
|
||||
}
|
||||
}
|
||||
|
||||
typedef Common::Functor1Mem<ScriptEnv &, int, HiRes5Engine> OpcodeH5;
|
||||
#define SetOpcodeTable(x) table = &x;
|
||||
#define Opcode(x) table->push_back(new OpcodeH5(this, &HiRes5Engine::x))
|
||||
#define OpcodeUnImpl() table->push_back(new OpcodeH5(this, 0))
|
||||
|
||||
void HiRes5Engine::setupOpcodeTables() {
|
||||
Common::Array<const Opcode *> *table = 0;
|
||||
_condOpcodes.resize(0x0a);
|
||||
_condOpcodes[0x01] = opcode(o2_isFirstTime);
|
||||
_condOpcodes[0x02] = opcode(o2_isRandomGT);
|
||||
_condOpcodes[0x03] = opcode(o4_isItemInRoom);
|
||||
_condOpcodes[0x04] = opcode(o3_isNounNotInRoom);
|
||||
_condOpcodes[0x05] = opcode(o1_isMovesGT);
|
||||
_condOpcodes[0x06] = opcode(o1_isVarEQ);
|
||||
_condOpcodes[0x07] = opcode(o2_isCarryingSomething);
|
||||
_condOpcodes[0x08] = opcode(o4_isVarGT);
|
||||
_condOpcodes[0x09] = opcode(o1_isCurPicEQ);
|
||||
|
||||
SetOpcodeTable(_condOpcodes);
|
||||
// 0x00
|
||||
OpcodeUnImpl();
|
||||
Opcode(o2_isFirstTime);
|
||||
Opcode(o2_isRandomGT);
|
||||
Opcode(o4_isItemInRoom);
|
||||
// 0x04
|
||||
Opcode(o3_isNounNotInRoom);
|
||||
Opcode(o1_isMovesGT);
|
||||
Opcode(o1_isVarEQ);
|
||||
Opcode(o2_isCarryingSomething);
|
||||
// 0x08
|
||||
Opcode(o4_isVarGT);
|
||||
Opcode(o1_isCurPicEQ);
|
||||
OpcodeUnImpl();
|
||||
|
||||
SetOpcodeTable(_actOpcodes);
|
||||
// 0x00
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_varAdd);
|
||||
Opcode(o1_varSub);
|
||||
Opcode(o1_varSet);
|
||||
// 0x04
|
||||
Opcode(o1_listInv);
|
||||
Opcode(o4_moveItem);
|
||||
Opcode(o1_setRoom);
|
||||
Opcode(o2_setCurPic);
|
||||
// 0x08
|
||||
Opcode(o2_setPic);
|
||||
Opcode(o1_printMsg);
|
||||
Opcode(o4_setRegionToPrev);
|
||||
Opcode(o_checkItemTimeLimits);
|
||||
// 0x0c
|
||||
Opcode(o4_moveAllItems);
|
||||
Opcode(o1_quit);
|
||||
Opcode(o4_setRegion);
|
||||
Opcode(o4_save);
|
||||
// 0x10
|
||||
Opcode(o4_restore);
|
||||
Opcode(o4_restart);
|
||||
Opcode(o4_setRegionRoom);
|
||||
Opcode(o_startAnimation);
|
||||
// 0x14
|
||||
Opcode(o1_resetPic);
|
||||
Opcode(o1_goDirection<IDI_DIR_NORTH>);
|
||||
Opcode(o1_goDirection<IDI_DIR_SOUTH>);
|
||||
Opcode(o1_goDirection<IDI_DIR_EAST>);
|
||||
// 0x18
|
||||
Opcode(o1_goDirection<IDI_DIR_WEST>);
|
||||
Opcode(o1_goDirection<IDI_DIR_UP>);
|
||||
Opcode(o1_goDirection<IDI_DIR_DOWN>);
|
||||
Opcode(o1_takeItem);
|
||||
// 0x1c
|
||||
Opcode(o1_dropItem);
|
||||
Opcode(o4_setRoomPic);
|
||||
Opcode(o_winGame);
|
||||
OpcodeUnImpl();
|
||||
// 0x20
|
||||
Opcode(o2_initDisk);
|
||||
_actOpcodes.resize(0x21);
|
||||
_actOpcodes[0x01] = opcode(o1_varAdd);
|
||||
_actOpcodes[0x02] = opcode(o1_varSub);
|
||||
_actOpcodes[0x03] = opcode(o1_varSet);
|
||||
_actOpcodes[0x04] = opcode(o1_listInv);
|
||||
_actOpcodes[0x05] = opcode(o4_moveItem);
|
||||
_actOpcodes[0x06] = opcode(o1_setRoom);
|
||||
_actOpcodes[0x07] = opcode(o2_setCurPic);
|
||||
_actOpcodes[0x08] = opcode(o2_setPic);
|
||||
_actOpcodes[0x09] = opcode(o1_printMsg);
|
||||
_actOpcodes[0x0a] = opcode(o4_setRegionToPrev);
|
||||
_actOpcodes[0x0b] = opcode(o_checkItemTimeLimits);
|
||||
_actOpcodes[0x0c] = opcode(o4_moveAllItems);
|
||||
_actOpcodes[0x0d] = opcode(o1_quit);
|
||||
_actOpcodes[0x0e] = opcode(o4_setRegion);
|
||||
_actOpcodes[0x0f] = opcode(o4_save);
|
||||
_actOpcodes[0x10] = opcode(o4_restore);
|
||||
_actOpcodes[0x11] = opcode(o4_restart);
|
||||
_actOpcodes[0x12] = opcode(o4_setRegionRoom);
|
||||
_actOpcodes[0x13] = opcode(o_startAnimation);
|
||||
_actOpcodes[0x14] = opcode(o1_resetPic);
|
||||
_actOpcodes[0x15] = opcode(o1_goDirection<IDI_DIR_NORTH>);
|
||||
_actOpcodes[0x16] = opcode(o1_goDirection<IDI_DIR_SOUTH>);
|
||||
_actOpcodes[0x17] = opcode(o1_goDirection<IDI_DIR_EAST>);
|
||||
_actOpcodes[0x18] = opcode(o1_goDirection<IDI_DIR_WEST>);
|
||||
_actOpcodes[0x19] = opcode(o1_goDirection<IDI_DIR_UP>);
|
||||
_actOpcodes[0x1a] = opcode(o1_goDirection<IDI_DIR_DOWN>);
|
||||
_actOpcodes[0x1b] = opcode(o1_takeItem);
|
||||
_actOpcodes[0x1c] = opcode(o1_dropItem);
|
||||
_actOpcodes[0x1d] = opcode(o4_setRoomPic);
|
||||
_actOpcodes[0x1e] = opcode(o_winGame);
|
||||
_actOpcodes[0x20] = opcode(o2_initDisk);
|
||||
}
|
||||
|
||||
bool HiRes5Engine::isInventoryFull() {
|
||||
|
@ -94,73 +94,51 @@ void HiRes6Engine::gameLoop() {
|
||||
}
|
||||
}
|
||||
|
||||
typedef Common::Functor1Mem<ScriptEnv &, int, HiRes6Engine> OpcodeH6;
|
||||
#define SetOpcodeTable(x) table = &x;
|
||||
#define Opcode(x) table->push_back(new OpcodeH6(this, &HiRes6Engine::x))
|
||||
#define OpcodeUnImpl() table->push_back(new OpcodeH6(this, 0))
|
||||
|
||||
void HiRes6Engine::setupOpcodeTables() {
|
||||
Common::Array<const Opcode *> *table = 0;
|
||||
_condOpcodes.resize(0x0b);
|
||||
_condOpcodes[0x01] = opcode(o2_isFirstTime);
|
||||
_condOpcodes[0x02] = opcode(o2_isRandomGT);
|
||||
_condOpcodes[0x03] = opcode(o4_isItemInRoom);
|
||||
_condOpcodes[0x04] = opcode(o5_isNounNotInRoom);
|
||||
_condOpcodes[0x05] = opcode(o1_isMovesGT);
|
||||
_condOpcodes[0x06] = opcode(o1_isVarEQ);
|
||||
_condOpcodes[0x07] = opcode(o2_isCarryingSomething);
|
||||
_condOpcodes[0x08] = opcode(o4_isVarGT);
|
||||
_condOpcodes[0x09] = opcode(o1_isCurPicEQ);
|
||||
_condOpcodes[0x0a] = opcode(o5_abortScript);
|
||||
|
||||
SetOpcodeTable(_condOpcodes);
|
||||
// 0x00
|
||||
OpcodeUnImpl();
|
||||
Opcode(o2_isFirstTime);
|
||||
Opcode(o2_isRandomGT);
|
||||
Opcode(o4_isItemInRoom);
|
||||
// 0x04
|
||||
Opcode(o5_isNounNotInRoom);
|
||||
Opcode(o1_isMovesGT);
|
||||
Opcode(o1_isVarEQ);
|
||||
Opcode(o2_isCarryingSomething);
|
||||
// 0x08
|
||||
Opcode(o4_isVarGT);
|
||||
Opcode(o1_isCurPicEQ);
|
||||
Opcode(o5_abortScript);
|
||||
|
||||
SetOpcodeTable(_actOpcodes);
|
||||
// 0x00
|
||||
OpcodeUnImpl();
|
||||
Opcode(o1_varAdd);
|
||||
Opcode(o1_varSub);
|
||||
Opcode(o1_varSet);
|
||||
// 0x04
|
||||
Opcode(o1_listInv);
|
||||
Opcode(o4_moveItem);
|
||||
Opcode(o1_setRoom);
|
||||
Opcode(o2_setCurPic);
|
||||
// 0x08
|
||||
Opcode(o2_setPic);
|
||||
Opcode(o1_printMsg);
|
||||
Opcode(o5_dummy);
|
||||
Opcode(o5_setTextMode);
|
||||
// 0x0c
|
||||
Opcode(o4_moveAllItems);
|
||||
Opcode(o1_quit);
|
||||
Opcode(o5_dummy);
|
||||
Opcode(o4_save);
|
||||
// 0x10
|
||||
Opcode(o4_restore);
|
||||
Opcode(o1_restart);
|
||||
Opcode(o5_setRegionRoom);
|
||||
Opcode(o5_dummy);
|
||||
// 0x14
|
||||
Opcode(o1_resetPic);
|
||||
Opcode(o_goDirection<IDI_DIR_NORTH>);
|
||||
Opcode(o_goDirection<IDI_DIR_SOUTH>);
|
||||
Opcode(o_goDirection<IDI_DIR_EAST>);
|
||||
// 0x18
|
||||
Opcode(o_goDirection<IDI_DIR_WEST>);
|
||||
Opcode(o_goDirection<IDI_DIR_UP>);
|
||||
Opcode(o_goDirection<IDI_DIR_DOWN>);
|
||||
Opcode(o1_takeItem);
|
||||
// 0x1c
|
||||
Opcode(o1_dropItem);
|
||||
Opcode(o5_setRoomPic);
|
||||
Opcode(o_fluteSound);
|
||||
OpcodeUnImpl();
|
||||
// 0x20
|
||||
Opcode(o2_initDisk);
|
||||
_actOpcodes.resize(0x21);
|
||||
_actOpcodes[0x01] = opcode(o1_varAdd);
|
||||
_actOpcodes[0x02] = opcode(o1_varSub);
|
||||
_actOpcodes[0x03] = opcode(o1_varSet);
|
||||
_actOpcodes[0x04] = opcode(o1_listInv);
|
||||
_actOpcodes[0x05] = opcode(o4_moveItem);
|
||||
_actOpcodes[0x06] = opcode(o1_setRoom);
|
||||
_actOpcodes[0x07] = opcode(o2_setCurPic);
|
||||
_actOpcodes[0x08] = opcode(o2_setPic);
|
||||
_actOpcodes[0x09] = opcode(o1_printMsg);
|
||||
_actOpcodes[0x0a] = opcode(o5_dummy);
|
||||
_actOpcodes[0x0b] = opcode(o5_setTextMode);
|
||||
_actOpcodes[0x0c] = opcode(o4_moveAllItems);
|
||||
_actOpcodes[0x0d] = opcode(o1_quit);
|
||||
_actOpcodes[0x0e] = opcode(o5_dummy);
|
||||
_actOpcodes[0x0f] = opcode(o4_save);
|
||||
_actOpcodes[0x10] = opcode(o4_restore);
|
||||
_actOpcodes[0x11] = opcode(o1_restart);
|
||||
_actOpcodes[0x12] = opcode(o5_setRegionRoom);
|
||||
_actOpcodes[0x13] = opcode(o5_dummy);
|
||||
_actOpcodes[0x14] = opcode(o1_resetPic);
|
||||
_actOpcodes[0x15] = opcode(o_goDirection<IDI_DIR_NORTH>);
|
||||
_actOpcodes[0x16] = opcode(o_goDirection<IDI_DIR_SOUTH>);
|
||||
_actOpcodes[0x17] = opcode(o_goDirection<IDI_DIR_EAST>);
|
||||
_actOpcodes[0x18] = opcode(o_goDirection<IDI_DIR_WEST>);
|
||||
_actOpcodes[0x19] = opcode(o_goDirection<IDI_DIR_UP>);
|
||||
_actOpcodes[0x1a] = opcode(o_goDirection<IDI_DIR_DOWN>);
|
||||
_actOpcodes[0x1b] = opcode(o1_takeItem);
|
||||
_actOpcodes[0x1c] = opcode(o1_dropItem);
|
||||
_actOpcodes[0x1d] = opcode(o5_setRoomPic);
|
||||
_actOpcodes[0x1e] = opcode(o_fluteSound);
|
||||
_actOpcodes[0x20] = opcode(o2_initDisk);
|
||||
}
|
||||
|
||||
template <Direction D>
|
||||
|
Loading…
x
Reference in New Issue
Block a user