1 /* ResidualVM - A 3D game interpreter 2 * 3 * ResidualVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the AUTHORS 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef PUZZLES_H_ 24 #define PUZZLES_H_ 25 26 #include "common/scummsys.h" 27 28 #include "graphics/surface.h" 29 30 namespace Myst3 { 31 32 class Myst3Engine; 33 34 class Puzzles { 35 public: 36 Puzzles(Myst3Engine *vm); 37 virtual ~Puzzles(); 38 39 void run(uint16 id, uint16 arg0 = 0, uint16 arg1 = 0, uint16 arg2 = 0); 40 41 private: 42 Myst3Engine *_vm; 43 44 typedef int32 SymbolCodeSolution[4]; 45 46 struct PegCombination { 47 uint16 movie; 48 bool pegs[5]; 49 uint16 pegFrames[3]; 50 uint16 expireFrame; 51 }; 52 53 void leversBall(int16 var); 54 55 void tesla(int16 movie, int16 var, int16 move); 56 57 void resonanceRingControl(); 58 void resonanceRingsLaunchBall(); 59 void resonanceRingsLights(); 60 61 void pinball(int16 var); 62 const PegCombination *_pinballFindCombination(uint16 var, const PegCombination pegs[], uint16 size); 63 64 void weightDrag(uint16 var, uint16 movie); 65 66 void journalSaavedro(int16 move); 67 int16 _journalSaavedroLastPageLastChapterValue(); 68 uint16 _journalSaavedroGetNode(uint16 chapter); 69 uint16 _journalSaavedroPageCount(uint16 chapter); 70 bool _journalSaavedroHasChapter(uint16 chapter); 71 uint16 _journalSaavedroNextChapter(uint16 chapter, bool forward); 72 73 void journalAtrus(uint16 node, uint16 var); 74 void mainMenu(uint16 action); 75 void projectorLoadBitmap(uint16 bitmap); 76 void projectorAddSpotItem(uint16 bitmap, uint16 x, uint16 y); 77 void projectorUpdateCoordinates(); 78 79 void symbolCodesInit(uint16 var, uint16 posX, uint16 posY); 80 void symbolCodesClick(int16 var); 81 bool _symbolCodesCheckSolution(uint16 var, const SymbolCodeSolution &solution); 82 int32 _symbolCodesFound(); 83 84 void railRoadSwitchs(); 85 86 void rollercoaster(); 87 88 void settingsSave(); 89 90 void updateSoundScriptTimer(); 91 92 void checkCanSave(); 93 94 void _drawForVarHelper(int16 var, int32 startValue, int32 endValue); 95 void _drawXTicks(uint16 ticks); 96 }; 97 98 } // End of namespace Myst3 99 100 #endif // PUZZLES_H_ 101