ScummVM API documentation
oko.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  * This file is dual-licensed.
22  * In addition to the GPLv3 license mentioned above, this code is also
23  * licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
24  * full text of the license.
25  *
26  */
27 
28 #ifndef GOB_MINIGAMES_GEISHA_OKO_H
29 #define GOB_MINIGAMES_GEISHA_OKO_H
30 
31 #include "gob/aniobject.h"
32 
33 namespace Gob {
34 
35 class Sound;
36 class SoundDesc;
37 
38 namespace Geisha {
39 
41 class Oko : public ANIObject {
42 public:
43  enum State {
44  kStateEnter,
45  kStateSwim,
46  kStateSink,
47  kStateRaise,
48  kStateBreathe,
49  kStatePick,
50  kStateHurt,
51  kStateDead
52  };
53 
54  Oko(const ANIFile &ani, Sound &sound, SoundDesc &breathe);
55  ~Oko() override;
56 
58  void advance() override;
59 
61  void sink();
63  void raise();
64 
66  void hurt();
67 
69  void die();
70 
71  State getState() const;
72 
73  bool isBreathing() const;
74  bool isMoving() const;
75 
76 private:
77  Sound *_sound;
78  SoundDesc *_breathe;
79 
80  State _state;
81 
82  uint8 _level;
83 };
84 
85 } // End of namespace Geisha
86 
87 } // End of namespace Gob
88 
89 #endif // GOB_MINIGAMES_GEISHA_OKO_H
Definition: aniobject.h:42
void advance() override
Definition: anifile.h:40
Definition: sound.h:46
Definition: sounddesc.h:43
Definition: anifile.h:53
Definition: oko.h:41