ScummVM
LastExpress::Menu Class Reference

#include <menu.h>

+ Inheritance diagram for LastExpress::Menu:
+ Collaboration diagram for LastExpress::Menu:

Classes

struct  MenuOverlays_EqualTo
 
struct  MenuOverlays_Hash
 

Public Member Functions

 Menu (LastExpressEngine *engine)
 
 ~Menu () override
 
void show (bool doSavegame, SavegameType type, uint32 value)
 
void eventMouse (const Common::Event &ev) override
 
void eventTick (const Common::Event &ev) override
 
bool isShown () const
 
GameId getGameId () const
 
- Public Member Functions inherited from LastExpress::EventHandler
virtual ~EventHandler ()
 

Private Types

enum  StartMenuAction {
  kMenuContinue = 1, kMenuCredits = 2, kMenuQuitGame = 3, kMenuCase4 = 4,
  kMenuSwitchSaveGame = 6, kMenuRewindGame = 7, kMenuForwardGame = 8, kMenuParis = 10,
  kMenuStrasBourg = 11, kMenuMunich = 12, kMenuVienna = 13, kMenuBudapest = 14,
  kMenuBelgrade = 15, kMenuConstantinople = 16, kMenuDecreaseVolume = 17, kMenuIncreaseVolume = 18,
  kMenuDecreaseBrightness = 19, kMenuIncreaseBrightness = 20
}
 
enum  CityButton {
  kParis = 0, kStrasbourg = 1, kMunich = 2, kVienna = 3,
  kBudapest = 4, kBelgrade = 5, kConstantinople = 6
}
 
enum  StartMenuOverlay {
  kOverlayTooltip, kOverlayEggButtons, kOverlayButtons, kOverlayAcorn,
  kOverlayCity1, kOverlayCity2, kOverlayCity3, kOverlayCredits
}
 
typedef Common::HashMap< StartMenuOverlay, SequenceFrame *, MenuOverlays_Hash, MenuOverlays_EqualToMenuFrames
 

Private Member Functions

void init (bool doSavegame, SavegameType type, uint32 value)
 
void setup ()
 
bool handleEvent (StartMenuAction action, Common::EventType type)
 
void checkHotspots ()
 
void setLogicEventHandlers ()
 
void startGame ()
 
void switchGame ()
 
void hideOverlays ()
 
void showFrame (StartMenuOverlay overlay, int index, bool redraw)
 
void clear ()
 
void moveToCity (CityButton city, bool clicked)
 
Common::String getAcornSequenceName (GameId id) const
 
void initTime (SavegameType type, uint32 val)
 
void updateTime (uint32 time)
 
void adjustTime ()
 
void adjustIndex (uint32 time1, uint32 time2, bool searchEntry)
 
void goToTime (uint32 time)
 
void setTime ()
 
void forwardTime ()
 
void rewindTime ()
 
bool hasTimeDelta ()
 
uint32 getVolume () const
 
void setVolume (uint32 volume) const
 
uint32 getBrightness () const
 
void setBrightness (uint32 brightness) const
 

Private Attributes

LastExpressEngine_engine
 
Sequence_seqTooltips
 
Sequence_seqEggButtons
 
Sequence_seqButtons
 
Sequence_seqAcorn
 
Sequence_seqCity1
 
Sequence_seqCity2
 
Sequence_seqCity3
 
Sequence_seqCredits
 
GameId _gameId
 
bool _hasShownStartScreen
 
bool _hasShownIntro
 
bool _isShowingCredits
 
bool _isGameStarted
 
bool _isShowingMenu
 
uint16 _creditsSequenceIndex
 
uint32 _checkHotspotsTicks
 
Common::EventType _mouseFlags
 
SceneHotspot_lastHotspot
 
Clock_clock
 
TrainLine_trainLine
 
MenuFrames _frames
 
uint32 _currentTime
 
uint32 _lowerTime
 
uint32 _time
 
uint32 _currentIndex
 
uint32 _index
 
uint32 _lastIndex
 
uint32 _delta
 
bool _handleTimeDelta
 

Additional Inherited Members

- Public Types inherited from LastExpress::EventHandler
typedef Common::Functor1< const Common::Event &, void > EventFunction
 

Detailed Description

Definition at line 43 of file menu.h.

Member Typedef Documentation

◆ MenuFrames

Definition at line 159 of file menu.h.

Member Enumeration Documentation

◆ CityButton

Enumerator
kParis 
kStrasbourg 
kMunich 
kVienna 
kBudapest 
kBelgrade 
kConstantinople 

Definition at line 82 of file menu.h.

◆ StartMenuAction

