diff options
author | Max Horn | 2010-06-17 23:11:34 +0000 |
---|---|---|
committer | Max Horn | 2010-06-17 23:11:34 +0000 |
commit | fabba55e6df2a3ae1b1bba5f3e145cae5bba0dc4 (patch) | |
tree | 37200da20c8b4612c97470519be49403755d0b99 /engines | |
parent | a2bcf9ac31d025d09fabcd2d636eeb34d3c75df0 (diff) | |
download | scummvm-rg350-fabba55e6df2a3ae1b1bba5f3e145cae5bba0dc4.tar.gz scummvm-rg350-fabba55e6df2a3ae1b1bba5f3e145cae5bba0dc4.tar.bz2 scummvm-rg350-fabba55e6df2a3ae1b1bba5f3e145cae5bba0dc4.zip |
SCI: cleanup
svn-id: r49961
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/event.cpp | 4 | ||||
-rw-r--r-- | engines/sci/event.h | 36 | ||||
-rw-r--r-- | engines/sci/sci.cpp | 2 |
3 files changed, 18 insertions, 24 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index 9ba4f166b4..45de30cb5c 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -36,9 +36,7 @@ namespace Sci { #define SCANCODE_ROWS_NR 3 -EventManager::EventManager(ResourceManager *resMan) { - // Check, if font of current game includes extended chars - _fontIsExtended = resMan->detectFontExtended(); +EventManager::EventManager(bool fontIsExtended) : _fontIsExtended(fontIsExtended) { } EventManager::~EventManager() { diff --git a/engines/sci/event.h b/engines/sci/event.h index bdfbf4bebe..dc7aebc98e 100644 --- a/engines/sci/event.h +++ b/engines/sci/event.h @@ -23,31 +23,29 @@ * */ -#ifndef SCI_ENGINE_EVENT_H -#define SCI_ENGINE_EVENT_H +#ifndef SCI_EVENT_H +#define SCI_EVENT_H #include "common/list.h" namespace Sci { -#define SCI_INPUT_DEFAULT_CLOCKTIME 100000 -#define SCI_INPUT_DEFAULT_REDRAWTIME 30000 - - struct SciEvent { short type; short data; short modifiers; - short character; /* for keyboard events: 'data' after applying - ** the effects of 'modifiers', e.g. if - ** type == SCI_EVT_KEYBOARD - ** data == 'a' - ** buckybits == SCI_EVM_LSHIFT - ** then - ** character == 'A' - ** For 'Alt', characters are interpreted by their - ** PC keyboard scancodes. - */ + /** + * For keyboard events: 'data' after applying + * the effects of 'modifiers', e.g. if + * type == SCI_EVT_KEYBOARD + * data == 'a' + * buckybits == SCI_EVM_LSHIFT + * then + * character == 'A' + * For 'Alt', characters are interpreted by their + * PC keyboard scancodes. + */ + short character; }; /*Values for type*/ @@ -113,7 +111,7 @@ struct SciEvent { class EventManager { public: - EventManager(ResourceManager *resMgr); + EventManager(bool fontIsExtended); ~EventManager(); SciEvent getSciEvent(unsigned int mask); @@ -121,9 +119,7 @@ public: private: SciEvent getScummVMEvent(); - ResourceManager *_resMan; - - bool _fontIsExtended; + const bool _fontIsExtended; Common::List<SciEvent> _events; }; diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 1dc02ac7c3..f29811cfae 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -237,7 +237,7 @@ Common::Error SciEngine::run() { _vocabulary = (getSciVersion() <= SCI_VERSION_1_EGA) ? new Vocabulary(_resMan) : NULL; _audio = new AudioPlayer(_resMan); _gamestate = new EngineState(segMan); - _eventMan = new EventManager(_resMan); + _eventMan = new EventManager(_resMan->detectFontExtended()); // The game needs to be initialized before the graphics system is initialized, as // the graphics code checks parts of the seg manager upon initialization (e.g. for |