ScummVM API documentation
main.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 PETKA_MAIN_H
23#define PETKA_MAIN_H
24
25#include "audio/mixer.h"
26
27#include "petka/interfaces/interface.h"
28#include "petka/interfaces/dialog_interface.h"
29
30namespace Petka {
31
32struct BGInfo {
33 uint16 objId;
34 Common::Array<uint16> attachedObjIds;
35};
36
37class Sound;
38
39class InterfaceMain : public Interface {
40public:
42
43 void start(int id) override;
44
45 void update(uint time) override;
46
47 void loadRoom(int id, bool fromSave);
48
49 const BGInfo *findBGInfo(int id) const;
50
51 void unloadRoom(bool fromSave);
52
53 void onLeftButtonDown(Common::Point p) override;
54 void onRightButtonDown(Common::Point p) override;
55 void onMouseMove(Common::Point p) override;
56
57 void setTextChoice(const Common::Array<Common::U32String> &choices, uint16 color, uint16 outlineColor, uint16 selectedColor);
58 void setTextDescription(const Common::U32String &text, int frame);
59
60 void removeTextDescription();
61
62private:
63 void playSound(int id, Audio::Mixer::SoundType type);
64
65public:
66 DialogInterface _dialog;
68 int _roomId;
69 bool _hasTextDesc;
70};
71
72} // End of namespace Petka
73
74#endif
SoundType
Definition: mixer.h:73
Definition: ustr.h:57
Definition: dialog_interface.h:41
Definition: interface.h:34
Definition: main.h:39
Definition: sound.h:36
Definition: rect.h:144
Definition: main.h:32