ScummVM API documentation
mouth.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_MOUTH_H
29#define GOB_MINIGAMES_GEISHA_MOUTH_H
30
31#include "gob/aniobject.h"
32
33namespace Gob {
34
35namespace Geisha {
36
38class Mouth : public ANIObject {
39public:
40 Mouth(const ANIFile &ani, const CMPFile &cmp,
41 uint16 mouthAnim, uint16 mouthSprite, uint16 floorSprite);
42 ~Mouth() override;
43
45 void advance() override;
46
48 void activate();
49
51 bool isDeactivated() const;
52
54 void setPosition(int16 x, int16 y) override;
55
57 bool draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) override;
59 bool clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) override;
60
61private:
62 static const int kFloorCount = 2;
63
64 enum State {
65 kStateDeactivated,
66 kStateActivated,
67 kStateDead
68 };
69
70 ANIObject *_sprite;
71 ANIObject *_floor[kFloorCount];
72
73 State _state;
74};
75
76} // End of namespace Geisha
77
78} // End of namespace Gob
79
80#endif // GOB_MINIGAMES_GEISHA_MOUTH_H
Definition: anifile.h:53
Definition: aniobject.h:42
Definition: cmpfile.h:49
Definition: mouth.h:38
bool isDeactivated() const
bool clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) override
void advance() override
bool draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) override
void setPosition(int16 x, int16 y) override
Definition: surface.h:106