diff options
Diffstat (limited to 'engines/dreamweb/use.cpp')
-rw-r--r-- | engines/dreamweb/use.cpp | 122 |
1 files changed, 117 insertions, 5 deletions
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index 08b96cf33a..4e956cd016 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -764,6 +764,118 @@ void DreamGenContext::useChurchGate() { turnPathOn(2); // Open church } +void DreamGenContext::useGun() { + + if (data.byte(kObjecttype) != 4) { + // gun is not taken + showSecondUse(); + putBackObStuff(); + + } else if (data.byte(kReallocation) == 22) { + // in pool room + showPuzText(34, 300); + data.byte(kLastweapon) = 1; + data.byte(kCombatcount) = 39; + data.byte(kGetback) = 1; + data.byte(kProgresspoints)++; + + } else if (data.byte(kReallocation) == 25) { + // helicopter + showPuzText(34, 300); + data.byte(kLastweapon) = 1; + data.byte(kCombatcount) = 19; + data.byte(kGetback) = 1; + data.byte(kDreamnumber) = 2; + data.byte(kRoomafterdream) = 38; + data.byte(kSartaindead) = 1; + data.byte(kProgresspoints)++; + + } else if (data.byte(kReallocation) == 27) { + // in rock room + showPuzText(46, 300); + data.byte(kPointermode) = 2; + data.byte(kRockstardead) = 1; + data.byte(kLastweapon) = 1; + data.byte(kNewsitem) = 1; + data.byte(kGetback) = 1; + data.byte(kRoomafterdream) = 32; + data.byte(kDreamnumber) = 0; + data.byte(kProgresspoints)++; + + } else if (data.byte(kReallocation) == 8 && data.byte(kMapx) == 22 && data.byte(kMapy) == 40 + && !isSetObOnMap(92) && data.byte(kManspath) != 9) { + // by studio + data.byte(kDestination) = 9; + data.byte(kFinaldest) = 9; + autoSetWalk(); + data.byte(kLastweapon) = 1; + data.byte(kGetback) = 1; + data.byte(kProgresspoints)++; + + } else if (data.byte(kReallocation) == 6 && data.byte(kMapx) == 11 && data.byte(kMapy) == 20 + && isSetObOnMap(5)) { + // sarters + data.byte(kDestination) = 1; + data.byte(kFinaldest) = 1; + autoSetWalk(); + removeSetObject(5); + placeSetObject(6); + turnAnyPathOn(1, data.byte(kRoomnum) - 1); + data.byte(kLiftflag) = 1; + data.word(kWatchingtime) = 40*2; + data.word(kReeltowatch) = 4; + data.word(kEndwatchreel) = 43; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; + data.byte(kProgresspoints)++; + + } else if (data.byte(kReallocation) == 29) { + // aide + data.byte(kGetback) = 1; + al = 13; + resetLocation(); + setLocation(12); + data.byte(kDestpos) = 12; + data.byte(kDestination) = 2; + data.byte(kFinaldest) = 2; + autoSetWalk(); + data.word(kWatchingtime) = 164*2; + data.word(kReeltowatch) = 3; + data.word(kEndwatchreel) = 164; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kAidedead) = 1; + data.byte(kDreamnumber) = 3; + data.byte(kRoomafterdream) = 33; + data.byte(kProgresspoints)++; + + } else if (data.byte(kReallocation) == 23 && data.byte(kMapx) == 0 && data.byte(kMapy) == 50) { + // with boss + if (data.byte(kManspath) != 5) { + data.byte(kDestination) = 5; + data.byte(kFinaldest) = 5; + autoSetWalk(); + } + data.byte(kLastweapon) = 1; + data.byte(kGetback) = 1; + + } else if (data.byte(kReallocation) == 8 && data.byte(kMapx) == 11 && data.byte(kMapy) == 10) { + // tv soldier + if (data.byte(kManspath) != 2) { + data.byte(kDestination) = 2; + data.byte(kFinaldest) = 2; + autoSetWalk(); + } + data.byte(kLastweapon) = 1; + data.byte(kGetback) = 1; + + } else { + showFirstUse(); + putBackObStuff(); + } +} + void DreamGenContext::useFullCart() { data.byte(kProgresspoints)++; turnAnyPathOn(2, data.byte(kRoomnum) + 6); @@ -863,7 +975,7 @@ void DreamGenContext::useElvDoor() { // Axe on door showPuzText(15, 300); - _inc(data.byte(kProgresspoints)); + data.byte(kProgresspoints)++; data.word(kWatchingtime) = 46 * 2; data.word(kReeltowatch) = 31; data.word(kEndwatchreel) = 77; @@ -1176,10 +1288,10 @@ void DreamGenContext::useDiary() { data.byte(kGetback) = 0; RectWithCallback diaryList[] = { - { kDiaryx+94,kDiaryx+110,kDiaryy+97,kDiaryy+113,&DreamGenContext::diaryKeyN }, - { kDiaryx+151,kDiaryx+167,kDiaryy+71,kDiaryy+87,&DreamGenContext::diaryKeyP }, - { kDiaryx+176,kDiaryx+192,kDiaryy+108,kDiaryy+124,&DreamGenContext::quitKey }, - { 0,320,0,200,&DreamGenContext::blank }, + { kDiaryx+94,kDiaryx+110,kDiaryy+97,kDiaryy+113,&DreamBase::diaryKeyN }, + { kDiaryx+151,kDiaryx+167,kDiaryy+71,kDiaryy+87,&DreamBase::diaryKeyP }, + { kDiaryx+176,kDiaryx+192,kDiaryy+108,kDiaryy+124,&DreamBase::quitKey }, + { 0,320,0,200,&DreamBase::blank }, { 0xFFFF,0,0,0,0 } }; |