ScummVM API documentation
win.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 ULTIMA1_VIEWS_INTERACTIONS_WIN_H
23#define ULTIMA1_VIEWS_INTERACTIONS_WIN_H
24
25#include "ultima/ultima1/views/interactions/interaction.h"
26#include "graphics/views/gfx_surface.h"
27
28namespace Ultima {
29namespace Ultima1 {
30namespace Views {
31namespace Interactions {
32
33using namespace Graphics::Views;
34
52class Win : public Interaction {
53private:
54 enum Phase {
55 PHASE_DIALOG,
56 PHASE_GLYPH
57 };
58
59 Phase _phase = PHASE_DIALOG;
60 uint32 _revealStartTime = 0;
61
62 // The ending text, rendered once into its own surface on focus, then
63 // revealed gradually from the top down as _revealedRows grows
64 Graphics::Views::GfxSurface _textSurface;
65 int _revealedRows = 0;
66 int _elapsedTicks = 0;
67
71 void drawDialog();
72
76 void renderEndingText();
77
82 void advancePhase();
83
84public:
85 Win() : Interaction("Win") {
86 }
87 ~Win() override {
88 }
89
90 bool msgFocus(const FocusMessage &msg) override;
91 bool msgAction(const ActionMessage &msg) override;
92 bool msgKeypress(const KeypressMessage &msg) override;
93 void draw() override;
94 bool tick() override;
95};
96
97} // namespace Interactions
98} // namespace Views
99} // namespace Ultima1
100} // namespace Ultima
101
102#endif
Definition: gfx_surface.h:34
Definition: messages.h:118
Definition: messages.h:42
Definition: messages.h:54