ScummVM API documentation
menu.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 LASTEXPRESS_MENU_H
23#define LASTEXPRESS_MENU_H
24
25#include "lastexpress/lastexpress.h"
26#include "lastexpress/shared.h"
27
28namespace LastExpress {
29
30class LastExpressEngine;
31
32struct Sprite;
33struct Seq;
34struct Event;
35struct Link;
36
37class Menu {
38public:
39 Menu(LastExpressEngine *engine);
40 ~Menu();
41
42 void doEgg(bool doSaveGame, int type, int32 time);
43 void endEgg();
44 void eggFree();
45 void eggMouse(Event *event);
46 void eggTimer(Event *event);
47 void clearSprites();
48 void updateEgg();
49 bool eggCursorAction(int8 action, int8 flags);
50 void setSprite(int sequenceType, int index, bool redrawFlag);
51 void setCity(int cityIndex);
52 void switchEggs(int whichEgg);
53 bool isShowingMenu();
54
55 void setEggTimerDelta(int delta);
56 int getEggTimerDelta();
57
58protected:
59 LastExpressEngine *_engine = nullptr;
60 bool _isShowingMenu = false;
61 bool _hasShownIntro = false;
62 bool _hasShownStartScreen = false;
63 Link *_currentHotspotLink = nullptr;
64 bool _moveClockHandsFlag = false;
65 int _eggTimerDelta = 15;
66 int32 _eggCurrentMouseFlags = 0;
67 int32 _eggCreditsIndex = 0;
68
69 Seq *_menuSeqs[8] = {
70 nullptr,
71 nullptr,
72 nullptr,
73 nullptr,
74 nullptr,
75 nullptr,
76 nullptr,
77 nullptr
78 };
79
80 Sprite *_startMenuFrames[8] = {
81 nullptr,
82 nullptr,
83 nullptr,
84 nullptr,
85 nullptr,
86 nullptr,
87 nullptr,
88 nullptr
89 };
90
91 char _eggButtonsSeqNames[8][13] = {
92 "helpnewr.seq",
93 "buttns.seq",
94 "quit.seq",
95 "bogus!.seq",
96 "jlinetl.seq",
97 "jlinecen.seq",
98 "jlinebr.seq",
99 "credits.seq"
100 };
101
102 uint8 _cityIndexes[8] = { 64, 128, 129, 130, 131, 132, 192, 0 };
103 bool _gameInNotStartedInFile = false;
104};
105
106} // End of namespace LastExpress
107
108#endif // LASTEXPRESS_MENU_H
Definition: lastexpress.h:523
Definition: menu.h:37
Definition: archive.h:29
Definition: events.h:62
Definition: lastexpress.h:212
Definition: lastexpress.h:159