ScummVM API documentation
cstime_view.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 MOHAWK_CSTIME_VIEW_H
23#define MOHAWK_CSTIME_VIEW_H
24
25#include "mohawk/cstime.h"
26#include "mohawk/view.h"
27
28namespace Mohawk {
29
30class CSTimeModule : public Module {
31public:
33
34 // TODO: these don't really belong here
35 void init() override { }
36 void shutdown() override { }
37 void update() override { }
38
39 void defaultMoveProc(Feature *feature);
40 void defaultDrawProc(Feature *feature);
41 bool defaultTimeProc(Feature *feature);
42
43 void defaultPickupProc(NewFeature *feature, Common::Point pos, uint32 flags, Common::Rect *rect);
44 void defaultDropProc(NewFeature *feature);
45 void defaultDragMoveProc(NewFeature *feature);
46
47 void cursorMoveProc(Feature *feature);
48 void cursorDrawProc(Feature *feature);
49
50 void dialogTextMoveProc(Feature *feature);
51 void dialogTextDrawProc(Feature *feature);
52 void rolloverTextMoveProc(Feature *feature);
53 void rolloverTextDrawProc(Feature *feature);
54 void bubbleTextMoveProc(Feature *feature);
55 void bubbleTextDrawProc(Feature *feature);
56
57protected:
59};
60
61class CSTimeView : public View {
62public:
64
65 uint32 getTime() override;
66 void setupView();
67 Feature *installViewFeature(uint16 scrbId, uint32 flags, Common::Point *pos);
68
69 void installGroup(uint16 resourceId, uint size, uint count, bool regs, uint16 baseId);
70 void removeGroup(uint16 resourceId);
71
72 void loadBitmapCursors(uint16 baseId);
73 void setBitmapCursor(uint16 id);
74 uint16 getBitmapCursor() { return _bitmapCursorId; }
75
76 void dragFeature(NewFeature *feature, Common::Point pos, uint mode, uint32 flags, Common::Rect *rect);
77
78protected:
79 MohawkEngine_CSTime *_timeVm;
80
81 uint16 _bitmapCursorId;
82
83 uint16 _SCRBGroupResources[14];
84 void removeObjectsUsingBaseId(uint16 baseId);
85 void freeShapesUsingResourceId(uint16 resourceId);
86 void freeScriptsUsingResourceId(uint16 resourceId);
87 void groupFreeScript(uint index);
88 void groupAdjustView(uint index, uint count);
89
90 void finishDraw() override;
91};
92
93} // End of namespace Mohawk
94
95#endif
Definition: cstime_view.h:30
Definition: cstime_view.h:61
Definition: view.h:107
Definition: view.h:62
Definition: cstime.h:129
Definition: view.h:167
Definition: view.h:193
Definition: bitmap.h:32
Definition: rect.h:144
Definition: rect.h:536