gosu 0.8.7.2 → 0.9.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/COPYING +29 -0
- data/Gosu/Audio.hpp +1 -0
- data/Gosu/Font.hpp +8 -4
- data/Gosu/Graphics.hpp +28 -18
- data/Gosu/GraphicsBase.hpp +17 -13
- data/Gosu/Image.hpp +54 -45
- data/Gosu/Input.hpp +5 -5
- data/Gosu/Version.hpp +3 -3
- data/Gosu/Window.hpp +1 -8
- data/README.txt +25 -0
- data/ext/gosu/gosu_wrap.cxx +1495 -1275
- data/ext/gosu/gosu_wrap.h +2 -2
- data/lib/gosu/patches.rb +71 -35
- data/lib/gosu/preview.rb +9 -142
- data/lib/gosu/swig_patches.rb +20 -10
- data/rdoc/gosu.rb +1185 -0
- data/src/Bitmap/BitmapUtils.cpp +9 -9
- data/src/Graphics/Common.hpp +3 -1
- data/src/Graphics/Graphics.cpp +100 -38
- data/src/Graphics/Image.cpp +57 -15
- data/src/Graphics/LargeImageData.cpp +9 -10
- data/src/Graphics/LargeImageData.hpp +1 -1
- data/src/Graphics/TexChunk.cpp +5 -6
- data/src/Graphics/TexChunk.hpp +1 -4
- data/src/Graphics/Texture.cpp +10 -3
- data/src/Graphics/Texture.hpp +1 -2
- data/src/Iconv.hpp +2 -2
- data/src/Input/Input.cpp +25 -9
- data/src/Input/InputTouch.mm +5 -3
- data/src/Text/Font.cpp +13 -8
- data/src/Window.cpp +66 -37
- data/src/WindowTouch.mm +3 -3
- metadata +79 -92
- data/examples/ChipmunkIntegration.rb +0 -275
- data/examples/CptnRuby.rb +0 -223
- data/examples/GosuZen.rb +0 -68
- data/examples/MoreChipmunkAndRMagick.rb +0 -155
- data/examples/OpenGLIntegration.rb +0 -226
- data/examples/RMagickIntegration.rb +0 -417
- data/examples/TextInput.rb +0 -154
- data/examples/Tutorial.rb +0 -131
- data/examples/media/Beep.wav +0 -0
- data/examples/media/CptnRuby Gem.png +0 -0
- data/examples/media/CptnRuby Map.txt +0 -25
- 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 +0 -10
- 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/README.txt
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
Moin and welcome to Gosu!
|
2
|
+
|
3
|
+
Gosu's main website is http://www.libgosu.org/, which always has the latest
|
4
|
+
links to all relevant information.
|
5
|
+
|
6
|
+
The actual source code, wiki, issue tracker etc. are all hosted on GitHub:
|
7
|
+
|
8
|
+
http://github.com/jlnr/gosu/
|
9
|
+
|
10
|
+
The best entry point into Gosu's documentation is the wiki home page:
|
11
|
+
|
12
|
+
http://github.com/jlnr/gosu/wiki
|
13
|
+
|
14
|
+
Try doing the tutorial there if you don't know how to start out. Or look at
|
15
|
+
one of the games in the Gosu Users board.
|
16
|
+
|
17
|
+
Remember that Gosu is licensed under the MIT license and feel invited to fork,
|
18
|
+
port and transmogrify all parts of it. The only license that may affect you by
|
19
|
+
indirection is libogg's (BSD-style). If you release a Gosu game in any common
|
20
|
+
binary form, you will need to mention use of libogg and libvorbis somewhere.
|
21
|
+
|
22
|
+
Complaints, questions, feedback?
|
23
|
+
* Visit the boards, http://www.libgosu.org/
|
24
|
+
* try your luck in the chat, irc://irc.freenode.org/gosu
|
25
|
+
* or e-mail me. Have fun, write games! julian@raschke.de
|
data/ext/gosu/gosu_wrap.cxx
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version 3.0.
|
3
|
+
* Version 3.0.5
|
4
4
|
*
|
5
5
|
* This file is not intended to be easily readable and contains a number of
|
6
6
|
* coding conventions designed to improve portability and efficiency. Do not make
|
@@ -2113,24 +2113,22 @@ namespace Swig {
|
|
2113
2113
|
|
2114
2114
|
/* -------- TYPES TABLE (BEGIN) -------- */
|
2115
2115
|
|
2116
|
-
#define
|
2117
|
-
#define
|
2118
|
-
#define
|
2119
|
-
#define
|
2120
|
-
#define
|
2121
|
-
#define
|
2122
|
-
#define
|
2123
|
-
#define
|
2124
|
-
#define
|
2125
|
-
#define
|
2126
|
-
#define
|
2127
|
-
#define
|
2128
|
-
#define
|
2129
|
-
#define
|
2130
|
-
|
2131
|
-
|
2132
|
-
static swig_type_info *swig_types[17];
|
2133
|
-
static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
|
2116
|
+
#define SWIGTYPE_p_Gosu__Button swig_types[0]
|
2117
|
+
#define SWIGTYPE_p_Gosu__Color swig_types[1]
|
2118
|
+
#define SWIGTYPE_p_Gosu__Font swig_types[2]
|
2119
|
+
#define SWIGTYPE_p_Gosu__GLTexInfo swig_types[3]
|
2120
|
+
#define SWIGTYPE_p_Gosu__Image swig_types[4]
|
2121
|
+
#define SWIGTYPE_p_Gosu__Sample swig_types[5]
|
2122
|
+
#define SWIGTYPE_p_Gosu__SampleInstance swig_types[6]
|
2123
|
+
#define SWIGTYPE_p_Gosu__Song swig_types[7]
|
2124
|
+
#define SWIGTYPE_p_Gosu__TextInput swig_types[8]
|
2125
|
+
#define SWIGTYPE_p_Gosu__Window swig_types[9]
|
2126
|
+
#define SWIGTYPE_p_char swig_types[10]
|
2127
|
+
#define SWIGTYPE_p_double swig_types[11]
|
2128
|
+
#define SWIGTYPE_p_std__tr1__arrayT_double_16_t swig_types[12]
|
2129
|
+
#define SWIGTYPE_p_std__wstring swig_types[13]
|
2130
|
+
static swig_type_info *swig_types[15];
|
2131
|
+
static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
|
2134
2132
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
2135
2133
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
2136
2134
|
|
@@ -2145,7 +2143,7 @@ static VALUE mGosu;
|
|
2145
2143
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
2146
2144
|
|
2147
2145
|
|
2148
|
-
#define SWIGVERSION
|
2146
|
+
#define SWIGVERSION 0x030005
|
2149
2147
|
#define SWIG_VERSION SWIGVERSION
|
2150
2148
|
|
2151
2149
|
|
@@ -2174,10 +2172,6 @@ static VALUE mGosu;
|
|
2174
2172
|
#undef int64_t
|
2175
2173
|
#undef uint64_t
|
2176
2174
|
|
2177
|
-
//#ifndef WIN32
|
2178
|
-
//#include <Gosu/Async.hpp>
|
2179
|
-
//#endif
|
2180
|
-
|
2181
2175
|
#include <Gosu/Gosu.hpp>
|
2182
2176
|
#ifdef GOSU_IS_WIN
|
2183
2177
|
#include <FreeImage.h>
|
@@ -2194,7 +2188,7 @@ namespace Gosu {
|
|
2194
2188
|
#include <ctime>
|
2195
2189
|
#include <sstream>
|
2196
2190
|
|
2197
|
-
// Preprocessor check for 1.9 (thanks banister)
|
2191
|
+
// Preprocessor check for 1.9 or higher (thanks banister)
|
2198
2192
|
#if defined(ROBJECT_EMBED_LEN_MAX)
|
2199
2193
|
#define FIX_ENCODING(var) \
|
2200
2194
|
rb_funcall(var, rb_intern("force_encoding"), 1, rb_str_new2("UTF-8"));
|
@@ -2230,8 +2224,7 @@ namespace Gosu
|
|
2230
2224
|
#ifdef GOSU_IS_WIN
|
2231
2225
|
void requireFreeImageFor(const char* filename)
|
2232
2226
|
{
|
2233
|
-
//
|
2234
|
-
// TODO: Remove duplication, this is also in AudioAudiere.cpp
|
2227
|
+
// Catch lazy loading errors on Windows; from MSDN.
|
2235
2228
|
#define FACILITY_VISUALCPP ((LONG)0x6d)
|
2236
2229
|
#define VcppException(sev,err) ((sev) | (FACILITY_VISUALCPP<<16) | err)
|
2237
2230
|
#define BAD_MOD VcppException(ERROR_SEVERITY_ERROR, ERROR_MOD_NOT_FOUND)
|
@@ -2307,12 +2300,117 @@ namespace Gosu
|
|
2307
2300
|
throw std::logic_error("Blob length mismatch!");
|
2308
2301
|
}
|
2309
2302
|
|
2310
|
-
const char* cstrFromSymbol(VALUE symbol)
|
2311
|
-
|
2312
|
-
|
2303
|
+
const char* cstrFromSymbol(VALUE symbol)
|
2304
|
+
{
|
2305
|
+
Check_Type(symbol, T_SYMBOL);
|
2313
2306
|
return rb_id2name(SYM2ID(symbol));
|
2314
2307
|
}
|
2315
2308
|
}
|
2309
|
+
|
2310
|
+
// Global input functions
|
2311
|
+
|
2312
|
+
namespace Gosu {
|
2313
|
+
Gosu::Button charToButtonId(wchar_t ch) {
|
2314
|
+
return Gosu::Input::charToId(ch);
|
2315
|
+
}
|
2316
|
+
wchar_t buttonIdToChar(Gosu::Button btn) {
|
2317
|
+
return Gosu::Input::idToChar(btn);
|
2318
|
+
}
|
2319
|
+
bool isButtonDown(Gosu::Button btn) {
|
2320
|
+
return Gosu::Input::down(btn);
|
2321
|
+
}
|
2322
|
+
}
|
2323
|
+
|
2324
|
+
// Global graphics functions
|
2325
|
+
namespace Gosu {
|
2326
|
+
void drawLine(double x1, double y1, Gosu::Color c1,
|
2327
|
+
double x2, double y2, Gosu::Color c2,
|
2328
|
+
Gosu::ZPos z = 0, Gosu::AlphaMode mode = Gosu::amDefault) {
|
2329
|
+
Gosu::Graphics::drawLine(x1, y1, c1, x2, y2, c2,
|
2330
|
+
z, mode);
|
2331
|
+
}
|
2332
|
+
void drawTriangle(double x1, double y1, Gosu::Color c1,
|
2333
|
+
double x2, double y2, Gosu::Color c2,
|
2334
|
+
double x3, double y3, Gosu::Color c3,
|
2335
|
+
Gosu::ZPos z = 0, Gosu::AlphaMode mode = Gosu::amDefault) {
|
2336
|
+
Gosu::Graphics::drawTriangle(x1, y1, c1, x2, y2, c2, x3, y3, c3,
|
2337
|
+
z, mode);
|
2338
|
+
}
|
2339
|
+
void drawQuad(double x1, double y1, Gosu::Color c1,
|
2340
|
+
double x2, double y2, Gosu::Color c2,
|
2341
|
+
double x3, double y3, Gosu::Color c3,
|
2342
|
+
double x4, double y4, Gosu::Color c4,
|
2343
|
+
Gosu::ZPos z = 0, Gosu::AlphaMode mode = Gosu::amDefault) {
|
2344
|
+
Gosu::Graphics::drawQuad(x1, y1, c1, x2, y2, c2,
|
2345
|
+
x3, y3, c3, x4, y4, c4,
|
2346
|
+
z, mode);
|
2347
|
+
}
|
2348
|
+
void drawRect(double x, double y, double width, double height, Gosu::Color c,
|
2349
|
+
Gosu::ZPos z = 0, Gosu::AlphaMode mode = Gosu::amDefault) {
|
2350
|
+
Gosu::Graphics::drawQuad(x, y, c, x + width, y, c,
|
2351
|
+
x, y + height, c, x + width, y + height, c,
|
2352
|
+
z, mode);
|
2353
|
+
}
|
2354
|
+
void flush() {
|
2355
|
+
return Gosu::Graphics::flush();
|
2356
|
+
}
|
2357
|
+
void unsafe_gl() {
|
2358
|
+
Gosu::Graphics::beginGL();
|
2359
|
+
rb_yield(Qnil);
|
2360
|
+
Gosu::Graphics::endGL();
|
2361
|
+
}
|
2362
|
+
void unsafe_gl(Gosu::ZPos z) {
|
2363
|
+
Gosu::Graphics::scheduleGL(std::tr1::bind(callRubyBlock, rb_block_proc()), z);
|
2364
|
+
}
|
2365
|
+
void clipTo(double x, double y, double width, double height) {
|
2366
|
+
Gosu::Graphics::beginClipping(x, y, width, height);
|
2367
|
+
rb_yield(Qnil);
|
2368
|
+
Gosu::Graphics::endClipping();
|
2369
|
+
}
|
2370
|
+
Gosu::Image* record(int width, int height) {
|
2371
|
+
Gosu::Graphics::beginRecording();
|
2372
|
+
rb_yield(Qnil);
|
2373
|
+
return new Gosu::Image(Gosu::Graphics::endRecording(width, height));
|
2374
|
+
}
|
2375
|
+
|
2376
|
+
// This method cannot be called "transform" because then it would be an ambiguous overload of Gosu::Transform Gosu::transform(...).
|
2377
|
+
// So it has to be renamed via %rename below... :( - same for the other transformations.
|
2378
|
+
|
2379
|
+
void transformForRuby(double m0, double m1, double m2, double m3, double m4, double m5, double m6, double m7,
|
2380
|
+
double m8, double m9, double m10, double m11, double m12, double m13, double m14, double m15) {
|
2381
|
+
Gosu::Transform transform = {
|
2382
|
+
m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15
|
2383
|
+
};
|
2384
|
+
Gosu::Graphics::pushTransform(transform);
|
2385
|
+
rb_yield(Qnil);
|
2386
|
+
Gosu::Graphics::popTransform();
|
2387
|
+
}
|
2388
|
+
void rotateForRuby(double angle, double aroundX = 0, double aroundY = 0) {
|
2389
|
+
Gosu::Graphics::pushTransform(Gosu::rotate(angle, aroundX, aroundY));
|
2390
|
+
rb_yield(Qnil);
|
2391
|
+
Gosu::Graphics::popTransform();
|
2392
|
+
}
|
2393
|
+
void scaleForRuby(double factor) {
|
2394
|
+
Gosu::Graphics::pushTransform(Gosu::scale(factor));
|
2395
|
+
rb_yield(Qnil);
|
2396
|
+
Gosu::Graphics::popTransform();
|
2397
|
+
}
|
2398
|
+
void scaleForRuby(double factorX, double factorY) {
|
2399
|
+
Gosu::Graphics::pushTransform(Gosu::scale(factorX, factorY));
|
2400
|
+
rb_yield(Qnil);
|
2401
|
+
Gosu::Graphics::popTransform();
|
2402
|
+
}
|
2403
|
+
void scaleForRuby(double factorX, double factorY, double aroundX, double aroundY) {
|
2404
|
+
Gosu::Graphics::pushTransform(Gosu::scale(factorX, factorY, aroundX, aroundY));
|
2405
|
+
rb_yield(Qnil);
|
2406
|
+
Gosu::Graphics::popTransform();
|
2407
|
+
}
|
2408
|
+
void translateForRuby(double x, double y) {
|
2409
|
+
Gosu::Graphics::pushTransform(Gosu::translate(x, y));
|
2410
|
+
rb_yield(Qnil);
|
2411
|
+
Gosu::Graphics::popTransform();
|
2412
|
+
}
|
2413
|
+
}
|
2316
2414
|
|
2317
2415
|
|
2318
2416
|
#include <limits.h>
|
@@ -2386,7 +2484,7 @@ SWIG_ruby_failed(void)
|
|
2386
2484
|
}
|
2387
2485
|
|
2388
2486
|
|
2389
|
-
/*@SWIG:/usr/local/Cellar/swig/3.0.
|
2487
|
+
/*@SWIG:/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2390
2488
|
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
|
2391
2489
|
{
|
2392
2490
|
VALUE obj = args[0];
|
@@ -2428,7 +2526,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2428
2526
|
#include <string>
|
2429
2527
|
|
2430
2528
|
|
2431
|
-
/*@SWIG:/usr/local/Cellar/swig/3.0.
|
2529
|
+
/*@SWIG:/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2432
2530
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
2433
2531
|
{
|
2434
2532
|
VALUE obj = args[0];
|
@@ -2498,13 +2596,10 @@ SWIGINTERN Gosu::Color Gosu_Color_argb__SWIG_2(std::tr1::uint32_t argb){
|
|
2498
2596
|
SWIGINTERN Gosu::Color Gosu_Color_dup(Gosu::Color const *self){
|
2499
2597
|
return *self;
|
2500
2598
|
}
|
2501
|
-
SWIGINTERN std::string
|
2502
|
-
|
2503
|
-
|
2504
|
-
|
2505
|
-
<< "/" << static_cast<int>(self->green())
|
2506
|
-
<< "/" << static_cast<int>(self->blue()) << ")";
|
2507
|
-
return stream.str();
|
2599
|
+
SWIGINTERN std::string Gosu_Color_inspect(Gosu::Color const *self){
|
2600
|
+
char buffer[31];
|
2601
|
+
std::snprintf(buffer, sizeof buffer, "#<Gosu::Color:ARGB=0x%08x>", self->argb());
|
2602
|
+
return buffer;
|
2508
2603
|
}
|
2509
2604
|
|
2510
2605
|
SWIGINTERNINLINE VALUE
|
@@ -2528,7 +2623,7 @@ SWIG_From_bool (bool value)
|
|
2528
2623
|
}
|
2529
2624
|
|
2530
2625
|
|
2531
|
-
/*@SWIG:/usr/local/Cellar/swig/3.0.
|
2626
|
+
/*@SWIG:/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2532
2627
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
2533
2628
|
{
|
2534
2629
|
VALUE obj = args[0];
|
@@ -2572,16 +2667,45 @@ SWIG_AsVal_int (VALUE obj, int *val)
|
|
2572
2667
|
return res;
|
2573
2668
|
}
|
2574
2669
|
|
2575
|
-
SWIGINTERN Gosu::Font *
|
2576
|
-
return new Gosu::Font(
|
2670
|
+
SWIGINTERN Gosu::Font *new_Gosu_Font__SWIG_0(Gosu::Window &window,std::wstring const &fontName,unsigned int height){
|
2671
|
+
return new Gosu::Font(height, fontName);
|
2672
|
+
}
|
2673
|
+
SWIGINTERN Gosu::Font *new_Gosu_Font__SWIG_1(unsigned int height,VALUE options=0){
|
2674
|
+
std::wstring fontName = Gosu::defaultFontName();
|
2675
|
+
|
2676
|
+
if (options) {
|
2677
|
+
Check_Type(options, T_HASH);
|
2678
|
+
|
2679
|
+
VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL);
|
2680
|
+
int keysSize = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL));
|
2681
|
+
|
2682
|
+
for (int i = 0; i < keysSize; ++i) {
|
2683
|
+
VALUE key = rb_ary_entry(keys, i);
|
2684
|
+
const char* keyString = Gosu::cstrFromSymbol(key);
|
2685
|
+
|
2686
|
+
VALUE value = rb_hash_aref(options, key);
|
2687
|
+
if (!strcmp(keyString, "name")) {
|
2688
|
+
VALUE rbString = rb_obj_as_string(value);
|
2689
|
+
char* utf8String = StringValueCStr(rbString);
|
2690
|
+
fontName = Gosu::utf8ToWstring(utf8String);
|
2691
|
+
}
|
2692
|
+
// TODO - would be nice & trivial to support :bold => false and :italic => true here
|
2693
|
+
else {
|
2694
|
+
static bool issuedWarning = false;
|
2695
|
+
if (!issuedWarning) {
|
2696
|
+
issuedWarning = true;
|
2697
|
+
rb_warn("Unknown keyword argument: :%s", keyString);
|
2698
|
+
}
|
2699
|
+
}
|
2700
|
+
}
|
2701
|
+
}
|
2702
|
+
|
2703
|
+
return new Gosu::Font(height, fontName);
|
2577
2704
|
}
|
2578
2705
|
SWIGINTERN void Gosu_Font_set_image(Gosu::Font *self,wchar_t wc,VALUE source){
|
2579
|
-
// TODO: Super super super ugly hack that relies on the layout of std::tr1::shared_ptr.
|
2580
|
-
// To be removed once Image creation does not require a Graphics anymore.
|
2581
|
-
Gosu::Graphics& graphics = ***reinterpret_cast<Gosu::Graphics***>(self);
|
2582
2706
|
Gosu::Bitmap bitmap;
|
2583
2707
|
Gosu::loadBitmap(bitmap, source);
|
2584
|
-
self->setImage(wc, Gosu::Image(
|
2708
|
+
self->setImage(wc, Gosu::Image(bitmap, Gosu::ifSmooth));
|
2585
2709
|
}
|
2586
2710
|
|
2587
2711
|
#include <float.h>
|
@@ -2633,6 +2757,52 @@ SWIG_From_float (float value)
|
|
2633
2757
|
return SWIG_From_double (value);
|
2634
2758
|
}
|
2635
2759
|
|
2760
|
+
SWIGINTERN Gosu::Image *new_Gosu_Image__SWIG_0(VALUE source,VALUE options=0){
|
2761
|
+
Gosu::Bitmap bmp;
|
2762
|
+
Gosu::loadBitmap(bmp, source);
|
2763
|
+
|
2764
|
+
unsigned srcX = 0, srcY = 0, srcWidth = bmp.width(), srcHeight = bmp.height();
|
2765
|
+
unsigned flags = 0;
|
2766
|
+
|
2767
|
+
if (options) {
|
2768
|
+
Check_Type(options, T_HASH);
|
2769
|
+
|
2770
|
+
VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL);
|
2771
|
+
int keysSize = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL));
|
2772
|
+
|
2773
|
+
for (int i = 0; i < keysSize; ++i) {
|
2774
|
+
VALUE key = rb_ary_entry(keys, i);
|
2775
|
+
const char* keyString = Gosu::cstrFromSymbol(key);
|
2776
|
+
|
2777
|
+
VALUE value = rb_hash_aref(options, key);
|
2778
|
+
if (!strcmp(keyString, "tileable")) {
|
2779
|
+
if (RTEST(value))
|
2780
|
+
flags |= Gosu::ifTileable;
|
2781
|
+
}
|
2782
|
+
else if (!strcmp(keyString, "rect")) {
|
2783
|
+
Check_Type(value, T_ARRAY);
|
2784
|
+
|
2785
|
+
int rectSize = NUM2INT(rb_funcall(value, rb_intern("size"), 0, NULL));
|
2786
|
+
if (rectSize != 4)
|
2787
|
+
rb_raise(rb_eArgError, "Argument passed to :rect must be a four-element Array (x, y, width, height)");
|
2788
|
+
|
2789
|
+
srcX = NUM2INT(rb_ary_entry(value, 0));
|
2790
|
+
srcY = NUM2INT(rb_ary_entry(value, 1));
|
2791
|
+
srcWidth = NUM2INT(rb_ary_entry(value, 2));
|
2792
|
+
srcHeight = NUM2INT(rb_ary_entry(value, 3));
|
2793
|
+
}
|
2794
|
+
else {
|
2795
|
+
static bool issuedWarning = false;
|
2796
|
+
if (!issuedWarning) {
|
2797
|
+
issuedWarning = true;
|
2798
|
+
rb_warn("Unknown keyword argument: :%s", keyString);
|
2799
|
+
}
|
2800
|
+
}
|
2801
|
+
}
|
2802
|
+
}
|
2803
|
+
|
2804
|
+
return new Gosu::Image(bmp, srcX, srcY, srcWidth, srcHeight, flags);
|
2805
|
+
}
|
2636
2806
|
|
2637
2807
|
SWIGINTERN int
|
2638
2808
|
SWIG_AsVal_bool (VALUE obj, bool *val)
|
@@ -2653,16 +2823,16 @@ SWIG_AsVal_bool (VALUE obj, bool *val)
|
|
2653
2823
|
return SWIG_TypeError;
|
2654
2824
|
}
|
2655
2825
|
|
2656
|
-
SWIGINTERN Gosu::Image *
|
2826
|
+
SWIGINTERN Gosu::Image *new_Gosu_Image__SWIG_1(Gosu::Window &window,VALUE source,bool tileable=false){
|
2657
2827
|
Gosu::Bitmap bmp;
|
2658
2828
|
Gosu::loadBitmap(bmp, source);
|
2659
|
-
return new Gosu::Image(
|
2829
|
+
return new Gosu::Image(bmp, tileable ? Gosu::ifTileable : Gosu::ifSmooth);
|
2660
2830
|
}
|
2661
|
-
SWIGINTERN Gosu::Image *
|
2831
|
+
SWIGINTERN Gosu::Image *new_Gosu_Image__SWIG_2(Gosu::Window &window,VALUE source,bool tileable,unsigned int srcX,unsigned int srcY,unsigned int srcWidth,unsigned int srcHeight){
|
2662
2832
|
Gosu::Bitmap bmp;
|
2663
2833
|
Gosu::loadBitmap(bmp, source);
|
2664
|
-
return new Gosu::Image(
|
2665
|
-
|
2834
|
+
return new Gosu::Image(bmp, srcX, srcY, srcWidth, srcHeight,
|
2835
|
+
tileable ? Gosu::ifTileable : Gosu::ifSmooth);
|
2666
2836
|
}
|
2667
2837
|
SWIGINTERN void Gosu_Image_drawAsQuad(Gosu::Image *self,double x1,double y1,Gosu::Color c1,double x2,double y2,Gosu::Color c2,double x3,double y3,Gosu::Color c3,double x4,double y4,Gosu::Color c4,Gosu::ZPos z,Gosu::AlphaMode mode=Gosu::amDefault){
|
2668
2838
|
self->getData().draw(x1, y1, c1, x2, y2, c2, x3, y3, c3, x4, y4, c4, z, mode);
|
@@ -2678,22 +2848,99 @@ SWIGINTERN Gosu::Image *Gosu_Image_subimage(Gosu::Image *self,int x,int y,int w,
|
|
2678
2848
|
std::auto_ptr<Gosu::ImageData> imageData = self->getData().subimage(x, y, w, h);
|
2679
2849
|
return imageData.get() ? new Gosu::Image(imageData) : 0;
|
2680
2850
|
}
|
2681
|
-
SWIGINTERN Gosu::Image *
|
2682
|
-
|
2683
|
-
|
2851
|
+
SWIGINTERN Gosu::Image *Gosu_Image_fromText(std::wstring const &text,unsigned int fontHeight,VALUE options=0){
|
2852
|
+
std::wstring font = Gosu::defaultFontName();
|
2853
|
+
unsigned width = 0xfefefefe;
|
2854
|
+
unsigned spacing = 0;
|
2855
|
+
Gosu::TextAlign align = align;
|
2856
|
+
|
2857
|
+
if (options) {
|
2858
|
+
Check_Type(options, T_HASH);
|
2859
|
+
|
2860
|
+
VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL);
|
2861
|
+
int keysSize = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL));
|
2862
|
+
|
2863
|
+
for (int i = 0; i < keysSize; ++i) {
|
2864
|
+
VALUE key = rb_ary_entry(keys, i);
|
2865
|
+
const char* keyString = Gosu::cstrFromSymbol(key);
|
2866
|
+
|
2867
|
+
VALUE value = rb_hash_aref(options, key);
|
2868
|
+
if (!strcmp(keyString, "font")) {
|
2869
|
+
const char* fontUTF8 = StringValuePtr(value);
|
2870
|
+
font = Gosu::utf8ToWstring(fontUTF8);
|
2871
|
+
}
|
2872
|
+
else if (!strcmp(keyString, "align")) {
|
2873
|
+
const char* cstr = Gosu::cstrFromSymbol(value);
|
2874
|
+
|
2875
|
+
if (!strcmp(cstr, "left"))
|
2876
|
+
align = Gosu::taLeft;
|
2877
|
+
else if (!strcmp(cstr, "center"))
|
2878
|
+
align = Gosu::taCenter;
|
2879
|
+
else if (!strcmp(cstr, "right"))
|
2880
|
+
align = Gosu::taRight;
|
2881
|
+
else if (!strcmp(cstr, "justify"))
|
2882
|
+
align = Gosu::taJustify;
|
2883
|
+
else
|
2884
|
+
rb_raise(rb_eArgError, "Argument passed to :align must be a valid text alignment (:left, :center, :right, :justify)");
|
2885
|
+
}
|
2886
|
+
else if (!strcmp(keyString, "width")) {
|
2887
|
+
width = NUM2INT(value);
|
2888
|
+
}
|
2889
|
+
else if (!strcmp(keyString, "spacing")) {
|
2890
|
+
spacing = NUM2INT(value);
|
2891
|
+
}
|
2892
|
+
else {
|
2893
|
+
static bool issuedWarning = false;
|
2894
|
+
if (!issuedWarning) {
|
2895
|
+
issuedWarning = true;
|
2896
|
+
rb_warn("Unknown keyword argument: :%s", keyString);
|
2897
|
+
}
|
2898
|
+
}
|
2899
|
+
}
|
2900
|
+
}
|
2901
|
+
|
2902
|
+
if (width == 0xfefefefe)
|
2903
|
+
return new Gosu::Image(Gosu::createText(text, font, fontHeight));
|
2904
|
+
else
|
2905
|
+
return new Gosu::Image(Gosu::createText(text, font, fontHeight, spacing, width, align));
|
2684
2906
|
}
|
2685
|
-
SWIGINTERN
|
2686
|
-
Gosu::Bitmap bmp
|
2687
|
-
|
2907
|
+
SWIGINTERN std::vector< Gosu::Image > Gosu_Image_loadTiles__SWIG_0(VALUE source,int tileWidth,int tileHeight,VALUE options=0){
|
2908
|
+
Gosu::Bitmap bmp;
|
2909
|
+
Gosu::loadBitmap(bmp, source);
|
2910
|
+
|
2911
|
+
unsigned flags = 0;
|
2912
|
+
|
2913
|
+
if (options) {
|
2914
|
+
Check_Type(options, T_HASH);
|
2915
|
+
|
2916
|
+
VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL);
|
2917
|
+
int keysSize = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL));
|
2918
|
+
|
2919
|
+
for (int i = 0; i < keysSize; ++i) {
|
2920
|
+
VALUE key = rb_ary_entry(keys, i);
|
2921
|
+
const char* keyString = Gosu::cstrFromSymbol(key);
|
2922
|
+
|
2923
|
+
VALUE value = rb_hash_aref(options, key);
|
2924
|
+
if (!strcmp(keyString, "tileable")) {
|
2925
|
+
if (RTEST(value))
|
2926
|
+
flags |= Gosu::ifTileable;
|
2927
|
+
}
|
2928
|
+
else {
|
2929
|
+
static bool issuedWarning = false;
|
2930
|
+
if (!issuedWarning) {
|
2931
|
+
issuedWarning = true;
|
2932
|
+
rb_warn("Unknown keyword argument: :%s", keyString);
|
2933
|
+
}
|
2934
|
+
}
|
2935
|
+
}
|
2936
|
+
}
|
2937
|
+
return Gosu::loadTiles(bmp, tileWidth, tileHeight, flags);
|
2688
2938
|
}
|
2689
|
-
SWIGINTERN std::vector< Gosu::Image
|
2690
|
-
std::vector<Gosu::Image*> vec;
|
2691
|
-
// TODO: const correctness (<- did I mean exception safety?)
|
2939
|
+
SWIGINTERN std::vector< Gosu::Image > Gosu_Image_loadTiles__SWIG_1(Gosu::Window &window,VALUE source,int tileWidth,int tileHeight,bool tileable){
|
2692
2940
|
Gosu::Bitmap bmp;
|
2693
2941
|
Gosu::loadBitmap(bmp, source);
|
2694
|
-
|
2695
|
-
|
2696
|
-
return vec;
|
2942
|
+
|
2943
|
+
return Gosu::loadTiles(bmp, tileWidth, tileHeight, tileable ? Gosu::ifTileable : Gosu::ifSmooth);
|
2697
2944
|
}
|
2698
2945
|
SWIGINTERN std::string Gosu_Image_toBlob(Gosu::Image const *self){
|
2699
2946
|
// TODO: Optimize with direct copy into a Ruby string
|
@@ -2723,31 +2970,6 @@ SWIGINTERN unsigned int Gosu_TextInput_selection_start(Gosu::TextInput const *se
|
|
2723
2970
|
return RUBY_18_19(Gosu::wstringToUTF8(self->text().substr(0, self->selectionStart())).size(),
|
2724
2971
|
self->selectionStart());
|
2725
2972
|
}
|
2726
|
-
SWIGINTERN void Gosu_Window_drawLine(Gosu::Window *self,double x1,double y1,Gosu::Color c1,double x2,double y2,Gosu::Color c2,Gosu::ZPos z=0,Gosu::AlphaMode mode=Gosu::amDefault){
|
2727
|
-
self->graphics().drawLine(x1, y1, c1, x2, y2, c2,
|
2728
|
-
z, mode);
|
2729
|
-
}
|
2730
|
-
SWIGINTERN void Gosu_Window_drawTriangle(Gosu::Window *self,double x1,double y1,Gosu::Color c1,double x2,double y2,Gosu::Color c2,double x3,double y3,Gosu::Color c3,Gosu::ZPos z=0,Gosu::AlphaMode mode=Gosu::amDefault){
|
2731
|
-
self->graphics().drawTriangle(x1, y1, c1, x2, y2, c2, x3, y3, c3,
|
2732
|
-
z, mode);
|
2733
|
-
}
|
2734
|
-
SWIGINTERN void Gosu_Window_drawQuad(Gosu::Window *self,double x1,double y1,Gosu::Color c1,double x2,double y2,Gosu::Color c2,double x3,double y3,Gosu::Color c3,double x4,double y4,Gosu::Color c4,Gosu::ZPos z=0,Gosu::AlphaMode mode=Gosu::amDefault){
|
2735
|
-
self->graphics().drawQuad(x1, y1, c1, x2, y2, c2,
|
2736
|
-
x3, y3, c3, x4, y4, c4,
|
2737
|
-
z, mode);
|
2738
|
-
}
|
2739
|
-
SWIGINTERN void Gosu_Window_flush(Gosu::Window *self){
|
2740
|
-
return self->graphics().flush();
|
2741
|
-
}
|
2742
|
-
SWIGINTERN bool Gosu_Window_isButtonDown(Gosu::Window const *self,Gosu::Button btn){
|
2743
|
-
return self->input().down(btn);
|
2744
|
-
}
|
2745
|
-
SWIGINTERN Gosu::Button Gosu_Window_charToButtonId(wchar_t ch){
|
2746
|
-
return Gosu::Input::charToId(ch);
|
2747
|
-
}
|
2748
|
-
SWIGINTERN wchar_t Gosu_Window_buttonIdToChar(Gosu::Button btn){
|
2749
|
-
return Gosu::Input::idToChar(btn);
|
2750
|
-
}
|
2751
2973
|
SWIGINTERN Gosu::TextInput *Gosu_Window_textInput(Gosu::Window const *self){
|
2752
2974
|
return self->input().textInput();
|
2753
2975
|
}
|
@@ -2778,57 +3000,6 @@ SWIGINTERN int Gosu_Window_height(Gosu::Window const *self){
|
|
2778
3000
|
SWIGINTERN bool Gosu_Window_fullscreen(Gosu::Window const *self){
|
2779
3001
|
return self->graphics().fullscreen();
|
2780
3002
|
}
|
2781
|
-
SWIGINTERN void Gosu_Window_unsafe_gl__SWIG_0(Gosu::Window *self){
|
2782
|
-
self->graphics().beginGL();
|
2783
|
-
rb_yield(Qnil);
|
2784
|
-
self->graphics().endGL();
|
2785
|
-
}
|
2786
|
-
SWIGINTERN void Gosu_Window_unsafe_gl__SWIG_1(Gosu::Window *self,Gosu::ZPos z){
|
2787
|
-
self->graphics().scheduleGL(std::tr1::bind(callRubyBlock, rb_block_proc()), z);
|
2788
|
-
}
|
2789
|
-
SWIGINTERN void Gosu_Window_clipTo(Gosu::Window *self,double x,double y,double width,double height){
|
2790
|
-
self->graphics().beginClipping(x, y, width, height);
|
2791
|
-
rb_yield(Qnil);
|
2792
|
-
self->graphics().endClipping();
|
2793
|
-
}
|
2794
|
-
SWIGINTERN Gosu::Image *Gosu_Window_record(Gosu::Window *self,int width,int height){
|
2795
|
-
self->graphics().beginRecording();
|
2796
|
-
rb_yield(Qnil);
|
2797
|
-
return new Gosu::Image(self->graphics().endRecording(width, height));
|
2798
|
-
}
|
2799
|
-
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){
|
2800
|
-
Gosu::Transform transform = {
|
2801
|
-
m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15
|
2802
|
-
};
|
2803
|
-
self->graphics().pushTransform(transform);
|
2804
|
-
rb_yield(Qnil);
|
2805
|
-
self->graphics().popTransform();
|
2806
|
-
}
|
2807
|
-
SWIGINTERN void Gosu_Window_rotate(Gosu::Window *self,double angle,double aroundX=0,double aroundY=0){
|
2808
|
-
self->graphics().pushTransform(Gosu::rotate(angle, aroundX, aroundY));
|
2809
|
-
rb_yield(Qnil);
|
2810
|
-
self->graphics().popTransform();
|
2811
|
-
}
|
2812
|
-
SWIGINTERN void Gosu_Window_scale__SWIG_0(Gosu::Window *self,double factor){
|
2813
|
-
self->graphics().pushTransform(Gosu::scale(factor));
|
2814
|
-
rb_yield(Qnil);
|
2815
|
-
self->graphics().popTransform();
|
2816
|
-
}
|
2817
|
-
SWIGINTERN void Gosu_Window_scale__SWIG_1(Gosu::Window *self,double factorX,double factorY){
|
2818
|
-
self->graphics().pushTransform(Gosu::scale(factorX, factorY));
|
2819
|
-
rb_yield(Qnil);
|
2820
|
-
self->graphics().popTransform();
|
2821
|
-
}
|
2822
|
-
SWIGINTERN void Gosu_Window_scale__SWIG_2(Gosu::Window *self,double factorX,double factorY,double aroundX,double aroundY){
|
2823
|
-
self->graphics().pushTransform(Gosu::scale(factorX, factorY, aroundX, aroundY));
|
2824
|
-
rb_yield(Qnil);
|
2825
|
-
self->graphics().popTransform();
|
2826
|
-
}
|
2827
|
-
SWIGINTERN void Gosu_Window_translate(Gosu::Window *self,double x,double y){
|
2828
|
-
self->graphics().pushTransform(Gosu::translate(x, y));
|
2829
|
-
rb_yield(Qnil);
|
2830
|
-
self->graphics().popTransform();
|
2831
|
-
}
|
2832
3003
|
|
2833
3004
|
static void markWindow(void* window) {
|
2834
3005
|
#ifndef __MACRUBY__
|
@@ -4681,8 +4852,17 @@ fail:
|
|
4681
4852
|
}
|
4682
4853
|
|
4683
4854
|
|
4855
|
+
|
4856
|
+
/*
|
4857
|
+
Document-method: Gosu::Color.inspect
|
4858
|
+
|
4859
|
+
call-seq:
|
4860
|
+
inspect -> std::string
|
4861
|
+
|
4862
|
+
Inspect class and its contents.
|
4863
|
+
*/
|
4684
4864
|
SWIGINTERN VALUE
|
4685
|
-
|
4865
|
+
_wrap_Color_inspect(int argc, VALUE *argv, VALUE self) {
|
4686
4866
|
Gosu::Color *arg1 = (Gosu::Color *) 0 ;
|
4687
4867
|
void *argp1 = 0 ;
|
4688
4868
|
int res1 = 0 ;
|
@@ -4694,12 +4874,12 @@ _wrap_Color_to_s(int argc, VALUE *argv, VALUE self) {
|
|
4694
4874
|
}
|
4695
4875
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 );
|
4696
4876
|
if (!SWIG_IsOK(res1)) {
|
4697
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","
|
4877
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","inspect", 1, self ));
|
4698
4878
|
}
|
4699
4879
|
arg1 = reinterpret_cast< Gosu::Color * >(argp1);
|
4700
4880
|
{
|
4701
4881
|
try {
|
4702
|
-
result =
|
4882
|
+
result = Gosu_Color_inspect((Gosu::Color const *)arg1);
|
4703
4883
|
} catch (const std::exception& e) {
|
4704
4884
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
4705
4885
|
}
|
@@ -4988,9 +5168,7 @@ _wrap_Font_draw(int argc, VALUE *argv, VALUE self) {
|
|
4988
5168
|
{
|
4989
5169
|
const char* cstr = Gosu::cstrFromSymbol(argv[7]);
|
4990
5170
|
|
4991
|
-
if (!cstr)
|
4992
|
-
SWIG_exception_fail(SWIG_ValueError, "alpha mode must be a symbol");
|
4993
|
-
else if (!strcmp(cstr, "default"))
|
5171
|
+
if (!strcmp(cstr, "default"))
|
4994
5172
|
arg9 = Gosu::amDefault;
|
4995
5173
|
else if (!strcmp(cstr, "add"))
|
4996
5174
|
arg9 = Gosu::amAdditive;
|
@@ -5119,9 +5297,7 @@ _wrap_Font_draw_rel(int argc, VALUE *argv, VALUE self) {
|
|
5119
5297
|
{
|
5120
5298
|
const char* cstr = Gosu::cstrFromSymbol(argv[9]);
|
5121
5299
|
|
5122
|
-
if (!cstr)
|
5123
|
-
SWIG_exception_fail(SWIG_ValueError, "alpha mode must be a symbol");
|
5124
|
-
else if (!strcmp(cstr, "default"))
|
5300
|
+
if (!strcmp(cstr, "default"))
|
5125
5301
|
arg11 = Gosu::amDefault;
|
5126
5302
|
else if (!strcmp(cstr, "add"))
|
5127
5303
|
arg11 = Gosu::amAdditive;
|
@@ -5242,9 +5418,7 @@ _wrap_Font_draw_rot(int argc, VALUE *argv, VALUE self) {
|
|
5242
5418
|
{
|
5243
5419
|
const char* cstr = Gosu::cstrFromSymbol(argv[8]);
|
5244
5420
|
|
5245
|
-
if (!cstr)
|
5246
|
-
SWIG_exception_fail(SWIG_ValueError, "alpha mode must be a symbol");
|
5247
|
-
else if (!strcmp(cstr, "default"))
|
5421
|
+
if (!strcmp(cstr, "default"))
|
5248
5422
|
arg10 = Gosu::amDefault;
|
5249
5423
|
else if (!strcmp(cstr, "add"))
|
5250
5424
|
arg10 = Gosu::amAdditive;
|
@@ -5269,25 +5443,8 @@ fail:
|
|
5269
5443
|
}
|
5270
5444
|
|
5271
5445
|
|
5272
|
-
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
5273
|
-
SWIGINTERN VALUE
|
5274
|
-
_wrap_Font_allocate(VALUE self) {
|
5275
|
-
#else
|
5276
|
-
SWIGINTERN VALUE
|
5277
|
-
_wrap_Font_allocate(int argc, VALUE *argv, VALUE self) {
|
5278
|
-
#endif
|
5279
|
-
|
5280
|
-
|
5281
|
-
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Font);
|
5282
|
-
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
5283
|
-
rb_obj_call_init(vresult, argc, argv);
|
5284
|
-
#endif
|
5285
|
-
return vresult;
|
5286
|
-
}
|
5287
|
-
|
5288
|
-
|
5289
5446
|
SWIGINTERN VALUE
|
5290
|
-
|
5447
|
+
_wrap_new_Font__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
5291
5448
|
Gosu::Window *arg1 = 0 ;
|
5292
5449
|
std::wstring *arg2 = 0 ;
|
5293
5450
|
unsigned int arg3 ;
|
@@ -5322,7 +5479,59 @@ _wrap_new_Font(int argc, VALUE *argv, VALUE self) {
|
|
5322
5479
|
arg3 = static_cast< unsigned int >(val3);
|
5323
5480
|
{
|
5324
5481
|
try {
|
5325
|
-
result = (Gosu::Font *)
|
5482
|
+
result = (Gosu::Font *)new_Gosu_Font__SWIG_0(*arg1,(std::wstring const &)*arg2,arg3);
|
5483
|
+
DATA_PTR(self) = result;
|
5484
|
+
SWIG_RubyAddTracking(result, self);
|
5485
|
+
} catch (const std::exception& e) {
|
5486
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
5487
|
+
}
|
5488
|
+
}
|
5489
|
+
return self;
|
5490
|
+
fail:
|
5491
|
+
return Qnil;
|
5492
|
+
}
|
5493
|
+
|
5494
|
+
|
5495
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
5496
|
+
SWIGINTERN VALUE
|
5497
|
+
_wrap_Font_allocate(VALUE self) {
|
5498
|
+
#else
|
5499
|
+
SWIGINTERN VALUE
|
5500
|
+
_wrap_Font_allocate(int argc, VALUE *argv, VALUE self) {
|
5501
|
+
#endif
|
5502
|
+
|
5503
|
+
|
5504
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Font);
|
5505
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
5506
|
+
rb_obj_call_init(vresult, argc, argv);
|
5507
|
+
#endif
|
5508
|
+
return vresult;
|
5509
|
+
}
|
5510
|
+
|
5511
|
+
|
5512
|
+
SWIGINTERN VALUE
|
5513
|
+
_wrap_new_Font__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
5514
|
+
unsigned int arg1 ;
|
5515
|
+
VALUE arg2 = (VALUE) 0 ;
|
5516
|
+
unsigned int val1 ;
|
5517
|
+
int ecode1 = 0 ;
|
5518
|
+
const char *classname SWIGUNUSED = "Gosu::Font";
|
5519
|
+
Gosu::Font *result = 0 ;
|
5520
|
+
|
5521
|
+
if ((argc < 1) || (argc > 2)) {
|
5522
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
5523
|
+
}
|
5524
|
+
ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
|
5525
|
+
if (!SWIG_IsOK(ecode1)) {
|
5526
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","Font", 1, argv[0] ));
|
5527
|
+
}
|
5528
|
+
arg1 = static_cast< unsigned int >(val1);
|
5529
|
+
if (argc > 1) {
|
5530
|
+
arg2 = argv[1];
|
5531
|
+
}
|
5532
|
+
{
|
5533
|
+
try {
|
5534
|
+
result = (Gosu::Font *)new_Gosu_Font__SWIG_1(arg1,arg2);
|
5326
5535
|
DATA_PTR(self) = result;
|
5327
5536
|
SWIG_RubyAddTracking(result, self);
|
5328
5537
|
} catch (const std::exception& e) {
|
@@ -5335,6 +5544,62 @@ fail:
|
|
5335
5544
|
}
|
5336
5545
|
|
5337
5546
|
|
5547
|
+
SWIGINTERN VALUE _wrap_new_Font(int nargs, VALUE *args, VALUE self) {
|
5548
|
+
int argc;
|
5549
|
+
VALUE argv[3];
|
5550
|
+
int ii;
|
5551
|
+
|
5552
|
+
argc = nargs;
|
5553
|
+
if (argc > 3) SWIG_fail;
|
5554
|
+
for (ii = 0; (ii < argc); ++ii) {
|
5555
|
+
argv[ii] = args[ii];
|
5556
|
+
}
|
5557
|
+
if ((argc >= 1) && (argc <= 2)) {
|
5558
|
+
int _v;
|
5559
|
+
{
|
5560
|
+
int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
|
5561
|
+
_v = SWIG_CheckState(res);
|
5562
|
+
}
|
5563
|
+
if (_v) {
|
5564
|
+
if (argc <= 1) {
|
5565
|
+
return _wrap_new_Font__SWIG_1(nargs, args, self);
|
5566
|
+
}
|
5567
|
+
_v = (argv[1] != 0);
|
5568
|
+
if (_v) {
|
5569
|
+
return _wrap_new_Font__SWIG_1(nargs, args, self);
|
5570
|
+
}
|
5571
|
+
}
|
5572
|
+
}
|
5573
|
+
if (argc == 3) {
|
5574
|
+
int _v;
|
5575
|
+
void *vptr = 0;
|
5576
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0);
|
5577
|
+
_v = SWIG_CheckState(res);
|
5578
|
+
if (_v) {
|
5579
|
+
void *vptr = 0;
|
5580
|
+
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__wstring, 0);
|
5581
|
+
_v = SWIG_CheckState(res);
|
5582
|
+
if (_v) {
|
5583
|
+
{
|
5584
|
+
int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
|
5585
|
+
_v = SWIG_CheckState(res);
|
5586
|
+
}
|
5587
|
+
if (_v) {
|
5588
|
+
return _wrap_new_Font__SWIG_0(nargs, args, self);
|
5589
|
+
}
|
5590
|
+
}
|
5591
|
+
}
|
5592
|
+
}
|
5593
|
+
|
5594
|
+
fail:
|
5595
|
+
Ruby_Format_OverloadedError( argc, 3, "Font.new",
|
5596
|
+
" Font.new(Gosu::Window &window, std::wstring const &fontName, unsigned int height)\n"
|
5597
|
+
" Font.new(unsigned int height, VALUE options)\n");
|
5598
|
+
|
5599
|
+
return Qnil;
|
5600
|
+
}
|
5601
|
+
|
5602
|
+
|
5338
5603
|
SWIGINTERN VALUE
|
5339
5604
|
_wrap_Font_set_image(int argc, VALUE *argv, VALUE self) {
|
5340
5605
|
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
@@ -5838,9 +6103,7 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
|
|
5838
6103
|
{
|
5839
6104
|
const char* cstr = Gosu::cstrFromSymbol(argv[6]);
|
5840
6105
|
|
5841
|
-
if (!cstr)
|
5842
|
-
SWIG_exception_fail(SWIG_ValueError, "alpha mode must be a symbol");
|
5843
|
-
else if (!strcmp(cstr, "default"))
|
6106
|
+
if (!strcmp(cstr, "default"))
|
5844
6107
|
arg8 = Gosu::amDefault;
|
5845
6108
|
else if (!strcmp(cstr, "add"))
|
5846
6109
|
arg8 = Gosu::amAdditive;
|
@@ -5988,9 +6251,7 @@ _wrap_Image_draw_mod(int argc, VALUE *argv, VALUE self) {
|
|
5988
6251
|
{
|
5989
6252
|
const char* cstr = Gosu::cstrFromSymbol(argv[9]);
|
5990
6253
|
|
5991
|
-
if (!cstr)
|
5992
|
-
SWIG_exception_fail(SWIG_ValueError, "alpha mode must be a symbol");
|
5993
|
-
else if (!strcmp(cstr, "default"))
|
6254
|
+
if (!strcmp(cstr, "default"))
|
5994
6255
|
arg11 = Gosu::amDefault;
|
5995
6256
|
else if (!strcmp(cstr, "add"))
|
5996
6257
|
arg11 = Gosu::amAdditive;
|
@@ -6124,9 +6385,7 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
|
|
6124
6385
|
{
|
6125
6386
|
const char* cstr = Gosu::cstrFromSymbol(argv[9]);
|
6126
6387
|
|
6127
|
-
if (!cstr)
|
6128
|
-
SWIG_exception_fail(SWIG_ValueError, "alpha mode must be a symbol");
|
6129
|
-
else if (!strcmp(cstr, "default"))
|
6388
|
+
if (!strcmp(cstr, "default"))
|
6130
6389
|
arg11 = Gosu::amDefault;
|
6131
6390
|
else if (!strcmp(cstr, "add"))
|
6132
6391
|
arg11 = Gosu::amAdditive;
|
@@ -6152,37 +6411,36 @@ fail:
|
|
6152
6411
|
|
6153
6412
|
|
6154
6413
|
SWIGINTERN VALUE
|
6155
|
-
|
6156
|
-
|
6157
|
-
|
6158
|
-
|
6159
|
-
Gosu::
|
6160
|
-
VALUE vresult = Qnil;
|
6414
|
+
_wrap_new_Image__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
6415
|
+
VALUE arg1 = (VALUE) 0 ;
|
6416
|
+
VALUE arg2 = (VALUE) 0 ;
|
6417
|
+
const char *classname SWIGUNUSED = "Gosu::Image";
|
6418
|
+
Gosu::Image *result = 0 ;
|
6161
6419
|
|
6162
|
-
if ((argc <
|
6163
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
6420
|
+
if ((argc < 1) || (argc > 2)) {
|
6421
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
6164
6422
|
}
|
6165
|
-
|
6166
|
-
if (
|
6167
|
-
|
6423
|
+
arg1 = argv[0];
|
6424
|
+
if (argc > 1) {
|
6425
|
+
arg2 = argv[1];
|
6168
6426
|
}
|
6169
|
-
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
6170
6427
|
{
|
6171
6428
|
try {
|
6172
|
-
result = (Gosu::
|
6429
|
+
result = (Gosu::Image *)new_Gosu_Image__SWIG_0(arg1,arg2);
|
6430
|
+
DATA_PTR(self) = result;
|
6431
|
+
SWIG_RubyAddTracking(result, self);
|
6173
6432
|
} catch (const std::exception& e) {
|
6174
6433
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
6175
6434
|
}
|
6176
6435
|
}
|
6177
|
-
|
6178
|
-
return vresult;
|
6436
|
+
return self;
|
6179
6437
|
fail:
|
6180
6438
|
return Qnil;
|
6181
6439
|
}
|
6182
6440
|
|
6183
6441
|
|
6184
6442
|
SWIGINTERN VALUE
|
6185
|
-
|
6443
|
+
_wrap_new_Image__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
6186
6444
|
Gosu::Window *arg1 = 0 ;
|
6187
6445
|
VALUE arg2 = (VALUE) 0 ;
|
6188
6446
|
bool arg3 = (bool) false ;
|
@@ -6214,7 +6472,7 @@ _wrap_new_Image__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
6214
6472
|
}
|
6215
6473
|
{
|
6216
6474
|
try {
|
6217
|
-
result = (Gosu::Image *)
|
6475
|
+
result = (Gosu::Image *)new_Gosu_Image__SWIG_1(*arg1,arg2,arg3);
|
6218
6476
|
DATA_PTR(self) = result;
|
6219
6477
|
SWIG_RubyAddTracking(result, self);
|
6220
6478
|
} catch (const std::exception& e) {
|
@@ -6245,7 +6503,7 @@ _wrap_Image_allocate(VALUE self) {
|
|
6245
6503
|
|
6246
6504
|
|
6247
6505
|
SWIGINTERN VALUE
|
6248
|
-
|
6506
|
+
_wrap_new_Image__SWIG_2(int argc, VALUE *argv, VALUE self) {
|
6249
6507
|
Gosu::Window *arg1 = 0 ;
|
6250
6508
|
VALUE arg2 = (VALUE) 0 ;
|
6251
6509
|
bool arg3 ;
|
@@ -6307,7 +6565,7 @@ _wrap_new_Image__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
|
6307
6565
|
arg7 = static_cast< unsigned int >(val7);
|
6308
6566
|
{
|
6309
6567
|
try {
|
6310
|
-
result = (Gosu::Image *)
|
6568
|
+
result = (Gosu::Image *)new_Gosu_Image__SWIG_2(*arg1,arg2,arg3,arg4,arg5,arg6,arg7);
|
6311
6569
|
DATA_PTR(self) = result;
|
6312
6570
|
SWIG_RubyAddTracking(result, self);
|
6313
6571
|
} catch (const std::exception& e) {
|
@@ -6330,23 +6588,36 @@ SWIGINTERN VALUE _wrap_new_Image(int nargs, VALUE *args, VALUE self) {
|
|
6330
6588
|
for (ii = 0; (ii < argc); ++ii) {
|
6331
6589
|
argv[ii] = args[ii];
|
6332
6590
|
}
|
6333
|
-
if ((argc >=
|
6591
|
+
if ((argc >= 1) && (argc <= 2)) {
|
6334
6592
|
int _v;
|
6335
|
-
|
6336
|
-
|
6337
|
-
|
6593
|
+
_v = (argv[0] != 0);
|
6594
|
+
if (_v) {
|
6595
|
+
if (argc <= 1) {
|
6596
|
+
return _wrap_new_Image__SWIG_0(nargs, args, self);
|
6597
|
+
}
|
6598
|
+
_v = (argv[1] != 0);
|
6599
|
+
if (_v) {
|
6600
|
+
return _wrap_new_Image__SWIG_0(nargs, args, self);
|
6601
|
+
}
|
6602
|
+
}
|
6603
|
+
}
|
6604
|
+
if ((argc >= 2) && (argc <= 3)) {
|
6605
|
+
int _v;
|
6606
|
+
void *vptr = 0;
|
6607
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0);
|
6608
|
+
_v = SWIG_CheckState(res);
|
6338
6609
|
if (_v) {
|
6339
6610
|
_v = (argv[1] != 0);
|
6340
6611
|
if (_v) {
|
6341
6612
|
if (argc <= 2) {
|
6342
|
-
return
|
6613
|
+
return _wrap_new_Image__SWIG_1(nargs, args, self);
|
6343
6614
|
}
|
6344
6615
|
{
|
6345
6616
|
int res = SWIG_AsVal_bool(argv[2], NULL);
|
6346
6617
|
_v = SWIG_CheckState(res);
|
6347
6618
|
}
|
6348
6619
|
if (_v) {
|
6349
|
-
return
|
6620
|
+
return _wrap_new_Image__SWIG_1(nargs, args, self);
|
6350
6621
|
}
|
6351
6622
|
}
|
6352
6623
|
}
|
@@ -6384,7 +6655,7 @@ SWIGINTERN VALUE _wrap_new_Image(int nargs, VALUE *args, VALUE self) {
|
|
6384
6655
|
_v = SWIG_CheckState(res);
|
6385
6656
|
}
|
6386
6657
|
if (_v) {
|
6387
|
-
return
|
6658
|
+
return _wrap_new_Image__SWIG_2(nargs, args, self);
|
6388
6659
|
}
|
6389
6660
|
}
|
6390
6661
|
}
|
@@ -6396,6 +6667,7 @@ SWIGINTERN VALUE _wrap_new_Image(int nargs, VALUE *args, VALUE self) {
|
|
6396
6667
|
|
6397
6668
|
fail:
|
6398
6669
|
Ruby_Format_OverloadedError( argc, 7, "Image.new",
|
6670
|
+
" Image.new(VALUE source, VALUE options)\n"
|
6399
6671
|
" Image.new(Gosu::Window &window, VALUE source, bool tileable)\n"
|
6400
6672
|
" Image.new(Gosu::Window &window, VALUE source, bool tileable, unsigned int srcX, unsigned int srcY, unsigned int srcWidth, unsigned int srcHeight)\n");
|
6401
6673
|
|
@@ -6558,9 +6830,7 @@ _wrap_Image_draw_as_quad(int argc, VALUE *argv, VALUE self) {
|
|
6558
6830
|
{
|
6559
6831
|
const char* cstr = Gosu::cstrFromSymbol(argv[13]);
|
6560
6832
|
|
6561
|
-
if (!cstr)
|
6562
|
-
SWIG_exception_fail(SWIG_ValueError, "alpha mode must be a symbol");
|
6563
|
-
else if (!strcmp(cstr, "default"))
|
6833
|
+
if (!strcmp(cstr, "default"))
|
6564
6834
|
arg15 = Gosu::amDefault;
|
6565
6835
|
else if (!strcmp(cstr, "add"))
|
6566
6836
|
arg15 = Gosu::amAdditive;
|
@@ -6678,49 +6948,35 @@ fail:
|
|
6678
6948
|
|
6679
6949
|
|
6680
6950
|
SWIGINTERN VALUE
|
6681
|
-
|
6682
|
-
|
6683
|
-
|
6684
|
-
|
6685
|
-
|
6686
|
-
|
6687
|
-
int
|
6688
|
-
std::wstring temp2 ;
|
6689
|
-
std::wstring temp3 ;
|
6690
|
-
unsigned int val4 ;
|
6691
|
-
int ecode4 = 0 ;
|
6951
|
+
_wrap_Image_from_text(int argc, VALUE *argv, VALUE self) {
|
6952
|
+
std::wstring *arg1 = 0 ;
|
6953
|
+
unsigned int arg2 ;
|
6954
|
+
VALUE arg3 = (VALUE) 0 ;
|
6955
|
+
std::wstring temp1 ;
|
6956
|
+
unsigned int val2 ;
|
6957
|
+
int ecode2 = 0 ;
|
6692
6958
|
Gosu::Image *result = 0 ;
|
6693
6959
|
VALUE vresult = Qnil;
|
6694
6960
|
|
6695
|
-
if ((argc <
|
6696
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
6697
|
-
}
|
6698
|
-
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Gosu__Window, 0 );
|
6699
|
-
if (!SWIG_IsOK(res1)) {
|
6700
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window &","Gosu_Image_fromText4", 1, argv[0] ));
|
6701
|
-
}
|
6702
|
-
if (!argp1) {
|
6703
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Gosu::Window &","Gosu_Image_fromText4", 1, argv[0]));
|
6704
|
-
}
|
6705
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
6706
|
-
{
|
6707
|
-
VALUE localTemporary = rb_obj_as_string(argv[1]);
|
6708
|
-
temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary));
|
6709
|
-
arg2 = &temp2;
|
6961
|
+
if ((argc < 2) || (argc > 3)) {
|
6962
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
6710
6963
|
}
|
6711
6964
|
{
|
6712
|
-
VALUE localTemporary = rb_obj_as_string(argv[
|
6713
|
-
|
6714
|
-
|
6965
|
+
VALUE localTemporary = rb_obj_as_string(argv[0]);
|
6966
|
+
temp1 = Gosu::utf8ToWstring(StringValueCStr(localTemporary));
|
6967
|
+
arg1 = &temp1;
|
6715
6968
|
}
|
6716
|
-
|
6717
|
-
if (!SWIG_IsOK(
|
6718
|
-
SWIG_exception_fail(SWIG_ArgError(
|
6969
|
+
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
|
6970
|
+
if (!SWIG_IsOK(ecode2)) {
|
6971
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Gosu_Image_fromText", 2, argv[1] ));
|
6719
6972
|
}
|
6720
|
-
|
6973
|
+
arg2 = static_cast< unsigned int >(val2);
|
6974
|
+
if (argc > 2) {
|
6975
|
+
arg3 = argv[2];
|
6976
|
+
}
|
6721
6977
|
{
|
6722
6978
|
try {
|
6723
|
-
result = (Gosu::Image *)
|
6979
|
+
result = (Gosu::Image *)Gosu_Image_fromText((std::wstring const &)*arg1,arg2,arg3);
|
6724
6980
|
} catch (const std::exception& e) {
|
6725
6981
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
6726
6982
|
}
|
@@ -6733,87 +6989,49 @@ fail:
|
|
6733
6989
|
|
6734
6990
|
|
6735
6991
|
SWIGINTERN VALUE
|
6736
|
-
|
6737
|
-
|
6738
|
-
|
6739
|
-
|
6740
|
-
|
6741
|
-
int
|
6742
|
-
|
6743
|
-
|
6744
|
-
|
6745
|
-
|
6746
|
-
std::wstring temp2 ;
|
6747
|
-
std::wstring temp3 ;
|
6748
|
-
unsigned int val4 ;
|
6749
|
-
int ecode4 = 0 ;
|
6750
|
-
int val5 ;
|
6751
|
-
int ecode5 = 0 ;
|
6752
|
-
unsigned int val6 ;
|
6753
|
-
int ecode6 = 0 ;
|
6754
|
-
Gosu::Image *result = 0 ;
|
6992
|
+
_wrap_Image_load_tiles__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
6993
|
+
VALUE arg1 = (VALUE) 0 ;
|
6994
|
+
int arg2 ;
|
6995
|
+
int arg3 ;
|
6996
|
+
VALUE arg4 = (VALUE) 0 ;
|
6997
|
+
int val2 ;
|
6998
|
+
int ecode2 = 0 ;
|
6999
|
+
int val3 ;
|
7000
|
+
int ecode3 = 0 ;
|
7001
|
+
SwigValueWrapper< std::vector< Gosu::Image > > result;
|
6755
7002
|
VALUE vresult = Qnil;
|
6756
7003
|
|
6757
|
-
if ((argc <
|
6758
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
6759
|
-
}
|
6760
|
-
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Gosu__Window, 0 );
|
6761
|
-
if (!SWIG_IsOK(res1)) {
|
6762
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window &","Gosu_Image_fromText7", 1, argv[0] ));
|
6763
|
-
}
|
6764
|
-
if (!argp1) {
|
6765
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Gosu::Window &","Gosu_Image_fromText7", 1, argv[0]));
|
6766
|
-
}
|
6767
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
6768
|
-
{
|
6769
|
-
VALUE localTemporary = rb_obj_as_string(argv[1]);
|
6770
|
-
temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary));
|
6771
|
-
arg2 = &temp2;
|
6772
|
-
}
|
6773
|
-
{
|
6774
|
-
VALUE localTemporary = rb_obj_as_string(argv[2]);
|
6775
|
-
temp3 = Gosu::utf8ToWstring(StringValueCStr(localTemporary));
|
6776
|
-
arg3 = &temp3;
|
7004
|
+
if ((argc < 3) || (argc > 4)) {
|
7005
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
6777
7006
|
}
|
6778
|
-
|
6779
|
-
|
6780
|
-
|
6781
|
-
|
6782
|
-
arg4 = static_cast< unsigned int >(val4);
|
6783
|
-
ecode5 = SWIG_AsVal_int(argv[4], &val5);
|
6784
|
-
if (!SWIG_IsOK(ecode5)) {
|
6785
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","Gosu_Image_fromText7", 5, argv[4] ));
|
7007
|
+
arg1 = argv[0];
|
7008
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
7009
|
+
if (!SWIG_IsOK(ecode2)) {
|
7010
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Gosu_Image_loadTiles__SWIG_0", 2, argv[1] ));
|
6786
7011
|
}
|
6787
|
-
|
6788
|
-
|
6789
|
-
if (!SWIG_IsOK(
|
6790
|
-
SWIG_exception_fail(SWIG_ArgError(
|
7012
|
+
arg2 = static_cast< int >(val2);
|
7013
|
+
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
7014
|
+
if (!SWIG_IsOK(ecode3)) {
|
7015
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Gosu_Image_loadTiles__SWIG_0", 3, argv[2] ));
|
6791
7016
|
}
|
6792
|
-
|
6793
|
-
{
|
6794
|
-
|
6795
|
-
|
6796
|
-
if (!cstr)
|
6797
|
-
SWIG_exception_fail(SWIG_ValueError, "text align must be a symbol");
|
6798
|
-
else if (!strcmp(cstr, "left"))
|
6799
|
-
arg7 = Gosu::taLeft;
|
6800
|
-
else if (!strcmp(cstr, "center"))
|
6801
|
-
arg7 = Gosu::taCenter;
|
6802
|
-
else if (!strcmp(cstr, "right"))
|
6803
|
-
arg7 = Gosu::taRight;
|
6804
|
-
else if (!strcmp(cstr, "justify"))
|
6805
|
-
arg7 = Gosu::taJustify;
|
6806
|
-
else
|
6807
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid text align");
|
7017
|
+
arg3 = static_cast< int >(val3);
|
7018
|
+
if (argc > 3) {
|
7019
|
+
arg4 = argv[3];
|
6808
7020
|
}
|
6809
7021
|
{
|
6810
7022
|
try {
|
6811
|
-
result = (
|
7023
|
+
result = Gosu_Image_loadTiles__SWIG_0(arg1,arg2,arg3,arg4);
|
6812
7024
|
} catch (const std::exception& e) {
|
6813
7025
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
6814
7026
|
}
|
6815
7027
|
}
|
6816
|
-
|
7028
|
+
{
|
7029
|
+
vresult = rb_ary_new2((&result)->size());
|
7030
|
+
for (unsigned i = 0; i < (&result)->size(); i++) {
|
7031
|
+
VALUE image = SWIG_NewPointerObj(SWIG_as_voidptr(new Gosu::Image((*&result)[i])), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN);
|
7032
|
+
rb_ary_store(vresult, i, image);
|
7033
|
+
}
|
7034
|
+
}
|
6817
7035
|
return vresult;
|
6818
7036
|
fail:
|
6819
7037
|
return Qnil;
|
@@ -6821,7 +7039,7 @@ fail:
|
|
6821
7039
|
|
6822
7040
|
|
6823
7041
|
SWIGINTERN VALUE
|
6824
|
-
|
7042
|
+
_wrap_Image_load_tiles__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
6825
7043
|
Gosu::Window *arg1 = 0 ;
|
6826
7044
|
VALUE arg2 = (VALUE) 0 ;
|
6827
7045
|
int arg3 ;
|
@@ -6835,7 +7053,7 @@ _wrap_Image_load_tiles(int argc, VALUE *argv, VALUE self) {
|
|
6835
7053
|
int ecode4 = 0 ;
|
6836
7054
|
bool val5 ;
|
6837
7055
|
int ecode5 = 0 ;
|
6838
|
-
SwigValueWrapper< std::vector< Gosu::Image
|
7056
|
+
SwigValueWrapper< std::vector< Gosu::Image > > result;
|
6839
7057
|
VALUE vresult = Qnil;
|
6840
7058
|
|
6841
7059
|
if ((argc < 5) || (argc > 5)) {
|
@@ -6843,31 +7061,31 @@ _wrap_Image_load_tiles(int argc, VALUE *argv, VALUE self) {
|
|
6843
7061
|
}
|
6844
7062
|
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Gosu__Window, 0 );
|
6845
7063
|
if (!SWIG_IsOK(res1)) {
|
6846
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window &","
|
7064
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window &","Gosu_Image_loadTiles__SWIG_1", 1, argv[0] ));
|
6847
7065
|
}
|
6848
7066
|
if (!argp1) {
|
6849
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Gosu::Window &","
|
7067
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Gosu::Window &","Gosu_Image_loadTiles__SWIG_1", 1, argv[0]));
|
6850
7068
|
}
|
6851
7069
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
6852
7070
|
arg2 = argv[1];
|
6853
7071
|
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
6854
7072
|
if (!SWIG_IsOK(ecode3)) {
|
6855
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","
|
7073
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Gosu_Image_loadTiles__SWIG_1", 3, argv[2] ));
|
6856
7074
|
}
|
6857
7075
|
arg3 = static_cast< int >(val3);
|
6858
7076
|
ecode4 = SWIG_AsVal_int(argv[3], &val4);
|
6859
7077
|
if (!SWIG_IsOK(ecode4)) {
|
6860
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","
|
7078
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","Gosu_Image_loadTiles__SWIG_1", 4, argv[3] ));
|
6861
7079
|
}
|
6862
7080
|
arg4 = static_cast< int >(val4);
|
6863
7081
|
ecode5 = SWIG_AsVal_bool(argv[4], &val5);
|
6864
7082
|
if (!SWIG_IsOK(ecode5)) {
|
6865
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","
|
7083
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","Gosu_Image_loadTiles__SWIG_1", 5, argv[4] ));
|
6866
7084
|
}
|
6867
7085
|
arg5 = static_cast< bool >(val5);
|
6868
7086
|
{
|
6869
7087
|
try {
|
6870
|
-
result =
|
7088
|
+
result = Gosu_Image_loadTiles__SWIG_1(*arg1,arg2,arg3,arg4,arg5);
|
6871
7089
|
} catch (const std::exception& e) {
|
6872
7090
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
6873
7091
|
}
|
@@ -6875,8 +7093,8 @@ _wrap_Image_load_tiles(int argc, VALUE *argv, VALUE self) {
|
|
6875
7093
|
{
|
6876
7094
|
vresult = rb_ary_new2((&result)->size());
|
6877
7095
|
for (unsigned i = 0; i < (&result)->size(); i++) {
|
6878
|
-
VALUE
|
6879
|
-
rb_ary_store(vresult, i,
|
7096
|
+
VALUE image = SWIG_NewPointerObj(SWIG_as_voidptr(new Gosu::Image((*&result)[i])), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN);
|
7097
|
+
rb_ary_store(vresult, i, image);
|
6880
7098
|
}
|
6881
7099
|
}
|
6882
7100
|
return vresult;
|
@@ -6885,6 +7103,81 @@ fail:
|
|
6885
7103
|
}
|
6886
7104
|
|
6887
7105
|
|
7106
|
+
SWIGINTERN VALUE _wrap_Image_load_tiles(int nargs, VALUE *args, VALUE self) {
|
7107
|
+
int argc;
|
7108
|
+
VALUE argv[5];
|
7109
|
+
int ii;
|
7110
|
+
|
7111
|
+
argc = nargs;
|
7112
|
+
if (argc > 5) SWIG_fail;
|
7113
|
+
for (ii = 0; (ii < argc); ++ii) {
|
7114
|
+
argv[ii] = args[ii];
|
7115
|
+
}
|
7116
|
+
if ((argc >= 3) && (argc <= 4)) {
|
7117
|
+
int _v;
|
7118
|
+
_v = (argv[0] != 0);
|
7119
|
+
if (_v) {
|
7120
|
+
{
|
7121
|
+
int res = SWIG_AsVal_int(argv[1], NULL);
|
7122
|
+
_v = SWIG_CheckState(res);
|
7123
|
+
}
|
7124
|
+
if (_v) {
|
7125
|
+
{
|
7126
|
+
int res = SWIG_AsVal_int(argv[2], NULL);
|
7127
|
+
_v = SWIG_CheckState(res);
|
7128
|
+
}
|
7129
|
+
if (_v) {
|
7130
|
+
if (argc <= 3) {
|
7131
|
+
return _wrap_Image_load_tiles__SWIG_0(nargs, args, self);
|
7132
|
+
}
|
7133
|
+
_v = (argv[3] != 0);
|
7134
|
+
if (_v) {
|
7135
|
+
return _wrap_Image_load_tiles__SWIG_0(nargs, args, self);
|
7136
|
+
}
|
7137
|
+
}
|
7138
|
+
}
|
7139
|
+
}
|
7140
|
+
}
|
7141
|
+
if (argc == 5) {
|
7142
|
+
int _v;
|
7143
|
+
void *vptr = 0;
|
7144
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0);
|
7145
|
+
_v = SWIG_CheckState(res);
|
7146
|
+
if (_v) {
|
7147
|
+
_v = (argv[1] != 0);
|
7148
|
+
if (_v) {
|
7149
|
+
{
|
7150
|
+
int res = SWIG_AsVal_int(argv[2], NULL);
|
7151
|
+
_v = SWIG_CheckState(res);
|
7152
|
+
}
|
7153
|
+
if (_v) {
|
7154
|
+
{
|
7155
|
+
int res = SWIG_AsVal_int(argv[3], NULL);
|
7156
|
+
_v = SWIG_CheckState(res);
|
7157
|
+
}
|
7158
|
+
if (_v) {
|
7159
|
+
{
|
7160
|
+
int res = SWIG_AsVal_bool(argv[4], NULL);
|
7161
|
+
_v = SWIG_CheckState(res);
|
7162
|
+
}
|
7163
|
+
if (_v) {
|
7164
|
+
return _wrap_Image_load_tiles__SWIG_1(nargs, args, self);
|
7165
|
+
}
|
7166
|
+
}
|
7167
|
+
}
|
7168
|
+
}
|
7169
|
+
}
|
7170
|
+
}
|
7171
|
+
|
7172
|
+
fail:
|
7173
|
+
Ruby_Format_OverloadedError( argc, 5, "load_tiles",
|
7174
|
+
" std::vector< Gosu::Image > load_tiles(VALUE source, int tileWidth, int tileHeight, VALUE options)\n"
|
7175
|
+
" std::vector< Gosu::Image > load_tiles(Gosu::Window &window, VALUE source, int tileWidth, int tileHeight, bool tileable)\n");
|
7176
|
+
|
7177
|
+
return Qnil;
|
7178
|
+
}
|
7179
|
+
|
7180
|
+
|
6888
7181
|
SWIGINTERN VALUE
|
6889
7182
|
_wrap_Image_to_blob(int argc, VALUE *argv, VALUE self) {
|
6890
7183
|
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
@@ -8338,7 +8631,7 @@ _wrap_new_Window(int argc, VALUE *argv, VALUE self) {
|
|
8338
8631
|
VALUE arg1 = (VALUE) 0 ;
|
8339
8632
|
unsigned int arg2 ;
|
8340
8633
|
unsigned int arg3 ;
|
8341
|
-
bool arg4 ;
|
8634
|
+
bool arg4 = (bool) false ;
|
8342
8635
|
double arg5 = (double) 16.666666 ;
|
8343
8636
|
unsigned int val2 ;
|
8344
8637
|
int ecode2 = 0 ;
|
@@ -8351,8 +8644,8 @@ _wrap_new_Window(int argc, VALUE *argv, VALUE self) {
|
|
8351
8644
|
const char *classname SWIGUNUSED = "Gosu::Window";
|
8352
8645
|
Gosu::Window *result = 0 ;
|
8353
8646
|
|
8354
|
-
if ((argc <
|
8355
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
8647
|
+
if ((argc < 2) || (argc > 4)) {
|
8648
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
8356
8649
|
}
|
8357
8650
|
arg1 = self;
|
8358
8651
|
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
|
@@ -8365,11 +8658,13 @@ _wrap_new_Window(int argc, VALUE *argv, VALUE self) {
|
|
8365
8658
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","Window", 3, argv[1] ));
|
8366
8659
|
}
|
8367
8660
|
arg3 = static_cast< unsigned int >(val3);
|
8368
|
-
|
8369
|
-
|
8370
|
-
|
8371
|
-
|
8372
|
-
|
8661
|
+
if (argc > 2) {
|
8662
|
+
ecode4 = SWIG_AsVal_bool(argv[2], &val4);
|
8663
|
+
if (!SWIG_IsOK(ecode4)) {
|
8664
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","Window", 4, argv[2] ));
|
8665
|
+
}
|
8666
|
+
arg4 = static_cast< bool >(val4);
|
8667
|
+
}
|
8373
8668
|
if (argc > 3) {
|
8374
8669
|
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
8375
8670
|
if (!SWIG_IsOK(ecode5)) {
|
@@ -8896,267 +9191,169 @@ fail:
|
|
8896
9191
|
|
8897
9192
|
|
8898
9193
|
SWIGINTERN VALUE
|
8899
|
-
|
9194
|
+
_wrap_Window_text_input(int argc, VALUE *argv, VALUE self) {
|
8900
9195
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
8901
|
-
double arg2 ;
|
8902
|
-
double arg3 ;
|
8903
|
-
Gosu::Color arg4 ;
|
8904
|
-
double arg5 ;
|
8905
|
-
double arg6 ;
|
8906
|
-
Gosu::Color arg7 ;
|
8907
|
-
Gosu::ZPos arg8 = (Gosu::ZPos) 0 ;
|
8908
|
-
Gosu::AlphaMode arg9 = (Gosu::AlphaMode) Gosu::amDefault ;
|
8909
9196
|
void *argp1 = 0 ;
|
8910
9197
|
int res1 = 0 ;
|
8911
|
-
|
8912
|
-
|
8913
|
-
|
8914
|
-
int ecode3 = 0 ;
|
8915
|
-
double val5 ;
|
8916
|
-
int ecode5 = 0 ;
|
8917
|
-
double val6 ;
|
8918
|
-
int ecode6 = 0 ;
|
8919
|
-
double val8 ;
|
8920
|
-
int ecode8 = 0 ;
|
9198
|
+
Swig::Director *director = 0;
|
9199
|
+
Gosu::TextInput *result = 0 ;
|
9200
|
+
VALUE vresult = Qnil;
|
8921
9201
|
|
8922
|
-
if ((argc <
|
8923
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9202
|
+
if ((argc < 0) || (argc > 0)) {
|
9203
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
8924
9204
|
}
|
8925
9205
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
8926
9206
|
if (!SWIG_IsOK(res1)) {
|
8927
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","
|
9207
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","textInput", 1, self ));
|
8928
9208
|
}
|
8929
9209
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
8930
|
-
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
8931
|
-
if (!SWIG_IsOK(ecode2)) {
|
8932
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","drawLine", 2, argv[0] ));
|
8933
|
-
}
|
8934
|
-
arg2 = static_cast< double >(val2);
|
8935
|
-
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
8936
|
-
if (!SWIG_IsOK(ecode3)) {
|
8937
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","drawLine", 3, argv[1] ));
|
8938
|
-
}
|
8939
|
-
arg3 = static_cast< double >(val3);
|
8940
9210
|
{
|
8941
|
-
|
8942
|
-
|
8943
|
-
|
8944
|
-
|
8945
|
-
void* ptr;
|
8946
|
-
int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
8947
|
-
if (!SWIG_IsOK(res))
|
8948
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
8949
|
-
else if (!ptr)
|
8950
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
8951
|
-
else
|
8952
|
-
arg4 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9211
|
+
try {
|
9212
|
+
result = (Gosu::TextInput *)Gosu_Window_textInput((Gosu::Window const *)arg1);
|
9213
|
+
} catch (const std::exception& e) {
|
9214
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
8953
9215
|
}
|
8954
9216
|
}
|
8955
|
-
|
8956
|
-
if (
|
8957
|
-
|
8958
|
-
}
|
8959
|
-
|
8960
|
-
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
8961
|
-
if (!SWIG_IsOK(ecode6)) {
|
8962
|
-
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","drawLine", 6, argv[4] ));
|
8963
|
-
}
|
8964
|
-
arg6 = static_cast< double >(val6);
|
8965
|
-
{
|
8966
|
-
if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM)
|
8967
|
-
arg7 = Gosu::Color(NUM2ULONG(argv[5]));
|
8968
|
-
else
|
8969
|
-
{
|
8970
|
-
void* ptr;
|
8971
|
-
int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
8972
|
-
if (!SWIG_IsOK(res))
|
8973
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
8974
|
-
else if (!ptr)
|
8975
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
8976
|
-
else
|
8977
|
-
arg7 = *reinterpret_cast<Gosu::Color*>(ptr);
|
8978
|
-
}
|
9217
|
+
director = dynamic_cast<Swig::Director *>(result);
|
9218
|
+
if (director) {
|
9219
|
+
vresult = director->swig_get_self();
|
9220
|
+
} else {
|
9221
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__TextInput, 0 | 0 );
|
8979
9222
|
}
|
8980
|
-
|
8981
|
-
|
8982
|
-
|
8983
|
-
|
8984
|
-
|
8985
|
-
|
9223
|
+
return vresult;
|
9224
|
+
fail:
|
9225
|
+
return Qnil;
|
9226
|
+
}
|
9227
|
+
|
9228
|
+
|
9229
|
+
SWIGINTERN VALUE
|
9230
|
+
_wrap_Window_text_inpute___(int argc, VALUE *argv, VALUE self) {
|
9231
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9232
|
+
Gosu::TextInput *arg2 = (Gosu::TextInput *) 0 ;
|
9233
|
+
void *argp1 = 0 ;
|
9234
|
+
int res1 = 0 ;
|
9235
|
+
void *argp2 = 0 ;
|
9236
|
+
int res2 = 0 ;
|
9237
|
+
|
9238
|
+
if ((argc < 1) || (argc > 1)) {
|
9239
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
8986
9240
|
}
|
8987
|
-
|
8988
|
-
|
8989
|
-
|
8990
|
-
|
8991
|
-
|
8992
|
-
|
8993
|
-
|
8994
|
-
|
8995
|
-
|
8996
|
-
|
8997
|
-
|
8998
|
-
|
8999
|
-
|
9000
|
-
|
9001
|
-
|
9002
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode");
|
9241
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9242
|
+
if (!SWIG_IsOK(res1)) {
|
9243
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setTextInput", 1, self ));
|
9244
|
+
}
|
9245
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9246
|
+
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Gosu__TextInput, 0 | 0 );
|
9247
|
+
if (!SWIG_IsOK(res2)) {
|
9248
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Gosu::TextInput *","setTextInput", 2, argv[0] ));
|
9249
|
+
}
|
9250
|
+
arg2 = reinterpret_cast< Gosu::TextInput * >(argp2);
|
9251
|
+
{
|
9252
|
+
try {
|
9253
|
+
Gosu_Window_setTextInput(arg1,arg2);
|
9254
|
+
} catch (const std::exception& e) {
|
9255
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9003
9256
|
}
|
9004
9257
|
}
|
9258
|
+
return Qnil;
|
9259
|
+
fail:
|
9260
|
+
return Qnil;
|
9261
|
+
}
|
9262
|
+
|
9263
|
+
|
9264
|
+
SWIGINTERN VALUE
|
9265
|
+
_wrap_Window_mouse_x(int argc, VALUE *argv, VALUE self) {
|
9266
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9267
|
+
void *argp1 = 0 ;
|
9268
|
+
int res1 = 0 ;
|
9269
|
+
double result;
|
9270
|
+
VALUE vresult = Qnil;
|
9271
|
+
|
9272
|
+
if ((argc < 0) || (argc > 0)) {
|
9273
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9274
|
+
}
|
9275
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9276
|
+
if (!SWIG_IsOK(res1)) {
|
9277
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","mouseX", 1, self ));
|
9278
|
+
}
|
9279
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9005
9280
|
{
|
9006
9281
|
try {
|
9007
|
-
|
9282
|
+
result = (double)Gosu_Window_mouseX((Gosu::Window const *)arg1);
|
9008
9283
|
} catch (const std::exception& e) {
|
9009
9284
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9010
9285
|
}
|
9011
9286
|
}
|
9287
|
+
vresult = SWIG_From_double(static_cast< double >(result));
|
9288
|
+
return vresult;
|
9289
|
+
fail:
|
9012
9290
|
return Qnil;
|
9291
|
+
}
|
9292
|
+
|
9293
|
+
|
9294
|
+
SWIGINTERN VALUE
|
9295
|
+
_wrap_Window_mouse_y(int argc, VALUE *argv, VALUE self) {
|
9296
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9297
|
+
void *argp1 = 0 ;
|
9298
|
+
int res1 = 0 ;
|
9299
|
+
double result;
|
9300
|
+
VALUE vresult = Qnil;
|
9301
|
+
|
9302
|
+
if ((argc < 0) || (argc > 0)) {
|
9303
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9304
|
+
}
|
9305
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9306
|
+
if (!SWIG_IsOK(res1)) {
|
9307
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","mouseY", 1, self ));
|
9308
|
+
}
|
9309
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9310
|
+
{
|
9311
|
+
try {
|
9312
|
+
result = (double)Gosu_Window_mouseY((Gosu::Window const *)arg1);
|
9313
|
+
} catch (const std::exception& e) {
|
9314
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9315
|
+
}
|
9316
|
+
}
|
9317
|
+
vresult = SWIG_From_double(static_cast< double >(result));
|
9318
|
+
return vresult;
|
9013
9319
|
fail:
|
9014
9320
|
return Qnil;
|
9015
9321
|
}
|
9016
9322
|
|
9017
9323
|
|
9018
9324
|
SWIGINTERN VALUE
|
9019
|
-
|
9325
|
+
_wrap_Window_set_mouse_position(int argc, VALUE *argv, VALUE self) {
|
9020
9326
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9021
9327
|
double arg2 ;
|
9022
9328
|
double arg3 ;
|
9023
|
-
Gosu::Color arg4 ;
|
9024
|
-
double arg5 ;
|
9025
|
-
double arg6 ;
|
9026
|
-
Gosu::Color arg7 ;
|
9027
|
-
double arg8 ;
|
9028
|
-
double arg9 ;
|
9029
|
-
Gosu::Color arg10 ;
|
9030
|
-
Gosu::ZPos arg11 = (Gosu::ZPos) 0 ;
|
9031
|
-
Gosu::AlphaMode arg12 = (Gosu::AlphaMode) Gosu::amDefault ;
|
9032
9329
|
void *argp1 = 0 ;
|
9033
9330
|
int res1 = 0 ;
|
9034
9331
|
double val2 ;
|
9035
9332
|
int ecode2 = 0 ;
|
9036
9333
|
double val3 ;
|
9037
9334
|
int ecode3 = 0 ;
|
9038
|
-
double val5 ;
|
9039
|
-
int ecode5 = 0 ;
|
9040
|
-
double val6 ;
|
9041
|
-
int ecode6 = 0 ;
|
9042
|
-
double val8 ;
|
9043
|
-
int ecode8 = 0 ;
|
9044
|
-
double val9 ;
|
9045
|
-
int ecode9 = 0 ;
|
9046
|
-
double val11 ;
|
9047
|
-
int ecode11 = 0 ;
|
9048
9335
|
|
9049
|
-
if ((argc <
|
9050
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9336
|
+
if ((argc < 2) || (argc > 2)) {
|
9337
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
9051
9338
|
}
|
9052
9339
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9053
9340
|
if (!SWIG_IsOK(res1)) {
|
9054
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","
|
9341
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setMousePosition", 1, self ));
|
9055
9342
|
}
|
9056
9343
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9057
9344
|
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9058
9345
|
if (!SWIG_IsOK(ecode2)) {
|
9059
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","
|
9346
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setMousePosition", 2, argv[0] ));
|
9060
9347
|
}
|
9061
9348
|
arg2 = static_cast< double >(val2);
|
9062
9349
|
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
9063
9350
|
if (!SWIG_IsOK(ecode3)) {
|
9064
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","
|
9351
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","setMousePosition", 3, argv[1] ));
|
9065
9352
|
}
|
9066
9353
|
arg3 = static_cast< double >(val3);
|
9067
|
-
{
|
9068
|
-
if (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM)
|
9069
|
-
arg4 = Gosu::Color(NUM2ULONG(argv[2]));
|
9070
|
-
else
|
9071
|
-
{
|
9072
|
-
void* ptr;
|
9073
|
-
int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9074
|
-
if (!SWIG_IsOK(res))
|
9075
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9076
|
-
else if (!ptr)
|
9077
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9078
|
-
else
|
9079
|
-
arg4 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9080
|
-
}
|
9081
|
-
}
|
9082
|
-
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
9083
|
-
if (!SWIG_IsOK(ecode5)) {
|
9084
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","drawTriangle", 5, argv[3] ));
|
9085
|
-
}
|
9086
|
-
arg5 = static_cast< double >(val5);
|
9087
|
-
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
9088
|
-
if (!SWIG_IsOK(ecode6)) {
|
9089
|
-
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","drawTriangle", 6, argv[4] ));
|
9090
|
-
}
|
9091
|
-
arg6 = static_cast< double >(val6);
|
9092
|
-
{
|
9093
|
-
if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM)
|
9094
|
-
arg7 = Gosu::Color(NUM2ULONG(argv[5]));
|
9095
|
-
else
|
9096
|
-
{
|
9097
|
-
void* ptr;
|
9098
|
-
int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9099
|
-
if (!SWIG_IsOK(res))
|
9100
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9101
|
-
else if (!ptr)
|
9102
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9103
|
-
else
|
9104
|
-
arg7 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9105
|
-
}
|
9106
|
-
}
|
9107
|
-
ecode8 = SWIG_AsVal_double(argv[6], &val8);
|
9108
|
-
if (!SWIG_IsOK(ecode8)) {
|
9109
|
-
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","drawTriangle", 8, argv[6] ));
|
9110
|
-
}
|
9111
|
-
arg8 = static_cast< double >(val8);
|
9112
|
-
ecode9 = SWIG_AsVal_double(argv[7], &val9);
|
9113
|
-
if (!SWIG_IsOK(ecode9)) {
|
9114
|
-
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","drawTriangle", 9, argv[7] ));
|
9115
|
-
}
|
9116
|
-
arg9 = static_cast< double >(val9);
|
9117
|
-
{
|
9118
|
-
if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM)
|
9119
|
-
arg10 = Gosu::Color(NUM2ULONG(argv[8]));
|
9120
|
-
else
|
9121
|
-
{
|
9122
|
-
void* ptr;
|
9123
|
-
int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9124
|
-
if (!SWIG_IsOK(res))
|
9125
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9126
|
-
else if (!ptr)
|
9127
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9128
|
-
else
|
9129
|
-
arg10 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9130
|
-
}
|
9131
|
-
}
|
9132
|
-
if (argc > 9) {
|
9133
|
-
ecode11 = SWIG_AsVal_double(argv[9], &val11);
|
9134
|
-
if (!SWIG_IsOK(ecode11)) {
|
9135
|
-
SWIG_exception_fail(SWIG_ArgError(ecode11), Ruby_Format_TypeError( "", "Gosu::ZPos","drawTriangle", 11, argv[9] ));
|
9136
|
-
}
|
9137
|
-
arg11 = static_cast< Gosu::ZPos >(val11);
|
9138
|
-
}
|
9139
|
-
if (argc > 10) {
|
9140
|
-
{
|
9141
|
-
const char* cstr = Gosu::cstrFromSymbol(argv[10]);
|
9142
|
-
|
9143
|
-
if (!cstr)
|
9144
|
-
SWIG_exception_fail(SWIG_ValueError, "alpha mode must be a symbol");
|
9145
|
-
else if (!strcmp(cstr, "default"))
|
9146
|
-
arg12 = Gosu::amDefault;
|
9147
|
-
else if (!strcmp(cstr, "add"))
|
9148
|
-
arg12 = Gosu::amAdditive;
|
9149
|
-
else if (!strcmp(cstr, "additive"))
|
9150
|
-
arg12 = Gosu::amAdditive;
|
9151
|
-
else if (!strcmp(cstr, "multiply"))
|
9152
|
-
arg12 = Gosu::amMultiply;
|
9153
|
-
else
|
9154
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode");
|
9155
|
-
}
|
9156
|
-
}
|
9157
9354
|
{
|
9158
9355
|
try {
|
9159
|
-
|
9356
|
+
Gosu_Window_setMousePosition(arg1,arg2,arg3);
|
9160
9357
|
} catch (const std::exception& e) {
|
9161
9358
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9162
9359
|
}
|
@@ -9168,242 +9365,154 @@ fail:
|
|
9168
9365
|
|
9169
9366
|
|
9170
9367
|
SWIGINTERN VALUE
|
9171
|
-
|
9368
|
+
_wrap_Window_mouse_xe___(int argc, VALUE *argv, VALUE self) {
|
9172
9369
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9173
9370
|
double arg2 ;
|
9174
|
-
double arg3 ;
|
9175
|
-
Gosu::Color arg4 ;
|
9176
|
-
double arg5 ;
|
9177
|
-
double arg6 ;
|
9178
|
-
Gosu::Color arg7 ;
|
9179
|
-
double arg8 ;
|
9180
|
-
double arg9 ;
|
9181
|
-
Gosu::Color arg10 ;
|
9182
|
-
double arg11 ;
|
9183
|
-
double arg12 ;
|
9184
|
-
Gosu::Color arg13 ;
|
9185
|
-
Gosu::ZPos arg14 = (Gosu::ZPos) 0 ;
|
9186
|
-
Gosu::AlphaMode arg15 = (Gosu::AlphaMode) Gosu::amDefault ;
|
9187
9371
|
void *argp1 = 0 ;
|
9188
9372
|
int res1 = 0 ;
|
9189
9373
|
double val2 ;
|
9190
9374
|
int ecode2 = 0 ;
|
9191
|
-
double val3 ;
|
9192
|
-
int ecode3 = 0 ;
|
9193
|
-
double val5 ;
|
9194
|
-
int ecode5 = 0 ;
|
9195
|
-
double val6 ;
|
9196
|
-
int ecode6 = 0 ;
|
9197
|
-
double val8 ;
|
9198
|
-
int ecode8 = 0 ;
|
9199
|
-
double val9 ;
|
9200
|
-
int ecode9 = 0 ;
|
9201
|
-
double val11 ;
|
9202
|
-
int ecode11 = 0 ;
|
9203
|
-
double val12 ;
|
9204
|
-
int ecode12 = 0 ;
|
9205
|
-
double val14 ;
|
9206
|
-
int ecode14 = 0 ;
|
9207
9375
|
|
9208
|
-
if ((argc <
|
9209
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9376
|
+
if ((argc < 1) || (argc > 1)) {
|
9377
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9210
9378
|
}
|
9211
9379
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9212
9380
|
if (!SWIG_IsOK(res1)) {
|
9213
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","
|
9381
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setMouseX", 1, self ));
|
9214
9382
|
}
|
9215
9383
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9216
9384
|
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9217
9385
|
if (!SWIG_IsOK(ecode2)) {
|
9218
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","
|
9386
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setMouseX", 2, argv[0] ));
|
9219
9387
|
}
|
9220
9388
|
arg2 = static_cast< double >(val2);
|
9221
|
-
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
9222
|
-
if (!SWIG_IsOK(ecode3)) {
|
9223
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","drawQuad", 3, argv[1] ));
|
9224
|
-
}
|
9225
|
-
arg3 = static_cast< double >(val3);
|
9226
9389
|
{
|
9227
|
-
|
9228
|
-
|
9229
|
-
|
9230
|
-
|
9231
|
-
void* ptr;
|
9232
|
-
int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9233
|
-
if (!SWIG_IsOK(res))
|
9234
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9235
|
-
else if (!ptr)
|
9236
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9237
|
-
else
|
9238
|
-
arg4 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9390
|
+
try {
|
9391
|
+
Gosu_Window_setMouseX(arg1,arg2);
|
9392
|
+
} catch (const std::exception& e) {
|
9393
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9239
9394
|
}
|
9240
9395
|
}
|
9241
|
-
|
9242
|
-
|
9243
|
-
|
9244
|
-
|
9245
|
-
|
9246
|
-
|
9247
|
-
|
9248
|
-
|
9249
|
-
|
9250
|
-
|
9251
|
-
|
9252
|
-
|
9253
|
-
|
9254
|
-
|
9255
|
-
|
9256
|
-
|
9257
|
-
|
9258
|
-
if (!SWIG_IsOK(res))
|
9259
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9260
|
-
else if (!ptr)
|
9261
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9262
|
-
else
|
9263
|
-
arg7 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9264
|
-
}
|
9396
|
+
return Qnil;
|
9397
|
+
fail:
|
9398
|
+
return Qnil;
|
9399
|
+
}
|
9400
|
+
|
9401
|
+
|
9402
|
+
SWIGINTERN VALUE
|
9403
|
+
_wrap_Window_mouse_ye___(int argc, VALUE *argv, VALUE self) {
|
9404
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9405
|
+
double arg2 ;
|
9406
|
+
void *argp1 = 0 ;
|
9407
|
+
int res1 = 0 ;
|
9408
|
+
double val2 ;
|
9409
|
+
int ecode2 = 0 ;
|
9410
|
+
|
9411
|
+
if ((argc < 1) || (argc > 1)) {
|
9412
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9265
9413
|
}
|
9266
|
-
|
9267
|
-
if (!SWIG_IsOK(
|
9268
|
-
SWIG_exception_fail(SWIG_ArgError(
|
9269
|
-
}
|
9270
|
-
arg8 = static_cast< double >(val8);
|
9271
|
-
ecode9 = SWIG_AsVal_double(argv[7], &val9);
|
9272
|
-
if (!SWIG_IsOK(ecode9)) {
|
9273
|
-
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","drawQuad", 9, argv[7] ));
|
9274
|
-
}
|
9275
|
-
arg9 = static_cast< double >(val9);
|
9276
|
-
{
|
9277
|
-
if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM)
|
9278
|
-
arg10 = Gosu::Color(NUM2ULONG(argv[8]));
|
9279
|
-
else
|
9280
|
-
{
|
9281
|
-
void* ptr;
|
9282
|
-
int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9283
|
-
if (!SWIG_IsOK(res))
|
9284
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9285
|
-
else if (!ptr)
|
9286
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9287
|
-
else
|
9288
|
-
arg10 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9289
|
-
}
|
9414
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9415
|
+
if (!SWIG_IsOK(res1)) {
|
9416
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setMouseY", 1, self ));
|
9290
9417
|
}
|
9291
|
-
|
9292
|
-
|
9293
|
-
|
9294
|
-
|
9295
|
-
arg11 = static_cast< double >(val11);
|
9296
|
-
ecode12 = SWIG_AsVal_double(argv[10], &val12);
|
9297
|
-
if (!SWIG_IsOK(ecode12)) {
|
9298
|
-
SWIG_exception_fail(SWIG_ArgError(ecode12), Ruby_Format_TypeError( "", "double","drawQuad", 12, argv[10] ));
|
9418
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9419
|
+
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9420
|
+
if (!SWIG_IsOK(ecode2)) {
|
9421
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setMouseY", 2, argv[0] ));
|
9299
9422
|
}
|
9300
|
-
|
9423
|
+
arg2 = static_cast< double >(val2);
|
9301
9424
|
{
|
9302
|
-
|
9303
|
-
|
9304
|
-
|
9305
|
-
|
9306
|
-
void* ptr;
|
9307
|
-
int res = SWIG_ConvertPtr(argv[11], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9308
|
-
if (!SWIG_IsOK(res))
|
9309
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9310
|
-
else if (!ptr)
|
9311
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9312
|
-
else
|
9313
|
-
arg13 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9425
|
+
try {
|
9426
|
+
Gosu_Window_setMouseY(arg1,arg2);
|
9427
|
+
} catch (const std::exception& e) {
|
9428
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9314
9429
|
}
|
9315
9430
|
}
|
9316
|
-
|
9317
|
-
|
9318
|
-
|
9319
|
-
|
9320
|
-
|
9321
|
-
|
9431
|
+
return Qnil;
|
9432
|
+
fail:
|
9433
|
+
return Qnil;
|
9434
|
+
}
|
9435
|
+
|
9436
|
+
|
9437
|
+
SWIGINTERN VALUE
|
9438
|
+
_wrap_Window_width(int argc, VALUE *argv, VALUE self) {
|
9439
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9440
|
+
void *argp1 = 0 ;
|
9441
|
+
int res1 = 0 ;
|
9442
|
+
int result;
|
9443
|
+
VALUE vresult = Qnil;
|
9444
|
+
|
9445
|
+
if ((argc < 0) || (argc > 0)) {
|
9446
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9322
9447
|
}
|
9323
|
-
|
9324
|
-
|
9325
|
-
|
9326
|
-
|
9327
|
-
if (!cstr)
|
9328
|
-
SWIG_exception_fail(SWIG_ValueError, "alpha mode must be a symbol");
|
9329
|
-
else if (!strcmp(cstr, "default"))
|
9330
|
-
arg15 = Gosu::amDefault;
|
9331
|
-
else if (!strcmp(cstr, "add"))
|
9332
|
-
arg15 = Gosu::amAdditive;
|
9333
|
-
else if (!strcmp(cstr, "additive"))
|
9334
|
-
arg15 = Gosu::amAdditive;
|
9335
|
-
else if (!strcmp(cstr, "multiply"))
|
9336
|
-
arg15 = Gosu::amMultiply;
|
9337
|
-
else
|
9338
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode");
|
9339
|
-
}
|
9448
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9449
|
+
if (!SWIG_IsOK(res1)) {
|
9450
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","width", 1, self ));
|
9340
9451
|
}
|
9452
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9341
9453
|
{
|
9342
9454
|
try {
|
9343
|
-
|
9455
|
+
result = (int)Gosu_Window_width((Gosu::Window const *)arg1);
|
9344
9456
|
} catch (const std::exception& e) {
|
9345
9457
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9346
9458
|
}
|
9347
9459
|
}
|
9348
|
-
|
9460
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
9461
|
+
return vresult;
|
9349
9462
|
fail:
|
9350
9463
|
return Qnil;
|
9351
9464
|
}
|
9352
9465
|
|
9353
9466
|
|
9354
9467
|
SWIGINTERN VALUE
|
9355
|
-
|
9468
|
+
_wrap_Window_height(int argc, VALUE *argv, VALUE self) {
|
9356
9469
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9357
9470
|
void *argp1 = 0 ;
|
9358
9471
|
int res1 = 0 ;
|
9472
|
+
int result;
|
9473
|
+
VALUE vresult = Qnil;
|
9359
9474
|
|
9360
9475
|
if ((argc < 0) || (argc > 0)) {
|
9361
9476
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9362
9477
|
}
|
9363
9478
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9364
9479
|
if (!SWIG_IsOK(res1)) {
|
9365
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","
|
9480
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","height", 1, self ));
|
9366
9481
|
}
|
9367
9482
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9368
9483
|
{
|
9369
9484
|
try {
|
9370
|
-
|
9485
|
+
result = (int)Gosu_Window_height((Gosu::Window const *)arg1);
|
9371
9486
|
} catch (const std::exception& e) {
|
9372
9487
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9373
9488
|
}
|
9374
9489
|
}
|
9375
|
-
|
9490
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
9491
|
+
return vresult;
|
9376
9492
|
fail:
|
9377
9493
|
return Qnil;
|
9378
9494
|
}
|
9379
9495
|
|
9380
9496
|
|
9381
9497
|
SWIGINTERN VALUE
|
9382
|
-
|
9498
|
+
_wrap_Window_fullscreenq___(int argc, VALUE *argv, VALUE self) {
|
9383
9499
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9384
|
-
Gosu::Button arg2 ;
|
9385
9500
|
void *argp1 = 0 ;
|
9386
9501
|
int res1 = 0 ;
|
9387
9502
|
bool result;
|
9388
9503
|
VALUE vresult = Qnil;
|
9389
9504
|
|
9390
|
-
if ((argc <
|
9391
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9505
|
+
if ((argc < 0) || (argc > 0)) {
|
9506
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9392
9507
|
}
|
9393
9508
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9394
9509
|
if (!SWIG_IsOK(res1)) {
|
9395
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","
|
9510
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","fullscreen", 1, self ));
|
9396
9511
|
}
|
9397
9512
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9398
|
-
{
|
9399
|
-
if (NIL_P(argv[0]))
|
9400
|
-
arg2 = Gosu::noButton;
|
9401
|
-
else
|
9402
|
-
arg2 = Gosu::Button(NUM2LONG(argv[0]));
|
9403
|
-
}
|
9404
9513
|
{
|
9405
9514
|
try {
|
9406
|
-
result = (bool)
|
9515
|
+
result = (bool)Gosu_Window_fullscreen((Gosu::Window const *)arg1);
|
9407
9516
|
} catch (const std::exception& e) {
|
9408
9517
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9409
9518
|
}
|
@@ -9416,7 +9525,32 @@ fail:
|
|
9416
9525
|
|
9417
9526
|
|
9418
9527
|
SWIGINTERN VALUE
|
9419
|
-
|
9528
|
+
_wrap_disown_Window(int argc, VALUE *argv, VALUE self) {
|
9529
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9530
|
+
void *argp1 = 0 ;
|
9531
|
+
int res1 = 0 ;
|
9532
|
+
|
9533
|
+
if ((argc < 1) || (argc > 1)) {
|
9534
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9535
|
+
}
|
9536
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9537
|
+
if (!SWIG_IsOK(res1)) {
|
9538
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","disown_Window", 1, argv[0] ));
|
9539
|
+
}
|
9540
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9541
|
+
{
|
9542
|
+
Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
|
9543
|
+
if (director) director->swig_disown();
|
9544
|
+
}
|
9545
|
+
|
9546
|
+
return Qnil;
|
9547
|
+
fail:
|
9548
|
+
return Qnil;
|
9549
|
+
}
|
9550
|
+
|
9551
|
+
|
9552
|
+
SWIGINTERN VALUE
|
9553
|
+
_wrap_char_to_button_id(int argc, VALUE *argv, VALUE self) {
|
9420
9554
|
wchar_t arg1 ;
|
9421
9555
|
Gosu::Button result;
|
9422
9556
|
VALUE vresult = Qnil;
|
@@ -9437,7 +9571,7 @@ _wrap_Window_char_to_button_id(int argc, VALUE *argv, VALUE self) {
|
|
9437
9571
|
}
|
9438
9572
|
{
|
9439
9573
|
try {
|
9440
|
-
result =
|
9574
|
+
result = Gosu::charToButtonId(arg1);
|
9441
9575
|
} catch (const std::exception& e) {
|
9442
9576
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9443
9577
|
}
|
@@ -9455,7 +9589,7 @@ fail:
|
|
9455
9589
|
|
9456
9590
|
|
9457
9591
|
SWIGINTERN VALUE
|
9458
|
-
|
9592
|
+
_wrap_button_id_to_char(int argc, VALUE *argv, VALUE self) {
|
9459
9593
|
Gosu::Button arg1 ;
|
9460
9594
|
wchar_t result;
|
9461
9595
|
VALUE vresult = Qnil;
|
@@ -9471,7 +9605,7 @@ _wrap_Window_button_id_to_char(int argc, VALUE *argv, VALUE self) {
|
|
9471
9605
|
}
|
9472
9606
|
{
|
9473
9607
|
try {
|
9474
|
-
result = (wchar_t)
|
9608
|
+
result = (wchar_t)Gosu::buttonIdToChar(arg1);
|
9475
9609
|
} catch (const std::exception& e) {
|
9476
9610
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9477
9611
|
}
|
@@ -9492,35 +9626,28 @@ fail:
|
|
9492
9626
|
|
9493
9627
|
|
9494
9628
|
SWIGINTERN VALUE
|
9495
|
-
|
9496
|
-
Gosu::
|
9497
|
-
|
9498
|
-
int res1 = 0 ;
|
9499
|
-
Swig::Director *director = 0;
|
9500
|
-
Gosu::TextInput *result = 0 ;
|
9629
|
+
_wrap_button_downq___(int argc, VALUE *argv, VALUE self) {
|
9630
|
+
Gosu::Button arg1 ;
|
9631
|
+
bool result;
|
9501
9632
|
VALUE vresult = Qnil;
|
9502
9633
|
|
9503
|
-
if ((argc <
|
9504
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9634
|
+
if ((argc < 1) || (argc > 1)) {
|
9635
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9505
9636
|
}
|
9506
|
-
|
9507
|
-
|
9508
|
-
|
9637
|
+
{
|
9638
|
+
if (NIL_P(argv[0]))
|
9639
|
+
arg1 = Gosu::noButton;
|
9640
|
+
else
|
9641
|
+
arg1 = Gosu::Button(NUM2LONG(argv[0]));
|
9509
9642
|
}
|
9510
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9511
9643
|
{
|
9512
9644
|
try {
|
9513
|
-
result = (Gosu::
|
9645
|
+
result = (bool)Gosu::isButtonDown(arg1);
|
9514
9646
|
} catch (const std::exception& e) {
|
9515
9647
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9516
9648
|
}
|
9517
9649
|
}
|
9518
|
-
|
9519
|
-
if (director) {
|
9520
|
-
vresult = director->swig_get_self();
|
9521
|
-
} else {
|
9522
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__TextInput, 0 | 0 );
|
9523
|
-
}
|
9650
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
9524
9651
|
return vresult;
|
9525
9652
|
fail:
|
9526
9653
|
return Qnil;
|
@@ -9528,168 +9655,421 @@ fail:
|
|
9528
9655
|
|
9529
9656
|
|
9530
9657
|
SWIGINTERN VALUE
|
9531
|
-
|
9532
|
-
|
9533
|
-
|
9534
|
-
|
9535
|
-
|
9536
|
-
|
9537
|
-
|
9658
|
+
_wrap_draw_line(int argc, VALUE *argv, VALUE self) {
|
9659
|
+
double arg1 ;
|
9660
|
+
double arg2 ;
|
9661
|
+
Gosu::Color arg3 ;
|
9662
|
+
double arg4 ;
|
9663
|
+
double arg5 ;
|
9664
|
+
Gosu::Color arg6 ;
|
9665
|
+
Gosu::ZPos arg7 = (Gosu::ZPos) 0 ;
|
9666
|
+
Gosu::AlphaMode arg8 = (Gosu::AlphaMode) Gosu::amDefault ;
|
9667
|
+
double val1 ;
|
9668
|
+
int ecode1 = 0 ;
|
9669
|
+
double val2 ;
|
9670
|
+
int ecode2 = 0 ;
|
9671
|
+
double val4 ;
|
9672
|
+
int ecode4 = 0 ;
|
9673
|
+
double val5 ;
|
9674
|
+
int ecode5 = 0 ;
|
9675
|
+
double val7 ;
|
9676
|
+
int ecode7 = 0 ;
|
9538
9677
|
|
9539
|
-
if ((argc <
|
9540
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9541
|
-
}
|
9542
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9543
|
-
if (!SWIG_IsOK(res1)) {
|
9544
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setTextInput", 1, self ));
|
9545
|
-
}
|
9546
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9547
|
-
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Gosu__TextInput, 0 | 0 );
|
9548
|
-
if (!SWIG_IsOK(res2)) {
|
9549
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Gosu::TextInput *","setTextInput", 2, argv[0] ));
|
9678
|
+
if ((argc < 6) || (argc > 8)) {
|
9679
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
|
9550
9680
|
}
|
9551
|
-
|
9552
|
-
{
|
9553
|
-
|
9554
|
-
|
9555
|
-
|
9556
|
-
|
9681
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
9682
|
+
if (!SWIG_IsOK(ecode1)) {
|
9683
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::drawLine", 1, argv[0] ));
|
9684
|
+
}
|
9685
|
+
arg1 = static_cast< double >(val1);
|
9686
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
9687
|
+
if (!SWIG_IsOK(ecode2)) {
|
9688
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::drawLine", 2, argv[1] ));
|
9689
|
+
}
|
9690
|
+
arg2 = static_cast< double >(val2);
|
9691
|
+
{
|
9692
|
+
if (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM)
|
9693
|
+
arg3 = Gosu::Color(NUM2ULONG(argv[2]));
|
9694
|
+
else
|
9695
|
+
{
|
9696
|
+
void* ptr;
|
9697
|
+
int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9698
|
+
if (!SWIG_IsOK(res))
|
9699
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9700
|
+
else if (!ptr)
|
9701
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9702
|
+
else
|
9703
|
+
arg3 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9557
9704
|
}
|
9558
9705
|
}
|
9559
|
-
|
9560
|
-
|
9561
|
-
|
9562
|
-
}
|
9563
|
-
|
9564
|
-
|
9565
|
-
|
9566
|
-
|
9567
|
-
|
9568
|
-
|
9569
|
-
|
9570
|
-
|
9571
|
-
|
9572
|
-
|
9573
|
-
|
9574
|
-
|
9706
|
+
ecode4 = SWIG_AsVal_double(argv[3], &val4);
|
9707
|
+
if (!SWIG_IsOK(ecode4)) {
|
9708
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::drawLine", 4, argv[3] ));
|
9709
|
+
}
|
9710
|
+
arg4 = static_cast< double >(val4);
|
9711
|
+
ecode5 = SWIG_AsVal_double(argv[4], &val5);
|
9712
|
+
if (!SWIG_IsOK(ecode5)) {
|
9713
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Gosu::drawLine", 5, argv[4] ));
|
9714
|
+
}
|
9715
|
+
arg5 = static_cast< double >(val5);
|
9716
|
+
{
|
9717
|
+
if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM)
|
9718
|
+
arg6 = Gosu::Color(NUM2ULONG(argv[5]));
|
9719
|
+
else
|
9720
|
+
{
|
9721
|
+
void* ptr;
|
9722
|
+
int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9723
|
+
if (!SWIG_IsOK(res))
|
9724
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9725
|
+
else if (!ptr)
|
9726
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9727
|
+
else
|
9728
|
+
arg6 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9729
|
+
}
|
9575
9730
|
}
|
9576
|
-
|
9577
|
-
|
9578
|
-
|
9731
|
+
if (argc > 6) {
|
9732
|
+
ecode7 = SWIG_AsVal_double(argv[6], &val7);
|
9733
|
+
if (!SWIG_IsOK(ecode7)) {
|
9734
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::drawLine", 7, argv[6] ));
|
9735
|
+
}
|
9736
|
+
arg7 = static_cast< Gosu::ZPos >(val7);
|
9737
|
+
}
|
9738
|
+
if (argc > 7) {
|
9739
|
+
{
|
9740
|
+
const char* cstr = Gosu::cstrFromSymbol(argv[7]);
|
9741
|
+
|
9742
|
+
if (!strcmp(cstr, "default"))
|
9743
|
+
arg8 = Gosu::amDefault;
|
9744
|
+
else if (!strcmp(cstr, "add"))
|
9745
|
+
arg8 = Gosu::amAdditive;
|
9746
|
+
else if (!strcmp(cstr, "additive"))
|
9747
|
+
arg8 = Gosu::amAdditive;
|
9748
|
+
else if (!strcmp(cstr, "multiply"))
|
9749
|
+
arg8 = Gosu::amMultiply;
|
9750
|
+
else
|
9751
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode");
|
9752
|
+
}
|
9579
9753
|
}
|
9580
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9581
9754
|
{
|
9582
9755
|
try {
|
9583
|
-
|
9756
|
+
Gosu::drawLine(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
|
9584
9757
|
} catch (const std::exception& e) {
|
9585
9758
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9586
9759
|
}
|
9587
9760
|
}
|
9588
|
-
|
9589
|
-
return vresult;
|
9761
|
+
return Qnil;
|
9590
9762
|
fail:
|
9591
9763
|
return Qnil;
|
9592
9764
|
}
|
9593
9765
|
|
9594
9766
|
|
9595
9767
|
SWIGINTERN VALUE
|
9596
|
-
|
9597
|
-
|
9598
|
-
|
9599
|
-
|
9600
|
-
double
|
9601
|
-
|
9768
|
+
_wrap_draw_triangle(int argc, VALUE *argv, VALUE self) {
|
9769
|
+
double arg1 ;
|
9770
|
+
double arg2 ;
|
9771
|
+
Gosu::Color arg3 ;
|
9772
|
+
double arg4 ;
|
9773
|
+
double arg5 ;
|
9774
|
+
Gosu::Color arg6 ;
|
9775
|
+
double arg7 ;
|
9776
|
+
double arg8 ;
|
9777
|
+
Gosu::Color arg9 ;
|
9778
|
+
Gosu::ZPos arg10 = (Gosu::ZPos) 0 ;
|
9779
|
+
Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::amDefault ;
|
9780
|
+
double val1 ;
|
9781
|
+
int ecode1 = 0 ;
|
9782
|
+
double val2 ;
|
9783
|
+
int ecode2 = 0 ;
|
9784
|
+
double val4 ;
|
9785
|
+
int ecode4 = 0 ;
|
9786
|
+
double val5 ;
|
9787
|
+
int ecode5 = 0 ;
|
9788
|
+
double val7 ;
|
9789
|
+
int ecode7 = 0 ;
|
9790
|
+
double val8 ;
|
9791
|
+
int ecode8 = 0 ;
|
9792
|
+
double val10 ;
|
9793
|
+
int ecode10 = 0 ;
|
9602
9794
|
|
9603
|
-
if ((argc <
|
9604
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9795
|
+
if ((argc < 9) || (argc > 11)) {
|
9796
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 9)",argc); SWIG_fail;
|
9605
9797
|
}
|
9606
|
-
|
9607
|
-
if (!SWIG_IsOK(
|
9608
|
-
SWIG_exception_fail(SWIG_ArgError(
|
9798
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
9799
|
+
if (!SWIG_IsOK(ecode1)) {
|
9800
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 1, argv[0] ));
|
9801
|
+
}
|
9802
|
+
arg1 = static_cast< double >(val1);
|
9803
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
9804
|
+
if (!SWIG_IsOK(ecode2)) {
|
9805
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 2, argv[1] ));
|
9806
|
+
}
|
9807
|
+
arg2 = static_cast< double >(val2);
|
9808
|
+
{
|
9809
|
+
if (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM)
|
9810
|
+
arg3 = Gosu::Color(NUM2ULONG(argv[2]));
|
9811
|
+
else
|
9812
|
+
{
|
9813
|
+
void* ptr;
|
9814
|
+
int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9815
|
+
if (!SWIG_IsOK(res))
|
9816
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9817
|
+
else if (!ptr)
|
9818
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9819
|
+
else
|
9820
|
+
arg3 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9821
|
+
}
|
9822
|
+
}
|
9823
|
+
ecode4 = SWIG_AsVal_double(argv[3], &val4);
|
9824
|
+
if (!SWIG_IsOK(ecode4)) {
|
9825
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 4, argv[3] ));
|
9826
|
+
}
|
9827
|
+
arg4 = static_cast< double >(val4);
|
9828
|
+
ecode5 = SWIG_AsVal_double(argv[4], &val5);
|
9829
|
+
if (!SWIG_IsOK(ecode5)) {
|
9830
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 5, argv[4] ));
|
9831
|
+
}
|
9832
|
+
arg5 = static_cast< double >(val5);
|
9833
|
+
{
|
9834
|
+
if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM)
|
9835
|
+
arg6 = Gosu::Color(NUM2ULONG(argv[5]));
|
9836
|
+
else
|
9837
|
+
{
|
9838
|
+
void* ptr;
|
9839
|
+
int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9840
|
+
if (!SWIG_IsOK(res))
|
9841
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9842
|
+
else if (!ptr)
|
9843
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9844
|
+
else
|
9845
|
+
arg6 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9846
|
+
}
|
9847
|
+
}
|
9848
|
+
ecode7 = SWIG_AsVal_double(argv[6], &val7);
|
9849
|
+
if (!SWIG_IsOK(ecode7)) {
|
9850
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 7, argv[6] ));
|
9851
|
+
}
|
9852
|
+
arg7 = static_cast< double >(val7);
|
9853
|
+
ecode8 = SWIG_AsVal_double(argv[7], &val8);
|
9854
|
+
if (!SWIG_IsOK(ecode8)) {
|
9855
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 8, argv[7] ));
|
9856
|
+
}
|
9857
|
+
arg8 = static_cast< double >(val8);
|
9858
|
+
{
|
9859
|
+
if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM)
|
9860
|
+
arg9 = Gosu::Color(NUM2ULONG(argv[8]));
|
9861
|
+
else
|
9862
|
+
{
|
9863
|
+
void* ptr;
|
9864
|
+
int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9865
|
+
if (!SWIG_IsOK(res))
|
9866
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9867
|
+
else if (!ptr)
|
9868
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9869
|
+
else
|
9870
|
+
arg9 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9871
|
+
}
|
9872
|
+
}
|
9873
|
+
if (argc > 9) {
|
9874
|
+
ecode10 = SWIG_AsVal_double(argv[9], &val10);
|
9875
|
+
if (!SWIG_IsOK(ecode10)) {
|
9876
|
+
SWIG_exception_fail(SWIG_ArgError(ecode10), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::drawTriangle", 10, argv[9] ));
|
9877
|
+
}
|
9878
|
+
arg10 = static_cast< Gosu::ZPos >(val10);
|
9879
|
+
}
|
9880
|
+
if (argc > 10) {
|
9881
|
+
{
|
9882
|
+
const char* cstr = Gosu::cstrFromSymbol(argv[10]);
|
9883
|
+
|
9884
|
+
if (!strcmp(cstr, "default"))
|
9885
|
+
arg11 = Gosu::amDefault;
|
9886
|
+
else if (!strcmp(cstr, "add"))
|
9887
|
+
arg11 = Gosu::amAdditive;
|
9888
|
+
else if (!strcmp(cstr, "additive"))
|
9889
|
+
arg11 = Gosu::amAdditive;
|
9890
|
+
else if (!strcmp(cstr, "multiply"))
|
9891
|
+
arg11 = Gosu::amMultiply;
|
9892
|
+
else
|
9893
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode");
|
9894
|
+
}
|
9609
9895
|
}
|
9610
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9611
9896
|
{
|
9612
9897
|
try {
|
9613
|
-
|
9898
|
+
Gosu::drawTriangle(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
|
9614
9899
|
} catch (const std::exception& e) {
|
9615
9900
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9616
9901
|
}
|
9617
9902
|
}
|
9618
|
-
|
9619
|
-
return vresult;
|
9903
|
+
return Qnil;
|
9620
9904
|
fail:
|
9621
9905
|
return Qnil;
|
9622
9906
|
}
|
9623
9907
|
|
9624
9908
|
|
9625
9909
|
SWIGINTERN VALUE
|
9626
|
-
|
9627
|
-
|
9910
|
+
_wrap_draw_quad(int argc, VALUE *argv, VALUE self) {
|
9911
|
+
double arg1 ;
|
9628
9912
|
double arg2 ;
|
9629
|
-
|
9630
|
-
|
9631
|
-
|
9913
|
+
Gosu::Color arg3 ;
|
9914
|
+
double arg4 ;
|
9915
|
+
double arg5 ;
|
9916
|
+
Gosu::Color arg6 ;
|
9917
|
+
double arg7 ;
|
9918
|
+
double arg8 ;
|
9919
|
+
Gosu::Color arg9 ;
|
9920
|
+
double arg10 ;
|
9921
|
+
double arg11 ;
|
9922
|
+
Gosu::Color arg12 ;
|
9923
|
+
Gosu::ZPos arg13 = (Gosu::ZPos) 0 ;
|
9924
|
+
Gosu::AlphaMode arg14 = (Gosu::AlphaMode) Gosu::amDefault ;
|
9925
|
+
double val1 ;
|
9926
|
+
int ecode1 = 0 ;
|
9632
9927
|
double val2 ;
|
9633
9928
|
int ecode2 = 0 ;
|
9634
|
-
double
|
9635
|
-
int
|
9929
|
+
double val4 ;
|
9930
|
+
int ecode4 = 0 ;
|
9931
|
+
double val5 ;
|
9932
|
+
int ecode5 = 0 ;
|
9933
|
+
double val7 ;
|
9934
|
+
int ecode7 = 0 ;
|
9935
|
+
double val8 ;
|
9936
|
+
int ecode8 = 0 ;
|
9937
|
+
double val10 ;
|
9938
|
+
int ecode10 = 0 ;
|
9939
|
+
double val11 ;
|
9940
|
+
int ecode11 = 0 ;
|
9941
|
+
double val13 ;
|
9942
|
+
int ecode13 = 0 ;
|
9636
9943
|
|
9637
|
-
if ((argc <
|
9638
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9639
|
-
}
|
9640
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9641
|
-
if (!SWIG_IsOK(res1)) {
|
9642
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setMousePosition", 1, self ));
|
9944
|
+
if ((argc < 12) || (argc > 14)) {
|
9945
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 12)",argc); SWIG_fail;
|
9643
9946
|
}
|
9644
|
-
|
9645
|
-
|
9947
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
9948
|
+
if (!SWIG_IsOK(ecode1)) {
|
9949
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 1, argv[0] ));
|
9950
|
+
}
|
9951
|
+
arg1 = static_cast< double >(val1);
|
9952
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
9646
9953
|
if (!SWIG_IsOK(ecode2)) {
|
9647
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","
|
9954
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 2, argv[1] ));
|
9955
|
+
}
|
9956
|
+
arg2 = static_cast< double >(val2);
|
9957
|
+
{
|
9958
|
+
if (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM)
|
9959
|
+
arg3 = Gosu::Color(NUM2ULONG(argv[2]));
|
9960
|
+
else
|
9961
|
+
{
|
9962
|
+
void* ptr;
|
9963
|
+
int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9964
|
+
if (!SWIG_IsOK(res))
|
9965
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9966
|
+
else if (!ptr)
|
9967
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9968
|
+
else
|
9969
|
+
arg3 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9970
|
+
}
|
9971
|
+
}
|
9972
|
+
ecode4 = SWIG_AsVal_double(argv[3], &val4);
|
9973
|
+
if (!SWIG_IsOK(ecode4)) {
|
9974
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 4, argv[3] ));
|
9975
|
+
}
|
9976
|
+
arg4 = static_cast< double >(val4);
|
9977
|
+
ecode5 = SWIG_AsVal_double(argv[4], &val5);
|
9978
|
+
if (!SWIG_IsOK(ecode5)) {
|
9979
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 5, argv[4] ));
|
9980
|
+
}
|
9981
|
+
arg5 = static_cast< double >(val5);
|
9982
|
+
{
|
9983
|
+
if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM)
|
9984
|
+
arg6 = Gosu::Color(NUM2ULONG(argv[5]));
|
9985
|
+
else
|
9986
|
+
{
|
9987
|
+
void* ptr;
|
9988
|
+
int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
9989
|
+
if (!SWIG_IsOK(res))
|
9990
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
9991
|
+
else if (!ptr)
|
9992
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
9993
|
+
else
|
9994
|
+
arg6 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9995
|
+
}
|
9996
|
+
}
|
9997
|
+
ecode7 = SWIG_AsVal_double(argv[6], &val7);
|
9998
|
+
if (!SWIG_IsOK(ecode7)) {
|
9999
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 7, argv[6] ));
|
10000
|
+
}
|
10001
|
+
arg7 = static_cast< double >(val7);
|
10002
|
+
ecode8 = SWIG_AsVal_double(argv[7], &val8);
|
10003
|
+
if (!SWIG_IsOK(ecode8)) {
|
10004
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 8, argv[7] ));
|
10005
|
+
}
|
10006
|
+
arg8 = static_cast< double >(val8);
|
10007
|
+
{
|
10008
|
+
if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM)
|
10009
|
+
arg9 = Gosu::Color(NUM2ULONG(argv[8]));
|
10010
|
+
else
|
10011
|
+
{
|
10012
|
+
void* ptr;
|
10013
|
+
int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
10014
|
+
if (!SWIG_IsOK(res))
|
10015
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
10016
|
+
else if (!ptr)
|
10017
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
10018
|
+
else
|
10019
|
+
arg9 = *reinterpret_cast<Gosu::Color*>(ptr);
|
10020
|
+
}
|
10021
|
+
}
|
10022
|
+
ecode10 = SWIG_AsVal_double(argv[9], &val10);
|
10023
|
+
if (!SWIG_IsOK(ecode10)) {
|
10024
|
+
SWIG_exception_fail(SWIG_ArgError(ecode10), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 10, argv[9] ));
|
9648
10025
|
}
|
9649
|
-
|
9650
|
-
|
9651
|
-
if (!SWIG_IsOK(
|
9652
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10026
|
+
arg10 = static_cast< double >(val10);
|
10027
|
+
ecode11 = SWIG_AsVal_double(argv[10], &val11);
|
10028
|
+
if (!SWIG_IsOK(ecode11)) {
|
10029
|
+
SWIG_exception_fail(SWIG_ArgError(ecode11), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 11, argv[10] ));
|
9653
10030
|
}
|
9654
|
-
|
10031
|
+
arg11 = static_cast< double >(val11);
|
9655
10032
|
{
|
9656
|
-
|
9657
|
-
|
9658
|
-
|
9659
|
-
|
10033
|
+
if (TYPE(argv[11]) == T_FIXNUM || TYPE(argv[11]) == T_BIGNUM)
|
10034
|
+
arg12 = Gosu::Color(NUM2ULONG(argv[11]));
|
10035
|
+
else
|
10036
|
+
{
|
10037
|
+
void* ptr;
|
10038
|
+
int res = SWIG_ConvertPtr(argv[11], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
10039
|
+
if (!SWIG_IsOK(res))
|
10040
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
10041
|
+
else if (!ptr)
|
10042
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
10043
|
+
else
|
10044
|
+
arg12 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9660
10045
|
}
|
9661
10046
|
}
|
9662
|
-
|
9663
|
-
|
9664
|
-
|
9665
|
-
|
9666
|
-
|
9667
|
-
|
9668
|
-
SWIGINTERN VALUE
|
9669
|
-
_wrap_Window_mouse_xe___(int argc, VALUE *argv, VALUE self) {
|
9670
|
-
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9671
|
-
double arg2 ;
|
9672
|
-
void *argp1 = 0 ;
|
9673
|
-
int res1 = 0 ;
|
9674
|
-
double val2 ;
|
9675
|
-
int ecode2 = 0 ;
|
9676
|
-
|
9677
|
-
if ((argc < 1) || (argc > 1)) {
|
9678
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10047
|
+
if (argc > 12) {
|
10048
|
+
ecode13 = SWIG_AsVal_double(argv[12], &val13);
|
10049
|
+
if (!SWIG_IsOK(ecode13)) {
|
10050
|
+
SWIG_exception_fail(SWIG_ArgError(ecode13), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::drawQuad", 13, argv[12] ));
|
10051
|
+
}
|
10052
|
+
arg13 = static_cast< Gosu::ZPos >(val13);
|
9679
10053
|
}
|
9680
|
-
|
9681
|
-
|
9682
|
-
|
10054
|
+
if (argc > 13) {
|
10055
|
+
{
|
10056
|
+
const char* cstr = Gosu::cstrFromSymbol(argv[13]);
|
10057
|
+
|
10058
|
+
if (!strcmp(cstr, "default"))
|
10059
|
+
arg14 = Gosu::amDefault;
|
10060
|
+
else if (!strcmp(cstr, "add"))
|
10061
|
+
arg14 = Gosu::amAdditive;
|
10062
|
+
else if (!strcmp(cstr, "additive"))
|
10063
|
+
arg14 = Gosu::amAdditive;
|
10064
|
+
else if (!strcmp(cstr, "multiply"))
|
10065
|
+
arg14 = Gosu::amMultiply;
|
10066
|
+
else
|
10067
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode");
|
10068
|
+
}
|
9683
10069
|
}
|
9684
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9685
|
-
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9686
|
-
if (!SWIG_IsOK(ecode2)) {
|
9687
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setMouseX", 2, argv[0] ));
|
9688
|
-
}
|
9689
|
-
arg2 = static_cast< double >(val2);
|
9690
10070
|
{
|
9691
10071
|
try {
|
9692
|
-
|
10072
|
+
Gosu::drawQuad(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
|
9693
10073
|
} catch (const std::exception& e) {
|
9694
10074
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9695
10075
|
}
|
@@ -9701,147 +10081,125 @@ fail:
|
|
9701
10081
|
|
9702
10082
|
|
9703
10083
|
SWIGINTERN VALUE
|
9704
|
-
|
9705
|
-
|
10084
|
+
_wrap_draw_rect(int argc, VALUE *argv, VALUE self) {
|
10085
|
+
double arg1 ;
|
9706
10086
|
double arg2 ;
|
9707
|
-
|
9708
|
-
|
10087
|
+
double arg3 ;
|
10088
|
+
double arg4 ;
|
10089
|
+
Gosu::Color arg5 ;
|
10090
|
+
Gosu::ZPos arg6 = (Gosu::ZPos) 0 ;
|
10091
|
+
Gosu::AlphaMode arg7 = (Gosu::AlphaMode) Gosu::amDefault ;
|
10092
|
+
double val1 ;
|
10093
|
+
int ecode1 = 0 ;
|
9709
10094
|
double val2 ;
|
9710
10095
|
int ecode2 = 0 ;
|
10096
|
+
double val3 ;
|
10097
|
+
int ecode3 = 0 ;
|
10098
|
+
double val4 ;
|
10099
|
+
int ecode4 = 0 ;
|
10100
|
+
double val6 ;
|
10101
|
+
int ecode6 = 0 ;
|
9711
10102
|
|
9712
|
-
if ((argc <
|
9713
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9714
|
-
}
|
9715
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9716
|
-
if (!SWIG_IsOK(res1)) {
|
9717
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setMouseY", 1, self ));
|
10103
|
+
if ((argc < 5) || (argc > 7)) {
|
10104
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
|
9718
10105
|
}
|
9719
|
-
|
9720
|
-
|
10106
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
10107
|
+
if (!SWIG_IsOK(ecode1)) {
|
10108
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::drawRect", 1, argv[0] ));
|
10109
|
+
}
|
10110
|
+
arg1 = static_cast< double >(val1);
|
10111
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
9721
10112
|
if (!SWIG_IsOK(ecode2)) {
|
9722
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","
|
10113
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::drawRect", 2, argv[1] ));
|
9723
10114
|
}
|
9724
10115
|
arg2 = static_cast< double >(val2);
|
10116
|
+
ecode3 = SWIG_AsVal_double(argv[2], &val3);
|
10117
|
+
if (!SWIG_IsOK(ecode3)) {
|
10118
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::drawRect", 3, argv[2] ));
|
10119
|
+
}
|
10120
|
+
arg3 = static_cast< double >(val3);
|
10121
|
+
ecode4 = SWIG_AsVal_double(argv[3], &val4);
|
10122
|
+
if (!SWIG_IsOK(ecode4)) {
|
10123
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::drawRect", 4, argv[3] ));
|
10124
|
+
}
|
10125
|
+
arg4 = static_cast< double >(val4);
|
9725
10126
|
{
|
9726
|
-
|
9727
|
-
|
9728
|
-
|
9729
|
-
|
10127
|
+
if (TYPE(argv[4]) == T_FIXNUM || TYPE(argv[4]) == T_BIGNUM)
|
10128
|
+
arg5 = Gosu::Color(NUM2ULONG(argv[4]));
|
10129
|
+
else
|
10130
|
+
{
|
10131
|
+
void* ptr;
|
10132
|
+
int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
10133
|
+
if (!SWIG_IsOK(res))
|
10134
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
10135
|
+
else if (!ptr)
|
10136
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
10137
|
+
else
|
10138
|
+
arg5 = *reinterpret_cast<Gosu::Color*>(ptr);
|
9730
10139
|
}
|
9731
10140
|
}
|
9732
|
-
|
9733
|
-
|
9734
|
-
|
9735
|
-
|
9736
|
-
|
9737
|
-
|
9738
|
-
SWIGINTERN VALUE
|
9739
|
-
_wrap_Window_width(int argc, VALUE *argv, VALUE self) {
|
9740
|
-
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9741
|
-
void *argp1 = 0 ;
|
9742
|
-
int res1 = 0 ;
|
9743
|
-
int result;
|
9744
|
-
VALUE vresult = Qnil;
|
9745
|
-
|
9746
|
-
if ((argc < 0) || (argc > 0)) {
|
9747
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9748
|
-
}
|
9749
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9750
|
-
if (!SWIG_IsOK(res1)) {
|
9751
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","width", 1, self ));
|
10141
|
+
if (argc > 5) {
|
10142
|
+
ecode6 = SWIG_AsVal_double(argv[5], &val6);
|
10143
|
+
if (!SWIG_IsOK(ecode6)) {
|
10144
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::drawRect", 6, argv[5] ));
|
10145
|
+
}
|
10146
|
+
arg6 = static_cast< Gosu::ZPos >(val6);
|
9752
10147
|
}
|
9753
|
-
|
9754
|
-
|
9755
|
-
|
9756
|
-
|
9757
|
-
|
9758
|
-
|
10148
|
+
if (argc > 6) {
|
10149
|
+
{
|
10150
|
+
const char* cstr = Gosu::cstrFromSymbol(argv[6]);
|
10151
|
+
|
10152
|
+
if (!strcmp(cstr, "default"))
|
10153
|
+
arg7 = Gosu::amDefault;
|
10154
|
+
else if (!strcmp(cstr, "add"))
|
10155
|
+
arg7 = Gosu::amAdditive;
|
10156
|
+
else if (!strcmp(cstr, "additive"))
|
10157
|
+
arg7 = Gosu::amAdditive;
|
10158
|
+
else if (!strcmp(cstr, "multiply"))
|
10159
|
+
arg7 = Gosu::amMultiply;
|
10160
|
+
else
|
10161
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode");
|
9759
10162
|
}
|
9760
10163
|
}
|
9761
|
-
vresult = SWIG_From_int(static_cast< int >(result));
|
9762
|
-
return vresult;
|
9763
|
-
fail:
|
9764
|
-
return Qnil;
|
9765
|
-
}
|
9766
|
-
|
9767
|
-
|
9768
|
-
SWIGINTERN VALUE
|
9769
|
-
_wrap_Window_height(int argc, VALUE *argv, VALUE self) {
|
9770
|
-
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9771
|
-
void *argp1 = 0 ;
|
9772
|
-
int res1 = 0 ;
|
9773
|
-
int result;
|
9774
|
-
VALUE vresult = Qnil;
|
9775
|
-
|
9776
|
-
if ((argc < 0) || (argc > 0)) {
|
9777
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9778
|
-
}
|
9779
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9780
|
-
if (!SWIG_IsOK(res1)) {
|
9781
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","height", 1, self ));
|
9782
|
-
}
|
9783
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9784
10164
|
{
|
9785
10165
|
try {
|
9786
|
-
|
10166
|
+
Gosu::drawRect(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
|
9787
10167
|
} catch (const std::exception& e) {
|
9788
10168
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9789
10169
|
}
|
9790
10170
|
}
|
9791
|
-
|
9792
|
-
return vresult;
|
10171
|
+
return Qnil;
|
9793
10172
|
fail:
|
9794
10173
|
return Qnil;
|
9795
10174
|
}
|
9796
10175
|
|
9797
10176
|
|
9798
10177
|
SWIGINTERN VALUE
|
9799
|
-
|
9800
|
-
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9801
|
-
void *argp1 = 0 ;
|
9802
|
-
int res1 = 0 ;
|
9803
|
-
bool result;
|
9804
|
-
VALUE vresult = Qnil;
|
9805
|
-
|
10178
|
+
_wrap_flush(int argc, VALUE *argv, VALUE self) {
|
9806
10179
|
if ((argc < 0) || (argc > 0)) {
|
9807
10180
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9808
10181
|
}
|
9809
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9810
|
-
if (!SWIG_IsOK(res1)) {
|
9811
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","fullscreen", 1, self ));
|
9812
|
-
}
|
9813
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9814
10182
|
{
|
9815
10183
|
try {
|
9816
|
-
|
10184
|
+
Gosu::flush();
|
9817
10185
|
} catch (const std::exception& e) {
|
9818
10186
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9819
10187
|
}
|
9820
10188
|
}
|
9821
|
-
|
9822
|
-
return vresult;
|
10189
|
+
return Qnil;
|
9823
10190
|
fail:
|
9824
10191
|
return Qnil;
|
9825
10192
|
}
|
9826
10193
|
|
9827
10194
|
|
9828
10195
|
SWIGINTERN VALUE
|
9829
|
-
|
9830
|
-
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9831
|
-
void *argp1 = 0 ;
|
9832
|
-
int res1 = 0 ;
|
9833
|
-
|
10196
|
+
_wrap_unsafe_gl__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
9834
10197
|
if ((argc < 0) || (argc > 0)) {
|
9835
10198
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9836
10199
|
}
|
9837
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9838
|
-
if (!SWIG_IsOK(res1)) {
|
9839
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","unsafe_gl", 1, self ));
|
9840
|
-
}
|
9841
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9842
10200
|
{
|
9843
10201
|
try {
|
9844
|
-
|
10202
|
+
Gosu::unsafe_gl();
|
9845
10203
|
} catch (const std::exception& e) {
|
9846
10204
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9847
10205
|
}
|
@@ -9853,30 +10211,22 @@ fail:
|
|
9853
10211
|
|
9854
10212
|
|
9855
10213
|
SWIGINTERN VALUE
|
9856
|
-
|
9857
|
-
Gosu::
|
9858
|
-
|
9859
|
-
|
9860
|
-
int res1 = 0 ;
|
9861
|
-
double val2 ;
|
9862
|
-
int ecode2 = 0 ;
|
10214
|
+
_wrap_unsafe_gl__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
10215
|
+
Gosu::ZPos arg1 ;
|
10216
|
+
double val1 ;
|
10217
|
+
int ecode1 = 0 ;
|
9863
10218
|
|
9864
10219
|
if ((argc < 1) || (argc > 1)) {
|
9865
10220
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9866
10221
|
}
|
9867
|
-
|
9868
|
-
if (!SWIG_IsOK(
|
9869
|
-
SWIG_exception_fail(SWIG_ArgError(
|
9870
|
-
}
|
9871
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9872
|
-
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9873
|
-
if (!SWIG_IsOK(ecode2)) {
|
9874
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Gosu::ZPos","unsafe_gl", 2, argv[0] ));
|
10222
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
10223
|
+
if (!SWIG_IsOK(ecode1)) {
|
10224
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::unsafe_gl", 1, argv[0] ));
|
9875
10225
|
}
|
9876
|
-
|
10226
|
+
arg1 = static_cast< Gosu::ZPos >(val1);
|
9877
10227
|
{
|
9878
10228
|
try {
|
9879
|
-
|
10229
|
+
Gosu::unsafe_gl(arg1);
|
9880
10230
|
} catch (const std::exception& e) {
|
9881
10231
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9882
10232
|
}
|
@@ -9887,44 +10237,32 @@ fail:
|
|
9887
10237
|
}
|
9888
10238
|
|
9889
10239
|
|
9890
|
-
SWIGINTERN VALUE
|
10240
|
+
SWIGINTERN VALUE _wrap_unsafe_gl(int nargs, VALUE *args, VALUE self) {
|
9891
10241
|
int argc;
|
9892
|
-
VALUE argv[
|
10242
|
+
VALUE argv[1];
|
9893
10243
|
int ii;
|
9894
10244
|
|
9895
|
-
argc = nargs
|
9896
|
-
|
9897
|
-
|
9898
|
-
|
9899
|
-
|
10245
|
+
argc = nargs;
|
10246
|
+
if (argc > 1) SWIG_fail;
|
10247
|
+
for (ii = 0; (ii < argc); ++ii) {
|
10248
|
+
argv[ii] = args[ii];
|
10249
|
+
}
|
10250
|
+
if (argc == 0) {
|
10251
|
+
return _wrap_unsafe_gl__SWIG_0(nargs, args, self);
|
9900
10252
|
}
|
9901
10253
|
if (argc == 1) {
|
9902
10254
|
int _v;
|
9903
|
-
|
9904
|
-
|
9905
|
-
|
9906
|
-
if (_v) {
|
9907
|
-
return _wrap_Window_unsafe_gl__SWIG_0(nargs, args, self);
|
10255
|
+
{
|
10256
|
+
int res = SWIG_AsVal_double(argv[0], NULL);
|
10257
|
+
_v = SWIG_CheckState(res);
|
9908
10258
|
}
|
9909
|
-
}
|
9910
|
-
if (argc == 2) {
|
9911
|
-
int _v;
|
9912
|
-
void *vptr = 0;
|
9913
|
-
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0);
|
9914
|
-
_v = SWIG_CheckState(res);
|
9915
10259
|
if (_v) {
|
9916
|
-
|
9917
|
-
int res = SWIG_AsVal_double(argv[1], NULL);
|
9918
|
-
_v = SWIG_CheckState(res);
|
9919
|
-
}
|
9920
|
-
if (_v) {
|
9921
|
-
return _wrap_Window_unsafe_gl__SWIG_1(nargs, args, self);
|
9922
|
-
}
|
10260
|
+
return _wrap_unsafe_gl__SWIG_1(nargs, args, self);
|
9923
10261
|
}
|
9924
10262
|
}
|
9925
10263
|
|
9926
10264
|
fail:
|
9927
|
-
Ruby_Format_OverloadedError( argc,
|
10265
|
+
Ruby_Format_OverloadedError( argc, 1, "unsafe_gl",
|
9928
10266
|
" void unsafe_gl()\n"
|
9929
10267
|
" void unsafe_gl(Gosu::ZPos z)\n");
|
9930
10268
|
|
@@ -9933,54 +10271,46 @@ fail:
|
|
9933
10271
|
|
9934
10272
|
|
9935
10273
|
SWIGINTERN VALUE
|
9936
|
-
|
9937
|
-
|
10274
|
+
_wrap_clip_to(int argc, VALUE *argv, VALUE self) {
|
10275
|
+
double arg1 ;
|
9938
10276
|
double arg2 ;
|
9939
10277
|
double arg3 ;
|
9940
10278
|
double arg4 ;
|
9941
|
-
double
|
9942
|
-
|
9943
|
-
int res1 = 0 ;
|
10279
|
+
double val1 ;
|
10280
|
+
int ecode1 = 0 ;
|
9944
10281
|
double val2 ;
|
9945
10282
|
int ecode2 = 0 ;
|
9946
10283
|
double val3 ;
|
9947
10284
|
int ecode3 = 0 ;
|
9948
10285
|
double val4 ;
|
9949
10286
|
int ecode4 = 0 ;
|
9950
|
-
double val5 ;
|
9951
|
-
int ecode5 = 0 ;
|
9952
10287
|
|
9953
10288
|
if ((argc < 4) || (argc > 4)) {
|
9954
10289
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
9955
10290
|
}
|
9956
|
-
|
9957
|
-
if (!SWIG_IsOK(
|
9958
|
-
SWIG_exception_fail(SWIG_ArgError(
|
9959
|
-
}
|
9960
|
-
arg1 =
|
9961
|
-
ecode2 = SWIG_AsVal_double(argv[
|
10291
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
10292
|
+
if (!SWIG_IsOK(ecode1)) {
|
10293
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::clipTo", 1, argv[0] ));
|
10294
|
+
}
|
10295
|
+
arg1 = static_cast< double >(val1);
|
10296
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
9962
10297
|
if (!SWIG_IsOK(ecode2)) {
|
9963
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","clipTo", 2, argv[
|
10298
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::clipTo", 2, argv[1] ));
|
9964
10299
|
}
|
9965
10300
|
arg2 = static_cast< double >(val2);
|
9966
|
-
ecode3 = SWIG_AsVal_double(argv[
|
10301
|
+
ecode3 = SWIG_AsVal_double(argv[2], &val3);
|
9967
10302
|
if (!SWIG_IsOK(ecode3)) {
|
9968
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","clipTo", 3, argv[
|
10303
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::clipTo", 3, argv[2] ));
|
9969
10304
|
}
|
9970
10305
|
arg3 = static_cast< double >(val3);
|
9971
|
-
ecode4 = SWIG_AsVal_double(argv[
|
10306
|
+
ecode4 = SWIG_AsVal_double(argv[3], &val4);
|
9972
10307
|
if (!SWIG_IsOK(ecode4)) {
|
9973
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","clipTo", 4, argv[
|
10308
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::clipTo", 4, argv[3] ));
|
9974
10309
|
}
|
9975
10310
|
arg4 = static_cast< double >(val4);
|
9976
|
-
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
9977
|
-
if (!SWIG_IsOK(ecode5)) {
|
9978
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","clipTo", 5, argv[3] ));
|
9979
|
-
}
|
9980
|
-
arg5 = static_cast< double >(val5);
|
9981
10311
|
{
|
9982
10312
|
try {
|
9983
|
-
|
10313
|
+
Gosu::clipTo(arg1,arg2,arg3,arg4);
|
9984
10314
|
} catch (const std::exception& e) {
|
9985
10315
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
9986
10316
|
}
|
@@ -9992,40 +10322,32 @@ fail:
|
|
9992
10322
|
|
9993
10323
|
|
9994
10324
|
SWIGINTERN VALUE
|
9995
|
-
|
9996
|
-
|
10325
|
+
_wrap_record(int argc, VALUE *argv, VALUE self) {
|
10326
|
+
int arg1 ;
|
9997
10327
|
int arg2 ;
|
9998
|
-
int
|
9999
|
-
|
10000
|
-
int res1 = 0 ;
|
10328
|
+
int val1 ;
|
10329
|
+
int ecode1 = 0 ;
|
10001
10330
|
int val2 ;
|
10002
10331
|
int ecode2 = 0 ;
|
10003
|
-
int val3 ;
|
10004
|
-
int ecode3 = 0 ;
|
10005
10332
|
Gosu::Image *result = 0 ;
|
10006
10333
|
VALUE vresult = Qnil;
|
10007
10334
|
|
10008
10335
|
if ((argc < 2) || (argc > 2)) {
|
10009
10336
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
10010
10337
|
}
|
10011
|
-
|
10012
|
-
if (!SWIG_IsOK(
|
10013
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10014
|
-
}
|
10015
|
-
arg1 =
|
10016
|
-
ecode2 = SWIG_AsVal_int(argv[
|
10338
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
10339
|
+
if (!SWIG_IsOK(ecode1)) {
|
10340
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Gosu::record", 1, argv[0] ));
|
10341
|
+
}
|
10342
|
+
arg1 = static_cast< int >(val1);
|
10343
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
10017
10344
|
if (!SWIG_IsOK(ecode2)) {
|
10018
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","record", 2, argv[
|
10345
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Gosu::record", 2, argv[1] ));
|
10019
10346
|
}
|
10020
10347
|
arg2 = static_cast< int >(val2);
|
10021
|
-
ecode3 = SWIG_AsVal_int(argv[1], &val3);
|
10022
|
-
if (!SWIG_IsOK(ecode3)) {
|
10023
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","record", 3, argv[1] ));
|
10024
|
-
}
|
10025
|
-
arg3 = static_cast< int >(val3);
|
10026
10348
|
{
|
10027
10349
|
try {
|
10028
|
-
result = (Gosu::Image *)
|
10350
|
+
result = (Gosu::Image *)Gosu::record(arg1,arg2);
|
10029
10351
|
} catch (const std::exception& e) {
|
10030
10352
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10031
10353
|
}
|
@@ -10038,8 +10360,8 @@ fail:
|
|
10038
10360
|
|
10039
10361
|
|
10040
10362
|
SWIGINTERN VALUE
|
10041
|
-
|
10042
|
-
|
10363
|
+
_wrap_transform(int argc, VALUE *argv, VALUE self) {
|
10364
|
+
double arg1 ;
|
10043
10365
|
double arg2 ;
|
10044
10366
|
double arg3 ;
|
10045
10367
|
double arg4 ;
|
@@ -10055,9 +10377,8 @@ _wrap_Window_transform(int argc, VALUE *argv, VALUE self) {
|
|
10055
10377
|
double arg14 ;
|
10056
10378
|
double arg15 ;
|
10057
10379
|
double arg16 ;
|
10058
|
-
double
|
10059
|
-
|
10060
|
-
int res1 = 0 ;
|
10380
|
+
double val1 ;
|
10381
|
+
int ecode1 = 0 ;
|
10061
10382
|
double val2 ;
|
10062
10383
|
int ecode2 = 0 ;
|
10063
10384
|
double val3 ;
|
@@ -10088,100 +10409,93 @@ _wrap_Window_transform(int argc, VALUE *argv, VALUE self) {
|
|
10088
10409
|
int ecode15 = 0 ;
|
10089
10410
|
double val16 ;
|
10090
10411
|
int ecode16 = 0 ;
|
10091
|
-
double val17 ;
|
10092
|
-
int ecode17 = 0 ;
|
10093
10412
|
|
10094
10413
|
if ((argc < 16) || (argc > 16)) {
|
10095
10414
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 16)",argc); SWIG_fail;
|
10096
10415
|
}
|
10097
|
-
|
10098
|
-
if (!SWIG_IsOK(
|
10099
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10100
|
-
}
|
10101
|
-
arg1 =
|
10102
|
-
ecode2 = SWIG_AsVal_double(argv[
|
10416
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
10417
|
+
if (!SWIG_IsOK(ecode1)) {
|
10418
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 1, argv[0] ));
|
10419
|
+
}
|
10420
|
+
arg1 = static_cast< double >(val1);
|
10421
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
10103
10422
|
if (!SWIG_IsOK(ecode2)) {
|
10104
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","
|
10423
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 2, argv[1] ));
|
10105
10424
|
}
|
10106
10425
|
arg2 = static_cast< double >(val2);
|
10107
|
-
ecode3 = SWIG_AsVal_double(argv[
|
10426
|
+
ecode3 = SWIG_AsVal_double(argv[2], &val3);
|
10108
10427
|
if (!SWIG_IsOK(ecode3)) {
|
10109
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","
|
10428
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 3, argv[2] ));
|
10110
10429
|
}
|
10111
10430
|
arg3 = static_cast< double >(val3);
|
10112
|
-
ecode4 = SWIG_AsVal_double(argv[
|
10431
|
+
ecode4 = SWIG_AsVal_double(argv[3], &val4);
|
10113
10432
|
if (!SWIG_IsOK(ecode4)) {
|
10114
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","
|
10433
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 4, argv[3] ));
|
10115
10434
|
}
|
10116
10435
|
arg4 = static_cast< double >(val4);
|
10117
|
-
ecode5 = SWIG_AsVal_double(argv[
|
10436
|
+
ecode5 = SWIG_AsVal_double(argv[4], &val5);
|
10118
10437
|
if (!SWIG_IsOK(ecode5)) {
|
10119
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","
|
10438
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 5, argv[4] ));
|
10120
10439
|
}
|
10121
10440
|
arg5 = static_cast< double >(val5);
|
10122
|
-
ecode6 = SWIG_AsVal_double(argv[
|
10441
|
+
ecode6 = SWIG_AsVal_double(argv[5], &val6);
|
10123
10442
|
if (!SWIG_IsOK(ecode6)) {
|
10124
|
-
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","
|
10443
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 6, argv[5] ));
|
10125
10444
|
}
|
10126
10445
|
arg6 = static_cast< double >(val6);
|
10127
|
-
ecode7 = SWIG_AsVal_double(argv[
|
10446
|
+
ecode7 = SWIG_AsVal_double(argv[6], &val7);
|
10128
10447
|
if (!SWIG_IsOK(ecode7)) {
|
10129
|
-
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","
|
10448
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 7, argv[6] ));
|
10130
10449
|
}
|
10131
10450
|
arg7 = static_cast< double >(val7);
|
10132
|
-
ecode8 = SWIG_AsVal_double(argv[
|
10451
|
+
ecode8 = SWIG_AsVal_double(argv[7], &val8);
|
10133
10452
|
if (!SWIG_IsOK(ecode8)) {
|
10134
|
-
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","
|
10453
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 8, argv[7] ));
|
10135
10454
|
}
|
10136
10455
|
arg8 = static_cast< double >(val8);
|
10137
|
-
ecode9 = SWIG_AsVal_double(argv[
|
10456
|
+
ecode9 = SWIG_AsVal_double(argv[8], &val9);
|
10138
10457
|
if (!SWIG_IsOK(ecode9)) {
|
10139
|
-
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","
|
10458
|
+
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 9, argv[8] ));
|
10140
10459
|
}
|
10141
10460
|
arg9 = static_cast< double >(val9);
|
10142
|
-
ecode10 = SWIG_AsVal_double(argv[
|
10461
|
+
ecode10 = SWIG_AsVal_double(argv[9], &val10);
|
10143
10462
|
if (!SWIG_IsOK(ecode10)) {
|
10144
|
-
SWIG_exception_fail(SWIG_ArgError(ecode10), Ruby_Format_TypeError( "", "double","
|
10463
|
+
SWIG_exception_fail(SWIG_ArgError(ecode10), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 10, argv[9] ));
|
10145
10464
|
}
|
10146
10465
|
arg10 = static_cast< double >(val10);
|
10147
|
-
ecode11 = SWIG_AsVal_double(argv[
|
10466
|
+
ecode11 = SWIG_AsVal_double(argv[10], &val11);
|
10148
10467
|
if (!SWIG_IsOK(ecode11)) {
|
10149
|
-
SWIG_exception_fail(SWIG_ArgError(ecode11), Ruby_Format_TypeError( "", "double","
|
10468
|
+
SWIG_exception_fail(SWIG_ArgError(ecode11), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 11, argv[10] ));
|
10150
10469
|
}
|
10151
10470
|
arg11 = static_cast< double >(val11);
|
10152
|
-
ecode12 = SWIG_AsVal_double(argv[
|
10471
|
+
ecode12 = SWIG_AsVal_double(argv[11], &val12);
|
10153
10472
|
if (!SWIG_IsOK(ecode12)) {
|
10154
|
-
SWIG_exception_fail(SWIG_ArgError(ecode12), Ruby_Format_TypeError( "", "double","
|
10473
|
+
SWIG_exception_fail(SWIG_ArgError(ecode12), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 12, argv[11] ));
|
10155
10474
|
}
|
10156
10475
|
arg12 = static_cast< double >(val12);
|
10157
|
-
ecode13 = SWIG_AsVal_double(argv[
|
10476
|
+
ecode13 = SWIG_AsVal_double(argv[12], &val13);
|
10158
10477
|
if (!SWIG_IsOK(ecode13)) {
|
10159
|
-
SWIG_exception_fail(SWIG_ArgError(ecode13), Ruby_Format_TypeError( "", "double","
|
10478
|
+
SWIG_exception_fail(SWIG_ArgError(ecode13), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 13, argv[12] ));
|
10160
10479
|
}
|
10161
10480
|
arg13 = static_cast< double >(val13);
|
10162
|
-
ecode14 = SWIG_AsVal_double(argv[
|
10481
|
+
ecode14 = SWIG_AsVal_double(argv[13], &val14);
|
10163
10482
|
if (!SWIG_IsOK(ecode14)) {
|
10164
|
-
SWIG_exception_fail(SWIG_ArgError(ecode14), Ruby_Format_TypeError( "", "double","
|
10483
|
+
SWIG_exception_fail(SWIG_ArgError(ecode14), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 14, argv[13] ));
|
10165
10484
|
}
|
10166
10485
|
arg14 = static_cast< double >(val14);
|
10167
|
-
ecode15 = SWIG_AsVal_double(argv[
|
10486
|
+
ecode15 = SWIG_AsVal_double(argv[14], &val15);
|
10168
10487
|
if (!SWIG_IsOK(ecode15)) {
|
10169
|
-
SWIG_exception_fail(SWIG_ArgError(ecode15), Ruby_Format_TypeError( "", "double","
|
10488
|
+
SWIG_exception_fail(SWIG_ArgError(ecode15), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 15, argv[14] ));
|
10170
10489
|
}
|
10171
10490
|
arg15 = static_cast< double >(val15);
|
10172
|
-
ecode16 = SWIG_AsVal_double(argv[
|
10491
|
+
ecode16 = SWIG_AsVal_double(argv[15], &val16);
|
10173
10492
|
if (!SWIG_IsOK(ecode16)) {
|
10174
|
-
SWIG_exception_fail(SWIG_ArgError(ecode16), Ruby_Format_TypeError( "", "double","
|
10493
|
+
SWIG_exception_fail(SWIG_ArgError(ecode16), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 16, argv[15] ));
|
10175
10494
|
}
|
10176
10495
|
arg16 = static_cast< double >(val16);
|
10177
|
-
ecode17 = SWIG_AsVal_double(argv[15], &val17);
|
10178
|
-
if (!SWIG_IsOK(ecode17)) {
|
10179
|
-
SWIG_exception_fail(SWIG_ArgError(ecode17), Ruby_Format_TypeError( "", "double","transform", 17, argv[15] ));
|
10180
|
-
}
|
10181
|
-
arg17 = static_cast< double >(val17);
|
10182
10496
|
{
|
10183
10497
|
try {
|
10184
|
-
|
10498
|
+
Gosu::transformForRuby(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
|
10185
10499
|
} catch (const std::exception& e) {
|
10186
10500
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10187
10501
|
}
|
@@ -10193,50 +10507,42 @@ fail:
|
|
10193
10507
|
|
10194
10508
|
|
10195
10509
|
SWIGINTERN VALUE
|
10196
|
-
|
10197
|
-
|
10198
|
-
double arg2 ;
|
10510
|
+
_wrap_rotate(int argc, VALUE *argv, VALUE self) {
|
10511
|
+
double arg1 ;
|
10512
|
+
double arg2 = (double) 0 ;
|
10199
10513
|
double arg3 = (double) 0 ;
|
10200
|
-
double
|
10201
|
-
|
10202
|
-
int res1 = 0 ;
|
10514
|
+
double val1 ;
|
10515
|
+
int ecode1 = 0 ;
|
10203
10516
|
double val2 ;
|
10204
10517
|
int ecode2 = 0 ;
|
10205
10518
|
double val3 ;
|
10206
10519
|
int ecode3 = 0 ;
|
10207
|
-
double val4 ;
|
10208
|
-
int ecode4 = 0 ;
|
10209
10520
|
|
10210
10521
|
if ((argc < 1) || (argc > 3)) {
|
10211
10522
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10212
10523
|
}
|
10213
|
-
|
10214
|
-
if (!SWIG_IsOK(
|
10215
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10216
|
-
}
|
10217
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
10218
|
-
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
10219
|
-
if (!SWIG_IsOK(ecode2)) {
|
10220
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","rotate", 2, argv[0] ));
|
10524
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
10525
|
+
if (!SWIG_IsOK(ecode1)) {
|
10526
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::rotateForRuby", 1, argv[0] ));
|
10221
10527
|
}
|
10222
|
-
|
10528
|
+
arg1 = static_cast< double >(val1);
|
10223
10529
|
if (argc > 1) {
|
10224
|
-
|
10225
|
-
if (!SWIG_IsOK(
|
10226
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10530
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
10531
|
+
if (!SWIG_IsOK(ecode2)) {
|
10532
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::rotateForRuby", 2, argv[1] ));
|
10227
10533
|
}
|
10228
|
-
|
10534
|
+
arg2 = static_cast< double >(val2);
|
10229
10535
|
}
|
10230
10536
|
if (argc > 2) {
|
10231
|
-
|
10232
|
-
if (!SWIG_IsOK(
|
10233
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10537
|
+
ecode3 = SWIG_AsVal_double(argv[2], &val3);
|
10538
|
+
if (!SWIG_IsOK(ecode3)) {
|
10539
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::rotateForRuby", 3, argv[2] ));
|
10234
10540
|
}
|
10235
|
-
|
10541
|
+
arg3 = static_cast< double >(val3);
|
10236
10542
|
}
|
10237
10543
|
{
|
10238
10544
|
try {
|
10239
|
-
|
10545
|
+
Gosu::rotateForRuby(arg1,arg2,arg3);
|
10240
10546
|
} catch (const std::exception& e) {
|
10241
10547
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10242
10548
|
}
|
@@ -10248,30 +10554,22 @@ fail:
|
|
10248
10554
|
|
10249
10555
|
|
10250
10556
|
SWIGINTERN VALUE
|
10251
|
-
|
10252
|
-
|
10253
|
-
double
|
10254
|
-
|
10255
|
-
int res1 = 0 ;
|
10256
|
-
double val2 ;
|
10257
|
-
int ecode2 = 0 ;
|
10557
|
+
_wrap_scale__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
10558
|
+
double arg1 ;
|
10559
|
+
double val1 ;
|
10560
|
+
int ecode1 = 0 ;
|
10258
10561
|
|
10259
10562
|
if ((argc < 1) || (argc > 1)) {
|
10260
10563
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10261
10564
|
}
|
10262
|
-
|
10263
|
-
if (!SWIG_IsOK(
|
10264
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10265
|
-
}
|
10266
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
10267
|
-
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
10268
|
-
if (!SWIG_IsOK(ecode2)) {
|
10269
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","scale", 2, argv[0] ));
|
10565
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
10566
|
+
if (!SWIG_IsOK(ecode1)) {
|
10567
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 1, argv[0] ));
|
10270
10568
|
}
|
10271
|
-
|
10569
|
+
arg1 = static_cast< double >(val1);
|
10272
10570
|
{
|
10273
10571
|
try {
|
10274
|
-
|
10572
|
+
Gosu::scaleForRuby(arg1);
|
10275
10573
|
} catch (const std::exception& e) {
|
10276
10574
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10277
10575
|
}
|
@@ -10283,38 +10581,30 @@ fail:
|
|
10283
10581
|
|
10284
10582
|
|
10285
10583
|
SWIGINTERN VALUE
|
10286
|
-
|
10287
|
-
|
10584
|
+
_wrap_scale__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
10585
|
+
double arg1 ;
|
10288
10586
|
double arg2 ;
|
10289
|
-
double
|
10290
|
-
|
10291
|
-
int res1 = 0 ;
|
10587
|
+
double val1 ;
|
10588
|
+
int ecode1 = 0 ;
|
10292
10589
|
double val2 ;
|
10293
10590
|
int ecode2 = 0 ;
|
10294
|
-
double val3 ;
|
10295
|
-
int ecode3 = 0 ;
|
10296
10591
|
|
10297
10592
|
if ((argc < 2) || (argc > 2)) {
|
10298
10593
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
10299
10594
|
}
|
10300
|
-
|
10301
|
-
if (!SWIG_IsOK(
|
10302
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10303
|
-
}
|
10304
|
-
arg1 =
|
10305
|
-
ecode2 = SWIG_AsVal_double(argv[
|
10595
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
10596
|
+
if (!SWIG_IsOK(ecode1)) {
|
10597
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 1, argv[0] ));
|
10598
|
+
}
|
10599
|
+
arg1 = static_cast< double >(val1);
|
10600
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
10306
10601
|
if (!SWIG_IsOK(ecode2)) {
|
10307
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","
|
10602
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 2, argv[1] ));
|
10308
10603
|
}
|
10309
10604
|
arg2 = static_cast< double >(val2);
|
10310
|
-
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
10311
|
-
if (!SWIG_IsOK(ecode3)) {
|
10312
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","scale", 3, argv[1] ));
|
10313
|
-
}
|
10314
|
-
arg3 = static_cast< double >(val3);
|
10315
10605
|
{
|
10316
10606
|
try {
|
10317
|
-
|
10607
|
+
Gosu::scaleForRuby(arg1,arg2);
|
10318
10608
|
} catch (const std::exception& e) {
|
10319
10609
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10320
10610
|
}
|
@@ -10326,54 +10616,46 @@ fail:
|
|
10326
10616
|
|
10327
10617
|
|
10328
10618
|
SWIGINTERN VALUE
|
10329
|
-
|
10330
|
-
|
10619
|
+
_wrap_scale__SWIG_2(int argc, VALUE *argv, VALUE self) {
|
10620
|
+
double arg1 ;
|
10331
10621
|
double arg2 ;
|
10332
10622
|
double arg3 ;
|
10333
10623
|
double arg4 ;
|
10334
|
-
double
|
10335
|
-
|
10336
|
-
int res1 = 0 ;
|
10624
|
+
double val1 ;
|
10625
|
+
int ecode1 = 0 ;
|
10337
10626
|
double val2 ;
|
10338
10627
|
int ecode2 = 0 ;
|
10339
10628
|
double val3 ;
|
10340
10629
|
int ecode3 = 0 ;
|
10341
10630
|
double val4 ;
|
10342
10631
|
int ecode4 = 0 ;
|
10343
|
-
double val5 ;
|
10344
|
-
int ecode5 = 0 ;
|
10345
10632
|
|
10346
10633
|
if ((argc < 4) || (argc > 4)) {
|
10347
10634
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
10348
10635
|
}
|
10349
|
-
|
10350
|
-
if (!SWIG_IsOK(
|
10351
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10352
|
-
}
|
10353
|
-
arg1 =
|
10354
|
-
ecode2 = SWIG_AsVal_double(argv[
|
10636
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
10637
|
+
if (!SWIG_IsOK(ecode1)) {
|
10638
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 1, argv[0] ));
|
10639
|
+
}
|
10640
|
+
arg1 = static_cast< double >(val1);
|
10641
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
10355
10642
|
if (!SWIG_IsOK(ecode2)) {
|
10356
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","
|
10643
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 2, argv[1] ));
|
10357
10644
|
}
|
10358
10645
|
arg2 = static_cast< double >(val2);
|
10359
|
-
ecode3 = SWIG_AsVal_double(argv[
|
10646
|
+
ecode3 = SWIG_AsVal_double(argv[2], &val3);
|
10360
10647
|
if (!SWIG_IsOK(ecode3)) {
|
10361
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","
|
10648
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 3, argv[2] ));
|
10362
10649
|
}
|
10363
10650
|
arg3 = static_cast< double >(val3);
|
10364
|
-
ecode4 = SWIG_AsVal_double(argv[
|
10651
|
+
ecode4 = SWIG_AsVal_double(argv[3], &val4);
|
10365
10652
|
if (!SWIG_IsOK(ecode4)) {
|
10366
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","
|
10653
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 4, argv[3] ));
|
10367
10654
|
}
|
10368
10655
|
arg4 = static_cast< double >(val4);
|
10369
|
-
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
10370
|
-
if (!SWIG_IsOK(ecode5)) {
|
10371
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","scale", 5, argv[3] ));
|
10372
|
-
}
|
10373
|
-
arg5 = static_cast< double >(val5);
|
10374
10656
|
{
|
10375
10657
|
try {
|
10376
|
-
|
10658
|
+
Gosu::scaleForRuby(arg1,arg2,arg3,arg4);
|
10377
10659
|
} catch (const std::exception& e) {
|
10378
10660
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10379
10661
|
}
|
@@ -10384,58 +10666,48 @@ fail:
|
|
10384
10666
|
}
|
10385
10667
|
|
10386
10668
|
|
10387
|
-
SWIGINTERN VALUE
|
10669
|
+
SWIGINTERN VALUE _wrap_scale(int nargs, VALUE *args, VALUE self) {
|
10388
10670
|
int argc;
|
10389
|
-
VALUE argv[
|
10671
|
+
VALUE argv[4];
|
10390
10672
|
int ii;
|
10391
10673
|
|
10392
|
-
argc = nargs
|
10393
|
-
|
10394
|
-
|
10395
|
-
|
10396
|
-
argv[ii] = args[ii-1];
|
10674
|
+
argc = nargs;
|
10675
|
+
if (argc > 4) SWIG_fail;
|
10676
|
+
for (ii = 0; (ii < argc); ++ii) {
|
10677
|
+
argv[ii] = args[ii];
|
10397
10678
|
}
|
10398
|
-
if (argc ==
|
10679
|
+
if (argc == 1) {
|
10399
10680
|
int _v;
|
10400
|
-
|
10401
|
-
|
10402
|
-
|
10681
|
+
{
|
10682
|
+
int res = SWIG_AsVal_double(argv[0], NULL);
|
10683
|
+
_v = SWIG_CheckState(res);
|
10684
|
+
}
|
10403
10685
|
if (_v) {
|
10404
|
-
|
10405
|
-
int res = SWIG_AsVal_double(argv[1], NULL);
|
10406
|
-
_v = SWIG_CheckState(res);
|
10407
|
-
}
|
10408
|
-
if (_v) {
|
10409
|
-
return _wrap_Window_scale__SWIG_0(nargs, args, self);
|
10410
|
-
}
|
10686
|
+
return _wrap_scale__SWIG_0(nargs, args, self);
|
10411
10687
|
}
|
10412
10688
|
}
|
10413
|
-
if (argc ==
|
10689
|
+
if (argc == 2) {
|
10414
10690
|
int _v;
|
10415
|
-
|
10416
|
-
|
10417
|
-
|
10691
|
+
{
|
10692
|
+
int res = SWIG_AsVal_double(argv[0], NULL);
|
10693
|
+
_v = SWIG_CheckState(res);
|
10694
|
+
}
|
10418
10695
|
if (_v) {
|
10419
10696
|
{
|
10420
10697
|
int res = SWIG_AsVal_double(argv[1], NULL);
|
10421
10698
|
_v = SWIG_CheckState(res);
|
10422
10699
|
}
|
10423
10700
|
if (_v) {
|
10424
|
-
|
10425
|
-
int res = SWIG_AsVal_double(argv[2], NULL);
|
10426
|
-
_v = SWIG_CheckState(res);
|
10427
|
-
}
|
10428
|
-
if (_v) {
|
10429
|
-
return _wrap_Window_scale__SWIG_1(nargs, args, self);
|
10430
|
-
}
|
10701
|
+
return _wrap_scale__SWIG_1(nargs, args, self);
|
10431
10702
|
}
|
10432
10703
|
}
|
10433
10704
|
}
|
10434
|
-
if (argc ==
|
10705
|
+
if (argc == 4) {
|
10435
10706
|
int _v;
|
10436
|
-
|
10437
|
-
|
10438
|
-
|
10707
|
+
{
|
10708
|
+
int res = SWIG_AsVal_double(argv[0], NULL);
|
10709
|
+
_v = SWIG_CheckState(res);
|
10710
|
+
}
|
10439
10711
|
if (_v) {
|
10440
10712
|
{
|
10441
10713
|
int res = SWIG_AsVal_double(argv[1], NULL);
|
@@ -10452,13 +10724,7 @@ SWIGINTERN VALUE _wrap_Window_scale(int nargs, VALUE *args, VALUE self) {
|
|
10452
10724
|
_v = SWIG_CheckState(res);
|
10453
10725
|
}
|
10454
10726
|
if (_v) {
|
10455
|
-
|
10456
|
-
int res = SWIG_AsVal_double(argv[4], NULL);
|
10457
|
-
_v = SWIG_CheckState(res);
|
10458
|
-
}
|
10459
|
-
if (_v) {
|
10460
|
-
return _wrap_Window_scale__SWIG_2(nargs, args, self);
|
10461
|
-
}
|
10727
|
+
return _wrap_scale__SWIG_2(nargs, args, self);
|
10462
10728
|
}
|
10463
10729
|
}
|
10464
10730
|
}
|
@@ -10466,7 +10732,7 @@ SWIGINTERN VALUE _wrap_Window_scale(int nargs, VALUE *args, VALUE self) {
|
|
10466
10732
|
}
|
10467
10733
|
|
10468
10734
|
fail:
|
10469
|
-
Ruby_Format_OverloadedError( argc,
|
10735
|
+
Ruby_Format_OverloadedError( argc, 4, "scale",
|
10470
10736
|
" void scale(double factor)\n"
|
10471
10737
|
" void scale(double factorX, double factorY)\n"
|
10472
10738
|
" void scale(double factorX, double factorY, double aroundX, double aroundY)\n");
|
@@ -10476,38 +10742,30 @@ fail:
|
|
10476
10742
|
|
10477
10743
|
|
10478
10744
|
SWIGINTERN VALUE
|
10479
|
-
|
10480
|
-
|
10745
|
+
_wrap_translate(int argc, VALUE *argv, VALUE self) {
|
10746
|
+
double arg1 ;
|
10481
10747
|
double arg2 ;
|
10482
|
-
double
|
10483
|
-
|
10484
|
-
int res1 = 0 ;
|
10748
|
+
double val1 ;
|
10749
|
+
int ecode1 = 0 ;
|
10485
10750
|
double val2 ;
|
10486
10751
|
int ecode2 = 0 ;
|
10487
|
-
double val3 ;
|
10488
|
-
int ecode3 = 0 ;
|
10489
10752
|
|
10490
10753
|
if ((argc < 2) || (argc > 2)) {
|
10491
10754
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
10492
10755
|
}
|
10493
|
-
|
10494
|
-
if (!SWIG_IsOK(
|
10495
|
-
SWIG_exception_fail(SWIG_ArgError(
|
10496
|
-
}
|
10497
|
-
arg1 =
|
10498
|
-
ecode2 = SWIG_AsVal_double(argv[
|
10756
|
+
ecode1 = SWIG_AsVal_double(argv[0], &val1);
|
10757
|
+
if (!SWIG_IsOK(ecode1)) {
|
10758
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::translateForRuby", 1, argv[0] ));
|
10759
|
+
}
|
10760
|
+
arg1 = static_cast< double >(val1);
|
10761
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
10499
10762
|
if (!SWIG_IsOK(ecode2)) {
|
10500
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","
|
10763
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::translateForRuby", 2, argv[1] ));
|
10501
10764
|
}
|
10502
10765
|
arg2 = static_cast< double >(val2);
|
10503
|
-
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
10504
|
-
if (!SWIG_IsOK(ecode3)) {
|
10505
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","translate", 3, argv[1] ));
|
10506
|
-
}
|
10507
|
-
arg3 = static_cast< double >(val3);
|
10508
10766
|
{
|
10509
10767
|
try {
|
10510
|
-
|
10768
|
+
Gosu::translateForRuby(arg1,arg2);
|
10511
10769
|
} catch (const std::exception& e) {
|
10512
10770
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10513
10771
|
}
|
@@ -10518,41 +10776,14 @@ fail:
|
|
10518
10776
|
}
|
10519
10777
|
|
10520
10778
|
|
10521
|
-
SWIGINTERN VALUE
|
10522
|
-
_wrap_disown_Window(int argc, VALUE *argv, VALUE self) {
|
10523
|
-
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
10524
|
-
void *argp1 = 0 ;
|
10525
|
-
int res1 = 0 ;
|
10526
|
-
|
10527
|
-
if ((argc < 1) || (argc > 1)) {
|
10528
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10529
|
-
}
|
10530
|
-
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
10531
|
-
if (!SWIG_IsOK(res1)) {
|
10532
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","disown_Window", 1, argv[0] ));
|
10533
|
-
}
|
10534
|
-
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
10535
|
-
{
|
10536
|
-
Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
|
10537
|
-
if (director) director->swig_disown();
|
10538
|
-
}
|
10539
|
-
|
10540
|
-
return Qnil;
|
10541
|
-
fail:
|
10542
|
-
return Qnil;
|
10543
|
-
}
|
10544
|
-
|
10545
|
-
|
10546
10779
|
|
10547
10780
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
10548
10781
|
|
10549
|
-
static swig_type_info _swigt__p_Channel = {"_p_Channel", "Channel *", 0, 0, (void*)0, 0};
|
10550
10782
|
static swig_type_info _swigt__p_Gosu__Button = {"_p_Gosu__Button", "Gosu::Button *", 0, 0, (void*)0, 0};
|
10551
10783
|
static swig_type_info _swigt__p_Gosu__Color = {"_p_Gosu__Color", "Gosu::Color *", 0, 0, (void*)0, 0};
|
10552
10784
|
static swig_type_info _swigt__p_Gosu__Font = {"_p_Gosu__Font", "Gosu::Font *", 0, 0, (void*)0, 0};
|
10553
10785
|
static swig_type_info _swigt__p_Gosu__GLTexInfo = {"_p_Gosu__GLTexInfo", "Gosu::GLTexInfo *", 0, 0, (void*)0, 0};
|
10554
10786
|
static swig_type_info _swigt__p_Gosu__Image = {"_p_Gosu__Image", "Gosu::Image *", 0, 0, (void*)0, 0};
|
10555
|
-
static swig_type_info _swigt__p_Gosu__ImageData = {"_p_Gosu__ImageData", "Gosu::ImageData *", 0, 0, (void*)0, 0};
|
10556
10787
|
static swig_type_info _swigt__p_Gosu__Sample = {"_p_Gosu__Sample", "Gosu::Sample *", 0, 0, (void*)0, 0};
|
10557
10788
|
static swig_type_info _swigt__p_Gosu__SampleInstance = {"_p_Gosu__SampleInstance", "Gosu::SampleInstance *", 0, 0, (void*)0, 0};
|
10558
10789
|
static swig_type_info _swigt__p_Gosu__Song = {"_p_Gosu__Song", "Gosu::Song *", 0, 0, (void*)0, 0};
|
@@ -10564,13 +10795,11 @@ static swig_type_info _swigt__p_std__tr1__arrayT_double_16_t = {"_p_std__tr1__ar
|
|
10564
10795
|
static swig_type_info _swigt__p_std__wstring = {"_p_std__wstring", "std::wstring *", 0, 0, (void*)0, 0};
|
10565
10796
|
|
10566
10797
|
static swig_type_info *swig_type_initial[] = {
|
10567
|
-
&_swigt__p_Channel,
|
10568
10798
|
&_swigt__p_Gosu__Button,
|
10569
10799
|
&_swigt__p_Gosu__Color,
|
10570
10800
|
&_swigt__p_Gosu__Font,
|
10571
10801
|
&_swigt__p_Gosu__GLTexInfo,
|
10572
10802
|
&_swigt__p_Gosu__Image,
|
10573
|
-
&_swigt__p_Gosu__ImageData,
|
10574
10803
|
&_swigt__p_Gosu__Sample,
|
10575
10804
|
&_swigt__p_Gosu__SampleInstance,
|
10576
10805
|
&_swigt__p_Gosu__Song,
|
@@ -10582,13 +10811,11 @@ static swig_type_info *swig_type_initial[] = {
|
|
10582
10811
|
&_swigt__p_std__wstring,
|
10583
10812
|
};
|
10584
10813
|
|
10585
|
-
static swig_cast_info _swigc__p_Channel[] = { {&_swigt__p_Channel, 0, 0, 0},{0, 0, 0, 0}};
|
10586
10814
|
static swig_cast_info _swigc__p_Gosu__Button[] = { {&_swigt__p_Gosu__Button, 0, 0, 0},{0, 0, 0, 0}};
|
10587
10815
|
static swig_cast_info _swigc__p_Gosu__Color[] = { {&_swigt__p_Gosu__Color, 0, 0, 0},{0, 0, 0, 0}};
|
10588
10816
|
static swig_cast_info _swigc__p_Gosu__Font[] = { {&_swigt__p_Gosu__Font, 0, 0, 0},{0, 0, 0, 0}};
|
10589
10817
|
static swig_cast_info _swigc__p_Gosu__GLTexInfo[] = { {&_swigt__p_Gosu__GLTexInfo, 0, 0, 0},{0, 0, 0, 0}};
|
10590
10818
|
static swig_cast_info _swigc__p_Gosu__Image[] = { {&_swigt__p_Gosu__Image, 0, 0, 0},{0, 0, 0, 0}};
|
10591
|
-
static swig_cast_info _swigc__p_Gosu__ImageData[] = { {&_swigt__p_Gosu__ImageData, 0, 0, 0},{0, 0, 0, 0}};
|
10592
10819
|
static swig_cast_info _swigc__p_Gosu__Sample[] = { {&_swigt__p_Gosu__Sample, 0, 0, 0},{0, 0, 0, 0}};
|
10593
10820
|
static swig_cast_info _swigc__p_Gosu__SampleInstance[] = { {&_swigt__p_Gosu__SampleInstance, 0, 0, 0},{0, 0, 0, 0}};
|
10594
10821
|
static swig_cast_info _swigc__p_Gosu__Song[] = { {&_swigt__p_Gosu__Song, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -10600,13 +10827,11 @@ static swig_cast_info _swigc__p_std__tr1__arrayT_double_16_t[] = { {&_swigt__p_
|
|
10600
10827
|
static swig_cast_info _swigc__p_std__wstring[] = { {&_swigt__p_std__wstring, 0, 0, 0},{0, 0, 0, 0}};
|
10601
10828
|
|
10602
10829
|
static swig_cast_info *swig_cast_initial[] = {
|
10603
|
-
_swigc__p_Channel,
|
10604
10830
|
_swigc__p_Gosu__Button,
|
10605
10831
|
_swigc__p_Gosu__Color,
|
10606
10832
|
_swigc__p_Gosu__Font,
|
10607
10833
|
_swigc__p_Gosu__GLTexInfo,
|
10608
10834
|
_swigc__p_Gosu__Image,
|
10609
|
-
_swigc__p_Gosu__ImageData,
|
10610
10835
|
_swigc__p_Gosu__Sample,
|
10611
10836
|
_swigc__p_Gosu__SampleInstance,
|
10612
10837
|
_swigc__p_Gosu__Song,
|
@@ -10678,7 +10903,7 @@ SWIGRUNTIME void
|
|
10678
10903
|
SWIG_InitializeModule(void *clientdata) {
|
10679
10904
|
size_t i;
|
10680
10905
|
swig_module_info *module_head, *iter;
|
10681
|
-
int
|
10906
|
+
int init;
|
10682
10907
|
|
10683
10908
|
/* check to see if the circular list has been setup, if not, set it up */
|
10684
10909
|
if (swig_module.next==0) {
|
@@ -10697,22 +10922,18 @@ SWIG_InitializeModule(void *clientdata) {
|
|
10697
10922
|
/* This is the first module loaded for this interpreter */
|
10698
10923
|
/* so set the swig module into the interpreter */
|
10699
10924
|
SWIG_SetModule(clientdata, &swig_module);
|
10700
|
-
module_head = &swig_module;
|
10701
10925
|
} else {
|
10702
10926
|
/* the interpreter has loaded a SWIG module, but has it loaded this one? */
|
10703
|
-
found=0;
|
10704
10927
|
iter=module_head;
|
10705
10928
|
do {
|
10706
10929
|
if (iter==&swig_module) {
|
10707
|
-
|
10708
|
-
|
10930
|
+
/* Our module is already in the list, so there's nothing more to do. */
|
10931
|
+
return;
|
10709
10932
|
}
|
10710
10933
|
iter=iter->next;
|
10711
10934
|
} while (iter!= module_head);
|
10712
10935
|
|
10713
|
-
/*
|
10714
|
-
if (found) return;
|
10715
|
-
/* otherwise we must add out module into the list */
|
10936
|
+
/* otherwise we must add our module into the list */
|
10716
10937
|
swig_module.next = module_head->next;
|
10717
10938
|
module_head->next = &swig_module;
|
10718
10939
|
}
|
@@ -10875,9 +11096,9 @@ SWIGEXPORT void Init_gosu(void) {
|
|
10875
11096
|
|
10876
11097
|
SWIG_RubyInitializeTrackings();
|
10877
11098
|
rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0)));
|
10878
|
-
rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(
|
10879
|
-
rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(
|
10880
|
-
rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.
|
11099
|
+
rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(9)));
|
11100
|
+
rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(0)));
|
11101
|
+
rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.9.0.pre1"));
|
10881
11102
|
rb_define_const(mGosu, "GOSU_COPYRIGHT_NOTICE", SWIG_FromCharPtr("This software uses the following third-party libraries:\n\nGosu, http://www.libgosu.org, MIT License, http://opensource.org/licenses/MIT\nSDL 2, http://www.libsdl.org, MIT License, http://opensource.org/licenses/MIT\nFreeImage, http://freeimage.sourceforge.net, FreeImage Public License\nlibogg & libvorbis, http://www.xiph.org, BSD License, 3-Clause Version, http://www.xiph.org/licenses/bsd\nlibsndfile, http://www.mega-nerd.com/libsndfile, GNU LGPL 3, http://www.gnu.org/copyleft/lesser.html\nOpenAL Soft, http://kcat.strangesoft.net/openal.html, GNU LGPL 2, http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html\n"));
|
10882
11103
|
rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
|
10883
11104
|
rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
|
@@ -10924,7 +11145,7 @@ SWIGEXPORT void Init_gosu(void) {
|
|
10924
11145
|
rb_define_singleton_method(SwigClassColor.klass, "rgba", VALUEFUNC(_wrap_Color_rgba), -1);
|
10925
11146
|
rb_define_singleton_method(SwigClassColor.klass, "argb", VALUEFUNC(_wrap_Color_argb), -1);
|
10926
11147
|
rb_define_method(SwigClassColor.klass, "dup", VALUEFUNC(_wrap_Color_dup), -1);
|
10927
|
-
rb_define_method(SwigClassColor.klass, "
|
11148
|
+
rb_define_method(SwigClassColor.klass, "inspect", VALUEFUNC(_wrap_Color_inspect), -1);
|
10928
11149
|
rb_define_method(SwigClassColor.klass, "==", VALUEFUNC(_wrap_Color___eq__), -1);
|
10929
11150
|
SwigClassColor.mark = 0;
|
10930
11151
|
SwigClassColor.destroy = (void (*)(void *)) free_Gosu_Color;
|
@@ -10973,12 +11194,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
10973
11194
|
rb_define_method(SwigClassImage.klass, "draw", VALUEFUNC(_wrap_Image_draw), -1);
|
10974
11195
|
rb_define_method(SwigClassImage.klass, "draw_mod", VALUEFUNC(_wrap_Image_draw_mod), -1);
|
10975
11196
|
rb_define_method(SwigClassImage.klass, "draw_rot", VALUEFUNC(_wrap_Image_draw_rot), -1);
|
10976
|
-
rb_define_method(SwigClassImage.klass, "get_data", VALUEFUNC(_wrap_Image_get_data), -1);
|
10977
11197
|
rb_define_method(SwigClassImage.klass, "draw_as_quad", VALUEFUNC(_wrap_Image_draw_as_quad), -1);
|
10978
11198
|
rb_define_method(SwigClassImage.klass, "gl_tex_info", VALUEFUNC(_wrap_Image_gl_tex_info), -1);
|
10979
11199
|
rb_define_method(SwigClassImage.klass, "subimage", VALUEFUNC(_wrap_Image_subimage), -1);
|
10980
|
-
rb_define_singleton_method(SwigClassImage.klass, "
|
10981
|
-
rb_define_singleton_method(SwigClassImage.klass, "from_text7", VALUEFUNC(_wrap_Image_from_text7), -1);
|
11200
|
+
rb_define_singleton_method(SwigClassImage.klass, "from_text", VALUEFUNC(_wrap_Image_from_text), -1);
|
10982
11201
|
rb_define_singleton_method(SwigClassImage.klass, "load_tiles", VALUEFUNC(_wrap_Image_load_tiles), -1);
|
10983
11202
|
rb_define_method(SwigClassImage.klass, "to_blob", VALUEFUNC(_wrap_Image_to_blob), -1);
|
10984
11203
|
rb_define_method(SwigClassImage.klass, "columns", VALUEFUNC(_wrap_Image_columns), -1);
|
@@ -11245,7 +11464,7 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11245
11464
|
rb_define_const(mGosu, "Gp3Button15", SWIG_From_int(static_cast< int >(Gosu::gp3Button15)));
|
11246
11465
|
|
11247
11466
|
GosusDarkSide::oncePerTick = GosusDarkSide::yieldToOtherRubyThreads;
|
11248
|
-
// While we are at it,
|
11467
|
+
// While we are at it, call srand() - otherwise unavailable to Ruby people
|
11249
11468
|
std::srand(static_cast<unsigned int>(std::time(0)));
|
11250
11469
|
std::rand(); // and flush the first value
|
11251
11470
|
|
@@ -11288,13 +11507,6 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11288
11507
|
rb_define_method(SwigClassWindow.klass, "release_memory", VALUEFUNC(_wrap_Window_release_memory), -1);
|
11289
11508
|
rb_define_method(SwigClassWindow.klass, "button_down", VALUEFUNC(_wrap_Window_button_down), -1);
|
11290
11509
|
rb_define_method(SwigClassWindow.klass, "button_up", VALUEFUNC(_wrap_Window_button_up), -1);
|
11291
|
-
rb_define_method(SwigClassWindow.klass, "draw_line", VALUEFUNC(_wrap_Window_draw_line), -1);
|
11292
|
-
rb_define_method(SwigClassWindow.klass, "draw_triangle", VALUEFUNC(_wrap_Window_draw_triangle), -1);
|
11293
|
-
rb_define_method(SwigClassWindow.klass, "draw_quad", VALUEFUNC(_wrap_Window_draw_quad), -1);
|
11294
|
-
rb_define_method(SwigClassWindow.klass, "flush", VALUEFUNC(_wrap_Window_flush), -1);
|
11295
|
-
rb_define_method(SwigClassWindow.klass, "button_down?", VALUEFUNC(_wrap_Window_button_downq___), -1);
|
11296
|
-
rb_define_singleton_method(SwigClassWindow.klass, "char_to_button_id", VALUEFUNC(_wrap_Window_char_to_button_id), -1);
|
11297
|
-
rb_define_singleton_method(SwigClassWindow.klass, "button_id_to_char", VALUEFUNC(_wrap_Window_button_id_to_char), -1);
|
11298
11510
|
rb_define_method(SwigClassWindow.klass, "text_input", VALUEFUNC(_wrap_Window_text_input), -1);
|
11299
11511
|
rb_define_method(SwigClassWindow.klass, "text_input=", VALUEFUNC(_wrap_Window_text_inpute___), -1);
|
11300
11512
|
rb_define_method(SwigClassWindow.klass, "mouse_x", VALUEFUNC(_wrap_Window_mouse_x), -1);
|
@@ -11305,15 +11517,23 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11305
11517
|
rb_define_method(SwigClassWindow.klass, "width", VALUEFUNC(_wrap_Window_width), -1);
|
11306
11518
|
rb_define_method(SwigClassWindow.klass, "height", VALUEFUNC(_wrap_Window_height), -1);
|
11307
11519
|
rb_define_method(SwigClassWindow.klass, "fullscreen?", VALUEFUNC(_wrap_Window_fullscreenq___), -1);
|
11308
|
-
rb_define_method(SwigClassWindow.klass, "unsafe_gl", VALUEFUNC(_wrap_Window_unsafe_gl), -1);
|
11309
|
-
rb_define_method(SwigClassWindow.klass, "clip_to", VALUEFUNC(_wrap_Window_clip_to), -1);
|
11310
|
-
rb_define_method(SwigClassWindow.klass, "record", VALUEFUNC(_wrap_Window_record), -1);
|
11311
|
-
rb_define_method(SwigClassWindow.klass, "transform", VALUEFUNC(_wrap_Window_transform), -1);
|
11312
|
-
rb_define_method(SwigClassWindow.klass, "rotate", VALUEFUNC(_wrap_Window_rotate), -1);
|
11313
|
-
rb_define_method(SwigClassWindow.klass, "scale", VALUEFUNC(_wrap_Window_scale), -1);
|
11314
|
-
rb_define_method(SwigClassWindow.klass, "translate", VALUEFUNC(_wrap_Window_translate), -1);
|
11315
11520
|
SwigClassWindow.mark = (void (*)(void *)) markWindow;
|
11316
11521
|
SwigClassWindow.destroy = (void (*)(void *)) free_Gosu_Window;
|
11317
11522
|
SwigClassWindow.trackObjects = 1;
|
11523
|
+
rb_define_module_function(mGosu, "char_to_button_id", VALUEFUNC(_wrap_char_to_button_id), -1);
|
11524
|
+
rb_define_module_function(mGosu, "button_id_to_char", VALUEFUNC(_wrap_button_id_to_char), -1);
|
11525
|
+
rb_define_module_function(mGosu, "button_down?", VALUEFUNC(_wrap_button_downq___), -1);
|
11526
|
+
rb_define_module_function(mGosu, "draw_line", VALUEFUNC(_wrap_draw_line), -1);
|
11527
|
+
rb_define_module_function(mGosu, "draw_triangle", VALUEFUNC(_wrap_draw_triangle), -1);
|
11528
|
+
rb_define_module_function(mGosu, "draw_quad", VALUEFUNC(_wrap_draw_quad), -1);
|
11529
|
+
rb_define_module_function(mGosu, "draw_rect", VALUEFUNC(_wrap_draw_rect), -1);
|
11530
|
+
rb_define_module_function(mGosu, "flush", VALUEFUNC(_wrap_flush), -1);
|
11531
|
+
rb_define_module_function(mGosu, "unsafe_gl", VALUEFUNC(_wrap_unsafe_gl), -1);
|
11532
|
+
rb_define_module_function(mGosu, "clip_to", VALUEFUNC(_wrap_clip_to), -1);
|
11533
|
+
rb_define_module_function(mGosu, "record", VALUEFUNC(_wrap_record), -1);
|
11534
|
+
rb_define_module_function(mGosu, "transform", VALUEFUNC(_wrap_transform), -1);
|
11535
|
+
rb_define_module_function(mGosu, "rotate", VALUEFUNC(_wrap_rotate), -1);
|
11536
|
+
rb_define_module_function(mGosu, "scale", VALUEFUNC(_wrap_scale), -1);
|
11537
|
+
rb_define_module_function(mGosu, "translate", VALUEFUNC(_wrap_translate), -1);
|
11318
11538
|
}
|
11319
11539
|
|