Enumerator
kMenuContinue 
kMenuCredits 
kMenuQuitGame 
kMenuCase4 
kMenuSwitchSaveGame 
kMenuRewindGame 
kMenuForwardGame 
kMenuParis 
kMenuStrasBourg 
kMenuMunich 
kMenuVienna 
kMenuBudapest 
kMenuBelgrade 
kMenuConstantinople 
kMenuDecreaseVolume 
kMenuIncreaseVolume 
kMenuDecreaseBrightness 
kMenuIncreaseBrightness 

Definition at line 60 of file menu.h.

◆ StartMenuOverlay

Enumerator
kOverlayTooltip 
kOverlayEggButtons 
kOverlayButtons 
kOverlayAcorn 
kOverlayCity1 
kOverlayCity2 
kOverlayCity3 
kOverlayCredits 

Definition at line 93 of file menu.h.

Constructor & Destructor Documentation

◆ Menu()

LastExpress::Menu::Menu ( LastExpressEngine engine)

Definition at line 144 of file menu.cpp.

◆ ~Menu()

LastExpress::Menu::~Menu ( )
override

Definition at line 155 of file menu.cpp.

Member Function Documentation

◆ adjustIndex()

void LastExpress::Menu::adjustIndex ( uint32  time1,
uint32  time2,
bool  searchEntry 
)
private

Definition at line 1129 of file menu.cpp.

◆ adjustTime()

void LastExpress::Menu::adjustTime ( )
private

Definition at line 1233 of file menu.cpp.

◆ checkHotspots()

void LastExpress::Menu::checkHotspots ( )
private

Definition at line 954 of file menu.cpp.

◆ clear()

void LastExpress::Menu::clear ( )
private

Definition at line 1002 of file menu.cpp.

◆ eventMouse()

void LastExpress::Menu::eventMouse ( const Common::Event ev)
overridevirtual

Reimplemented from LastExpress::EventHandler.

Definition at line 226 of file menu.cpp.

◆ eventTick()

void LastExpress::Menu::eventTick ( const Common::Event ev)
overridevirtual

Reimplemented from LastExpress::EventHandler.

Definition at line 282 of file menu.cpp.

◆ forwardTime()

void LastExpress::Menu::forwardTime ( )
private

Definition at line 1217 of file menu.cpp.

◆ getAcornSequenceName()

Common::String LastExpress::Menu::getAcornSequenceName ( GameId  id) const
private

Definition at line 1010 of file menu.cpp.

◆ getBrightness()

uint32 LastExpress::Menu::getBrightness ( ) const
private

Definition at line 1318 of file menu.cpp.

◆ getGameId()

GameId LastExpress::Menu::getGameId ( ) const
inline

Definition at line 56 of file menu.h.

◆ getVolume()

uint32 LastExpress::Menu::getVolume ( ) const
private

Definition at line 1301 of file menu.cpp.

◆ goToTime()

void LastExpress::Menu::goToTime ( uint32  time)
private

Definition at line 1189 of file menu.cpp.

◆ handleEvent()

bool LastExpress::Menu::handleEvent ( StartMenuAction  action,
Common::EventType  type 
)
private

Definition at line 373 of file menu.cpp.

◆ hasTimeDelta()

bool LastExpress::Menu::hasTimeDelta ( )
inlineprivate

Definition at line 195 of file menu.h.

◆ hideOverlays()

void LastExpress::Menu::hideOverlays ( )
private

Definition at line 973 of file menu.cpp.

◆ init()

void LastExpress::Menu::init ( bool  doSavegame,
SavegameType  type,
uint32  value 
)
private

Definition at line 832 of file menu.cpp.

◆ initTime()

void LastExpress::Menu::initTime ( SavegameType  type,
uint32  val 
)
private

Definition at line 1045 of file menu.cpp.

◆ isShown()

bool LastExpress::Menu::isShown ( ) const
inline

Definition at line 54 of file menu.h.

◆ moveToCity()

void LastExpress::Menu::moveToCity ( CityButton  city,
bool  clicked 
)
private

Definition at line 1265 of file menu.cpp.

◆ rewindTime()

void LastExpress::Menu::rewindTime ( )
private

Definition at line 1225 of file menu.cpp.

◆ setBrightness()

void LastExpress::Menu::setBrightness ( uint32  brightness) const
private

Definition at line 1322 of file menu.cpp.

◆ setLogicEventHandlers()

void LastExpress::Menu::setLogicEventHandlers ( )
private

Definition at line 823 of file menu.cpp.

◆ setTime()

void LastExpress::Menu::setTime ( )
private

Definition at line 1209 of file menu.cpp.

◆ setup()

void LastExpress::Menu::setup ( )
private

Definition at line 182 of file menu.cpp.

