ScummVM API documentation
logo_screen.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 ULTIMA3_VIEWS_LOGO_SCREEN_H
23#define ULTIMA3_VIEWS_LOGO_SCREEN_H
24
25#include "ultima/ultima3/views/window_view.h"
26
27namespace Ultima {
28namespace Ultima3 {
29namespace Views {
30
31constexpr int DEMO_COLS = 19;
32constexpr int DEMO_ROWS = 6;
33constexpr int MOVES_COUNT = 0x200;
34
40class LogoScreen : public WindowView {
41private:
42 byte _demo[DEMO_COLS * DEMO_ROWS] = {};
43 // The first half holds the tile each edit changes, and the second its new
44 // value. An edit with a tile of 0xFF is a pause of that many rounds
45 byte _moves[MOVES_COUNT * 2] = {};
46 int _movePos = MOVES_COUNT - 1;
47 int _roundsLeft = 0;
48
49 void fetchMove();
50
51public:
52 LogoScreen() : WindowView("LogoScreen") {}
53 ~LogoScreen() override {}
54
55 bool msgFocus(const FocusMessage &msg) override;
56 void draw() override;
57 void timeout() override;
58 bool msgKeypress(const KeypressMessage &msg) override;
59};
60
61} // namespace Views
62} // namespace Ultima3
63} // namespace Ultima
64
65#endif
Definition: logo_screen.h:40
Definition: window_view.h:38
Definition: messages.h:42
Definition: messages.h:54