[Scummvm-cvs-logs] SF.net SVN: scummvm:[49961] scummvm/trunk/engines/sci
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Jun 18 01:11:34 CEST 2010
Revision: 49961
http://scummvm.svn.sourceforge.net/scummvm/?rev=49961&view=rev
Author: fingolfin
Date: 2010-06-17 23:11:34 +0000 (Thu, 17 Jun 2010)
Log Message:
-----------
SCI: cleanup
Modified Paths:
--------------
scummvm/trunk/engines/sci/event.cpp
scummvm/trunk/engines/sci/event.h
scummvm/trunk/engines/sci/sci.cpp
Modified: scummvm/trunk/engines/sci/event.cpp
===================================================================
--- scummvm/trunk/engines/sci/event.cpp 2010-06-17 23:11:12 UTC (rev 49960)
+++ scummvm/trunk/engines/sci/event.cpp 2010-06-17 23:11:34 UTC (rev 49961)
@@ -36,9 +36,7 @@
#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() {
Modified: scummvm/trunk/engines/sci/event.h
===================================================================
--- scummvm/trunk/engines/sci/event.h 2010-06-17 23:11:12 UTC (rev 49960)
+++ scummvm/trunk/engines/sci/event.h 2010-06-17 23:11:34 UTC (rev 49961)
@@ -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 @@
class EventManager {
public:
- EventManager(ResourceManager *resMgr);
+ EventManager(bool fontIsExtended);
~EventManager();
SciEvent getSciEvent(unsigned int mask);
@@ -121,9 +119,7 @@
private:
SciEvent getScummVMEvent();
- ResourceManager *_resMan;
-
- bool _fontIsExtended;
+ const bool _fontIsExtended;
Common::List<SciEvent> _events;
};
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2010-06-17 23:11:12 UTC (rev 49960)
+++ scummvm/trunk/engines/sci/sci.cpp 2010-06-17 23:11:34 UTC (rev 49961)
@@ -237,7 +237,7 @@
_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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list