ScummVM API documentation
hivemachine.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (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, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ASYLUM_PUZZLES_HIVEMACHINE_H
23 #define ASYLUM_PUZZLES_HIVEMACHINE_H
24 
25 #include "common/array.h"
26 
27 #include "asylum/puzzles/puzzle.h"
28 
29 namespace Asylum {
30 
31 class AsylumEngine;
32 
33 class PuzzleHiveMachine : public Puzzle {
34 public:
37 
38 private:
39  enum MusicalNote {
40  kMusicalNoteNone = -1,
41  kMusicalNoteF,
42  kMusicalNoteD,
43  kMusicalNoteE,
44  kMusicalNoteA,
45  kMusicalNoteB
46  };
47 
48  uint32 _counterRed, _counterGreen, _counterKey;
49  int32 _rectIndex;
50  uint32 _frameIndex, _frameIndex1;
52  MusicalNote _soundingNote;
53  uint32 _notesNumber;
54  bool _ok;
55 
57  // Event Handling
59  bool init(const AsylumEvent &evt);
60  bool mouseLeftDown(const AsylumEvent &evt);
61  bool exitPuzzle();
62 
64  // Helpers
66  void updateCursor();
67  int32 findRect();
68  void updateScreen();
69  void playSound();
70 };
71 
72 } // End of namespace Asylum
73 
74 #endif // ASYLUM_PUZZLES_HIVEMACHINE_H
Definition: hivemachine.h:33
Definition: asylum.h:53
Definition: eventhandler.h:43
Definition: asylum.h:73
Definition: puzzle.h:41