~ubuntu-branches/debian/sid/stella/sid

« back to all changes in this revision

Viewing changes to src/emucore/Event.hxx

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2012-06-02 07:33:16 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120602073316-20r4hr32t4oj36u9
Tags: 3.7-1
* New upstream version.
* Update description and documentation with new features in 3.7, notably
  Blargg TV filters (replacing the filters available in versions 3.4.1
  and earlier).
* Switch to debhelper compatibility level 9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
// See the file "License.txt" for information on usage and redistribution of
15
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16
16
//
17
 
// $Id: Event.hxx 2405 2012-03-04 19:20:29Z stephena $
 
17
// $Id: Event.hxx 2447 2012-04-19 20:11:16Z stephena $
18
18
//============================================================================
19
19
 
20
20
#ifndef EVENT_HXX
21
21
#define EVENT_HXX
22
22
 
23
23
#include "bspf.hxx"
 
24
#include "StellaKeys.hxx"
24
25
 
25
26
class Event;
26
27
 
27
28
/**
28
29
  @author  Bradford W. Mott
29
 
  @version $Id: Event.hxx 2405 2012-03-04 19:20:29Z stephena $
 
30
  @version $Id: Event.hxx 2447 2012-04-19 20:11:16Z stephena $
30
31
*/
31
32
class Event
32
33
{
107
108
    {
108
109
      for(uInt32 i = 0; i < LastType; ++i)
109
110
        myValues[i] = Event::NoType;
 
111
 
 
112
      for(uInt32 i = 0; i < KBDK_LAST; ++i)
 
113
        myKeyTable[i] = false;
110
114
    }
111
115
 
 
116
    /**
 
117
      Get the keytable associated with this event
 
118
    */
 
119
    const bool* getKeys() const { return myKeyTable; }
 
120
 
 
121
    /**
 
122
      Set the value associated with the event of the specified type
 
123
    */
 
124
    void setKey(StellaKey key, bool state) { myKeyTable[key] = state; }
 
125
 
112
126
  private:
113
127
    // Array of values associated with each event type
114
128
    Int32 myValues[LastType];
 
129
 
 
130
    // Array of keyboard key states
 
131
    bool myKeyTable[KBDK_LAST];
115
132
};
116
133
 
117
134
#endif