ScummVM API documentation
parents.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_PREGOB_ONCEUPON_PARENTS_H
29 #define GOB_PREGOB_ONCEUPON_PARENTS_H
30 
31 #include "gob/sound/sounddesc.h"
32 
33 #include "gob/pregob/seqfile.h"
34 
35 namespace Gob {
36 
37 class Font;
38 
39 class GCTFile;
40 
41 namespace OnceUpon {
42 
44 class Parents : public SEQFile {
45 public:
46  Parents(GobEngine *vm, const Common::String &seq, const Common::String &gct,
47  const Common::String &childName, uint8 house, const Font &font,
48  const byte *normalPalette, const byte *brightPalette, uint paletteSize);
49  ~Parents() override;
50 
51  void play();
52 
53 protected:
54  void handleFrameEvent() override;
55  void handleInput(int16 key, int16 mouseX, int16 mouseY, MouseButtons mouseButtons) override;
56 
57 private:
58  static const uint kLoopCount = 7;
59 
60  static const uint16 kLoop[kLoopCount][3];
61 
62  enum Sound {
63  kSoundCackle = 0,
64  kSoundThunder ,
65  kSoundCount
66  };
67 
68  static const char *kSound[kSoundCount];
69 
70 
71  uint8 _house;
72 
73  const Font *_font;
74 
75  uint _paletteSize;
76  const byte *_normalPalette;
77  const byte *_brightPalette;
78 
79  SoundDesc _sounds[kSoundCount];
80 
81  GCTFile *_gct;
82 
83  uint _loopID[kLoopCount];
84  uint _currentLoop;
85 
86 
87  void lightningEffect();
88 
89  void playSound(Sound sound);
90  void setPalette(const byte *palette, uint size);
91 
92  void drawGCT(uint item, uint loop = 0xFFFF);
93 };
94 
95 } // End of namespace OnceUpon
96 
97 } // End of namespace Gob
98 
99 #endif // GOB_PREGOB_ONCEUPON_PARENTS_H
Definition: parents.h:44
Definition: gob.h:163
Definition: str.h:59
Definition: seqfile.h:58
Definition: gctfile.h:47
Definition: video.h:40
Definition: anifile.h:40
void handleInput(int16 key, int16 mouseX, int16 mouseY, MouseButtons mouseButtons) override
Definition: sounddesc.h:43
void handleFrameEvent() override