[Scummvm-cvs-logs] CVS: scummvm/queen input.h,1.3,1.4 input.cpp,1.3,1.4 xref.txt,1.23,1.24
Gregory Montoir
cyx at users.sourceforge.net
Tue Oct 28 13:03:04 CET 2003
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv3747
Modified Files:
input.h input.cpp xref.txt
Log Message:
add accessors for mouse current pos / button + keyVerb
Index: input.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/input.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- input.h 23 Oct 2003 18:50:47 -0000 1.3
+++ input.h 28 Oct 2003 20:58:46 -0000 1.4
@@ -35,10 +35,15 @@
//! Adjust here to change delays!
enum {
- DELAY_SHORT = 10,
+ DELAY_SHORT = 10,
DELAY_NORMAL = 100
};
+ enum {
+ MOUSE_LBUTTON = 1,
+ MOUSE_RBUTTON = 2
+ };
+
Input(OSystem *system);
//! calls the other delay() with a value adjusted depending on _fastMode
@@ -80,16 +85,25 @@
void canQuit(bool cq) { _canQuit = cq; }
+ bool cutawayRunning() const { return _cutawayRunning; }
void cutawayRunning(bool running) { _cutawayRunning = running; }
- bool cutawayQuit() { return _cutawayQuit; }
+ bool cutawayQuit() const { return _cutawayQuit; }
void cutawayQuitReset() { _cutawayQuit = false; }
- bool talkQuit() { return _talkQuit; }
+ bool talkQuit() const { return _talkQuit; }
void talkQuitReset() { _talkQuit = false; }
void fastMode(bool fm) { _fastMode = fm; }
+ Verb keyVerb() const { return _keyVerb; }
+
+ int mousePosX() const { return _mouse_x; }
+ int mousePosY() const { return _mouse_y; }
+
+ int mouseButton() const { return _mouseButton; }
+ void clearMouseButton() { _mouseButton = 0; }
+
private:
enum KeyCode {
@@ -132,7 +146,10 @@
int _inKey;
//! Set by delay();
- int _sdl_mouse_x, _sdl_mouse_y;
+ int _mouse_x, _mouse_y;
+
+ //! Set by delay();
+ int _mouseButton;
};
Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/input.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- input.cpp 23 Oct 2003 18:50:47 -0000 1.3
+++ input.cpp 28 Oct 2003 20:58:46 -0000 1.4
@@ -56,19 +56,21 @@
break;
case OSystem::EVENT_MOUSEMOVE:
- _sdl_mouse_x = event.mouse.x;
- _sdl_mouse_y = event.mouse.y;
+ _mouse_x = event.mouse.x;
+ _mouse_y = event.mouse.y;
break;
case OSystem::EVENT_LBUTTONDOWN:
+ _mouseButton |= MOUSE_LBUTTON;
#ifdef _WIN32_WCE
- _sdl_mouse_x = event.mouse.x;
- _sdl_mouse_y = event.mouse.y;
+ _mouse_x = event.mouse.x;
+ _mouse_y = event.mouse.y;
#endif
break;
case OSystem::EVENT_RBUTTONDOWN:
+ _mouseButton |= MOUSE_RBUTTON;
break;
case OSystem::EVENT_QUIT:
Index: xref.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/xref.txt,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- xref.txt 27 Oct 2003 15:00:25 -0000 1.23
+++ xref.txt 28 Oct 2003 20:58:46 -0000 1.24
@@ -47,6 +47,7 @@
COM_LIST_MAX Command::_numCmdList
COMMANDstr Command::_command
DEFCOMM Command::_defaultVerb
+MKEY Command::_mouseKey
OLDVERB,VERB Command::_*verb*
OLDNOUN,NOUN,NOUN2 Command::_*noun*
PARSE Command::_parse
@@ -152,11 +153,10 @@
get_key() *not needed*
-
drawmouseflag
-key_commands
-key_language
+key_commands Input::?
+key_language Input::?
KEYVERB Input::_keyVerb
-MKEY
-MouseButton
+MouseButton Input::_mouseButton
mouseflag
no_check_keys Input::_noCheckKeys
More information about the Scummvm-git-logs
mailing list