ScummVM API documentation
bbdou_bubble.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 ILLUSIONS_BBDOU_BBDOU_BUBBLE_H
23 #define ILLUSIONS_BBDOU_BBDOU_BUBBLE_H
24 
25 #include "illusions/specialcode.h"
26 #include "common/rect.h"
27 
28 namespace Illusions {
29 
30 class IllusionsEngine_BBDOU;
31 class BbdouSpecialCode;
32 class Control;
33 
34 struct BubbleStyle {
35  uint32 _showSequenceId;
36  uint32 _hideSequenceId;
37  int16 _count;
38  uint32 _progResKeywordId;
39  uint32 _baseNamedPointId;
40  uint32 _namedPointIds[32];
41  uint32 _objectId;
42  Common::Point _position;
43  BubbleStyle() : _count(0) {}
44 };
45 
46 struct BubbleIcon {
47  uint32 _objectId;
48  bool _enabled;
49  Common::Point _position;
50  uint32 _sequenceId;
51 };
52 
53 class BbdouBubble {
54 public:
56  ~BbdouBubble();
57  void init();
58  void addBubbleStyle(uint32 showSequenceId, uint32 hideSequenceId, uint32 progResKeywordId,
59  uint32 namedPointId, int16 count, uint32 *namedPointIds);
60  void show();
61  void hide();
62  void selectBubbleStyle(int16 minCount, Common::Point sourcePt, Common::Point destPt, uint32 progResKeywordId);
63  uint32 addBubbleIcon(uint positionIndex, uint32 sequenceId);
64  void calcBubbleTrail(Common::Point &sourcePt, Common::Point &destPt);
65 protected:
67  BbdouSpecialCode *_bbdou;
68  Common::Array<BubbleStyle> _bubbleStyles;
69  BubbleStyle *_currBubbleStyle;
70  BubbleStyle *_showingBubbleStyle;
71  BubbleStyle *_hidingBubbleStyle;
72  uint32 _trailObjectIds[32];
73  Common::Point _sourcePt;
74  Common::Point _destPt;
75  int _bubbleObjectId1;
76  int _bubbleObjectId2;
77  BubbleIcon _icons[32];
78 };
79 
80 } // End of namespace Illusions
81 
82 #endif // ILLUSIONS_BBDOU_BBDOU_BUBBLE_H
Definition: array.h:52
Definition: actor.h:34
Definition: bbdou_bubble.h:46
Definition: illusions_bbdou.h:60
Definition: rect.h:45
Definition: bbdou_bubble.h:34
Definition: bbdou_bubble.h:53
Definition: bbdou_specialcode.h:106