diff options
author | Travis Howell | 2006-10-05 05:27:10 +0000 |
---|---|---|
committer | Travis Howell | 2006-10-05 05:27:10 +0000 |
commit | 5074da16d33c0de24ec99e6773c66600f5c75962 (patch) | |
tree | d3f052affacf4dfb54a98843edddc1011d66df67 /engines | |
parent | d7ac158813b0f7b5e9ce0453ce391c9c6af4741b (diff) | |
download | scummvm-rg350-5074da16d33c0de24ec99e6773c66600f5c75962.tar.gz scummvm-rg350-5074da16d33c0de24ec99e6773c66600f5c75962.tar.bz2 scummvm-rg350-5074da16d33c0de24ec99e6773c66600f5c75962.zip |
Add more code and stubs for WW
svn-id: r24121
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/agos.cpp | 13 | ||||
-rw-r--r-- | engines/agos/agos.h | 7 | ||||
-rw-r--r-- | engines/agos/items.cpp | 33 |
3 files changed, 49 insertions, 4 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 5f70b5266f..150c4dd748 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -749,6 +749,19 @@ byte *AGOSEngine::allocateItem(uint size) { return org; } +int AGOSEngine::getUserFlag(Item *item, int a) { + SubUserFlag *subUserFlag; + + subUserFlag = (SubUserFlag *) findChildOfType(item, 9); + if (subUserFlag == NULL) + return 0; + + if (a < 0 || a > 3) + return 0; + + return subUserFlag->userFlags[a]; +} + void AGOSEngine::setUserFlag(Item *item, int a, int b) { SubUserFlag *subUserFlag; diff --git a/engines/agos/agos.h b/engines/agos/agos.h index ba2aa9ca0d..ee60301c9e 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -514,6 +514,7 @@ protected: uint32 readUint32Wrapper(const void *src); int allocGamePcVars(Common::File *in); + int getUserFlag(Item *item, int a); void setUserFlag(Item *item, int a, int b); void createPlayer(); void allocateStringTable(int num); @@ -859,7 +860,7 @@ public: void setScriptReturn(int ret); int getScriptReturn(); - // Opcodes, Simon 1 and later + // Opcodes, common void o_at(); void o_notAt(); void o_carried(); @@ -882,6 +883,8 @@ public: void o_oflag(); void o_destroy(); void o_place(); + void o_copyof(); + void o_copyfo(); void o_copyff(); void o_clear(); void o_let(); @@ -1019,6 +1022,8 @@ public: void oww_menu(); void oww_textMenu(); void oww_ifDoorOpen(); + void oww_opcode184(); + void oww_opcode187(); // Opcodes, Simon 1 only void o1_printLongText(); diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 726f9c7837..d70f98d33c 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -200,6 +200,8 @@ void AGOSEngine::setupElvira1Opcodes(OpcodeProc *op) { op[51] = &AGOSEngine::o_place; + op[54] = &AGOSEngine::o_copyof; + op[55] = &AGOSEngine::o_copyfo; op[56] = &AGOSEngine::o_copyff; op[60] = &AGOSEngine::oe1_setFF; @@ -309,6 +311,8 @@ void AGOSEngine::setupElvira1Opcodes(OpcodeProc *op) { void AGOSEngine::setupElvira2Opcodes(OpcodeProc *op) { setupCommonOpcodes(op); + op[34] = &AGOSEngine::o_copyof; + op[35] = &AGOSEngine::o_copyfo; op[83] = &AGOSEngine::o1_rescan; op[98] = &AGOSEngine::o1_animate; op[99] = &AGOSEngine::o1_stopAnimate; @@ -324,6 +328,8 @@ void AGOSEngine::setupWaxworksOpcodes(OpcodeProc *op) { setupCommonOpcodes(op); // Confirmed + op[34] = &AGOSEngine::o_copyof; + op[35] = &AGOSEngine::o_copyfo; op[54] = &AGOSEngine::oww_moveDirn; op[55] = &AGOSEngine::oww_goto; op[70] = &AGOSEngine::o1_printLongText; @@ -335,11 +341,14 @@ void AGOSEngine::setupWaxworksOpcodes(OpcodeProc *op) { op[106] = &AGOSEngine::oww_textMenu; op[127] = &AGOSEngine::o1_playTune; op[148] = &AGOSEngine::oww_ifDoorOpen; + op[175] = &AGOSEngine::o_getDollar2; op[179] = &AGOSEngine::o_isAdjNoun; op[180] = &AGOSEngine::o_b2Set; op[181] = &AGOSEngine::o_b2Clear; op[182] = &AGOSEngine::o_b2Zero; op[183] = &AGOSEngine::o_b2NotZero; + op[184] = &AGOSEngine::oww_opcode184; + op[187] = &AGOSEngine::oww_opcode187; // Code difference, check if triggered op[161] = NULL; @@ -356,14 +365,11 @@ void AGOSEngine::setupWaxworksOpcodes(OpcodeProc *op) { op[172] = NULL; op[173] = NULL; op[174] = NULL; - op[175] = NULL; op[176] = NULL; op[177] = NULL; op[178] = NULL; - op[184] = NULL; op[185] = NULL; op[186] = NULL; - op[187] = NULL; op[188] = NULL; op[189] = NULL; op[190] = NULL; @@ -702,6 +708,20 @@ void AGOSEngine::o_place() { setItemParent(item, getNextItemPtr()); } +void AGOSEngine::o_copyof() { + // 34: + Item *item = getNextItemPtr(); + uint tmp = getVarOrByte(); + writeNextVarContents(getUserFlag(item, tmp)); +} + +void AGOSEngine::o_copyfo() { + // 35: + uint tmp = getNextVarContents(); + Item *item = getNextItemPtr(); + setUserFlag(item, getVarOrByte(), tmp); +} + void AGOSEngine::o_copyff() { // 36: copy var uint value = getNextVarContents(); @@ -1792,6 +1812,13 @@ void AGOSEngine::oww_ifDoorOpen() { setScriptCondition(getDoorState(item, d) != 0); } +void AGOSEngine::oww_opcode184() { + printf("%s\n", getStringPtrByID(getNextStringID())); +} + +void AGOSEngine::oww_opcode187() { +} + // ----------------------------------------------------------------------- // Simon 1 Opcodes // ----------------------------------------------------------------------- |