2009-09-03 20:59:17 +00:00
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers , whose names
* are too numerous to list here . Please refer to the COPYRIGHT
* file distributed with this source distribution .
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation ; either version 2
* of the License , or ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 , USA .
*/
2009-09-04 20:08:33 +00:00
# include "teenagent/teenagent.h"
2012-07-07 23:36:05 +00:00
# include "teenagent/scene.h"
# include "teenagent/inventory.h"
2009-09-04 20:08:33 +00:00
# include "teenagent/resources.h"
# include "teenagent/dialog.h"
2009-09-03 20:59:17 +00:00
2011-04-24 08:34:27 +00:00
# include "common/textconsole.h"
2009-09-04 20:08:33 +00:00
namespace TeenAgent {
2009-09-03 20:59:17 +00:00
# define CHECK_FLAG(addr, v) (res->dseg.get_byte(addr) == (v))
# define SET_FLAG(addr, v) (res->dseg.set_byte((addr), (v)))
# define GET_FLAG(addr) (res->dseg.get_byte(addr))
2009-11-09 07:58:27 +00:00
# define INC_FLAG(addr) (++*res->dseg.ptr(addr))
2009-09-03 20:59:17 +00:00
2012-07-22 23:50:19 +00:00
void TeenAgentEngine : : fnIntro ( ) {
hideActor ( ) ;
loadScene ( 41 , 139 , 156 , 3 ) ;
playSound ( 41 , 12 ) ;
playAnimation ( 912 , 1 ) ;
setOns ( 0 , 108 ) ;
playSound ( 62 , 8 ) ;
playSound ( 58 , 40 ) ;
playAnimation ( 913 , 1 ) ;
setOns ( 1 , 109 ) ;
setLan ( 2 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 192 , scene , 914 , 915 , textColorGoldDriver , textColorBankGuard , 2 , 1 ) ;
2012-07-22 23:50:19 +00:00
displayCredits ( dsAddr_introCredits1 ) ;
loadScene ( 42 , 139 , 156 , 3 ) ;
playSound ( 15 , 20 ) ;
playAnimation ( 916 , 1 ) ;
playSound ( 40 , 18 ) ;
playSound ( 40 , 22 ) ;
for ( byte i = 27 ; i < 37 ; i + = 2 )
playSound ( 40 , i ) ;
playSound ( 29 , 44 ) ;
playAnimation ( 918 , 0 , true ) ;
playAnimation ( 917 , 1 , true ) ;
waitAnimation ( ) ;
displayCredits ( dsAddr_introCredits2 ) ;
loadScene ( 40 , 139 , 156 , 3 ) ;
playMusic ( 3 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 193 , scene , 920 , 924 , textColorRGBBoss , textColorFortuneTeller , 1 , 2 ) ;
2012-07-22 23:50:19 +00:00
playSound ( 26 , 50 ) ;
playAnimation ( 925 , 0 , true ) ;
playAnimation ( 926 , 1 , true ) ;
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 194 , scene , 927 , 920 , textColorFortuneTeller , textColorRGBBoss , 2 , 1 ) ;
2012-07-22 23:50:19 +00:00
displayCredits ( dsAddr_introCredits3 ) ;
loadScene ( 39 , 139 , 156 , 3 ) ;
playMusic ( 11 ) ;
playSound ( 81 , 2 ) ;
playSound ( 81 , 8 ) ;
playSound ( 81 , 11 ) ;
playSound ( 81 , 14 ) ;
playSound ( 81 , 16 ) ;
playSound ( 81 , 18 ) ;
playSound ( 81 , 20 ) ;
playSound ( 81 , 21 ) ;
playAnimation ( 928 , 1 ) ;
setOns ( 0 , 112 ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 195 , scene , 929 , textColorMark , 1 ) ;
2012-07-22 23:50:19 +00:00
showActor ( ) ;
moveTo ( 319 , 150 , 1 , true ) ;
moveTo ( 63 , 150 , 1 ) ;
displayAsyncMessage ( dsAddr_HeyWtmQMsg , 4 , 62 , 18 , 36 ) ; // hey, what's the matter?
playAnimation ( 851 , 0 , true ) ;
playActorAnimation ( 930 , true ) ;
waitAnimation ( ) ;
playSound ( 24 , 11 ) ;
playActorAnimation ( 931 ) ;
displayCredits ( dsAddr_introCredits4 ) ;
playMusic ( 3 ) ;
loadScene ( 40 , 50 , 186 , 1 ) ;
setOns ( 0 , 113 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 196 , scene , 919 , 0 , textColorRGBBoss , textColorMark , 1 , 0 ) ;
2012-07-22 23:50:19 +00:00
moveTo ( 196 , 186 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 197 , scene , 0 , 920 , textColorMark , textColorRGBBoss , 0 , 1 ) ;
2012-07-22 23:50:19 +00:00
playActorAnimation ( 932 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 198 , scene , 0 , 920 , textColorMark , textColorRGBBoss , 0 , 1 ) ;
2012-07-22 23:50:19 +00:00
playActorAnimation ( 932 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 199 , scene , 0 , 920 , textColorMark , textColorRGBBoss , 0 , 1 ) ;
2012-07-22 23:50:19 +00:00
playActorAnimation ( 932 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 200 , scene , 0 , 922 , textColorMark , textColorRGBBoss , 0 , 1 ) ;
2012-07-22 23:50:19 +00:00
playActorAnimation ( 933 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 201 , scene , 0 , 920 , textColorMark , textColorRGBBoss , 0 , 1 ) ;
2012-07-22 23:50:19 +00:00
moveTo ( 174 , 186 , 1 ) ;
playAnimation ( 851 , 0 , true ) ;
playActorAnimation ( 934 , true ) ;
waitAnimation ( ) ;
loadScene ( 10 , 136 , 153 , 3 ) ;
}
2012-07-26 05:06:44 +00:00
void TeenAgentEngine : : fnPoleClimbFail ( ) {
moveTo ( 86 , 195 , 1 , true ) ;
playActorAnimation ( 868 ) ;
}
2012-07-22 23:50:19 +00:00
void TeenAgentEngine : : fnGotAnchor ( ) {
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 0 ) ;
2012-07-22 23:50:19 +00:00
setTimerCallback ( 0 , 0 ) ;
scene - > getActorAnimation ( ) - > free ( ) ;
playSound ( 64 , 7 ) ;
playActorAnimation ( 618 ) ;
disableObject ( 5 ) ;
setOns ( 0 , 0 ) ;
playSound ( 31 , 1 ) ;
playActorAnimation ( 619 ) ;
2012-07-26 05:06:44 +00:00
fnGetOutOfLake ( ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemAnchor ) ;
2012-07-22 23:50:19 +00:00
displayMessage ( dsAddr_hookedAnchorMsg ) ; // "I was really hooked on this anchor!"
}
2012-07-26 05:06:44 +00:00
void TeenAgentEngine : : fnGetOutOfLake ( ) {
loadScene ( 15 , 156 , 180 , 3 ) ;
playSound ( 5 , 5 ) ;
playSound ( 38 , 14 ) ;
playSound ( 38 , 20 ) ;
playSound ( 5 , 25 ) ;
playActorAnimation ( 616 ) ;
}
2012-07-22 23:50:19 +00:00
void TeenAgentEngine : : fnGuardDrinking ( ) {
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 0 ) ;
2012-07-22 23:50:19 +00:00
setTimerCallback ( 0 , 0 ) ;
scene - > getAnimation ( 0 ) - > free ( ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_scaredGuardAlreadyFlag , 1 ) ;
2012-07-22 23:50:19 +00:00
displayAsyncMessage ( dsAddr_BooMsg , 300 , 130 , 1 , 5 ) ; // "Booo!"
setOns ( 0 , 16 ) ;
enableObject ( 2 ) ;
playSound ( 17 , 5 ) ;
playAnimation ( 545 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 5 , scene , 0 , 546 , textColorMark , textColorMansionGuard , 0 , 1 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_spokenWithMansionGuardFlag , 1 ) ;
SET_FLAG ( dsAddr_haveNotSpokenWithMansionGuardFlag , 0 ) ;
2012-07-22 23:50:19 +00:00
}
2012-07-26 05:06:44 +00:00
void TeenAgentEngine : : fnEgoDefaultPosition ( ) {
if ( scene - > getPosition ( ) . y < = 149 )
moveTo ( 94 , 115 , 4 ) ;
else
moveTo ( 51 , 149 , 4 ) ;
}
void TeenAgentEngine : : fnEnterCave ( ) {
loadScene ( 24 , 230 , 170 , 1 ) ;
playSound ( 52 , 3 ) ;
playSound ( 52 , 7 ) ;
playSound ( 52 , 11 ) ;
playSound ( 52 , 14 ) ;
playSound ( 52 , 18 ) ;
playSound ( 52 , 21 ) ;
playSound ( 52 , 25 ) ;
playActorAnimation ( 601 ) ;
moveTo ( 230 , 179 , 3 ) ;
2012-07-28 05:05:20 +00:00
if ( ! CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) )
2012-07-26 05:06:44 +00:00
displayMessage ( dsAddr_kindaDarkMsg ) ; // "It's kinda dark here"
}
void TeenAgentEngine : : fnEgoScaredBySpider ( ) {
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_egoAlreadyScaredBySpiderFlag , 1 ) ) {
2012-07-26 05:06:44 +00:00
fnMoveToLadderAndLeaveCellar ( ) ;
dialog - > showMark ( 75 , scene ) ;
} else {
dialog - > showMark ( 73 , scene ) ;
fnMoveToLadderAndLeaveCellar ( ) ;
wait ( 100 ) ;
dialog - > showMark ( 74 , scene ) ;
2012-08-02 06:48:38 +00:00
SET_FLAG ( dsAddr_egoAlreadyScaredBySpiderFlag , 1 ) ;
2012-07-26 05:06:44 +00:00
}
}
void TeenAgentEngine : : fnMoveToLadderAndLeaveCellar ( ) {
Object * objTemp = scene - > getObject ( 3 ) ;
moveTo ( objTemp ) ;
fnLeaveCellar ( ) ;
moveTo ( 48 , 190 , 3 ) ;
}
void TeenAgentEngine : : fnLeaveCellar ( ) {
playSound ( 52 , 10 ) ;
playSound ( 52 , 14 ) ;
playSound ( 52 , 18 ) ;
playSound ( 52 , 21 ) ;
playSound ( 52 , 25 ) ;
playSound ( 52 , 28 ) ;
playSound ( 52 , 32 ) ;
playActorAnimation ( 600 ) ;
loadScene ( 21 , 297 , 178 , 3 ) ;
}
2012-07-22 23:50:19 +00:00
void TeenAgentEngine : : fnPutRockInHole ( ) {
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_timedCallbackState , 0 ) ) {
2012-07-22 23:50:19 +00:00
playSound ( 5 , 2 ) ;
playSound ( 15 , 12 ) ;
playActorAnimation ( 638 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemMouse ) ;
2012-07-28 08:44:16 +00:00
setTimerCallback ( csAddr_mouseOutOfHoleTimeout , 100 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 1 ) ;
} else if ( CHECK_FLAG ( dsAddr_timedCallbackState , 1 ) ) {
2012-07-22 23:50:19 +00:00
playSound ( 5 , 2 ) ;
playSound ( 52 , 13 ) ;
playActorAnimation ( 648 ) ;
setOns ( 1 , 46 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemRock ) ;
2012-07-28 08:44:16 +00:00
setTimerCallback ( csAddr_mouseOutOfHoleTimeout , 100 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 2 ) ;
} else if ( CHECK_FLAG ( dsAddr_timedCallbackState , 2 ) ) {
2012-07-22 23:50:19 +00:00
playActorAnimation ( 649 ) ;
setOns ( 1 , 47 ) ;
wait ( 300 ) ;
for ( byte i = 1 ; i < = 37 ; i + = 4 )
playSound ( 68 , i ) ;
playAnimation ( 639 , 2 ) ;
setOns ( 0 , 42 ) ;
enableObject ( 6 ) ;
disableObject ( 5 ) ;
2012-07-28 09:57:26 +00:00
SET_FLAG ( dsAddr_mouseGotGoldNuggetFlag , 1 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 0 ) ;
2012-07-22 23:50:19 +00:00
setTimerCallback ( 0 , 0 ) ;
}
}
2012-07-26 05:06:44 +00:00
void TeenAgentEngine : : fnEgoBottomRightTurn ( ) {
Common : : Point p = scene - > getPosition ( ) ;
if ( p . x = = 208 & & p . y = = 151 )
moveRel ( 0 , 0 , 2 ) ;
else
moveTo ( 208 , 151 , 1 ) ;
}
bool TeenAgentEngine : : fnCheckingDrawers ( ) {
2012-08-01 07:24:40 +00:00
uint16 v = GET_FLAG ( dsAddr_drawerPuzzleBookValue ) - 1 ;
2012-08-01 15:17:37 +00:00
if ( GET_FLAG ( dsAddr_blueDrawerOpenFlag + v ) ! = 1 )
2012-07-26 05:06:44 +00:00
return false ;
else {
uint16 sum = 0 ;
for ( uint i = 0 ; i < 6 ; + + i )
2012-08-01 15:17:37 +00:00
sum + = GET_FLAG ( dsAddr_blueDrawerOpenFlag + i ) ;
2012-07-26 05:06:44 +00:00
if ( sum ! = 1 )
return false ;
else
return true ;
}
}
void TeenAgentEngine : : fnDrawerOpenMessage ( ) {
2012-08-01 07:24:40 +00:00
if ( CHECK_FLAG ( dsAddr_drawerPuzzleHintGivenFlag , 1 ) )
2012-07-26 05:06:44 +00:00
displayMessage ( dsAddr_drawerOpenMsg ) ; // "I cannot open the drawer if the next one is open!"
else {
displayMessage ( dsAddr_strangeDrawerMsg ) ; // "Strange, but the drawer is stuck if the next drawer is open"
displayMessage ( dsAddr_notOrdinaryDrawersMsg ) ; // "Maybe these are not just ordinary drawers!"
2012-08-01 07:24:40 +00:00
SET_FLAG ( dsAddr_drawerPuzzleHintGivenFlag , 1 ) ;
2012-07-26 05:06:44 +00:00
}
}
bool TeenAgentEngine : : fnRobotSafeAlreadyUnlockedCheck ( ) {
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionRobotSafeUnlockedFlag , 1 ) ) {
return true ;
} else {
2012-07-26 05:06:44 +00:00
displayMessage ( dsAddr_noReasonMsg ) ; // "There's no reason to do it"
return false ;
2012-08-01 12:18:20 +00:00
}
2012-07-26 05:06:44 +00:00
}
void TeenAgentEngine : : fnRobotSafeUnlockCheck ( ) {
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionRobotSafeVoiceTestPassedFlag , 1 ) & &
CHECK_FLAG ( dsAddr_MansionRobotSafeScentTestPassedFlag , 1 ) & &
CHECK_FLAG ( dsAddr_MansionRobotSafeViewTestPassedFlag , 1 ) ) {
2012-07-26 05:06:44 +00:00
waitLanAnimationFrame ( 1 , 1 ) ;
playSound ( 89 , 2 ) ;
playActorAnimation ( 731 ) ;
setOns ( 0 , 70 ) ;
setLan ( 1 , 0 ) ;
disableObject ( 1 ) ;
enableObject ( 2 ) ;
enableObject ( 3 ) ;
}
}
bool TeenAgentEngine : : fnMansionIntrusionAttempt ( ) {
wait ( 50 ) ;
byte attempts = res - > dseg . get_byte ( dsAddr_mansionEntryCount ) + 1 ;
res - > dseg . set_byte ( dsAddr_mansionEntryCount , attempts ) ;
debugC ( 0 , kDebugCallbacks , " mansion intrusion attempt #%u " , attempts ) ;
if ( attempts > = 7 )
return false ;
else {
byte id = scene - > getId ( ) ;
playMusic ( 11 ) ;
displayCutsceneMessage ( dsAddr_cutsceneMsg2 , 84 , 95 ) ; // "Meanwhile in the mansion"
2012-07-26 09:22:54 +00:00
switch ( attempts ) {
case 2 :
2012-07-26 21:35:22 +00:00
fnSecondMansionIntrusion ( ) ;
2012-07-26 09:22:54 +00:00
break ;
case 3 :
2012-07-26 21:35:22 +00:00
fnThirdMansionIntrusion ( ) ;
2012-07-26 09:22:54 +00:00
break ;
case 4 :
2012-07-26 21:35:22 +00:00
fnFourthMansionIntrusion ( ) ;
2012-07-26 09:22:54 +00:00
break ;
case 5 :
2012-07-26 21:35:22 +00:00
fnFifthMansionIntrusion ( ) ;
2012-07-26 09:22:54 +00:00
break ;
case 6 :
2012-07-26 21:35:22 +00:00
fnSixthMansionIntrusion ( ) ;
2012-07-26 09:22:54 +00:00
break ;
default :
error ( " mansion intrusion attempts out of range! " ) ;
break ;
}
2012-07-26 05:06:44 +00:00
playMusic ( 6 ) ;
2012-08-01 13:44:51 +00:00
if ( getFlag ( dsAddr_johnNotyOutsideMansionDoorFlag ) ! = 1 | | attempts ! = 6 )
2012-07-26 05:06:44 +00:00
loadScene ( id , scene - > getPosition ( ) ) ;
return true ;
}
}
2012-07-26 21:35:22 +00:00
void TeenAgentEngine : : fnSecondMansionIntrusion ( ) {
hideActor ( ) ;
loadScene ( 34 , scene - > getPosition ( ) ) ;
playAnimation ( 986 , 0 , true ) ;
playAnimation ( 987 , 1 , true ) ;
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 178 , scene , 988 , 989 , textColorMansionGuard , textColorJohnNoty , 1 , 2 ) ;
2012-07-26 21:35:22 +00:00
playAnimation ( 990 , 0 , true ) ;
playAnimation ( 991 , 1 , true ) ;
waitAnimation ( ) ;
showActor ( ) ;
}
void TeenAgentEngine : : fnThirdMansionIntrusion ( ) {
hideActor ( ) ;
loadScene ( 30 , scene - > getPosition ( ) ) ;
playAnimation ( 887 , 1 ) ;
playAnimation ( 888 , 2 , true , true , true ) ;
//waitAnimation();
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 179 , scene , 889 , textColorMansionGuard , 2 ) ;
2012-07-26 21:35:22 +00:00
playSound ( 26 , 3 ) ;
playAnimation ( 891 , 1 , true , true , true ) ;
playAnimation ( 892 , 2 ) ;
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 180 , scene , 890 , 889 , textColorJohnNoty , textColorMansionGuard , 3 , 2 ) ;
2012-07-26 21:35:22 +00:00
showActor ( ) ;
}
void TeenAgentEngine : : fnFourthMansionIntrusion ( ) {
hideActor ( ) ;
loadScene ( 32 , scene - > getPosition ( ) ) ;
playAnimation ( 894 , 1 , true , true , true ) ;
playAnimation ( 893 , 2 , true ) ;
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 181 , scene , 895 , textColorMansionGuard , 3 ) ;
2012-07-26 21:35:22 +00:00
playSound ( 75 , 9 ) ;
playAnimation ( 898 , 1 , true ) ;
playAnimation ( 897 , 2 , true ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 182 , scene , 896 , 895 , textColorJohnNoty , textColorMansionGuard , 2 , 3 ) ;
2012-07-26 21:35:22 +00:00
showActor ( ) ;
}
void TeenAgentEngine : : fnFifthMansionIntrusion ( ) {
hideActor ( ) ;
loadScene ( 29 , scene - > getPosition ( ) ) ;
playActorAnimation ( 901 , true ) ;
playAnimation ( 900 , 1 , true ) ;
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 183 , scene , 903 , 902 , textColorJohnNoty , textColorMansionGuard , 2 , 3 ) ;
2012-07-26 21:35:22 +00:00
for ( byte i = 3 ; i < = 9 ; i + = 2 )
playSound ( 56 , i ) ;
playActorAnimation ( 905 , true ) ;
playAnimation ( 904 , 1 , true ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 184 , scene , 903 , 902 , textColorJohnNoty , textColorMansionGuard , 2 , 3 ) ;
2012-07-26 21:35:22 +00:00
showActor ( ) ;
}
void TeenAgentEngine : : fnSixthMansionIntrusion ( ) {
hideActor ( ) ;
loadScene ( 35 , scene - > getPosition ( ) ) ;
playAnimation ( 907 , 2 , true ) ;
playAnimation ( 906 , 3 , true ) ;
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 185 , scene , 908 , 909 , textColorMansionGuard , textColorJohnNoty , 2 , 3 ) ;
dialog - > show ( 186 , scene , 910 , 908 , textColorJohnNoty , textColorMansionGuard , 3 , 2 ) ;
2012-07-26 21:35:22 +00:00
loadScene ( 11 , scene - > getPosition ( ) ) ;
showActor ( ) ;
setOns ( 3 , 51 ) ;
playAnimation ( 911 , 1 ) ;
playAnimation ( 899 , 1 ) ;
2012-08-01 13:44:51 +00:00
setFlag ( dsAddr_johnNotyOutsideMansionDoorFlag , 1 ) ;
2012-07-26 21:35:22 +00:00
reloadLan ( ) ;
wait ( 200 ) ;
enableObject ( 8 ) ;
setLan ( 2 , 8 ) ;
}
2012-07-26 05:06:44 +00:00
void TeenAgentEngine : : fnTooDark ( ) {
displayMessage ( dsAddr_TooDarkMsg ) ; // "It's too dark to see clearly"
}
bool TeenAgentEngine : : fnIsCookGone ( ) {
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionCookGoneFlag , 1 ) ) {
return true ;
} else {
2012-07-26 05:06:44 +00:00
displayMessage ( dsAddr_cookAroundMsg ) ; // "I can't do anything with this cook around"
return false ;
2012-08-01 12:18:20 +00:00
}
2012-07-26 05:06:44 +00:00
}
void TeenAgentEngine : : fnEgoSuspiciousPosition ( ) {
Common : : Point p = scene - > getPosition ( ) ;
if ( p . x ! = 203 & & p . y ! = 171 )
moveTo ( 203 , 169 , 2 ) ;
else
moveTo ( 203 , 169 , 1 ) ;
}
void TeenAgentEngine : : fnGivingFlowerToOldLady ( ) {
playSound ( 5 , 2 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 37 , scene , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
2012-07-26 05:06:44 +00:00
playActorAnimation ( 537 , true ) ;
playAnimation ( 538 , 0 , true ) ;
waitAnimation ( ) ;
wait ( 100 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 38 , scene , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
2012-07-26 05:06:44 +00:00
}
void TeenAgentEngine : : fnGiveAnotherFlowerToOldLady ( ) {
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackOldLady , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
2012-07-26 05:06:44 +00:00
}
void TeenAgentEngine : : fnGivingFlowerToAnne ( ) {
2012-08-03 15:28:58 +00:00
dialog - > show ( 53 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2012-07-26 05:06:44 +00:00
playSound ( 5 , 10 ) ;
playActorAnimation ( 540 , true ) ;
playAnimation ( 539 , 1 , true ) ;
waitAnimation ( ) ;
wait ( 100 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 54 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2012-07-26 05:06:44 +00:00
wait ( 50 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 55 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
dialog - > show ( 56 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2012-07-26 05:06:44 +00:00
wait ( 50 ) ;
moveRel ( 0 , 1 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 57 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2012-07-26 05:06:44 +00:00
moveRel ( 0 , - 1 , 0 ) ;
wait ( 50 ) ;
}
void TeenAgentEngine : : fnGiveAnotherFlowerToAnne ( ) {
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackAnotherFlowerToAnne , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2012-07-26 05:06:44 +00:00
}
2009-09-03 20:59:17 +00:00
void TeenAgentEngine : : rejectMessage ( ) {
2011-05-17 09:58:34 +00:00
uint i = _rnd . getRandomNumber ( 3 ) ;
2012-07-23 03:04:42 +00:00
switch ( i ) {
case 0 :
displayMessage ( dsAddr_rejectMsg0 ) ; // "I have no idea what to do with it"
break ;
case 1 :
displayMessage ( dsAddr_rejectMsg1 ) ; // "I can't imagine what I could do with this"
break ;
case 2 :
displayMessage ( dsAddr_rejectMsg2 ) ; // "I can't figure out what I should do with this"
break ;
case 3 :
displayMessage ( dsAddr_rejectMsg3 ) ; // "I can't find any reason to mess with it"
break ;
default :
error ( " rejectMessage() index out of range " ) ;
break ;
}
2009-09-03 20:59:17 +00:00
}
bool TeenAgentEngine : : processCallback ( uint16 addr ) {
if ( addr = = 0 )
return false ;
2009-09-15 08:54:06 +00:00
2012-07-07 23:36:05 +00:00
debugC ( 0 , kDebugCallbacks , " processCallback(%04x) " , addr ) ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
bool retVal = true ;
2009-09-15 08:54:06 +00:00
switch ( addr ) {
2012-07-11 23:01:26 +00:00
case csAddr_intro : // intro
2012-07-22 23:50:19 +00:00
fnIntro ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x3fed :
loadScene ( 3 , Common : : Point ( 305 , 104 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
case 0x4007 :
loadScene ( 5 , Common : : Point ( 300 , 131 ) ) ;
scene - > setOrientation ( 3 ) ;
break ;
2009-09-03 20:59:17 +00:00
case 0x4021 :
2012-07-11 23:01:26 +00:00
// pulling out mysterious object
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_cutFenceFlag , 1 ) ) {
2009-09-09 20:42:44 +00:00
playActorAnimation ( 844 ) ;
playActorAnimation ( 846 ) ;
playActorAnimation ( 845 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_pullObjMsg1 ) ; // "I can't pull it out"
2009-09-03 20:59:17 +00:00
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_pullObjMsg2 ) ; // "I can't reach it"
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 06:59:51 +00:00
case 0x4048 :
displayMessage ( dsAddr_dontWantToTouchMsg ) ; // "I don't want to touch it - I might get hurt"
break ;
2012-07-29 05:00:27 +00:00
case 0x404f :
displayMessage ( dsAddr_notWantToSleepMsg ) ; // "I don't want to sleep"
break ;
2012-08-02 08:35:17 +00:00
case 0x4056 :
// FIXME - This is the bird use callback in the first act at
// the mudpool. Current Code based on behaviour. Need to analyse cseg data.
2012-08-05 20:47:38 +00:00
dialog - > popMark ( scene , dsAddr_dialogStackMudpoolBird ) ;
2012-08-02 08:35:17 +00:00
break ;
2012-07-29 05:00:27 +00:00
case 0x4060 :
loadScene ( 2 , Common : : Point ( 28 , 180 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
case 0x407a :
loadScene ( 4 , Common : : Point ( 297 , 128 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
2012-07-11 23:01:26 +00:00
case 0x4094 : // climbing to the pole near mudpool
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_gotMugOfMudFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_poleClimbDoneMsg ) ; // "Never Again!"
2009-09-03 20:59:17 +00:00
} else {
2009-09-30 16:16:53 +00:00
for ( byte i = 11 ; i < = 27 ; i + = 4 )
2009-09-15 22:35:19 +00:00
playSound ( 76 , i ) ;
2010-01-25 01:39:44 +00:00
2009-09-15 22:35:19 +00:00
playSound ( 56 , 35 ) ;
playSound ( 19 , 59 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 864 ) ;
2009-09-15 22:35:19 +00:00
playAnimation ( 865 , 1 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 866 ) ;
2009-09-03 20:59:17 +00:00
//InventoryObject *obj = inventory->selectedObject();
2012-10-09 08:14:44 +00:00
//if (obj != NULL && obj->id == kInvItemMug) {
2009-09-03 20:59:17 +00:00
2012-10-02 04:08:33 +00:00
// FIXME: implement pause in mudpool and using of Mug object, as per original interpreter
2012-10-09 08:14:44 +00:00
if ( inventory - > has ( kInvItemMug ) ) {
2009-09-03 20:59:17 +00:00
playSound ( 5 , 4 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 5 , 19 ) ;
playSound ( 64 , 11 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 867 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemMug ) ;
inventory - > add ( kInvItemMugOfMud ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 86 , 195 , 1 , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 868 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_gotMugOfMudFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
} else {
2012-07-26 05:06:44 +00:00
fnPoleClimbFail ( ) ;
2012-08-05 20:47:38 +00:00
dialog - > popMark ( scene , dsAddr_dialogStackFallIntoMudpool ) ;
2009-09-03 20:59:17 +00:00
}
}
2012-07-11 23:01:26 +00:00
break ;
2012-07-11 17:20:26 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_poleClimbFail :
2012-07-26 05:06:44 +00:00
fnPoleClimbFail ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x4195 :
displayMessage ( dsAddr_preferWaterMsg ) ; // "I prefer water"
break ;
2012-07-11 23:01:26 +00:00
case 0x419c : // getting the bird
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
playSound ( 56 , 10 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 875 ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 6 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemBird ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-31 13:40:47 +00:00
case 0x41c3 :
displayMessage ( dsAddr_pullObjMsg2 ) ; // "I can't reach it"
break ;
2012-07-29 05:00:27 +00:00
case 0x41ca :
rejectMessage ( ) ;
break ;
2009-09-15 08:54:06 +00:00
case 0x41ce :
2009-09-05 15:04:37 +00:00
moveTo ( 197 , 159 , 4 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 71 , 8 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 833 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 225 , 159 , 4 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemDelicatePlant ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 3 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x422c :
displayMessage ( dsAddr_tooWeakToClimbMsg ) ; // "I'm too weak to climb it"
break ;
case 0x4233 :
loadScene ( 3 , Common : : Point ( 216 , 199 ) ) ;
scene - > setOrientation ( 1 ) ;
break ;
case 0x424d :
loadScene ( 5 , Common : : Point ( 18 , 174 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
2009-09-03 20:59:17 +00:00
case 0x4267 :
2010-02-02 21:47:51 +00:00
hideActor ( ) ;
2009-09-03 20:59:17 +00:00
playSound ( 23 , 8 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 24 , 13 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 841 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0x61 ) ;
setOns ( 2 , 0 ) ;
playSound ( 63 , 12 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 5 , 26 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 842 ) ;
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-07-11 23:01:26 +00:00
// shown in different positions
2012-08-03 15:28:58 +00:00
displayMessage ( dsAddr_fnMsg2 , textColorMark , 16 , 68 ) ; // "And how am I supposed to get back?"
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-08-03 15:28:58 +00:00
displayMessage ( dsAddr_fnMsg3 , textColorMark , 92 , 68 ) ; // "Great"
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-08-03 15:28:58 +00:00
displayMessage ( dsAddr_fnMsg4 , textColorMark , 62 , 68 ) ; // "Oh, yeah, right"
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 843 ) ;
2009-09-15 22:35:19 +00:00
showActor ( ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 223 , 149 , 0 , true ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 7 ) ;
disableObject ( 1 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemShovelAct1 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_fnMsg1 ) ; // "Piece of cake"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x433a :
loadScene ( 10 , Common : : Point ( 294 , 183 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
case 0x4354 :
loadScene ( 4 , Common : : Point ( 300 , 185 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
case 0x436e :
loadScene ( 2 , Common : : Point ( 219 , 199 ) ) ;
scene - > setOrientation ( 1 ) ;
break ;
2009-09-03 20:59:17 +00:00
case 0x4388 :
2009-09-15 22:35:19 +00:00
playSound ( 80 , 4 ) ;
playActorAnimation ( 961 ) ;
loadScene ( 8 , 155 , 199 , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x43b5 : // HQ, first trial - prison
2009-09-05 15:04:37 +00:00
playSound ( 70 , 6 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 962 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 7 , 30 , 184 , 2 ) ;
2012-08-01 13:44:51 +00:00
if ( res - > dseg . get_byte ( dsAddr_FirstActTrialState ) < 2 ) {
2010-02-02 08:12:45 +00:00
wait ( 150 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 134 , 167 , 2 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_firstTrialMsg ) ; // "Sir, I'm Mark. A rookie"
2009-09-03 20:59:17 +00:00
setLan ( 1 , 0 ) ;
2009-09-13 09:53:14 +00:00
playAnimation ( 812 , 0 , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 811 ) ;
2010-01-25 01:39:44 +00:00
2012-08-03 15:28:58 +00:00
dialog - > show ( 148 , scene , 0 , 813 , textColorMark , textColorCaptain , 0 , 1 ) ;
2009-11-11 22:19:17 +00:00
loadScene ( 6 , 230 , 184 ) ;
2010-03-21 07:38:09 +00:00
playMusic ( 5 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 149 , scene , 0 , 814 , textColorMark , textColorCaptain , 0 , 1 ) ;
2009-09-27 13:48:51 +00:00
playSound ( 4 , 14 ) ;
2009-09-13 09:53:14 +00:00
playAnimation ( 815 , 0 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 150 , scene , 0 , textColorMark , 0 ) ;
2009-09-03 20:59:17 +00:00
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_FirstActTrialState , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
case 0x4482 :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_FirstActTrialState , 0 ) ) {
2009-09-09 20:42:44 +00:00
playActorAnimation ( 968 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_lockedMsg ) ; // "It's Locked!"
2009-09-03 20:59:17 +00:00
} else {
2009-11-08 21:59:26 +00:00
playSound ( 80 , 3 ) ;
playSound ( 79 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 968 ) ;
2009-11-08 21:59:26 +00:00
loadScene ( 6 , 280 , 186 , 4 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x44fc : // pull out spring from bed
2009-09-03 20:59:17 +00:00
playSound ( 53 , 25 ) ;
2009-09-13 12:58:35 +00:00
playSound ( 24 , 27 ) ;
playSound ( 5 , 36 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 839 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 278 , scene - > getPosition ( ) . y , 0 , true ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemSpring ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2009-09-15 08:54:06 +00:00
case 0x44cb :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_gotRopeAct1Flag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_vacMsg ) ; // "What am I? A vacuum cleaner?!"
2009-09-03 20:59:17 +00:00
} else {
2009-09-13 12:58:35 +00:00
playSound ( 49 , 14 ) ;
playSound ( 5 , 21 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 869 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemRopeAct1 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_gotRopeAct1Flag , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x4532 :
displayMessage ( dsAddr_springPrickMsg ) ; // "The springs would prick my back"
break ;
2012-07-11 23:01:26 +00:00
case 0x4539 : // prison cell: use crates
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_JailCableAndBowlState , 2 ) ) {
2012-07-11 23:01:26 +00:00
// finished the meal - trap
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_mealFinishedMsg ) ; // "Hey! I finished my meal."
2009-09-05 15:04:37 +00:00
moveTo ( 306 , 196 , 2 ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2009-09-03 20:59:17 +00:00
//playAnimation(825, 1); //very long empty animation. what for?
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2009-09-03 20:59:17 +00:00
setLan ( 1 , 0 ) ;
playSound ( 71 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 823 ) ;
2009-09-03 20:59:17 +00:00
2009-09-15 22:35:19 +00:00
loadScene ( 5 , scene - > getPosition ( ) ) ;
2009-09-15 08:54:06 +00:00
playSound ( 74 , 1 ) ;
playSound ( 74 , 3 ) ;
playSound ( 74 , 6 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 826 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 6 , scene - > getPosition ( ) ) ;
setOns ( 3 , 0x5b ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_bowlWeldedMsg ) ; // "Wow. He got welded to the bowl"
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_JailCableAndBowlState , 3 ) ;
2009-09-26 15:04:09 +00:00
scene - > getObject ( 4 ) - > setName ( " body " ) ;
2009-09-03 20:59:17 +00:00
} else {
2012-08-05 20:47:38 +00:00
if ( dialog - > pop ( scene , dsAddr_dialogStackJailDoorGrates , 0 , 0 , textColorMark , textColorMark , 0 , 0 ) = = 0x636b ) { // 'im getting hungry'
2012-07-11 23:01:26 +00:00
wait ( 100 ) ;
playSound ( 52 , 8 ) ;
playSound ( 52 , 13 ) ;
playAnimation ( 820 , 1 ) ;
setOns ( 3 , 0x59 ) ;
wait ( 50 ) ;
moveTo ( scene - > getPosition ( ) . x , scene - > getPosition ( ) . y + 1 , 3 ) ;
wait ( 150 ) ;
moveTo ( scene - > getPosition ( ) . x , scene - > getPosition ( ) . y - 1 , 2 ) ;
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_ThanksMsg ) ; // "Thanks."
2012-07-11 23:01:26 +00:00
enableObject ( 4 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_GotFoodBowlInJailFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
}
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x4662 :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_JailCableAndBowlState , 3 ) ) {
if ( CHECK_FLAG ( dsAddr_GotJailKeyFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noPocketMsg ) ; // "I don't want to touch his pockets again."
2009-09-13 14:12:39 +00:00
} else {
moveTo ( 280 , 179 , 2 ) ;
playSound ( 49 , 7 ) ;
playSound ( 5 , 17 ) ;
playActorAnimation ( 827 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemJailKey ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_GotJailKeyFlag , 1 ) ;
2009-09-13 14:12:39 +00:00
}
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_foodAliveMsg ) ; // "No, thanks. This food seems still alive"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x46af : // prison cell: use live cable
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_GotFoodBowlInJailFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_ideaMsg ) ; // "That gives me an idea"
2009-09-03 20:59:17 +00:00
setOns ( 2 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 821 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 2 , 0x5a ) ;
setOns ( 3 , 0 ) ;
playSound ( 22 , 2 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 822 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_checkWorksMsg ) ; // "Now I got to check if it works"
2009-09-03 20:59:17 +00:00
disableObject ( 5 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_JailCableAndBowlState , 1 ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_unkUsageMsg ) ; // "I don't have any idea what to do with it right now"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x4705 : // prison: getting lamp bulb
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 144 , 185 , 4 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 56 , 15 ) ;
2012-07-11 23:01:26 +00:00
setOns ( 0 , 86 ) ; // hiding lamp
2009-09-09 20:42:44 +00:00
playActorAnimation ( 816 , true ) ;
2010-02-02 08:12:45 +00:00
playAnimation ( 817 , 0 , true ) ;
2009-09-03 20:59:17 +00:00
waitAnimation ( ) ;
setOns ( 0 , 87 ) ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
playSound ( 34 , 1 ) ;
2009-09-13 12:58:35 +00:00
playSound ( 5 , 15 ) ;
playActorAnimation ( 818 , true ) ;
2010-02-02 08:12:45 +00:00
playAnimation ( 819 , 0 , true ) ;
2009-09-03 20:59:17 +00:00
waitAnimation ( ) ;
2009-09-15 08:54:06 +00:00
2009-09-05 15:04:37 +00:00
moveTo ( 160 , 188 , 1 , true ) ;
2009-09-03 20:59:17 +00:00
setOns ( 2 , 88 ) ;
disableObject ( 6 ) ;
enableObject ( 5 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemBulb ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x4794 : // prison cell door
2012-08-01 13:44:51 +00:00
if ( res - > dseg . get_byte ( dsAddr_FirstActTrialState ) > = 2 ) {
2009-09-03 20:59:17 +00:00
loadScene ( 5 , 287 , 143 ) ;
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_doorClosedMsg ) ; // "The door is closed. What a surprise."
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x47bc : // prison: examining trash can
2009-09-13 12:58:35 +00:00
playSound ( 79 , 5 ) ;
playSound ( 1 , 14 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 966 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_emptyMsg ) ; // "It's Empty"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x47db : // prison: use switch
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_FirstActTrialState , 1 ) ) {
2009-09-03 20:59:17 +00:00
playSound ( 71 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 823 ) ;
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_JailCableAndBowlState , 0 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_NotHappenMsg ) ; // "Nothing happened"
2009-09-03 20:59:17 +00:00
} else {
playSound ( 74 , 1 ) ;
playAnimation ( 824 , 1 ) ;
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_JailCableAndBowlState , 1 ) ) {
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_timeToCallMsg ) ; // "I think it is time to call captain"
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_JailCableAndBowlState , 2 ) ;
2009-09-03 20:59:17 +00:00
}
}
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_nahMsg ) ; // "Nah"
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x4836 :
rejectMessage ( ) ;
break ;
2009-09-15 08:54:06 +00:00
case 0x4871 :
2009-09-09 20:42:44 +00:00
playActorAnimation ( 965 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_lockedMsg ) ; // "It's Locked!"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x487e :
displayMessage ( dsAddr_geographyClassMsg ) ; // "I should have paid more attention in geography classes."
break ;
2012-07-29 06:59:51 +00:00
case 0x4885 :
displayMessage ( dsAddr_dontNeedMessMsg ) ; // "I don't need this mess"
break ;
case 0x488c :
displayMessage ( dsAddr_seenSofterRocksMsg ) ; // "Thanks, but I've seen softer rocks"
break ;
2012-07-11 23:01:26 +00:00
case 0x4893 : // taking pills
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_captainDrawerState , 1 ) ) {
SET_FLAG ( dsAddr_captainDrawerState , 2 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0x67 ) ;
playSound ( 5 , 9 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 872 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemMedicine ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 7 ) ;
} else {
2009-09-09 20:42:44 +00:00
playActorAnimation ( 964 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_lockedMsg ) ; // "It's Locked!"
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 06:59:51 +00:00
case 0x48d4 :
displayMessage ( dsAddr_tooBluntMsg ) ; // "They are too blunt to be of any use"
break ;
2012-07-29 05:00:27 +00:00
case 0x48db :
displayMessage ( dsAddr_uselessModelsMsg ) ; // "What's the use of the models?"
break ;
case 0x48e2 :
case 0x48e6 :
rejectMessage ( ) ;
break ;
2012-07-29 06:59:51 +00:00
case 0x4911 :
displayMessage ( dsAddr_barmanWillNoticeMsg ) ; // "The barman will surely notice its disappearing"
break ;
2012-07-11 23:01:26 +00:00
case 0x4918 : // talking with barmen
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_birdOnBarRadioAntennaFlag , 1 ) ) {
2009-09-05 15:04:37 +00:00
moveTo ( 140 , 152 , 1 ) ;
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_swappedBarmanMugFlag , 1 ) ) {
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 177 , scene , 0 , textColorMark , 0 ) ;
displayMessage ( dsAddr_yeahRightMsg , textColorBarman , 32 , 67 ) ; // "Yeah right!"
2009-09-03 20:59:17 +00:00
//reloadLan();
setLan ( 1 , 0 ) ;
2009-09-15 22:35:19 +00:00
playAnimation ( 882 , 0 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 75 , 10 ) ;
setOns ( 2 , 0 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 75 , 10 ) ;
playSound ( 24 , 15 ) ;
playAnimation ( 883 , 0 ) ;
2009-11-17 22:45:41 +00:00
shakeScreen ( ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 1 ) ;
disableObject ( 2 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_barmanPassedOutFlag , 1 ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_talkNotNowMsg ) ; // "I've got no reason to talk to him right now."
2009-09-03 20:59:17 +00:00
} else {
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_FirstActTrialState , 3 ) ) {
if ( CHECK_FLAG ( dsAddr_spokeToBarmanAboutThirdTrialFlag , 1 ) ) {
2012-08-03 15:28:58 +00:00
dialog - > show ( 168 , scene , 0 , 857 , textColorMark , textColorBarman , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
} else {
2012-08-03 15:28:58 +00:00
dialog - > show ( 166 , scene , 0 , 857 , textColorMark , textColorBarman , 0 , 1 ) ; // taking mug
2009-09-09 20:42:44 +00:00
playActorAnimation ( 859 , true ) ;
2009-09-15 22:35:19 +00:00
playAnimation ( 858 , 0 , true ) ;
2009-09-03 20:59:17 +00:00
waitAnimation ( ) ;
playSound ( 75 , 6 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 860 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 167 , scene , 0 , 857 , textColorMark , textColorBarman , 0 , 1 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemMug ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_spokeToBarmanAboutThirdTrialFlag , 1 ) ;
SET_FLAG ( dsAddr_gotPasswordNeedSpeakBarmanFlag , 0 ) ;
2009-09-03 20:59:17 +00:00
}
} else {
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackBarman , 0 , 857 , textColorMark , textColorBarman , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
}
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 10:02:31 +00:00
case 0x4d7d :
case 0x4d81 :
rejectMessage ( ) ;
break ;
case 0x4d89 :
displayMessage ( dsAddr_getRidOfGuardFirstMsg ) ; // "If I want to get inside I must get rid of this guard first..."
break ;
case 0x4d90 :
rejectMessage ( ) ;
break ;
case 0x4e47 :
loadScene ( 13 , Common : : Point ( 9 , 172 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
case 0x4e85 :
loadScene ( 15 , Common : : Point ( 291 , 162 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
case 0x4e9f :
loadScene ( 12 , Common : : Point ( 310 , 152 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
2012-07-11 23:01:26 +00:00
case 0x4f14 : // use the hollow
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_mansionTreeHollowEmptyFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_totalEmptyMsg ) ; // "I can see it's totally empty"
else
displayMessage ( dsAddr_noHandsMsg ) ; // "I'd better not put my hands in there..."
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
case 0x4a64 :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_gotPasswordNeedSpeakBarmanFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_firstBusinessMsg ) ; // "First I've got some business to take care of"
else
2009-09-03 20:59:17 +00:00
loadScene ( 5 , 35 , 162 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
case 0x4bf5 :
2009-09-09 20:42:44 +00:00
playActorAnimation ( 959 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 8 , 40 , 152 , 3 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 06:59:51 +00:00
case 0x4c18 :
rejectMessage ( ) ;
break ;
case 0x4c29 :
displayMessage ( dsAddr_tooManyToSearchMsg ) ; // "There are too many of them to search"
break ;
case 0x4c30 :
case 0x4c37 :
displayMessage ( dsAddr_captainWouldNotFitMsg ) ; // "Captain surely wouldn't fit them. I must look elsewhere"
break ;
2009-09-03 20:59:17 +00:00
case 0x483a :
2012-08-05 20:47:38 +00:00
dialog - > popMark ( scene , dsAddr_dialogStackInterrogateCaptain ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x4844 :
playSound ( 80 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 963 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 5 , 166 , 158 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
case 0x48ea :
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
playSound ( 5 , 9 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 836 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemSwissArmyKnife ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 12 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
case 0x4a8c :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_barmanPassedOutFlag , 1 ) ) {
2009-09-03 20:59:17 +00:00
playSound ( 89 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 958 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 9 , 240 , 182 , 4 ) ;
2012-08-01 13:44:51 +00:00
} else if ( CHECK_FLAG ( dsAddr_birdOnBarRadioAntennaFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_barmanTooCloseMsg ) ; // "The barman is too close"
2009-09-03 20:59:17 +00:00
} else {
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackBarCellarDoor , 0 , 857 , textColorMark , textColorBarman , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x4aed :
displayMessage ( dsAddr_tooBigMsg ) ; // "It's too big and I doubt if I'll ever need it"
break ;
2012-07-11 23:01:26 +00:00
case 0x4af4 : // taking the crumbs
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
2009-11-08 21:59:26 +00:00
playSound ( 49 , 6 ) ;
playSound ( 5 , 13 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 861 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemCrumbs ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 6 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x4b23 :
rejectMessage ( ) ;
break ;
case 0x4b27 :
displayMessage ( dsAddr_tooMuchToDrinkMsg ) ; // "It'd take too much time to drink it..."
break ;
case 0x4b2e :
displayMessage ( dsAddr_notThiefMsg ) ; // "I'm not a thief. And it's empty, by the way."
break ;
2009-09-03 20:59:17 +00:00
case 0x4b35 :
playSound ( 15 , 7 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 884 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 55 , 1 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 24 , 12 ) ;
playAnimation ( 885 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 164 , scene , 886 , 0 , textColorJohnNoty , textColorMark , 1 , 0 ) ;
2009-09-03 20:59:17 +00:00
playMusic ( 3 ) ;
loadScene ( 40 , 198 , 186 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 202 , scene , 0 , 920 , textColorMark , textColorRGBBoss , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
inventory - > clear ( ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemSuperGlue ) ;
2012-07-17 01:21:40 +00:00
displayCredits ( dsAddr_credits5 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 1 , 198 , 186 ) ;
2009-09-15 22:35:19 +00:00
hideActor ( ) ;
2009-11-11 22:19:17 +00:00
playActorAnimation ( 956 ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 212 , scene , 957 , textColorMark , 1 ) ;
2009-09-03 20:59:17 +00:00
waitAnimation ( ) ;
loadScene ( 15 , 157 , 199 , 1 ) ;
playMusic ( 6 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x4c3e : // get the grenade
2009-09-03 20:59:17 +00:00
playSound ( 32 , 24 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 862 ) ;
2009-09-03 20:59:17 +00:00
reloadLan ( ) ;
playAnimation ( 863 , 1 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemGrenade ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 1 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_act1GuardState , 2 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
case 0x4c70 :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_act1GuardState , 0 ) ) {
if ( CHECK_FLAG ( dsAddr_ShownPassToGuardFlag , 1 ) ) { // papers are shown
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackCampGuardReadingNews , 0 , 809 , textColorMark , textColorCampGuard , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
} else {
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackCampGuardWantsDocuments , 0 , 809 , textColorMark , textColorCampGuard , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
}
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_helloQMsg ) ; // "Hello?"
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_totallyAddictedMsg ) ; // "He's totally addicted"
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x4c1c :
2009-09-09 20:42:44 +00:00
playActorAnimation ( 960 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_lockedMsg ) ; // "It's Locked!"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 05:00:27 +00:00
case 0x4ca5 :
displayMessage ( dsAddr_chickenNeverMsg ) ; // "Chickening? Me? Never!"
break ;
2009-09-03 20:59:17 +00:00
case 0x4cac :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_ShownPassToGuardFlag , 1 ) ) { // papers are shown
2009-09-03 20:59:17 +00:00
loadScene ( 5 , 124 , 199 ) ;
} else {
2012-08-03 15:28:58 +00:00
dialog - > show ( 144 , scene , 0 , 809 , textColorMark , textColorCampGuard , 0 , 1 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 269 , 175 , 4 ) ;
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackCampGuardShowPass , 0 , 809 , textColorMark , textColorCampGuard , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x4cf1 : // talking with mansion guard
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_spokenWithMansionGuardFlag , 1 ) ;
2012-08-05 20:47:38 +00:00
if ( dialog - > pop ( scene , dsAddr_dialogStackPleadingToMansionGuard , 0 , 529 , textColorMark , textColorMansionGuard , 0 , 1 ) = = 0x01b4 ) { // 2nd try
2012-07-11 23:01:26 +00:00
Common : : Point p = scene - > getPosition ( ) ;
moveTo ( 189 , 159 , 0 ) ;
//waitLanAnimationFrame(1, 1);
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
playSound ( 5 , 2 ) ;
playSound ( 5 , 19 ) ;
playActorAnimation ( 550 , true ) ;
playAnimation ( 551 , 0 , true ) ;
waitAnimation ( ) ;
2009-09-05 17:15:28 +00:00
2012-07-11 23:01:26 +00:00
moveTo ( p , 2 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemChocCandy ) ;
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackPleadingToMansionGuard , 0 , 529 , textColorMark , textColorMansionGuard , 0 , 1 ) ;
2012-07-11 23:01:26 +00:00
}
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x4d94 : // talking with fatso
2012-08-03 15:28:58 +00:00
dialog - > show ( 87 , scene , 0 , 666 , textColorMark , textColorJohnNoty , 0 , 2 ) ;
displayAsyncMessage ( dsAddr_BribeMsg , 120 , 109 , 1 , 10 , textColorJohnNoty ) ; // FIXME: Original (x,y) was (100, 78), rather than (120, 109)?
2009-09-05 20:58:25 +00:00
playSound ( 5 , 3 ) ;
playAnimation ( 667 , 1 ) ;
playAnimation ( 668 , 1 ) ;
setOns ( 2 , 50 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 88 , scene , 0 , 666 , textColorMark , textColorJohnNoty , 0 , 2 ) ;
2009-09-05 20:58:25 +00:00
setOns ( 3 , 0 ) ;
2012-08-01 13:44:51 +00:00
setFlag ( dsAddr_johnNotyOutsideMansionDoorFlag , 0 ) ;
2009-09-05 20:58:25 +00:00
reloadLan ( ) ;
playSound ( 82 , 19 ) ;
2009-11-09 21:34:01 +00:00
playAnimation ( 669 , 1 ) ;
2012-07-11 17:20:26 +00:00
dialog - > showMark ( 89 , scene ) ;
2009-09-05 20:58:25 +00:00
enableObject ( 15 ) ;
disableObject ( 8 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x4e61 :
loadScene ( 14 , 280 , 198 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 20:58:25 +00:00
case 0x4ee5 :
setOns ( 2 , 0 ) ;
playSound ( 5 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 676 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_WimpMsg ) ; // "I'm a pathetic little wimp"
2009-09-05 20:58:25 +00:00
disableObject ( 15 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemBanknote ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2009-09-05 17:15:28 +00:00
case 0x4d56 :
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemWhisky ) ;
2009-09-05 17:15:28 +00:00
disableObject ( 2 ) ;
setOns ( 0 , 0 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 547 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-31 14:08:32 +00:00
case 0x4d85 :
rejectMessage ( ) ;
break ;
2012-07-11 23:01:26 +00:00
case 0x4eb9 : // Pick up wrapper
2009-09-05 17:15:28 +00:00
playSound ( 5 , 12 ) ;
playSound ( 5 , 18 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemWrapper ) ;
2009-09-05 17:15:28 +00:00
setOns ( 1 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 549 ) ;
2009-09-05 17:15:28 +00:00
disableObject ( 13 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 17:15:28 +00:00
2012-07-31 14:08:32 +00:00
case 0x4ee1 :
rejectMessage ( ) ;
break ;
2009-09-03 20:59:17 +00:00
case 0x4f25 :
2009-09-09 20:42:44 +00:00
playActorAnimation ( 967 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_tooHardWoodMsg ) ; // "This wood is too hard to break"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x4f32 : // use tree near the mansion
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_mansionTreeHollowEmptyFlag , 1 ) ) {
if ( CHECK_FLAG ( dsAddr_climbedMansionTreeAlreadyFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noChanceMsg ) ; // "I won't take my chances a second time"
2009-09-05 20:58:25 +00:00
} else {
playSound ( 26 , 13 ) ;
playSound ( 26 , 15 ) ;
playSound ( 26 , 23 ) ;
playSound ( 26 , 25 ) ;
playSound ( 26 , 32 ) ;
playSound ( 26 , 34 ) ;
playSound ( 26 , 36 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 590 ) ;
2009-09-05 20:58:25 +00:00
moveTo ( 204 , 178 , 3 , true ) ;
playSound ( 59 , 1 ) ;
playSound ( 60 , 16 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 591 ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_oneSmallStepMsg ) ; // "One small step for man, one big pain in the head"
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_climbedMansionTreeAlreadyFlag , 1 ) ;
2012-07-26 05:06:44 +00:00
fnMansionIntrusionAttempt ( ) ;
2009-09-05 20:58:25 +00:00
}
2009-09-03 20:59:17 +00:00
} else {
2009-09-09 20:42:44 +00:00
playActorAnimation ( 49 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 56 , 8 ) ;
playSound ( 56 , 12 ) ;
playSound ( 49 , 10 ) ;
2012-07-22 03:55:46 +00:00
displayAsyncMessage ( dsAddr_laughterMsg , 219 , 98 , 16 , 24 ) ; // "(laughter)"
2009-09-09 20:42:44 +00:00
playActorAnimation ( 587 ) ;
2010-02-02 08:12:45 +00:00
moveRel ( 0 , 0 , 2 ) ;
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_tickledMsg ) ; // "Something tickled me!"
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x500d : // picking up wild plant
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_gotPotatoAlreadyFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noPotatoMsg ) ; // "There are no more potatoes"
2009-09-03 20:59:17 +00:00
} else {
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_gotPotatoAlreadyFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 2 , 0 ) ;
2009-11-08 21:59:26 +00:00
playSound ( 21 , 9 ) ;
playSound ( 34 , 21 ) ;
playSound ( 26 , 30 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 552 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 2 , 0x12 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemPotato ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 10:02:31 +00:00
case 0x505f :
displayMessage ( dsAddr_wallTooSmoothMsg ) ; // "The wall surface is too smooth to climb"
break ;
2012-07-31 12:17:56 +00:00
case 0x5066 :
loadScene ( 11 , Common : : Point ( 183 , 109 ) ) ;
scene - > setOrientation ( 3 ) ;
break ;
2012-07-29 10:02:31 +00:00
case 0x5080 :
loadScene ( 13 , Common : : Point ( 290 , 181 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
case 0x50f6 :
displayMessage ( dsAddr_tooMuchResinToClimbMsg ) ; // "I could climb it if there wasn't so much resin"
break ;
2012-07-30 13:22:24 +00:00
case 0x50fd :
displayMessage ( dsAddr_onlyGreenRectMsg ) ; // "The only green stuff that I like is that rectangular piece of paper with..."
break ;
2009-09-03 20:59:17 +00:00
case 0x5104 :
2009-11-09 07:58:27 +00:00
loadScene ( 11 , 319 , 198 , 4 ) ;
2012-08-01 18:26:46 +00:00
if ( ! CHECK_FLAG ( dsAddr_scaredGuardAlreadyFlag , 1 ) ) {
2012-07-11 23:01:26 +00:00
// guard is drinking
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 3 ) ;
2012-07-28 08:44:16 +00:00
setTimerCallback ( csAddr_guardScareTimeout , 40 ) ;
2012-07-11 23:01:26 +00:00
playAnimation ( 544 , 0 , true , true ) ; // ignore busy flag for this animation
}
break ;
2010-01-25 01:39:44 +00:00
2012-07-28 08:44:16 +00:00
case csAddr_guardScareTimeout : // too late to scare guard, resetting
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 0 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-11-08 23:32:01 +00:00
2012-07-16 23:04:27 +00:00
case csAddr_guardDrinking :
2012-07-22 23:50:19 +00:00
fnGuardDrinking ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-31 14:08:32 +00:00
case 0x51c8 :
displayMessage ( dsAddr_wallTooSmoothMsg ) ; // "The wall surface is too smooth to climb"
break ;
2012-07-29 10:02:31 +00:00
case 0x51cf :
loadScene ( 12 , Common : : Point ( 15 , 189 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
case 0x51e9 :
displayMessage ( dsAddr_dontWannaTouchHedgehogMsg ) ; // "I don't wanna touch it. Its spines could hurt my delicate hands"
break ;
2009-09-05 17:15:28 +00:00
case 0x51f0 :
setOns ( 0 , 0 ) ;
playSound ( 5 , 11 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 637 ) ;
2009-09-05 17:15:28 +00:00
disableObject ( 7 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemRock ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x5217 :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_beesGoneFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_notHungryMsg ) ; // "Thanks, I'm not hungry"
else
displayMessage ( dsAddr_avoidBeesMsg ) ; // "I'm going to stay at least five meters away from these bees!"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 10:02:31 +00:00
case 0x522c :
displayMessage ( dsAddr_avoidBeesMsg ) ; // "I'm going to stay at least five meters away from these bees!"
break ;
case 0x5233 :
rejectMessage ( ) ;
break ;
2009-09-03 20:59:17 +00:00
case 0x5237 :
2012-08-01 18:26:46 +00:00
if ( ! CHECK_FLAG ( dsAddr_beesGoneFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_avoidBeesMsg ) ; // "I'm going to stay at least five meters away from these bees!"
2012-08-01 18:26:46 +00:00
} else if ( CHECK_FLAG ( dsAddr_mansionTunnelDoneFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_roadNowhereMsg ) ; // "Nah. It's a road to nowhere"
2009-09-03 20:59:17 +00:00
else {
2009-09-05 15:04:37 +00:00
moveTo ( 173 , 138 , 2 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 28 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 583 ) ;
playActorAnimation ( 584 ) ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
loadScene ( 0 , 0 , 0 , 0 ) ; // clear background
2009-09-15 08:54:06 +00:00
2009-09-05 20:58:25 +00:00
playSound ( 72 , 18 ) ;
playSound ( 73 , 39 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 585 ) ;
2009-09-15 08:54:06 +00:00
2009-09-05 15:04:37 +00:00
loadScene ( 11 , 194 , 160 , 2 ) ;
playSound ( 28 , 2 ) ;
2009-11-09 21:34:01 +00:00
playActorAnimation ( 586 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 138 , 163 , 3 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_lifeBrutalMsg ) ; // "Life is really brutal"
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_mansionTunnelDoneFlag , 1 ) ;
2012-07-26 05:06:44 +00:00
fnMansionIntrusionAttempt ( ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 10:02:31 +00:00
case 0x5320 :
loadScene ( 11 , Common : : Point ( 30 , 124 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
2012-07-29 13:02:43 +00:00
case 0x533a :
displayMessage ( dsAddr_noLongHandsMsg ) ; // "I really don't have such long hands"
break ;
2012-07-29 10:02:31 +00:00
case 0x5341 :
displayMessage ( dsAddr_tooFarToSwimMsg ) ; // "It's too far to swim there"
break ;
2012-07-29 13:02:43 +00:00
case 0x5403 :
displayMessage ( dsAddr_noBucketMsg ) ; // "It's not a barrel-organ. And there's no bucket."
break ;
2012-07-29 10:02:31 +00:00
case 0x540a :
loadScene ( 20 , Common : : Point ( 10 , 185 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
case 0x5424 :
loadScene ( 11 , Common : : Point ( 30 , 170 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
2012-07-29 13:02:43 +00:00
case 0x543e :
loadScene ( 18 , Common : : Point ( 224 , 199 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
case 0x5547 :
loadScene ( 15 , Common : : Point ( 15 , 172 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
2012-07-12 20:03:47 +00:00
case 0x55a8 :
{
2012-08-05 20:47:38 +00:00
uint16 d = dialog - > popMark ( scene , dsAddr_dialogStackSquirrel ) ;
if ( d = = 0x2c5d ) { // 4th try - Throw Nut
2012-07-12 20:03:47 +00:00
waitLanAnimationFrame ( 1 , 0x23 ) ;
setOns ( 0 , 0 ) ;
playSound ( 52 , 9 ) ;
playSound ( 52 , 11 ) ;
playSound ( 52 , 13 ) ;
playSound ( 53 , 32 ) ;
playAnimation ( 570 , 0 ) ;
wait ( 50 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_ThanksMsg ) ; // "Thanks."
2012-07-12 20:03:47 +00:00
disableObject ( 5 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_squirrelNutState , 1 ) ;
2012-08-05 20:47:38 +00:00
} else if ( d ! = 0x2c9b ) { // 5th (last) try
2012-07-12 20:03:47 +00:00
waitLanAnimationFrame ( 1 , 0x23 ) ;
playSound ( 52 , 9 ) ;
playSound ( 52 , 11 ) ;
playSound ( 52 , 13 ) ;
playAnimation ( 569 , 0 ) ;
}
2009-09-15 08:54:06 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x5663 :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_squirrelNutState , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_findNutMsg ) ; // "I won't find the nut just like that. The grass is too dense"
else
displayMessage ( dsAddr_hmmGrassMsg ) ; // "Hmmm. Grass..."
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-29 13:02:43 +00:00
case 0x5674 :
loadScene ( 18 , Common : : Point ( 94 , 115 ) ) ;
scene - > setOrientation ( 3 ) ;
break ;
2012-07-31 12:17:56 +00:00
case 0x568e :
displayMessage ( dsAddr_notHornyMsg ) ; // "I'm not horny"
break ;
2012-07-29 13:02:43 +00:00
case 0x5695 :
displayMessage ( dsAddr_dontNeedToOpenMsg ) ; // "I don't need to open it"
break ;
2009-09-03 20:59:17 +00:00
case 0x569c :
2009-09-05 20:58:25 +00:00
playSound ( 67 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 983 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_emptyMsg ) ; // "It's Empty"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 23:10:57 +00:00
case 0x56b3 :
rejectMessage ( ) ;
break ;
2009-09-03 20:59:17 +00:00
case 0x56b7 :
2009-09-05 20:58:25 +00:00
playSound ( 66 , 5 ) ;
playSound ( 67 , 11 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 984 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_emptyMsg ) ; // "It's Empty"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 13:02:43 +00:00
case 0x56d6 :
displayMessage ( dsAddr_CantJumpMsg ) ; // "No way I can jump so high, cause, err, white men can't jump"
break ;
case 0x56dd :
displayMessage ( dsAddr_dontNeedItMsg ) ; // "I don't need it"
break ;
case 0x56e4 :
displayMessage ( dsAddr_notSantaClausMsg ) ; // "I'm not Santa Claus"
break ;
case 0x56eb :
displayMessage ( dsAddr_noPlasticImitationsMsg ) ; // "I don't need plastic imitations"
break ;
case 0x56f2 :
rejectMessage ( ) ;
break ;
case 0x5721 :
displayMessage ( dsAddr_dontNeedItMsg ) ; // "I don't need it"
break ;
2009-09-03 20:59:17 +00:00
case 0x5728 :
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemChainsaw ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 14 ) ;
setOns ( 0 , 0 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 10 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 566 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 13:02:43 +00:00
case 0x574f :
displayMessage ( dsAddr_tooFragileMsg ) ; // "It's too fragile to carry around"
break ;
2009-09-03 20:59:17 +00:00
case 0x5793 :
2012-08-01 18:26:46 +00:00
if ( ! CHECK_FLAG ( dsAddr_alreadyPulledTrunkReleaseLeverFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_shutTightMsg ) ; // "It's shut tight"
2012-08-01 18:26:46 +00:00
} else if ( CHECK_FLAG ( dsAddr_carTrunkEmptyFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_bootEmptyMsg ) ; // "There's nothing else in the boot"
2009-09-03 20:59:17 +00:00
} else {
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_carTrunkEmptyFlag , 1 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 188 , 179 , 0 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 7 , 16 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 519 ) ;
2010-02-02 08:12:45 +00:00
wait ( 150 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 168 , 179 , 2 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemToolboxFull ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 13:02:43 +00:00
case 0x57fa :
displayMessage ( dsAddr_dontNeedItMsg ) ; // "I don't need it"
break ;
2012-07-31 12:17:56 +00:00
case 0x5801 :
rejectMessage ( ) ;
break ;
case 0x583f :
case 0x5846 :
displayMessage ( dsAddr_dontNeedToOpenMsg ) ;
break ;
2012-07-29 10:02:31 +00:00
case 0x584d :
displayMessage ( dsAddr_pullObjMsg2 ) ;
break ;
2012-07-29 23:10:57 +00:00
case 0x5854 :
loadScene ( 15 , Common : : Point ( 157 , 199 ) ) ;
scene - > setOrientation ( 1 ) ;
break ;
2012-07-29 10:02:31 +00:00
case 0x586e :
loadScene ( 21 , Common : : Point ( 24 , 187 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
case 0x5888 :
loadScene ( 27 , Common : : Point ( 108 , 199 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
2012-07-31 12:17:56 +00:00
case 0x5903 :
displayMessage ( dsAddr_keepItOpenMsg ) ; // "I'd like to keep it open"
break ;
2012-07-29 23:10:57 +00:00
case 0x590a :
loadScene ( 20 , Common : : Point ( 304 , 190 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
2012-07-29 10:02:31 +00:00
case 0x5924 :
loadScene ( 25 , Common : : Point ( 298 , 146 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
case 0x5978 :
displayMessage ( dsAddr_notTakingSocksMsg ) ; // "I really don't want to walk around with someone else's socks"
break ;
2012-07-31 12:17:56 +00:00
case 0x597f :
case 0x5986 :
case 0x598d :
displayMessage ( dsAddr_dontNeedToOpenMsg ) ; // "I don't need to open it"
break ;
2012-08-02 07:44:14 +00:00
case 0x5b44 :
// FIXME - This is the doorbell use callback on House #2
// i.e. Granny and Anne's House. Need to analyse cseg data properly.
// Current code inferred from behaviour.
// FIXME - Add animation call for Ego pushing doorbell.
displayMessage ( dsAddr_ItsOpenMsg ) ;
break ;
2012-07-29 13:02:43 +00:00
case 0x5c72 :
displayMessage ( dsAddr_notTiredMsg ) ; // "Thanks, I'm not tired"
break ;
case 0x5c79 :
displayMessage ( dsAddr_dontNeedToOpenMsg ) ; // "I don't need to open it"
break ;
case 0x5c80 :
rejectMessage ( ) ;
break ;
case 0x5cdb :
case 0x5ce2 :
displayMessage ( dsAddr_dontNeedItMsg ) ; // "I don't need it"
break ;
case 0x5ce9 :
displayMessage ( dsAddr_tooBigMsg ) ; // "It's too big and I doubt if I'll ever need it"
break ;
case 0x5d1d :
displayMessage ( dsAddr_CantJumpMsg ) ; // "No way I can jump so high, cause, err, white men can't jump"
break ;
2009-09-03 20:59:17 +00:00
case 0x5d88 :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_laundryState , 1 ) ) { // dry laundry
SET_FLAG ( dsAddr_laundryState , 2 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 46 , scene , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
2012-07-12 20:03:47 +00:00
//waitLanAnimationFrame(1, 1); // another long waiting
2009-11-08 21:59:26 +00:00
playAnimation ( 604 , 0 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 21 , scene - > getPosition ( ) ) ;
setOns ( 0 , 0 ) ;
disableObject ( 4 ) ;
enableObject ( 12 ) ;
2009-11-08 21:59:26 +00:00
playSound ( 46 , 5 ) ;
2009-09-03 20:59:17 +00:00
playAnimation ( 606 , 1 ) ;
2009-11-08 21:59:26 +00:00
setOns ( 0 , 33 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 23 , scene - > getPosition ( ) ) ;
2009-11-08 21:59:26 +00:00
playAnimation ( 605 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 47 , scene , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
} else {
2012-08-05 20:47:38 +00:00
uint16 d = dialog - > pop ( scene , dsAddr_dialogStackAskOldLadyOK , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
if ( d = = 0x1913 ) { // 3rd time
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
moveRel ( 0 , 0 , 3 ) ;
wait ( 50 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_giveUpMsg ) ; // "I give up"
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
}
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-08-06 17:37:16 +00:00
case 0x5f9a :
2012-07-29 13:02:43 +00:00
case 0x5fa1 :
displayMessage ( dsAddr_dontNeedToOpenMsg ) ; // "I don't need to open it"
break ;
case 0x5fa8 :
displayMessage ( dsAddr_CantJumpMsg ) ; // "No way I can jump so high, cause, err, white men can't jump"
break ;
2012-07-29 23:10:57 +00:00
case 0x5faf :
displayMessage ( dsAddr_noSecretPassageMsg ) ; // "I don't think there's any secret passage inside"
break ;
2012-07-29 13:02:43 +00:00
case 0x5fe5 :
displayMessage ( dsAddr_jugMeMsg ) ; // "They can jug me if I steal this"
break ;
case 0x5fec :
displayMessage ( dsAddr_leaveFlowersAloneMsg ) ; // "I'd better leave it. Women are really oversensitive about flowers."
break ;
2012-07-11 23:01:26 +00:00
case 0x5ff3 : // get duster
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_givenFlowerToOldLadyAlreadyFlag , 0 ) ) {
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackBorrowDusterFromOldLady , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
} else {
2012-08-03 15:28:58 +00:00
dialog - > show ( 43 , scene , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemFeatherDusterClean ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 12 ) ;
setOns ( 0 , 0 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 6 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 541 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2012-07-29 13:02:43 +00:00
case 0x603a :
rejectMessage ( ) ;
break ;
2009-11-08 19:10:24 +00:00
case 0x603e :
2012-08-01 07:24:40 +00:00
if ( CHECK_FLAG ( dsAddr_spokenToMirrorFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_busyThinkingMsg ) ; // "I'd better not interrupt it's thought process"
2009-11-08 19:10:24 +00:00
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_mirrorMirrorMsg ) ; // "Mirror, Mirror on the wall...."
2010-02-02 08:12:45 +00:00
wait ( 150 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_thinkTooLongMsg ) ; // "Hey, don't think too long"
2010-02-02 08:12:45 +00:00
wait ( 150 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_HintMaleMsg ) ; // "A hint: Someone in this room, a male"
2010-02-02 08:12:45 +00:00
wait ( 150 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_okWaitMsg ) ; // "OK, take your time"
2010-02-02 08:12:45 +00:00
wait ( 150 ) ;
2012-08-01 07:24:40 +00:00
SET_FLAG ( dsAddr_spokenToMirrorFlag , 1 ) ;
2009-11-08 19:10:24 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 17:15:28 +00:00
2012-07-29 23:10:57 +00:00
case 0x6074 :
rejectMessage ( ) ;
break ;
2012-07-29 13:02:43 +00:00
case 0x6078 :
displayMessage ( dsAddr_tooBigMsg ) ; // "It's too big and I doubt if I'll ever need it"
break ;
2009-09-05 17:15:28 +00:00
case 0x6205 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_tooHeavyMsg ) ; // "It's too heavy. Not that I'm wimp"
2009-09-15 08:54:06 +00:00
else
2012-07-26 05:06:44 +00:00
fnTooDark ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 17:15:28 +00:00
case 0x6217 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noDentistsMsg ) ; // "I don't want to have anything in common with dentists"
2009-09-15 08:54:06 +00:00
else
2012-07-26 05:06:44 +00:00
fnTooDark ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 17:15:28 +00:00
case 0x62c1 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) )
2012-07-11 23:01:26 +00:00
retVal = false ;
else
2012-07-26 05:06:44 +00:00
fnTooDark ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 10:02:31 +00:00
case 0x634a :
displayMessage ( dsAddr_noHandsSharpThornsMsg ) ; // "I can't remove it with my hands. these thorns look really sharp"
break ;
2012-07-29 13:02:43 +00:00
case 0x637f :
loadScene ( 21 , Common : : Point ( 201 , 199 ) ) ;
scene - > setOrientation ( 1 ) ;
break ;
case 0x6399 :
displayMessage ( dsAddr_rockWalkingGeeMsg ) ; // "Yeah, great idea. Let's take this rock and walk around a bit. Gee..."
break ;
2012-07-31 12:17:56 +00:00
case 0x63a0 :
case 0x63a7 :
displayMessage ( dsAddr_butterflyMsg ) ; // "I'd better leave them alone, they make this place beautiful"
break ;
2012-07-29 23:10:57 +00:00
case 0x63ae :
displayMessage ( dsAddr_notSureIfAliveMsg ) ; // "I'm not sure if it's alive"
break ;
2009-09-05 20:58:25 +00:00
case 0x63bc :
playMusic ( 6 ) ;
loadScene ( 25 , 151 , 156 , 2 ) ;
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2009-11-18 08:32:41 +00:00
case 0x63dc :
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 86 , scene , 0 , textColorMark , 0 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 23:10:57 +00:00
case 0x63e3 :
displayMessage ( dsAddr_holeTooNarrowMsg ) ; // "The hole is too narrow to fit my hand"
break ;
2009-09-03 20:59:17 +00:00
case 0x646e :
case 0x6475 :
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 85 , scene , 0 , textColorMark , 0 ) ;
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2009-11-18 08:32:41 +00:00
case 0x6479 :
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 84 , scene , 0 , textColorMark , 0 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x6507 :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_birdsGoneFromScarecrowFlag , 1 ) )
2009-09-03 20:59:17 +00:00
rejectMessage ( ) ;
2012-07-11 23:01:26 +00:00
else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_birdAttackMsg ) ; // "Hey You! Wake up! Bird attack!"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 10:02:31 +00:00
case 0x6541 :
loadScene ( 20 , Common : : Point ( 10 , 131 ) ) ;
scene - > setOrientation ( 3 ) ;
break ;
2012-07-31 12:17:56 +00:00
case 0x6635 :
displayMessage ( dsAddr_uninterestingHaystackMsg ) ; // "I don't see anything interesting about this haystack"
break ;
case 0x666a :
displayMessage ( dsAddr_moreComplicatedMsg ) ; // "It's more complicated than that"
break ;
2009-09-15 08:54:06 +00:00
case 0x65c3 :
2012-07-28 09:57:26 +00:00
if ( CHECK_FLAG ( dsAddr_mouseHoleState , 1 ) ) {
2009-09-09 20:42:44 +00:00
playActorAnimation ( 635 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 5 , 0 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 63 , 11 ) ;
playSound ( 15 , 20 ) ;
playSound ( 32 , 31 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 636 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemHandkerchief ) ;
inventory - > add ( kInvItemMouse ) ;
2009-09-05 20:58:25 +00:00
moveTo ( scene - > getPosition ( ) . x - 1 , 139 , 1 , true ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_yikesMsg ) ; // "Yikes!"
2012-07-28 09:57:26 +00:00
SET_FLAG ( dsAddr_mouseHoleState , 2 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_HankerchiefInMouseholeFlag , 0 ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noSearchWarrantMsg ) ; // "I don't have a search-warrant"
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-30 13:22:24 +00:00
case 0x6671 :
displayMessage ( dsAddr_cantOpenItMsg ) ; // "I can't open it"
break ;
case 0x6678 :
rejectMessage ( ) ;
break ;
case 0x670f :
displayMessage ( dsAddr_dontNeedThemMsg ) ; // "I don't need them"
break ;
case 0x6716 :
displayMessage ( dsAddr_pullObjMsg2 ) ; // "I can't reach it"
break ;
case 0x6772 :
loadScene ( 31 , Common : : Point ( 20 , 188 ) ) ;
scene - > setOrientation ( 2 ) ;
break ;
2012-07-31 00:21:34 +00:00
case 0x678c :
loadScene ( 28 , Common : : Point ( 189 , 153 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
case 0x67fa :
rejectMessage ( ) ;
break ;
case 0x67fe :
displayMessage ( dsAddr_troubleWithStairsMsg ) ; // "If I put it on I might have trouble walking up the stairs"
break ;
case 0x6911 :
displayMessage ( dsAddr_9LivesToReadMsg ) ; // "I'd need 9 lives to read them all"
break ;
case 0x6954 :
displayMessage ( dsAddr_thanksNotTiredMsg ) ; // "Thanks, I'm not so tired"
break ;
case 0x695b :
displayMessage ( dsAddr_noNeedToTurnOnMsg ) ; // "There's no need to turn it on"
break ;
case 0x6ba6 :
displayMessage ( dsAddr_wontBearWeightMsg ) ; // "It won't bear my weight"
break ;
case 0x6bda :
displayMessage ( dsAddr_peepingTomMsg ) ; // "What am I? A Peeping Tom?"
break ;
2012-07-30 13:22:24 +00:00
case 0x6c1c :
case 0x6c20 :
rejectMessage ( ) ;
break ;
case 0x6c24 :
displayMessage ( dsAddr_dontNeedThemMsg ) ; // "I don't need them"
break ;
case 0x6c2b :
loadScene ( 29 , Common : : Point ( 300 , 188 ) ) ;
scene - > setOrientation ( 4 ) ;
break ;
case 0x6c7c :
displayMessage ( dsAddr_bigPocketsMsg ) ; // "I have big pockets, but there are limits"
break ;
case 0x724e :
displayMessage ( dsAddr_soSharpMsg ) ; // "They're so sharp they'd rip my trousers!"
break ;
case 0x72be :
rejectMessage ( ) ;
break ;
case 0x7305 :
rejectMessage ( ) ;
break ;
case 0x7328 :
displayMessage ( dsAddr_noTimeForPleasuresMsg ) ; // "I don't have time for pleasures"
break ;
case 0x732f :
displayMessage ( dsAddr_notSocksWithBareHandsMsg ) ; // "I won't touch these socks with my bare hands!"
break ;
case 0x739c :
displayMessage ( dsAddr_notHalloweenMsg ) ; // "It's not Halloween"
break ;
2012-07-31 00:21:34 +00:00
case 0x7401 :
displayMessage ( dsAddr_NotManualMsg ) ; // "It can't be controlled manually! I hate it!"
break ;
2012-07-30 13:22:24 +00:00
case 0x746f :
displayMessage ( dsAddr_nothingToPlayMsg ) ; // "I have nothing to play"
break ;
case 0x74b3 :
loadScene ( 29 , Common : : Point ( 256 , 171 ) ) ;
scene - > setOrientation ( 3 ) ;
break ;
case 0x74cd :
rejectMessage ( ) ;
break ;
2012-07-31 00:21:34 +00:00
case 0x74f9 :
loadScene ( 38 , Common : : Point ( 160 , 199 ) ) ;
scene - > setOrientation ( 1 ) ;
break ;
case 0x784a :
displayMessage ( dsAddr_notMineMsg ) ; // "I can't take it. It's not mine."
break ;
2012-07-31 12:17:56 +00:00
case 0x7851 :
displayMessage ( dsAddr_lockedMsg ) ; // "It's Locked!"
break ;
2012-07-31 00:21:34 +00:00
case 0x7858 :
displayMessage ( dsAddr_lockedMsg ) ; // "It's Locked!"
break ;
2012-07-31 12:17:56 +00:00
case 0x785f :
displayMessage ( dsAddr_pullObjMsg2 ) ; // "I can't reach it"
break ;
2009-09-03 20:59:17 +00:00
case 0x7866 :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_JailCableAndBowlState , 3 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_gotchaMsg ) ; // "Gotcha"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x7878 :
{
2012-07-28 09:57:26 +00:00
byte v = res - > dseg . get_byte ( dsAddr_graffitiMsgId ) + 1 ;
2012-07-11 23:01:26 +00:00
if ( v < = 6 )
2012-07-28 09:57:26 +00:00
SET_FLAG ( dsAddr_graffitiMsgId , v ) ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
switch ( v ) {
case 1 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_SavingFineMsg ) ; // "Saving is a very fine thing..."
2012-07-11 23:01:26 +00:00
break ;
case 2 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_loveCaptainMsg ) ; // "I love captain"
2012-07-11 23:01:26 +00:00
break ;
case 3 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_soccerRulzMsg ) ; // "Soccer rulz"
2012-07-11 23:01:26 +00:00
break ;
case 4 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_treeCutMsg ) ; // "Don't cut the trees..."
2012-07-11 23:01:26 +00:00
break ;
case 5 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_visaAcceptedMsg ) ; // "VISA Accepted"
2012-07-11 23:01:26 +00:00
break ;
default :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_otherGraffitiMsg ) ; // "The rest of graffiti is obscene"
2012-07-11 23:01:26 +00:00
break ;
}
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x78a9 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_captainDrawerState , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_nowOpenMsg ) ; // "Now it's open"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x78bb :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_swappedBarmanMugFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_yuckMsg ) ; // "Yuck!"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x78ce :
2012-08-01 18:26:46 +00:00
if ( ! CHECK_FLAG ( dsAddr_mansionTreeHollowEmptyFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_monstersMsg ) ; // "Who knows what monsters live in there"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x792b : // left click on ann
2009-09-03 20:59:17 +00:00
moveTo ( 245 , 198 , 1 ) ;
2012-08-01 18:26:46 +00:00
if ( ! CHECK_FLAG ( dsAddr_alreadySaidAnneBeautifulFlag , 1 ) ) {
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 50 , scene , 0 , textColorMark , 0 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_alreadySaidAnneBeautifulFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
} else
retVal = false ;
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 17:15:28 +00:00
case 0x79c3 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) )
2012-07-11 23:01:26 +00:00
retVal = false ;
else
2012-07-26 05:06:44 +00:00
fnTooDark ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x7b26 : // cutting the fence
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
playSound ( 5 , 2 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 51 , 11 ) ;
playSound ( 51 , 23 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 837 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 51 , 3 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 51 , 19 ) ;
playSound ( 23 , 26 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 838 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0x60 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 281 , scene - > getPosition ( ) . y , 0 , true ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 4 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_cutFenceFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x7b89 : // digging mysterious object
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_cutFenceFlag , 1 ) ) {
2009-09-09 20:42:44 +00:00
playActorAnimation ( 844 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0 ) ;
playSound ( 5 , 5 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 26 , 19 ) ;
playSound ( 24 , 25 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 847 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 5 , 11 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 848 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0x64 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 845 ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 3 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemKaleidoscope ) ;
inventory - > remove ( kInvItemShovelAct1 ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_fenceBlocksMsg ) ; // "The fence blocks the way"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-31 12:17:56 +00:00
case 0x7bf6 :
displayMessage ( dsAddr_noDiggingKnifeMsg ) ; // "Digging it out with the knife could take a hundred years"
break ;
2009-09-03 20:59:17 +00:00
case 0x7bfd :
playSound ( 76 , 18 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 76 , 22 ) ;
playSound ( 76 , 26 ) ;
playSound ( 76 , 30 ) ;
playSound ( 76 , 34 ) ;
playSound ( 76 , 47 ) ;
playSound ( 76 , 51 ) ;
playSound ( 76 , 55 ) ;
playSound ( 76 , 59 ) ;
playSound ( 76 , 63 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 873 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 240 , 163 , 4 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_cmonBabyMsg ) ; // "C'mon baby, it's all yours!"
2009-11-07 12:01:45 +00:00
waitLanAnimationFrame ( 1 , 0x22 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 77 , 2 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 77 , 12 ) ;
playSound ( 77 , 16 ) ;
playSound ( 77 , 20 ) ;
playSound ( 77 , 34 ) ;
playSound ( 78 , 41 ) ;
playSound ( 78 , 51 ) ;
playSound ( 56 , 63 ) ;
playSound ( 24 , 67 ) ;
playSound ( 23 , 76 ) ;
2009-09-03 20:59:17 +00:00
setLan ( 1 , 0 ) ;
playAnimation ( 874 , 1 ) ;
setOns ( 0 , 0x68 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemDruggedFood ) ;
2009-09-03 20:59:17 +00:00
enableObject ( 6 ) ;
disableObject ( 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 06:59:51 +00:00
case 0x7cc9 :
2012-07-31 12:17:56 +00:00
case 0x7cd0 :
2012-07-29 06:59:51 +00:00
displayMessage ( dsAddr_throwCrumbsToBirdQMsg ) ; // "Should I throw the crumbs to the bird?"
break ;
2012-07-31 13:40:47 +00:00
case 0x7cd7 :
displayMessage ( dsAddr_dontWasteCrumbs ) ; // "I don't want to waste these tasty crumbs"
break ;
case 0x7cde :
displayMessage ( dsAddr_mightSlipFallInMsg ) ; // "Better not... I might slip and fall in..."
break ;
2012-07-11 23:01:26 +00:00
case 0x7ce5 : // put spring on the solid ground
2009-09-03 20:59:17 +00:00
playSound ( 5 , 2 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 19 , 11 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 840 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0x61 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemSpring ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 2 ) ;
enableObject ( 7 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x7d1a : // captain's key + door
2012-08-01 13:44:51 +00:00
if ( res - > dseg . get_byte ( dsAddr_FirstActTrialState ) < = 1 ) {
2009-09-03 20:59:17 +00:00
playSound ( 5 , 2 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 57 , 12 ) ;
playSound ( 70 , 19 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 828 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 262 , 160 , 1 , true ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 4 ) ;
disableObject ( 3 ) ;
setOns ( 0 , 0 ) ;
setOns ( 1 , 85 ) ;
setOns ( 2 , 0 ) ;
setOns ( 3 , 0 ) ;
loadScene ( 5 , scene - > getPosition ( ) ) ;
setOns ( 0 , 92 ) ;
2010-02-02 08:12:45 +00:00
playAnimation ( 829 , 1 , true , true , true ) ;
wait ( 200 ) ;
playAnimation ( 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 156 , scene , 830 , textColorShockedCaptain , 1 ) ;
2010-02-02 08:12:45 +00:00
loadScene ( 7 , 130 , 195 , 2 ) ;
2009-09-03 20:59:17 +00:00
playMusic ( 4 ) ;
setLan ( 1 , 1 ) ;
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 157 , scene , 0 , 832 , textColorMark , textColorCaptain , 0 , 1 ) ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
//playAnimation(831, 1);
2009-09-15 08:54:06 +00:00
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_FirstActTrialState , 2 ) ;
2009-09-03 20:59:17 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_nahMsg ) ; // "Nah"
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x7e02 : // tickling the captain
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_AlreadyTickledCaptainFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_doesNotWorkMsg ) ; // "That doesn't work"
2009-09-03 20:59:17 +00:00
} else {
playSound ( 5 , 6 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 27 , 49 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 834 , true ) ;
2009-09-03 20:59:17 +00:00
playAnimation ( 835 , 1 , true ) ;
waitAnimation ( ) ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
setOns ( 0 , 94 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 161 , scene , 0 , 832 , textColorMark , textColorCaptain , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
enableObject ( 12 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_AlreadyTickledCaptainFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x7e4f : // giving magazine to captain
2012-08-03 15:28:58 +00:00
dialog - > show ( 162 , scene , 0 , 856 , textColorMark , textColorCaptain , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 5 , 3 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 852 , true ) ;
playActorAnimation ( 853 , true ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_whatAboutMsg ) ; // "What about a new"
displayMessage ( dsAddr_hotOffMsg ) ; // "hot off the press"
displayMessage ( dsAddr_fullColorMsg ) ; // "full-color"
displayMessage ( dsAddr_specialEdMsg ) ; // "special edition"
displayMessage ( dsAddr_soldierNewsMsg ) ; // "of Soldier News?!"
2009-09-03 20:59:17 +00:00
playAnimation ( 856 , 1 ) ;
playSound ( 5 , 3 ) ;
2009-09-09 20:42:44 +00:00
//playActorAnimation(854);
2012-08-03 15:28:58 +00:00
dialog - > show ( 163 , scene , 0 , 856 , textColorMark , textColorCaptain , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
playAnimation ( 855 , 1 ) ;
2010-02-02 08:12:45 +00:00
wait ( 200 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 30 , 181 , 0 ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 1 ) ;
setLan ( 1 , 0 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_FirstActTrialState , 3 ) ;
SET_FLAG ( dsAddr_gotPasswordNeedSpeakBarmanFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 8 , 155 , 199 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x7fbd : // using bird & bartender
2009-09-03 20:59:17 +00:00
playSound ( 5 , 3 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 876 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 26 , 7 ) ;
playSound ( 79 , 15 ) ;
playAnimation ( 877 , 1 ) ;
playAnimation ( 880 , 1 , true ) ;
2009-09-15 08:54:06 +00:00
2012-08-03 15:28:58 +00:00
dialog - > show ( 176 , scene , 0 , 857 , textColorMark , textColorBarman , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 2 , 0x6a ) ;
reloadLan ( ) ;
2009-09-15 22:35:19 +00:00
playAnimation ( 878 , 0 ) ;
2012-07-11 23:01:26 +00:00
//playAnimation(879, 0); // background bartender animation
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemBird ) ;
2009-09-03 20:59:17 +00:00
enableObject ( 1 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_birdOnBarRadioAntennaFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x8047 :
playSound ( 32 , 5 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 5 , 17 ) ;
playSound ( 52 , 23 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 881 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 2 , 0x6b ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemMugOfMud ) ;
inventory - > add ( kInvItemMug ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_swappedBarmanMugFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2009-09-15 08:54:06 +00:00
case 0x808b :
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_ShownPassToGuardFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_gotPermissionMsg ) ; // "I already got the permission"
2009-09-03 20:59:17 +00:00
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_showPapersMsg ) ; // "Here are my papers"
2009-09-05 17:15:28 +00:00
playSound ( 5 , 2 ) ;
playSound ( 5 , 18 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 810 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 147 , scene , 0 , 809 , textColorMark , textColorCampGuard , 0 , 1 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_ShownPassToGuardFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x80c3 : // show kaleidoscope to the guard
2012-08-03 15:28:58 +00:00
dialog - > show ( 165 , scene , 0 , 809 , textColorMark , textColorCampGuard , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 5 , 3 ) ;
2009-09-15 22:35:19 +00:00
playSound ( 5 , 30 ) ;
playSound ( 26 , 14 ) ;
hideActor ( ) ;
playAnimation ( 849 , 0 ) ;
showActor ( ) ;
playAnimation ( 851 , 0 ) ;
playAnimation ( 850 , 0 ) ;
2009-09-03 20:59:17 +00:00
reloadLan ( ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemSoldierNews ) ;
inventory - > remove ( kInvItemKaleidoscope ) ;
2009-09-03 20:59:17 +00:00
enableObject ( 1 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_act1GuardState , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-30 13:22:24 +00:00
case 0x8398 :
displayMessage ( dsAddr_trySomewhereElseMsg ) ; // "I'd better try somewhere else - I suppose this side is heavily guarded"
break ;
2012-07-31 12:17:56 +00:00
case 0x85dd :
displayMessage ( dsAddr_branchNotPaddleMsg ) ; // "This branch is not a paddle. It doesn't even look like one"
break ;
case 0x85e4 :
displayMessage ( dsAddr_sharpenNotPulverizeMsg ) ; // "I needed to sharpen it, not pulverize"
break ;
case 0x8d42 :
displayMessage ( dsAddr_bluntSickleMsg ) ; // "The sickle is too blunt"
break ;
case 0x8d49 :
displayMessage ( dsAddr_noChainsawFuelMsg ) ; // "There's no fuel in the chainsaw"
break ;
case 0x8d50 :
displayMessage ( dsAddr_thornsTooThinMsg ) ; // "Thorns are too thin, the chainsaw is useless here"
break ;
2012-07-11 23:01:26 +00:00
// Shore
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x5348 :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_alreadyGotBrokenPaddleFlag , 1 ) ) { // got broken paddle from boat
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_boatEmptyMsg ) ; // "There's nothing else in the boat"
2009-09-03 20:59:17 +00:00
} else {
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_alreadyGotBrokenPaddleFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 57 , 6 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 536 ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 77 , scene , 0 , textColorMark , 0 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemBrokenPaddle ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
case 0x53a1 :
2012-08-01 07:24:40 +00:00
if ( CHECK_FLAG ( dsAddr_spokenToManInWellFlag , 1 ) ) { // spoken to man in well
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_stillThereMsg ) ; // "Are you still there?"
2009-09-03 20:59:17 +00:00
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_echoMsg ) ; // "Echo!"
2012-08-03 15:28:58 +00:00
displayMessage ( dsAddr_loudEchoMsg , textColorWellEcho , 248 , 164 ) ; // "ECHO!"
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_whoThereMsg ) ; // "Who's there?!"
2012-08-03 15:28:58 +00:00
displayMessage ( dsAddr_loudWhoThereMsg , textColorWellEcho , 225 , 164 ) ; // "WHO'S THERE?!"
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_dontCopyMsg ) ; // "DON'T COPY ME!"
2012-08-03 15:28:58 +00:00
displayMessage ( dsAddr_loudDontCopyMsg , textColorWellEcho , 172 , 164 ) ; // "DON'T COPY ME!!!"
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_throwRockMsg ) ; // "OR I WILL THROW A ROCK DOWN THERE!"
2012-08-03 15:28:58 +00:00
displayMessage ( dsAddr_orIWillMsg , textColorWellEcho , 232 , 164 ) ; // "OR I WILL"
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-08-03 15:28:58 +00:00
displayMessage ( dsAddr_loudEchoMsg , textColorWellEcho , 248 , 164 ) ;
2012-08-01 07:24:40 +00:00
SET_FLAG ( dsAddr_spokenToManInWellFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x5458 :
{
setOns ( 2 , 0 ) ;
playSound ( 34 , 7 ) ;
playActorAnimation ( 535 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemSecondFlower ) ;
2012-07-11 23:01:26 +00:00
disableObject ( 1 ) ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
byte * scene_15_ons = scene - > getOns ( 15 ) ; // patch ons for the scene 15
scene_15_ons [ 0 ] = 0 ;
2009-09-15 08:54:06 +00:00
2012-08-01 18:26:46 +00:00
byte f = GET_FLAG ( dsAddr_flowerIsleState ) + 1 ;
SET_FLAG ( dsAddr_flowerIsleState , f ) ;
2012-07-11 23:01:26 +00:00
if ( f > = 2 ) {
// disable object boat for scene 15!!
disableObject ( 1 , 15 ) ;
}
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x54b3 :
{
setOns ( 1 , 0 ) ;
setOns ( 3 , 0 ) ;
playSound ( 33 , 6 ) ;
playActorAnimation ( 534 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemFirstFlower ) ;
2012-07-11 23:01:26 +00:00
disableObject ( 2 ) ;
setOns ( 1 , 10 ) ;
setOns ( 1 , 0 , 15 ) ;
2012-08-01 18:26:46 +00:00
byte f = GET_FLAG ( dsAddr_flowerIsleState ) + 1 ;
SET_FLAG ( dsAddr_flowerIsleState , f ) ;
2012-07-11 23:01:26 +00:00
if ( f > = 2 ) {
// disable object boat for scene 15!!
disableObject ( 1 , 15 ) ;
}
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x5502 :
setOns ( 0 , 0 ) ;
loadScene ( 15 , 115 , 180 , 1 ) ;
playMusic ( 6 ) ;
2010-03-21 07:38:09 +00:00
playActorAnimation ( 568 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x5561 : // Enter lakeside house
2012-07-26 05:06:44 +00:00
fnEgoDefaultPosition ( ) ;
2009-11-07 12:01:45 +00:00
loadScene ( 19 , 223 , 199 , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2009-11-15 09:51:54 +00:00
case 0x55a1 :
2012-07-26 05:06:44 +00:00
fnEgoDefaultPosition ( ) ;
2009-11-15 09:51:54 +00:00
rejectMessage ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_egoDefaultPosition :
2012-07-26 05:06:44 +00:00
fnEgoDefaultPosition ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x563b :
2009-09-05 20:58:25 +00:00
playSound ( 5 , 10 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 561 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemNut ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 6 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 20:58:25 +00:00
case 0x56f6 :
playSound ( 32 , 7 ) ;
setOns ( 1 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 626 ) ;
2009-09-05 20:58:25 +00:00
disableObject ( 12 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemCheese ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_foundFoodMsg ) ; // "People leave food in unbelievable places"
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x5756 : // Open car door
2009-09-03 20:59:17 +00:00
playSound ( 11 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 514 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 4 , 8 ) ;
setOns ( 2 , 5 ) ;
enableObject ( 14 ) ;
enableObject ( 15 ) ;
enableObject ( 16 ) ;
disableObject ( 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x5805 : // Enter basketball house
2009-09-03 20:59:17 +00:00
playSound ( 70 , 6 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 513 ) ;
2009-09-05 15:04:37 +00:00
loadScene ( 22 , 51 , 180 , 2 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x5832 : // Ring doorbell
2009-09-09 20:42:44 +00:00
playActorAnimation ( 509 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_outOfOrderMsg ) ; // "It's out of order"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x58a2 :
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackSonny , 0 , 502 , textColorMark , textColorSonny , 0 , 1 ) ;
2012-08-01 18:26:46 +00:00
scene - > getObject ( 13 ) - > setName ( ( const char * ) res - > dseg . ptr ( dsAddr_scnObjNameSonny ) ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x58b7 : // Get comb from car
2009-09-03 20:59:17 +00:00
disableObject ( 14 ) ;
2009-09-15 08:54:06 +00:00
setOns ( 4 , 0 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 5 , 7 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 521 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 4 , 0 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemComb ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x58df : // Pull trunk lever in car
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_alreadyPulledTrunkReleaseLeverFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 6 , 1 ) ;
setOns ( 3 , 6 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 515 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x593e : // Enter annes house
2009-09-05 15:04:37 +00:00
playSound ( 89 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 980 ) ;
2009-09-05 15:04:37 +00:00
loadScene ( 23 , 76 , 199 , 1 ) ;
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_lovestruckByAnneFlag , 1 ) )
2009-09-08 14:26:14 +00:00
playMusic ( 7 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x5994 :
2012-07-26 05:06:44 +00:00
fnEnterCave ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_caveNOP :
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_enterCave :
2012-07-26 05:06:44 +00:00
fnEnterCave ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
case 0x5a8b :
2012-08-01 13:44:51 +00:00
if ( ! CHECK_FLAG ( dsAddr_dogHasBoneFlag , 1 ) ) {
2012-07-11 23:01:26 +00:00
playSound ( 43 , 4 ) ; // grrrrrr
2010-01-25 01:39:44 +00:00
playSound ( 42 , 15 ) ;
playSound ( 42 , 17 ) ;
playSound ( 42 , 19 ) ;
2009-11-08 19:10:24 +00:00
playAnimation ( 656 , 0 ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_goodDoggyMsg ) ; // "I understand. Good doggy"
2012-08-01 18:26:46 +00:00
} else if ( ! CHECK_FLAG ( dsAddr_cellarDoorOpenFlag , 1 ) ) { // Dog has bone
2009-09-03 20:59:17 +00:00
playSound ( 28 , 3 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 596 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 30 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_cellarDoorOpenFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
enableObject ( 8 ) ;
} else {
setOns ( 1 , 0 ) ;
playSound ( 4 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 597 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_cellarDoorOpenFlag , 0 ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 8 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_wallShakenMsg ) ; // "Wow! This must have shaken all the nearby walls!"
2009-09-03 20:59:17 +00:00
setOns ( 1 , 32 , 24 ) ;
enableObject ( 4 , 24 ) ;
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x5b3a : // Click on dog
2012-08-05 20:47:38 +00:00
dialog - > popMark ( scene , dsAddr_dialogStackDog ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x5b59 : // picking up the rope
2012-07-11 17:20:26 +00:00
dialog - > showMark ( 70 , scene ) ;
2010-02-02 08:12:45 +00:00
wait ( 150 ) ;
2012-07-11 17:20:26 +00:00
dialog - > showMark ( 71 , scene ) ;
2009-09-05 20:58:25 +00:00
moveRel ( 0 , - 12 , 0 ) ;
playSound ( 34 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 607 ) ;
2009-09-05 20:58:25 +00:00
setOns ( 0 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 608 ) ;
playActorAnimation ( 609 ) ;
playActorAnimation ( 610 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 25 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 611 ) ;
2009-11-08 21:59:26 +00:00
moveTo ( 16 , scene - > getPosition ( ) . y , 4 , true ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemRopeAct2 ) ;
2009-09-05 20:58:25 +00:00
disableObject ( 12 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x5be1 : // Talk to grandpa
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackGrandpa , 0 , 522 , textColorMark , textColorGrandpa , 0 , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-11-08 19:10:24 +00:00
case 0x5bee :
playSound ( 89 , 5 ) ;
playSound ( 67 , 11 ) ;
playActorAnimation ( 982 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_emptyMsg ) ; // "It's Empty"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x5c0d : // grandpa - drawers
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_SearchedGrandpaDrawersFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_drawersEmptyMsg ) ; // "There's nothing else in the drawers"
2009-09-03 20:59:17 +00:00
} else {
2012-08-01 18:26:46 +00:00
if ( ! CHECK_FLAG ( dsAddr_alreadyAdjustedHoopPoleFlag , 1 ) )
2012-08-03 15:28:58 +00:00
dialog - > show ( 24 , scene , 0 , 522 , textColorMark , textColorGrandpa , 0 , 1 ) ;
2009-09-15 08:54:06 +00:00
2009-11-08 21:59:26 +00:00
playSound ( 66 , 5 ) ;
playSound ( 67 , 20 ) ;
playSound ( 5 , 23 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 631 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemHandkerchief ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_SearchedGrandpaDrawersFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x5c84 :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_alreadyAdjustedHoopPoleFlag , 1 ) ) {
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemShotgun ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 7 ) ;
2009-11-08 21:59:26 +00:00
playSound ( 32 , 7 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 520 ) ;
2009-09-03 20:59:17 +00:00
} else {
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackGrandpaShotgun , 0 , 522 , textColorMark , textColorGrandpa , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x5cf0 : // Exit basketball house
2009-09-03 20:59:17 +00:00
playSound ( 88 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 981 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 20 , 161 , 165 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x5d24 : // getting the fan
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_alreadyAdjustedHoopPoleFlag , 1 ) ) {
2009-09-03 20:59:17 +00:00
setLan ( 2 , 0 ) ;
2009-11-08 21:59:26 +00:00
playSound ( 32 , 7 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 508 ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 13 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemFan ) ;
2009-09-03 20:59:17 +00:00
} else {
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackGrandpaFan , 0 , 522 , textColorMark , textColorGrandpa , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x5e4d : // right click on ann
2012-08-01 18:26:46 +00:00
if ( ! CHECK_FLAG ( dsAddr_alreadySpokenToAnneFlag , 0 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_girlTalkMsg ) ; // "I really don't know how to talk to girls"
2009-09-03 20:59:17 +00:00
} else {
moveTo ( 245 , 198 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 51 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2012-07-12 20:03:47 +00:00
//waitLanAnimationFrame(2, 1); // too long, about 200 frames! seems to be present in original game (sic)
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_alreadySpokenToAnneFlag , 1 ) ;
2009-09-15 08:54:06 +00:00
for ( byte i = 10 ; i < = 20 ; i + = 2 )
2009-09-05 20:58:25 +00:00
playSound ( 13 , i ) ;
2009-09-03 20:59:17 +00:00
playAnimation ( 528 , 1 ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2009-09-03 20:59:17 +00:00
playMusic ( 7 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_lovestruckByAnneFlag , 1 ) ;
2009-09-15 08:54:06 +00:00
for ( byte i = 3 ; i < = 17 ; i + = 2 )
2009-09-05 20:58:25 +00:00
playSound ( 56 , i ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 525 ) ;
2009-09-15 08:54:06 +00:00
for ( byte i = 1 ; i < = 13 ; i + = 2 )
2009-09-05 20:58:25 +00:00
playSound ( 56 , i ) ;
playSound ( 40 , 15 ) ;
playSound ( 40 , 18 ) ;
playSound ( 40 , 22 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 526 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 54 , 1 ) ;
playSound ( 55 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 527 ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 52 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2012-08-01 18:26:46 +00:00
scene - > getObject ( 2 ) - > setName ( ( const char * ) res - > dseg . ptr ( dsAddr_scnObjNameAnne ) ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x5f73 : // exiting ann's house
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_lovestruckByAnneFlag , 1 ) )
2009-09-08 14:26:14 +00:00
playMusic ( 6 ) ;
2009-11-09 07:58:27 +00:00
loadScene ( 21 , 99 , 180 , 3 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x5fba :
2012-08-01 07:24:40 +00:00
if ( CHECK_FLAG ( dsAddr_nutSwappedForAppleFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noFruitMsg ) ; // "There are no more interesting fruits here"
2009-09-03 20:59:17 +00:00
} else {
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackGetAppleOldLady , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 17:15:28 +00:00
case 0x607f :
2012-07-26 05:06:44 +00:00
fnEgoScaredBySpider ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 17:15:28 +00:00
case 0x6083 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) ) {
2009-09-05 17:15:28 +00:00
setOns ( 0 , 0 ) ;
playSound ( 56 , 10 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 599 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemShovelAct2 ) ;
2009-09-05 17:15:28 +00:00
disableObject ( 2 ) ;
} else
2012-07-26 05:06:44 +00:00
fnEgoScaredBySpider ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_egoScaredBySpider :
2012-07-26 05:06:44 +00:00
fnEgoScaredBySpider ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_moveToLadderAndLeaveCellar :
2012-07-26 05:06:44 +00:00
fnMoveToLadderAndLeaveCellar ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_leaveCellar :
2012-07-26 05:06:44 +00:00
fnLeaveCellar ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 22:41:15 +00:00
case 0x6176 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_notInDarkMsg ) ; // "I'm not going to wander here in the dark again"
2012-07-11 23:01:26 +00:00
} else {
playSound ( 71 , 6 ) ;
playActorAnimation ( 598 ) ;
loadScene ( 24 , scene - > getPosition ( ) ) ;
setOns ( 2 , 0 ) ;
setLan ( 1 , 0 ) ;
playAnimation ( 660 , 0 ) ;
disableObject ( 1 ) ;
2012-07-28 05:05:20 +00:00
SET_FLAG ( dsAddr_lightOnFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
loadScene ( 24 , scene - > getPosition ( ) ) ;
2009-09-03 22:41:15 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 17:15:28 +00:00
case 0x61e9 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) )
2012-08-05 20:47:38 +00:00
dialog - > popMark ( scene , dsAddr_dialogStackTakeAxe ) ;
2012-07-11 23:01:26 +00:00
else
2012-07-26 05:06:44 +00:00
fnTooDark ( ) ;
2012-07-26 00:49:46 +00:00
break ;
case csAddr_TooDark :
displayMessage ( dsAddr_TooDarkMsg ) ; // "It's too dark to see clearly"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x6229 : // shelves in cellar
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) ) {
2009-09-05 17:15:28 +00:00
Common : : Point p = scene - > getPosition ( ) ;
2012-08-01 07:24:40 +00:00
byte v = GET_FLAG ( dsAddr_cellarShelfExamineCount ) ;
2009-09-15 08:54:06 +00:00
switch ( v ) {
2009-09-05 17:15:28 +00:00
case 0 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_whatGotMsg ) ; // "Let's look what we've got here"
2009-09-05 17:15:28 +00:00
moveRel ( - 34 , 0 , 1 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_strawberryJamMsg ) ; // "Strawberry jam"
2009-09-05 17:15:28 +00:00
moveRel ( 20 , 0 , 1 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_gooseberryJamMsg ) ; // "Gooseberry jam"
2009-09-05 17:15:28 +00:00
moveRel ( 20 , 0 , 1 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_blackberryJamMsg ) ; // "Blackberry jam"
2009-09-05 17:15:28 +00:00
moveRel ( 20 , 0 , 1 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_bilberryJamMsg ) ; // "Bilberry jam"
2009-09-05 17:15:28 +00:00
moveTo ( p , 3 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_getMeOutJamMsg ) ; // "Get me out of this jam!"
2012-08-01 07:24:40 +00:00
SET_FLAG ( dsAddr_cellarShelfExamineCount , 1 ) ;
2009-09-05 17:15:28 +00:00
break ;
case 1 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_rosemaryJamMsg ) ; // "Oh, and there is Rosemary jam"
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_knowRosemaryMsg ) ; // "I used to know someone called Rosemary"
2012-08-01 07:24:40 +00:00
SET_FLAG ( dsAddr_cellarShelfExamineCount , 2 ) ;
2009-09-05 17:15:28 +00:00
break ;
default :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_unwantedJamsMsg ) ; // "I don't want those jams"
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 17:15:28 +00:00
}
2009-09-15 08:54:06 +00:00
} else
2012-07-26 05:06:44 +00:00
fnTooDark ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x6480 : // dive mask
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_birdsGoneFromScarecrowFlag , 1 ) ) {
2009-09-05 20:58:25 +00:00
playSound ( 56 , 7 ) ;
playSound ( 5 , 15 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 613 ) ;
2009-11-09 07:58:27 +00:00
setOns ( 3 , 36 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemMask ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 5 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_needSunglassesMsg ) ; // "Sorry buddy, but I need your sunglasses"
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_crowKillMsg ) ; // "I'm sure these crows will kill me"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x64c4 : // flippers
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_birdsGoneFromScarecrowFlag , 1 ) ) {
2009-09-03 20:59:17 +00:00
setOns ( 2 , 35 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 63 , 8 ) ;
playSound ( 24 , 10 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 612 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemFins ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 6 ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_crowKillMsg ) ; // "I'm sure these crows will kill me"
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x7907 : // Describe car lever
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_alreadyPulledTrunkReleaseLeverFlag , 1 ) ) { // Already pulled lever?
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_openBootMsg ) ; // "It opens the boot"
2009-09-15 08:54:06 +00:00
} else
2012-07-11 23:01:26 +00:00
retVal = false ;
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x62d0 : // Get bone from under rock
2012-07-22 03:55:46 +00:00
displayAsyncMessage ( dsAddr_yeowMsg , 218 , 96 , 16 , 24 ) ; // "YEEEOOOWWWW!"
2009-09-03 20:59:17 +00:00
playSound ( 26 , 6 ) ;
2009-11-08 20:00:31 +00:00
playSound ( 26 , 10 ) ;
playSound ( 24 , 13 ) ;
playSound ( 46 , 37 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 594 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 0 , 29 ) ;
disableObject ( 1 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemBone ) ;
2009-11-08 20:00:31 +00:00
playSound ( 5 , 2 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 595 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_dinoBoneMsg ) ; // "I really hope this is DINOSAUR bone"
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2009-09-05 17:15:28 +00:00
case 0x6351 :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_caveThornsCutDownFlag , 1 ) ) { // cave bush is cut down
2009-09-05 17:15:28 +00:00
playMusic ( 8 ) ;
2009-09-05 20:58:25 +00:00
loadScene ( 26 , 319 , 169 , 4 ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_ridBushMsg ) ; // "I must get rid of this bush first"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 20:58:25 +00:00
case 0x63ea :
playSound ( 5 , 10 ) ;
setOns ( 0 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 640 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemNugget ) ;
2009-09-05 20:58:25 +00:00
disableObject ( 6 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 17:15:28 +00:00
2012-07-11 23:01:26 +00:00
case 0x6411 : // Kick hen
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_alreadyKickedHenFlag , 1 ) ) { // already kicked hen
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_ridFrustationsMsg ) ; // "I'd already got rid of my frustrations"
2009-09-03 20:59:17 +00:00
} else {
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_alreadyKickedHenFlag , 1 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_henFlyMsg ) ; // "I wonder if hens can fly. Come here, baby"
2009-11-08 19:10:24 +00:00
waitLanAnimationFrame ( 1 , 87 ) ;
playSound ( 30 , 26 ) ;
playSound ( 29 , 49 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 500 , true ) ;
2009-11-08 19:10:24 +00:00
playAnimation ( 501 , 0 , true ) ;
2009-09-03 20:59:17 +00:00
waitAnimation ( ) ;
setOns ( 0 , 1 ) ;
enableObject ( 14 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_firstTestFailMsg ) ; // "First test failed"
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x6592 : // Rake
2009-09-05 17:15:28 +00:00
setOns ( 1 , 0 ) ;
playSound ( 18 , 10 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 553 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemRakeBroken ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_trousersMsg ) ; // "Good I always asked mum for trousers with BIG pockets"
2009-09-05 17:15:28 +00:00
disableObject ( 11 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 17:15:28 +00:00
case 0x66b5 :
2009-09-05 23:01:03 +00:00
playSound ( 89 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 969 ) ;
2009-09-05 23:01:03 +00:00
loadScene ( 33 , 319 , 181 , 4 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x6519 : // Sickle
2009-09-03 20:59:17 +00:00
setOns ( 4 , 0 ) ;
playSound ( 5 , 11 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 625 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemSickleBlunt ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 8 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x655b : // Get needle from haystack
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_gotNeedleAlreadyFlag , 1 ) ) { // already have needle
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_dontPushLuckMsg ) ; // "I don't think I should push my luck"
2009-09-03 20:59:17 +00:00
} else {
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_gotNeedleAlreadyFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 49 , 3 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 548 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemNeedle ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_needleHaystackMsg ) ; // "And they say you can't find a needle in a haystack"
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x663c : // Feather
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
playSound ( 5 , 9 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 511 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemFeather ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 15 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2009-09-05 20:58:25 +00:00
case 0x667c :
playSound ( 70 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 972 ) ;
2009-09-05 20:58:25 +00:00
loadScene ( 29 , 160 , 199 , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 20:58:25 +00:00
case 0x66a9 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_dontLeaveMansionMsg ) ; // "I don't want to leave the mansion, I want blood!"
2009-09-05 20:58:25 +00:00
disableObject ( 4 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x66e2 :
playSound ( 88 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 970 ) ;
2009-09-05 23:01:03 +00:00
loadScene ( 35 , 160 , 199 , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x70bb :
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackBusyCook , 0 , 709 , textColorMark , textColorCook , 0 , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x71ae :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionRadioBrokenFlag , 1 ) ) {
if ( CHECK_FLAG ( dsAddr_MansionGotRadioBatteriesFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_restUselessMsg ) ; // "The rest is useless"
2009-09-05 23:01:03 +00:00
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_twoBatteriesMsg ) ; // "Wow! Two 1.5V batteries!"
2009-09-05 23:01:03 +00:00
playSound ( 32 , 6 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 717 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemBatteries ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionGotRadioBatteriesFlag , 1 ) ;
2009-09-05 23:01:03 +00:00
}
} else
2012-07-11 17:20:26 +00:00
dialog - > showMark ( 97 , scene ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x70c8 :
2012-07-26 05:06:44 +00:00
if ( fnIsCookGone ( ) ) {
2012-07-11 23:01:26 +00:00
moveTo ( 81 , 160 , 4 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_cognacMsg ) ; // "Pfui! The cognac really didn't do any good"
2012-07-11 23:01:26 +00:00
}
break ;
2009-09-15 08:54:06 +00:00
2012-07-26 05:06:44 +00:00
case csAddr_isCookGone :
retVal = fnIsCookGone ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 23:01:03 +00:00
case 0x70ef :
2012-07-26 05:06:44 +00:00
if ( fnIsCookGone ( ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_tooHotMsg ) ; // "It's too hot to touch!"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x70f9 :
2012-10-09 08:14:44 +00:00
if ( inventory - > has ( kInvItemBurningPaper ) ) {
inventory - > remove ( kInvItemBurningPaper ) ;
2009-09-05 23:01:03 +00:00
loadScene ( 29 , 40 , 176 , 2 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_paperBurntMsg ) ; // "The paper burnt out completely!"
2009-09-15 08:54:06 +00:00
} else
2009-09-05 23:01:03 +00:00
loadScene ( 29 , 40 , 176 , 2 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x712c :
2012-07-26 05:06:44 +00:00
if ( fnIsCookGone ( ) ) {
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionHaveOpenedFridgeBeforeFlag , 1 ) ) {
2012-07-11 23:01:26 +00:00
playSound ( 89 , 4 ) ;
playActorAnimation ( 719 ) ;
setOns ( 4 , 67 ) ;
2012-07-28 05:05:20 +00:00
+ + * res - > dseg . ptr ( READ_LE_UINT16 ( res - > dseg . ptr ( dsAddr_sceneWalkboxTablePtr + ( scene - > getId ( ) - 1 ) * 2 ) ) ) ;
2012-07-11 23:01:26 +00:00
disableObject ( 5 ) ;
enableObject ( 12 ) ;
} else {
playSound ( 89 , 4 ) ;
playSound ( 89 , 4 ) ;
playSound ( 87 , 45 ) ;
2012-08-03 15:28:58 +00:00
displayAsyncMessage ( dsAddr_oneTakenMsg , 112 , 108 , 11 , 35 , textColorEskimo ) ; // "This one's taken, OK?"
2012-07-11 23:01:26 +00:00
playActorAnimation ( 718 ) ;
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_slightMadMsg ) ; // "It finally happened. I'm slightly mad"
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionHaveOpenedFridgeBeforeFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
}
2009-09-05 23:01:03 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x71eb :
setOns ( 2 , 0 ) ;
playSound ( 32 , 7 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 710 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemChilliWithLabel ) ;
2009-09-05 23:01:03 +00:00
disableObject ( 7 ) ;
enableObject ( 8 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x7244 :
2012-07-26 05:06:44 +00:00
if ( fnIsCookGone ( ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_neverLearntMsg ) ; // "I never learnt to how use one"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x7255 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionPutBurningPaperInFridgeFlag , 1 ) ) {
2009-09-07 22:52:51 +00:00
setOns ( 4 , 69 ) ;
2009-09-05 23:01:03 +00:00
playSound ( 32 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 725 ) ;
2009-09-05 23:01:03 +00:00
disableObject ( 12 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemMeat ) ;
2009-09-05 23:01:03 +00:00
} else {
2009-09-09 20:42:44 +00:00
playActorAnimation ( 721 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_frozenShelfMsg ) ; // "It has frozen hard onto the shelf!"
2009-09-05 23:01:03 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x721c :
setOns ( 3 , 0 ) ;
playSound ( 32 , 7 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 715 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemPastryRoller ) ;
2009-09-05 23:01:03 +00:00
disableObject ( 9 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x7336 :
setOns ( 1 , 0 ) ;
playSound ( 5 , 42 ) ;
2012-07-22 03:55:46 +00:00
displayAsyncMessage ( dsAddr_noDepraveMsg , 2 , 102 , 20 , 38 ) ; // "Nah, I don't want to deprave the kids"
2009-09-09 20:42:44 +00:00
playActorAnimation ( 697 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemCognac ) ;
2009-09-05 23:01:03 +00:00
disableObject ( 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x7381 :
playSound ( 5 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 704 ) ;
2009-09-05 23:01:03 +00:00
disableObject ( 2 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemIceTongs ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x7408 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_mansionReadNewspaperFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noReadAgainMsg ) ; // "I don't want to read it again. I might like it."
2009-09-05 23:01:03 +00:00
} else {
setOns ( 0 , 0 ) ;
playSound ( 26 , 17 ) ;
playSound ( 26 , 23 ) ;
playSound ( 26 , 30 ) ;
playSound ( 26 , 37 ) ;
playSound ( 26 , 43 ) ;
playSound ( 52 , 34 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 698 ) ;
2009-09-05 23:01:03 +00:00
setOns ( 0 , 52 ) ;
setOns ( 2 , 61 ) ;
2012-07-11 17:20:26 +00:00
dialog - > showMark ( 92 , scene ) ;
2009-09-05 23:01:03 +00:00
enableObject ( 11 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_mansionReadNewspaperFlag , 1 ) ;
2009-09-05 23:01:03 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x7476 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_mansionExaminedCouchBeforeFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noSleepMsg ) ; // "I don't want to sleep"
2009-09-05 23:01:03 +00:00
} else {
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_mansionExaminedCouchBeforeFlag , 1 ) ;
2012-07-11 17:20:26 +00:00
dialog - > showMark ( 94 , scene ) ;
2009-09-05 23:01:03 +00:00
playSound ( 61 , 5 ) ;
playSound ( 5 , 14 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 705 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_justCorkMsg ) ; // "It's just a cork"
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemCork ) ;
2009-09-05 23:01:03 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x74d1 :
setOns ( 2 , 0 ) ;
playSound ( 5 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 699 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemRemoteControl ) ;
2009-09-05 23:01:03 +00:00
disableObject ( 11 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-07 22:52:51 +00:00
2012-07-11 23:01:26 +00:00
case 0x7513 : // fatso + doctor: pre-final
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionThruFanByTimePillFlag , 1 ) ) {
if ( CHECK_FLAG ( dsAddr_MansionVentFanStoppedFlag , 1 ) ) {
2009-09-07 22:52:51 +00:00
playSound ( 88 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 979 ) ;
2009-09-07 22:52:51 +00:00
loadScene ( 37 , 51 , 183 ) ;
2009-11-09 23:22:35 +00:00
2012-08-03 15:28:58 +00:00
dialog - > show ( 125 , scene , 768 , 769 , textColorMansionGuard , textColorProfessor , 1 , 2 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 770 , 0 , true , true , true ) ;
playAnimation ( 771 , 1 , true , true , true ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 126 , scene , 0 , textColorMark , 0 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 770 , 0 , true , true , true ) ;
playAnimation ( 771 , 1 , true , true , true ) ;
2009-09-07 22:52:51 +00:00
playSound ( 5 , 3 ) ;
playSound ( 56 , 12 ) ;
playSound ( 23 , 20 ) ;
playSound ( 75 , 25 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 772 ) ;
2009-09-07 22:52:51 +00:00
2009-11-09 23:22:35 +00:00
playActorAnimation ( 773 , true ) ;
playAnimation ( 774 , 0 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
setOns ( 0 , 74 ) ;
2009-11-09 23:22:35 +00:00
hideActor ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 127 , scene , 775 , textColorJohnNoty , 1 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 771 , 1 , true , true , true ) ;
playAnimation ( 776 , 0 ) ;
2010-01-25 01:39:44 +00:00
2012-08-03 15:28:58 +00:00
dialog - > show ( 128 , scene , 777 , 778 , textColorJohnNoty , textColorProfessor , 1 , 2 ) ;
2010-01-25 01:39:44 +00:00
2009-11-10 07:29:29 +00:00
playAnimation ( 779 , 0 , true , true , true ) ;
playAnimation ( 780 , 1 , true , true , true ) ;
2010-01-25 01:39:44 +00:00
2009-09-15 08:54:06 +00:00
for ( byte i = 1 ; i < = 6 ; + + i )
2009-09-07 22:52:51 +00:00
playSound ( 58 , i ) ;
playSound ( 58 , 10 ) ;
playSound ( 2 , 7 ) ;
playSound ( 55 , 11 ) ;
playSound ( 54 , 15 ) ;
playAnimation ( 781 , 2 , true ) ;
playAnimation ( 782 , 3 , true ) ;
waitAnimation ( ) ;
2009-11-10 07:29:29 +00:00
setOns ( 1 , 75 ) ;
setOns ( 2 , 76 ) ;
2010-01-25 01:39:44 +00:00
2009-09-15 08:54:06 +00:00
for ( byte i = 1 ; i < = 6 ; + + i )
2009-09-07 22:52:51 +00:00
playSound ( 58 , i ) ;
playSound ( 58 , 9 ) ;
playSound ( 2 , 7 ) ;
playSound ( 2 , 15 ) ;
playSound ( 55 , 10 ) ;
playAnimation ( 783 , 2 , true ) ;
playAnimation ( 784 , 3 , true ) ;
waitAnimation ( ) ;
2009-11-10 07:29:29 +00:00
setOns ( 1 , 77 ) ;
setOns ( 2 , 78 ) ;
2009-09-07 22:52:51 +00:00
playAnimation ( 785 , 2 , true ) ;
playAnimation ( 786 , 3 , true ) ;
waitAnimation ( ) ;
2009-09-15 08:54:06 +00:00
2009-11-10 07:29:29 +00:00
moveTo ( 112 , 183 , 2 , true ) ;
2009-11-09 23:22:35 +00:00
2009-09-07 22:52:51 +00:00
setOns ( 3 , 79 ) ;
setOns ( 0 , 0 ) ;
2010-01-25 01:39:44 +00:00
2009-11-10 07:29:29 +00:00
showActor ( ) ;
playAnimation ( 0 , 0 ) ;
2009-09-07 22:52:51 +00:00
playAnimation ( 787 , 2 , true ) ;
playAnimation ( 788 , 3 , true ) ;
waitAnimation ( ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 0 , 1 ) ;
2010-01-25 01:39:44 +00:00
2009-09-07 22:52:51 +00:00
playSound ( 32 , 2 ) ;
playSound ( 24 , 7 ) ;
playAnimation ( 790 , 3 , true ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 789 , 0 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2009-09-15 08:54:06 +00:00
2009-09-07 22:52:51 +00:00
setOns ( 0 , 80 ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 792 , 3 , true , true , true ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 129 , scene , 0 , 791 , textColorMark , textColorJohnNoty , 0 , 4 ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 792 , 3 , true , true , true ) ;
2009-09-15 08:54:06 +00:00
2009-09-07 22:52:51 +00:00
moveTo ( 40 , 171 , 4 ) ;
2010-01-25 01:39:44 +00:00
2009-09-07 22:52:51 +00:00
setOns ( 3 , 81 , 35 ) ;
enableObject ( 12 , 35 ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 0 , 3 ) ;
2009-09-07 22:52:51 +00:00
loadScene ( 31 , 298 , 177 , 4 ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_MansionJohnNotyEscapingFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_ventFirstMsg ) ; // "I'd better stop this ventilator first"
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noSaladMsg ) ; // "I don't want to turn myself into a salad"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-07 22:52:51 +00:00
case 0x783d :
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackJohnNotyEndgame , 0 , 797 , textColorMark , textColorJohnNoty , 0 , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2009-11-08 20:53:55 +00:00
case 0x7966 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) )
2012-07-11 23:01:26 +00:00
retVal = false ;
else
2012-07-26 05:06:44 +00:00
fnEgoScaredBySpider ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x7ad0 :
case 0x7ad7 :
2012-07-26 05:06:44 +00:00
retVal = ! fnIsCookGone ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2009-11-09 23:22:35 +00:00
case 0x7ab9 :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_vgaArtistQuipAlreadySaidFlag , 1 ) )
2012-07-11 23:01:26 +00:00
retVal = false ;
else {
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 90 , scene , 0 , textColorMark , 0 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_vgaArtistQuipAlreadySaidFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
}
break ;
2009-09-05 23:01:03 +00:00
case 0x7ade :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionRadioBrokenFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_whatInsideMsg ) ; // "I was always curious what's inside these things"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-05 20:58:25 +00:00
2012-07-12 20:03:47 +00:00
case 0x7f23 : // Use grenade on captains drawer
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_FirstActTrialState , 3 ) ) {
2010-03-21 07:38:09 +00:00
enableOn ( false ) ;
2009-09-03 20:59:17 +00:00
playSound ( 5 , 3 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 58 , 11 ) ;
playSound ( 46 , 56 ) ;
playSound ( 46 , 85 ) ;
playSound ( 46 , 117 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 870 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 54 , 15 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 871 ) ;
2012-07-28 05:05:20 +00:00
SET_FLAG ( dsAddr_captainDrawerState , 1 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0x66 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 224 , 194 , 0 , true ) ;
2012-07-17 16:09:13 +00:00
displayCutsceneMessage ( dsAddr_cutsceneMsg1 , 23 , 95 ) ; // "sixty seven rude words later"
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemRopeAndGrenade ) ;
2010-03-21 07:38:09 +00:00
enableOn ( true ) ;
2012-07-11 23:01:26 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_captainWatchingMsg ) ; // "with captain watching? Better not"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_egoSuspiciousPosition :
2012-07-26 05:06:44 +00:00
fnEgoSuspiciousPosition ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x509a :
2012-07-26 05:06:44 +00:00
fnEgoSuspiciousPosition ( ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 5 , 10 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 543 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemBranch ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 9 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-07 22:52:51 +00:00
case 0x7802 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionThruFanByTimePillFlag , 1 ) ) {
if ( CHECK_FLAG ( dsAddr_MansionVentFanStoppedFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_nahMsg ) ; // "Nah"
2009-09-07 22:52:51 +00:00
else {
playSound ( 71 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 796 ) ;
2009-09-07 22:52:51 +00:00
setLan ( 1 , 0 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionVentFanStoppedFlag , 1 ) ;
2009-09-07 22:52:51 +00:00
}
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noSaladMsg ) ; // "I don't want to turn myself into a salad"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x78e0 :
2012-07-26 05:06:44 +00:00
fnEgoSuspiciousPosition ( ) ;
2012-07-11 23:01:26 +00:00
retVal = false ;
break ;
2009-09-05 15:04:37 +00:00
case 0x78e7 :
case 0x78ee :
2012-07-26 05:06:44 +00:00
fnEgoDefaultPosition ( ) ;
2012-07-11 23:01:26 +00:00
retVal = false ;
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 15:04:37 +00:00
case 0x78f5 :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_carTrunkEmptyFlag , 1 ) ) {
2012-07-22 21:35:00 +00:00
displayMessage ( dsAddr_bootEmptyMsg ) ; // "There's nothing else in the boot"
2009-09-05 15:04:37 +00:00
} else
2012-07-11 23:01:26 +00:00
retVal = false ;
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x7919 :
2012-08-01 18:26:46 +00:00
if ( ! CHECK_FLAG ( dsAddr_laundryState , 1 ) )
2012-07-11 23:01:26 +00:00
retVal = false ;
else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_clothesDryMsg ) ; // "The clothes are dry now."
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x7950 :
2012-08-01 07:24:40 +00:00
if ( CHECK_FLAG ( dsAddr_nutSwappedForAppleFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_nutRealMsg ) ; // "Only the nut is real"
2012-08-01 07:24:40 +00:00
else
retVal = false ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 17:15:28 +00:00
case 0x7975 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) )
2012-07-11 23:01:26 +00:00
retVal = false ;
else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_shutValveMsg ) ; // "Shutting the valve shook the dirt from the wall..."
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 17:15:28 +00:00
case 0x7987 :
case 0x7996 :
case 0x79a5 :
case 0x79b4 :
2012-07-28 05:05:20 +00:00
if ( CHECK_FLAG ( dsAddr_lightOnFlag , 1 ) )
2012-07-11 23:01:26 +00:00
retVal = false ;
else
2012-07-26 05:06:44 +00:00
fnTooDark ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2010-02-07 17:16:30 +00:00
case 0x79d2 :
2012-08-01 18:26:46 +00:00
if ( ! CHECK_FLAG ( dsAddr_gotNeedleAlreadyFlag , 1 ) )
2012-07-11 23:01:26 +00:00
retVal = false ;
else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_ordinaryHaystackMsg ) ; // "Just an ordinary hay stack. Now."
2012-07-11 23:01:26 +00:00
break ;
2010-02-07 17:16:30 +00:00
2009-09-05 23:01:03 +00:00
case 0x7af0 :
2012-07-26 05:06:44 +00:00
if ( fnIsCookGone ( ) )
2012-07-11 23:01:26 +00:00
retVal = false ;
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 20:58:25 +00:00
case 0x8117 :
2012-08-03 15:28:58 +00:00
dialog - > show ( 9 , scene , 0 , 529 , textColorMark , textColorMansionGuard , 0 , 1 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 2 ) ;
playSound ( 5 , 44 ) ;
2009-11-08 23:32:01 +00:00
playAnimation ( 642 , 0 , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 641 , true ) ;
2009-09-05 20:58:25 +00:00
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 10 , scene , 0 , 529 , textColorMark , textColorMansionGuard , 0 , 1 ) ;
2010-02-02 08:12:45 +00:00
wait ( 170 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 11 , scene , 0 , 529 , textColorMark , textColorMansionGuard , 0 , 1 ) ;
2009-09-05 20:58:25 +00:00
moveRel ( 0 , 1 , 0 ) ;
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 12 , scene , 0 , 529 , textColorMark , textColorMansionGuard , 0 , 1 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemNugget ) ;
2012-07-26 05:06:44 +00:00
fnMansionIntrusionAttempt ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x8174 :
setOns ( 0 , 0 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 2 ) ;
playSound ( 5 , 5 ) ;
playSound ( 5 , 9 ) ;
playSound ( 14 , 19 ) ;
playSound ( 5 , 50 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 542 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 15 ) ;
disableObject ( 3 ) ;
enableObject ( 9 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 20:58:25 +00:00
case 0x81c2 :
playSound ( 56 , 11 ) ;
playSound ( 36 , 13 ) ;
playSound ( 48 , 22 ) ;
playSound ( 56 , 57 ) ;
playSound ( 36 , 59 ) ;
playSound ( 48 , 68 ) ;
playSound ( 54 , 120 ) ;
playSound ( 56 , 141 ) ;
playSound ( 56 , 144 ) ;
playSound ( 56 , 147 ) ;
playAnimation ( 589 , 1 , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 588 , true ) ;
2009-09-05 20:58:25 +00:00
waitAnimation ( ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_itsGoneMsg ) ; // "At least it's gone"
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemPaintedPotato ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_mansionTreeHollowEmptyFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 20:58:25 +00:00
2012-07-11 23:01:26 +00:00
case 0x823d : // grappling hook on the wall
2009-09-05 20:58:25 +00:00
playSound ( 5 , 3 ) ;
2009-09-15 08:54:06 +00:00
for ( byte i = 16 ; i < = 28 ; i + = 2 )
2009-09-05 20:58:25 +00:00
playSound ( 65 , i ) ;
playSound ( 47 , 33 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 620 ) ;
2009-09-15 08:54:06 +00:00
for ( byte i = 3 ; i < = 18 ; i + = 3 )
2009-09-05 20:58:25 +00:00
playSound ( 56 , i ) ;
2009-11-08 20:00:31 +00:00
2012-08-03 15:28:58 +00:00
displayAsyncMessage ( dsAddr_heyLetGoMsg , 38 , 12 , 20 , 37 , textColorMansionGuard ) ; // "Hey, let go, will ya?!"
2009-09-09 20:42:44 +00:00
playActorAnimation ( 621 , true ) ;
2009-09-05 20:58:25 +00:00
playAnimation ( 623 , 1 , true ) ;
waitAnimation ( ) ;
2009-11-08 20:00:31 +00:00
2012-08-03 15:28:58 +00:00
displayAsyncMessage ( dsAddr_aaahhhMsg , 30 , 12 , 1 , 9 , textColorMansionGuard ) ; // "Aaaaaaaaaaaaahhh!"
2009-11-08 21:59:26 +00:00
playSound ( 35 , 1 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 622 , true ) ;
2009-11-08 21:59:26 +00:00
playAnimation ( 624 , 0 , true ) ;
2009-11-09 08:23:56 +00:00
waitAnimation ( ) ;
2010-01-25 01:39:44 +00:00
2010-02-02 08:12:45 +00:00
wait ( 150 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_oopsMsg ) ; // "Oops"
2009-11-08 20:00:31 +00:00
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemGrapplingHook ) ;
2012-07-26 05:06:44 +00:00
fnMansionIntrusionAttempt ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x8312 : // hedgehog + plastic apple
2012-07-11 17:20:26 +00:00
dialog - > showMark ( 76 , scene ) ;
2009-09-03 20:59:17 +00:00
setLan ( 1 , 0 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 24 ) ;
playSound ( 26 , 32 ) ;
playSound ( 5 , 42 ) ;
playSound ( 15 , 77 ) ;
playSound ( 15 , 79 ) ;
playSound ( 15 , 82 ) ;
playSound ( 22 , 91 ) ;
playSound ( 22 , 102 ) ;
playSound ( 26 , 114 ) ;
playSound ( 24 , 124 ) ;
2009-11-07 12:01:45 +00:00
waitLanAnimationFrame ( 1 , 0x1a ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 562 , true ) ;
2009-09-05 20:58:25 +00:00
playAnimation ( 563 , 1 , true ) ;
waitAnimation ( ) ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
disableObject ( 6 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_lifeIsBrutalMsg ) ; // "Life is brutal"
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemPlasticApple ) ;
inventory - > add ( kInvItemCone ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 20:58:25 +00:00
case 0x839f :
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemDart ) ;
2009-09-05 20:58:25 +00:00
playSound ( 37 , 14 ) ;
playSound ( 16 , 17 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 564 , true ) ;
2009-09-05 20:58:25 +00:00
playAnimation ( 565 , 2 , true ) ;
waitAnimation ( ) ;
setOns ( 0 , 24 ) ;
playSound ( 39 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 582 ) ;
2009-09-05 20:58:25 +00:00
moveTo ( 63 , 195 , 1 ) ;
playAnimation ( 571 , 1 ) ;
playAnimation ( 572 , 1 ) ;
playAnimation ( 573 , 1 ) ;
2009-09-15 08:54:06 +00:00
for ( byte i = 1 ; i < = 7 ; i + = 2 )
2009-09-05 20:58:25 +00:00
playSound ( 40 , i ) ;
playAnimation ( 574 , 1 ) ;
setLan ( 1 , 0 ) ;
playAnimation ( 575 , 1 ) ;
playAnimation ( 576 , 1 ) ;
playAnimation ( 577 , 1 ) ;
playAnimation ( 578 , 1 ) ;
playAnimation ( 579 , 1 ) ;
playAnimation ( 580 , 1 ) ;
playSound ( 55 , 18 ) ;
playAnimation ( 581 , 1 ) ;
disableObject ( 2 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_beesGoneFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x84c7 : // using paddle on boat
2009-09-05 20:58:25 +00:00
playSound ( 20 , 9 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 530 ) ;
2009-09-03 20:59:17 +00:00
loadScene ( 16 , 236 , 95 , 1 ) ;
2010-03-21 07:38:09 +00:00
playMusic ( 9 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 531 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 36 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 532 ) ;
playActorAnimation ( 533 ) ;
2009-11-08 23:56:06 +00:00
setOns ( 0 , 9 ) ;
2009-09-05 20:58:25 +00:00
moveTo ( 236 , 95 , 1 , true ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x8538 : // Sharpen sickle on well
2009-09-05 20:58:25 +00:00
moveTo ( 236 , 190 , 0 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 2 , 0 ) ;
2012-08-01 07:24:40 +00:00
// FIXME: Add code to Remove handle sprite (visible GFX glitch)
2009-09-05 20:58:25 +00:00
playSound ( 5 , 4 ) ;
playSound ( 14 , 14 ) ;
playSound ( 14 , 33 ) ;
playSound ( 5 , 43 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 643 ) ;
2009-09-05 20:58:25 +00:00
setOns ( 2 , 43 ) ;
moveTo ( 236 , 179 , 3 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemSickleBlunt ) ;
inventory - > add ( kInvItemSickleSharp ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-29 13:02:43 +00:00
case 0x85d6 :
displayMessage ( dsAddr_paddleBrokenMsg ) ; // "The paddle is BROKEN"
break ;
2009-09-03 20:59:17 +00:00
case 0x85eb :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_squirrelNutState , 1 ) ) {
2009-09-03 20:59:17 +00:00
enableObject ( 6 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 25 , 10 ) ;
playSound ( 25 , 14 ) ;
playSound ( 25 , 18 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 559 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 23 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_squirrelNutState , 2 ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_dontWorkPurposeMsg ) ; // "I usually don't work without a purpose"
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
case 0x863d :
2009-09-05 20:58:25 +00:00
playSound ( 12 , 4 ) ;
playSound ( 50 , 20 ) ;
playSound ( 50 , 29 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 554 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemChocCandy ) ;
inventory - > add ( kInvItemHeartShapedCandy ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
case 0x8665 :
2009-09-05 20:58:25 +00:00
playSound ( 5 , 3 ) ;
for ( byte i = 12 ; i < = 24 ; i + = 2 )
playSound ( 56 , i ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 567 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemFeatherDusterClean ) ;
inventory - > add ( kInvItemFeatherDusterDirty ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2010-02-17 22:01:05 +00:00
case 0x862c :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_squirrelNutState , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_nutRakeMsg ) ; // "It's pointless, the nut will slip between the rake's teeth"
else
displayMessage ( dsAddr_objErrorMsg ) ; // "That's no good"
2012-07-11 23:01:26 +00:00
break ;
2010-02-17 22:01:05 +00:00
2012-07-11 23:01:26 +00:00
case 0x86a9 : // correcting height of the pole with spanner
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_alreadyAdjustedHoopPoleFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noNeedMsg ) ; // "No need to do it again"
2009-09-03 20:59:17 +00:00
} else {
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_alreadyAdjustedHoopPoleFlag , 1 ) ;
2012-08-03 15:47:31 +00:00
dialog - > show ( 17 , scene , 0 , 502 , textColorMark , textColorSonny , 0 , 1 ) ;
2009-11-07 12:01:45 +00:00
waitLanAnimationFrame ( 1 , 7 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 5 , 16 ) ;
playSound ( 1 , 25 ) ;
playSound ( 1 , 29 ) ;
playSound ( 1 , 34 ) ;
2009-11-08 20:53:55 +00:00
playAnimation ( 506 , 0 , true ) ;
playActorAnimation ( 504 , true ) ;
waitAnimation ( ) ;
2010-01-25 01:39:44 +00:00
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 24 , 2 ) ;
playSound ( 22 , 24 ) ;
playSound ( 1 , 28 ) ;
playSound ( 1 , 32 ) ;
playSound ( 1 , 37 ) ;
playSound ( 5 , 43 ) ;
playSound ( 61 , 70 ) ;
playSound ( 61 , 91 ) ;
2012-07-22 03:55:46 +00:00
displayAsyncMessage ( dsAddr_ConfusionMsg , 77 , 90 , 6 , 17 ) ; // "!?&!"
2009-11-08 20:00:31 +00:00
playActorAnimation ( 505 , true ) ;
playAnimation ( 507 , 0 , true ) ;
waitAnimation ( ) ;
2010-01-25 01:39:44 +00:00
2009-09-03 20:59:17 +00:00
setOns ( 0 , 4 ) ;
2009-09-27 05:17:00 +00:00
{
Object * obj = scene - > getObject ( 3 ) ;
obj - > rect . top + = 20 ;
obj - > rect . bottom + = 20 ;
obj - > rect . save ( ) ;
}
2009-11-08 21:59:26 +00:00
playSound ( 10 , 3 ) ;
2009-11-08 20:53:55 +00:00
playAnimation ( 503 , 0 ) ;
2009-09-03 20:59:17 +00:00
setLan ( 1 , 0 , 22 ) ;
2009-09-27 05:17:00 +00:00
disableObject ( 1 , 22 ) ;
disableObject ( 13 , 20 ) ;
2009-09-03 20:59:17 +00:00
setLan ( 1 , 0 ) ;
disableObject ( 1 ) ;
disableObject ( 2 ) ;
disableObject ( 14 ) ;
disableObject ( 15 ) ;
disableObject ( 16 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 162 , 164 , 2 ) ;
2012-08-03 15:28:58 +00:00
displayMessage ( dsAddr_grandpaPromiseMsg , textColorSonny , 70 , 76 ) ; // "But grandpa, you promised!"
displayMessage ( dsAddr_ohLetsGoMsg , textColorGrandpa , 90 , 76 ) ; // "Oh all right. Let's go"
2009-09-05 15:04:37 +00:00
moveTo ( 162 , 191 , 2 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 0 ) ;
setOns ( 2 , 0 ) ;
setOns ( 3 , 0 ) ;
setOns ( 4 , 0 ) ;
2009-11-08 20:53:55 +00:00
{
2011-10-23 00:05:05 +00:00
Walkbox * w = scene - > getWalkbox ( 0 ) ;
2009-11-08 20:53:55 +00:00
w - > rect . clear ( ) ;
w - > save ( ) ;
}
playSound ( 62 , 1 ) ;
playSound ( 9 , 8 ) ;
setLan ( 1 , 0 ) ;
playAnimation ( 512 , 0 ) ;
2010-01-25 01:39:44 +00:00
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_byeMsg ) ; // "Bye."
2009-09-27 05:17:00 +00:00
{
Object * obj = scene - > getObject ( 7 ) ;
2012-09-24 01:51:26 +00:00
obj - > actorRect . left = obj - > actorRect . right = 228 ;
obj - > actorRect . top = obj - > actorRect . bottom = 171 ;
obj - > actorRect . save ( ) ;
2009-09-27 05:17:00 +00:00
}
{
Object * obj = scene - > getObject ( 8 ) ;
2012-09-24 01:51:26 +00:00
obj - > actorRect . left = obj - > actorRect . right = 290 ;
obj - > actorRect . top = obj - > actorRect . bottom = 171 ;
obj - > actorRect . save ( ) ;
2009-09-27 05:17:00 +00:00
}
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-12 20:03:47 +00:00
case 0x88c9 : // give flower to old lady
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_givenFlowerToOldLadyAlreadyFlag , 1 ) )
2012-07-26 05:06:44 +00:00
fnGiveAnotherFlowerToOldLady ( ) ;
2012-07-11 23:01:26 +00:00
else {
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemFirstFlower ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_givenFlowerToOldLadyAlreadyFlag , 1 ) ;
2012-07-26 05:06:44 +00:00
fnGivingFlowerToOldLady ( ) ;
2012-07-11 23:01:26 +00:00
}
break ;
2009-09-05 20:58:25 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_givingFlowerToOldLady :
2012-07-26 05:06:44 +00:00
fnGivingFlowerToOldLady ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_giveAnotherFlowerToOldLady :
2012-07-26 05:06:44 +00:00
fnGiveAnotherFlowerToOldLady ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-12 20:03:47 +00:00
case 0x8918 : // give flower to old lady
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_givenFlowerToOldLadyAlreadyFlag , 1 ) )
2012-07-26 05:06:44 +00:00
fnGiveAnotherFlowerToOldLady ( ) ;
2012-07-11 23:01:26 +00:00
else {
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemSecondFlower ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_givenFlowerToOldLadyAlreadyFlag , 1 ) ;
2012-07-26 05:06:44 +00:00
fnGivingFlowerToOldLady ( ) ;
2012-07-11 23:01:26 +00:00
}
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x892d :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_givenFlowerToAnneAlreadyFlag , 1 ) )
2012-07-26 05:06:44 +00:00
fnGiveAnotherFlowerToAnne ( ) ;
2012-07-11 23:01:26 +00:00
else {
2012-07-26 05:06:44 +00:00
fnGivingFlowerToAnne ( ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemFirstFlower ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_givenFlowerToAnneAlreadyFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
}
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_givingFlowerToAnne :
2012-07-26 05:06:44 +00:00
fnGivingFlowerToAnne ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_giveAnotherFlowerToAnne :
2012-07-26 05:06:44 +00:00
fnGiveAnotherFlowerToAnne ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x89b7 :
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_givenFlowerToAnneAlreadyFlag , 1 ) )
2012-07-26 05:06:44 +00:00
fnGiveAnotherFlowerToAnne ( ) ;
2012-07-11 23:01:26 +00:00
else {
2012-07-26 05:06:44 +00:00
fnGivingFlowerToAnne ( ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemSecondFlower ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_givenFlowerToAnneAlreadyFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
}
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x89cc :
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemWrappedCandy ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 6 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 60 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2012-08-05 20:47:38 +00:00
// FIXME - Dialog #61 not explicitly called. Does Dialog #60 run on somehow?
2009-09-09 20:42:44 +00:00
playActorAnimation ( 555 , true ) ;
2009-09-05 20:58:25 +00:00
playAnimation ( 556 , 1 , true ) ;
waitAnimation ( ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 557 , true ) ;
2009-09-05 20:58:25 +00:00
playAnimation ( 558 , 1 , true ) ;
2009-09-15 08:54:06 +00:00
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 62 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemRibbon ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x8a22 :
2009-09-05 20:58:25 +00:00
playSound ( 45 , 16 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 560 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemNut ) ;
inventory - > add ( kInvItemPlasticApple ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 44 , scene , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
dialog - > show ( 45 , scene , 0 , 523 , textColorMark , textColorOldLady , 0 , 1 ) ;
2012-08-01 07:24:40 +00:00
SET_FLAG ( dsAddr_nutSwappedForAppleFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x8a6f : // banknote + ann
2012-08-01 07:24:40 +00:00
if ( CHECK_FLAG ( dsAddr_examinedBanknoteFlag , 1 ) ) {
2012-08-03 15:28:58 +00:00
dialog - > show ( 63 , scene , 0 , 524 , textColorMark , textColorAnne , 0 , 2 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 3 ) ;
playSound ( 5 , 20 ) ;
2009-12-12 19:50:25 +00:00
playAnimation ( 671 , 1 , true ) ;
2009-11-22 08:36:05 +00:00
playActorAnimation ( 670 , true ) ;
2009-09-05 20:58:25 +00:00
waitAnimation ( ) ;
2009-11-22 08:36:05 +00:00
//playAnimation(672, 1);
2012-08-03 15:28:58 +00:00
dialog - > show ( 64 , scene , 524 , 672 , textColorMark , textColorAnne , 0 , 2 ) ;
2009-11-22 08:36:05 +00:00
//playAnimation(672, 1);
2009-11-09 21:34:01 +00:00
2009-09-05 20:58:25 +00:00
playSound ( 83 , 12 ) ;
2012-08-03 15:28:58 +00:00
displayAsyncMessage ( dsAddr_hundredBucksMsg , 204 , 114 , 23 , 38 , textColorAnne ) ; // "A hundred bucks!!!"
2009-09-09 20:42:44 +00:00
playActorAnimation ( 673 ) ;
2009-09-05 20:58:25 +00:00
loadScene ( 11 , scene - > getPosition ( ) ) ;
playSound ( 24 , 31 ) ;
playSound ( 24 , 48 ) ;
playSound ( 79 , 50 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 674 , true ) ;
2009-11-09 21:34:01 +00:00
playAnimation ( 675 , 0 , true ) ;
2009-09-05 20:58:25 +00:00
waitAnimation ( ) ;
loadScene ( 28 , 0 , 167 , 2 ) ;
2010-03-21 07:38:09 +00:00
playMusic ( 10 ) ;
2009-09-05 20:58:25 +00:00
moveTo ( 66 , 167 , 2 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_wantBloodMsg ) ; // "I want Blood!"
2009-09-05 20:58:25 +00:00
inventory - > clear ( ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemSuperGlue ) ;
2009-09-05 20:58:25 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_showHerMoneyMsg ) ; // "If I just show her the money, she might take it"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x8b82 : // use fan on laundry
2009-09-03 20:59:17 +00:00
setOns ( 0 , 0 ) ;
2009-11-08 21:59:26 +00:00
playSound ( 5 , 3 ) ;
playSound ( 5 , 6 ) ;
playSound ( 5 , 10 ) ;
playSound ( 92 , 20 ) ;
playSound ( 92 , 38 ) ;
playSound ( 92 , 58 ) ;
2012-07-22 03:55:46 +00:00
displayAsyncMessage ( dsAddr_yawnMsg , 30 , 114 , 58 , 67 ) ; // "(yawn)"
2009-09-09 20:42:44 +00:00
playActorAnimation ( 602 ) ;
2009-11-08 21:59:26 +00:00
playSound ( 5 , 3 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 603 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 0 , 27 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_laundryState , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x8bfc : // Give bone to dog
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_hereBoyMsg ) ; // "Here, boy"
2009-09-03 20:59:17 +00:00
playSound ( 5 , 3 ) ;
2009-11-08 20:53:55 +00:00
playSound ( 26 , 13 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 657 , true ) ;
2009-11-08 20:53:55 +00:00
playAnimation ( 658 , 0 , true ) ;
2009-09-03 20:59:17 +00:00
waitAnimation ( ) ;
2009-09-15 08:54:06 +00:00
2010-01-08 18:48:32 +00:00
reloadLan ( ) ;
2009-11-08 20:53:55 +00:00
playAnimation ( 659 , 0 ) ;
2009-09-15 08:54:06 +00:00
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemBone ) ;
2012-08-01 13:44:51 +00:00
SET_FLAG ( dsAddr_dogHasBoneFlag , 1 ) ;
2009-11-08 20:53:55 +00:00
{
2011-10-23 00:05:05 +00:00
Object * o = scene - > getObject ( 7 ) ;
2012-09-24 01:51:26 +00:00
o - > actorRect . left = o - > actorRect . right = 297 ;
o - > actorRect . top = o - > actorRect . bottom = 181 ;
o - > actorOrientation = 1 ;
2009-11-08 20:53:55 +00:00
o - > save ( ) ;
}
{
2011-10-23 00:05:05 +00:00
Object * o = scene - > getObject ( 9 ) ;
2012-09-24 01:51:26 +00:00
o - > actorRect . left = o - > actorRect . right = 297 ;
o - > actorRect . top = o - > actorRect . bottom = 181 ;
o - > actorOrientation = 1 ;
2009-11-08 20:53:55 +00:00
o - > save ( ) ;
}
{
2011-10-23 00:05:05 +00:00
Walkbox * w = scene - > getWalkbox ( 0 ) ;
2009-11-08 20:53:55 +00:00
w - > rect . right = 266 ;
w - > rect . bottom = 193 ;
w - > save ( ) ;
}
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_friendsNowMsg ) ; // "I hope we're friends now"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x8c6e : // Use car jack on rock
2009-09-03 20:59:17 +00:00
playSound ( 5 , 3 ) ;
2009-11-08 19:10:24 +00:00
playSound ( 26 , 13 ) ;
playSound ( 24 , 22 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 592 ) ;
2009-09-03 20:59:17 +00:00
playSound ( 1 , 5 ) ;
2009-11-08 19:10:24 +00:00
playSound ( 1 , 9 ) ;
playSound ( 1 , 13 ) ;
setOns ( 0 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 593 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 0 , 28 ) ;
enableObject ( 1 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemCarJack ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x8cc8 : // Cut bush with sickle
2009-09-05 15:04:37 +00:00
playSound ( 5 , 3 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 644 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 1 , 45 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 56 , 2 ) ;
playSound ( 26 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 645 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 56 , 1 ) ;
playSound ( 56 , 6 ) ;
playSound ( 26 , 3 ) ;
playSound ( 26 , 8 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 646 ) ;
2009-09-05 15:04:37 +00:00
playSound ( 5 , 21 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 647 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_caveThornsCutDownFlag , 1 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemSickleSharp ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 2 ) ;
2012-09-24 01:51:26 +00:00
scene - > getObject ( 3 ) - > actorRect . right = 156 ;
2009-11-08 20:53:55 +00:00
scene - > getObject ( 3 ) - > save ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-28 08:44:16 +00:00
case csAddr_mouseOutOfHoleTimeout : // mouse falls back from the hole (cave)
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_timedCallbackState , 1 ) ) {
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemMouse ) ;
2009-11-08 22:37:03 +00:00
playSound ( 24 , 26 ) ;
playActorAnimation ( 650 , true ) ;
playAnimation ( 651 , 2 , true ) ;
waitAnimation ( ) ;
} else {
playSound ( 27 , 5 ) ;
setOns ( 1 , 0 ) ;
playActorAnimation ( 652 ) ;
playSound ( 24 , 4 ) ;
playSound ( 5 , 12 ) ;
moveTo ( 186 , 179 , 1 , true ) ;
playActorAnimation ( 653 ) ;
playActorAnimation ( 654 , true ) ;
playAnimation ( 655 , 2 , true ) ;
waitAnimation ( ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_mouseGoneMsg ) ; // "The mouse has gone!"
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemRock ) ;
2009-11-08 22:37:03 +00:00
setLan ( 2 , 4 , 27 ) ;
enableObject ( 4 , 27 ) ;
2012-07-28 09:57:26 +00:00
SET_FLAG ( dsAddr_mouseHoleState , 0 ) ;
2010-01-25 01:39:44 +00:00
}
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 0 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-11-08 22:37:03 +00:00
2012-07-16 23:04:27 +00:00
case csAddr_putRockInHole :
2012-07-22 23:50:19 +00:00
fnPutRockInHole ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-03 20:59:17 +00:00
case 0x8f1d :
2012-07-11 17:20:26 +00:00
dialog - > showMark ( 72 , scene ) ;
2009-09-15 08:54:06 +00:00
for ( uint i = 16 ; i < = 30 ; i + = 2 )
2009-09-05 20:58:25 +00:00
playSound ( 56 , i ) ;
playSound ( 2 , 64 ) ;
playSound ( 3 , 74 ) ;
2012-07-22 03:55:46 +00:00
displayAsyncMessage ( dsAddr_lastChanceMsg , 212 , 80 , 35 , 50 ) ; // "Last chance?"
2009-09-09 20:42:44 +00:00
playActorAnimation ( 516 , true ) ;
2009-09-05 20:58:25 +00:00
playAnimation ( 517 , 2 , true ) ;
playAnimation ( 518 , 3 , true ) ;
waitAnimation ( ) ;
2009-11-08 21:59:26 +00:00
setLan ( 3 , 0 ) ;
setLan ( 4 , 0 ) ;
2009-09-03 20:59:17 +00:00
disableObject ( 2 ) ;
disableObject ( 3 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemShotgun ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_birdsGoneFromScarecrowFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 20:58:25 +00:00
case 0x8fc8 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_comeHereMsg ) ; // "Come here, I've got something for you"
2009-11-07 12:01:45 +00:00
waitLanAnimationFrame ( 2 , 4 ) ;
2009-09-05 20:58:25 +00:00
playSound ( 5 , 3 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 627 , true ) ;
2009-09-05 20:58:25 +00:00
playAnimation ( 629 , 1 , true ) ;
waitAnimation ( ) ;
playSound ( 41 , 10 ) ;
playSound ( 41 , 47 ) ;
playSound ( 55 , 52 ) ;
2012-08-01 18:26:46 +00:00
if ( CHECK_FLAG ( dsAddr_HankerchiefInMouseholeFlag , 1 ) ) {
2009-09-05 20:58:25 +00:00
setLan ( 2 , 0 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 628 , true ) ;
2009-09-05 20:58:25 +00:00
playAnimation ( 634 , 1 , true ) ;
waitAnimation ( ) ;
disableObject ( 4 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_trappedMouseMsg ) ; // "The mouse is trapped!"
2012-07-28 09:57:26 +00:00
SET_FLAG ( dsAddr_mouseHoleState , 1 ) ;
2009-09-05 20:58:25 +00:00
} else {
2009-09-09 20:42:44 +00:00
playActorAnimation ( 628 , true ) ;
2009-09-05 20:58:25 +00:00
playAnimation ( 630 , 1 , true ) ;
waitAnimation ( ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_cantCatchMsg ) ; // "I can't catch it!"
2009-09-05 20:58:25 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x9054 : // mouse hole
2012-07-28 09:57:26 +00:00
if ( CHECK_FLAG ( dsAddr_mouseGotGoldNuggetFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_nonsenseMsg ) ; // "Nonsense"
2009-09-03 20:59:17 +00:00
} else {
2009-09-05 15:04:37 +00:00
playSound ( 5 , 11 ) ;
playSound ( 49 , 21 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 632 ) ;
2009-09-03 20:59:17 +00:00
setOns ( 5 , 40 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 239 , 139 , 0 , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 633 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_HankerchiefInMouseholeFlag , 1 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemHandkerchief ) ;
2012-07-28 09:57:26 +00:00
if ( ! CHECK_FLAG ( dsAddr_mouseNerveMsgSaidFlag , 1 ) ) {
SET_FLAG ( dsAddr_mouseNerveMsgSaidFlag , 1 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_mouseNerveMsg ) ; // "Boy, this mouse has some nerve!"
2009-09-03 20:59:17 +00:00
}
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x933d :
2012-07-26 05:06:44 +00:00
if ( fnIsCookGone ( ) ) {
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionRadioBrokenFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_breakFlattenMsg ) ; // "I wanted to break it, not to flatten it!"
2012-07-11 23:01:26 +00:00
else {
setOns ( 1 , 0 ) ;
playSound ( 5 , 3 ) ;
playSound ( 5 , 33 ) ;
playSound ( 24 , 13 ) ;
playSound ( 24 , 19 ) ;
playSound ( 24 , 23 ) ;
playSound ( 24 , 26 ) ;
playSound ( 24 , 29 ) ;
playSound ( 23 , 21 ) ;
playSound ( 74 , 25 ) ;
playActorAnimation ( 716 ) ;
setOns ( 1 , 66 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionRadioBrokenFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
}
2009-09-05 23:01:03 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x93af : // sheet + hot plate
2012-07-26 05:06:44 +00:00
if ( fnIsCookGone ( ) ) {
2012-07-11 23:01:26 +00:00
playSound ( 5 , 3 ) ;
playSound ( 86 , 11 ) ;
playActorAnimation ( 720 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemBurningPaper ) ;
inventory - > remove ( kInvItemSheetOfPaper ) ;
2012-07-11 23:01:26 +00:00
}
break ;
2009-09-15 08:54:06 +00:00
2012-07-12 20:03:47 +00:00
case 0x93d5 : // burning sheet + plate
2009-09-07 22:52:51 +00:00
setOns ( 4 , 0 ) ;
playSound ( 87 , 7 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 722 ) ;
2009-09-07 22:52:51 +00:00
playSound ( 5 , 3 ) ;
playSound ( 88 , 12 ) ;
playSound ( 87 , 24 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 723 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_burnBabyMsg ) ; // "Burn, baby, burn!"
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2009-09-07 22:52:51 +00:00
playSound ( 89 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 724 ) ;
2009-09-07 22:52:51 +00:00
setOns ( 4 , 68 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_voilaMsg ) ; // "Voila"
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemBurningPaper ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionPutBurningPaperInFridgeFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-09-12 05:32:54 +00:00
case csAddr_openFullToolbox : // Right click to open toolbox
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemToolboxFull ) ;
inventory - > add ( kInvItemToolboxHalfEmpty ) ;
inventory - > add ( kInvItemCarJack ) ;
2009-09-03 20:59:17 +00:00
inventory - > activate ( false ) ;
inventory - > resetSelectedObject ( ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_carJackMsg ) ; // "Wow! There's a car jack inside! Great!"
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-09-12 05:32:54 +00:00
case csAddr_openHalfEmptyToolbox :
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemToolboxHalfEmpty ) ;
inventory - > add ( kInvItemSpanner ) ;
2009-09-03 20:59:17 +00:00
inventory - > activate ( false ) ;
inventory - > resetSelectedObject ( ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_spannerMsg ) ; // "There's something else inside the toolbox! A spanner!"
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x671d : // very last part of the game
2009-09-05 23:01:03 +00:00
moveTo ( 153 , 163 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 973 ) ;
2012-08-01 07:24:40 +00:00
if ( CHECK_FLAG ( dsAddr_drawerPuzzleBookValue , 0 ) ) {
SET_FLAG ( dsAddr_drawerPuzzleBookValue , _rnd . getRandomNumber ( 5 ) + 1 ) ;
2009-09-05 23:01:03 +00:00
}
loadScene ( 30 , 18 , 159 , 2 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x67a6 :
loadScene ( 29 , 149 , 163 , 1 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 974 ) ;
2009-09-06 09:40:14 +00:00
moveTo ( 160 , 188 , 0 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x6805 :
2012-07-26 05:06:44 +00:00
fnEgoBottomRightTurn ( ) ;
2009-11-09 23:22:35 +00:00
playSound ( 32 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 694 ) ;
2009-09-06 09:40:14 +00:00
playSound ( 15 , 8 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 693 , 0 ) ;
2009-09-06 09:40:14 +00:00
setOns ( 6 , 0 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_fullAutomaticMsg ) ; // "Fully Automatic"
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemVideoTape ) ;
2009-09-06 09:40:14 +00:00
disableObject ( 4 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_egoBottomRightTurn :
2012-07-26 05:06:44 +00:00
fnEgoBottomRightTurn ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x687a : // using the book
2012-08-01 07:24:40 +00:00
if ( CHECK_FLAG ( dsAddr_drawerPuzzleSolvedFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_dontMessMsg ) ; // "I don't need to mess with it anymore"
2009-09-06 09:40:14 +00:00
} else {
playSound ( 49 , 5 ) ;
playSound ( 49 , 17 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 691 ) ;
2012-07-26 05:06:44 +00:00
if ( ! fnCheckingDrawers ( ) ) {
2012-08-01 07:24:40 +00:00
if ( ! CHECK_FLAG ( dsAddr_drawerPuzzleBookMessageFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_bookHeldMsg ) ; // "Something's got hold of the book!"
2012-08-01 07:24:40 +00:00
SET_FLAG ( dsAddr_drawerPuzzleBookMessageFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
}
} else {
2012-07-11 23:01:26 +00:00
playSound ( 15 , 8 ) ; // secret compartment
2009-11-09 23:22:35 +00:00
playAnimation ( 692 , 0 ) ;
2009-09-06 09:40:14 +00:00
setOns ( 6 , 59 ) ;
enableObject ( 4 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_secretCompartmentMsg ) ; // "Wow! A secret compartment!"
2012-08-01 07:24:40 +00:00
SET_FLAG ( dsAddr_drawerPuzzleSolvedFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
}
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-26 05:06:44 +00:00
case csAddr_checkingDrawers :
fnCheckingDrawers ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x6918 :
2012-10-09 08:14:44 +00:00
if ( inventory - > has ( kInvItemSheetOfPaper ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noMoreSheetsMsg ) ; // "Right now I don't need any more sheets"
2012-07-11 23:01:26 +00:00
else {
2012-08-01 12:18:20 +00:00
if ( ! CHECK_FLAG ( dsAddr_mansionTrashcanSearchedFlag , 1 ) ) {
2012-07-11 23:01:26 +00:00
playActorAnimation ( 695 ) ;
dialog - > showMark ( 91 , scene ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_mansionTrashcanSearchedFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
}
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
playSound ( 5 , 11 ) ;
playActorAnimation ( 696 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemSheetOfPaper ) ;
2012-07-11 23:01:26 +00:00
}
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x6962 :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_blueDrawerOpenFlag , 1 ) ) {
2009-09-06 09:40:14 +00:00
setOns ( 0 , 0 ) ;
playSound ( 67 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 678 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_blueDrawerOpenFlag , 0 ) ;
} else if ( CHECK_FLAG ( dsAddr_redDrawerOpenFlag , 1 ) ) {
2012-07-26 05:06:44 +00:00
fnDrawerOpenMessage ( ) ;
2009-09-06 09:40:14 +00:00
} else {
playSound ( 66 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 677 ) ;
2009-09-06 09:40:14 +00:00
setOns ( 0 , 53 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_blueDrawerOpenFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x69b8 :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_redDrawerOpenFlag , 1 ) ) {
2009-09-06 09:40:14 +00:00
setOns ( 1 , 0 ) ;
playSound ( 67 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 680 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_redDrawerOpenFlag , 0 ) ;
} else if ( CHECK_FLAG ( dsAddr_blueDrawerOpenFlag , 1 ) ) {
2012-07-26 05:06:44 +00:00
fnDrawerOpenMessage ( ) ;
2012-08-01 15:17:37 +00:00
} else if ( CHECK_FLAG ( dsAddr_greyDrawerOpenFlag , 1 ) ) {
2012-07-26 05:06:44 +00:00
fnDrawerOpenMessage ( ) ;
2009-09-06 09:40:14 +00:00
} else {
playSound ( 66 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 679 ) ;
2009-09-06 09:40:14 +00:00
setOns ( 1 , 54 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_redDrawerOpenFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x6a1b :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_greyDrawerOpenFlag , 1 ) ) {
2009-09-06 09:40:14 +00:00
setOns ( 2 , 0 ) ;
playSound ( 67 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 682 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_greyDrawerOpenFlag , 0 ) ;
} else if ( CHECK_FLAG ( dsAddr_redDrawerOpenFlag , 1 ) ) {
2012-07-26 05:06:44 +00:00
fnDrawerOpenMessage ( ) ;
2009-09-06 09:40:14 +00:00
} else {
playSound ( 67 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 681 ) ;
2009-09-06 09:40:14 +00:00
setOns ( 2 , 55 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_greyDrawerOpenFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x6a73 :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_greenDrawerOpenFlag , 1 ) ) {
2009-09-06 09:40:14 +00:00
setOns ( 3 , 0 ) ;
playSound ( 67 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 684 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_greenDrawerOpenFlag , 0 ) ;
} else if ( ! CHECK_FLAG ( dsAddr_brownDrawerOpenFlag , 1 ) ) {
2009-09-06 09:40:14 +00:00
playSound ( 66 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 683 ) ;
2009-09-06 09:40:14 +00:00
setOns ( 3 , 56 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_greenDrawerOpenFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
} else
2012-07-26 05:06:44 +00:00
fnDrawerOpenMessage ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2009-09-06 09:40:14 +00:00
case 0x6acb :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_brownDrawerOpenFlag , 1 ) ) {
2009-09-06 09:40:14 +00:00
setOns ( 4 , 0 ) ;
playSound ( 67 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 686 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_brownDrawerOpenFlag , 0 ) ;
} else if ( CHECK_FLAG ( dsAddr_greenDrawerOpenFlag , 1 ) ) {
2012-07-26 05:06:44 +00:00
fnDrawerOpenMessage ( ) ;
2012-08-01 15:17:37 +00:00
} else if ( CHECK_FLAG ( dsAddr_pinkDrawerOpenFlag , 1 ) ) {
2012-07-26 05:06:44 +00:00
fnDrawerOpenMessage ( ) ;
2009-09-06 09:40:14 +00:00
} else {
playSound ( 66 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 685 ) ;
2009-09-06 09:40:14 +00:00
setOns ( 4 , 57 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_brownDrawerOpenFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x6b2e :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_pinkDrawerOpenFlag , 1 ) ) {
2009-09-06 09:40:14 +00:00
setOns ( 5 , 0 ) ;
playSound ( 67 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 688 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_pinkDrawerOpenFlag , 0 ) ;
} else if ( CHECK_FLAG ( dsAddr_brownDrawerOpenFlag , 1 ) ) {
2012-07-26 05:06:44 +00:00
fnDrawerOpenMessage ( ) ;
2009-09-06 09:40:14 +00:00
} else {
playSound ( 66 , 6 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 687 ) ;
2009-09-06 09:40:14 +00:00
setOns ( 5 , 58 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_pinkDrawerOpenFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_DrawerOpenMessage :
2012-07-26 05:06:44 +00:00
fnDrawerOpenMessage ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
2012-07-11 23:01:26 +00:00
case 0x6be1 : // handle to the bathroom
2012-08-01 13:44:51 +00:00
if ( CHECK_FLAG ( dsAddr_MansionJohnNotyEscapingFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_catchJohnFirstMsg ) ; // "I'd better catch John Noty first"
2012-07-11 23:01:26 +00:00
else {
2009-11-08 21:59:26 +00:00
playSound ( 88 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 808 ) ;
2009-11-08 21:59:26 +00:00
loadScene ( 36 , 41 , 195 , 2 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
case 0x6bad :
2009-09-05 23:01:03 +00:00
playSound ( 80 , 4 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 971 ) ;
2009-09-05 23:01:03 +00:00
loadScene ( 32 , 139 , 199 , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x6c45 :
playSound ( 89 , 6 ) ;
2012-08-01 15:17:37 +00:00
playActorAnimation ( CHECK_FLAG ( dsAddr_mansionHandleInDoorHoleFlag , 1 ) ? 985 : 806 ) ;
2009-09-05 23:01:03 +00:00
loadScene ( 34 , 40 , 133 , 2 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x6c83 :
2011-11-02 20:46:47 +00:00
waitLanAnimationFrame ( 1 , 1 ) ;
2012-08-05 20:47:38 +00:00
dialog - > pop ( scene , dsAddr_dialogStackRobotSafe , 0 , 727 , textColorMark , textColorMike , 0 , 1 ) ;
2012-08-01 18:26:46 +00:00
scene - > getObject ( 1 ) - > setName ( ( const char * ) res - > dseg . ptr ( dsAddr_scnObjNameMike ) ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionRobotSafeUnlockedFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x6c9d : // getting jar
2009-09-07 22:52:51 +00:00
setOns ( 0 , 71 ) ;
playSound ( 32 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 732 ) ;
2009-09-07 22:52:51 +00:00
disableObject ( 2 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemTimePills ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x6cc4 : // secret diary
2009-09-09 20:42:44 +00:00
playActorAnimation ( 754 ) ;
2009-11-09 23:22:35 +00:00
hideActor ( ) ;
2010-01-25 01:39:44 +00:00
2012-07-17 16:09:13 +00:00
displayCutsceneMessage ( dsAddr_cutsceneMsg0 , 30 , 95 ) ; // "A secret diary of ..."
2009-09-07 22:52:51 +00:00
playMusic ( 3 ) ;
loadScene ( 11 , scene - > getPosition ( ) ) ;
2009-11-09 23:22:35 +00:00
2009-09-07 22:52:51 +00:00
playAnimation ( 750 , 2 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 117 , scene , 751 , 529 , textColorProfessor , textColorMansionGuard , 2 , 1 ) ;
2009-09-07 22:52:51 +00:00
2009-11-09 23:22:35 +00:00
playAnimation ( 752 , 0 , true ) ;
2009-09-07 22:52:51 +00:00
playAnimation ( 753 , 1 , true ) ;
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 118 , scene , 529 , 751 , textColorMansionGuard , textColorProfessor , 1 , 2 ) ;
2010-01-25 01:39:44 +00:00
2009-09-07 22:52:51 +00:00
loadScene ( 30 , scene - > getPosition ( ) ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 108 , scene , 733 , 734 , textColorProfessor , textColorJohnNoty , 2 , 3 ) ;
2009-09-07 22:52:51 +00:00
playSound ( 75 , 13 ) ;
playSound ( 32 , 22 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 735 , 1 , true ) ;
playAnimation ( 736 , 2 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 109 , scene , 737 , 738 , textColorJohnNoty , textColorProfessor , 3 , 2 ) ;
2009-09-07 22:52:51 +00:00
playSound ( 32 , 1 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 739 , 1 , true ) ;
playAnimation ( 740 , 2 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 110 , scene , 733 , 734 , textColorProfessor , textColorJohnNoty , 2 , 3 ) ;
2009-09-07 22:52:51 +00:00
2009-11-09 23:22:35 +00:00
playAnimation ( 742 , 1 , true ) ;
playAnimation ( 741 , 2 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 111 , scene , 743 , 733 , textColorJohnNoty , textColorProfessor , 3 , 2 ) ;
2009-09-07 22:52:51 +00:00
2009-11-09 23:22:35 +00:00
playAnimation ( 744 , 1 , true ) ;
playAnimation ( 745 , 2 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 112 , scene , 734 , 733 , textColorJohnNoty , textColorProfessor , 3 , 2 ) ;
2009-09-15 08:54:06 +00:00
2009-11-09 23:22:35 +00:00
playAnimation ( 746 , 1 , true ) ;
playAnimation ( 747 , 2 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2009-11-09 23:22:35 +00:00
2012-08-03 15:28:58 +00:00
dialog - > show ( 113 , scene , 734 , 734 , textColorJohnNoty , textColorJohnNoty , 3 , 3 ) ;
dialog - > show ( 114 , scene , 748 , 748 , textColorJohnNoty , textColorJohnNoty , 3 , 3 ) ;
dialog - > show ( 115 , scene , 749 , 749 , textColorJohnNoty , textColorJohnNoty , 3 , 3 ) ;
dialog - > show ( 116 , scene , 748 , 748 , textColorJohnNoty , textColorJohnNoty , 3 , 3 ) ;
2009-09-07 22:52:51 +00:00
playMusic ( 10 ) ;
loadScene ( 32 , scene - > getPosition ( ) ) ;
2009-11-09 23:22:35 +00:00
showActor ( ) ;
2009-09-07 22:52:51 +00:00
playSound ( 26 , 10 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 755 ) ;
2009-09-07 22:52:51 +00:00
moveRel ( 0 , 0 , 3 ) ;
2009-09-15 08:54:06 +00:00
2012-08-03 15:28:58 +00:00
dialog - > showMark ( 119 , scene ) ;
2009-11-09 23:22:35 +00:00
hideActor ( ) ;
2009-09-07 22:52:51 +00:00
loadScene ( 31 , scene - > getPosition ( ) ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 123 , scene , 763 , 764 , textColorMansionGuard , textColorJohnNoty , 1 , 2 ) ;
2009-11-09 23:22:35 +00:00
2009-09-07 22:52:51 +00:00
loadScene ( 32 , scene - > getPosition ( ) ) ;
2009-11-09 23:22:35 +00:00
showActor ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMark ( 120 , scene ) ;
2009-09-07 22:52:51 +00:00
disableObject ( 3 ) ;
enableObject ( 7 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionJohnNotyOutsideBathroomFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x6f20 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionJohnNotyOutsideBathroomFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_cantHideMsg ) ; // "I can't hide here!"
2012-07-11 23:01:26 +00:00
else
2009-09-05 23:01:03 +00:00
rejectMessage ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x6f75 : // hiding in left corner
2009-09-07 22:52:51 +00:00
moveRel ( 0 , 0 , 3 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 756 ) ;
2009-11-09 23:22:35 +00:00
hideActor ( ) ;
2009-09-07 22:52:51 +00:00
playAnimation ( 758 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 121 , scene , 759 , 759 , textColorJohnNoty , textColorJohnNoty , 2 , 2 ) ;
2009-11-09 23:22:35 +00:00
2009-09-07 22:52:51 +00:00
playSound ( 40 , 5 ) ;
playSound ( 52 , 13 ) ;
playSound ( 52 , 17 ) ;
playSound ( 52 , 21 ) ;
playAnimation ( 760 , 1 ) ;
setOns ( 1 , 72 ) ;
setOns ( 2 , 73 ) ;
loadScene ( 31 , scene - > getPosition ( ) ) ;
playSound ( 58 , 5 ) ;
playSound ( 58 , 8 ) ;
playSound ( 58 , 10 ) ;
playSound ( 58 , 12 ) ;
playSound ( 58 , 14 ) ;
playAnimation ( 765 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 124 , scene , 766 , 766 , textColorMansionGuard , textColorMansionGuard , 1 , 1 ) ;
2009-09-07 22:52:51 +00:00
loadScene ( 32 , scene - > getPosition ( ) ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 122 , scene , 761 , 761 , textColorJohnNoty , textColorJohnNoty , 2 , 2 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 762 , 1 ) ;
2009-09-07 22:52:51 +00:00
setOns ( 2 , 0 ) ;
2009-11-09 23:22:35 +00:00
showActor ( ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 757 ) ;
2009-09-07 22:52:51 +00:00
moveRel ( 0 , 0 , 1 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_wasCloseMsg ) ; // "That was close"
2009-09-07 22:52:51 +00:00
enableObject ( 8 ) ;
disableObject ( 7 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionJohnNotyOutsideBathroomFlag , 0 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-05 23:01:03 +00:00
case 0x6f4d :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionJohnNotyOutsideBathroomFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_johnOutsideMsg ) ; // "There's John Noty outside! I can't go out!"
2012-07-11 23:01:26 +00:00
else
2009-09-05 23:01:03 +00:00
loadScene ( 31 , 139 , 172 , 3 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x6f32 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionJohnNotyOutsideBathroomFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_cantHideMsg ) ; // "I can't hide here!"
2009-09-05 23:01:03 +00:00
} else {
2009-09-09 20:42:44 +00:00
playActorAnimation ( 977 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_lockedMsg ) ; // "It's Locked!"
2009-09-05 23:01:03 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-07 22:52:51 +00:00
case 0x7096 :
playSound ( 32 , 5 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 767 ) ;
2009-09-07 22:52:51 +00:00
setOns ( 1 , 0 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemHandle ) ;
2009-09-07 22:52:51 +00:00
disableObject ( 8 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-31 12:17:56 +00:00
case 0x7218 :
rejectMessage ( ) ;
break ;
2009-09-05 23:01:03 +00:00
case 0x7291 :
playSound ( 89 , 3 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 975 ) ;
2009-09-05 23:01:03 +00:00
loadScene ( 31 , 298 , 177 , 4 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x72c2 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionSinkState , 2 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_enoughWaterMsg ) ; // "There's enough water in the sink"
2009-09-06 09:40:14 +00:00
} else {
playSound ( 79 , 6 ) ;
playSound ( 84 , 9 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 801 ) ;
2010-02-02 08:12:45 +00:00
wait ( 50 ) ;
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionSinkState , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_sinkFullMsg ) ; // "The sink is full of hot water"
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionSinkState , 2 ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_waterHotMsg ) ; // "The water looks very hot"
2009-09-06 09:40:14 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x7309 :
playSound ( 66 , 5 ) ;
playSound ( 67 , 11 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 976 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_emptyMsg ) ; // "It's Empty"
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2009-11-09 23:22:35 +00:00
case 0x77d5 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionThruFanByTimePillFlag , 1 ) & & ! CHECK_FLAG ( dsAddr_MansionVentFanStoppedFlag , 1 ) ) { // disallow exiting through the first door until switch turned on, not present in original game
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noSaladMsg ) ; // "I don't want to turn myself into a salad"
2012-07-11 23:01:26 +00:00
} else {
playSound ( 89 , 6 ) ;
playActorAnimation ( 978 ) ;
loadScene ( 31 , 298 , 177 , 4 ) ;
2010-01-08 18:48:32 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x79e4 :
2012-07-26 05:06:44 +00:00
fnEgoBottomRightTurn ( ) ;
2012-07-11 23:01:26 +00:00
retVal = false ;
break ;
2009-09-15 08:54:06 +00:00
2012-07-12 20:03:47 +00:00
case 0x79eb : // color of the book
2012-07-22 03:55:46 +00:00
// FIXME - Replace with internal lookup and switch
2012-08-01 07:24:40 +00:00
displayMessage ( res - > dseg . get_word ( dsAddr_bookColorMsgPtr + GET_FLAG ( dsAddr_drawerPuzzleBookValue ) * 2 - 2 ) ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x79fd :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_blueDrawerOpenFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_blueInteriorMsg ) ; // "It's got a blue interior"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-06 09:40:14 +00:00
case 0x7a0f :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_redDrawerOpenFlag , 1 ) ) {
if ( ! CHECK_FLAG ( dsAddr_drawerGotPolaroidFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_foundPolaroidMsg ) ; // "There's a polaroid inside! I might need that"
2009-09-06 09:40:14 +00:00
playSound ( 5 , 11 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 690 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemPolaroidCamera ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_drawerGotPolaroidFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
}
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_redInteriorMsg ) ; // "It's got a red interior"
2009-09-06 09:40:14 +00:00
} else
2012-07-11 23:01:26 +00:00
retVal = false ;
break ;
2009-09-06 09:40:14 +00:00
case 0x7a49 :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_greyDrawerOpenFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_greyInteriorMsg ) ; // "It's got a grey interior"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-06 09:40:14 +00:00
case 0x7a5b :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_greenDrawerOpenFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_greenInteriorMsg ) ; // "It's got a green interior"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-06 09:40:14 +00:00
case 0x7a6d :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_brownDrawerOpenFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_brownInteriorMsg ) ; // "It's got a brown interior"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-06 09:40:14 +00:00
case 0x7a7f :
2012-08-01 15:17:37 +00:00
if ( CHECK_FLAG ( dsAddr_pinkDrawerOpenFlag , 1 ) ) {
if ( ! CHECK_FLAG ( dsAddr_drawerGotDictaphoneFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_dictaphoneInsideMsg ) ; // "Wow! There's a dictaphone inside!"
2009-09-06 09:40:14 +00:00
playSound ( 5 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 689 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemDictaphoneNoBatteries ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_drawerGotDictaphoneFlag , 1 ) ;
2009-09-06 09:40:14 +00:00
}
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_pinkInteriorMsg ) ; // "It's got a pink interior"
2009-09-06 09:40:14 +00:00
} else
2012-07-11 23:01:26 +00:00
retVal = false ;
break ;
2010-01-25 01:39:44 +00:00
2009-11-09 23:22:35 +00:00
case 0x7af7 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionPutBurningPaperInFridgeFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_yummyMsg ) ; // "Yummy"
2012-07-11 23:01:26 +00:00
else
retVal = false ;
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x7b09 :
{
2012-08-01 12:18:20 +00:00
byte v = GET_FLAG ( dsAddr_MansionSinkState ) ;
2012-07-11 23:01:26 +00:00
switch ( v ) {
case 1 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_corkInHoleMsg ) ; // "The cork is stuck in the hole"
2012-07-11 23:01:26 +00:00
break ;
case 2 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_sinkFullMsg ) ; // "The sink is full of hot water"
2012-07-11 23:01:26 +00:00
break ;
default :
retVal = false ;
break ;
}
2009-09-05 23:01:03 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_robotSafeAlreadyUnlockedCheck :
2012-07-26 05:06:44 +00:00
fnRobotSafeAlreadyUnlockedCheck ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-07 22:52:51 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_robotSafeUnlockCheck :
2012-07-26 05:06:44 +00:00
fnRobotSafeUnlockCheck ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x90bc : // handle on the hole
2009-09-07 22:52:51 +00:00
playSound ( 5 , 3 ) ;
playSound ( 6 , 9 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 807 ) ;
2009-09-07 22:52:51 +00:00
setOns ( 0 , 83 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemHandle ) ;
2009-09-07 22:52:51 +00:00
disableObject ( 2 ) ;
enableObject ( 3 ) ;
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_mansionHandleInDoorHoleFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x90fc : // dictaphone on robot
2012-07-26 05:06:44 +00:00
if ( fnRobotSafeAlreadyUnlockedCheck ( ) ) {
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionRobotSafeVoiceTestPassedFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_fooledOnceMsg ) ; // "I'd already fooled him once"
2012-07-11 23:01:26 +00:00
} else {
2012-08-01 12:18:20 +00:00
if ( ! CHECK_FLAG ( dsAddr_usedDictaphoneOnTVFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_notMyVoiceMsg ) ; // "I won't cheat Mike with MY voice"
2012-07-11 23:01:26 +00:00
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_mikeVoiceTestMsg ) ; // "Mike, activate the voice test"
2012-07-11 23:01:26 +00:00
waitLanAnimationFrame ( 1 , 1 ) ;
playSound ( 5 , 3 ) ;
playSound ( 5 , 39 ) ;
2012-08-03 15:28:58 +00:00
displayAsyncMessage ( dsAddr_singingMsg , 68 , 126 , 9 , 35 , textColorJohnNoty ) ; // "siiiiinging!"
2012-07-11 23:01:26 +00:00
playActorAnimation ( 728 ) ;
waitLanAnimationFrame ( 1 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 98 , scene , 0 , 727 , textColorMark , textColorMike , 0 , 1 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionRobotSafeVoiceTestPassedFlag , 1 ) ;
2012-07-26 05:06:44 +00:00
fnRobotSafeUnlockCheck ( ) ;
2012-07-11 23:01:26 +00:00
}
}
2009-09-07 22:52:51 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-07 22:52:51 +00:00
2012-07-11 23:01:26 +00:00
case 0x91cb : // use socks on robot
2012-07-26 05:06:44 +00:00
if ( fnRobotSafeAlreadyUnlockedCheck ( ) ) {
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionRobotSafeScentTestPassedFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_fooledOnceMsg ) ; // "I'd already fooled him once"
2012-07-11 23:01:26 +00:00
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_mikeScentTestMsg ) ; // "Mike, let's get on with the scent test"
2009-09-07 22:52:51 +00:00
2012-07-11 23:01:26 +00:00
waitLanAnimationFrame ( 1 , 1 ) ;
playSound ( 5 , 3 ) ;
playSound ( 5 , 23 ) ;
playActorAnimation ( 729 ) ;
2009-09-07 22:52:51 +00:00
2012-07-11 23:01:26 +00:00
waitLanAnimationFrame ( 1 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 99 , scene , 0 , 727 , textColorMark , textColorMike , 0 , 1 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionRobotSafeScentTestPassedFlag , 1 ) ;
2012-07-26 05:06:44 +00:00
fnRobotSafeUnlockCheck ( ) ;
2012-07-11 23:01:26 +00:00
}
2009-09-07 22:52:51 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-11-09 23:22:35 +00:00
2012-07-11 23:01:26 +00:00
case 0x9209 : // photo on robot
2012-07-26 05:06:44 +00:00
if ( fnRobotSafeAlreadyUnlockedCheck ( ) ) {
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionRobotSafeViewTestPassedFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_fooledOnceMsg ) ; // "I'd already fooled him once"
2012-07-11 23:01:26 +00:00
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_mikeViewTestMsg ) ; // "Mike, run the view test"
2012-07-11 23:01:26 +00:00
waitLanAnimationFrame ( 1 , 1 ) ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
playSound ( 5 , 3 ) ;
playSound ( 5 , 25 ) ;
playActorAnimation ( 730 ) ;
2009-09-07 22:52:51 +00:00
2012-07-11 23:01:26 +00:00
waitLanAnimationFrame ( 1 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 100 , scene , 0 , 727 , textColorMark , textColorMike , 0 , 1 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionRobotSafeViewTestPassedFlag , 1 ) ;
2012-07-26 05:06:44 +00:00
fnRobotSafeUnlockCheck ( ) ;
2012-07-11 23:01:26 +00:00
}
2009-09-07 22:52:51 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-31 12:17:56 +00:00
case 0x9247 :
displayMessage ( dsAddr_sameBottleMsg ) ; // "The bottle's the same, but I doubt if it's enough to fool anyone"
break ;
2009-09-07 22:52:51 +00:00
case 0x924e :
setOns ( 2 , 64 ) ;
playSound ( 5 , 3 ) ;
playSound ( 52 , 10 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 711 ) ;
2009-09-07 22:52:51 +00:00
moveRel ( 0 , 0 , 4 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 95 , scene , 0 , 709 , textColorMark , textColorCook , 0 , 1 ) ;
2009-09-07 22:52:51 +00:00
moveTo ( 300 , 190 , 4 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemFakeChilli ) ;
2009-09-07 22:52:51 +00:00
disableObject ( 8 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 712 , 0 ) ;
2009-09-07 22:52:51 +00:00
setOns ( 2 , 0 ) ;
playSound ( 15 , 26 ) ;
playSound ( 15 , 28 ) ;
playSound ( 16 , 37 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 713 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 96 , scene , 0 , 709 , textColorMark , textColorCook , 0 , 1 ) ;
2009-09-07 22:52:51 +00:00
playSound ( 85 , 2 ) ;
2009-11-09 23:22:35 +00:00
playAnimation ( 714 , 0 ) ;
2009-09-07 22:52:51 +00:00
setLan ( 1 , 0 ) ;
disableObject ( 1 ) ;
2009-09-27 05:17:00 +00:00
{
Object * obj = scene - > getObject ( 2 ) ;
2012-09-24 01:51:26 +00:00
obj - > actorRect . left = obj - > actorRect . right = 81 ;
obj - > actorRect . top = obj - > actorRect . bottom = 160 ;
obj - > actorOrientation = 4 ;
2009-09-27 05:17:00 +00:00
obj - > save ( ) ;
}
{
Object * obj = scene - > getObject ( 3 ) ;
2012-09-24 01:51:26 +00:00
obj - > actorRect . left = obj - > actorRect . right = 64 ;
obj - > actorRect . top = obj - > actorRect . bottom = 168 ;
obj - > actorOrientation = 4 ;
2009-09-27 05:17:00 +00:00
obj - > save ( ) ;
}
{
Object * obj = scene - > getObject ( 10 ) ;
2012-09-24 01:51:26 +00:00
obj - > actorRect . left = obj - > actorRect . right = 105 ;
obj - > actorRect . top = obj - > actorRect . bottom = 160 ;
obj - > actorOrientation = 1 ;
2009-09-27 05:17:00 +00:00
obj - > save ( ) ;
}
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionCookGoneFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-06 09:40:14 +00:00
case 0x9472 :
playSound ( 5 , 4 ) ;
playSound ( 19 , 14 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 793 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_fitsPerfectMsg ) ; // "It fits perfectly!"
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemWrappedCork ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionSinkState , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-12 20:03:47 +00:00
case 0x9449 : // meat + stew
2009-09-07 22:52:51 +00:00
playSound ( 5 , 4 ) ;
playSound ( 63 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 726 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_dislikeVealMsg ) ; // "I never liked veal anyway"
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemMeat ) ;
inventory - > add ( kInvItemPlasticBag ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
case 0x949b :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_MansionSinkState , 2 ) ) {
2009-09-06 09:40:14 +00:00
playSound ( 5 , 4 ) ;
playSound ( 5 , 25 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 802 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_labelOffMsg ) ; // "The label has come off!"
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemChilliWithLabel ) ;
inventory - > add ( kInvItemChilliNoLabel ) ;
inventory - > add ( kInvItemLabel ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noHotWaterMsg ) ; // "There's no hot water in the sink"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x94d4 :
2012-10-09 08:14:44 +00:00
if ( inventory - > has ( kInvItemPlasticBag ) ) {
2009-09-05 23:01:03 +00:00
setOns ( 0 , 0 ) ;
playSound ( 5 , 3 ) ;
playSound ( 5 , 18 ) ;
playSound ( 13 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 803 ) ;
2009-09-05 23:01:03 +00:00
disableObject ( 7 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemPlasticBag ) ;
inventory - > add ( kInvItemSocks ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_noSockStoreMsg ) ; // "I don't have anything to store these socks in"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-09-05 23:01:03 +00:00
case 0x951b :
playSound ( 5 , 4 ) ;
playSound ( 5 , 22 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 804 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_corkTooSmallMsg ) ; // "The cork is a bit too small"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2009-12-14 07:25:06 +00:00
case 0x73a3 :
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_mansionTVOnFlag , 1 ) ) {
SET_FLAG ( dsAddr_mansionTVOnFlag , 0 ) ;
2009-12-14 07:25:06 +00:00
//call 73e6
playSound ( 71 , 3 ) ;
playActorAnimation ( 700 ) ;
playAnimation ( 0 , 0 , true ) ;
reloadLan ( ) ;
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_mansionVCRPlayingTapeFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_muchBetterMsg ) ; // "That's much better"
2009-12-14 07:25:06 +00:00
}
} else {
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_mansionTVOnFlag , 1 ) ;
2009-12-14 07:25:06 +00:00
//call 73e6
playSound ( 71 , 3 ) ;
playActorAnimation ( 700 ) ;
reloadLan ( ) ;
}
2012-07-11 23:01:26 +00:00
break ;
2009-12-14 07:25:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x9537 : // using remote on VCR
2009-09-07 22:52:51 +00:00
playSound ( 5 , 3 ) ;
playSound ( 5 , 16 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 703 ) ;
2012-08-01 12:18:20 +00:00
if ( ! CHECK_FLAG ( dsAddr_mansionVCRTapeLoadedFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_NotHappenMsg ) ; // "Nothing happened"
2012-07-11 23:01:26 +00:00
else {
//0x955a
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_mansionVCRPlayingTapeFlag , 0 ) ) {
if ( CHECK_FLAG ( dsAddr_mansionTVOnFlag , 1 ) ) {
if ( ! CHECK_FLAG ( dsAddr_mansionVCRPlayedTapeBeforeFlag , 1 ) )
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_tapeStartedMsg ) ; // "The tape started!"
2012-07-11 23:01:26 +00:00
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_mansionVCRPlayingTapeFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
reloadLan ( ) ;
2012-08-01 12:18:20 +00:00
if ( ! CHECK_FLAG ( dsAddr_mansionVCRPlayedTapeBeforeFlag , 1 ) ) {
2012-08-03 15:28:58 +00:00
dialog - > show ( 93 , scene , 0 , 702 , textColorMark , textColorJohnNoty , 0 , 1 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_mansionVCRPlayedTapeBeforeFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
}
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_tvOffMsg ) ; // "I just realised that the TV is off"
2012-07-11 23:01:26 +00:00
} else {
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_mansionVCRPlayingTapeFlag , 0 ) ;
if ( CHECK_FLAG ( dsAddr_mansionTVOnFlag , 1 ) ) {
2012-07-11 23:01:26 +00:00
reloadLan ( ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_muchBetterMsg ) ; // "That's much better"
2009-09-07 22:52:51 +00:00
}
}
2009-12-14 07:25:06 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
case 0x95eb : // polaroid + tv
2012-08-01 12:18:20 +00:00
if ( CHECK_FLAG ( dsAddr_mansionVCRPlayingTapeFlag , 1 ) ) {
if ( CHECK_FLAG ( dsAddr_usedPolaroidOnTVFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_enoughPhotosMsg ) ; // "I don't need any more photos"
2009-09-07 22:52:51 +00:00
} else {
playSound ( 5 , 3 ) ;
playSound ( 5 , 24 ) ;
playSound ( 90 , 18 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 707 ) ;
2012-10-09 08:14:44 +00:00
inventory - > add ( kInvItemPhoto ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_usedPolaroidOnTVFlag , 1 ) ;
2009-09-07 22:52:51 +00:00
}
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_notRightMomentMsg ) ; // "I don't think this is the right moment"
2012-07-11 23:01:26 +00:00
break ;
2009-09-07 22:52:51 +00:00
2012-08-01 12:18:20 +00:00
case 0x962f : // dictaphone + tv
if ( CHECK_FLAG ( dsAddr_mansionVCRPlayingTapeFlag , 1 ) ) {
if ( CHECK_FLAG ( dsAddr_usedDictaphoneOnTVFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_alreadyRecordedMsg ) ; // "I already recorded what I wanted to"
2009-09-07 22:52:51 +00:00
} else {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_recordScareMsg ) ; // "Yeah, I can record this and scare the cats"
2009-09-07 22:52:51 +00:00
playSound ( 5 , 3 ) ;
playSound ( 5 , 27 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 708 ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_usedDictaphoneOnTVFlag , 1 ) ;
2009-09-07 22:52:51 +00:00
}
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_notRightMomentMsg ) ; // "I don't think this is the right moment"
2012-07-11 23:01:26 +00:00
break ;
2009-09-07 22:52:51 +00:00
case 0x95c8 :
playSound ( 5 , 3 ) ;
playSound ( 91 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 706 ) ;
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemVideoTape ) ;
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_mansionVCRTapeLoadedFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-31 12:17:56 +00:00
case 0x966c :
displayMessage ( dsAddr_cantRecordNoBatteriesMsg ) ; // "I can't record anything until I find some batteries"
break ;
2012-07-11 23:01:26 +00:00
case 0x9673 : // hit fatso - final scene
2009-09-07 22:52:51 +00:00
playSound ( 5 , 3 ) ;
playSound ( 24 , 10 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 798 ) ;
2009-09-07 22:52:51 +00:00
playSound ( 63 , 11 ) ;
playSound ( 19 , 20 ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 799 , 0 ) ;
2009-09-07 22:52:51 +00:00
moveTo ( 50 , 170 , 1 ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 800 , 0 , true , true , true ) ;
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 805 ) ;
2009-09-07 22:52:51 +00:00
moveTo ( 50 , 170 , 3 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_onlyChilliMsg ) ; // "Good this red stuff is only a chilli"
2009-09-07 22:52:51 +00:00
//moveTo(105, 157, 0, true);
playMusic ( 3 ) ;
2009-12-08 20:40:26 +00:00
loadScene ( 11 , 105 , 157 , 4 ) ;
2010-01-25 01:39:44 +00:00
2012-08-03 15:28:58 +00:00
dialog - > show ( 203 , scene , 0 , 938 , textColorMark , textColorCaptain , 0 , 1 ) ;
2009-09-07 22:52:51 +00:00
2009-12-08 20:40:26 +00:00
playAnimation ( 939 , 0 , true , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 942 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2009-12-08 20:40:26 +00:00
playAnimation ( 939 , 0 , true , true ) ;
playAnimation ( 935 , 1 , true , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 943 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2010-01-25 01:39:44 +00:00
2009-12-08 20:40:26 +00:00
playAnimation ( 940 , 0 , true , true ) ;
playAnimation ( 936 , 1 , true , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 944 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2010-01-25 01:39:44 +00:00
2009-12-08 20:40:26 +00:00
playAnimation ( 941 , 0 , true , true ) ;
playAnimation ( 937 , 1 , true , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 945 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2009-09-15 08:54:06 +00:00
2012-08-03 15:28:58 +00:00
dialog - > show ( 204 , scene , 0 , 938 , textColorMark , textColorCaptain , 0 , 1 ) ;
2009-12-08 20:40:26 +00:00
playAnimation ( 946 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 205 , scene , 0 , 938 , textColorMark , textColorCaptain , 0 , 1 ) ;
2009-09-15 08:54:06 +00:00
2009-09-07 22:52:51 +00:00
playSound ( 24 , 7 ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 948 , 0 , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 947 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2009-09-15 08:54:06 +00:00
2009-09-07 22:52:51 +00:00
loadScene ( 40 , 198 , 186 , 1 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 206 , scene , 0 , 920 , textColorMark , textColorRGBBoss , 0 , 1 ) ;
dialog - > show ( 207 , scene , 0 , 921 , textColorMark , textColorRGBBoss , 0 , 1 ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 923 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > show ( 208 , scene , 0 , 920 , textColorMark , textColorRGBBoss , 0 , 1 ) ;
2009-09-07 22:52:51 +00:00
moveTo ( 237 , 186 , 0 ) ;
moveTo ( 237 , 177 , 0 ) ;
2009-12-08 20:40:26 +00:00
moveTo ( 192 , 177 , 4 ) ;
2010-02-07 17:46:29 +00:00
playAnimation ( 949 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 209 , scene , 950 , textColorRGBBoss , 1 ) ;
2009-09-15 08:54:06 +00:00
2009-09-07 22:52:51 +00:00
playSound ( 32 , 5 ) ;
playSound ( 40 , 14 ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 951 , 0 , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 952 , true ) ;
2009-09-07 22:52:51 +00:00
waitAnimation ( ) ;
2009-09-15 08:54:06 +00:00
2009-09-07 22:52:51 +00:00
playMusic ( 11 ) ;
2009-12-08 22:04:00 +00:00
displayCredits ( ) ;
2009-09-07 22:52:51 +00:00
loadScene ( 39 , 192 , 177 , 0 ) ;
2009-11-10 07:29:29 +00:00
hideActor ( ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 210 , scene , 953 , textColorMarkEnd , 1 ) ;
2009-09-07 22:52:51 +00:00
playSound ( 5 , 15 ) ;
2009-11-10 07:29:29 +00:00
playAnimation ( 954 , 0 ) ;
2012-08-03 15:28:58 +00:00
dialog - > showMono ( 211 , scene , 955 , textColorMarkEnd , 1 ) ;
2009-09-07 22:52:51 +00:00
playMusic ( 2 ) ;
2012-07-17 01:21:40 +00:00
displayCredits ( dsAddr_finalCredits6 , 4500 ) ; // 3 minutes (infinite until key pressed in original)
2009-09-15 20:21:18 +00:00
scene - > push ( SceneEvent ( SceneEvent : : kQuit ) ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-09-12 05:32:54 +00:00
case csAddr_useDivingEquipment : // using diving eq
2012-07-31 12:17:56 +00:00
// FIXME - Some code is missing here as displayMessage(dsAddr_cantTalkUnderwaterMsg),
// displayMessage(dsAddr_notSwimmingThereMsg), displayMessage(dsAddr_tooLittleAirMsg)
// displayMessage(dsAddr_fishDontWorryMsg) are never called.
2012-07-11 23:01:26 +00:00
{
int id = scene - > getId ( ) ;
if ( id ! = 15 ) {
2012-07-22 03:55:46 +00:00
if ( id = = 16 )
displayMessage ( dsAddr_notHereMsg ) ; // "Not here"
else
displayMessage ( dsAddr_notBestPlaceMsg ) ; // "It's not the best place for diving"
2012-07-11 23:01:26 +00:00
} else {
playSound ( 5 , 3 ) ;
playSound ( 38 , 16 ) ;
playSound ( 38 , 22 ) ;
playActorAnimation ( 614 ) ;
playSound ( 5 , 3 ) ;
playSound ( 44 , 10 ) ;
playSound ( 20 , 26 ) ;
playActorAnimation ( 615 ) ;
loadScene ( 17 , 156 , 180 , 3 ) ;
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 4 ) ;
2012-07-11 23:01:26 +00:00
playSound ( 64 , 7 ) ;
playSound ( 64 , 21 ) ;
playSound ( 64 , 42 ) ;
playSound ( 64 , 63 ) ;
2012-07-28 08:44:16 +00:00
setTimerCallback ( csAddr_noAnchorTimeout , 30 ) ;
2012-07-11 23:01:26 +00:00
playActorAnimation ( 617 , false , true ) ;
}
2009-09-05 20:58:25 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2012-07-28 08:44:16 +00:00
case csAddr_noAnchorTimeout : // no anchor, timeout
2012-08-01 18:26:46 +00:00
SET_FLAG ( dsAddr_timedCallbackState , 0 ) ;
2012-07-26 05:06:44 +00:00
fnGetOutOfLake ( ) ;
2012-08-01 18:26:46 +00:00
INC_FLAG ( dsAddr_lakeDivingExitMessage ) ;
switch ( GET_FLAG ( dsAddr_lakeDivingExitMessage ) ) {
2009-11-09 07:58:27 +00:00
case 1 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_seaweedMsg ) ; // "This seaweed is just like the flowers I gave mum on her last birthday"
2009-11-09 07:58:27 +00:00
break ;
case 2 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_fishBoatMsg ) ; // "I wonder what fish do inside this boat at night"
2009-11-09 07:58:27 +00:00
break ;
case 3 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_fishSomethingMsg ) ; // "I think I have to fish out something down there"
2009-11-09 07:58:27 +00:00
break ;
case 4 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_notRedHerringMsg ) ; // "I hope all this fish stuff is not a red herring"
2009-11-09 07:58:27 +00:00
break ;
case 5 :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_seaweedMsg ) ; // "This seaweed is just like the flowers I gave mum on her last birthday"
2009-11-09 07:58:27 +00:00
break ;
2010-01-25 01:39:44 +00:00
default :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_niceDownMsg ) ; // "It's nice down there"
2012-07-11 23:01:26 +00:00
break ;
2009-11-09 07:58:27 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2012-07-16 23:04:27 +00:00
case csAddr_gotAnchor :
2012-07-22 23:50:19 +00:00
fnGotAnchor ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_getOutOfLake :
2012-07-26 05:06:44 +00:00
fnGetOutOfLake ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2010-01-25 01:39:44 +00:00
2012-09-12 05:32:54 +00:00
case csAddr_digMansionWall :
2009-09-05 17:15:28 +00:00
if ( scene - > getId ( ) = = 13 ) {
moveTo ( 172 , 181 , 1 ) ;
playSound ( 26 , 19 ) ;
2009-09-15 08:54:06 +00:00
for ( uint i = 0 ; i < 8 ; + + i )
2009-09-05 17:15:28 +00:00
playSound ( 26 , 30 + i * 11 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 661 ) ;
2012-07-17 16:09:13 +00:00
displayCutsceneMessage ( dsAddr_cutsceneMsgA , 84 , 95 ) ; // "Hundred moments later"
2009-09-05 17:15:28 +00:00
playSound ( 56 , 10 ) ;
playSound ( 56 , 21 ) ;
playSound ( 8 , 48 ) ;
2009-09-15 08:54:06 +00:00
for ( uint i = 0 ; i < 7 ; + + i )
2009-09-05 17:15:28 +00:00
playSound ( 26 , 117 + i * 11 ) ;
2009-09-15 08:54:06 +00:00
2009-09-05 17:15:28 +00:00
moveRel ( - 20 , 0 , 0 , true ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 662 , true ) ;
2009-09-05 17:15:28 +00:00
playAnimation ( 663 , 2 , true ) ;
waitAnimation ( ) ;
setOns ( 1 , 49 ) ;
2009-09-15 08:54:06 +00:00
2012-07-17 16:09:13 +00:00
displayCutsceneMessage ( dsAddr_cutsceneMsgB , 53 , 95 ) ; // "Another hundred moments later"
2009-09-05 17:15:28 +00:00
moveTo ( 162 , 184 , 0 , true ) ;
playSound ( 26 , 6 ) ;
playSound ( 26 , 17 ) ;
playSound ( 56 , 10 ) ;
playSound ( 56 , 21 ) ;
playSound ( 19 , 27 ) ;
playSound ( 24 , 38 ) ;
playSound ( 23 , 44 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 664 ) ;
2009-11-08 21:59:26 +00:00
playAnimation ( 665 , 1 ) ;
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_foundCrudeOilMsg ) ; // "At least I found crude oil and I'll be rich"
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_myLifeMsg ) ; // "That's my life"
2012-10-09 08:14:44 +00:00
inventory - > remove ( kInvItemShovelAct2 ) ;
2012-07-26 05:06:44 +00:00
fnMansionIntrusionAttempt ( ) ;
2009-09-15 08:54:06 +00:00
} else
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_notThinkRightPlaceMsg ) ; // "I don't think this is the right place"
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-09-12 07:33:13 +00:00
case csAddr_tooDarkHere :
displayMessage ( dsAddr_cantDoTooDarkMsg ) ; // "I can't do anything here, it's too dark"
break ;
2012-09-12 05:32:54 +00:00
case csAddr_examineBanknote :
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_bankNoteMsg ) ; // "It's a note from some bank..."
2012-08-01 07:24:40 +00:00
SET_FLAG ( dsAddr_examinedBanknoteFlag , 1 ) ;
2012-07-11 23:01:26 +00:00
retVal = false ;
break ;
2009-09-03 20:59:17 +00:00
2012-09-12 05:32:54 +00:00
case csAddr_useTimePills : // use pills
2009-09-03 20:59:17 +00:00
if ( scene - > getId ( ) ! = 36 ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_notTryNowMsg ) ; // "There's no need to try them now"
2012-08-01 15:17:37 +00:00
} else if ( CHECK_FLAG ( dsAddr_mansionAlreadyUsedTimePillsFlag , 1 ) ) {
2012-07-22 03:55:46 +00:00
displayMessage ( dsAddr_nahMsg ) ; // "Nah"
2009-09-03 20:59:17 +00:00
} else {
2012-08-01 15:17:37 +00:00
SET_FLAG ( dsAddr_mansionAlreadyUsedTimePillsFlag , 1 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 102 , 195 , 2 ) ;
playSound ( 5 , 3 ) ;
playSound ( 75 , 12 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 794 ) ;
2010-02-02 08:12:45 +00:00
wait ( 100 ) ;
2009-09-07 22:52:51 +00:00
setLan ( 1 , 0 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 151 , 197 , 2 ) ;
2009-09-09 20:42:44 +00:00
playActorAnimation ( 795 ) ;
2009-09-05 15:04:37 +00:00
moveTo ( 186 , 198 , 2 , true ) ;
moveTo ( 220 , 198 , 4 ) ;
2010-03-24 19:34:08 +00:00
{
2011-10-23 00:05:05 +00:00
Walkbox * w = scene - > getWalkbox ( 0 ) ;
2010-03-24 19:34:08 +00:00
w - > rect . left = 0 ;
2012-10-09 08:14:44 +00:00
w - > rect . bottom = kScreenHeight - 1 ;
2010-03-24 19:34:08 +00:00
w - > save ( ) ;
}
2009-09-07 22:52:51 +00:00
setLan ( 1 , 0xff ) ;
2009-09-15 08:54:06 +00:00
2012-07-11 17:20:26 +00:00
dialog - > showMark ( 130 , scene ) ;
2009-09-03 20:59:17 +00:00
2009-09-27 05:17:00 +00:00
Object * obj = scene - > getObject ( 1 ) ;
2012-09-24 01:51:26 +00:00
obj - > actorRect . left = obj - > actorRect . right = 270 ;
obj - > actorRect . top = obj - > actorRect . bottom = 193 ;
obj - > actorOrientation = 2 ;
2009-09-27 05:17:00 +00:00
obj - > save ( ) ;
2009-09-03 20:59:17 +00:00
obj = scene - > getObject ( 3 ) ;
2012-09-24 01:51:26 +00:00
obj - > actorRect . left = obj - > actorRect . right = 254 ;
obj - > actorRect . top = obj - > actorRect . bottom = 193 ;
obj - > actorOrientation = 1 ;
2009-09-27 05:17:00 +00:00
obj - > save ( ) ;
2010-01-25 01:39:44 +00:00
2012-08-01 12:18:20 +00:00
SET_FLAG ( dsAddr_MansionThruFanByTimePillFlag , 1 ) ;
2009-09-03 20:59:17 +00:00
}
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-25 23:39:05 +00:00
case csAddr_mansionIntrusionAttempt :
2012-07-26 05:06:44 +00:00
retVal = fnMansionIntrusionAttempt ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-26 20:32:39 +00:00
case csAddr_secondMansionIntrusion :
2012-07-26 21:35:22 +00:00
fnSecondMansionIntrusion ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-26 20:32:39 +00:00
case csAddr_thirdMansionIntrusion :
2012-07-26 21:35:22 +00:00
fnThirdMansionIntrusion ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-26 20:32:39 +00:00
case csAddr_fourthMansionIntrusion :
2012-07-26 21:35:22 +00:00
fnFourthMansionIntrusion ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-26 20:32:39 +00:00
case csAddr_fifthMansionIntrusion :
2012-07-26 21:35:22 +00:00
fnFifthMansionIntrusion ( ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-15 08:54:06 +00:00
2012-07-26 20:32:39 +00:00
case csAddr_sixthMansionIntrusion :
2012-07-26 21:35:22 +00:00
fnSixthMansionIntrusion ( ) ;
2012-07-11 23:01:26 +00:00
break ;
default :
2012-09-02 03:56:20 +00:00
error ( " unknown callback 0x%04x called " , addr ) ;
2012-07-11 23:01:26 +00:00
break ;
2009-09-03 20:59:17 +00:00
}
2009-09-15 08:54:06 +00:00
2012-07-11 23:01:26 +00:00
return retVal ;
2009-09-03 20:59:17 +00:00
}
2009-09-04 20:08:33 +00:00
} // End of namespace TeenAgent