22 #ifndef LASTEXPRESS_MENU_H 23 #define LASTEXPRESS_MENU_H 25 #include "lastexpress/data/sequence.h" 27 #include "lastexpress/eventhandler.h" 29 #include "lastexpress/shared.h" 31 #include "common/hashmap.h" 35 class LastExpressEngine;
47 void show(
bool doSavegame, SavegameType type, uint32 value);
53 bool isShown()
const {
return _isShowingMenu; }
55 GameId getGameId()
const {
return _gameId; }
59 enum StartMenuAction {
64 kMenuSwitchSaveGame = 6,
73 kMenuConstantinople = 16,
74 kMenuDecreaseVolume = 17,
75 kMenuIncreaseVolume = 18,
76 kMenuDecreaseBrightness = 19,
77 kMenuIncreaseBrightness = 20
92 enum StartMenuOverlay {
118 bool _hasShownStartScreen;
121 bool _isShowingCredits;
126 uint16 _creditsSequenceIndex;
130 uint32 _checkHotspotsTicks;
134 void init(
bool doSavegame, SavegameType type, uint32 value);
137 void checkHotspots();
138 void setLogicEventHandlers();
150 struct MenuOverlays_EqualTo {
151 bool operator()(
const StartMenuOverlay &x,
const StartMenuOverlay &y)
const {
return x == y; }
154 struct MenuOverlays_Hash {
155 uint operator()(
const StartMenuOverlay &x)
const {
return x; }
163 void showFrame(StartMenuOverlay overlay,
int index,
bool redraw);
168 void moveToCity(CityButton city,
bool clicked);
180 uint32 _currentIndex;
184 bool _handleTimeDelta;
186 void initTime(SavegameType type, uint32 val);
187 void updateTime(uint32 time);
189 void adjustIndex(uint32 time1, uint32 time2,
bool searchEntry);
190 void goToTime(uint32 time);
194 bool hasTimeDelta() {
return (_currentTime - _time) >= 1; }
198 uint32 getVolume()
const;
199 void setVolume(uint32 volume)
const;
200 uint32 getBrightness()
const;
201 void setBrightness(uint32 brightness)
const;
206 #endif // LASTEXPRESS_MENU_H
Definition: lastexpress.h:69
EventType
Definition: events.h:49
Definition: eventhandler.h:36
Definition: animation.h:45
Definition: sequence.h:151
Definition: trainline.h:32