diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index de9a375..8af9684 100644
a
|
b
|
uint16 Myst::rocketSliderGetSound(uint16 pos) {
|
2292 | 2292 | return (uint16)(9530 + (pos - 216) * 35.0 / 61.0); |
2293 | 2293 | } |
2294 | 2294 | |
| 2295 | |
| 2296 | uint16 Myst::rocketCheckSolutionLogicHelper(uint16 sound1, uint16 sound2, uint16 logictype) { |
| 2297 | |
| 2298 | debugN("helper: %i %i %i (diff:%02i) ",sound1, sound2 , logictype, abs(sound1-sound2)); |
| 2299 | if (logictype==0) { |
| 2300 | |
| 2301 | if (sound1 != sound2) { |
| 2302 | debugN("strict : false \n"); |
| 2303 | return false; |
| 2304 | } |
| 2305 | |
| 2306 | } else { |
| 2307 | |
| 2308 | if ( abs(sound1-sound2)>=5) { |
| 2309 | debugN(" fuzzy : false \n"); |
| 2310 | return false; |
| 2311 | } |
| 2312 | |
| 2313 | } |
| 2314 | |
| 2315 | debugN("either : true \n"); |
| 2316 | return true; |
| 2317 | |
| 2318 | } |
| 2319 | |
2295 | 2320 | void Myst::rocketCheckSolution() { |
2296 | 2321 | _vm->_cursor->hideCursor(); |
2297 | 2322 | |
… |
… |
void Myst::rocketCheckSolution() {
|
2302 | 2327 | _vm->_sound->playEffect(soundId); |
2303 | 2328 | _rocketSlider1->drawConditionalDataToScreen(2); |
2304 | 2329 | _vm->wait(250); |
2305 | | if (soundId != 9558) |
| 2330 | if ( !rocketCheckSolutionLogicHelper(soundId,9558,0) ) |
2306 | 2331 | solved = false; |
2307 | 2332 | |
2308 | 2333 | soundId = rocketSliderGetSound(_rocketSlider2->_pos.y); |
2309 | 2334 | _vm->_sound->playEffect(soundId); |
2310 | 2335 | _rocketSlider2->drawConditionalDataToScreen(2); |
2311 | 2336 | _vm->wait(250); |
2312 | | if (soundId != 9546) |
| 2337 | if ( !rocketCheckSolutionLogicHelper(soundId,9546,1) ) |
2313 | 2338 | solved = false; |
2314 | 2339 | |
2315 | 2340 | soundId = rocketSliderGetSound(_rocketSlider3->_pos.y); |
2316 | 2341 | _vm->_sound->playEffect(soundId); |
2317 | 2342 | _rocketSlider3->drawConditionalDataToScreen(2); |
2318 | 2343 | _vm->wait(250); |
2319 | | if (soundId != 9543) |
| 2344 | if ( !rocketCheckSolutionLogicHelper(soundId,9543,1) ) |
2320 | 2345 | solved = false; |
2321 | 2346 | |
2322 | 2347 | soundId = rocketSliderGetSound(_rocketSlider4->_pos.y); |
2323 | 2348 | _vm->_sound->playEffect(soundId); |
2324 | 2349 | _rocketSlider4->drawConditionalDataToScreen(2); |
2325 | 2350 | _vm->wait(250); |
2326 | | if (soundId != 9553) |
| 2351 | if ( !rocketCheckSolutionLogicHelper(soundId,9553,1) ) |
2327 | 2352 | solved = false; |
2328 | 2353 | |
2329 | 2354 | soundId = rocketSliderGetSound(_rocketSlider5->_pos.y); |
2330 | 2355 | _vm->_sound->playEffect(soundId); |
2331 | 2356 | _rocketSlider5->drawConditionalDataToScreen(2); |
2332 | 2357 | _vm->wait(250); |
2333 | | if (soundId != 9560) |
| 2358 | if ( !rocketCheckSolutionLogicHelper(soundId,9560,1) ) |
2334 | 2359 | solved = false; |
2335 | 2360 | |
2336 | 2361 | _vm->_sound->stopEffect(); |
diff --git a/engines/mohawk/myst_stacks/myst.h b/engines/mohawk/myst_stacks/myst.h
index 3739630..6e8c9d9 100644
a
|
b
|
protected:
|
312 | 312 | |
313 | 313 | void rocketSliderMove(); |
314 | 314 | uint16 rocketSliderGetSound(uint16 pos); |
| 315 | uint16 rocketCheckSolutionLogicHelper(uint16 sound1, uint16 sound2, uint16 logictype); |
315 | 316 | void rocketCheckSolution(); |
316 | 317 | |
317 | 318 | void libraryBookPageTurnLeft(); |