gosu 0.7.50-x86-mingw32 → 0.8.0.pre7-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gosu/Buttons.hpp +100 -98
- data/Gosu/Graphics.hpp +5 -26
- data/Gosu/GraphicsBase.hpp +27 -4
- data/Gosu/Input.hpp +8 -19
- data/Gosu/Platform.hpp +5 -1
- data/Gosu/TextInput.hpp +5 -11
- data/Gosu/Version.hpp +3 -3
- data/Gosu/Window.hpp +0 -7
- data/lib/1.8/gosu.so +0 -0
- data/lib/1.9/gosu.so +0 -0
- data/lib/SDL2.dll +0 -0
- data/lib/gosu.rb +6 -7
- data/lib/gosu/swig_patches.rb +1 -0
- data/lib/gosu/zen.rb +12 -0
- metadata +20 -23
- data/.yardopts +0 -1
- data/COPYING +0 -29
- data/README.txt +0 -25
- data/lib/gosu.for_1_8.so +0 -0
- data/lib/gosu.for_1_9.so +0 -0
- data/reference/gosu.rb +0 -1284
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f978a0b6c9e95a7b9ec2ab57cc7f678bfbaa93c
|
4
|
+
data.tar.gz: 4abe2924c3b896eb3726e233411b2459ed9b653f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a136196819a0a98a4976fecd0f8bc173131b7a4269700169afae9732e217f05cc7a0f528cc5ffa0e15bcd46546e82768e0a71db01e9cbc8ff5382f8a11e13722
|
7
|
+
data.tar.gz: 378c5179dd465ae16c6b1afaeee3cfb02e81ca052044864f25195dbb96e10061a8881606e877890d83da0dbd6db8849c92a8d968f4b495ac2df2b595fbeae92f
|
data/Gosu/Buttons.hpp
CHANGED
@@ -23,109 +23,111 @@ namespace Gosu
|
|
23
23
|
enum ButtonName
|
24
24
|
{
|
25
25
|
kbRangeBegin,
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
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,
|
123
125
|
kbRangeEnd = 0xff,
|
124
126
|
|
125
127
|
msRangeBegin,
|
126
128
|
msLeft = msRangeBegin,
|
127
|
-
msRight,
|
128
129
|
msMiddle,
|
130
|
+
msRight,
|
129
131
|
msWheelUp,
|
130
132
|
msWheelDown,
|
131
133
|
msOther0,
|
data/Gosu/Graphics.hpp
CHANGED
@@ -23,26 +23,6 @@ namespace Gosu
|
|
23
23
|
//! Useful when extending Gosu using OpenGL.
|
24
24
|
unsigned const MAX_TEXTURE_SIZE = 1024;
|
25
25
|
|
26
|
-
#ifdef GOSU_IS_MAC
|
27
|
-
// TODO: Without this gigantic hack, Gosu crashes in the "scale" function,
|
28
|
-
// but _only_ when used from Ruby 1.9. It is unclear what might cause this -
|
29
|
-
// maybe a compiler bug that tries to use SSE functions with the wrong
|
30
|
-
// alignment. Adding __attribute__((aligned(16))) does not help, though.
|
31
|
-
struct Transform
|
32
|
-
{
|
33
|
-
double value[16];
|
34
|
-
bool operator==(const Transform &other) { for (int i = 0; i < 16; ++i) if ((*this)[i] != other[i]) return false; return true; }
|
35
|
-
const double &operator[](std::size_t idx) const { return value[idx]; }
|
36
|
-
double &operator[](std::size_t idx) { return value[idx]; }
|
37
|
-
};
|
38
|
-
#else
|
39
|
-
typedef std::tr1::array<double, 16> Transform;
|
40
|
-
#endif
|
41
|
-
Transform translate(double x, double y);
|
42
|
-
Transform rotate(double angle, double aroundX = 0, double aroundY = 0);
|
43
|
-
Transform scale(double factor);
|
44
|
-
Transform scale(double factorX, double factorY, double fromX = 0, double fromY = 0);
|
45
|
-
|
46
26
|
//! Serves as the target of all drawing and provides primitive drawing
|
47
27
|
//! functionality.
|
48
28
|
//! Usually created internally by Gosu::Window.
|
@@ -51,21 +31,21 @@ namespace Gosu
|
|
51
31
|
struct Impl;
|
52
32
|
const GOSU_UNIQUE_PTR<Impl> pimpl;
|
53
33
|
|
54
|
-
#if defined(GOSU_CPP11_ENABLED)
|
34
|
+
#if defined(GOSU_CPP11_ENABLED)
|
55
35
|
// explicitly forbid copying and moving
|
56
36
|
Graphics(Graphics&&) = delete;
|
57
37
|
Graphics& operator=(Graphics&&) = delete;
|
58
38
|
Graphics(const Graphics&) = delete;
|
59
39
|
Graphics& operator=(const Graphics&) = delete;
|
60
|
-
#endif
|
40
|
+
#endif
|
61
41
|
|
62
42
|
public:
|
63
43
|
Graphics(unsigned physicalWidth, unsigned physicalHeight, bool fullscreen);
|
64
44
|
~Graphics();
|
65
45
|
|
66
|
-
//
|
67
|
-
void setResolution(unsigned virtualWidth, unsigned virtualHeight
|
68
|
-
|
46
|
+
// TODO: Replace by setBaseTransform()
|
47
|
+
void setResolution(unsigned virtualWidth, unsigned virtualHeight,
|
48
|
+
double horizontalBlackBarWidth = 0, double verticalBlackBarHeight = 0);
|
69
49
|
|
70
50
|
unsigned width() const;
|
71
51
|
unsigned height() const;
|
@@ -85,7 +65,6 @@ namespace Gosu
|
|
85
65
|
void beginGL();
|
86
66
|
//! Resets Gosu into its default rendering state.
|
87
67
|
void endGL();
|
88
|
-
//! (Experimental)
|
89
68
|
//! Schedules a custom GL functor to be executed at a certain Z level.
|
90
69
|
//! The functor is called in a clean GL context (as given by beginGL/endGL).
|
91
70
|
//! Gosu's rendering up to the Z level may not yet have been glFlush()ed.
|
data/Gosu/GraphicsBase.hpp
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
#define GOSU_GRAPHICSBASE_HPP
|
6
6
|
|
7
7
|
#include <Gosu/Platform.hpp>
|
8
|
+
#include <Gosu/TR1.hpp>
|
8
9
|
#include <limits>
|
9
10
|
|
10
11
|
namespace Gosu
|
@@ -76,12 +77,34 @@ namespace Gosu
|
|
76
77
|
bfTileableRight = 4,
|
77
78
|
bfTileableBottom = 8,
|
78
79
|
bfTileable = bfTileableLeft | bfTileableTop | bfTileableRight | bfTileableBottom
|
79
|
-
};
|
80
|
+
};
|
80
81
|
|
81
|
-
|
82
|
-
//
|
82
|
+
#ifdef GOSU_IS_MAC
|
83
|
+
// TODO: Without this gigantic hack, Gosu crashes in the "scale" function,
|
84
|
+
// but _only_ when used from Ruby 1.9. It is unclear what might cause this -
|
85
|
+
// maybe a compiler bug that tries to use SSE functions with the wrong
|
86
|
+
// alignment. Adding __attribute__((aligned(16))) does not help, though.
|
87
|
+
struct Transform
|
88
|
+
{
|
89
|
+
double value[16];
|
90
|
+
bool operator==(const Transform &other) { for (int i = 0; i < 16; ++i) if ((*this)[i] != other[i]) return false; return true; }
|
91
|
+
const double &operator[](std::size_t idx) const { return value[idx]; }
|
92
|
+
double &operator[](std::size_t idx) { return value[idx]; }
|
93
|
+
};
|
94
|
+
#else
|
95
|
+
typedef std::tr1::array<double, 16> Transform;
|
96
|
+
#endif
|
97
|
+
Transform translate(double x, double y);
|
98
|
+
Transform rotate(double angle, double aroundX = 0, double aroundY = 0);
|
99
|
+
Transform scale(double factor);
|
100
|
+
Transform scale(double factorX, double factorY, double fromX = 0, double fromY = 0);
|
101
|
+
Transform concat(const Transform& lhs, const Transform& rhs);
|
102
|
+
|
103
|
+
#ifndef SWIG
|
104
|
+
// A not so useful optimization - this was supposed to bypass the Z queue for immediate rendering.
|
105
|
+
// In retrospect, the only useful optimization would be to work down the Z queue on a second thread.
|
83
106
|
GOSU_DEPRECATED const double zImmediate = -std::numeric_limits<double>::infinity();
|
84
|
-
|
107
|
+
#endif
|
85
108
|
}
|
86
109
|
|
87
110
|
#endif
|
data/Gosu/Input.hpp
CHANGED
@@ -76,33 +76,22 @@ namespace Gosu
|
|
76
76
|
{
|
77
77
|
struct Impl;
|
78
78
|
const GOSU_UNIQUE_PTR<Impl> pimpl;
|
79
|
-
#if defined(GOSU_CPP11_ENABLED)
|
79
|
+
#if defined(GOSU_CPP11_ENABLED)
|
80
80
|
// explicitly forbid copying and moving
|
81
81
|
Input(Input&&) = delete;
|
82
82
|
Input& operator=(Input&&) = delete;
|
83
83
|
Input(const Input&) = delete;
|
84
84
|
Input& operator=(const Input&) = delete;
|
85
|
-
#endif
|
85
|
+
#endif
|
86
86
|
|
87
87
|
public:
|
88
|
-
|
89
|
-
Input(HWND window);
|
90
|
-
#endif
|
91
|
-
|
92
|
-
#ifdef GOSU_IS_MAC
|
93
|
-
#ifdef GOSU_IS_IPHONE
|
88
|
+
#ifdef GOSU_IS_IPHONE
|
94
89
|
Input(void* view, float updateInterval);
|
95
90
|
void feedTouchEvent(int type, void* touches);
|
96
|
-
|
97
|
-
Input(
|
98
|
-
bool
|
99
|
-
|
100
|
-
#endif
|
101
|
-
|
102
|
-
#ifdef GOSU_IS_X
|
103
|
-
Input(::Display* display, ::Window window);
|
104
|
-
bool feedXEvent(::XEvent& event);
|
105
|
-
#endif
|
91
|
+
#else
|
92
|
+
Input();
|
93
|
+
bool feedSDLEvent(void* event);
|
94
|
+
#endif
|
106
95
|
|
107
96
|
~Input();
|
108
97
|
|
@@ -128,7 +117,7 @@ namespace Gosu
|
|
128
117
|
void setMousePosition(double x, double y);
|
129
118
|
|
130
119
|
// Undocumented for the moment. Also applies to currentTouches().
|
131
|
-
void setMouseFactors(double factorX, double factorY);
|
120
|
+
void setMouseFactors(double factorX, double factorY, double offsetX = 0, double offsetY = 0);
|
132
121
|
|
133
122
|
//! Currently known touches.
|
134
123
|
const Touches& currentTouches() const;
|
data/Gosu/Platform.hpp
CHANGED
@@ -62,8 +62,12 @@ namespace Gosu
|
|
62
62
|
# endif
|
63
63
|
#endif
|
64
64
|
|
65
|
+
#if defined (GOSU_IS_IPHONE) || defined(__arm__)
|
66
|
+
# define GOSU_IS_OPENGLES
|
67
|
+
#endif
|
68
|
+
|
65
69
|
#ifndef SWIG
|
66
|
-
# if
|
70
|
+
# if _MSC_VER >= 1700 || ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__))
|
67
71
|
# define GOSU_CPP11_ENABLED
|
68
72
|
# endif
|
69
73
|
#endif
|
data/Gosu/TextInput.hpp
CHANGED
@@ -24,12 +24,12 @@ namespace Gosu
|
|
24
24
|
{
|
25
25
|
struct Impl;
|
26
26
|
const GOSU_UNIQUE_PTR<Impl> pimpl;
|
27
|
-
#if defined(GOSU_CPP11_ENABLED)
|
27
|
+
#if defined(GOSU_CPP11_ENABLED)
|
28
28
|
TextInput(TextInput&&) = delete;
|
29
29
|
TextInput& operator=(TextInput&&) = delete;
|
30
30
|
TextInput(const TextInput&) = delete;
|
31
31
|
TextInput& operator=(const TextInput&) = delete;
|
32
|
-
#endif
|
32
|
+
#endif
|
33
33
|
|
34
34
|
public:
|
35
35
|
TextInput();
|
@@ -55,20 +55,14 @@ namespace Gosu
|
|
55
55
|
void setSelectionStart(unsigned pos);
|
56
56
|
|
57
57
|
// Platform-specific communication with Gosu::Input.
|
58
|
-
|
59
|
-
bool feedNSEvent(void* event);
|
60
|
-
#elif defined(GOSU_IS_WIN)
|
61
|
-
bool feedMessage(unsigned long message, unsigned long wparam, unsigned long lparam);
|
62
|
-
#elif defined(GOSU_IS_X)
|
63
|
-
bool feedXEvent(void* display, void* event);
|
64
|
-
#endif
|
58
|
+
bool feedSDLEvent(void* event);
|
65
59
|
|
66
60
|
//! Overridable filter that is applied to all new text that is entered.
|
67
61
|
//! Allows for context-sensitive filtering/extending/... of the text.
|
68
62
|
//! The text will be inserted at caretPos afterwards.
|
69
|
-
virtual std::wstring filter(const std::wstring&
|
63
|
+
virtual std::wstring filter(const std::wstring& text) const
|
70
64
|
{
|
71
|
-
return
|
65
|
+
return text;
|
72
66
|
}
|
73
67
|
};
|
74
68
|
}
|
data/Gosu/Version.hpp
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
#define GOSU_VERSION_HPP
|
3
3
|
|
4
4
|
#define GOSU_MAJOR_VERSION 0
|
5
|
-
#define GOSU_MINOR_VERSION
|
6
|
-
#define GOSU_POINT_VERSION
|
7
|
-
#define GOSU_VERSION "0.
|
5
|
+
#define GOSU_MINOR_VERSION 8
|
6
|
+
#define GOSU_POINT_VERSION 0
|
7
|
+
#define GOSU_VERSION "0.8.0.pre7"
|
8
8
|
|
9
9
|
#define GOSU_COPYRIGHT_NOTICE \
|
10
10
|
" " \
|
data/Gosu/Window.hpp
CHANGED
@@ -96,13 +96,6 @@ namespace Gosu
|
|
96
96
|
const Input& input() const;
|
97
97
|
Input& input();
|
98
98
|
|
99
|
-
#ifdef GOSU_IS_WIN
|
100
|
-
// Only on Windows, used for integrating with GUI toolkits.
|
101
|
-
HWND handle() const;
|
102
|
-
virtual LRESULT handleMessage(UINT message, WPARAM wparam,
|
103
|
-
LPARAM lparam);
|
104
|
-
#endif
|
105
|
-
|
106
99
|
#ifdef GOSU_IS_UNIX
|
107
100
|
// Context for creating shared contexts.
|
108
101
|
// Only on Unices (so far).
|