gosu 0.7.20 → 0.7.21
Sign up to get free protection for your applications and to get access to all the features.
- data/Gosu/Audio.hpp +1 -0
- data/Gosu/Color.hpp +5 -0
- data/Gosu/Font.hpp +5 -0
- data/Gosu/Graphics.hpp +12 -0
- data/Gosu/GraphicsBase.hpp +4 -3
- data/Gosu/ImageData.hpp +1 -0
- data/Gosu/Input.hpp +1 -0
- data/Gosu/Platform.hpp +8 -0
- data/Gosu/Text.hpp +17 -7
- data/Gosu/Version.hpp +2 -2
- data/Gosu/Window.hpp +4 -4
- data/GosuImpl/Audio/AudioSDL.cpp +4 -0
- data/GosuImpl/Graphics/BitmapPNG.cpp +7 -6
- data/GosuImpl/Graphics/Common.hpp +28 -0
- data/GosuImpl/Graphics/DrawOp.hpp +31 -6
- data/GosuImpl/Graphics/Font.cpp +63 -34
- data/GosuImpl/Graphics/FormattedString.hpp +248 -0
- data/GosuImpl/Graphics/Graphics.cpp +39 -7
- data/GosuImpl/Graphics/LargeImageData.cpp +10 -0
- data/GosuImpl/Graphics/LargeImageData.hpp +2 -0
- data/GosuImpl/Graphics/Macro.hpp +5 -0
- data/GosuImpl/Graphics/TexChunk.cpp +10 -5
- data/GosuImpl/Graphics/TexChunk.hpp +4 -2
- data/GosuImpl/Graphics/Text.cpp +118 -57
- data/GosuImpl/Graphics/TextTouch.mm +49 -17
- data/GosuImpl/Graphics/TextUnix.cpp +1 -2
- data/GosuImpl/Graphics/TextWin.cpp +2 -3
- data/GosuImpl/Graphics/Texture.cpp +33 -2
- data/GosuImpl/Graphics/Texture.hpp +3 -1
- data/GosuImpl/Graphics/Transform.cpp +59 -0
- data/GosuImpl/RubyGosu.swg +46 -4
- data/GosuImpl/RubyGosu_wrap.cxx +822 -157
- data/GosuImpl/Utility.cpp +1 -0
- data/GosuImpl/WindowWin.cpp +8 -8
- data/examples/CptnRuby.rb +27 -28
- data/lib/gosu.rb +1 -1
- data/linux/extconf.rb +2 -2
- metadata +21 -6
- data/GosuImpl/RubyGosu_wrap.cxx.rej +0 -187
@@ -93,7 +93,7 @@ GLuint Gosu::Texture::texName() const
|
|
93
93
|
}
|
94
94
|
|
95
95
|
std::auto_ptr<Gosu::TexChunk>
|
96
|
-
Gosu::Texture::tryAlloc(Graphics& graphics,
|
96
|
+
Gosu::Texture::tryAlloc(Graphics& graphics, Transforms& transforms,
|
97
97
|
DrawOpQueueStack& queues, boost::shared_ptr<Texture> ptr,
|
98
98
|
const Bitmap& bmp, unsigned srcX,
|
99
99
|
unsigned srcY, unsigned srcWidth,
|
@@ -105,7 +105,7 @@ std::auto_ptr<Gosu::TexChunk>
|
|
105
105
|
if (!block)
|
106
106
|
return result;
|
107
107
|
|
108
|
-
result.reset(new TexChunk(graphics, queues, ptr, block->left + padding, block->top + padding,
|
108
|
+
result.reset(new TexChunk(graphics, transforms, queues, ptr, block->left + padding, block->top + padding,
|
109
109
|
block->width - 2 * padding, block->height - 2 * padding, padding));
|
110
110
|
|
111
111
|
#if defined(__BIG_ENDIAN__)
|
@@ -144,3 +144,34 @@ void Gosu::Texture::free(unsigned x, unsigned y)
|
|
144
144
|
allocator.free(x, y);
|
145
145
|
num -= 1;
|
146
146
|
}
|
147
|
+
|
148
|
+
Gosu::Bitmap Gosu::Texture::toBitmap(unsigned x, unsigned y, unsigned width, unsigned height) const
|
149
|
+
{
|
150
|
+
#if defined(__BIG_ENDIAN__)
|
151
|
+
unsigned format = GL_RGBA;
|
152
|
+
#elif defined(GOSU_IS_IPHONE)
|
153
|
+
unsigned format = GL_RGBA;
|
154
|
+
#else
|
155
|
+
unsigned format = GL_BGRA;
|
156
|
+
#endif
|
157
|
+
|
158
|
+
Gosu::Bitmap fullTexture;
|
159
|
+
fullTexture.resize(size(), size());
|
160
|
+
glBindTexture(GL_TEXTURE_2D, name);
|
161
|
+
glGetTexImage(GL_TEXTURE_2D, 0, format, GL_UNSIGNED_BYTE, fullTexture.data());
|
162
|
+
Gosu::Bitmap bitmap;
|
163
|
+
bitmap.resize(width, height);
|
164
|
+
bitmap.insert(fullTexture, -int(x), -int(y));
|
165
|
+
|
166
|
+
#if defined(__BIG_ENDIAN__)
|
167
|
+
for (unsigned y = 0; y < height; ++y)
|
168
|
+
for (unsigned x = 0; x < width; ++x)
|
169
|
+
bitmap.setPixel(x, y, bigToNative(bitmap.getPixel(x, y).argb() & 0xffffff00 >> 8 | bitmap.getPixel(x, y).alpha() << 24));
|
170
|
+
#elif defined(GOSU_IS_IPHONE)
|
171
|
+
for (unsigned y = 0; y < height; ++y)
|
172
|
+
for (unsigned x = 0; x < width; ++x)
|
173
|
+
bitmap.setPixel(x, y, bitmap.getPixel(x, y).abgr());
|
174
|
+
#endif
|
175
|
+
|
176
|
+
return bitmap;
|
177
|
+
}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
#define GOSUIMPL_GRAPHICS_TEXTURE_HPP
|
3
3
|
|
4
4
|
#include <Gosu/Fwd.hpp>
|
5
|
+
#include <Gosu/Bitmap.hpp>
|
5
6
|
#include <GosuImpl/Graphics/Common.hpp>
|
6
7
|
#include <GosuImpl/Graphics/TexChunk.hpp>
|
7
8
|
#include <GosuImpl/Graphics/BlockAllocator.hpp>
|
@@ -25,10 +26,11 @@ namespace Gosu
|
|
25
26
|
unsigned size() const;
|
26
27
|
GLuint texName() const;
|
27
28
|
std::auto_ptr<TexChunk>
|
28
|
-
tryAlloc(Graphics& graphics, DrawOpQueueStack& queues, boost::shared_ptr<Texture> ptr,
|
29
|
+
tryAlloc(Graphics& graphics, Transforms& transforms, DrawOpQueueStack& queues, boost::shared_ptr<Texture> ptr,
|
29
30
|
const Bitmap& bmp, unsigned srcX, unsigned srcY, unsigned srcWidth, unsigned srcHeight,
|
30
31
|
unsigned padding);
|
31
32
|
void free(unsigned x, unsigned y);
|
33
|
+
Gosu::Bitmap toBitmap(unsigned x, unsigned y, unsigned width, unsigned height) const;
|
32
34
|
};
|
33
35
|
}
|
34
36
|
|
@@ -0,0 +1,59 @@
|
|
1
|
+
// Default matrices, adapted from original Transform support
|
2
|
+
// contribution by erisdiscord. Thank you!
|
3
|
+
|
4
|
+
#include <Gosu/Graphics.hpp>
|
5
|
+
#include <Gosu/Math.hpp>
|
6
|
+
#include <GosuImpl/Graphics/Common.hpp>
|
7
|
+
#include <cmath>
|
8
|
+
|
9
|
+
Gosu::Transform
|
10
|
+
Gosu::rotate(double angle, double aroundX, double aroundY)
|
11
|
+
{
|
12
|
+
double c = std::cos(degreesToRadians(angle));
|
13
|
+
double s = std::sin(degreesToRadians(angle));
|
14
|
+
Gosu::Transform result = {
|
15
|
+
+c, +s, 0, 0,
|
16
|
+
-s, +c, 0, 0,
|
17
|
+
0, 0, 1, 0,
|
18
|
+
0, 0, 0, 1
|
19
|
+
};
|
20
|
+
if (aroundX != 0 || aroundY != 0)
|
21
|
+
result = multiply(multiply(translate(-aroundX, -aroundY), result), translate(aroundX, aroundY));
|
22
|
+
return result;
|
23
|
+
}
|
24
|
+
|
25
|
+
Gosu::Transform
|
26
|
+
Gosu::translate(double x, double y)
|
27
|
+
{
|
28
|
+
Gosu::Transform result = {
|
29
|
+
1, 0, 0, 0,
|
30
|
+
0, 1, 0, 0,
|
31
|
+
0, 0, 1, 0,
|
32
|
+
x, y, 0, 1
|
33
|
+
};
|
34
|
+
return result;
|
35
|
+
}
|
36
|
+
|
37
|
+
Gosu::Transform
|
38
|
+
Gosu::scale(double factor)
|
39
|
+
{
|
40
|
+
Gosu::Transform result = {
|
41
|
+
factor, 0, 0, 0,
|
42
|
+
0, factor, 0, 0,
|
43
|
+
0, 0, 1, 0,
|
44
|
+
0, 0, 0, 1
|
45
|
+
};
|
46
|
+
return result;
|
47
|
+
}
|
48
|
+
|
49
|
+
Gosu::Transform
|
50
|
+
Gosu::scale(double factorX, double factorY)
|
51
|
+
{
|
52
|
+
Gosu::Transform result = {
|
53
|
+
factorX, 0, 0, 0,
|
54
|
+
0, factorY, 0, 0,
|
55
|
+
0, 0, 1, 0,
|
56
|
+
0, 0, 0, 1
|
57
|
+
};
|
58
|
+
return result;
|
59
|
+
}
|
data/GosuImpl/RubyGosu.swg
CHANGED
@@ -163,6 +163,7 @@
|
|
163
163
|
namespace Gosu {
|
164
164
|
void enableUndocumentedRetrofication() { extern bool undocumentedRetrofication; undocumentedRetrofication = true; }
|
165
165
|
unsigned __maxTextureSize() { return Gosu::Texture::maxTextureSize(); }
|
166
|
+
void register_entity(const std::wstring& name, Gosu::Image* image) { registerEntity(name, image->getData().toBitmap()); }
|
166
167
|
}
|
167
168
|
|
168
169
|
#include <sstream>
|
@@ -266,6 +267,7 @@ namespace Gosu
|
|
266
267
|
%ignore Gosu::createText;
|
267
268
|
%ignore Gosu::textHeight;
|
268
269
|
%ignore Gosu::drawText;
|
270
|
+
%ignore Gosu::registerEntity;
|
269
271
|
%include "../Gosu/Text.hpp"
|
270
272
|
|
271
273
|
|
@@ -292,6 +294,7 @@ namespace Gosu
|
|
292
294
|
namespace Gosu {
|
293
295
|
void enableUndocumentedRetrofication() { extern bool undocumentedRetrofication; undocumentedRetrofication = true; }
|
294
296
|
unsigned __maxTextureSize() { return Gosu::Texture::maxTextureSize(); }
|
297
|
+
void register_entity(const std::wstring& name, Gosu::Image* image) { registerEntity(name, image->getData().toBitmap()); }
|
295
298
|
}
|
296
299
|
|
297
300
|
// Color
|
@@ -435,6 +438,20 @@ namespace Gosu {
|
|
435
438
|
tileWidth, tileHeight, tileable, vec);
|
436
439
|
return vec;
|
437
440
|
}
|
441
|
+
std::string toBlob() const
|
442
|
+
{
|
443
|
+
Gosu::Bitmap bmp = $self->getData().toBitmap();
|
444
|
+
return std::string(reinterpret_cast<const char*>(bmp.data()),
|
445
|
+
reinterpret_cast<const char*>(bmp.data()) + bmp.width() * bmp.height() * 4);
|
446
|
+
}
|
447
|
+
unsigned columns() const
|
448
|
+
{
|
449
|
+
return $self->width();
|
450
|
+
}
|
451
|
+
unsigned rows() const
|
452
|
+
{
|
453
|
+
return $self->height();
|
454
|
+
}
|
438
455
|
}
|
439
456
|
|
440
457
|
// Audio:
|
@@ -516,10 +533,6 @@ namespace Gosu {
|
|
516
533
|
$self->graphics().drawTriangle(x1, y1, c1, x2, y2, c2, x3, y3, c3,
|
517
534
|
z, mode);
|
518
535
|
}
|
519
|
-
/*void drawRect(double x, double y, double w, double h, Gosu::Color c,
|
520
|
-
Gosu::ZPos z = 0, Gosu::AlphaMode mode = Gosu::amDefault) {
|
521
|
-
$self->graphics().drawRect(x, y, w, h, c, z, mode);
|
522
|
-
}*/
|
523
536
|
void drawQuad(double x1, double y1, Gosu::Color c1,
|
524
537
|
double x2, double y2, Gosu::Color c2,
|
525
538
|
double x3, double y3, Gosu::Color c3,
|
@@ -589,4 +602,33 @@ namespace Gosu {
|
|
589
602
|
rb_yield(Qnil);
|
590
603
|
return new Gosu::Image($self->graphics().endRecording());
|
591
604
|
}
|
605
|
+
void transform(double m0, double m1, double m2, double m3, double m4, double m5, double m6, double m7,
|
606
|
+
double m8, double m9, double m10, double m11, double m12, double m13, double m14, double m15) {
|
607
|
+
Gosu::Transform transform = {
|
608
|
+
m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15
|
609
|
+
};
|
610
|
+
$self->graphics().pushTransform(transform);
|
611
|
+
rb_yield(Qnil);
|
612
|
+
$self->graphics().popTransform();
|
613
|
+
}
|
614
|
+
void rotate(double angle, double aroundX = 0, double aroundY = 0) {
|
615
|
+
$self->graphics().pushTransform(Gosu::rotate(angle, aroundX, aroundY));
|
616
|
+
rb_yield(Qnil);
|
617
|
+
$self->graphics().popTransform();
|
618
|
+
}
|
619
|
+
void scale(double factor) {
|
620
|
+
$self->graphics().pushTransform(Gosu::scale(factor));
|
621
|
+
rb_yield(Qnil);
|
622
|
+
$self->graphics().popTransform();
|
623
|
+
}
|
624
|
+
void scale(double factorX, double factorY) {
|
625
|
+
$self->graphics().pushTransform(Gosu::scale(factorX, factorY));
|
626
|
+
rb_yield(Qnil);
|
627
|
+
$self->graphics().popTransform();
|
628
|
+
}
|
629
|
+
void translate(double x, double y) {
|
630
|
+
$self->graphics().pushTransform(Gosu::translate(x, y));
|
631
|
+
rb_yield(Qnil);
|
632
|
+
$self->graphics().popTransform();
|
633
|
+
}
|
592
634
|
};
|
data/GosuImpl/RubyGosu_wrap.cxx
CHANGED
@@ -2152,17 +2152,17 @@ namespace Swig {
|
|
2152
2152
|
/* -------- TYPES TABLE (BEGIN) -------- */
|
2153
2153
|
|
2154
2154
|
#define SWIGTYPE_p_Channel swig_types[0]
|
2155
|
-
#define
|
2156
|
-
#define
|
2157
|
-
#define
|
2158
|
-
#define
|
2159
|
-
#define
|
2160
|
-
#define
|
2161
|
-
#define
|
2162
|
-
#define
|
2163
|
-
#define
|
2164
|
-
#define
|
2165
|
-
#define
|
2155
|
+
#define SWIGTYPE_p_Gosu__Button swig_types[1]
|
2156
|
+
#define SWIGTYPE_p_Gosu__Color swig_types[2]
|
2157
|
+
#define SWIGTYPE_p_Gosu__Font swig_types[3]
|
2158
|
+
#define SWIGTYPE_p_Gosu__GLTexInfo swig_types[4]
|
2159
|
+
#define SWIGTYPE_p_Gosu__Image swig_types[5]
|
2160
|
+
#define SWIGTYPE_p_Gosu__Sample swig_types[6]
|
2161
|
+
#define SWIGTYPE_p_Gosu__SampleInstance swig_types[7]
|
2162
|
+
#define SWIGTYPE_p_Gosu__Song swig_types[8]
|
2163
|
+
#define SWIGTYPE_p_Gosu__TextInput swig_types[9]
|
2164
|
+
#define SWIGTYPE_p_Gosu__Window swig_types[10]
|
2165
|
+
#define SWIGTYPE_p_boost__arrayT_double_16_t swig_types[11]
|
2166
2166
|
#define SWIGTYPE_p_char swig_types[12]
|
2167
2167
|
#define SWIGTYPE_p_double swig_types[13]
|
2168
2168
|
#define SWIGTYPE_p_std__wstring swig_types[14]
|
@@ -2234,6 +2234,7 @@ static VALUE mGosu;
|
|
2234
2234
|
namespace Gosu {
|
2235
2235
|
void enableUndocumentedRetrofication() { extern bool undocumentedRetrofication; undocumentedRetrofication = true; }
|
2236
2236
|
unsigned __maxTextureSize() { return Gosu::Texture::maxTextureSize(); }
|
2237
|
+
void register_entity(const std::wstring& name, Gosu::Image* image) { registerEntity(name, image->getData().toBitmap()); }
|
2237
2238
|
}
|
2238
2239
|
|
2239
2240
|
#include <sstream>
|
@@ -2607,6 +2608,17 @@ SWIGINTERN std::vector< Gosu::Image * > Gosu_Image_loadTiles(Gosu::Window &windo
|
|
2607
2608
|
tileWidth, tileHeight, tileable, vec);
|
2608
2609
|
return vec;
|
2609
2610
|
}
|
2611
|
+
SWIGINTERN std::string Gosu_Image_toBlob(Gosu::Image const *self){
|
2612
|
+
Gosu::Bitmap bmp = self->getData().toBitmap();
|
2613
|
+
return std::string(reinterpret_cast<const char*>(bmp.data()),
|
2614
|
+
reinterpret_cast<const char*>(bmp.data()) + bmp.width() * bmp.height() * 4);
|
2615
|
+
}
|
2616
|
+
SWIGINTERN unsigned int Gosu_Image_columns(Gosu::Image const *self){
|
2617
|
+
return self->width();
|
2618
|
+
}
|
2619
|
+
SWIGINTERN unsigned int Gosu_Image_rows(Gosu::Image const *self){
|
2620
|
+
return self->height();
|
2621
|
+
}
|
2610
2622
|
|
2611
2623
|
SWIGINTERNINLINE VALUE
|
2612
2624
|
SWIG_From_bool (bool value)
|
@@ -2687,6 +2699,34 @@ SWIGINTERN Gosu::Image *Gosu_Window_record(Gosu::Window *self){
|
|
2687
2699
|
rb_yield(Qnil);
|
2688
2700
|
return new Gosu::Image(self->graphics().endRecording());
|
2689
2701
|
}
|
2702
|
+
SWIGINTERN void Gosu_Window_transform(Gosu::Window *self,double m0,double m1,double m2,double m3,double m4,double m5,double m6,double m7,double m8,double m9,double m10,double m11,double m12,double m13,double m14,double m15){
|
2703
|
+
Gosu::Transform transform = {
|
2704
|
+
m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15
|
2705
|
+
};
|
2706
|
+
self->graphics().pushTransform(transform);
|
2707
|
+
rb_yield(Qnil);
|
2708
|
+
self->graphics().popTransform();
|
2709
|
+
}
|
2710
|
+
SWIGINTERN void Gosu_Window_rotate(Gosu::Window *self,double angle,double aroundX=0,double aroundY=0){
|
2711
|
+
self->graphics().pushTransform(Gosu::rotate(angle, aroundX, aroundY));
|
2712
|
+
rb_yield(Qnil);
|
2713
|
+
self->graphics().popTransform();
|
2714
|
+
}
|
2715
|
+
SWIGINTERN void Gosu_Window_scale__SWIG_0(Gosu::Window *self,double factor){
|
2716
|
+
self->graphics().pushTransform(Gosu::scale(factor));
|
2717
|
+
rb_yield(Qnil);
|
2718
|
+
self->graphics().popTransform();
|
2719
|
+
}
|
2720
|
+
SWIGINTERN void Gosu_Window_scale__SWIG_1(Gosu::Window *self,double factorX,double factorY){
|
2721
|
+
self->graphics().pushTransform(Gosu::scale(factorX, factorY));
|
2722
|
+
rb_yield(Qnil);
|
2723
|
+
self->graphics().popTransform();
|
2724
|
+
}
|
2725
|
+
SWIGINTERN void Gosu_Window_translate(Gosu::Window *self,double x,double y){
|
2726
|
+
self->graphics().pushTransform(Gosu::translate(x, y));
|
2727
|
+
rb_yield(Qnil);
|
2728
|
+
self->graphics().popTransform();
|
2729
|
+
}
|
2690
2730
|
|
2691
2731
|
static void markWindow(void* window) {
|
2692
2732
|
Gosu::TextInput* ti = static_cast<Gosu::Window*>(window)->input().textInput();
|
@@ -3246,6 +3286,208 @@ fail:
|
|
3246
3286
|
}
|
3247
3287
|
|
3248
3288
|
|
3289
|
+
SWIGINTERN VALUE
|
3290
|
+
_wrap_rotate(int argc, VALUE *argv, VALUE self) {
|
3291
|
+
double arg1 ;
|
3292
|
+
double arg2 = (double) 0 ;
|
3293
|
+
double arg3 = (double) 0 ;
|
3294
|
+
double val1 ;
|
3295
|
+
int ecode1 = 0 ;
|
3296
|
+
double val2 ;
|
3297
|
+
int ecode2 = 0 ;
|
3298
|
+
double val3 ;
|
3299
|
+
int ecode3 = 0 ;
|
3300
|
+
Gosu::Transform result;
|
3301
|
+
VALUE vresult = Qnil;
|
3302
|
+
|
3303
|
+
if ((argc < 1) || (argc > 3)) {
|
3304
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3305
|
+
}
|
3306
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
3307
|
+
if (!SWIG_IsOK(ecode1)) {
|
3308
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::rotate", 1, argv[0] ));
|
3309
|
+
}
|
3310
|
+
arg1 = static_cast< double >(val1);
|
3311
|
+
if (argc > 1) {
|
3312
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
3313
|
+
if (!SWIG_IsOK(ecode2)) {
|
3314
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::rotate", 2, argv[1] ));
|
3315
|
+
}
|
3316
|
+
arg2 = static_cast< double >(val2);
|
3317
|
+
}
|
3318
|
+
if (argc > 2) {
|
3319
|
+
ecode3 = SWIG_AsVal_double(argv[2], &val3);
|
3320
|
+
if (!SWIG_IsOK(ecode3)) {
|
3321
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::rotate", 3, argv[2] ));
|
3322
|
+
}
|
3323
|
+
arg3 = static_cast< double >(val3);
|
3324
|
+
}
|
3325
|
+
{
|
3326
|
+
try {
|
3327
|
+
result = Gosu::rotate(arg1,arg2,arg3);
|
3328
|
+
} catch(const std::runtime_error& e) {
|
3329
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
3330
|
+
}
|
3331
|
+
}
|
3332
|
+
vresult = SWIG_NewPointerObj((new Gosu::Transform(static_cast< const Gosu::Transform& >(result))), SWIGTYPE_p_boost__arrayT_double_16_t, SWIG_POINTER_OWN | 0 );
|
3333
|
+
return vresult;
|
3334
|
+
fail:
|
3335
|
+
return Qnil;
|
3336
|
+
}
|
3337
|
+
|
3338
|
+
|
3339
|
+
SWIGINTERN VALUE
|
3340
|
+
_wrap_translate(int argc, VALUE *argv, VALUE self) {
|
3341
|
+
double arg1 ;
|
3342
|
+
double arg2 ;
|
3343
|
+
double val1 ;
|
3344
|
+
int ecode1 = 0 ;
|
3345
|
+
double val2 ;
|
3346
|
+
int ecode2 = 0 ;
|
3347
|
+
Gosu::Transform result;
|
3348
|
+
VALUE vresult = Qnil;
|
3349
|
+
|
3350
|
+
if ((argc < 2) || (argc > 2)) {
|
3351
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3352
|
+
}
|
3353
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
3354
|
+
if (!SWIG_IsOK(ecode1)) {
|
3355
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::translate", 1, argv[0] ));
|
3356
|
+
}
|
3357
|
+
arg1 = static_cast< double >(val1);
|
3358
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
3359
|
+
if (!SWIG_IsOK(ecode2)) {
|
3360
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::translate", 2, argv[1] ));
|
3361
|
+
}
|
3362
|
+
arg2 = static_cast< double >(val2);
|
3363
|
+
{
|
3364
|
+
try {
|
3365
|
+
result = Gosu::translate(arg1,arg2);
|
3366
|
+
} catch(const std::runtime_error& e) {
|
3367
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
3368
|
+
}
|
3369
|
+
}
|
3370
|
+
vresult = SWIG_NewPointerObj((new Gosu::Transform(static_cast< const Gosu::Transform& >(result))), SWIGTYPE_p_boost__arrayT_double_16_t, SWIG_POINTER_OWN | 0 );
|
3371
|
+
return vresult;
|
3372
|
+
fail:
|
3373
|
+
return Qnil;
|
3374
|
+
}
|
3375
|
+
|
3376
|
+
|
3377
|
+
SWIGINTERN VALUE
|
3378
|
+
_wrap_scale__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
3379
|
+
double arg1 ;
|
3380
|
+
double val1 ;
|
3381
|
+
int ecode1 = 0 ;
|
3382
|
+
Gosu::Transform result;
|
3383
|
+
VALUE vresult = Qnil;
|
3384
|
+
|
3385
|
+
if ((argc < 1) || (argc > 1)) {
|
3386
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3387
|
+
}
|
3388
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
3389
|
+
if (!SWIG_IsOK(ecode1)) {
|
3390
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::scale", 1, argv[0] ));
|
3391
|
+
}
|
3392
|
+
arg1 = static_cast< double >(val1);
|
3393
|
+
{
|
3394
|
+
try {
|
3395
|
+
result = Gosu::scale(arg1);
|
3396
|
+
} catch(const std::runtime_error& e) {
|
3397
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
3398
|
+
}
|
3399
|
+
}
|
3400
|
+
vresult = SWIG_NewPointerObj((new Gosu::Transform(static_cast< const Gosu::Transform& >(result))), SWIGTYPE_p_boost__arrayT_double_16_t, SWIG_POINTER_OWN | 0 );
|
3401
|
+
return vresult;
|
3402
|
+
fail:
|
3403
|
+
return Qnil;
|
3404
|
+
}
|
3405
|
+
|
3406
|
+
|
3407
|
+
SWIGINTERN VALUE
|
3408
|
+
_wrap_scale__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
3409
|
+
double arg1 ;
|
3410
|
+
double arg2 ;
|
3411
|
+
double val1 ;
|
3412
|
+
int ecode1 = 0 ;
|
3413
|
+
double val2 ;
|
3414
|
+
int ecode2 = 0 ;
|
3415
|
+
Gosu::Transform result;
|
3416
|
+
VALUE vresult = Qnil;
|
3417
|
+
|
3418
|
+
if ((argc < 2) || (argc > 2)) {
|
3419
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3420
|
+
}
|
3421
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
3422
|
+
if (!SWIG_IsOK(ecode1)) {
|
3423
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::scale", 1, argv[0] ));
|
3424
|
+
}
|
3425
|
+
arg1 = static_cast< double >(val1);
|
3426
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
3427
|
+
if (!SWIG_IsOK(ecode2)) {
|
3428
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::scale", 2, argv[1] ));
|
3429
|
+
}
|
3430
|
+
arg2 = static_cast< double >(val2);
|
3431
|
+
{
|
3432
|
+
try {
|
3433
|
+
result = Gosu::scale(arg1,arg2);
|
3434
|
+
} catch(const std::runtime_error& e) {
|
3435
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
3436
|
+
}
|
3437
|
+
}
|
3438
|
+
vresult = SWIG_NewPointerObj((new Gosu::Transform(static_cast< const Gosu::Transform& >(result))), SWIGTYPE_p_boost__arrayT_double_16_t, SWIG_POINTER_OWN | 0 );
|
3439
|
+
return vresult;
|
3440
|
+
fail:
|
3441
|
+
return Qnil;
|
3442
|
+
}
|
3443
|
+
|
3444
|
+
|
3445
|
+
SWIGINTERN VALUE _wrap_scale(int nargs, VALUE *args, VALUE self) {
|
3446
|
+
int argc;
|
3447
|
+
VALUE argv[2];
|
3448
|
+
int ii;
|
3449
|
+
|
3450
|
+
argc = nargs;
|
3451
|
+
if (argc > 2) SWIG_fail;
|
3452
|
+
for (ii = 0; (ii < argc); ++ii) {
|
3453
|
+
argv[ii] = args[ii];
|
3454
|
+
}
|
3455
|
+
if (argc == 1) {
|
3456
|
+
int _v;
|
3457
|
+
{
|
3458
|
+
int res = SWIG_AsVal_double(argv[0], NULL);
|
3459
|
+
_v = SWIG_CheckState(res);
|
3460
|
+
}
|
3461
|
+
if (_v) {
|
3462
|
+
return _wrap_scale__SWIG_0(nargs, args, self);
|
3463
|
+
}
|
3464
|
+
}
|
3465
|
+
if (argc == 2) {
|
3466
|
+
int _v;
|
3467
|
+
{
|
3468
|
+
int res = SWIG_AsVal_double(argv[0], NULL);
|
3469
|
+
_v = SWIG_CheckState(res);
|
3470
|
+
}
|
3471
|
+
if (_v) {
|
3472
|
+
{
|
3473
|
+
int res = SWIG_AsVal_double(argv[1], NULL);
|
3474
|
+
_v = SWIG_CheckState(res);
|
3475
|
+
}
|
3476
|
+
if (_v) {
|
3477
|
+
return _wrap_scale__SWIG_1(nargs, args, self);
|
3478
|
+
}
|
3479
|
+
}
|
3480
|
+
}
|
3481
|
+
|
3482
|
+
fail:
|
3483
|
+
Ruby_Format_OverloadedError( argc, 2, "scale",
|
3484
|
+
" Gosu::Transform scale(double factor)\n"
|
3485
|
+
" Gosu::Transform scale(double factorX, double factorY)\n");
|
3486
|
+
|
3487
|
+
return Qnil;
|
3488
|
+
}
|
3489
|
+
|
3490
|
+
|
3249
3491
|
SWIGINTERN VALUE
|
3250
3492
|
_wrap_enable_undocumented_retrofication(int argc, VALUE *argv, VALUE self) {
|
3251
3493
|
if ((argc < 0) || (argc > 0)) {
|
@@ -3286,6 +3528,40 @@ fail:
|
|
3286
3528
|
}
|
3287
3529
|
|
3288
3530
|
|
3531
|
+
SWIGINTERN VALUE
|
3532
|
+
_wrap_register_entity(int argc, VALUE *argv, VALUE self) {
|
3533
|
+
std::wstring *arg1 = 0 ;
|
3534
|
+
Gosu::Image *arg2 = (Gosu::Image *) 0 ;
|
3535
|
+
std::wstring temp1 ;
|
3536
|
+
void *argp2 = 0 ;
|
3537
|
+
int res2 = 0 ;
|
3538
|
+
|
3539
|
+
if ((argc < 2) || (argc > 2)) {
|
3540
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3541
|
+
}
|
3542
|
+
{
|
3543
|
+
VALUE localTemporary = rb_obj_as_string(argv[0]);
|
3544
|
+
temp1 = Gosu::utf8ToWstring(StringValueCStr(localTemporary));
|
3545
|
+
arg1 = &temp1;
|
3546
|
+
}
|
3547
|
+
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_Gosu__Image, 0 | 0 );
|
3548
|
+
if (!SWIG_IsOK(res2)) {
|
3549
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Gosu::Image *","Gosu::register_entity", 2, argv[1] ));
|
3550
|
+
}
|
3551
|
+
arg2 = reinterpret_cast< Gosu::Image * >(argp2);
|
3552
|
+
{
|
3553
|
+
try {
|
3554
|
+
Gosu::register_entity((std::wstring const &)*arg1,arg2);
|
3555
|
+
} catch(const std::runtime_error& e) {
|
3556
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
3557
|
+
}
|
3558
|
+
}
|
3559
|
+
return Qnil;
|
3560
|
+
fail:
|
3561
|
+
return Qnil;
|
3562
|
+
}
|
3563
|
+
|
3564
|
+
|
3289
3565
|
swig_class SwigClassColor;
|
3290
3566
|
|
3291
3567
|
SWIGINTERN VALUE
|
@@ -6376,49 +6652,139 @@ fail:
|
|
6376
6652
|
}
|
6377
6653
|
|
6378
6654
|
|
6379
|
-
swig_class SwigClassSampleInstance;
|
6380
|
-
|
6381
|
-
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
6382
|
-
SWIGINTERN VALUE
|
6383
|
-
_wrap_SampleInstance_allocate(VALUE self) {
|
6384
|
-
#else
|
6385
|
-
SWIGINTERN VALUE
|
6386
|
-
_wrap_SampleInstance_allocate(int argc, VALUE *argv, VALUE self) {
|
6387
|
-
#endif
|
6388
|
-
|
6389
|
-
|
6390
|
-
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__SampleInstance);
|
6391
|
-
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
6392
|
-
rb_obj_call_init(vresult, argc, argv);
|
6393
|
-
#endif
|
6394
|
-
return vresult;
|
6395
|
-
}
|
6396
|
-
|
6397
|
-
|
6398
6655
|
SWIGINTERN VALUE
|
6399
|
-
|
6400
|
-
|
6401
|
-
|
6402
|
-
int
|
6403
|
-
|
6404
|
-
|
6405
|
-
int ecode2 = 0 ;
|
6406
|
-
const char *classname SWIGUNUSED = "Gosu::SampleInstance";
|
6407
|
-
Gosu::SampleInstance *result = 0 ;
|
6656
|
+
_wrap_Image_to_blob(int argc, VALUE *argv, VALUE self) {
|
6657
|
+
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
6658
|
+
void *argp1 = 0 ;
|
6659
|
+
int res1 = 0 ;
|
6660
|
+
std::string result;
|
6661
|
+
VALUE vresult = Qnil;
|
6408
6662
|
|
6409
|
-
if ((argc <
|
6410
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
6663
|
+
if ((argc < 0) || (argc > 0)) {
|
6664
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
6411
6665
|
}
|
6412
|
-
|
6413
|
-
if (!SWIG_IsOK(
|
6414
|
-
SWIG_exception_fail(SWIG_ArgError(
|
6415
|
-
}
|
6416
|
-
arg1 =
|
6417
|
-
|
6418
|
-
|
6419
|
-
|
6420
|
-
|
6421
|
-
|
6666
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
|
6667
|
+
if (!SWIG_IsOK(res1)) {
|
6668
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","toBlob", 1, self ));
|
6669
|
+
}
|
6670
|
+
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
6671
|
+
{
|
6672
|
+
try {
|
6673
|
+
result = Gosu_Image_toBlob((Gosu::Image const *)arg1);
|
6674
|
+
} catch(const std::runtime_error& e) {
|
6675
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
6676
|
+
}
|
6677
|
+
}
|
6678
|
+
vresult = SWIG_From_std_string(static_cast< std::string >(result));
|
6679
|
+
return vresult;
|
6680
|
+
fail:
|
6681
|
+
return Qnil;
|
6682
|
+
}
|
6683
|
+
|
6684
|
+
|
6685
|
+
SWIGINTERN VALUE
|
6686
|
+
_wrap_Image_columns(int argc, VALUE *argv, VALUE self) {
|
6687
|
+
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
6688
|
+
void *argp1 = 0 ;
|
6689
|
+
int res1 = 0 ;
|
6690
|
+
unsigned int result;
|
6691
|
+
VALUE vresult = Qnil;
|
6692
|
+
|
6693
|
+
if ((argc < 0) || (argc > 0)) {
|
6694
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
6695
|
+
}
|
6696
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
|
6697
|
+
if (!SWIG_IsOK(res1)) {
|
6698
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","columns", 1, self ));
|
6699
|
+
}
|
6700
|
+
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
6701
|
+
{
|
6702
|
+
try {
|
6703
|
+
result = (unsigned int)Gosu_Image_columns((Gosu::Image const *)arg1);
|
6704
|
+
} catch(const std::runtime_error& e) {
|
6705
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
6706
|
+
}
|
6707
|
+
}
|
6708
|
+
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
|
6709
|
+
return vresult;
|
6710
|
+
fail:
|
6711
|
+
return Qnil;
|
6712
|
+
}
|
6713
|
+
|
6714
|
+
|
6715
|
+
SWIGINTERN VALUE
|
6716
|
+
_wrap_Image_rows(int argc, VALUE *argv, VALUE self) {
|
6717
|
+
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
6718
|
+
void *argp1 = 0 ;
|
6719
|
+
int res1 = 0 ;
|
6720
|
+
unsigned int result;
|
6721
|
+
VALUE vresult = Qnil;
|
6722
|
+
|
6723
|
+
if ((argc < 0) || (argc > 0)) {
|
6724
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
6725
|
+
}
|
6726
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
|
6727
|
+
if (!SWIG_IsOK(res1)) {
|
6728
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","rows", 1, self ));
|
6729
|
+
}
|
6730
|
+
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
6731
|
+
{
|
6732
|
+
try {
|
6733
|
+
result = (unsigned int)Gosu_Image_rows((Gosu::Image const *)arg1);
|
6734
|
+
} catch(const std::runtime_error& e) {
|
6735
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
6736
|
+
}
|
6737
|
+
}
|
6738
|
+
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
|
6739
|
+
return vresult;
|
6740
|
+
fail:
|
6741
|
+
return Qnil;
|
6742
|
+
}
|
6743
|
+
|
6744
|
+
|
6745
|
+
swig_class SwigClassSampleInstance;
|
6746
|
+
|
6747
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
6748
|
+
SWIGINTERN VALUE
|
6749
|
+
_wrap_SampleInstance_allocate(VALUE self) {
|
6750
|
+
#else
|
6751
|
+
SWIGINTERN VALUE
|
6752
|
+
_wrap_SampleInstance_allocate(int argc, VALUE *argv, VALUE self) {
|
6753
|
+
#endif
|
6754
|
+
|
6755
|
+
|
6756
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__SampleInstance);
|
6757
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
6758
|
+
rb_obj_call_init(vresult, argc, argv);
|
6759
|
+
#endif
|
6760
|
+
return vresult;
|
6761
|
+
}
|
6762
|
+
|
6763
|
+
|
6764
|
+
SWIGINTERN VALUE
|
6765
|
+
_wrap_new_SampleInstance(int argc, VALUE *argv, VALUE self) {
|
6766
|
+
int arg1 ;
|
6767
|
+
int arg2 ;
|
6768
|
+
int val1 ;
|
6769
|
+
int ecode1 = 0 ;
|
6770
|
+
int val2 ;
|
6771
|
+
int ecode2 = 0 ;
|
6772
|
+
const char *classname SWIGUNUSED = "Gosu::SampleInstance";
|
6773
|
+
Gosu::SampleInstance *result = 0 ;
|
6774
|
+
|
6775
|
+
if ((argc < 2) || (argc > 2)) {
|
6776
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
6777
|
+
}
|
6778
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
6779
|
+
if (!SWIG_IsOK(ecode1)) {
|
6780
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Gosu::SampleInstance", 1, argv[0] ));
|
6781
|
+
}
|
6782
|
+
arg1 = static_cast< int >(val1);
|
6783
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
6784
|
+
if (!SWIG_IsOK(ecode2)) {
|
6785
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Gosu::SampleInstance", 2, argv[1] ));
|
6786
|
+
}
|
6787
|
+
arg2 = static_cast< int >(val2);
|
6422
6788
|
{
|
6423
6789
|
try {
|
6424
6790
|
result = (Gosu::SampleInstance *)new Gosu::SampleInstance(arg1,arg2);
|
@@ -7966,105 +8332,6 @@ fail:
|
|
7966
8332
|
}
|
7967
8333
|
|
7968
8334
|
|
7969
|
-
SWIGINTERN VALUE
|
7970
|
-
_wrap_Window_audio__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
7971
|
-
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
7972
|
-
void *argp1 = 0 ;
|
7973
|
-
int res1 = 0 ;
|
7974
|
-
Gosu::Audio *result = 0 ;
|
7975
|
-
VALUE vresult = Qnil;
|
7976
|
-
|
7977
|
-
if ((argc < 0) || (argc > 0)) {
|
7978
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
7979
|
-
}
|
7980
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
7981
|
-
if (!SWIG_IsOK(res1)) {
|
7982
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","audio", 1, self ));
|
7983
|
-
}
|
7984
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
7985
|
-
{
|
7986
|
-
try {
|
7987
|
-
result = (Gosu::Audio *) &((Gosu::Window const *)arg1)->audio();
|
7988
|
-
} catch(const std::runtime_error& e) {
|
7989
|
-
SWIG_exception(SWIG_RuntimeError, e.what());
|
7990
|
-
}
|
7991
|
-
}
|
7992
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Audio, 0 | 0 );
|
7993
|
-
return vresult;
|
7994
|
-
fail:
|
7995
|
-
return Qnil;
|
7996
|
-
}
|
7997
|
-
|
7998
|
-
|
7999
|
-
SWIGINTERN VALUE
|
8000
|
-
_wrap_Window_audio__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
8001
|
-
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
8002
|
-
void *argp1 = 0 ;
|
8003
|
-
int res1 = 0 ;
|
8004
|
-
Gosu::Audio *result = 0 ;
|
8005
|
-
VALUE vresult = Qnil;
|
8006
|
-
|
8007
|
-
if ((argc < 0) || (argc > 0)) {
|
8008
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
8009
|
-
}
|
8010
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
8011
|
-
if (!SWIG_IsOK(res1)) {
|
8012
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","audio", 1, self ));
|
8013
|
-
}
|
8014
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
8015
|
-
{
|
8016
|
-
try {
|
8017
|
-
result = (Gosu::Audio *) &(arg1)->audio();
|
8018
|
-
} catch(const std::runtime_error& e) {
|
8019
|
-
SWIG_exception(SWIG_RuntimeError, e.what());
|
8020
|
-
}
|
8021
|
-
}
|
8022
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Audio, 0 | 0 );
|
8023
|
-
return vresult;
|
8024
|
-
fail:
|
8025
|
-
return Qnil;
|
8026
|
-
}
|
8027
|
-
|
8028
|
-
|
8029
|
-
SWIGINTERN VALUE _wrap_Window_audio(int nargs, VALUE *args, VALUE self) {
|
8030
|
-
int argc;
|
8031
|
-
VALUE argv[2];
|
8032
|
-
int ii;
|
8033
|
-
|
8034
|
-
argc = nargs + 1;
|
8035
|
-
argv[0] = self;
|
8036
|
-
if (argc > 2) SWIG_fail;
|
8037
|
-
for (ii = 1; (ii < argc); ++ii) {
|
8038
|
-
argv[ii] = args[ii-1];
|
8039
|
-
}
|
8040
|
-
if (argc == 1) {
|
8041
|
-
int _v;
|
8042
|
-
void *vptr = 0;
|
8043
|
-
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0);
|
8044
|
-
_v = SWIG_CheckState(res);
|
8045
|
-
if (_v) {
|
8046
|
-
return _wrap_Window_audio__SWIG_1(nargs, args, self);
|
8047
|
-
}
|
8048
|
-
}
|
8049
|
-
if (argc == 1) {
|
8050
|
-
int _v;
|
8051
|
-
void *vptr = 0;
|
8052
|
-
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0);
|
8053
|
-
_v = SWIG_CheckState(res);
|
8054
|
-
if (_v) {
|
8055
|
-
return _wrap_Window_audio__SWIG_0(nargs, args, self);
|
8056
|
-
}
|
8057
|
-
}
|
8058
|
-
|
8059
|
-
fail:
|
8060
|
-
Ruby_Format_OverloadedError( argc, 2, "Window.audio",
|
8061
|
-
" Gosu::Audio & Window.audio()\n"
|
8062
|
-
" Gosu::Audio & Window.audio()\n");
|
8063
|
-
|
8064
|
-
return Qnil;
|
8065
|
-
}
|
8066
|
-
|
8067
|
-
|
8068
8335
|
SWIGINTERN VALUE
|
8069
8336
|
_wrap_Window_draw_line(int argc, VALUE *argv, VALUE self) {
|
8070
8337
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
@@ -9023,6 +9290,394 @@ fail:
|
|
9023
9290
|
}
|
9024
9291
|
|
9025
9292
|
|
9293
|
+
SWIGINTERN VALUE
|
9294
|
+
_wrap_Window_transform(int argc, VALUE *argv, VALUE self) {
|
9295
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9296
|
+
double arg2 ;
|
9297
|
+
double arg3 ;
|
9298
|
+
double arg4 ;
|
9299
|
+
double arg5 ;
|
9300
|
+
double arg6 ;
|
9301
|
+
double arg7 ;
|
9302
|
+
double arg8 ;
|
9303
|
+
double arg9 ;
|
9304
|
+
double arg10 ;
|
9305
|
+
double arg11 ;
|
9306
|
+
double arg12 ;
|
9307
|
+
double arg13 ;
|
9308
|
+
double arg14 ;
|
9309
|
+
double arg15 ;
|
9310
|
+
double arg16 ;
|
9311
|
+
double arg17 ;
|
9312
|
+
void *argp1 = 0 ;
|
9313
|
+
int res1 = 0 ;
|
9314
|
+
double val2 ;
|
9315
|
+
int ecode2 = 0 ;
|
9316
|
+
double val3 ;
|
9317
|
+
int ecode3 = 0 ;
|
9318
|
+
double val4 ;
|
9319
|
+
int ecode4 = 0 ;
|
9320
|
+
double val5 ;
|
9321
|
+
int ecode5 = 0 ;
|
9322
|
+
double val6 ;
|
9323
|
+
int ecode6 = 0 ;
|
9324
|
+
double val7 ;
|
9325
|
+
int ecode7 = 0 ;
|
9326
|
+
double val8 ;
|
9327
|
+
int ecode8 = 0 ;
|
9328
|
+
double val9 ;
|
9329
|
+
int ecode9 = 0 ;
|
9330
|
+
double val10 ;
|
9331
|
+
int ecode10 = 0 ;
|
9332
|
+
double val11 ;
|
9333
|
+
int ecode11 = 0 ;
|
9334
|
+
double val12 ;
|
9335
|
+
int ecode12 = 0 ;
|
9336
|
+
double val13 ;
|
9337
|
+
int ecode13 = 0 ;
|
9338
|
+
double val14 ;
|
9339
|
+
int ecode14 = 0 ;
|
9340
|
+
double val15 ;
|
9341
|
+
int ecode15 = 0 ;
|
9342
|
+
double val16 ;
|
9343
|
+
int ecode16 = 0 ;
|
9344
|
+
double val17 ;
|
9345
|
+
int ecode17 = 0 ;
|
9346
|
+
|
9347
|
+
if ((argc < 16) || (argc > 16)) {
|
9348
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 16)",argc); SWIG_fail;
|
9349
|
+
}
|
9350
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9351
|
+
if (!SWIG_IsOK(res1)) {
|
9352
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","transform", 1, self ));
|
9353
|
+
}
|
9354
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9355
|
+
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9356
|
+
if (!SWIG_IsOK(ecode2)) {
|
9357
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","transform", 2, argv[0] ));
|
9358
|
+
}
|
9359
|
+
arg2 = static_cast< double >(val2);
|
9360
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
9361
|
+
if (!SWIG_IsOK(ecode3)) {
|
9362
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","transform", 3, argv[1] ));
|
9363
|
+
}
|
9364
|
+
arg3 = static_cast< double >(val3);
|
9365
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
9366
|
+
if (!SWIG_IsOK(ecode4)) {
|
9367
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","transform", 4, argv[2] ));
|
9368
|
+
}
|
9369
|
+
arg4 = static_cast< double >(val4);
|
9370
|
+
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
9371
|
+
if (!SWIG_IsOK(ecode5)) {
|
9372
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","transform", 5, argv[3] ));
|
9373
|
+
}
|
9374
|
+
arg5 = static_cast< double >(val5);
|
9375
|
+
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
9376
|
+
if (!SWIG_IsOK(ecode6)) {
|
9377
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","transform", 6, argv[4] ));
|
9378
|
+
}
|
9379
|
+
arg6 = static_cast< double >(val6);
|
9380
|
+
ecode7 = SWIG_AsVal_double(argv[5], &val7);
|
9381
|
+
if (!SWIG_IsOK(ecode7)) {
|
9382
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","transform", 7, argv[5] ));
|
9383
|
+
}
|
9384
|
+
arg7 = static_cast< double >(val7);
|
9385
|
+
ecode8 = SWIG_AsVal_double(argv[6], &val8);
|
9386
|
+
if (!SWIG_IsOK(ecode8)) {
|
9387
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","transform", 8, argv[6] ));
|
9388
|
+
}
|
9389
|
+
arg8 = static_cast< double >(val8);
|
9390
|
+
ecode9 = SWIG_AsVal_double(argv[7], &val9);
|
9391
|
+
if (!SWIG_IsOK(ecode9)) {
|
9392
|
+
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","transform", 9, argv[7] ));
|
9393
|
+
}
|
9394
|
+
arg9 = static_cast< double >(val9);
|
9395
|
+
ecode10 = SWIG_AsVal_double(argv[8], &val10);
|
9396
|
+
if (!SWIG_IsOK(ecode10)) {
|
9397
|
+
SWIG_exception_fail(SWIG_ArgError(ecode10), Ruby_Format_TypeError( "", "double","transform", 10, argv[8] ));
|
9398
|
+
}
|
9399
|
+
arg10 = static_cast< double >(val10);
|
9400
|
+
ecode11 = SWIG_AsVal_double(argv[9], &val11);
|
9401
|
+
if (!SWIG_IsOK(ecode11)) {
|
9402
|
+
SWIG_exception_fail(SWIG_ArgError(ecode11), Ruby_Format_TypeError( "", "double","transform", 11, argv[9] ));
|
9403
|
+
}
|
9404
|
+
arg11 = static_cast< double >(val11);
|
9405
|
+
ecode12 = SWIG_AsVal_double(argv[10], &val12);
|
9406
|
+
if (!SWIG_IsOK(ecode12)) {
|
9407
|
+
SWIG_exception_fail(SWIG_ArgError(ecode12), Ruby_Format_TypeError( "", "double","transform", 12, argv[10] ));
|
9408
|
+
}
|
9409
|
+
arg12 = static_cast< double >(val12);
|
9410
|
+
ecode13 = SWIG_AsVal_double(argv[11], &val13);
|
9411
|
+
if (!SWIG_IsOK(ecode13)) {
|
9412
|
+
SWIG_exception_fail(SWIG_ArgError(ecode13), Ruby_Format_TypeError( "", "double","transform", 13, argv[11] ));
|
9413
|
+
}
|
9414
|
+
arg13 = static_cast< double >(val13);
|
9415
|
+
ecode14 = SWIG_AsVal_double(argv[12], &val14);
|
9416
|
+
if (!SWIG_IsOK(ecode14)) {
|
9417
|
+
SWIG_exception_fail(SWIG_ArgError(ecode14), Ruby_Format_TypeError( "", "double","transform", 14, argv[12] ));
|
9418
|
+
}
|
9419
|
+
arg14 = static_cast< double >(val14);
|
9420
|
+
ecode15 = SWIG_AsVal_double(argv[13], &val15);
|
9421
|
+
if (!SWIG_IsOK(ecode15)) {
|
9422
|
+
SWIG_exception_fail(SWIG_ArgError(ecode15), Ruby_Format_TypeError( "", "double","transform", 15, argv[13] ));
|
9423
|
+
}
|
9424
|
+
arg15 = static_cast< double >(val15);
|
9425
|
+
ecode16 = SWIG_AsVal_double(argv[14], &val16);
|
9426
|
+
if (!SWIG_IsOK(ecode16)) {
|
9427
|
+
SWIG_exception_fail(SWIG_ArgError(ecode16), Ruby_Format_TypeError( "", "double","transform", 16, argv[14] ));
|
9428
|
+
}
|
9429
|
+
arg16 = static_cast< double >(val16);
|
9430
|
+
ecode17 = SWIG_AsVal_double(argv[15], &val17);
|
9431
|
+
if (!SWIG_IsOK(ecode17)) {
|
9432
|
+
SWIG_exception_fail(SWIG_ArgError(ecode17), Ruby_Format_TypeError( "", "double","transform", 17, argv[15] ));
|
9433
|
+
}
|
9434
|
+
arg17 = static_cast< double >(val17);
|
9435
|
+
{
|
9436
|
+
try {
|
9437
|
+
Gosu_Window_transform(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
|
9438
|
+
} catch(const std::runtime_error& e) {
|
9439
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9440
|
+
}
|
9441
|
+
}
|
9442
|
+
return Qnil;
|
9443
|
+
fail:
|
9444
|
+
return Qnil;
|
9445
|
+
}
|
9446
|
+
|
9447
|
+
|
9448
|
+
SWIGINTERN VALUE
|
9449
|
+
_wrap_Window_rotate(int argc, VALUE *argv, VALUE self) {
|
9450
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9451
|
+
double arg2 ;
|
9452
|
+
double arg3 = (double) 0 ;
|
9453
|
+
double arg4 = (double) 0 ;
|
9454
|
+
void *argp1 = 0 ;
|
9455
|
+
int res1 = 0 ;
|
9456
|
+
double val2 ;
|
9457
|
+
int ecode2 = 0 ;
|
9458
|
+
double val3 ;
|
9459
|
+
int ecode3 = 0 ;
|
9460
|
+
double val4 ;
|
9461
|
+
int ecode4 = 0 ;
|
9462
|
+
|
9463
|
+
if ((argc < 1) || (argc > 3)) {
|
9464
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9465
|
+
}
|
9466
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9467
|
+
if (!SWIG_IsOK(res1)) {
|
9468
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","rotate", 1, self ));
|
9469
|
+
}
|
9470
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9471
|
+
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9472
|
+
if (!SWIG_IsOK(ecode2)) {
|
9473
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","rotate", 2, argv[0] ));
|
9474
|
+
}
|
9475
|
+
arg2 = static_cast< double >(val2);
|
9476
|
+
if (argc > 1) {
|
9477
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
9478
|
+
if (!SWIG_IsOK(ecode3)) {
|
9479
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","rotate", 3, argv[1] ));
|
9480
|
+
}
|
9481
|
+
arg3 = static_cast< double >(val3);
|
9482
|
+
}
|
9483
|
+
if (argc > 2) {
|
9484
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
9485
|
+
if (!SWIG_IsOK(ecode4)) {
|
9486
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","rotate", 4, argv[2] ));
|
9487
|
+
}
|
9488
|
+
arg4 = static_cast< double >(val4);
|
9489
|
+
}
|
9490
|
+
{
|
9491
|
+
try {
|
9492
|
+
Gosu_Window_rotate(arg1,arg2,arg3,arg4);
|
9493
|
+
} catch(const std::runtime_error& e) {
|
9494
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9495
|
+
}
|
9496
|
+
}
|
9497
|
+
return Qnil;
|
9498
|
+
fail:
|
9499
|
+
return Qnil;
|
9500
|
+
}
|
9501
|
+
|
9502
|
+
|
9503
|
+
SWIGINTERN VALUE
|
9504
|
+
_wrap_Window_scale__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
9505
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9506
|
+
double arg2 ;
|
9507
|
+
void *argp1 = 0 ;
|
9508
|
+
int res1 = 0 ;
|
9509
|
+
double val2 ;
|
9510
|
+
int ecode2 = 0 ;
|
9511
|
+
|
9512
|
+
if ((argc < 1) || (argc > 1)) {
|
9513
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9514
|
+
}
|
9515
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9516
|
+
if (!SWIG_IsOK(res1)) {
|
9517
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","scale", 1, self ));
|
9518
|
+
}
|
9519
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9520
|
+
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9521
|
+
if (!SWIG_IsOK(ecode2)) {
|
9522
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","scale", 2, argv[0] ));
|
9523
|
+
}
|
9524
|
+
arg2 = static_cast< double >(val2);
|
9525
|
+
{
|
9526
|
+
try {
|
9527
|
+
Gosu_Window_scale__SWIG_0(arg1,arg2);
|
9528
|
+
} catch(const std::runtime_error& e) {
|
9529
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9530
|
+
}
|
9531
|
+
}
|
9532
|
+
return Qnil;
|
9533
|
+
fail:
|
9534
|
+
return Qnil;
|
9535
|
+
}
|
9536
|
+
|
9537
|
+
|
9538
|
+
SWIGINTERN VALUE
|
9539
|
+
_wrap_Window_scale__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
9540
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9541
|
+
double arg2 ;
|
9542
|
+
double arg3 ;
|
9543
|
+
void *argp1 = 0 ;
|
9544
|
+
int res1 = 0 ;
|
9545
|
+
double val2 ;
|
9546
|
+
int ecode2 = 0 ;
|
9547
|
+
double val3 ;
|
9548
|
+
int ecode3 = 0 ;
|
9549
|
+
|
9550
|
+
if ((argc < 2) || (argc > 2)) {
|
9551
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
9552
|
+
}
|
9553
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9554
|
+
if (!SWIG_IsOK(res1)) {
|
9555
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","scale", 1, self ));
|
9556
|
+
}
|
9557
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9558
|
+
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9559
|
+
if (!SWIG_IsOK(ecode2)) {
|
9560
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","scale", 2, argv[0] ));
|
9561
|
+
}
|
9562
|
+
arg2 = static_cast< double >(val2);
|
9563
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
9564
|
+
if (!SWIG_IsOK(ecode3)) {
|
9565
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","scale", 3, argv[1] ));
|
9566
|
+
}
|
9567
|
+
arg3 = static_cast< double >(val3);
|
9568
|
+
{
|
9569
|
+
try {
|
9570
|
+
Gosu_Window_scale__SWIG_1(arg1,arg2,arg3);
|
9571
|
+
} catch(const std::runtime_error& e) {
|
9572
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9573
|
+
}
|
9574
|
+
}
|
9575
|
+
return Qnil;
|
9576
|
+
fail:
|
9577
|
+
return Qnil;
|
9578
|
+
}
|
9579
|
+
|
9580
|
+
|
9581
|
+
SWIGINTERN VALUE _wrap_Window_scale(int nargs, VALUE *args, VALUE self) {
|
9582
|
+
int argc;
|
9583
|
+
VALUE argv[4];
|
9584
|
+
int ii;
|
9585
|
+
|
9586
|
+
argc = nargs + 1;
|
9587
|
+
argv[0] = self;
|
9588
|
+
if (argc > 4) SWIG_fail;
|
9589
|
+
for (ii = 1; (ii < argc); ++ii) {
|
9590
|
+
argv[ii] = args[ii-1];
|
9591
|
+
}
|
9592
|
+
if (argc == 2) {
|
9593
|
+
int _v;
|
9594
|
+
void *vptr = 0;
|
9595
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0);
|
9596
|
+
_v = SWIG_CheckState(res);
|
9597
|
+
if (_v) {
|
9598
|
+
{
|
9599
|
+
int res = SWIG_AsVal_double(argv[1], NULL);
|
9600
|
+
_v = SWIG_CheckState(res);
|
9601
|
+
}
|
9602
|
+
if (_v) {
|
9603
|
+
return _wrap_Window_scale__SWIG_0(nargs, args, self);
|
9604
|
+
}
|
9605
|
+
}
|
9606
|
+
}
|
9607
|
+
if (argc == 3) {
|
9608
|
+
int _v;
|
9609
|
+
void *vptr = 0;
|
9610
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0);
|
9611
|
+
_v = SWIG_CheckState(res);
|
9612
|
+
if (_v) {
|
9613
|
+
{
|
9614
|
+
int res = SWIG_AsVal_double(argv[1], NULL);
|
9615
|
+
_v = SWIG_CheckState(res);
|
9616
|
+
}
|
9617
|
+
if (_v) {
|
9618
|
+
{
|
9619
|
+
int res = SWIG_AsVal_double(argv[2], NULL);
|
9620
|
+
_v = SWIG_CheckState(res);
|
9621
|
+
}
|
9622
|
+
if (_v) {
|
9623
|
+
return _wrap_Window_scale__SWIG_1(nargs, args, self);
|
9624
|
+
}
|
9625
|
+
}
|
9626
|
+
}
|
9627
|
+
}
|
9628
|
+
|
9629
|
+
fail:
|
9630
|
+
Ruby_Format_OverloadedError( argc, 4, "scale",
|
9631
|
+
" void scale(double factor)\n"
|
9632
|
+
" void scale(double factorX, double factorY)\n");
|
9633
|
+
|
9634
|
+
return Qnil;
|
9635
|
+
}
|
9636
|
+
|
9637
|
+
|
9638
|
+
SWIGINTERN VALUE
|
9639
|
+
_wrap_Window_translate(int argc, VALUE *argv, VALUE self) {
|
9640
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9641
|
+
double arg2 ;
|
9642
|
+
double arg3 ;
|
9643
|
+
void *argp1 = 0 ;
|
9644
|
+
int res1 = 0 ;
|
9645
|
+
double val2 ;
|
9646
|
+
int ecode2 = 0 ;
|
9647
|
+
double val3 ;
|
9648
|
+
int ecode3 = 0 ;
|
9649
|
+
|
9650
|
+
if ((argc < 2) || (argc > 2)) {
|
9651
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
9652
|
+
}
|
9653
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9654
|
+
if (!SWIG_IsOK(res1)) {
|
9655
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","translate", 1, self ));
|
9656
|
+
}
|
9657
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9658
|
+
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9659
|
+
if (!SWIG_IsOK(ecode2)) {
|
9660
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","translate", 2, argv[0] ));
|
9661
|
+
}
|
9662
|
+
arg2 = static_cast< double >(val2);
|
9663
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
9664
|
+
if (!SWIG_IsOK(ecode3)) {
|
9665
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","translate", 3, argv[1] ));
|
9666
|
+
}
|
9667
|
+
arg3 = static_cast< double >(val3);
|
9668
|
+
{
|
9669
|
+
try {
|
9670
|
+
Gosu_Window_translate(arg1,arg2,arg3);
|
9671
|
+
} catch(const std::runtime_error& e) {
|
9672
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9673
|
+
}
|
9674
|
+
}
|
9675
|
+
return Qnil;
|
9676
|
+
fail:
|
9677
|
+
return Qnil;
|
9678
|
+
}
|
9679
|
+
|
9680
|
+
|
9026
9681
|
SWIGINTERN VALUE
|
9027
9682
|
_wrap_disown_Window(int argc, VALUE *argv, VALUE self) {
|
9028
9683
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
@@ -9052,7 +9707,6 @@ fail:
|
|
9052
9707
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
9053
9708
|
|
9054
9709
|
static swig_type_info _swigt__p_Channel = {"_p_Channel", "Channel *", 0, 0, (void*)0, 0};
|
9055
|
-
static swig_type_info _swigt__p_Gosu__Audio = {"_p_Gosu__Audio", "Gosu::Audio *", 0, 0, (void*)0, 0};
|
9056
9710
|
static swig_type_info _swigt__p_Gosu__Button = {"_p_Gosu__Button", "Gosu::Button *", 0, 0, (void*)0, 0};
|
9057
9711
|
static swig_type_info _swigt__p_Gosu__Color = {"_p_Gosu__Color", "Gosu::Color *", 0, 0, (void*)0, 0};
|
9058
9712
|
static swig_type_info _swigt__p_Gosu__Font = {"_p_Gosu__Font", "Gosu::Font *", 0, 0, (void*)0, 0};
|
@@ -9063,13 +9717,13 @@ static swig_type_info _swigt__p_Gosu__SampleInstance = {"_p_Gosu__SampleInstance
|
|
9063
9717
|
static swig_type_info _swigt__p_Gosu__Song = {"_p_Gosu__Song", "Gosu::Song *", 0, 0, (void*)0, 0};
|
9064
9718
|
static swig_type_info _swigt__p_Gosu__TextInput = {"_p_Gosu__TextInput", "Gosu::TextInput *", 0, 0, (void*)0, 0};
|
9065
9719
|
static swig_type_info _swigt__p_Gosu__Window = {"_p_Gosu__Window", "Gosu::Window *", 0, 0, (void*)0, 0};
|
9720
|
+
static swig_type_info _swigt__p_boost__arrayT_double_16_t = {"_p_boost__arrayT_double_16_t", "boost::array< double,16 > *|Gosu::Transform *", 0, 0, (void*)0, 0};
|
9066
9721
|
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
9067
9722
|
static swig_type_info _swigt__p_double = {"_p_double", "Gosu::ZPos *|double *", 0, 0, (void*)0, 0};
|
9068
9723
|
static swig_type_info _swigt__p_std__wstring = {"_p_std__wstring", "std::wstring *", 0, 0, (void*)0, 0};
|
9069
9724
|
|
9070
9725
|
static swig_type_info *swig_type_initial[] = {
|
9071
9726
|
&_swigt__p_Channel,
|
9072
|
-
&_swigt__p_Gosu__Audio,
|
9073
9727
|
&_swigt__p_Gosu__Button,
|
9074
9728
|
&_swigt__p_Gosu__Color,
|
9075
9729
|
&_swigt__p_Gosu__Font,
|
@@ -9080,13 +9734,13 @@ static swig_type_info *swig_type_initial[] = {
|
|
9080
9734
|
&_swigt__p_Gosu__Song,
|
9081
9735
|
&_swigt__p_Gosu__TextInput,
|
9082
9736
|
&_swigt__p_Gosu__Window,
|
9737
|
+
&_swigt__p_boost__arrayT_double_16_t,
|
9083
9738
|
&_swigt__p_char,
|
9084
9739
|
&_swigt__p_double,
|
9085
9740
|
&_swigt__p_std__wstring,
|
9086
9741
|
};
|
9087
9742
|
|
9088
9743
|
static swig_cast_info _swigc__p_Channel[] = { {&_swigt__p_Channel, 0, 0, 0},{0, 0, 0, 0}};
|
9089
|
-
static swig_cast_info _swigc__p_Gosu__Audio[] = { {&_swigt__p_Gosu__Audio, 0, 0, 0},{0, 0, 0, 0}};
|
9090
9744
|
static swig_cast_info _swigc__p_Gosu__Button[] = { {&_swigt__p_Gosu__Button, 0, 0, 0},{0, 0, 0, 0}};
|
9091
9745
|
static swig_cast_info _swigc__p_Gosu__Color[] = { {&_swigt__p_Gosu__Color, 0, 0, 0},{0, 0, 0, 0}};
|
9092
9746
|
static swig_cast_info _swigc__p_Gosu__Font[] = { {&_swigt__p_Gosu__Font, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -9097,13 +9751,13 @@ static swig_cast_info _swigc__p_Gosu__SampleInstance[] = { {&_swigt__p_Gosu__Sa
|
|
9097
9751
|
static swig_cast_info _swigc__p_Gosu__Song[] = { {&_swigt__p_Gosu__Song, 0, 0, 0},{0, 0, 0, 0}};
|
9098
9752
|
static swig_cast_info _swigc__p_Gosu__TextInput[] = { {&_swigt__p_Gosu__TextInput, 0, 0, 0},{0, 0, 0, 0}};
|
9099
9753
|
static swig_cast_info _swigc__p_Gosu__Window[] = { {&_swigt__p_Gosu__Window, 0, 0, 0},{0, 0, 0, 0}};
|
9754
|
+
static swig_cast_info _swigc__p_boost__arrayT_double_16_t[] = { {&_swigt__p_boost__arrayT_double_16_t, 0, 0, 0},{0, 0, 0, 0}};
|
9100
9755
|
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
9101
9756
|
static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
|
9102
9757
|
static swig_cast_info _swigc__p_std__wstring[] = { {&_swigt__p_std__wstring, 0, 0, 0},{0, 0, 0, 0}};
|
9103
9758
|
|
9104
9759
|
static swig_cast_info *swig_cast_initial[] = {
|
9105
9760
|
_swigc__p_Channel,
|
9106
|
-
_swigc__p_Gosu__Audio,
|
9107
9761
|
_swigc__p_Gosu__Button,
|
9108
9762
|
_swigc__p_Gosu__Color,
|
9109
9763
|
_swigc__p_Gosu__Font,
|
@@ -9114,6 +9768,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
9114
9768
|
_swigc__p_Gosu__Song,
|
9115
9769
|
_swigc__p_Gosu__TextInput,
|
9116
9770
|
_swigc__p_Gosu__Window,
|
9771
|
+
_swigc__p_boost__arrayT_double_16_t,
|
9117
9772
|
_swigc__p_char,
|
9118
9773
|
_swigc__p_double,
|
9119
9774
|
_swigc__p_std__wstring,
|
@@ -9379,8 +10034,8 @@ SWIGEXPORT void Init_gosu(void) {
|
|
9379
10034
|
SWIG_RubyInitializeTrackings();
|
9380
10035
|
rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0)));
|
9381
10036
|
rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(7)));
|
9382
|
-
rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(
|
9383
|
-
rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.7.
|
10037
|
+
rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(21)));
|
10038
|
+
rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.7.21"));
|
9384
10039
|
rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
|
9385
10040
|
rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
|
9386
10041
|
rb_define_module_function(mGosu, "degrees_to_radians", VALUEFUNC(_wrap_degrees_to_radians), -1);
|
@@ -9394,8 +10049,12 @@ SWIGEXPORT void Init_gosu(void) {
|
|
9394
10049
|
rb_define_module_function(mGosu, "default_font_name", VALUEFUNC(_wrap_default_font_name), -1);
|
9395
10050
|
rb_define_module_function(mGosu, "screen_width", VALUEFUNC(_wrap_screen_width), -1);
|
9396
10051
|
rb_define_module_function(mGosu, "screen_height", VALUEFUNC(_wrap_screen_height), -1);
|
10052
|
+
rb_define_module_function(mGosu, "rotate", VALUEFUNC(_wrap_rotate), -1);
|
10053
|
+
rb_define_module_function(mGosu, "translate", VALUEFUNC(_wrap_translate), -1);
|
10054
|
+
rb_define_module_function(mGosu, "scale", VALUEFUNC(_wrap_scale), -1);
|
9397
10055
|
rb_define_module_function(mGosu, "enable_undocumented_retrofication", VALUEFUNC(_wrap_enable_undocumented_retrofication), -1);
|
9398
10056
|
rb_define_module_function(mGosu, "__max_texture_size", VALUEFUNC(_wrap___max_texture_size), -1);
|
10057
|
+
rb_define_module_function(mGosu, "register_entity", VALUEFUNC(_wrap_register_entity), -1);
|
9399
10058
|
|
9400
10059
|
SwigClassColor.klass = rb_define_class_under(mGosu, "Color", rb_cObject);
|
9401
10060
|
SWIG_TypeClientData(SWIGTYPE_p_Gosu__Color, (void *) &SwigClassColor);
|
@@ -9486,6 +10145,9 @@ SWIGEXPORT void Init_gosu(void) {
|
|
9486
10145
|
rb_define_singleton_method(SwigClassImage.klass, "from_text4", VALUEFUNC(_wrap_Image_from_text4), -1);
|
9487
10146
|
rb_define_singleton_method(SwigClassImage.klass, "from_text7", VALUEFUNC(_wrap_Image_from_text7), -1);
|
9488
10147
|
rb_define_singleton_method(SwigClassImage.klass, "load_tiles", VALUEFUNC(_wrap_Image_load_tiles), -1);
|
10148
|
+
rb_define_method(SwigClassImage.klass, "to_blob", VALUEFUNC(_wrap_Image_to_blob), -1);
|
10149
|
+
rb_define_method(SwigClassImage.klass, "columns", VALUEFUNC(_wrap_Image_columns), -1);
|
10150
|
+
rb_define_method(SwigClassImage.klass, "rows", VALUEFUNC(_wrap_Image_rows), -1);
|
9489
10151
|
SwigClassImage.mark = 0;
|
9490
10152
|
SwigClassImage.destroy = (void (*)(void *)) free_Gosu_Image;
|
9491
10153
|
SwigClassImage.trackObjects = 1;
|
@@ -9691,7 +10353,6 @@ SWIGEXPORT void Init_gosu(void) {
|
|
9691
10353
|
rb_define_method(SwigClassWindow.klass, "needs_redraw?", VALUEFUNC(_wrap_Window_needs_redrawq___), -1);
|
9692
10354
|
rb_define_method(SwigClassWindow.klass, "button_down", VALUEFUNC(_wrap_Window_button_down), -1);
|
9693
10355
|
rb_define_method(SwigClassWindow.klass, "button_up", VALUEFUNC(_wrap_Window_button_up), -1);
|
9694
|
-
rb_define_method(SwigClassWindow.klass, "audio", VALUEFUNC(_wrap_Window_audio), -1);
|
9695
10356
|
rb_define_method(SwigClassWindow.klass, "draw_line", VALUEFUNC(_wrap_Window_draw_line), -1);
|
9696
10357
|
rb_define_method(SwigClassWindow.klass, "draw_triangle", VALUEFUNC(_wrap_Window_draw_triangle), -1);
|
9697
10358
|
rb_define_method(SwigClassWindow.klass, "draw_quad", VALUEFUNC(_wrap_Window_draw_quad), -1);
|
@@ -9711,6 +10372,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
9711
10372
|
rb_define_method(SwigClassWindow.klass, "gl", VALUEFUNC(_wrap_Window_gl), -1);
|
9712
10373
|
rb_define_method(SwigClassWindow.klass, "clip_to", VALUEFUNC(_wrap_Window_clip_to), -1);
|
9713
10374
|
rb_define_method(SwigClassWindow.klass, "record", VALUEFUNC(_wrap_Window_record), -1);
|
10375
|
+
rb_define_method(SwigClassWindow.klass, "transform", VALUEFUNC(_wrap_Window_transform), -1);
|
10376
|
+
rb_define_method(SwigClassWindow.klass, "rotate", VALUEFUNC(_wrap_Window_rotate), -1);
|
10377
|
+
rb_define_method(SwigClassWindow.klass, "scale", VALUEFUNC(_wrap_Window_scale), -1);
|
10378
|
+
rb_define_method(SwigClassWindow.klass, "translate", VALUEFUNC(_wrap_Window_translate), -1);
|
9714
10379
|
SwigClassWindow.mark = (void (*)(void *)) markWindow;
|
9715
10380
|
SwigClassWindow.destroy = (void (*)(void *)) free_Gosu_Window;
|
9716
10381
|
SwigClassWindow.trackObjects = 1;
|