ScummVM API documentation
credit_text.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 TITANIC_CREDIT_TEXT_H
23 #define TITANIC_CREDIT_TEXT_H
24 
25 #include "titanic/core/list.h"
26 
27 namespace Titanic {
28 
29 class CGameObject;
30 class CScreenManager;
31 
32 class CCreditLine : public ListItem {
33 public:
34  CString _line;
35  uint _lineWidth;
36 public:
37  CCreditLine() : _lineWidth(0) {}
38  CCreditLine(const CString &line, uint lineWidth) : _line(line), _lineWidth(lineWidth) {}
39 };
41 
42 class CCreditLineGroup : public ListItem {
43 public:
44  CCreditLines _lines;
45 };
47 
48 class CCreditText {
49 private:
53  void setup();
54 
58  CString readLine(Common::SeekableReadStream *stream);
59 
63  void handleDots(CCreditLineGroup *group);
64 public:
65  CScreenManager *_screenManagerP;
66  Rect _rect;
67  CCreditLineGroups _groups;
68  uint _ticks;
69  int _fontHeight;
70  CGameObject *_objectP;
72  CCreditLines::iterator _lineIt;
73  int _yOffset;
74  int _priorInc;
75  int _textR, _textG, _textB;
76  int _deltaR, _deltaG, _deltaB;
77  int _counter;
78 public:
79  CCreditText();
80 
84  void clear();
85 
89  void load(CGameObject *obj, CScreenManager *screenManager,
90  const Rect &rect);
91 
95  bool draw();
96 };
97 
98 } // End of namespace Titanic
99 
100 #endif /* TITANIC_CREDIT_TEXT_H */
void load(SimpleFile *file) override
Definition: credit_text.h:48
Definition: list.h:35
Definition: stream.h:745
Definition: screen_manager.h:49
Definition: game_object.h:79
Definition: rect.h:35
Definition: arm.h:30
Definition: string.h:40
Definition: list_intern.h:51
Definition: credit_text.h:42
Definition: credit_text.h:32