gosu 0.8.6-x64-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gosu/Audio.hpp +171 -0
- data/Gosu/AutoLink.hpp +16 -0
- data/Gosu/Bitmap.hpp +96 -0
- data/Gosu/Buttons.hpp +265 -0
- data/Gosu/Color.hpp +204 -0
- data/Gosu/Directories.hpp +36 -0
- data/Gosu/Font.hpp +83 -0
- data/Gosu/Fwd.hpp +31 -0
- data/Gosu/Gosu.hpp +34 -0
- data/Gosu/Graphics.hpp +115 -0
- data/Gosu/GraphicsBase.hpp +110 -0
- data/Gosu/IO.hpp +269 -0
- data/Gosu/Image.hpp +122 -0
- data/Gosu/ImageData.hpp +61 -0
- data/Gosu/Input.hpp +149 -0
- data/Gosu/Inspection.hpp +14 -0
- data/Gosu/Math.hpp +135 -0
- data/Gosu/Platform.hpp +93 -0
- data/Gosu/Sockets.hpp +156 -0
- data/Gosu/TR1.hpp +56 -0
- data/Gosu/Text.hpp +71 -0
- data/Gosu/TextInput.hpp +70 -0
- data/Gosu/Timing.hpp +16 -0
- data/Gosu/Utility.hpp +28 -0
- data/Gosu/Version.hpp +19 -0
- data/Gosu/WinUtility.hpp +75 -0
- data/Gosu/Window.hpp +145 -0
- data/examples/ChipmunkIntegration.rb +275 -0
- data/examples/CptnRuby.rb +223 -0
- data/examples/GosuZen.rb +68 -0
- data/examples/MoreChipmunkAndRMagick.rb +155 -0
- data/examples/OpenGLIntegration.rb +226 -0
- data/examples/RMagickIntegration.rb +417 -0
- data/examples/TextInput.rb +154 -0
- data/examples/Tutorial.rb +131 -0
- data/examples/media/Beep.wav +0 -0
- data/examples/media/CptnRuby Gem.png +0 -0
- data/examples/media/CptnRuby Map.txt +25 -0
- data/examples/media/CptnRuby Tileset.png +0 -0
- data/examples/media/CptnRuby.png +0 -0
- data/examples/media/Cursor.png +0 -0
- data/examples/media/Earth.png +0 -0
- data/examples/media/Explosion.wav +0 -0
- data/examples/media/Landscape.svg +10 -0
- data/examples/media/LargeStar.png +0 -0
- data/examples/media/Smoke.png +0 -0
- data/examples/media/Soldier.png +0 -0
- data/examples/media/Space.png +0 -0
- data/examples/media/Star.png +0 -0
- data/examples/media/Starfighter.bmp +0 -0
- data/lib/gosu.rb +20 -0
- data/lib/gosu/patches.rb +81 -0
- data/lib/gosu/preview.rb +139 -0
- data/lib/gosu/run.rb +11 -0
- data/lib/gosu/swig_patches.rb +60 -0
- data/lib/gosu/zen.rb +89 -0
- data/lib64/2.1/gosu.so +0 -0
- data/lib64/FreeImage.dll +0 -0
- data/lib64/OpenAL32.dll +0 -0
- data/lib64/SDL2.dll +0 -0
- data/lib64/libsndfile.dll +0 -0
- metadata +110 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7f282d54c20fe0e84512af2478321dacbe7e07ea
|
4
|
+
data.tar.gz: c14fe19a090cabe204765e8084e0af97531cefed
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b05d18e2b574b9a8f24c2fdd3bba60657d080031d3e579d8ba684c06f99f04804707a77c0a15fe5fdbe6ef2616b41b083b645cbe70a91339b29e3f4523cdb694
|
7
|
+
data.tar.gz: 8ec21f369a02cb2b46af9965d4bad34a1d279652dcd465e115111e73ba26d36e8700ae4b9bc9bf7ddb0f503838bf5c7b2eb1d730d086fecf311504c923c700ba
|
data/Gosu/Audio.hpp
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
//! \file Audio.hpp
|
2
|
+
//! Contains all the classes of Gosu's audio system.
|
3
|
+
|
4
|
+
#ifndef GOSU_AUDIO_HPP
|
5
|
+
#define GOSU_AUDIO_HPP
|
6
|
+
|
7
|
+
#ifdef WIN32
|
8
|
+
#ifndef NOMINMAX
|
9
|
+
#define NOMINMAX
|
10
|
+
#endif
|
11
|
+
#include <windows.h>
|
12
|
+
#endif
|
13
|
+
#include <Gosu/Fwd.hpp>
|
14
|
+
#include <Gosu/IO.hpp>
|
15
|
+
#include <Gosu/Platform.hpp>
|
16
|
+
#include <Gosu/TR1.hpp>
|
17
|
+
#include <memory>
|
18
|
+
#include <string>
|
19
|
+
|
20
|
+
namespace Gosu
|
21
|
+
{
|
22
|
+
// Deprecated.
|
23
|
+
#ifndef SWIG
|
24
|
+
class GOSU_DEPRECATED Audio;
|
25
|
+
#endif
|
26
|
+
|
27
|
+
//! An instance of a Sample playing. Can be used to stop sounds dynamically,
|
28
|
+
//! or to check if they are finished.
|
29
|
+
//! It is recommended that you throw away sample instances if possible,
|
30
|
+
//! as they could accidentally refer to other sounds being played after
|
31
|
+
//! a very long time has passed.
|
32
|
+
class SampleInstance
|
33
|
+
{
|
34
|
+
int handle, extra;
|
35
|
+
bool alive() const;
|
36
|
+
|
37
|
+
public:
|
38
|
+
//! Called by Sample, do not use.
|
39
|
+
SampleInstance(int handle, int extra);
|
40
|
+
|
41
|
+
bool playing() const;
|
42
|
+
bool paused() const;
|
43
|
+
//! Pauses this instance to be resumed afterwards. It will still keep a channel filled while paused.
|
44
|
+
void pause();
|
45
|
+
void resume();
|
46
|
+
//! Stops this instance of a sound being played.
|
47
|
+
//! Calling this twice, or too late, does not do any harm.
|
48
|
+
void stop();
|
49
|
+
|
50
|
+
//! \param volume Can be anything from 0.0 (silence) to 1.0 (full
|
51
|
+
//! volume).
|
52
|
+
void changeVolume(double volume);
|
53
|
+
//! \param pan Can be anything from -1.0 (left) to 1.0 (right).
|
54
|
+
void changePan(double pan);
|
55
|
+
//! \param speed Playback speed is only limited by FMOD's
|
56
|
+
//! capabilities and can accept very high or low values. Use 1.0 for
|
57
|
+
//! normal playback speed.
|
58
|
+
void changeSpeed(double speed);
|
59
|
+
};
|
60
|
+
|
61
|
+
//! A sample is a short sound that is completely loaded in memory, can be
|
62
|
+
//! played multiple times at once and offers very flexible playback
|
63
|
+
//! parameters. Use samples for everything that's not music.
|
64
|
+
class Sample
|
65
|
+
{
|
66
|
+
struct SampleData;
|
67
|
+
std::tr1::shared_ptr<SampleData> data;
|
68
|
+
|
69
|
+
public:
|
70
|
+
//! Constructs a sample that can be played on the specified audio
|
71
|
+
//! system and loads the sample from a file.
|
72
|
+
explicit Sample(const std::wstring& filename);
|
73
|
+
|
74
|
+
//! Constructs a sample that can be played on the specified audio
|
75
|
+
//! system and loads the sample data from a stream.
|
76
|
+
explicit Sample(Reader reader);
|
77
|
+
|
78
|
+
//! Plays the sample without panning.
|
79
|
+
//! \param volume Can be anything from 0.0 (silence) to 1.0 (full
|
80
|
+
//! volume).
|
81
|
+
//! \param speed Playback speed is only limited by the underlying audio library,
|
82
|
+
//! and can accept very high or low values. Use 1.0 for
|
83
|
+
//! normal playback speed.
|
84
|
+
SampleInstance play(double volume = 1, double speed = 1,
|
85
|
+
bool looping = false) const;
|
86
|
+
|
87
|
+
//! Plays the sample with panning. Even if pan is 0.0, the sample will
|
88
|
+
//! not be as loud as if it were played by calling play() due to the
|
89
|
+
//! way the panning works.
|
90
|
+
//! \param pan Can be anything from -1.0 (left) to 1.0 (right).
|
91
|
+
//! \param volume Can be anything from 0.0 (silence) to 1.0 (full
|
92
|
+
//! volume).
|
93
|
+
//! \param speed Playback speed is only limited by by the underlying audio library,
|
94
|
+
//! and can accept very high
|
95
|
+
//! or low values. Use 1.0 for normal playback speed.
|
96
|
+
SampleInstance playPan(double pan, double volume = 1, double speed = 1,
|
97
|
+
bool looping = false) const;
|
98
|
+
|
99
|
+
#ifndef SWIG
|
100
|
+
GOSU_DEPRECATED Sample(Audio& audio, const std::wstring& filename);
|
101
|
+
GOSU_DEPRECATED Sample(Audio& audio, Reader reader);
|
102
|
+
#endif
|
103
|
+
};
|
104
|
+
|
105
|
+
//! Songs are less flexible than samples in that they can only be played
|
106
|
+
//! one at a time and without panning or speed parameters.
|
107
|
+
class Song
|
108
|
+
{
|
109
|
+
class BaseData;
|
110
|
+
class ModuleData;
|
111
|
+
class StreamData;
|
112
|
+
GOSU_UNIQUE_PTR<BaseData> data;
|
113
|
+
|
114
|
+
#if defined(GOSU_CPP11_ENABLED)
|
115
|
+
Song(Song&&) = delete;
|
116
|
+
Song& operator=(Song&&) = delete;
|
117
|
+
Song(const Song&) = delete;
|
118
|
+
Song& operator=(const Song&) = delete;
|
119
|
+
#else
|
120
|
+
Song(const Song&);
|
121
|
+
Song& operator=(const Song&);
|
122
|
+
#endif
|
123
|
+
|
124
|
+
public:
|
125
|
+
//! Constructs a song that can be played on the provided audio system
|
126
|
+
//! and loads the song from a file. The type is determined from the
|
127
|
+
//! filename.
|
128
|
+
explicit Song(const std::wstring& filename);
|
129
|
+
|
130
|
+
//! Constructs a song of the specified type that can be played on the
|
131
|
+
//! provided audio system and loads the song data from a stream.
|
132
|
+
explicit Song(Reader reader);
|
133
|
+
|
134
|
+
~Song();
|
135
|
+
|
136
|
+
//! Returns the song currently being played or paused, or 0 if
|
137
|
+
//! no song has been played yet or the last song has finished
|
138
|
+
//! playing.
|
139
|
+
static Song* currentSong();
|
140
|
+
|
141
|
+
//! Starts or resumes playback of the song. This will stop all other
|
142
|
+
//! songs and set the current song to this object.
|
143
|
+
void play(bool looping = false);
|
144
|
+
//! Pauses playback of the song. It is not considered being played.
|
145
|
+
//! currentSong will stay the same.
|
146
|
+
void pause();
|
147
|
+
//! Returns true if the song is the current song, but in paused
|
148
|
+
//! mode.
|
149
|
+
bool paused() const;
|
150
|
+
//! Stops playback of this song if it is currently played or paused.
|
151
|
+
//! Afterwards, currentSong will return 0.
|
152
|
+
void stop();
|
153
|
+
//! Returns true if the song is currently playing.
|
154
|
+
bool playing() const;
|
155
|
+
//! Returns the current volume of the song.
|
156
|
+
double volume() const;
|
157
|
+
//! Changes the volume of the song.
|
158
|
+
void changeVolume(double volume);
|
159
|
+
|
160
|
+
//! Called every tick by Window for management purposes.
|
161
|
+
static void update();
|
162
|
+
|
163
|
+
#ifndef SWIG
|
164
|
+
enum Type { stStream, stModule };
|
165
|
+
GOSU_DEPRECATED Song(Audio&, const std::wstring& filename);
|
166
|
+
GOSU_DEPRECATED Song(Audio&, Type type, Reader reader);
|
167
|
+
#endif
|
168
|
+
};
|
169
|
+
}
|
170
|
+
|
171
|
+
#endif
|
data/Gosu/AutoLink.hpp
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
//! \file AutoLink.hpp
|
2
|
+
//! Contains pragmas that make MSVC link against all the necessary libraries
|
3
|
+
//! automatically.
|
4
|
+
|
5
|
+
#ifdef _MSC_VER
|
6
|
+
#ifndef GOSU_AUTOLINK_HPP
|
7
|
+
#define GOSU_AUTOLINK_HPP
|
8
|
+
|
9
|
+
#ifdef NDEBUG
|
10
|
+
#pragma comment(lib, "Gosu.lib")
|
11
|
+
#else
|
12
|
+
#pragma comment(lib, "GosuDebug.lib")
|
13
|
+
#endif
|
14
|
+
|
15
|
+
#endif
|
16
|
+
#endif
|
data/Gosu/Bitmap.hpp
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
//! \file Bitmap.hpp
|
2
|
+
//! Interface of the Bitmap class.
|
3
|
+
|
4
|
+
#ifndef GOSU_BITMAP_HPP
|
5
|
+
#define GOSU_BITMAP_HPP
|
6
|
+
|
7
|
+
#include <Gosu/Color.hpp>
|
8
|
+
#include <Gosu/Fwd.hpp>
|
9
|
+
#include <Gosu/GraphicsBase.hpp>
|
10
|
+
#include <Gosu/Platform.hpp>
|
11
|
+
#include <string>
|
12
|
+
#include <vector>
|
13
|
+
|
14
|
+
namespace Gosu
|
15
|
+
{
|
16
|
+
//! Rectangular area of pixels, each represented by a Color value. Provides
|
17
|
+
//! minimal drawing functionality and serves as a temporary holder for
|
18
|
+
//! graphical resources which are usually turned into Images later.
|
19
|
+
//! Has (expensive) value semantics.
|
20
|
+
class Bitmap
|
21
|
+
{
|
22
|
+
unsigned w, h;
|
23
|
+
std::vector<Color> pixels;
|
24
|
+
|
25
|
+
public:
|
26
|
+
Bitmap() : w(0), h(0) {}
|
27
|
+
Bitmap(unsigned w, unsigned h, Color c = Color::NONE) : w(w), h(h), pixels(w * h, c) {}
|
28
|
+
|
29
|
+
unsigned width() const { return w; }
|
30
|
+
unsigned height() const { return h; }
|
31
|
+
|
32
|
+
void swap(Bitmap& other);
|
33
|
+
|
34
|
+
void resize(unsigned width, unsigned height, Color c = Color::NONE);
|
35
|
+
|
36
|
+
//! Returns the color at the specified position. x and y must be on the
|
37
|
+
//! bitmap.
|
38
|
+
Color getPixel(unsigned x, unsigned y) const { return pixels[y * w + x]; }
|
39
|
+
|
40
|
+
//! Sets the pixel at the specified position to a color. x and y must
|
41
|
+
//! be on the bitmap.
|
42
|
+
void setPixel(unsigned x, unsigned y, Color c) { pixels[y * w + x] = c; }
|
43
|
+
|
44
|
+
//! Inserts a bitmap at the given position. Parts of the inserted
|
45
|
+
//! bitmap that would be outside of the target bitmap will be
|
46
|
+
//! clipped away.
|
47
|
+
void insert(const Bitmap& source, int x, int y);
|
48
|
+
|
49
|
+
//! Inserts a portion of a bitmap at the given position. Parts of the
|
50
|
+
//! inserted bitmap that would be outside of the target bitmap will be
|
51
|
+
//! clipped away.
|
52
|
+
void insert(const Bitmap& source, int x, int y, unsigned srcX,
|
53
|
+
unsigned srcY, unsigned srcWidth, unsigned srcHeight);
|
54
|
+
|
55
|
+
//! Direct access to the array of color values. May be useful for optimized
|
56
|
+
//! OpenGL operations.
|
57
|
+
const Color* data() const { return &pixels[0]; }
|
58
|
+
Color* data() { return &pixels[0]; }
|
59
|
+
|
60
|
+
// Work with data() instead if you need fast operations.
|
61
|
+
GOSU_DEPRECATED void fill(Color c);
|
62
|
+
GOSU_DEPRECATED void replace(Color oldColor, Color newColor);
|
63
|
+
};
|
64
|
+
|
65
|
+
//! Loads any supported image into a Bitmap.
|
66
|
+
void loadImageFile(Bitmap& bitmap, const std::wstring& filename);
|
67
|
+
//! Loads any supported image into a Bitmap.
|
68
|
+
void loadImageFile(Bitmap& bitmap, Reader input);
|
69
|
+
|
70
|
+
//! Saves a Bitmap to a file.
|
71
|
+
void saveImageFile(const Bitmap& bitmap, const std::wstring& filename);
|
72
|
+
//! Saves a Bitmap to an arbitrary resource.
|
73
|
+
void saveImageFile(const Bitmap& bitmap, Gosu::Writer writer,
|
74
|
+
const std::wstring& formatHint = L"png");
|
75
|
+
|
76
|
+
//! Set the alpha value of all pixels which are equal to the color key
|
77
|
+
//! to zero. Color values are adjusted so that no borders show up when
|
78
|
+
//! the image is stretched or rotated.
|
79
|
+
void applyColorKey(Bitmap& bitmap, Color key);
|
80
|
+
|
81
|
+
//! The reverse of applyColorKey. Resets all fully transparent pixels by
|
82
|
+
//! a background color, makes all other pixels fully opaque.
|
83
|
+
void unapplyColorKey(Bitmap& bitmap, Color background);
|
84
|
+
|
85
|
+
void applyBorderFlags(Bitmap& dest, const Bitmap& source,
|
86
|
+
unsigned srcX, unsigned srcY, unsigned srcWidth, unsigned srcHeight,
|
87
|
+
unsigned borderFlags);
|
88
|
+
|
89
|
+
// Use loadImageFile/saveImageFile instead.
|
90
|
+
GOSU_DEPRECATED Reader loadFromBMP(Bitmap& bmp, Reader reader);
|
91
|
+
GOSU_DEPRECATED Writer saveToBMP(const Bitmap& bmp, Writer writer);
|
92
|
+
GOSU_DEPRECATED Reader loadFromPNG(Bitmap& bmp, Reader reader);
|
93
|
+
GOSU_DEPRECATED Writer saveToPNG(const Bitmap& bmp, Writer writer);
|
94
|
+
}
|
95
|
+
|
96
|
+
#endif
|
data/Gosu/Buttons.hpp
ADDED
@@ -0,0 +1,265 @@
|
|
1
|
+
#ifndef GOSU_BUTTONS_HPP
|
2
|
+
#define GOSU_BUTTONS_HPP
|
3
|
+
|
4
|
+
#include <Gosu/Platform.hpp>
|
5
|
+
|
6
|
+
#ifdef GOSU_IS_MAC
|
7
|
+
#define GOSU_SCANCODE(mac, windows_or_linux) mac
|
8
|
+
#define GOSU_SPECIAL_SCANCODE(mac, windows, linux) mac
|
9
|
+
#else
|
10
|
+
#define GOSU_SCANCODE(mac, linux_or_windows) linux_or_windows
|
11
|
+
#ifdef GOSU_IS_WIN
|
12
|
+
#define GOSU_SPECIAL_SCANCODE(mac, windows, linux) windows
|
13
|
+
#else
|
14
|
+
#define GOSU_SPECIAL_SCANCODE(mac, windows, linux) linux
|
15
|
+
#endif
|
16
|
+
#endif
|
17
|
+
|
18
|
+
namespace Gosu
|
19
|
+
{
|
20
|
+
//! List of button ids that can be used with Gosu::Input.
|
21
|
+
//! This enumeration contains ids for keyboard keys (kb*),
|
22
|
+
//! mouse buttons and mouse wheel (ms*) and gamepad buttons (gp*).
|
23
|
+
enum ButtonName
|
24
|
+
{
|
25
|
+
kbRangeBegin,
|
26
|
+
kbEscape = 41,
|
27
|
+
kbF1 = 58,
|
28
|
+
kbF2 = 59,
|
29
|
+
kbF3 = 60,
|
30
|
+
kbF4 = 61,
|
31
|
+
kbF5 = 62,
|
32
|
+
kbF6 = 63,
|
33
|
+
kbF7 = 64,
|
34
|
+
kbF8 = 65,
|
35
|
+
kbF9 = 66,
|
36
|
+
kbF10 = 67,
|
37
|
+
kbF11 = 68,
|
38
|
+
kbF12 = 69,
|
39
|
+
kb0 = 39,
|
40
|
+
kb1 = 30,
|
41
|
+
kb2 = 31,
|
42
|
+
kb3 = 32,
|
43
|
+
kb4 = 33,
|
44
|
+
kb5 = 34,
|
45
|
+
kb6 = 35,
|
46
|
+
kb7 = 36,
|
47
|
+
kb8 = 37,
|
48
|
+
kb9 = 38,
|
49
|
+
kbTab = 43,
|
50
|
+
kbReturn = 40,
|
51
|
+
kbSpace = 44,
|
52
|
+
kbLeftShift = 225,
|
53
|
+
kbRightShift = 229,
|
54
|
+
kbLeftControl = 224,
|
55
|
+
kbRightControl = 228,
|
56
|
+
kbLeftAlt = 226,
|
57
|
+
kbRightAlt = 230,
|
58
|
+
kbLeftMeta = 227,
|
59
|
+
kbRightMeta = 231,
|
60
|
+
kbBackspace = 42,
|
61
|
+
kbLeft = 80,
|
62
|
+
kbRight = 79,
|
63
|
+
kbUp = 82,
|
64
|
+
kbDown = 81,
|
65
|
+
kbHome = 74,
|
66
|
+
kbEnd = 77,
|
67
|
+
kbInsert = 73,
|
68
|
+
kbDelete = 76,
|
69
|
+
kbPageUp = 75,
|
70
|
+
kbPageDown = 78,
|
71
|
+
kbEnter = 88,
|
72
|
+
kbBacktick = 53,
|
73
|
+
kbMinus = 45,
|
74
|
+
kbEqual = 46, // TODO: Rename ->kbEquals
|
75
|
+
kbBracketLeft = 47, // TODO: Rename ->kbLeftBracket
|
76
|
+
kbBracketRight = 48, // TODO: Rename ->kbRightBracket
|
77
|
+
kbBackslash = 49,
|
78
|
+
kbSemicolon = 51,
|
79
|
+
kbApostrophe = 52,
|
80
|
+
kbComma = 54,
|
81
|
+
kbPeriod = 55,
|
82
|
+
kbSlash = 49,
|
83
|
+
kbA = 4,
|
84
|
+
kbB = 5,
|
85
|
+
kbC = 6,
|
86
|
+
kbD = 7,
|
87
|
+
kbE = 8,
|
88
|
+
kbF = 9,
|
89
|
+
kbG = 10,
|
90
|
+
kbH = 11,
|
91
|
+
kbI = 12,
|
92
|
+
kbJ = 13,
|
93
|
+
kbK = 14,
|
94
|
+
kbL = 15,
|
95
|
+
kbM = 16,
|
96
|
+
kbN = 17,
|
97
|
+
kbO = 18,
|
98
|
+
kbP = 19,
|
99
|
+
kbQ = 20,
|
100
|
+
kbR = 21,
|
101
|
+
kbS = 22,
|
102
|
+
kbT = 23,
|
103
|
+
kbU = 24,
|
104
|
+
kbV = 25,
|
105
|
+
kbW = 26,
|
106
|
+
kbX = 27,
|
107
|
+
kbY = 28,
|
108
|
+
kbZ = 29,
|
109
|
+
// ` on US/UK Mac, < on EU Mac, \ in US/UK Windows
|
110
|
+
kbISO = 100,
|
111
|
+
kbNumpad0 = 98,
|
112
|
+
kbNumpad1 = 89,
|
113
|
+
kbNumpad2 = 90,
|
114
|
+
kbNumpad3 = 91,
|
115
|
+
kbNumpad4 = 92,
|
116
|
+
kbNumpad5 = 93,
|
117
|
+
kbNumpad6 = 94,
|
118
|
+
kbNumpad7 = 95,
|
119
|
+
kbNumpad8 = 96,
|
120
|
+
kbNumpad9 = 97,
|
121
|
+
kbNumpadAdd = 87, // TODO: Rename ->kbNumpadPlus
|
122
|
+
kbNumpadSubtract = 86, // TODO: Rename ->kbNumpadMinus
|
123
|
+
kbNumpadMultiply = 85,
|
124
|
+
kbNumpadDivide = 84,
|
125
|
+
kbRangeEnd = 0xff,
|
126
|
+
|
127
|
+
msRangeBegin,
|
128
|
+
msLeft = msRangeBegin,
|
129
|
+
msMiddle,
|
130
|
+
msRight,
|
131
|
+
msWheelUp,
|
132
|
+
msWheelDown,
|
133
|
+
msOther0,
|
134
|
+
msOther1,
|
135
|
+
msOther2,
|
136
|
+
msOther3,
|
137
|
+
msOther4,
|
138
|
+
msOther5,
|
139
|
+
msOther6,
|
140
|
+
msOther7,
|
141
|
+
msRangeEnd = 0x110,
|
142
|
+
|
143
|
+
gpRangeBegin,
|
144
|
+
gpLeft = gpRangeBegin,
|
145
|
+
gpRight,
|
146
|
+
gpUp,
|
147
|
+
gpDown,
|
148
|
+
gpButton0,
|
149
|
+
gpButton1,
|
150
|
+
gpButton2,
|
151
|
+
gpButton3,
|
152
|
+
gpButton4,
|
153
|
+
gpButton5,
|
154
|
+
gpButton6,
|
155
|
+
gpButton7,
|
156
|
+
gpButton8,
|
157
|
+
gpButton9,
|
158
|
+
gpButton10,
|
159
|
+
gpButton11,
|
160
|
+
gpButton12,
|
161
|
+
gpButton13,
|
162
|
+
gpButton14,
|
163
|
+
gpButton15,
|
164
|
+
|
165
|
+
gp0Left,
|
166
|
+
gp0Right,
|
167
|
+
gp0Up,
|
168
|
+
gp0Down,
|
169
|
+
gp0Button0,
|
170
|
+
gp0Button1,
|
171
|
+
gp0Button2,
|
172
|
+
gp0Button3,
|
173
|
+
gp0Button4,
|
174
|
+
gp0Button5,
|
175
|
+
gp0Button6,
|
176
|
+
gp0Button7,
|
177
|
+
gp0Button8,
|
178
|
+
gp0Button9,
|
179
|
+
gp0Button10,
|
180
|
+
gp0Button11,
|
181
|
+
gp0Button12,
|
182
|
+
gp0Button13,
|
183
|
+
gp0Button14,
|
184
|
+
gp0Button15,
|
185
|
+
|
186
|
+
gp1Left,
|
187
|
+
gp1Right,
|
188
|
+
gp1Up,
|
189
|
+
gp1Down,
|
190
|
+
gp1Button0,
|
191
|
+
gp1Button1,
|
192
|
+
gp1Button2,
|
193
|
+
gp1Button3,
|
194
|
+
gp1Button4,
|
195
|
+
gp1Button5,
|
196
|
+
gp1Button6,
|
197
|
+
gp1Button7,
|
198
|
+
gp1Button8,
|
199
|
+
gp1Button9,
|
200
|
+
gp1Button10,
|
201
|
+
gp1Button11,
|
202
|
+
gp1Button12,
|
203
|
+
gp1Button13,
|
204
|
+
gp1Button14,
|
205
|
+
gp1Button15,
|
206
|
+
|
207
|
+
gp2Left,
|
208
|
+
gp2Right,
|
209
|
+
gp2Up,
|
210
|
+
gp2Down,
|
211
|
+
gp2Button0,
|
212
|
+
gp2Button1,
|
213
|
+
gp2Button2,
|
214
|
+
gp2Button3,
|
215
|
+
gp2Button4,
|
216
|
+
gp2Button5,
|
217
|
+
gp2Button6,
|
218
|
+
gp2Button7,
|
219
|
+
gp2Button8,
|
220
|
+
gp2Button9,
|
221
|
+
gp2Button10,
|
222
|
+
gp2Button11,
|
223
|
+
gp2Button12,
|
224
|
+
gp2Button13,
|
225
|
+
gp2Button14,
|
226
|
+
gp2Button15,
|
227
|
+
|
228
|
+
gp3Left,
|
229
|
+
gp3Right,
|
230
|
+
gp3Up,
|
231
|
+
gp3Down,
|
232
|
+
gp3Button0,
|
233
|
+
gp3Button1,
|
234
|
+
gp3Button2,
|
235
|
+
gp3Button3,
|
236
|
+
gp3Button4,
|
237
|
+
gp3Button5,
|
238
|
+
gp3Button6,
|
239
|
+
gp3Button7,
|
240
|
+
gp3Button8,
|
241
|
+
gp3Button9,
|
242
|
+
gp3Button10,
|
243
|
+
gp3Button11,
|
244
|
+
gp3Button12,
|
245
|
+
gp3Button13,
|
246
|
+
gp3Button14,
|
247
|
+
gp3Button15,
|
248
|
+
|
249
|
+
gpRangeEnd = gp3Button15,
|
250
|
+
|
251
|
+
numButtons = gpRangeEnd + 1,
|
252
|
+
numGamepads = 4,
|
253
|
+
noButton = 0xffffffff,
|
254
|
+
|
255
|
+
kbNum = kbRangeEnd - kbRangeBegin + 1,
|
256
|
+
msNum = msRangeEnd - msRangeBegin + 1,
|
257
|
+
gpNum = gpRangeEnd - gpRangeBegin + 1,
|
258
|
+
gpNumPerGamepad = gpNum / (numGamepads + 1)
|
259
|
+
};
|
260
|
+
}
|
261
|
+
|
262
|
+
#undef GOSU_SCANCODE
|
263
|
+
#undef GOSU_SPECIAL_SCANCODE
|
264
|
+
|
265
|
+
#endif
|