gosu 0.7.24 → 0.7.25
Sign up to get free protection for your applications and to get access to all the features.
- data/Gosu/ButtonsMac.hpp +2 -2
- data/Gosu/ButtonsWin.hpp +4 -1
- data/Gosu/ButtonsX.hpp +2 -2
- data/Gosu/Color.hpp +47 -29
- data/Gosu/Graphics.hpp +1 -1
- data/Gosu/Version.hpp +2 -2
- data/GosuImpl/Graphics/BitmapPNG.cpp +1 -1
- data/GosuImpl/Graphics/BitmapTouch.mm +0 -4
- data/GosuImpl/Graphics/Color.cpp +1 -1
- data/GosuImpl/Graphics/Graphics.cpp +1 -1
- data/GosuImpl/Graphics/Texture.cpp +2 -72
- data/GosuImpl/Graphics/Texture.hpp +0 -2
- data/GosuImpl/InputMac.mm +39 -9
- data/GosuImpl/RubyGosu.swg +32 -15
- data/GosuImpl/RubyGosu_wrap.cxx +269 -84
- data/GosuImpl/RubyGosu_wrap.h +1 -1
- data/GosuImpl/WindowMac.mm +10 -8
- data/GosuImpl/WindowWin.cpp +1 -1
- data/examples/CptnRuby.rb +1 -7
- data/examples/OpenGLIntegration.rb +1 -7
- data/examples/RMagickIntegration.rb +1 -7
- data/examples/TextInput.rb +1 -7
- data/examples/Tutorial.rb +1 -7
- data/lib/gosu/patches.rb +22 -11
- data/lib/gosu.rb +0 -0
- metadata +4 -4
data/GosuImpl/RubyGosu_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
|
+
* Version 2.0.1
|
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
|
@@ -310,7 +310,7 @@ template <typename T> T SwigValueInit() {
|
|
310
310
|
/*
|
311
311
|
Flags/methods for returning states.
|
312
312
|
|
313
|
-
The SWIG conversion methods, as ConvertPtr, return
|
313
|
+
The SWIG conversion methods, as ConvertPtr, return an integer
|
314
314
|
that tells if the conversion was successful or not. And if not,
|
315
315
|
an error code can be returned (see swigerrors.swg for the codes).
|
316
316
|
|
@@ -861,6 +861,15 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
861
861
|
#include <ruby.h>
|
862
862
|
#include <map>
|
863
863
|
|
864
|
+
/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
|
865
|
+
* breaks using rb_intern as an lvalue, as SWIG does. We work around this
|
866
|
+
* issue for now by disabling this.
|
867
|
+
* https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
|
868
|
+
*/
|
869
|
+
#ifdef rb_intern
|
870
|
+
# undef rb_intern
|
871
|
+
#endif
|
872
|
+
|
864
873
|
/* Remove global macros defined in Ruby's win32.h */
|
865
874
|
#ifdef write
|
866
875
|
# undef write
|
@@ -871,6 +880,12 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
871
880
|
#ifdef bind
|
872
881
|
# undef bind
|
873
882
|
#endif
|
883
|
+
#ifdef close
|
884
|
+
# undef close
|
885
|
+
#endif
|
886
|
+
#ifdef connect
|
887
|
+
# undef connect
|
888
|
+
#endif
|
874
889
|
|
875
890
|
|
876
891
|
/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
|
@@ -1013,7 +1028,7 @@ static VALUE _mSWIG = Qnil;
|
|
1013
1028
|
|
1014
1029
|
/* Define custom exceptions for errors that do not map to existing Ruby
|
1015
1030
|
exceptions. Note this only works for C++ since a global cannot be
|
1016
|
-
initialized by a
|
1031
|
+
initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
|
1017
1032
|
|
1018
1033
|
SWIGINTERN VALUE
|
1019
1034
|
getNullReferenceError(void) {
|
@@ -1158,9 +1173,6 @@ void Ruby_Format_OverloadedError(
|
|
1158
1173
|
}
|
1159
1174
|
|
1160
1175
|
/* -----------------------------------------------------------------------------
|
1161
|
-
* See the LICENSE file for information on copyright, usage and redistribution
|
1162
|
-
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
|
1163
|
-
*
|
1164
1176
|
* rubytracking.swg
|
1165
1177
|
*
|
1166
1178
|
* This file contains support for tracking mappings from
|
@@ -1312,9 +1324,6 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1312
1324
|
|
1313
1325
|
|
1314
1326
|
/* -----------------------------------------------------------------------------
|
1315
|
-
* See the LICENSE file for information on copyright, usage and redistribution
|
1316
|
-
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
|
1317
|
-
*
|
1318
1327
|
* rubyrun.swg
|
1319
1328
|
*
|
1320
1329
|
* This file contains the runtime support for Ruby modules
|
@@ -1358,7 +1367,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1358
1367
|
/* Error manipulation */
|
1359
1368
|
|
1360
1369
|
#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
|
1361
|
-
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
|
1370
|
+
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
|
1362
1371
|
#define SWIG_fail goto fail
|
1363
1372
|
|
1364
1373
|
|
@@ -1413,7 +1422,7 @@ static ID swig_call_id = 0;
|
|
1413
1422
|
++swig_virtual_calls;
|
1414
1423
|
# define SWIG_RELEASE_STACK --swig_virtual_calls;
|
1415
1424
|
# define Ruby_DirectorTypeMismatchException(x) \
|
1416
|
-
rb_raise( rb_eTypeError, x ); return c_result;
|
1425
|
+
rb_raise( rb_eTypeError, "%s", x ); return c_result;
|
1417
1426
|
|
1418
1427
|
static unsigned int swig_virtual_calls = 0;
|
1419
1428
|
|
@@ -1767,9 +1776,6 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1767
1776
|
#define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0)
|
1768
1777
|
|
1769
1778
|
/* -----------------------------------------------------------------------------
|
1770
|
-
* See the LICENSE file for information on copyright, usage and redistribution
|
1771
|
-
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
|
1772
|
-
*
|
1773
1779
|
* director.swg
|
1774
1780
|
*
|
1775
1781
|
* This file contains support for director classes that proxy
|
@@ -1792,6 +1798,8 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1792
1798
|
#include <iostream>
|
1793
1799
|
#include <map>
|
1794
1800
|
|
1801
|
+
# define SWIG_DIRECTOR_CAST(ARG) dynamic_cast<Swig::Director *>(ARG)
|
1802
|
+
|
1795
1803
|
namespace Swig {
|
1796
1804
|
/* memory handler */
|
1797
1805
|
struct GCItem
|
@@ -1944,7 +1952,7 @@ namespace Swig {
|
|
1944
1952
|
try {
|
1945
1953
|
throw;
|
1946
1954
|
} catch (DirectorException& e) {
|
1947
|
-
std::cerr << "
|
1955
|
+
std::cerr << "SWIG Director exception caught:" << std::endl
|
1948
1956
|
<< e.getMessage() << std::endl;
|
1949
1957
|
} catch (std::exception& e) {
|
1950
1958
|
std::cerr << "std::exception caught: "<< e.what() << std::endl;
|
@@ -1980,12 +1988,12 @@ namespace Swig {
|
|
1980
1988
|
class DirectorTypeMismatchException : public Swig::DirectorException {
|
1981
1989
|
public:
|
1982
1990
|
DirectorTypeMismatchException(VALUE error, const char *msg="")
|
1983
|
-
: Swig::DirectorException(error, "
|
1991
|
+
: Swig::DirectorException(error, "SWIG director type mismatch", msg)
|
1984
1992
|
{
|
1985
1993
|
}
|
1986
1994
|
|
1987
1995
|
DirectorTypeMismatchException(const char *msg="")
|
1988
|
-
: Swig::DirectorException(rb_eTypeError, "
|
1996
|
+
: Swig::DirectorException(rb_eTypeError, "SWIG director type mismatch", msg)
|
1989
1997
|
{
|
1990
1998
|
}
|
1991
1999
|
|
@@ -2006,7 +2014,7 @@ namespace Swig {
|
|
2006
2014
|
}
|
2007
2015
|
|
2008
2016
|
DirectorMethodException(const char* msg = "")
|
2009
|
-
: Swig::DirectorException(rb_eRuntimeError, "
|
2017
|
+
: Swig::DirectorException(rb_eRuntimeError, "SWIG director method error.", msg) {
|
2010
2018
|
}
|
2011
2019
|
|
2012
2020
|
static void raise(VALUE error)
|
@@ -2020,7 +2028,7 @@ namespace Swig {
|
|
2020
2028
|
{
|
2021
2029
|
public:
|
2022
2030
|
DirectorPureVirtualException(const char* msg = "")
|
2023
|
-
: DirectorException(rb_eRuntimeError, "
|
2031
|
+
: DirectorException(rb_eRuntimeError, "SWIG director pure virtual method called", msg)
|
2024
2032
|
{
|
2025
2033
|
}
|
2026
2034
|
|
@@ -2096,8 +2104,8 @@ namespace Swig {
|
|
2096
2104
|
|
2097
2105
|
/* ownership management */
|
2098
2106
|
private:
|
2099
|
-
typedef std::map<void*, GCItem_var>
|
2100
|
-
mutable
|
2107
|
+
typedef std::map<void*, GCItem_var> swig_ownership_map;
|
2108
|
+
mutable swig_ownership_map swig_owner;
|
2101
2109
|
#ifdef __PTHREAD__
|
2102
2110
|
static pthread_mutex_t swig_mutex_own;
|
2103
2111
|
#endif
|
@@ -2108,7 +2116,7 @@ namespace Swig {
|
|
2108
2116
|
{
|
2109
2117
|
if (vptr) {
|
2110
2118
|
SWIG_GUARD(swig_mutex_own);
|
2111
|
-
|
2119
|
+
swig_owner[vptr] = new GCArray_T<Type>(vptr);
|
2112
2120
|
}
|
2113
2121
|
}
|
2114
2122
|
|
@@ -2117,7 +2125,7 @@ namespace Swig {
|
|
2117
2125
|
{
|
2118
2126
|
if (vptr) {
|
2119
2127
|
SWIG_GUARD(swig_mutex_own);
|
2120
|
-
|
2128
|
+
swig_owner[vptr] = new GCItem_T<Type>(vptr);
|
2121
2129
|
}
|
2122
2130
|
}
|
2123
2131
|
|
@@ -2125,7 +2133,7 @@ namespace Swig {
|
|
2125
2133
|
{
|
2126
2134
|
if (vptr && own) {
|
2127
2135
|
SWIG_GUARD(swig_mutex_own);
|
2128
|
-
|
2136
|
+
swig_owner[vptr] = new GCItem_Object(own);
|
2129
2137
|
}
|
2130
2138
|
}
|
2131
2139
|
|
@@ -2134,10 +2142,10 @@ namespace Swig {
|
|
2134
2142
|
ruby_owntype own = 0;
|
2135
2143
|
if (vptr) {
|
2136
2144
|
SWIG_GUARD(swig_mutex_own);
|
2137
|
-
|
2138
|
-
if (iter !=
|
2145
|
+
swig_ownership_map::iterator iter = swig_owner.find(vptr);
|
2146
|
+
if (iter != swig_owner.end()) {
|
2139
2147
|
own = iter->second->get_own();
|
2140
|
-
|
2148
|
+
swig_owner.erase(iter);
|
2141
2149
|
}
|
2142
2150
|
}
|
2143
2151
|
return own;
|
@@ -2183,7 +2191,7 @@ static VALUE mGosu;
|
|
2183
2191
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
2184
2192
|
|
2185
2193
|
|
2186
|
-
#define SWIGVERSION
|
2194
|
+
#define SWIGVERSION 0x020001
|
2187
2195
|
#define SWIG_VERSION SWIGVERSION
|
2188
2196
|
|
2189
2197
|
|
@@ -2236,7 +2244,9 @@ namespace Gosu {
|
|
2236
2244
|
void register_entity(const std::wstring& name, Gosu::Image* image) { registerEntity(name, image->getData().toBitmap()); }
|
2237
2245
|
}
|
2238
2246
|
|
2247
|
+
#include <ctime>
|
2239
2248
|
#include <sstream>
|
2249
|
+
#include <boost/algorithm/string.hpp>
|
2240
2250
|
|
2241
2251
|
// New Ruby 1.9 syntax (for compilation with Ruby 1.8)
|
2242
2252
|
#ifndef RSTRING_LEN
|
@@ -2291,14 +2301,8 @@ namespace Gosu
|
|
2291
2301
|
throw std::logic_error("Blob length mismatch!");
|
2292
2302
|
Bitmap result;
|
2293
2303
|
result.resize(width, height);
|
2294
|
-
|
2295
|
-
|
2296
|
-
for (unsigned x = 0; x < width; ++x)
|
2297
|
-
{
|
2298
|
-
unsigned rgba = *rgbaIter;
|
2299
|
-
result.setPixel(x, y, Gosu::Color(rgba).abgr()); // swap R and B
|
2300
|
-
++rgbaIter;
|
2301
|
-
}
|
2304
|
+
std::memcpy(result.data(),
|
2305
|
+
reinterpret_cast<const boost::uint32_t*>(RSTRING_PTR(blob)), width * height * 4);
|
2302
2306
|
return result;
|
2303
2307
|
}
|
2304
2308
|
}
|
@@ -2375,13 +2379,13 @@ SWIG_ruby_failed(void)
|
|
2375
2379
|
}
|
2376
2380
|
|
2377
2381
|
|
2378
|
-
/*@SWIG:/usr/local/share/swig/
|
2382
|
+
/*@SWIG:/usr/local/share/swig/2.0.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2379
2383
|
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
|
2380
2384
|
{
|
2381
2385
|
VALUE obj = args[0];
|
2382
2386
|
VALUE type = TYPE(obj);
|
2383
2387
|
double *res = (double *)(args[1]);
|
2384
|
-
*res =
|
2388
|
+
*res = NUM2DBL(obj);
|
2385
2389
|
return obj;
|
2386
2390
|
}
|
2387
2391
|
/*@SWIG@*/
|
@@ -2417,7 +2421,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2417
2421
|
#include <string>
|
2418
2422
|
|
2419
2423
|
|
2420
|
-
/*@SWIG:/usr/local/share/swig/
|
2424
|
+
/*@SWIG:/usr/local/share/swig/2.0.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2421
2425
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
2422
2426
|
{
|
2423
2427
|
VALUE obj = args[0];
|
@@ -2491,7 +2495,7 @@ SWIG_From_std_string (const std::string& s)
|
|
2491
2495
|
}
|
2492
2496
|
|
2493
2497
|
|
2494
|
-
/*@SWIG:/usr/local/share/swig/
|
2498
|
+
/*@SWIG:/usr/local/share/swig/2.0.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2495
2499
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
2496
2500
|
{
|
2497
2501
|
VALUE obj = args[0];
|
@@ -2608,6 +2612,7 @@ SWIGINTERN std::vector< Gosu::Image * > Gosu_Image_loadTiles(Gosu::Window &windo
|
|
2608
2612
|
return vec;
|
2609
2613
|
}
|
2610
2614
|
SWIGINTERN std::string Gosu_Image_toBlob(Gosu::Image const *self){
|
2615
|
+
// TODO: Optimize with direct copy into a Ruby string
|
2611
2616
|
Gosu::Bitmap bmp = self->getData().toBitmap();
|
2612
2617
|
return std::string(reinterpret_cast<const char*>(bmp.data()),
|
2613
2618
|
reinterpret_cast<const char*>(bmp.data()) + bmp.width() * bmp.height() * 4);
|
@@ -2618,6 +2623,15 @@ SWIGINTERN unsigned int Gosu_Image_columns(Gosu::Image const *self){
|
|
2618
2623
|
SWIGINTERN unsigned int Gosu_Image_rows(Gosu::Image const *self){
|
2619
2624
|
return self->height();
|
2620
2625
|
}
|
2626
|
+
SWIGINTERN void Gosu_Image_save(Gosu::Image const *self,std::wstring const &filename){
|
2627
|
+
Gosu::Bitmap bmp = self->getData().toBitmap();
|
2628
|
+
Gosu::Buffer buf;
|
2629
|
+
if (boost::iends_with(filename, L".bmp"))
|
2630
|
+
Gosu::saveToBMP(bmp, buf.backWriter());
|
2631
|
+
else
|
2632
|
+
Gosu::saveToPNG(bmp, buf.backWriter());
|
2633
|
+
Gosu::saveFile(buf, filename);
|
2634
|
+
}
|
2621
2635
|
|
2622
2636
|
SWIGINTERNINLINE VALUE
|
2623
2637
|
SWIG_From_bool (bool value)
|
@@ -2724,6 +2738,11 @@ SWIGINTERN void Gosu_Window_scale__SWIG_1(Gosu::Window *self,double factorX,doub
|
|
2724
2738
|
rb_yield(Qnil);
|
2725
2739
|
self->graphics().popTransform();
|
2726
2740
|
}
|
2741
|
+
SWIGINTERN void Gosu_Window_scale__SWIG_2(Gosu::Window *self,double factorX,double factorY,double aroundX,double aroundY){
|
2742
|
+
self->graphics().pushTransform(Gosu::scale(factorX, factorY, aroundX, aroundY));
|
2743
|
+
rb_yield(Qnil);
|
2744
|
+
self->graphics().popTransform();
|
2745
|
+
}
|
2727
2746
|
SWIGINTERN void Gosu_Window_translate(Gosu::Window *self,double x,double y){
|
2728
2747
|
self->graphics().pushTransform(Gosu::translate(x, y));
|
2729
2748
|
rb_yield(Qnil);
|
@@ -2846,9 +2865,10 @@ void SwigDirector_Window::buttonDown(Gosu::Button arg0) {
|
|
2846
2865
|
VALUE result;
|
2847
2866
|
|
2848
2867
|
{
|
2849
|
-
|
2850
|
-
if (obj0 == -1)
|
2868
|
+
if (arg0 == Gosu::noButton)
|
2851
2869
|
obj0 = Qnil;
|
2870
|
+
else
|
2871
|
+
obj0 = LONG2NUM((&arg0)->id());
|
2852
2872
|
}
|
2853
2873
|
result = rb_funcall(swig_get_self(), rb_intern("button_down"), 1,obj0);
|
2854
2874
|
}
|
@@ -2859,9 +2879,10 @@ void SwigDirector_Window::buttonUp(Gosu::Button arg0) {
|
|
2859
2879
|
VALUE result;
|
2860
2880
|
|
2861
2881
|
{
|
2862
|
-
|
2863
|
-
if (obj0 == -1)
|
2882
|
+
if (arg0 == Gosu::noButton)
|
2864
2883
|
obj0 = Qnil;
|
2884
|
+
else
|
2885
|
+
obj0 = LONG2NUM((&arg0)->id());
|
2865
2886
|
}
|
2866
2887
|
result = rb_funcall(swig_get_self(), rb_intern("button_up"), 1,obj0);
|
2867
2888
|
}
|
@@ -3878,6 +3899,36 @@ fail:
|
|
3878
3899
|
}
|
3879
3900
|
|
3880
3901
|
|
3902
|
+
SWIGINTERN VALUE
|
3903
|
+
_wrap_Color_from_rgba(int argc, VALUE *argv, VALUE self) {
|
3904
|
+
boost::uint32_t arg1 ;
|
3905
|
+
unsigned long val1 ;
|
3906
|
+
int ecode1 = 0 ;
|
3907
|
+
Gosu::Color result;
|
3908
|
+
VALUE vresult = Qnil;
|
3909
|
+
|
3910
|
+
if ((argc < 1) || (argc > 1)) {
|
3911
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3912
|
+
}
|
3913
|
+
ecode1 = SWIG_AsVal_unsigned_SS_long(argv[0], &val1);
|
3914
|
+
if (!SWIG_IsOK(ecode1)) {
|
3915
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "boost::uint32_t","Gosu::Color::fromRGBA", 1, argv[0] ));
|
3916
|
+
}
|
3917
|
+
arg1 = static_cast< boost::uint32_t >(val1);
|
3918
|
+
{
|
3919
|
+
try {
|
3920
|
+
result = Gosu::Color::fromRGBA(arg1);
|
3921
|
+
} catch(const std::runtime_error& e) {
|
3922
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
3923
|
+
}
|
3924
|
+
}
|
3925
|
+
vresult = SWIG_NewPointerObj((new Gosu::Color(static_cast< const Gosu::Color& >(result))), SWIGTYPE_p_Gosu__Color, SWIG_POINTER_OWN | 0 );
|
3926
|
+
return vresult;
|
3927
|
+
fail:
|
3928
|
+
return Qnil;
|
3929
|
+
}
|
3930
|
+
|
3931
|
+
|
3881
3932
|
SWIGINTERN VALUE
|
3882
3933
|
_wrap_Color_from_hsv(int argc, VALUE *argv, VALUE self) {
|
3883
3934
|
double arg1 ;
|
@@ -3979,7 +4030,7 @@ fail:
|
|
3979
4030
|
|
3980
4031
|
|
3981
4032
|
SWIGINTERN VALUE
|
3982
|
-
|
4033
|
+
_wrap_Color_red(int argc, VALUE *argv, VALUE self) {
|
3983
4034
|
Gosu::Color *arg1 = (Gosu::Color *) 0 ;
|
3984
4035
|
void *argp1 = 0 ;
|
3985
4036
|
int res1 = 0 ;
|
@@ -3991,12 +4042,12 @@ _wrap_Color_alpha(int argc, VALUE *argv, VALUE self) {
|
|
3991
4042
|
}
|
3992
4043
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 );
|
3993
4044
|
if (!SWIG_IsOK(res1)) {
|
3994
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","
|
4045
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","red", 1, self ));
|
3995
4046
|
}
|
3996
4047
|
arg1 = reinterpret_cast< Gosu::Color * >(argp1);
|
3997
4048
|
{
|
3998
4049
|
try {
|
3999
|
-
result = ((Gosu::Color const *)arg1)->
|
4050
|
+
result = ((Gosu::Color const *)arg1)->red();
|
4000
4051
|
} catch(const std::runtime_error& e) {
|
4001
4052
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
4002
4053
|
}
|
@@ -4009,7 +4060,7 @@ fail:
|
|
4009
4060
|
|
4010
4061
|
|
4011
4062
|
SWIGINTERN VALUE
|
4012
|
-
|
4063
|
+
_wrap_Color_green(int argc, VALUE *argv, VALUE self) {
|
4013
4064
|
Gosu::Color *arg1 = (Gosu::Color *) 0 ;
|
4014
4065
|
void *argp1 = 0 ;
|
4015
4066
|
int res1 = 0 ;
|
@@ -4021,12 +4072,12 @@ _wrap_Color_red(int argc, VALUE *argv, VALUE self) {
|
|
4021
4072
|
}
|
4022
4073
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 );
|
4023
4074
|
if (!SWIG_IsOK(res1)) {
|
4024
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","
|
4075
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","green", 1, self ));
|
4025
4076
|
}
|
4026
4077
|
arg1 = reinterpret_cast< Gosu::Color * >(argp1);
|
4027
4078
|
{
|
4028
4079
|
try {
|
4029
|
-
result = ((Gosu::Color const *)arg1)->
|
4080
|
+
result = ((Gosu::Color const *)arg1)->green();
|
4030
4081
|
} catch(const std::runtime_error& e) {
|
4031
4082
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
4032
4083
|
}
|
@@ -4039,7 +4090,7 @@ fail:
|
|
4039
4090
|
|
4040
4091
|
|
4041
4092
|
SWIGINTERN VALUE
|
4042
|
-
|
4093
|
+
_wrap_Color_blue(int argc, VALUE *argv, VALUE self) {
|
4043
4094
|
Gosu::Color *arg1 = (Gosu::Color *) 0 ;
|
4044
4095
|
void *argp1 = 0 ;
|
4045
4096
|
int res1 = 0 ;
|
@@ -4051,12 +4102,12 @@ _wrap_Color_green(int argc, VALUE *argv, VALUE self) {
|
|
4051
4102
|
}
|
4052
4103
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 );
|
4053
4104
|
if (!SWIG_IsOK(res1)) {
|
4054
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","
|
4105
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","blue", 1, self ));
|
4055
4106
|
}
|
4056
4107
|
arg1 = reinterpret_cast< Gosu::Color * >(argp1);
|
4057
4108
|
{
|
4058
4109
|
try {
|
4059
|
-
result = ((Gosu::Color const *)arg1)->
|
4110
|
+
result = ((Gosu::Color const *)arg1)->blue();
|
4060
4111
|
} catch(const std::runtime_error& e) {
|
4061
4112
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
4062
4113
|
}
|
@@ -4069,7 +4120,7 @@ fail:
|
|
4069
4120
|
|
4070
4121
|
|
4071
4122
|
SWIGINTERN VALUE
|
4072
|
-
|
4123
|
+
_wrap_Color_alpha(int argc, VALUE *argv, VALUE self) {
|
4073
4124
|
Gosu::Color *arg1 = (Gosu::Color *) 0 ;
|
4074
4125
|
void *argp1 = 0 ;
|
4075
4126
|
int res1 = 0 ;
|
@@ -4081,12 +4132,12 @@ _wrap_Color_blue(int argc, VALUE *argv, VALUE self) {
|
|
4081
4132
|
}
|
4082
4133
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 );
|
4083
4134
|
if (!SWIG_IsOK(res1)) {
|
4084
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","
|
4135
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","alpha", 1, self ));
|
4085
4136
|
}
|
4086
4137
|
arg1 = reinterpret_cast< Gosu::Color * >(argp1);
|
4087
4138
|
{
|
4088
4139
|
try {
|
4089
|
-
result = ((Gosu::Color const *)arg1)->
|
4140
|
+
result = ((Gosu::Color const *)arg1)->alpha();
|
4090
4141
|
} catch(const std::runtime_error& e) {
|
4091
4142
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
4092
4143
|
}
|
@@ -4099,7 +4150,7 @@ fail:
|
|
4099
4150
|
|
4100
4151
|
|
4101
4152
|
SWIGINTERN VALUE
|
4102
|
-
|
4153
|
+
_wrap_Color_rede___(int argc, VALUE *argv, VALUE self) {
|
4103
4154
|
Gosu::Color *arg1 = (Gosu::Color *) 0 ;
|
4104
4155
|
Gosu::Color::Channel arg2 ;
|
4105
4156
|
void *argp1 = 0 ;
|
@@ -4112,17 +4163,17 @@ _wrap_Color_alphae___(int argc, VALUE *argv, VALUE self) {
|
|
4112
4163
|
}
|
4113
4164
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 );
|
4114
4165
|
if (!SWIG_IsOK(res1)) {
|
4115
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","
|
4166
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setRed", 1, self ));
|
4116
4167
|
}
|
4117
4168
|
arg1 = reinterpret_cast< Gosu::Color * >(argp1);
|
4118
4169
|
ecode2 = SWIG_AsVal_unsigned_SS_char(argv[0], &val2);
|
4119
4170
|
if (!SWIG_IsOK(ecode2)) {
|
4120
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Gosu::Color::Channel","
|
4171
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Gosu::Color::Channel","setRed", 2, argv[0] ));
|
4121
4172
|
}
|
4122
4173
|
arg2 = static_cast< Gosu::Color::Channel >(val2);
|
4123
4174
|
{
|
4124
4175
|
try {
|
4125
|
-
(arg1)->
|
4176
|
+
(arg1)->setRed(arg2);
|
4126
4177
|
} catch(const std::runtime_error& e) {
|
4127
4178
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
4128
4179
|
}
|
@@ -4134,7 +4185,7 @@ fail:
|
|
4134
4185
|
|
4135
4186
|
|
4136
4187
|
SWIGINTERN VALUE
|
4137
|
-
|
4188
|
+
_wrap_Color_greene___(int argc, VALUE *argv, VALUE self) {
|
4138
4189
|
Gosu::Color *arg1 = (Gosu::Color *) 0 ;
|
4139
4190
|
Gosu::Color::Channel arg2 ;
|
4140
4191
|
void *argp1 = 0 ;
|
@@ -4147,17 +4198,17 @@ _wrap_Color_rede___(int argc, VALUE *argv, VALUE self) {
|
|
4147
4198
|
}
|
4148
4199
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 );
|
4149
4200
|
if (!SWIG_IsOK(res1)) {
|
4150
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","
|
4201
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setGreen", 1, self ));
|
4151
4202
|
}
|
4152
4203
|
arg1 = reinterpret_cast< Gosu::Color * >(argp1);
|
4153
4204
|
ecode2 = SWIG_AsVal_unsigned_SS_char(argv[0], &val2);
|
4154
4205
|
if (!SWIG_IsOK(ecode2)) {
|
4155
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Gosu::Color::Channel","
|
4206
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Gosu::Color::Channel","setGreen", 2, argv[0] ));
|
4156
4207
|
}
|
4157
4208
|
arg2 = static_cast< Gosu::Color::Channel >(val2);
|
4158
4209
|
{
|
4159
4210
|
try {
|
4160
|
-
(arg1)->
|
4211
|
+
(arg1)->setGreen(arg2);
|
4161
4212
|
} catch(const std::runtime_error& e) {
|
4162
4213
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
4163
4214
|
}
|
@@ -4169,7 +4220,7 @@ fail:
|
|
4169
4220
|
|
4170
4221
|
|
4171
4222
|
SWIGINTERN VALUE
|
4172
|
-
|
4223
|
+
_wrap_Color_bluee___(int argc, VALUE *argv, VALUE self) {
|
4173
4224
|
Gosu::Color *arg1 = (Gosu::Color *) 0 ;
|
4174
4225
|
Gosu::Color::Channel arg2 ;
|
4175
4226
|
void *argp1 = 0 ;
|
@@ -4182,17 +4233,17 @@ _wrap_Color_greene___(int argc, VALUE *argv, VALUE self) {
|
|
4182
4233
|
}
|
4183
4234
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 );
|
4184
4235
|
if (!SWIG_IsOK(res1)) {
|
4185
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","
|
4236
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setBlue", 1, self ));
|
4186
4237
|
}
|
4187
4238
|
arg1 = reinterpret_cast< Gosu::Color * >(argp1);
|
4188
4239
|
ecode2 = SWIG_AsVal_unsigned_SS_char(argv[0], &val2);
|
4189
4240
|
if (!SWIG_IsOK(ecode2)) {
|
4190
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Gosu::Color::Channel","
|
4241
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Gosu::Color::Channel","setBlue", 2, argv[0] ));
|
4191
4242
|
}
|
4192
4243
|
arg2 = static_cast< Gosu::Color::Channel >(val2);
|
4193
4244
|
{
|
4194
4245
|
try {
|
4195
|
-
(arg1)->
|
4246
|
+
(arg1)->setBlue(arg2);
|
4196
4247
|
} catch(const std::runtime_error& e) {
|
4197
4248
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
4198
4249
|
}
|
@@ -4204,7 +4255,7 @@ fail:
|
|
4204
4255
|
|
4205
4256
|
|
4206
4257
|
SWIGINTERN VALUE
|
4207
|
-
|
4258
|
+
_wrap_Color_alphae___(int argc, VALUE *argv, VALUE self) {
|
4208
4259
|
Gosu::Color *arg1 = (Gosu::Color *) 0 ;
|
4209
4260
|
Gosu::Color::Channel arg2 ;
|
4210
4261
|
void *argp1 = 0 ;
|
@@ -4217,17 +4268,17 @@ _wrap_Color_bluee___(int argc, VALUE *argv, VALUE self) {
|
|
4217
4268
|
}
|
4218
4269
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 );
|
4219
4270
|
if (!SWIG_IsOK(res1)) {
|
4220
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","
|
4271
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setAlpha", 1, self ));
|
4221
4272
|
}
|
4222
4273
|
arg1 = reinterpret_cast< Gosu::Color * >(argp1);
|
4223
4274
|
ecode2 = SWIG_AsVal_unsigned_SS_char(argv[0], &val2);
|
4224
4275
|
if (!SWIG_IsOK(ecode2)) {
|
4225
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Gosu::Color::Channel","
|
4276
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "Gosu::Color::Channel","setAlpha", 2, argv[0] ));
|
4226
4277
|
}
|
4227
4278
|
arg2 = static_cast< Gosu::Color::Channel >(val2);
|
4228
4279
|
{
|
4229
4280
|
try {
|
4230
|
-
(arg1)->
|
4281
|
+
(arg1)->setAlpha(arg2);
|
4231
4282
|
} catch(const std::runtime_error& e) {
|
4232
4283
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
4233
4284
|
}
|
@@ -6822,6 +6873,40 @@ fail:
|
|
6822
6873
|
}
|
6823
6874
|
|
6824
6875
|
|
6876
|
+
SWIGINTERN VALUE
|
6877
|
+
_wrap_Image_save(int argc, VALUE *argv, VALUE self) {
|
6878
|
+
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
6879
|
+
std::wstring *arg2 = 0 ;
|
6880
|
+
void *argp1 = 0 ;
|
6881
|
+
int res1 = 0 ;
|
6882
|
+
std::wstring temp2 ;
|
6883
|
+
|
6884
|
+
if ((argc < 1) || (argc > 1)) {
|
6885
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
6886
|
+
}
|
6887
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
|
6888
|
+
if (!SWIG_IsOK(res1)) {
|
6889
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","save", 1, self ));
|
6890
|
+
}
|
6891
|
+
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
6892
|
+
{
|
6893
|
+
VALUE localTemporary = rb_obj_as_string(argv[0]);
|
6894
|
+
temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary));
|
6895
|
+
arg2 = &temp2;
|
6896
|
+
}
|
6897
|
+
{
|
6898
|
+
try {
|
6899
|
+
Gosu_Image_save((Gosu::Image const *)arg1,(std::wstring const &)*arg2);
|
6900
|
+
} catch(const std::runtime_error& e) {
|
6901
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
6902
|
+
}
|
6903
|
+
}
|
6904
|
+
return Qnil;
|
6905
|
+
fail:
|
6906
|
+
return Qnil;
|
6907
|
+
}
|
6908
|
+
|
6909
|
+
|
6825
6910
|
SWIGINTERN void
|
6826
6911
|
free_Gosu_Image(Gosu::Image *arg1) {
|
6827
6912
|
SWIG_RubyRemoveTracking(arg1);
|
@@ -7951,7 +8036,7 @@ _wrap_disown_TextInput(int argc, VALUE *argv, VALUE self) {
|
|
7951
8036
|
}
|
7952
8037
|
arg1 = reinterpret_cast< Gosu::TextInput * >(argp1);
|
7953
8038
|
{
|
7954
|
-
Swig::Director *director =
|
8039
|
+
Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
|
7955
8040
|
if (director) director->swig_disown();
|
7956
8041
|
}
|
7957
8042
|
|
@@ -9032,9 +9117,10 @@ _wrap_Window_char_to_button_id(int argc, VALUE *argv, VALUE self) {
|
|
9032
9117
|
}
|
9033
9118
|
}
|
9034
9119
|
{
|
9035
|
-
|
9036
|
-
if (vresult == -1)
|
9120
|
+
if (result == Gosu::noButton)
|
9037
9121
|
vresult = Qnil;
|
9122
|
+
else
|
9123
|
+
vresult = LONG2NUM((&result)->id());
|
9038
9124
|
}
|
9039
9125
|
return vresult;
|
9040
9126
|
fail:
|
@@ -9814,14 +9900,73 @@ fail:
|
|
9814
9900
|
}
|
9815
9901
|
|
9816
9902
|
|
9903
|
+
SWIGINTERN VALUE
|
9904
|
+
_wrap_Window_scale__SWIG_2(int argc, VALUE *argv, VALUE self) {
|
9905
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9906
|
+
double arg2 ;
|
9907
|
+
double arg3 ;
|
9908
|
+
double arg4 ;
|
9909
|
+
double arg5 ;
|
9910
|
+
void *argp1 = 0 ;
|
9911
|
+
int res1 = 0 ;
|
9912
|
+
double val2 ;
|
9913
|
+
int ecode2 = 0 ;
|
9914
|
+
double val3 ;
|
9915
|
+
int ecode3 = 0 ;
|
9916
|
+
double val4 ;
|
9917
|
+
int ecode4 = 0 ;
|
9918
|
+
double val5 ;
|
9919
|
+
int ecode5 = 0 ;
|
9920
|
+
|
9921
|
+
if ((argc < 4) || (argc > 4)) {
|
9922
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
9923
|
+
}
|
9924
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9925
|
+
if (!SWIG_IsOK(res1)) {
|
9926
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","scale", 1, self ));
|
9927
|
+
}
|
9928
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9929
|
+
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
9930
|
+
if (!SWIG_IsOK(ecode2)) {
|
9931
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","scale", 2, argv[0] ));
|
9932
|
+
}
|
9933
|
+
arg2 = static_cast< double >(val2);
|
9934
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
9935
|
+
if (!SWIG_IsOK(ecode3)) {
|
9936
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","scale", 3, argv[1] ));
|
9937
|
+
}
|
9938
|
+
arg3 = static_cast< double >(val3);
|
9939
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
9940
|
+
if (!SWIG_IsOK(ecode4)) {
|
9941
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","scale", 4, argv[2] ));
|
9942
|
+
}
|
9943
|
+
arg4 = static_cast< double >(val4);
|
9944
|
+
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
9945
|
+
if (!SWIG_IsOK(ecode5)) {
|
9946
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","scale", 5, argv[3] ));
|
9947
|
+
}
|
9948
|
+
arg5 = static_cast< double >(val5);
|
9949
|
+
{
|
9950
|
+
try {
|
9951
|
+
Gosu_Window_scale__SWIG_2(arg1,arg2,arg3,arg4,arg5);
|
9952
|
+
} catch(const std::runtime_error& e) {
|
9953
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9954
|
+
}
|
9955
|
+
}
|
9956
|
+
return Qnil;
|
9957
|
+
fail:
|
9958
|
+
return Qnil;
|
9959
|
+
}
|
9960
|
+
|
9961
|
+
|
9817
9962
|
SWIGINTERN VALUE _wrap_Window_scale(int nargs, VALUE *args, VALUE self) {
|
9818
9963
|
int argc;
|
9819
|
-
VALUE argv[
|
9964
|
+
VALUE argv[6];
|
9820
9965
|
int ii;
|
9821
9966
|
|
9822
9967
|
argc = nargs + 1;
|
9823
9968
|
argv[0] = self;
|
9824
|
-
if (argc >
|
9969
|
+
if (argc > 6) SWIG_fail;
|
9825
9970
|
for (ii = 1; (ii < argc); ++ii) {
|
9826
9971
|
argv[ii] = args[ii-1];
|
9827
9972
|
}
|
@@ -9861,11 +10006,45 @@ SWIGINTERN VALUE _wrap_Window_scale(int nargs, VALUE *args, VALUE self) {
|
|
9861
10006
|
}
|
9862
10007
|
}
|
9863
10008
|
}
|
10009
|
+
if (argc == 5) {
|
10010
|
+
int _v;
|
10011
|
+
void *vptr = 0;
|
10012
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0);
|
10013
|
+
_v = SWIG_CheckState(res);
|
10014
|
+
if (_v) {
|
10015
|
+
{
|
10016
|
+
int res = SWIG_AsVal_double(argv[1], NULL);
|
10017
|
+
_v = SWIG_CheckState(res);
|
10018
|
+
}
|
10019
|
+
if (_v) {
|
10020
|
+
{
|
10021
|
+
int res = SWIG_AsVal_double(argv[2], NULL);
|
10022
|
+
_v = SWIG_CheckState(res);
|
10023
|
+
}
|
10024
|
+
if (_v) {
|
10025
|
+
{
|
10026
|
+
int res = SWIG_AsVal_double(argv[3], NULL);
|
10027
|
+
_v = SWIG_CheckState(res);
|
10028
|
+
}
|
10029
|
+
if (_v) {
|
10030
|
+
{
|
10031
|
+
int res = SWIG_AsVal_double(argv[4], NULL);
|
10032
|
+
_v = SWIG_CheckState(res);
|
10033
|
+
}
|
10034
|
+
if (_v) {
|
10035
|
+
return _wrap_Window_scale__SWIG_2(nargs, args, self);
|
10036
|
+
}
|
10037
|
+
}
|
10038
|
+
}
|
10039
|
+
}
|
10040
|
+
}
|
10041
|
+
}
|
9864
10042
|
|
9865
10043
|
fail:
|
9866
|
-
Ruby_Format_OverloadedError( argc,
|
10044
|
+
Ruby_Format_OverloadedError( argc, 6, "scale",
|
9867
10045
|
" void scale(double factor)\n"
|
9868
|
-
" void scale(double factorX, double factorY)\n"
|
10046
|
+
" void scale(double factorX, double factorY)\n"
|
10047
|
+
" void scale(double factorX, double factorY, double aroundX, double aroundY)\n");
|
9869
10048
|
|
9870
10049
|
return Qnil;
|
9871
10050
|
}
|
@@ -9929,7 +10108,7 @@ _wrap_disown_Window(int argc, VALUE *argv, VALUE self) {
|
|
9929
10108
|
}
|
9930
10109
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9931
10110
|
{
|
9932
|
-
Swig::Director *director =
|
10111
|
+
Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
|
9933
10112
|
if (director) director->swig_disown();
|
9934
10113
|
}
|
9935
10114
|
|
@@ -10274,8 +10453,8 @@ SWIGEXPORT void Init_gosu(void) {
|
|
10274
10453
|
SWIG_RubyInitializeTrackings();
|
10275
10454
|
rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0)));
|
10276
10455
|
rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(7)));
|
10277
|
-
rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(
|
10278
|
-
rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.7.
|
10456
|
+
rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(25)));
|
10457
|
+
rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.7.25"));
|
10279
10458
|
rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
|
10280
10459
|
rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
|
10281
10460
|
rb_define_module_function(mGosu, "degrees_to_radians", VALUEFUNC(_wrap_degrees_to_radians), -1);
|
@@ -10301,16 +10480,18 @@ SWIGEXPORT void Init_gosu(void) {
|
|
10301
10480
|
SWIG_TypeClientData(SWIGTYPE_p_Gosu__Color, (void *) &SwigClassColor);
|
10302
10481
|
rb_define_alloc_func(SwigClassColor.klass, _wrap_Color_allocate);
|
10303
10482
|
rb_define_method(SwigClassColor.klass, "initialize", VALUEFUNC(_wrap_new_Color), -1);
|
10483
|
+
rb_define_const(SwigClassColor.klass, "GL_FORMAT", SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Gosu::Color::GL_FORMAT)));
|
10484
|
+
rb_define_singleton_method(SwigClassColor.klass, "from_rgba", VALUEFUNC(_wrap_Color_from_rgba), -1);
|
10304
10485
|
rb_define_singleton_method(SwigClassColor.klass, "from_hsv", VALUEFUNC(_wrap_Color_from_hsv), -1);
|
10305
10486
|
rb_define_singleton_method(SwigClassColor.klass, "from_ahsv", VALUEFUNC(_wrap_Color_from_ahsv), -1);
|
10306
|
-
rb_define_method(SwigClassColor.klass, "alpha", VALUEFUNC(_wrap_Color_alpha), -1);
|
10307
10487
|
rb_define_method(SwigClassColor.klass, "red", VALUEFUNC(_wrap_Color_red), -1);
|
10308
10488
|
rb_define_method(SwigClassColor.klass, "green", VALUEFUNC(_wrap_Color_green), -1);
|
10309
10489
|
rb_define_method(SwigClassColor.klass, "blue", VALUEFUNC(_wrap_Color_blue), -1);
|
10310
|
-
rb_define_method(SwigClassColor.klass, "alpha
|
10490
|
+
rb_define_method(SwigClassColor.klass, "alpha", VALUEFUNC(_wrap_Color_alpha), -1);
|
10311
10491
|
rb_define_method(SwigClassColor.klass, "red=", VALUEFUNC(_wrap_Color_rede___), -1);
|
10312
10492
|
rb_define_method(SwigClassColor.klass, "green=", VALUEFUNC(_wrap_Color_greene___), -1);
|
10313
10493
|
rb_define_method(SwigClassColor.klass, "blue=", VALUEFUNC(_wrap_Color_bluee___), -1);
|
10494
|
+
rb_define_method(SwigClassColor.klass, "alpha=", VALUEFUNC(_wrap_Color_alphae___), -1);
|
10314
10495
|
rb_define_method(SwigClassColor.klass, "hue", VALUEFUNC(_wrap_Color_hue), -1);
|
10315
10496
|
rb_define_method(SwigClassColor.klass, "hue=", VALUEFUNC(_wrap_Color_huee___), -1);
|
10316
10497
|
rb_define_method(SwigClassColor.klass, "saturation", VALUEFUNC(_wrap_Color_saturation), -1);
|
@@ -10390,6 +10571,7 @@ SWIGEXPORT void Init_gosu(void) {
|
|
10390
10571
|
rb_define_method(SwigClassImage.klass, "to_blob", VALUEFUNC(_wrap_Image_to_blob), -1);
|
10391
10572
|
rb_define_method(SwigClassImage.klass, "columns", VALUEFUNC(_wrap_Image_columns), -1);
|
10392
10573
|
rb_define_method(SwigClassImage.klass, "rows", VALUEFUNC(_wrap_Image_rows), -1);
|
10574
|
+
rb_define_method(SwigClassImage.klass, "save", VALUEFUNC(_wrap_Image_save), -1);
|
10393
10575
|
SwigClassImage.mark = 0;
|
10394
10576
|
SwigClassImage.destroy = (void (*)(void *)) free_Gosu_Image;
|
10395
10577
|
SwigClassImage.trackObjects = 1;
|
@@ -10562,6 +10744,9 @@ SWIGEXPORT void Init_gosu(void) {
|
|
10562
10744
|
rb_define_const(mGosu, "NoButton", SWIG_From_int(static_cast< int >(Gosu::noButton)));
|
10563
10745
|
|
10564
10746
|
GosusDarkSide::oncePerTick = GosusDarkSide::yieldToOtherRubyThreads;
|
10747
|
+
// While we are at it, to some healthy srand() - otherwise unavailable to Ruby people
|
10748
|
+
std::srand(static_cast<unsigned int>(std::time(0)));
|
10749
|
+
std::rand(); // and flush the first value
|
10565
10750
|
|
10566
10751
|
rb_define_module_function(mGosu, "disown_TextInput", VALUEFUNC(_wrap_disown_TextInput), -1);
|
10567
10752
|
|