◆ setVolume()

void LastExpress::Menu::setVolume ( uint32  volume) const
private

Definition at line 1306 of file menu.cpp.

◆ show()

void LastExpress::Menu::show ( bool  doSavegame,
SavegameType  type,
uint32  value 
)

Definition at line 297 of file menu.cpp.

◆ showFrame()

void LastExpress::Menu::showFrame ( StartMenuOverlay  overlay,
int  index,
bool  redraw 
)
private

Definition at line 983 of file menu.cpp.

◆ startGame()

void LastExpress::Menu::startGame ( )
private

Definition at line 908 of file menu.cpp.

◆ switchGame()

void LastExpress::Menu::switchGame ( )
private

Definition at line 930 of file menu.cpp.

◆ updateTime()

void LastExpress::Menu::updateTime ( uint32  time)
private

Definition at line 1114 of file menu.cpp.

Member Data Documentation

◆ _checkHotspotsTicks

uint32 LastExpress::Menu::_checkHotspotsTicks
private

Definition at line 131 of file menu.h.

◆ _clock

Clock* LastExpress::Menu::_clock
private

Definition at line 148 of file menu.h.

◆ _creditsSequenceIndex

uint16 LastExpress::Menu::_creditsSequenceIndex
private

Definition at line 127 of file menu.h.

◆ _currentIndex

uint32 LastExpress::Menu::_currentIndex
private

Definition at line 181 of file menu.h.

◆ _currentTime

uint32 LastExpress::Menu::_currentTime
private

Definition at line 177 of file menu.h.

◆ _delta

uint32 LastExpress::Menu::_delta
private

Definition at line 184 of file menu.h.

◆ _engine

LastExpressEngine* LastExpress::Menu::_engine
private

Definition at line 104 of file menu.h.

◆ _frames

MenuFrames LastExpress::Menu::_frames
private

Definition at line 161 of file menu.h.

◆ _gameId

GameId LastExpress::Menu::_gameId
private

Definition at line 116 of file menu.h.

◆ _handleTimeDelta

bool LastExpress::Menu::_handleTimeDelta
private

Definition at line 185 of file menu.h.

◆ _hasShownIntro

bool LastExpress::Menu::_hasShownIntro
private

Definition at line 120 of file menu.h.

◆ _hasShownStartScreen

bool LastExpress::Menu::_hasShownStartScreen
private

Definition at line 119 of file menu.h.

◆ _index

uint32 LastExpress::Menu::_index
private

Definition at line 182 of file menu.h.

◆ _isGameStarted

bool LastExpress::Menu::_isGameStarted
private

Definition at line 123 of file menu.h.

◆ _isShowingCredits

bool LastExpress::Menu::_isShowingCredits
private

Definition at line 122 of file menu.h.

◆ _isShowingMenu

bool LastExpress::Menu::_isShowingMenu
private

Definition at line 124 of file menu.h.

◆ _lastHotspot

SceneHotspot* LastExpress::Menu::_lastHotspot
private

Definition at line 133 of file menu.h.

◆ _lastIndex

uint32 LastExpress::Menu::_lastIndex
private

Definition at line 183 of file menu.h.

◆ _lowerTime

uint32 LastExpress::Menu::_lowerTime
private

Definition at line 178 of file menu.h.

◆ _mouseFlags

Common::EventType LastExpress::Menu::_mouseFlags
private

Definition at line 132 of file menu.h.

◆ _seqAcorn

Sequence* LastExpress::Menu::_seqAcorn
private

Definition at line 110 of file menu.h.

◆ _seqButtons

Sequence* LastExpress::Menu::_seqButtons
private

Definition at line 109 of file menu.h.

◆ _seqCity1

Sequence* LastExpress::Menu::_seqCity1
private

Definition at line 111 of file menu.h.

◆ _seqCity2

Sequence* LastExpress::Menu::_seqCity2
private

Definition at line 112 of file menu.h.

◆ _seqCity3

Sequence* LastExpress::Menu::_seqCity3
private

Definition at line 113 of file menu.h.

◆ _seqCredits

Sequence* LastExpress::Menu::_seqCredits
private

Definition at line 114 of file menu.h.

◆ _seqEggButtons

Sequence* LastExpress::Menu::_seqEggButtons
private

Definition at line 108 of file menu.h.

◆ _seqTooltips

Sequence* LastExpress::Menu::_seqTooltips
private

Definition at line 107 of file menu.h.

◆ _time

uint32 LastExpress::Menu::_time
private

Definition at line 179 of file menu.h.

◆ _trainLine

TrainLine* LastExpress::Menu::_trainLine
private

Definition at line 149 of file menu.h.


The documentation for this class was generated from the following files: