gosu 0.15.1 → 1.1.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/COPYING +1 -1
- data/dependencies/SDL/include/SDL.h +138 -0
- data/dependencies/SDL/include/SDL_assert.h +293 -0
- data/dependencies/SDL/include/SDL_atomic.h +295 -0
- data/dependencies/SDL/include/SDL_audio.h +859 -0
- data/dependencies/SDL/include/SDL_bits.h +121 -0
- data/dependencies/SDL/include/SDL_blendmode.h +123 -0
- data/dependencies/SDL/include/SDL_clipboard.h +71 -0
- data/dependencies/SDL/include/SDL_config.h +55 -0
- data/dependencies/SDL/include/SDL_config_android.h +182 -0
- data/dependencies/SDL/include/SDL_config_iphoneos.h +207 -0
- data/dependencies/SDL/include/SDL_config_macosx.h +266 -0
- data/dependencies/SDL/include/SDL_config_minimal.h +85 -0
- data/dependencies/SDL/include/SDL_config_os2.h +188 -0
- data/dependencies/SDL/include/SDL_config_pandora.h +135 -0
- data/dependencies/SDL/include/SDL_config_psp.h +165 -0
- data/dependencies/SDL/include/SDL_config_windows.h +288 -0
- data/dependencies/SDL/include/SDL_config_winrt.h +243 -0
- data/dependencies/SDL/include/SDL_config_wiz.h +149 -0
- data/dependencies/SDL/include/SDL_copying.h +20 -0
- data/dependencies/SDL/include/SDL_cpuinfo.h +299 -0
- data/dependencies/SDL/include/SDL_egl.h +1676 -0
- data/dependencies/SDL/include/SDL_endian.h +263 -0
- data/dependencies/SDL/include/SDL_error.h +112 -0
- data/dependencies/SDL/include/SDL_events.h +827 -0
- data/dependencies/SDL/include/SDL_filesystem.h +136 -0
- data/dependencies/SDL/include/SDL_gamecontroller.h +541 -0
- data/dependencies/SDL/include/SDL_gesture.h +87 -0
- data/dependencies/SDL/include/SDL_haptic.h +1247 -0
- data/dependencies/SDL/include/SDL_hints.h +1578 -0
- data/dependencies/SDL/include/SDL_joystick.h +499 -0
- data/dependencies/SDL/include/SDL_keyboard.h +217 -0
- data/dependencies/SDL/include/SDL_keycode.h +351 -0
- data/dependencies/SDL/include/SDL_loadso.h +81 -0
- data/dependencies/SDL/include/SDL_locale.h +101 -0
- data/dependencies/SDL/include/SDL_log.h +211 -0
- data/dependencies/SDL/include/SDL_main.h +180 -0
- data/dependencies/SDL/include/SDL_messagebox.h +146 -0
- data/dependencies/SDL/include/SDL_metal.h +117 -0
- data/dependencies/SDL/include/SDL_misc.h +75 -0
- data/dependencies/SDL/include/SDL_mouse.h +302 -0
- data/dependencies/SDL/include/SDL_mutex.h +251 -0
- data/dependencies/SDL/include/SDL_name.h +33 -0
- data/dependencies/SDL/include/SDL_opengl.h +2183 -0
- data/dependencies/SDL/include/SDL_opengl_glext.h +11180 -0
- data/dependencies/SDL/include/SDL_opengles.h +39 -0
- data/dependencies/SDL/include/SDL_opengles2.h +52 -0
- data/dependencies/SDL/include/SDL_opengles2_gl2.h +621 -0
- data/dependencies/SDL/include/SDL_opengles2_gl2ext.h +2050 -0
- data/dependencies/SDL/include/SDL_opengles2_gl2platform.h +30 -0
- data/dependencies/SDL/include/SDL_opengles2_khrplatform.h +282 -0
- data/dependencies/SDL/include/SDL_pixels.h +479 -0
- data/dependencies/SDL/include/SDL_platform.h +198 -0
- data/dependencies/SDL/include/SDL_power.h +75 -0
- data/dependencies/SDL/include/SDL_quit.h +58 -0
- data/dependencies/SDL/include/SDL_rect.h +174 -0
- data/dependencies/SDL/include/SDL_render.h +1158 -0
- data/dependencies/SDL/include/SDL_revision.h +2 -0
- data/dependencies/SDL/include/SDL_rwops.h +283 -0
- data/dependencies/SDL/include/SDL_scancode.h +413 -0
- data/dependencies/SDL/include/SDL_sensor.h +267 -0
- data/dependencies/SDL/include/SDL_shape.h +144 -0
- data/dependencies/SDL/include/SDL_stdinc.h +647 -0
- data/dependencies/SDL/include/SDL_surface.h +563 -0
- data/dependencies/SDL/include/SDL_system.h +325 -0
- data/dependencies/SDL/include/SDL_syswm.h +354 -0
- data/dependencies/SDL/include/SDL_test.h +69 -0
- data/dependencies/SDL/include/SDL_test_assert.h +105 -0
- data/dependencies/SDL/include/SDL_test_common.h +218 -0
- data/dependencies/SDL/include/SDL_test_compare.h +69 -0
- data/dependencies/SDL/include/SDL_test_crc32.h +124 -0
- data/dependencies/SDL/include/SDL_test_font.h +81 -0
- data/dependencies/SDL/include/SDL_test_fuzzer.h +384 -0
- data/dependencies/SDL/include/SDL_test_harness.h +134 -0
- data/dependencies/SDL/include/SDL_test_images.h +78 -0
- data/dependencies/SDL/include/SDL_test_log.h +67 -0
- data/dependencies/SDL/include/SDL_test_md5.h +129 -0
- data/dependencies/SDL/include/SDL_test_memory.h +63 -0
- data/dependencies/SDL/include/SDL_test_random.h +115 -0
- data/dependencies/SDL/include/SDL_thread.h +366 -0
- data/dependencies/SDL/include/SDL_timer.h +115 -0
- data/dependencies/SDL/include/SDL_touch.h +102 -0
- data/dependencies/SDL/include/SDL_types.h +29 -0
- data/dependencies/SDL/include/SDL_version.h +162 -0
- data/dependencies/SDL/include/SDL_video.h +1282 -0
- data/dependencies/SDL/include/SDL_vulkan.h +276 -0
- data/dependencies/SDL/include/begin_code.h +166 -0
- data/dependencies/SDL/include/close_code.h +40 -0
- data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
- data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
- data/dependencies/SDL_sound/SDL_sound.c +795 -0
- data/dependencies/SDL_sound/SDL_sound.h +725 -0
- data/dependencies/SDL_sound/SDL_sound_aiff.c +537 -0
- data/dependencies/SDL_sound/SDL_sound_au.c +352 -0
- data/dependencies/SDL_sound/SDL_sound_coreaudio.c +747 -0
- data/dependencies/SDL_sound/SDL_sound_flac.c +182 -0
- data/dependencies/SDL_sound/SDL_sound_internal.h +304 -0
- data/dependencies/SDL_sound/SDL_sound_modplug.c +228 -0
- data/dependencies/SDL_sound/SDL_sound_mp3.c +184 -0
- data/dependencies/SDL_sound/SDL_sound_raw.c +164 -0
- data/dependencies/SDL_sound/SDL_sound_shn.c +1309 -0
- data/dependencies/SDL_sound/SDL_sound_voc.c +550 -0
- data/dependencies/SDL_sound/SDL_sound_vorbis.c +223 -0
- data/dependencies/SDL_sound/SDL_sound_wav.c +783 -0
- data/dependencies/SDL_sound/dr_flac.h +5906 -0
- data/dependencies/SDL_sound/dr_mp3.h +2832 -0
- data/dependencies/SDL_sound/libmodplug/fastmix.c +1748 -0
- data/dependencies/SDL_sound/libmodplug/libmodplug.h +1001 -0
- data/dependencies/SDL_sound/libmodplug/load_669.c +188 -0
- data/dependencies/SDL_sound/libmodplug/load_abc.c +4725 -0
- data/dependencies/SDL_sound/libmodplug/load_amf.c +403 -0
- data/dependencies/SDL_sound/libmodplug/load_ams.c +587 -0
- data/dependencies/SDL_sound/libmodplug/load_dbm.c +357 -0
- data/dependencies/SDL_sound/libmodplug/load_dmf.c +531 -0
- data/dependencies/SDL_sound/libmodplug/load_dsm.c +232 -0
- data/dependencies/SDL_sound/libmodplug/load_far.c +253 -0
- data/dependencies/SDL_sound/libmodplug/load_it.c +796 -0
- data/dependencies/SDL_sound/libmodplug/load_mdl.c +488 -0
- data/dependencies/SDL_sound/libmodplug/load_med.c +757 -0
- data/dependencies/SDL_sound/libmodplug/load_mid.c +1405 -0
- data/dependencies/SDL_sound/libmodplug/load_mod.c +269 -0
- data/dependencies/SDL_sound/libmodplug/load_mt2.c +546 -0
- data/dependencies/SDL_sound/libmodplug/load_mtm.c +142 -0
- data/dependencies/SDL_sound/libmodplug/load_okt.c +192 -0
- data/dependencies/SDL_sound/libmodplug/load_pat.c +1143 -0
- data/dependencies/SDL_sound/libmodplug/load_pat.h +25 -0
- data/dependencies/SDL_sound/libmodplug/load_psm.c +350 -0
- data/dependencies/SDL_sound/libmodplug/load_ptm.c +204 -0
- data/dependencies/SDL_sound/libmodplug/load_s3m.c +325 -0
- data/dependencies/SDL_sound/libmodplug/load_stm.c +180 -0
- data/dependencies/SDL_sound/libmodplug/load_ult.c +206 -0
- data/dependencies/SDL_sound/libmodplug/load_umx.c +51 -0
- data/dependencies/SDL_sound/libmodplug/load_xm.c +554 -0
- data/dependencies/SDL_sound/libmodplug/mmcmp.c +382 -0
- data/dependencies/SDL_sound/libmodplug/modplug.c +170 -0
- data/dependencies/SDL_sound/libmodplug/modplug.h +90 -0
- data/dependencies/SDL_sound/libmodplug/snd_dsp.c +301 -0
- data/dependencies/SDL_sound/libmodplug/snd_flt.c +63 -0
- data/dependencies/SDL_sound/libmodplug/snd_fx.c +2350 -0
- data/dependencies/SDL_sound/libmodplug/sndfile.c +1169 -0
- data/dependencies/SDL_sound/libmodplug/sndmix.c +1034 -0
- data/dependencies/SDL_sound/libmodplug/tables.h +371 -0
- data/{src/stb_vorbis.c → dependencies/SDL_sound/stb_vorbis.h} +143 -78
- data/dependencies/al_soft/AL/al.h +655 -0
- data/dependencies/al_soft/AL/alc.h +270 -0
- data/dependencies/al_soft/AL/alext.h +585 -0
- data/dependencies/al_soft/AL/efx-creative.h +3 -0
- data/dependencies/al_soft/AL/efx-presets.h +402 -0
- data/dependencies/al_soft/AL/efx.h +762 -0
- data/dependencies/al_soft/x64/libOpenAL32.dll.a +0 -0
- data/dependencies/al_soft/x86/libOpenAL32.dll.a +0 -0
- data/{src → dependencies/stb}/stb_image.h +330 -127
- data/{src → dependencies/stb}/stb_image_write.h +156 -85
- data/{src → dependencies/stb}/stb_truetype.h +192 -69
- data/{src → dependencies/utf8proc}/utf8proc.c +0 -0
- data/{src → dependencies/utf8proc}/utf8proc.h +0 -0
- data/{src → dependencies/utf8proc}/utf8proc_data.h +0 -0
- data/ext/gosu/extconf.rb +53 -39
- data/{Gosu → include/Gosu}/Audio.hpp +6 -8
- data/include/Gosu/Bitmap.hpp +100 -0
- data/{Gosu → include/Gosu}/Buttons.hpp +104 -44
- data/{Gosu → include/Gosu}/Color.hpp +0 -0
- data/{Gosu → include/Gosu}/Directories.hpp +0 -0
- data/{Gosu → include/Gosu}/Font.hpp +1 -1
- data/{Gosu → include/Gosu}/Fwd.hpp +0 -5
- data/{Gosu → include/Gosu}/Gosu.hpp +0 -0
- data/{Gosu → include/Gosu}/Graphics.hpp +0 -0
- data/{Gosu → include/Gosu}/GraphicsBase.hpp +0 -0
- data/{Gosu → include/Gosu}/IO.hpp +0 -0
- data/{Gosu → include/Gosu}/Image.hpp +7 -6
- data/{Gosu → include/Gosu}/ImageData.hpp +0 -0
- data/{Gosu → include/Gosu}/Input.hpp +39 -51
- data/{Gosu → include/Gosu}/Inspection.hpp +0 -0
- data/{Gosu → include/Gosu}/Math.hpp +0 -0
- data/{Gosu → include/Gosu}/Platform.hpp +0 -0
- data/{Gosu → include/Gosu}/Text.hpp +0 -0
- data/{Gosu → include/Gosu}/TextInput.hpp +0 -0
- data/{Gosu → include/Gosu}/Timing.hpp +0 -0
- data/{Gosu → include/Gosu}/Utility.hpp +15 -4
- data/{Gosu → include/Gosu}/Version.hpp +3 -3
- data/{Gosu → include/Gosu}/Window.hpp +46 -34
- data/lib/OpenAL32.dll +0 -0
- data/lib/SDL2.dll +0 -0
- data/lib/gosu.rb +0 -3
- data/lib/gosu/patches.rb +0 -23
- data/lib/gosu/preview.rb +1 -3
- data/lib/gosu/swig_patches.rb +6 -8
- data/lib64/OpenAL32.dll +0 -0
- data/lib64/SDL2.dll +0 -0
- data/rdoc/gosu.rb +112 -23
- data/src/Audio.cpp +50 -224
- data/src/AudioFile.hpp +20 -37
- data/src/AudioFileAudioToolbox.cpp +237 -0
- data/src/AudioFileSDLSound.cpp +147 -0
- data/src/AudioImpl.cpp +3 -12
- data/src/AudioImpl.hpp +3 -1
- data/src/Bitmap.cpp +85 -83
- data/src/BitmapIO.cpp +52 -58
- data/src/Font.cpp +4 -1
- data/src/Graphics.cpp +7 -4
- data/src/Image.cpp +13 -16
- data/src/Input.cpp +412 -164
- data/src/LargeImageData.cpp +2 -1
- data/src/MarkupParser.cpp +2 -1
- data/src/Resolution.cpp +8 -8
- data/src/RubyGosu.cxx +1184 -352
- data/src/RubyGosu.h +3 -2
- data/src/TexChunk.cpp +1 -1
- data/src/Text.cpp +1 -0
- data/src/TextBuilder.cpp +3 -1
- data/src/Texture.cpp +1 -1
- data/src/TrueTypeFont.cpp +2 -1
- data/src/TrueTypeFontWin.cpp +3 -3
- data/src/Utility.cpp +11 -7
- data/src/Window.cpp +90 -62
- data/src/WindowUIKit.cpp +21 -9
- metadata +195 -46
- data/Gosu/AutoLink.hpp +0 -14
- data/Gosu/Bitmap.hpp +0 -113
- data/lib/gosu/zen.rb +0 -89
- data/src/AudioToolboxFile.hpp +0 -210
- data/src/MPEGFile.hpp +0 -90
- data/src/OggFile.hpp +0 -92
- data/src/SndFile.hpp +0 -174
- data/src/WinMain.cpp +0 -64
data/src/LargeImageData.cpp
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
#include <Gosu/Graphics.hpp>
|
4
4
|
#include <Gosu/Math.hpp>
|
5
5
|
#include <cmath>
|
6
|
+
#include <stdexcept>
|
6
7
|
using namespace std;
|
7
8
|
|
8
9
|
Gosu::LargeImageData::LargeImageData(const Bitmap& source, int tile_width, int tile_height,
|
@@ -184,7 +185,7 @@ Gosu::Bitmap Gosu::LargeImageData::to_bitmap() const
|
|
184
185
|
int x = 0;
|
185
186
|
for (int tx = 0; tx < tiles_x; ++tx) {
|
186
187
|
ImageData& tile = *tiles[ty * tiles_x + tx];
|
187
|
-
bitmap.insert(tile.to_bitmap()
|
188
|
+
bitmap.insert(x, y, tile.to_bitmap());
|
188
189
|
x += tile.width();
|
189
190
|
}
|
190
191
|
y += tiles[ty * tiles_x]->height();
|
data/src/MarkupParser.cpp
CHANGED
data/src/Resolution.cpp
CHANGED
@@ -18,12 +18,12 @@ static SDL_DisplayMode display_mode(Gosu::Window* window)
|
|
18
18
|
return result;
|
19
19
|
}
|
20
20
|
|
21
|
-
|
21
|
+
int Gosu::screen_width(Window* window)
|
22
22
|
{
|
23
23
|
return display_mode(window).w;
|
24
24
|
}
|
25
25
|
|
26
|
-
|
26
|
+
int Gosu::screen_height(Window* window)
|
27
27
|
{
|
28
28
|
return display_mode(window).h;
|
29
29
|
}
|
@@ -41,12 +41,12 @@ static NSSize max_window_size(Gosu::Window* window)
|
|
41
41
|
return [NSWindow contentRectForFrameRect:screen_frame styleMask:style].size;
|
42
42
|
}
|
43
43
|
|
44
|
-
|
44
|
+
int Gosu::available_width(Window* window)
|
45
45
|
{
|
46
46
|
return max_window_size(window).width;
|
47
47
|
}
|
48
48
|
|
49
|
-
|
49
|
+
int Gosu::available_height(Window* window)
|
50
50
|
{
|
51
51
|
return max_window_size(window).height;
|
52
52
|
}
|
@@ -90,12 +90,12 @@ static SIZE max_window_size(Gosu::Window* window)
|
|
90
90
|
return size;
|
91
91
|
}
|
92
92
|
|
93
|
-
|
93
|
+
int Gosu::available_width(Window* window)
|
94
94
|
{
|
95
95
|
return max_window_size(window).cx;
|
96
96
|
}
|
97
97
|
|
98
|
-
|
98
|
+
int Gosu::available_height(Window* window)
|
99
99
|
{
|
100
100
|
return max_window_size(window).cy;
|
101
101
|
}
|
@@ -104,12 +104,12 @@ unsigned Gosu::available_height(Window* window)
|
|
104
104
|
#ifdef GOSU_IS_X
|
105
105
|
// Pessimistic fallback implementation for available_width / available_height.
|
106
106
|
// TODO: Look at this NET_WORKAREA based implementation: https://github.com/glfw/glfw/pull/989/files
|
107
|
-
|
107
|
+
int Gosu::available_width(Window* window)
|
108
108
|
{
|
109
109
|
return static_cast<unsigned>(Gosu::screen_width(window) * 0.9);
|
110
110
|
}
|
111
111
|
|
112
|
-
|
112
|
+
int Gosu::available_height(Window* window)
|
113
113
|
{
|
114
114
|
return static_cast<unsigned>(Gosu::screen_height(window) * 0.8);
|
115
115
|
}
|
data/src/RubyGosu.cxx
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version 4.0
|
3
|
+
* Version 4.1.0
|
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
|
@@ -1613,6 +1613,8 @@ SWIGRUNTIMEINLINE char *
|
|
1613
1613
|
SWIG_Ruby_MangleStr(VALUE obj)
|
1614
1614
|
{
|
1615
1615
|
VALUE stype = rb_iv_get(obj, "@__swigtype__");
|
1616
|
+
if (NIL_P(stype))
|
1617
|
+
return NULL;
|
1616
1618
|
return StringValuePtr(stype);
|
1617
1619
|
}
|
1618
1620
|
|
@@ -2172,22 +2174,21 @@ namespace Swig {
|
|
2172
2174
|
|
2173
2175
|
/* -------- TYPES TABLE (BEGIN) -------- */
|
2174
2176
|
|
2175
|
-
#define
|
2176
|
-
#define
|
2177
|
-
#define
|
2178
|
-
#define
|
2179
|
-
#define
|
2180
|
-
#define
|
2181
|
-
#define
|
2182
|
-
#define
|
2183
|
-
#define
|
2184
|
-
#define
|
2185
|
-
#define
|
2186
|
-
#define
|
2187
|
-
#define
|
2188
|
-
|
2189
|
-
static
|
2190
|
-
static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
|
2177
|
+
#define SWIGTYPE_p_Gosu__Channel swig_types[0]
|
2178
|
+
#define SWIGTYPE_p_Gosu__Color swig_types[1]
|
2179
|
+
#define SWIGTYPE_p_Gosu__Font swig_types[2]
|
2180
|
+
#define SWIGTYPE_p_Gosu__GLTexInfo swig_types[3]
|
2181
|
+
#define SWIGTYPE_p_Gosu__Image swig_types[4]
|
2182
|
+
#define SWIGTYPE_p_Gosu__Sample swig_types[5]
|
2183
|
+
#define SWIGTYPE_p_Gosu__Song swig_types[6]
|
2184
|
+
#define SWIGTYPE_p_Gosu__TextInput swig_types[7]
|
2185
|
+
#define SWIGTYPE_p_Gosu__Window swig_types[8]
|
2186
|
+
#define SWIGTYPE_p_char swig_types[9]
|
2187
|
+
#define SWIGTYPE_p_double swig_types[10]
|
2188
|
+
#define SWIGTYPE_p_std__arrayT_double_16_t swig_types[11]
|
2189
|
+
#define SWIGTYPE_p_std__string swig_types[12]
|
2190
|
+
static swig_type_info *swig_types[14];
|
2191
|
+
static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0};
|
2191
2192
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
2192
2193
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
2193
2194
|
|
@@ -2202,7 +2203,7 @@ static VALUE mGosu;
|
|
2202
2203
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
2203
2204
|
|
2204
2205
|
|
2205
|
-
#define SWIGVERSION
|
2206
|
+
#define SWIGVERSION 0x040100
|
2206
2207
|
#define SWIG_VERSION SWIGVERSION
|
2207
2208
|
|
2208
2209
|
|
@@ -2265,20 +2266,21 @@ namespace Gosu
|
|
2265
2266
|
rb_funcall(block, rb_intern("call"), 0);
|
2266
2267
|
}
|
2267
2268
|
|
2268
|
-
void load_bitmap(Bitmap& bitmap, VALUE val)
|
2269
|
+
void load_bitmap(Gosu::Bitmap& bitmap, VALUE val)
|
2269
2270
|
{
|
2270
2271
|
// Try to treat as filename first.
|
2271
2272
|
if (rb_respond_to(val, rb_intern("to_str"))) {
|
2272
2273
|
VALUE to_str = rb_funcall(val, rb_intern("to_str"), 0);
|
2273
2274
|
const char* filename = StringValuePtr(to_str);
|
2274
|
-
load_image_file(
|
2275
|
+
bitmap = Gosu::load_image_file(filename);
|
2275
2276
|
return;
|
2276
2277
|
}
|
2277
2278
|
|
2278
2279
|
// Otherwise, try to call .to_blob on it (works with RMagick, TexPlay etc).
|
2279
2280
|
VALUE conversion = rb_str_new2("to_blob { self.format = 'RGBA'; self.depth = 8 }");
|
2280
2281
|
VALUE blob = rb_obj_instance_eval(1, &conversion, val);
|
2281
|
-
|
2282
|
+
Check_Type(blob, T_STRING);
|
2283
|
+
|
2282
2284
|
int width = NUM2ULONG(rb_funcall(val, rb_intern("columns"), 0));
|
2283
2285
|
int height = NUM2ULONG(rb_funcall(val, rb_intern("rows"), 0));
|
2284
2286
|
|
@@ -2326,6 +2328,23 @@ namespace Gosu
|
|
2326
2328
|
{
|
2327
2329
|
return Gosu::Input::down(btn);
|
2328
2330
|
}
|
2331
|
+
|
2332
|
+
VALUE button_name(Gosu::Button btn)
|
2333
|
+
{
|
2334
|
+
std::string result = Gosu::Input::button_name(btn);
|
2335
|
+
return result.empty() ? Qnil : rb_str_new2(result.c_str());
|
2336
|
+
}
|
2337
|
+
|
2338
|
+
VALUE gamepad_name(int index)
|
2339
|
+
{
|
2340
|
+
std::string result = Gosu::Input::gamepad_name(index);
|
2341
|
+
return result.empty() ? Qnil : rb_str_new2(result.c_str());
|
2342
|
+
}
|
2343
|
+
|
2344
|
+
double axis(Gosu::Button btn)
|
2345
|
+
{
|
2346
|
+
return Gosu::Input::axis(btn);
|
2347
|
+
}
|
2329
2348
|
}
|
2330
2349
|
|
2331
2350
|
// Global graphics functions
|
@@ -2500,7 +2519,7 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
|
|
2500
2519
|
}
|
2501
2520
|
|
2502
2521
|
|
2503
|
-
/*@SWIG:/usr/local/Cellar/swig/HEAD-
|
2522
|
+
/*@SWIG:/usr/local/Cellar/swig/HEAD-975f8fc/share/swig/4.1.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2504
2523
|
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE arg)
|
2505
2524
|
{
|
2506
2525
|
VALUE *args = (VALUE *)arg;
|
@@ -2543,7 +2562,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2543
2562
|
#include <string>
|
2544
2563
|
|
2545
2564
|
|
2546
|
-
/*@SWIG:/usr/local/Cellar/swig/HEAD-
|
2565
|
+
/*@SWIG:/usr/local/Cellar/swig/HEAD-975f8fc/share/swig/4.1.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2547
2566
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
|
2548
2567
|
{
|
2549
2568
|
VALUE *args = (VALUE *)arg;
|
@@ -2749,7 +2768,7 @@ SWIG_AsPtr_std_string (VALUE obj, std::string **val)
|
|
2749
2768
|
}
|
2750
2769
|
|
2751
2770
|
|
2752
|
-
/*@SWIG:/usr/local/Cellar/swig/HEAD-
|
2771
|
+
/*@SWIG:/usr/local/Cellar/swig/HEAD-975f8fc/share/swig/4.1.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2753
2772
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
|
2754
2773
|
{
|
2755
2774
|
VALUE *args = (VALUE *)arg;
|
@@ -2837,11 +2856,19 @@ SWIGINTERN Gosu::Font *new_Gosu_Font__SWIG_1(int height,VALUE options=0){
|
|
2837
2856
|
|
2838
2857
|
return new Gosu::Font(height, font_name, font_flags);
|
2839
2858
|
}
|
2859
|
+
SWIGINTERN double Gosu_Font_text_width(Gosu::Font *self,std::string const &markup,double scale_x=1.0){
|
2860
|
+
static bool issued_warning = false;
|
2861
|
+
if (scale_x != 1.0 && !issued_warning) {
|
2862
|
+
issued_warning = true;
|
2863
|
+
rb_warn("The second argument to Gosu::Font#text_width is deprecated, multiply the result instead");
|
2864
|
+
}
|
2865
|
+
return self->text_width(markup) * scale_x;
|
2866
|
+
}
|
2840
2867
|
SWIGINTERN double Gosu_Font_markup_width(Gosu::Font *self,std::string const &markup,double scale_x=1.0){
|
2841
2868
|
static bool issued_warning = false;
|
2842
2869
|
if (scale_x != 1.0 && !issued_warning) {
|
2843
2870
|
issued_warning = true;
|
2844
|
-
rb_warn("The second argument to Font#markup_width
|
2871
|
+
rb_warn("The second argument to Gosu::Font#markup_width is deprecated, multiply the result instead");
|
2845
2872
|
}
|
2846
2873
|
return self->markup_width(markup) * scale_x;
|
2847
2874
|
}
|
@@ -2849,8 +2876,8 @@ SWIGINTERN Gosu::Image *new_Gosu_Image(VALUE source,VALUE options=0){
|
|
2849
2876
|
Gosu::Bitmap bmp;
|
2850
2877
|
Gosu::load_bitmap(bmp, source);
|
2851
2878
|
|
2852
|
-
|
2853
|
-
|
2879
|
+
int src_x = 0, src_y = 0;
|
2880
|
+
int src_width = bmp.width(), src_height = bmp.height();
|
2854
2881
|
unsigned flags = 0;
|
2855
2882
|
|
2856
2883
|
if (options) {
|
@@ -2907,7 +2934,81 @@ SWIGINTERN Gosu::Image *Gosu_Image_subimage(Gosu::Image *self,int x,int y,int w,
|
|
2907
2934
|
std::unique_ptr<Gosu::ImageData> image_data = self->data().subimage(x, y, w, h);
|
2908
2935
|
return image_data.get() ? new Gosu::Image(std::move(image_data)) : nullptr;
|
2909
2936
|
}
|
2910
|
-
SWIGINTERN Gosu::Image *Gosu_Image_from_text(std::string const &
|
2937
|
+
SWIGINTERN Gosu::Image *Gosu_Image_from_text(std::string const &text,double font_height,VALUE options=0){
|
2938
|
+
std::string font = Gosu::default_font_name();
|
2939
|
+
int width = -1;
|
2940
|
+
double spacing = 0;
|
2941
|
+
Gosu::Alignment align = Gosu::AL_LEFT;
|
2942
|
+
unsigned image_flags = 0;
|
2943
|
+
unsigned font_flags = 0;
|
2944
|
+
|
2945
|
+
if (options) {
|
2946
|
+
Check_Type(options, T_HASH);
|
2947
|
+
|
2948
|
+
VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL);
|
2949
|
+
int keys_size = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL));
|
2950
|
+
|
2951
|
+
for (int i = 0; i < keys_size; ++i) {
|
2952
|
+
VALUE key = rb_ary_entry(keys, i);
|
2953
|
+
const char* key_string = Gosu::cstr_from_symbol(key);
|
2954
|
+
|
2955
|
+
VALUE value = rb_hash_aref(options, key);
|
2956
|
+
if (!strcmp(key_string, "font")) {
|
2957
|
+
font = StringValuePtr(value);
|
2958
|
+
}
|
2959
|
+
else if (!strcmp(key_string, "bold")) {
|
2960
|
+
if (RTEST(value)) font_flags |= Gosu::FF_BOLD;
|
2961
|
+
}
|
2962
|
+
else if (!strcmp(key_string, "italic")) {
|
2963
|
+
if (RTEST(value)) font_flags |= Gosu::FF_ITALIC;
|
2964
|
+
}
|
2965
|
+
else if (!strcmp(key_string, "underline")) {
|
2966
|
+
if (RTEST(value)) font_flags |= Gosu::FF_UNDERLINE;
|
2967
|
+
}
|
2968
|
+
else if (!strcmp(key_string, "align")) {
|
2969
|
+
const char* cstr = Gosu::cstr_from_symbol(value);
|
2970
|
+
|
2971
|
+
if (!strcmp(cstr, "left")) {
|
2972
|
+
align = Gosu::AL_LEFT;
|
2973
|
+
}
|
2974
|
+
else if (!strcmp(cstr, "center")) {
|
2975
|
+
align = Gosu::AL_CENTER;
|
2976
|
+
}
|
2977
|
+
else if (!strcmp(cstr, "right")) {
|
2978
|
+
align = Gosu::AL_RIGHT;
|
2979
|
+
}
|
2980
|
+
else if (!strcmp(cstr, "justify")) {
|
2981
|
+
align = Gosu::AL_JUSTIFY;
|
2982
|
+
}
|
2983
|
+
else {
|
2984
|
+
rb_raise(rb_eArgError, "Argument passed to :align must be a valid text "
|
2985
|
+
"alignment (:left, :center, :right, :justify)");
|
2986
|
+
}
|
2987
|
+
}
|
2988
|
+
else if (!strcmp(key_string, "width")) {
|
2989
|
+
width = NUM2INT(value);
|
2990
|
+
}
|
2991
|
+
else if (!strcmp(key_string, "spacing")) {
|
2992
|
+
spacing = NUM2DBL(value);
|
2993
|
+
}
|
2994
|
+
else if (!strcmp(key_string, "retro")) {
|
2995
|
+
if (RTEST(value)) image_flags |= Gosu::IF_RETRO;
|
2996
|
+
}
|
2997
|
+
else {
|
2998
|
+
static bool issued_warning = false;
|
2999
|
+
if (!issued_warning) {
|
3000
|
+
issued_warning = true;
|
3001
|
+
rb_warn("Unknown keyword argument: :%s", key_string);
|
3002
|
+
}
|
3003
|
+
}
|
3004
|
+
}
|
3005
|
+
}
|
3006
|
+
|
3007
|
+
Gosu::Bitmap bitmap = Gosu::layout_text(text, font, font_height, spacing, width,
|
3008
|
+
align, font_flags);
|
3009
|
+
return new Gosu::Image(bitmap, image_flags);
|
3010
|
+
}
|
3011
|
+
SWIGINTERN Gosu::Image *Gosu_Image_from_markup(std::string const &markup,double font_height,VALUE options=0){
|
2911
3012
|
std::string font = Gosu::default_font_name();
|
2912
3013
|
int width = -1;
|
2913
3014
|
double spacing = 0;
|
@@ -3047,10 +3148,10 @@ SWIGINTERN VALUE Gosu_Image_to_blob(Gosu::Image const *self){
|
|
3047
3148
|
auto size = bmp.width() * bmp.height() * sizeof(Gosu::Color);
|
3048
3149
|
return rb_str_new(reinterpret_cast<const char*>(bmp.data()), size);
|
3049
3150
|
}
|
3050
|
-
SWIGINTERN
|
3151
|
+
SWIGINTERN int Gosu_Image_columns(Gosu::Image const *self){
|
3051
3152
|
return self->width();
|
3052
3153
|
}
|
3053
|
-
SWIGINTERN
|
3154
|
+
SWIGINTERN int Gosu_Image_rows(Gosu::Image const *self){
|
3054
3155
|
return self->height();
|
3055
3156
|
}
|
3056
3157
|
SWIGINTERN void Gosu_Image_save(Gosu::Image const *self,std::string const &filename){
|
@@ -3117,6 +3218,45 @@ SWIGINTERN void Gosu_TextInput_set_selection_start(Gosu::TextInput *self,VALUE s
|
|
3117
3218
|
std::string prefix = StringValueCStr(rb_prefix);
|
3118
3219
|
self->set_selection_start(std::min(prefix.length(), self->text().length()));
|
3119
3220
|
}
|
3221
|
+
SWIGINTERN Gosu::Window *new_Gosu_Window(VALUE self,int width,int height,VALUE options=0){
|
3222
|
+
unsigned flags = 0;
|
3223
|
+
double update_interval = 16.666666;
|
3224
|
+
|
3225
|
+
if (options) {
|
3226
|
+
Check_Type(options, T_HASH);
|
3227
|
+
|
3228
|
+
VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL);
|
3229
|
+
int keys_size = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL));
|
3230
|
+
|
3231
|
+
for (int i = 0; i < keys_size; ++i) {
|
3232
|
+
VALUE key = rb_ary_entry(keys, i);
|
3233
|
+
const char* key_string = Gosu::cstr_from_symbol(key);
|
3234
|
+
|
3235
|
+
VALUE value = rb_hash_aref(options, key);
|
3236
|
+
if (!strcmp(key_string, "fullscreen")) {
|
3237
|
+
if (RTEST(value)) flags |= Gosu::WF_FULLSCREEN;
|
3238
|
+
}
|
3239
|
+
else if (!strcmp(key_string, "resizable")) {
|
3240
|
+
if (RTEST(value)) flags |= Gosu::WF_RESIZABLE;
|
3241
|
+
}
|
3242
|
+
else if (!strcmp(key_string, "borderless")) {
|
3243
|
+
if (RTEST(value)) flags |= Gosu::WF_BORDERLESS;
|
3244
|
+
}
|
3245
|
+
else if (!strcmp(key_string, "update_interval")) {
|
3246
|
+
update_interval = NUM2DBL(value);
|
3247
|
+
}
|
3248
|
+
else {
|
3249
|
+
static bool issued_warning = false;
|
3250
|
+
if (!issued_warning) {
|
3251
|
+
issued_warning = true;
|
3252
|
+
rb_warn("Unknown keyword argument: :%s", key_string);
|
3253
|
+
}
|
3254
|
+
}
|
3255
|
+
}
|
3256
|
+
}
|
3257
|
+
|
3258
|
+
return new Gosu::Window(width, height, flags, update_interval);
|
3259
|
+
}
|
3120
3260
|
SWIGINTERN void Gosu_Window_set_width(Gosu::Window *self,unsigned int width){
|
3121
3261
|
self->resize(width, self->height(), self->fullscreen());
|
3122
3262
|
}
|
@@ -3199,12 +3339,6 @@ std::string SwigDirector_TextInput::filter(std::string text) const {
|
|
3199
3339
|
}
|
3200
3340
|
|
3201
3341
|
|
3202
|
-
SwigDirector_Window::SwigDirector_Window(VALUE self, unsigned int width, unsigned int height, bool fullscreen, double update_interval, bool resizable): Gosu::Window(width, height, fullscreen, update_interval, resizable), Swig::Director(self) {
|
3203
|
-
|
3204
|
-
}
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3208
3342
|
SwigDirector_Window::~SwigDirector_Window() {
|
3209
3343
|
}
|
3210
3344
|
|
@@ -3300,7 +3434,7 @@ void SwigDirector_Window::button_down(Gosu::Button arg0) {
|
|
3300
3434
|
VALUE SWIGUNUSED result;
|
3301
3435
|
|
3302
3436
|
{
|
3303
|
-
obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(
|
3437
|
+
obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(arg0);
|
3304
3438
|
}
|
3305
3439
|
result = rb_funcall(swig_get_self(), rb_intern("protected_button_down"), 1,obj0);
|
3306
3440
|
}
|
@@ -3311,18 +3445,36 @@ void SwigDirector_Window::button_up(Gosu::Button arg0) {
|
|
3311
3445
|
VALUE SWIGUNUSED result;
|
3312
3446
|
|
3313
3447
|
{
|
3314
|
-
obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(
|
3448
|
+
obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(arg0);
|
3315
3449
|
}
|
3316
3450
|
result = rb_funcall(swig_get_self(), rb_intern("protected_button_up"), 1,obj0);
|
3317
3451
|
}
|
3318
3452
|
|
3319
3453
|
|
3454
|
+
void SwigDirector_Window::gamepad_connected(int index) {
|
3455
|
+
VALUE obj0 = Qnil ;
|
3456
|
+
VALUE SWIGUNUSED result;
|
3457
|
+
|
3458
|
+
obj0 = SWIG_From_int(static_cast< int >(index));
|
3459
|
+
result = rb_funcall(swig_get_self(), rb_intern("protected_gamepad_connected"), 1,obj0);
|
3460
|
+
}
|
3461
|
+
|
3462
|
+
|
3463
|
+
void SwigDirector_Window::gamepad_disconnected(int index) {
|
3464
|
+
VALUE obj0 = Qnil ;
|
3465
|
+
VALUE SWIGUNUSED result;
|
3466
|
+
|
3467
|
+
obj0 = SWIG_From_int(static_cast< int >(index));
|
3468
|
+
result = rb_funcall(swig_get_self(), rb_intern("protected_gamepad_disconnected"), 1,obj0);
|
3469
|
+
}
|
3470
|
+
|
3471
|
+
|
3320
3472
|
void SwigDirector_Window::drop(std::string const &filename) {
|
3321
3473
|
VALUE obj0 = Qnil ;
|
3322
3474
|
VALUE SWIGUNUSED result;
|
3323
3475
|
|
3324
3476
|
obj0 = SWIG_From_std_string(static_cast< std::string >(filename));
|
3325
|
-
result = rb_funcall(swig_get_self(), rb_intern("
|
3477
|
+
result = rb_funcall(swig_get_self(), rb_intern("protected_drop"), 1,obj0);
|
3326
3478
|
}
|
3327
3479
|
|
3328
3480
|
|
@@ -3789,25 +3941,6 @@ fail:
|
|
3789
3941
|
}
|
3790
3942
|
|
3791
3943
|
|
3792
|
-
SWIGINTERN VALUE
|
3793
|
-
_wrap__release_all_openal_resources(int argc, VALUE *argv, VALUE self) {
|
3794
|
-
if ((argc < 0) || (argc > 0)) {
|
3795
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3796
|
-
}
|
3797
|
-
{
|
3798
|
-
try {
|
3799
|
-
Gosu::al_shutdown();
|
3800
|
-
}
|
3801
|
-
catch (const std::exception& e) {
|
3802
|
-
SWIG_exception(SWIG_RuntimeError, e.what());
|
3803
|
-
}
|
3804
|
-
}
|
3805
|
-
return Qnil;
|
3806
|
-
fail:
|
3807
|
-
return Qnil;
|
3808
|
-
}
|
3809
|
-
|
3810
|
-
|
3811
3944
|
static swig_class SwigClassColor;
|
3812
3945
|
|
3813
3946
|
SWIGINTERN VALUE
|
@@ -5264,7 +5397,7 @@ fail:
|
|
5264
5397
|
|
5265
5398
|
|
5266
5399
|
SWIGINTERN VALUE
|
5267
|
-
|
5400
|
+
_wrap_Font_draw_text(int argc, VALUE *argv, VALUE self) {
|
5268
5401
|
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
5269
5402
|
std::string *arg2 = 0 ;
|
5270
5403
|
double arg3 ;
|
@@ -5293,46 +5426,46 @@ _wrap_Font_draw_markup(int argc, VALUE *argv, VALUE self) {
|
|
5293
5426
|
}
|
5294
5427
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
|
5295
5428
|
if (!SWIG_IsOK(res1)) {
|
5296
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","
|
5429
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_text", 1, self ));
|
5297
5430
|
}
|
5298
5431
|
arg1 = reinterpret_cast< Gosu::Font * >(argp1);
|
5299
5432
|
{
|
5300
5433
|
std::string *ptr = (std::string *)0;
|
5301
5434
|
res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
5302
5435
|
if (!SWIG_IsOK(res2)) {
|
5303
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","
|
5436
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_text", 2, argv[0] ));
|
5304
5437
|
}
|
5305
5438
|
if (!ptr) {
|
5306
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","
|
5439
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_text", 2, argv[0]));
|
5307
5440
|
}
|
5308
5441
|
arg2 = ptr;
|
5309
5442
|
}
|
5310
5443
|
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
5311
5444
|
if (!SWIG_IsOK(ecode3)) {
|
5312
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","
|
5445
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_text", 3, argv[1] ));
|
5313
5446
|
}
|
5314
5447
|
arg3 = static_cast< double >(val3);
|
5315
5448
|
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
5316
5449
|
if (!SWIG_IsOK(ecode4)) {
|
5317
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","
|
5450
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_text", 4, argv[2] ));
|
5318
5451
|
}
|
5319
5452
|
arg4 = static_cast< double >(val4);
|
5320
5453
|
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
5321
5454
|
if (!SWIG_IsOK(ecode5)) {
|
5322
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","
|
5455
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_text", 5, argv[3] ));
|
5323
5456
|
}
|
5324
5457
|
arg5 = static_cast< Gosu::ZPos >(val5);
|
5325
5458
|
if (argc > 4) {
|
5326
5459
|
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
5327
5460
|
if (!SWIG_IsOK(ecode6)) {
|
5328
|
-
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","
|
5461
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_text", 6, argv[4] ));
|
5329
5462
|
}
|
5330
5463
|
arg6 = static_cast< double >(val6);
|
5331
5464
|
}
|
5332
5465
|
if (argc > 5) {
|
5333
5466
|
ecode7 = SWIG_AsVal_double(argv[5], &val7);
|
5334
5467
|
if (!SWIG_IsOK(ecode7)) {
|
5335
|
-
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","
|
5468
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_text", 7, argv[5] ));
|
5336
5469
|
}
|
5337
5470
|
arg7 = static_cast< double >(val7);
|
5338
5471
|
}
|
@@ -5377,7 +5510,7 @@ _wrap_Font_draw_markup(int argc, VALUE *argv, VALUE self) {
|
|
5377
5510
|
}
|
5378
5511
|
{
|
5379
5512
|
try {
|
5380
|
-
((Gosu::Font const *)arg1)->
|
5513
|
+
((Gosu::Font const *)arg1)->draw_text((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
|
5381
5514
|
}
|
5382
5515
|
catch (const std::exception& e) {
|
5383
5516
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
@@ -5392,18 +5525,16 @@ fail:
|
|
5392
5525
|
|
5393
5526
|
|
5394
5527
|
SWIGINTERN VALUE
|
5395
|
-
|
5528
|
+
_wrap_Font_draw_markup(int argc, VALUE *argv, VALUE self) {
|
5396
5529
|
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
5397
5530
|
std::string *arg2 = 0 ;
|
5398
5531
|
double arg3 ;
|
5399
5532
|
double arg4 ;
|
5400
5533
|
Gosu::ZPos arg5 ;
|
5401
|
-
double arg6 ;
|
5402
|
-
double arg7 ;
|
5403
|
-
|
5404
|
-
|
5405
|
-
Gosu::Color arg10 = (Gosu::Color) Gosu::Color::WHITE ;
|
5406
|
-
Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::AM_DEFAULT ;
|
5534
|
+
double arg6 = (double) 1 ;
|
5535
|
+
double arg7 = (double) 1 ;
|
5536
|
+
Gosu::Color arg8 = (Gosu::Color) Gosu::Color::WHITE ;
|
5537
|
+
Gosu::AlphaMode arg9 = (Gosu::AlphaMode) Gosu::AM_DEFAULT ;
|
5407
5538
|
void *argp1 = 0 ;
|
5408
5539
|
int res1 = 0 ;
|
5409
5540
|
int res2 = SWIG_OLDOBJ ;
|
@@ -5417,77 +5548,63 @@ _wrap_Font_draw_markup_rel(int argc, VALUE *argv, VALUE self) {
|
|
5417
5548
|
int ecode6 = 0 ;
|
5418
5549
|
double val7 ;
|
5419
5550
|
int ecode7 = 0 ;
|
5420
|
-
double val8 ;
|
5421
|
-
int ecode8 = 0 ;
|
5422
|
-
double val9 ;
|
5423
|
-
int ecode9 = 0 ;
|
5424
5551
|
|
5425
|
-
if ((argc <
|
5426
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
5552
|
+
if ((argc < 4) || (argc > 8)) {
|
5553
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
5427
5554
|
}
|
5428
5555
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
|
5429
5556
|
if (!SWIG_IsOK(res1)) {
|
5430
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","
|
5557
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_markup", 1, self ));
|
5431
5558
|
}
|
5432
5559
|
arg1 = reinterpret_cast< Gosu::Font * >(argp1);
|
5433
5560
|
{
|
5434
5561
|
std::string *ptr = (std::string *)0;
|
5435
5562
|
res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
5436
5563
|
if (!SWIG_IsOK(res2)) {
|
5437
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","
|
5564
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_markup", 2, argv[0] ));
|
5438
5565
|
}
|
5439
5566
|
if (!ptr) {
|
5440
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","
|
5567
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_markup", 2, argv[0]));
|
5441
5568
|
}
|
5442
5569
|
arg2 = ptr;
|
5443
5570
|
}
|
5444
5571
|
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
5445
5572
|
if (!SWIG_IsOK(ecode3)) {
|
5446
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","
|
5573
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_markup", 3, argv[1] ));
|
5447
5574
|
}
|
5448
5575
|
arg3 = static_cast< double >(val3);
|
5449
5576
|
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
5450
5577
|
if (!SWIG_IsOK(ecode4)) {
|
5451
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","
|
5578
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_markup", 4, argv[2] ));
|
5452
5579
|
}
|
5453
5580
|
arg4 = static_cast< double >(val4);
|
5454
5581
|
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
5455
5582
|
if (!SWIG_IsOK(ecode5)) {
|
5456
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","
|
5583
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_markup", 5, argv[3] ));
|
5457
5584
|
}
|
5458
5585
|
arg5 = static_cast< Gosu::ZPos >(val5);
|
5459
|
-
|
5460
|
-
|
5461
|
-
|
5462
|
-
|
5463
|
-
arg6 = static_cast< double >(val6);
|
5464
|
-
ecode7 = SWIG_AsVal_double(argv[5], &val7);
|
5465
|
-
if (!SWIG_IsOK(ecode7)) {
|
5466
|
-
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_markup_rel", 7, argv[5] ));
|
5467
|
-
}
|
5468
|
-
arg7 = static_cast< double >(val7);
|
5469
|
-
if (argc > 6) {
|
5470
|
-
ecode8 = SWIG_AsVal_double(argv[6], &val8);
|
5471
|
-
if (!SWIG_IsOK(ecode8)) {
|
5472
|
-
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","draw_markup_rel", 8, argv[6] ));
|
5586
|
+
if (argc > 4) {
|
5587
|
+
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
5588
|
+
if (!SWIG_IsOK(ecode6)) {
|
5589
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_markup", 6, argv[4] ));
|
5473
5590
|
}
|
5474
|
-
|
5591
|
+
arg6 = static_cast< double >(val6);
|
5475
5592
|
}
|
5476
|
-
if (argc >
|
5477
|
-
|
5478
|
-
if (!SWIG_IsOK(
|
5479
|
-
SWIG_exception_fail(SWIG_ArgError(
|
5593
|
+
if (argc > 5) {
|
5594
|
+
ecode7 = SWIG_AsVal_double(argv[5], &val7);
|
5595
|
+
if (!SWIG_IsOK(ecode7)) {
|
5596
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_markup", 7, argv[5] ));
|
5480
5597
|
}
|
5481
|
-
|
5598
|
+
arg7 = static_cast< double >(val7);
|
5482
5599
|
}
|
5483
|
-
if (argc >
|
5600
|
+
if (argc > 6) {
|
5484
5601
|
{
|
5485
|
-
if (TYPE(argv[
|
5486
|
-
|
5602
|
+
if (TYPE(argv[6]) == T_FIXNUM || TYPE(argv[6]) == T_BIGNUM) {
|
5603
|
+
arg8 = Gosu::Color(NUM2ULONG(argv[6]));
|
5487
5604
|
}
|
5488
5605
|
else {
|
5489
5606
|
void* ptr;
|
5490
|
-
int res = SWIG_ConvertPtr(argv[
|
5607
|
+
int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
5491
5608
|
if (!SWIG_IsOK(res)) {
|
5492
5609
|
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
5493
5610
|
}
|
@@ -5495,23 +5612,23 @@ _wrap_Font_draw_markup_rel(int argc, VALUE *argv, VALUE self) {
|
|
5495
5612
|
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
5496
5613
|
}
|
5497
5614
|
else {
|
5498
|
-
|
5615
|
+
arg8 = *reinterpret_cast<Gosu::Color*>(ptr);
|
5499
5616
|
}
|
5500
5617
|
}
|
5501
5618
|
}
|
5502
5619
|
}
|
5503
|
-
if (argc >
|
5620
|
+
if (argc > 7) {
|
5504
5621
|
{
|
5505
|
-
const char* cstr = Gosu::cstr_from_symbol(argv[
|
5622
|
+
const char* cstr = Gosu::cstr_from_symbol(argv[7]);
|
5506
5623
|
|
5507
5624
|
if (!strcmp(cstr, "default")) {
|
5508
|
-
|
5625
|
+
arg9 = Gosu::AM_DEFAULT;
|
5509
5626
|
}
|
5510
5627
|
else if (!strcmp(cstr, "add") || !strcmp(cstr, "additive")) {
|
5511
|
-
|
5628
|
+
arg9 = Gosu::AM_ADD;
|
5512
5629
|
}
|
5513
5630
|
else if (!strcmp(cstr, "multiply")) {
|
5514
|
-
|
5631
|
+
arg9 = Gosu::AM_MULTIPLY;
|
5515
5632
|
}
|
5516
5633
|
else {
|
5517
5634
|
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode (expected one of :default, :add, "
|
@@ -5521,7 +5638,7 @@ _wrap_Font_draw_markup_rel(int argc, VALUE *argv, VALUE self) {
|
|
5521
5638
|
}
|
5522
5639
|
{
|
5523
5640
|
try {
|
5524
|
-
((Gosu::Font const *)arg1)->
|
5641
|
+
((Gosu::Font const *)arg1)->draw_markup((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
|
5525
5642
|
}
|
5526
5643
|
catch (const std::exception& e) {
|
5527
5644
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
@@ -5536,14 +5653,302 @@ fail:
|
|
5536
5653
|
|
5537
5654
|
|
5538
5655
|
SWIGINTERN VALUE
|
5539
|
-
|
5656
|
+
_wrap_Font_draw_text_rel(int argc, VALUE *argv, VALUE self) {
|
5540
5657
|
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
5541
|
-
std::string arg2 ;
|
5542
|
-
|
5658
|
+
std::string *arg2 = 0 ;
|
5659
|
+
double arg3 ;
|
5660
|
+
double arg4 ;
|
5661
|
+
Gosu::ZPos arg5 ;
|
5662
|
+
double arg6 ;
|
5663
|
+
double arg7 ;
|
5664
|
+
double arg8 = (double) 1 ;
|
5665
|
+
double arg9 = (double) 1 ;
|
5666
|
+
Gosu::Color arg10 = (Gosu::Color) Gosu::Color::WHITE ;
|
5667
|
+
Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::AM_DEFAULT ;
|
5543
5668
|
void *argp1 = 0 ;
|
5544
5669
|
int res1 = 0 ;
|
5545
|
-
|
5546
|
-
|
5670
|
+
int res2 = SWIG_OLDOBJ ;
|
5671
|
+
double val3 ;
|
5672
|
+
int ecode3 = 0 ;
|
5673
|
+
double val4 ;
|
5674
|
+
int ecode4 = 0 ;
|
5675
|
+
double val5 ;
|
5676
|
+
int ecode5 = 0 ;
|
5677
|
+
double val6 ;
|
5678
|
+
int ecode6 = 0 ;
|
5679
|
+
double val7 ;
|
5680
|
+
int ecode7 = 0 ;
|
5681
|
+
double val8 ;
|
5682
|
+
int ecode8 = 0 ;
|
5683
|
+
double val9 ;
|
5684
|
+
int ecode9 = 0 ;
|
5685
|
+
|
5686
|
+
if ((argc < 6) || (argc > 10)) {
|
5687
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
|
5688
|
+
}
|
5689
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
|
5690
|
+
if (!SWIG_IsOK(res1)) {
|
5691
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_text_rel", 1, self ));
|
5692
|
+
}
|
5693
|
+
arg1 = reinterpret_cast< Gosu::Font * >(argp1);
|
5694
|
+
{
|
5695
|
+
std::string *ptr = (std::string *)0;
|
5696
|
+
res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
5697
|
+
if (!SWIG_IsOK(res2)) {
|
5698
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_text_rel", 2, argv[0] ));
|
5699
|
+
}
|
5700
|
+
if (!ptr) {
|
5701
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_text_rel", 2, argv[0]));
|
5702
|
+
}
|
5703
|
+
arg2 = ptr;
|
5704
|
+
}
|
5705
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
5706
|
+
if (!SWIG_IsOK(ecode3)) {
|
5707
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_text_rel", 3, argv[1] ));
|
5708
|
+
}
|
5709
|
+
arg3 = static_cast< double >(val3);
|
5710
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
5711
|
+
if (!SWIG_IsOK(ecode4)) {
|
5712
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_text_rel", 4, argv[2] ));
|
5713
|
+
}
|
5714
|
+
arg4 = static_cast< double >(val4);
|
5715
|
+
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
5716
|
+
if (!SWIG_IsOK(ecode5)) {
|
5717
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_text_rel", 5, argv[3] ));
|
5718
|
+
}
|
5719
|
+
arg5 = static_cast< Gosu::ZPos >(val5);
|
5720
|
+
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
5721
|
+
if (!SWIG_IsOK(ecode6)) {
|
5722
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_text_rel", 6, argv[4] ));
|
5723
|
+
}
|
5724
|
+
arg6 = static_cast< double >(val6);
|
5725
|
+
ecode7 = SWIG_AsVal_double(argv[5], &val7);
|
5726
|
+
if (!SWIG_IsOK(ecode7)) {
|
5727
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_text_rel", 7, argv[5] ));
|
5728
|
+
}
|
5729
|
+
arg7 = static_cast< double >(val7);
|
5730
|
+
if (argc > 6) {
|
5731
|
+
ecode8 = SWIG_AsVal_double(argv[6], &val8);
|
5732
|
+
if (!SWIG_IsOK(ecode8)) {
|
5733
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","draw_text_rel", 8, argv[6] ));
|
5734
|
+
}
|
5735
|
+
arg8 = static_cast< double >(val8);
|
5736
|
+
}
|
5737
|
+
if (argc > 7) {
|
5738
|
+
ecode9 = SWIG_AsVal_double(argv[7], &val9);
|
5739
|
+
if (!SWIG_IsOK(ecode9)) {
|
5740
|
+
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","draw_text_rel", 9, argv[7] ));
|
5741
|
+
}
|
5742
|
+
arg9 = static_cast< double >(val9);
|
5743
|
+
}
|
5744
|
+
if (argc > 8) {
|
5745
|
+
{
|
5746
|
+
if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) {
|
5747
|
+
arg10 = Gosu::Color(NUM2ULONG(argv[8]));
|
5748
|
+
}
|
5749
|
+
else {
|
5750
|
+
void* ptr;
|
5751
|
+
int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
5752
|
+
if (!SWIG_IsOK(res)) {
|
5753
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
5754
|
+
}
|
5755
|
+
else if (ptr == nullptr) {
|
5756
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
5757
|
+
}
|
5758
|
+
else {
|
5759
|
+
arg10 = *reinterpret_cast<Gosu::Color*>(ptr);
|
5760
|
+
}
|
5761
|
+
}
|
5762
|
+
}
|
5763
|
+
}
|
5764
|
+
if (argc > 9) {
|
5765
|
+
{
|
5766
|
+
const char* cstr = Gosu::cstr_from_symbol(argv[9]);
|
5767
|
+
|
5768
|
+
if (!strcmp(cstr, "default")) {
|
5769
|
+
arg11 = Gosu::AM_DEFAULT;
|
5770
|
+
}
|
5771
|
+
else if (!strcmp(cstr, "add") || !strcmp(cstr, "additive")) {
|
5772
|
+
arg11 = Gosu::AM_ADD;
|
5773
|
+
}
|
5774
|
+
else if (!strcmp(cstr, "multiply")) {
|
5775
|
+
arg11 = Gosu::AM_MULTIPLY;
|
5776
|
+
}
|
5777
|
+
else {
|
5778
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode (expected one of :default, :add, "
|
5779
|
+
":multiply)");
|
5780
|
+
}
|
5781
|
+
}
|
5782
|
+
}
|
5783
|
+
{
|
5784
|
+
try {
|
5785
|
+
((Gosu::Font const *)arg1)->draw_text_rel((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
|
5786
|
+
}
|
5787
|
+
catch (const std::exception& e) {
|
5788
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
5789
|
+
}
|
5790
|
+
}
|
5791
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
5792
|
+
return Qnil;
|
5793
|
+
fail:
|
5794
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
5795
|
+
return Qnil;
|
5796
|
+
}
|
5797
|
+
|
5798
|
+
|
5799
|
+
SWIGINTERN VALUE
|
5800
|
+
_wrap_Font_draw_markup_rel(int argc, VALUE *argv, VALUE self) {
|
5801
|
+
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
5802
|
+
std::string *arg2 = 0 ;
|
5803
|
+
double arg3 ;
|
5804
|
+
double arg4 ;
|
5805
|
+
Gosu::ZPos arg5 ;
|
5806
|
+
double arg6 ;
|
5807
|
+
double arg7 ;
|
5808
|
+
double arg8 = (double) 1 ;
|
5809
|
+
double arg9 = (double) 1 ;
|
5810
|
+
Gosu::Color arg10 = (Gosu::Color) Gosu::Color::WHITE ;
|
5811
|
+
Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::AM_DEFAULT ;
|
5812
|
+
void *argp1 = 0 ;
|
5813
|
+
int res1 = 0 ;
|
5814
|
+
int res2 = SWIG_OLDOBJ ;
|
5815
|
+
double val3 ;
|
5816
|
+
int ecode3 = 0 ;
|
5817
|
+
double val4 ;
|
5818
|
+
int ecode4 = 0 ;
|
5819
|
+
double val5 ;
|
5820
|
+
int ecode5 = 0 ;
|
5821
|
+
double val6 ;
|
5822
|
+
int ecode6 = 0 ;
|
5823
|
+
double val7 ;
|
5824
|
+
int ecode7 = 0 ;
|
5825
|
+
double val8 ;
|
5826
|
+
int ecode8 = 0 ;
|
5827
|
+
double val9 ;
|
5828
|
+
int ecode9 = 0 ;
|
5829
|
+
|
5830
|
+
if ((argc < 6) || (argc > 10)) {
|
5831
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
|
5832
|
+
}
|
5833
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
|
5834
|
+
if (!SWIG_IsOK(res1)) {
|
5835
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_markup_rel", 1, self ));
|
5836
|
+
}
|
5837
|
+
arg1 = reinterpret_cast< Gosu::Font * >(argp1);
|
5838
|
+
{
|
5839
|
+
std::string *ptr = (std::string *)0;
|
5840
|
+
res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
5841
|
+
if (!SWIG_IsOK(res2)) {
|
5842
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_markup_rel", 2, argv[0] ));
|
5843
|
+
}
|
5844
|
+
if (!ptr) {
|
5845
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_markup_rel", 2, argv[0]));
|
5846
|
+
}
|
5847
|
+
arg2 = ptr;
|
5848
|
+
}
|
5849
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
5850
|
+
if (!SWIG_IsOK(ecode3)) {
|
5851
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_markup_rel", 3, argv[1] ));
|
5852
|
+
}
|
5853
|
+
arg3 = static_cast< double >(val3);
|
5854
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
5855
|
+
if (!SWIG_IsOK(ecode4)) {
|
5856
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_markup_rel", 4, argv[2] ));
|
5857
|
+
}
|
5858
|
+
arg4 = static_cast< double >(val4);
|
5859
|
+
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
5860
|
+
if (!SWIG_IsOK(ecode5)) {
|
5861
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_markup_rel", 5, argv[3] ));
|
5862
|
+
}
|
5863
|
+
arg5 = static_cast< Gosu::ZPos >(val5);
|
5864
|
+
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
5865
|
+
if (!SWIG_IsOK(ecode6)) {
|
5866
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_markup_rel", 6, argv[4] ));
|
5867
|
+
}
|
5868
|
+
arg6 = static_cast< double >(val6);
|
5869
|
+
ecode7 = SWIG_AsVal_double(argv[5], &val7);
|
5870
|
+
if (!SWIG_IsOK(ecode7)) {
|
5871
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_markup_rel", 7, argv[5] ));
|
5872
|
+
}
|
5873
|
+
arg7 = static_cast< double >(val7);
|
5874
|
+
if (argc > 6) {
|
5875
|
+
ecode8 = SWIG_AsVal_double(argv[6], &val8);
|
5876
|
+
if (!SWIG_IsOK(ecode8)) {
|
5877
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","draw_markup_rel", 8, argv[6] ));
|
5878
|
+
}
|
5879
|
+
arg8 = static_cast< double >(val8);
|
5880
|
+
}
|
5881
|
+
if (argc > 7) {
|
5882
|
+
ecode9 = SWIG_AsVal_double(argv[7], &val9);
|
5883
|
+
if (!SWIG_IsOK(ecode9)) {
|
5884
|
+
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","draw_markup_rel", 9, argv[7] ));
|
5885
|
+
}
|
5886
|
+
arg9 = static_cast< double >(val9);
|
5887
|
+
}
|
5888
|
+
if (argc > 8) {
|
5889
|
+
{
|
5890
|
+
if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) {
|
5891
|
+
arg10 = Gosu::Color(NUM2ULONG(argv[8]));
|
5892
|
+
}
|
5893
|
+
else {
|
5894
|
+
void* ptr;
|
5895
|
+
int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
5896
|
+
if (!SWIG_IsOK(res)) {
|
5897
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
5898
|
+
}
|
5899
|
+
else if (ptr == nullptr) {
|
5900
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
5901
|
+
}
|
5902
|
+
else {
|
5903
|
+
arg10 = *reinterpret_cast<Gosu::Color*>(ptr);
|
5904
|
+
}
|
5905
|
+
}
|
5906
|
+
}
|
5907
|
+
}
|
5908
|
+
if (argc > 9) {
|
5909
|
+
{
|
5910
|
+
const char* cstr = Gosu::cstr_from_symbol(argv[9]);
|
5911
|
+
|
5912
|
+
if (!strcmp(cstr, "default")) {
|
5913
|
+
arg11 = Gosu::AM_DEFAULT;
|
5914
|
+
}
|
5915
|
+
else if (!strcmp(cstr, "add") || !strcmp(cstr, "additive")) {
|
5916
|
+
arg11 = Gosu::AM_ADD;
|
5917
|
+
}
|
5918
|
+
else if (!strcmp(cstr, "multiply")) {
|
5919
|
+
arg11 = Gosu::AM_MULTIPLY;
|
5920
|
+
}
|
5921
|
+
else {
|
5922
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode (expected one of :default, :add, "
|
5923
|
+
":multiply)");
|
5924
|
+
}
|
5925
|
+
}
|
5926
|
+
}
|
5927
|
+
{
|
5928
|
+
try {
|
5929
|
+
((Gosu::Font const *)arg1)->draw_markup_rel((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
|
5930
|
+
}
|
5931
|
+
catch (const std::exception& e) {
|
5932
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
5933
|
+
}
|
5934
|
+
}
|
5935
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
5936
|
+
return Qnil;
|
5937
|
+
fail:
|
5938
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
5939
|
+
return Qnil;
|
5940
|
+
}
|
5941
|
+
|
5942
|
+
|
5943
|
+
SWIGINTERN VALUE
|
5944
|
+
_wrap_Font_set_image(int argc, VALUE *argv, VALUE self) {
|
5945
|
+
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
5946
|
+
std::string arg2 ;
|
5947
|
+
Gosu::Image *arg3 = 0 ;
|
5948
|
+
void *argp1 = 0 ;
|
5949
|
+
int res1 = 0 ;
|
5950
|
+
void *argp3 ;
|
5951
|
+
int res3 = 0 ;
|
5547
5952
|
|
5548
5953
|
if ((argc < 2) || (argc > 2)) {
|
5549
5954
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
@@ -5748,6 +6153,62 @@ fail:
|
|
5748
6153
|
}
|
5749
6154
|
|
5750
6155
|
|
6156
|
+
SWIGINTERN VALUE
|
6157
|
+
_wrap_Font_text_width(int argc, VALUE *argv, VALUE self) {
|
6158
|
+
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
6159
|
+
std::string *arg2 = 0 ;
|
6160
|
+
double arg3 = (double) 1.0 ;
|
6161
|
+
void *argp1 = 0 ;
|
6162
|
+
int res1 = 0 ;
|
6163
|
+
int res2 = SWIG_OLDOBJ ;
|
6164
|
+
double val3 ;
|
6165
|
+
int ecode3 = 0 ;
|
6166
|
+
double result;
|
6167
|
+
VALUE vresult = Qnil;
|
6168
|
+
|
6169
|
+
if ((argc < 1) || (argc > 2)) {
|
6170
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
6171
|
+
}
|
6172
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
|
6173
|
+
if (!SWIG_IsOK(res1)) {
|
6174
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font *","text_width", 1, self ));
|
6175
|
+
}
|
6176
|
+
arg1 = reinterpret_cast< Gosu::Font * >(argp1);
|
6177
|
+
{
|
6178
|
+
std::string *ptr = (std::string *)0;
|
6179
|
+
res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
6180
|
+
if (!SWIG_IsOK(res2)) {
|
6181
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","text_width", 2, argv[0] ));
|
6182
|
+
}
|
6183
|
+
if (!ptr) {
|
6184
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","text_width", 2, argv[0]));
|
6185
|
+
}
|
6186
|
+
arg2 = ptr;
|
6187
|
+
}
|
6188
|
+
if (argc > 1) {
|
6189
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
6190
|
+
if (!SWIG_IsOK(ecode3)) {
|
6191
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","text_width", 3, argv[1] ));
|
6192
|
+
}
|
6193
|
+
arg3 = static_cast< double >(val3);
|
6194
|
+
}
|
6195
|
+
{
|
6196
|
+
try {
|
6197
|
+
result = (double)Gosu_Font_text_width(arg1,(std::string const &)*arg2,arg3);
|
6198
|
+
}
|
6199
|
+
catch (const std::exception& e) {
|
6200
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
6201
|
+
}
|
6202
|
+
}
|
6203
|
+
vresult = SWIG_From_double(static_cast< double >(result));
|
6204
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
6205
|
+
return vresult;
|
6206
|
+
fail:
|
6207
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
6208
|
+
return Qnil;
|
6209
|
+
}
|
6210
|
+
|
6211
|
+
|
5751
6212
|
SWIGINTERN VALUE
|
5752
6213
|
_wrap_Font_markup_width(int argc, VALUE *argv, VALUE self) {
|
5753
6214
|
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
@@ -6193,7 +6654,7 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
|
|
6193
6654
|
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
6194
6655
|
double arg2 ;
|
6195
6656
|
double arg3 ;
|
6196
|
-
Gosu::ZPos arg4 ;
|
6657
|
+
Gosu::ZPos arg4 = (Gosu::ZPos) 0 ;
|
6197
6658
|
double arg5 = (double) 1 ;
|
6198
6659
|
double arg6 = (double) 1 ;
|
6199
6660
|
Gosu::Color arg7 = (Gosu::Color) Gosu::Color::WHITE ;
|
@@ -6211,8 +6672,8 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
|
|
6211
6672
|
double val6 ;
|
6212
6673
|
int ecode6 = 0 ;
|
6213
6674
|
|
6214
|
-
if ((argc <
|
6215
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
6675
|
+
if ((argc < 2) || (argc > 7)) {
|
6676
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
6216
6677
|
}
|
6217
6678
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
|
6218
6679
|
if (!SWIG_IsOK(res1)) {
|
@@ -6229,11 +6690,13 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
|
|
6229
6690
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw", 3, argv[1] ));
|
6230
6691
|
}
|
6231
6692
|
arg3 = static_cast< double >(val3);
|
6232
|
-
|
6233
|
-
|
6234
|
-
|
6235
|
-
|
6236
|
-
|
6693
|
+
if (argc > 2) {
|
6694
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
6695
|
+
if (!SWIG_IsOK(ecode4)) {
|
6696
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","draw", 4, argv[2] ));
|
6697
|
+
}
|
6698
|
+
arg4 = static_cast< Gosu::ZPos >(val4);
|
6699
|
+
}
|
6237
6700
|
if (argc > 3) {
|
6238
6701
|
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
6239
6702
|
if (!SWIG_IsOK(ecode5)) {
|
@@ -6470,8 +6933,8 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
|
|
6470
6933
|
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
6471
6934
|
double arg2 ;
|
6472
6935
|
double arg3 ;
|
6473
|
-
Gosu::ZPos arg4 ;
|
6474
|
-
double arg5 ;
|
6936
|
+
Gosu::ZPos arg4 = (Gosu::ZPos) 0 ;
|
6937
|
+
double arg5 = (double) 0 ;
|
6475
6938
|
double arg6 = (double) 0.5 ;
|
6476
6939
|
double arg7 = (double) 0.5 ;
|
6477
6940
|
double arg8 = (double) 1 ;
|
@@ -6497,8 +6960,8 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
|
|
6497
6960
|
double val9 ;
|
6498
6961
|
int ecode9 = 0 ;
|
6499
6962
|
|
6500
|
-
if ((argc <
|
6501
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
6963
|
+
if ((argc < 2) || (argc > 10)) {
|
6964
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
6502
6965
|
}
|
6503
6966
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
|
6504
6967
|
if (!SWIG_IsOK(res1)) {
|
@@ -6515,16 +6978,20 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
|
|
6515
6978
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_rot", 3, argv[1] ));
|
6516
6979
|
}
|
6517
6980
|
arg3 = static_cast< double >(val3);
|
6518
|
-
|
6519
|
-
|
6520
|
-
|
6521
|
-
|
6522
|
-
|
6523
|
-
|
6524
|
-
|
6525
|
-
|
6526
|
-
|
6527
|
-
|
6981
|
+
if (argc > 2) {
|
6982
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
6983
|
+
if (!SWIG_IsOK(ecode4)) {
|
6984
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_rot", 4, argv[2] ));
|
6985
|
+
}
|
6986
|
+
arg4 = static_cast< Gosu::ZPos >(val4);
|
6987
|
+
}
|
6988
|
+
if (argc > 3) {
|
6989
|
+
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
6990
|
+
if (!SWIG_IsOK(ecode5)) {
|
6991
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","draw_rot", 5, argv[3] ));
|
6992
|
+
}
|
6993
|
+
arg5 = static_cast< double >(val5);
|
6994
|
+
}
|
6528
6995
|
if (argc > 4) {
|
6529
6996
|
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
6530
6997
|
if (!SWIG_IsOK(ecode6)) {
|
@@ -6991,6 +7458,56 @@ fail:
|
|
6991
7458
|
}
|
6992
7459
|
|
6993
7460
|
|
7461
|
+
SWIGINTERN VALUE
|
7462
|
+
_wrap_Image_from_markup(int argc, VALUE *argv, VALUE self) {
|
7463
|
+
std::string *arg1 = 0 ;
|
7464
|
+
double arg2 ;
|
7465
|
+
VALUE arg3 = (VALUE) 0 ;
|
7466
|
+
int res1 = SWIG_OLDOBJ ;
|
7467
|
+
double val2 ;
|
7468
|
+
int ecode2 = 0 ;
|
7469
|
+
Gosu::Image *result = 0 ;
|
7470
|
+
VALUE vresult = Qnil;
|
7471
|
+
|
7472
|
+
if ((argc < 2) || (argc > 3)) {
|
7473
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
7474
|
+
}
|
7475
|
+
{
|
7476
|
+
std::string *ptr = (std::string *)0;
|
7477
|
+
res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
7478
|
+
if (!SWIG_IsOK(res1)) {
|
7479
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Gosu_Image_from_markup", 1, argv[0] ));
|
7480
|
+
}
|
7481
|
+
if (!ptr) {
|
7482
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Gosu_Image_from_markup", 1, argv[0]));
|
7483
|
+
}
|
7484
|
+
arg1 = ptr;
|
7485
|
+
}
|
7486
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
7487
|
+
if (!SWIG_IsOK(ecode2)) {
|
7488
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu_Image_from_markup", 2, argv[1] ));
|
7489
|
+
}
|
7490
|
+
arg2 = static_cast< double >(val2);
|
7491
|
+
if (argc > 2) {
|
7492
|
+
arg3 = argv[2];
|
7493
|
+
}
|
7494
|
+
{
|
7495
|
+
try {
|
7496
|
+
result = (Gosu::Image *)Gosu_Image_from_markup((std::string const &)*arg1,arg2,arg3);
|
7497
|
+
}
|
7498
|
+
catch (const std::exception& e) {
|
7499
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
7500
|
+
}
|
7501
|
+
}
|
7502
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN | 0 );
|
7503
|
+
if (SWIG_IsNewObj(res1)) delete arg1;
|
7504
|
+
return vresult;
|
7505
|
+
fail:
|
7506
|
+
if (SWIG_IsNewObj(res1)) delete arg1;
|
7507
|
+
return Qnil;
|
7508
|
+
}
|
7509
|
+
|
7510
|
+
|
6994
7511
|
SWIGINTERN VALUE
|
6995
7512
|
_wrap_Image_load_tiles__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
6996
7513
|
VALUE arg1 = (VALUE) 0 ;
|
@@ -7221,7 +7738,7 @@ _wrap_Image_columns(int argc, VALUE *argv, VALUE self) {
|
|
7221
7738
|
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
7222
7739
|
void *argp1 = 0 ;
|
7223
7740
|
int res1 = 0 ;
|
7224
|
-
|
7741
|
+
int result;
|
7225
7742
|
VALUE vresult = Qnil;
|
7226
7743
|
|
7227
7744
|
if ((argc < 0) || (argc > 0)) {
|
@@ -7234,13 +7751,13 @@ _wrap_Image_columns(int argc, VALUE *argv, VALUE self) {
|
|
7234
7751
|
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
7235
7752
|
{
|
7236
7753
|
try {
|
7237
|
-
result = (
|
7754
|
+
result = (int)Gosu_Image_columns((Gosu::Image const *)arg1);
|
7238
7755
|
}
|
7239
7756
|
catch (const std::exception& e) {
|
7240
7757
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
7241
7758
|
}
|
7242
7759
|
}
|
7243
|
-
vresult =
|
7760
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
7244
7761
|
return vresult;
|
7245
7762
|
fail:
|
7246
7763
|
return Qnil;
|
@@ -7252,7 +7769,7 @@ _wrap_Image_rows(int argc, VALUE *argv, VALUE self) {
|
|
7252
7769
|
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
7253
7770
|
void *argp1 = 0 ;
|
7254
7771
|
int res1 = 0 ;
|
7255
|
-
|
7772
|
+
int result;
|
7256
7773
|
VALUE vresult = Qnil;
|
7257
7774
|
|
7258
7775
|
if ((argc < 0) || (argc > 0)) {
|
@@ -7265,13 +7782,13 @@ _wrap_Image_rows(int argc, VALUE *argv, VALUE self) {
|
|
7265
7782
|
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
7266
7783
|
{
|
7267
7784
|
try {
|
7268
|
-
result = (
|
7785
|
+
result = (int)Gosu_Image_rows((Gosu::Image const *)arg1);
|
7269
7786
|
}
|
7270
7787
|
catch (const std::exception& e) {
|
7271
7788
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
7272
7789
|
}
|
7273
7790
|
}
|
7274
|
-
vresult =
|
7791
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
7275
7792
|
return vresult;
|
7276
7793
|
fail:
|
7277
7794
|
return Qnil;
|
@@ -8649,159 +9166,159 @@ _wrap_TextInput_selection_starte___(int argc, VALUE *argv, VALUE self) {
|
|
8649
9166
|
if ((argc < 1) || (argc > 1)) {
|
8650
9167
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
8651
9168
|
}
|
8652
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 );
|
9169
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 );
|
9170
|
+
if (!SWIG_IsOK(res1)) {
|
9171
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput *","set_selection_start", 1, self ));
|
9172
|
+
}
|
9173
|
+
arg1 = reinterpret_cast< Gosu::TextInput * >(argp1);
|
9174
|
+
arg2 = argv[0];
|
9175
|
+
{
|
9176
|
+
try {
|
9177
|
+
Gosu_TextInput_set_selection_start(arg1,arg2);
|
9178
|
+
}
|
9179
|
+
catch (const std::exception& e) {
|
9180
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9181
|
+
}
|
9182
|
+
}
|
9183
|
+
return Qnil;
|
9184
|
+
fail:
|
9185
|
+
return Qnil;
|
9186
|
+
}
|
9187
|
+
|
9188
|
+
|
9189
|
+
SWIGINTERN VALUE
|
9190
|
+
_wrap_disown_TextInput(int argc, VALUE *argv, VALUE self) {
|
9191
|
+
Gosu::TextInput *arg1 = (Gosu::TextInput *) 0 ;
|
9192
|
+
void *argp1 = 0 ;
|
9193
|
+
int res1 = 0 ;
|
9194
|
+
|
9195
|
+
if ((argc < 1) || (argc > 1)) {
|
9196
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9197
|
+
}
|
9198
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 );
|
9199
|
+
if (!SWIG_IsOK(res1)) {
|
9200
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput *","disown_TextInput", 1, argv[0] ));
|
9201
|
+
}
|
9202
|
+
arg1 = reinterpret_cast< Gosu::TextInput * >(argp1);
|
9203
|
+
{
|
9204
|
+
Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
|
9205
|
+
if (director) director->swig_disown();
|
9206
|
+
}
|
9207
|
+
|
9208
|
+
return Qnil;
|
9209
|
+
fail:
|
9210
|
+
return Qnil;
|
9211
|
+
}
|
9212
|
+
|
9213
|
+
|
9214
|
+
static swig_class SwigClassWindow;
|
9215
|
+
|
9216
|
+
SWIGINTERN void
|
9217
|
+
free_Gosu_Window(void *self) {
|
9218
|
+
Gosu::Window *arg1 = (Gosu::Window *)self;
|
9219
|
+
SWIG_RubyRemoveTracking(arg1);
|
9220
|
+
delete arg1;
|
9221
|
+
}
|
9222
|
+
|
9223
|
+
SWIGINTERN VALUE
|
9224
|
+
_wrap_Window_width(int argc, VALUE *argv, VALUE self) {
|
9225
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9226
|
+
void *argp1 = 0 ;
|
9227
|
+
int res1 = 0 ;
|
9228
|
+
int result;
|
9229
|
+
VALUE vresult = Qnil;
|
9230
|
+
|
9231
|
+
if ((argc < 0) || (argc > 0)) {
|
9232
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9233
|
+
}
|
9234
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
8653
9235
|
if (!SWIG_IsOK(res1)) {
|
8654
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::
|
9236
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","width", 1, self ));
|
8655
9237
|
}
|
8656
|
-
arg1 = reinterpret_cast< Gosu::
|
8657
|
-
arg2 = argv[0];
|
9238
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
8658
9239
|
{
|
8659
9240
|
try {
|
8660
|
-
|
9241
|
+
result = (int)((Gosu::Window const *)arg1)->width();
|
8661
9242
|
}
|
8662
9243
|
catch (const std::exception& e) {
|
8663
9244
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
8664
9245
|
}
|
8665
9246
|
}
|
8666
|
-
|
9247
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
9248
|
+
return vresult;
|
8667
9249
|
fail:
|
8668
9250
|
return Qnil;
|
8669
9251
|
}
|
8670
9252
|
|
8671
9253
|
|
8672
9254
|
SWIGINTERN VALUE
|
8673
|
-
|
8674
|
-
Gosu::
|
9255
|
+
_wrap_Window_height(int argc, VALUE *argv, VALUE self) {
|
9256
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
8675
9257
|
void *argp1 = 0 ;
|
8676
9258
|
int res1 = 0 ;
|
9259
|
+
int result;
|
9260
|
+
VALUE vresult = Qnil;
|
8677
9261
|
|
8678
|
-
if ((argc <
|
8679
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9262
|
+
if ((argc < 0) || (argc > 0)) {
|
9263
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
8680
9264
|
}
|
8681
|
-
res1 = SWIG_ConvertPtr(
|
9265
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
8682
9266
|
if (!SWIG_IsOK(res1)) {
|
8683
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::
|
9267
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","height", 1, self ));
|
8684
9268
|
}
|
8685
|
-
arg1 = reinterpret_cast< Gosu::
|
9269
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
8686
9270
|
{
|
8687
|
-
|
8688
|
-
|
9271
|
+
try {
|
9272
|
+
result = (int)((Gosu::Window const *)arg1)->height();
|
9273
|
+
}
|
9274
|
+
catch (const std::exception& e) {
|
9275
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9276
|
+
}
|
8689
9277
|
}
|
8690
|
-
|
8691
|
-
return
|
9278
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
9279
|
+
return vresult;
|
8692
9280
|
fail:
|
8693
9281
|
return Qnil;
|
8694
9282
|
}
|
8695
9283
|
|
8696
9284
|
|
8697
|
-
static swig_class SwigClassWindow;
|
8698
|
-
|
8699
|
-
SWIGINTERN VALUE
|
8700
|
-
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
8701
|
-
_wrap_Window_allocate(VALUE self)
|
8702
|
-
#else
|
8703
|
-
_wrap_Window_allocate(int argc, VALUE *argv, VALUE self)
|
8704
|
-
#endif
|
8705
|
-
{
|
8706
|
-
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Window);
|
8707
|
-
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
8708
|
-
rb_obj_call_init(vresult, argc, argv);
|
8709
|
-
#endif
|
8710
|
-
return vresult;
|
8711
|
-
}
|
8712
|
-
|
8713
|
-
|
8714
9285
|
SWIGINTERN VALUE
|
8715
|
-
|
8716
|
-
|
8717
|
-
|
8718
|
-
|
8719
|
-
bool
|
8720
|
-
|
8721
|
-
bool arg6 = (bool) false ;
|
8722
|
-
unsigned int val2 ;
|
8723
|
-
int ecode2 = 0 ;
|
8724
|
-
unsigned int val3 ;
|
8725
|
-
int ecode3 = 0 ;
|
8726
|
-
bool val4 ;
|
8727
|
-
int ecode4 = 0 ;
|
8728
|
-
double val5 ;
|
8729
|
-
int ecode5 = 0 ;
|
8730
|
-
bool val6 ;
|
8731
|
-
int ecode6 = 0 ;
|
8732
|
-
const char *classname SWIGUNUSED = "Gosu::Window";
|
8733
|
-
Gosu::Window *result = 0 ;
|
9286
|
+
_wrap_Window_fullscreenq___(int argc, VALUE *argv, VALUE self) {
|
9287
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9288
|
+
void *argp1 = 0 ;
|
9289
|
+
int res1 = 0 ;
|
9290
|
+
bool result;
|
9291
|
+
VALUE vresult = Qnil;
|
8734
9292
|
|
8735
|
-
if ((argc <
|
8736
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
8737
|
-
}
|
8738
|
-
arg1 = self;
|
8739
|
-
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
|
8740
|
-
if (!SWIG_IsOK(ecode2)) {
|
8741
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Window", 2, argv[0] ));
|
8742
|
-
}
|
8743
|
-
arg2 = static_cast< unsigned int >(val2);
|
8744
|
-
ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
|
8745
|
-
if (!SWIG_IsOK(ecode3)) {
|
8746
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","Window", 3, argv[1] ));
|
8747
|
-
}
|
8748
|
-
arg3 = static_cast< unsigned int >(val3);
|
8749
|
-
if (argc > 2) {
|
8750
|
-
ecode4 = SWIG_AsVal_bool(argv[2], &val4);
|
8751
|
-
if (!SWIG_IsOK(ecode4)) {
|
8752
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","Window", 4, argv[2] ));
|
8753
|
-
}
|
8754
|
-
arg4 = static_cast< bool >(val4);
|
8755
|
-
}
|
8756
|
-
if (argc > 3) {
|
8757
|
-
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
8758
|
-
if (!SWIG_IsOK(ecode5)) {
|
8759
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Window", 5, argv[3] ));
|
8760
|
-
}
|
8761
|
-
arg5 = static_cast< double >(val5);
|
9293
|
+
if ((argc < 0) || (argc > 0)) {
|
9294
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
8762
9295
|
}
|
8763
|
-
|
8764
|
-
|
8765
|
-
|
8766
|
-
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "bool","Window", 6, argv[4] ));
|
8767
|
-
}
|
8768
|
-
arg6 = static_cast< bool >(val6);
|
9296
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9297
|
+
if (!SWIG_IsOK(res1)) {
|
9298
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","fullscreen", 1, self ));
|
8769
9299
|
}
|
9300
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
8770
9301
|
{
|
8771
9302
|
try {
|
8772
|
-
|
8773
|
-
/* subclassed */
|
8774
|
-
result = (Gosu::Window *)new SwigDirector_Window(arg1,arg2,arg3,arg4,arg5,arg6);
|
8775
|
-
} else {
|
8776
|
-
result = (Gosu::Window *)new Gosu::Window(arg2,arg3,arg4,arg5,arg6);
|
8777
|
-
}
|
8778
|
-
|
8779
|
-
DATA_PTR(self) = result;
|
8780
|
-
SWIG_RubyAddTracking(result, self);
|
9303
|
+
result = (bool)((Gosu::Window const *)arg1)->fullscreen();
|
8781
9304
|
}
|
8782
9305
|
catch (const std::exception& e) {
|
8783
9306
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
8784
9307
|
}
|
8785
9308
|
}
|
8786
|
-
|
9309
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
9310
|
+
return vresult;
|
8787
9311
|
fail:
|
8788
9312
|
return Qnil;
|
8789
9313
|
}
|
8790
9314
|
|
8791
9315
|
|
8792
|
-
SWIGINTERN void
|
8793
|
-
free_Gosu_Window(void *self) {
|
8794
|
-
Gosu::Window *arg1 = (Gosu::Window *)self;
|
8795
|
-
SWIG_RubyRemoveTracking(arg1);
|
8796
|
-
delete arg1;
|
8797
|
-
}
|
8798
|
-
|
8799
9316
|
SWIGINTERN VALUE
|
8800
|
-
|
9317
|
+
_wrap_Window_resizableq___(int argc, VALUE *argv, VALUE self) {
|
8801
9318
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
8802
9319
|
void *argp1 = 0 ;
|
8803
9320
|
int res1 = 0 ;
|
8804
|
-
|
9321
|
+
bool result;
|
8805
9322
|
VALUE vresult = Qnil;
|
8806
9323
|
|
8807
9324
|
if ((argc < 0) || (argc > 0)) {
|
@@ -8809,18 +9326,18 @@ _wrap_Window_width(int argc, VALUE *argv, VALUE self) {
|
|
8809
9326
|
}
|
8810
9327
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
8811
9328
|
if (!SWIG_IsOK(res1)) {
|
8812
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","
|
9329
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","resizable", 1, self ));
|
8813
9330
|
}
|
8814
9331
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
8815
9332
|
{
|
8816
9333
|
try {
|
8817
|
-
result = (
|
9334
|
+
result = (bool)((Gosu::Window const *)arg1)->resizable();
|
8818
9335
|
}
|
8819
9336
|
catch (const std::exception& e) {
|
8820
9337
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
8821
9338
|
}
|
8822
9339
|
}
|
8823
|
-
vresult =
|
9340
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
8824
9341
|
return vresult;
|
8825
9342
|
fail:
|
8826
9343
|
return Qnil;
|
@@ -8828,38 +9345,43 @@ fail:
|
|
8828
9345
|
|
8829
9346
|
|
8830
9347
|
SWIGINTERN VALUE
|
8831
|
-
|
9348
|
+
_wrap_Window_resizablee___(int argc, VALUE *argv, VALUE self) {
|
8832
9349
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9350
|
+
bool arg2 ;
|
8833
9351
|
void *argp1 = 0 ;
|
8834
9352
|
int res1 = 0 ;
|
8835
|
-
|
8836
|
-
|
9353
|
+
bool val2 ;
|
9354
|
+
int ecode2 = 0 ;
|
8837
9355
|
|
8838
|
-
if ((argc <
|
8839
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9356
|
+
if ((argc < 1) || (argc > 1)) {
|
9357
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
8840
9358
|
}
|
8841
9359
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
8842
9360
|
if (!SWIG_IsOK(res1)) {
|
8843
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window
|
9361
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","set_resizable", 1, self ));
|
8844
9362
|
}
|
8845
9363
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9364
|
+
ecode2 = SWIG_AsVal_bool(argv[0], &val2);
|
9365
|
+
if (!SWIG_IsOK(ecode2)) {
|
9366
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","set_resizable", 2, argv[0] ));
|
9367
|
+
}
|
9368
|
+
arg2 = static_cast< bool >(val2);
|
8846
9369
|
{
|
8847
9370
|
try {
|
8848
|
-
|
9371
|
+
(arg1)->set_resizable(arg2);
|
8849
9372
|
}
|
8850
9373
|
catch (const std::exception& e) {
|
8851
9374
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
8852
9375
|
}
|
8853
9376
|
}
|
8854
|
-
|
8855
|
-
return vresult;
|
9377
|
+
return Qnil;
|
8856
9378
|
fail:
|
8857
9379
|
return Qnil;
|
8858
9380
|
}
|
8859
9381
|
|
8860
9382
|
|
8861
9383
|
SWIGINTERN VALUE
|
8862
|
-
|
9384
|
+
_wrap_Window_borderlessq___(int argc, VALUE *argv, VALUE self) {
|
8863
9385
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
8864
9386
|
void *argp1 = 0 ;
|
8865
9387
|
int res1 = 0 ;
|
@@ -8871,12 +9393,12 @@ _wrap_Window_fullscreenq___(int argc, VALUE *argv, VALUE self) {
|
|
8871
9393
|
}
|
8872
9394
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
8873
9395
|
if (!SWIG_IsOK(res1)) {
|
8874
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","
|
9396
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","borderless", 1, self ));
|
8875
9397
|
}
|
8876
9398
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
8877
9399
|
{
|
8878
9400
|
try {
|
8879
|
-
result = (bool)((Gosu::Window const *)arg1)->
|
9401
|
+
result = (bool)((Gosu::Window const *)arg1)->borderless();
|
8880
9402
|
}
|
8881
9403
|
catch (const std::exception& e) {
|
8882
9404
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
@@ -8890,31 +9412,36 @@ fail:
|
|
8890
9412
|
|
8891
9413
|
|
8892
9414
|
SWIGINTERN VALUE
|
8893
|
-
|
9415
|
+
_wrap_Window_borderlesse___(int argc, VALUE *argv, VALUE self) {
|
8894
9416
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9417
|
+
bool arg2 ;
|
8895
9418
|
void *argp1 = 0 ;
|
8896
9419
|
int res1 = 0 ;
|
8897
|
-
bool
|
8898
|
-
|
9420
|
+
bool val2 ;
|
9421
|
+
int ecode2 = 0 ;
|
8899
9422
|
|
8900
|
-
if ((argc <
|
8901
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9423
|
+
if ((argc < 1) || (argc > 1)) {
|
9424
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
8902
9425
|
}
|
8903
9426
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
8904
9427
|
if (!SWIG_IsOK(res1)) {
|
8905
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window
|
9428
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","set_borderless", 1, self ));
|
8906
9429
|
}
|
8907
9430
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9431
|
+
ecode2 = SWIG_AsVal_bool(argv[0], &val2);
|
9432
|
+
if (!SWIG_IsOK(ecode2)) {
|
9433
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","set_borderless", 2, argv[0] ));
|
9434
|
+
}
|
9435
|
+
arg2 = static_cast< bool >(val2);
|
8908
9436
|
{
|
8909
9437
|
try {
|
8910
|
-
|
9438
|
+
(arg1)->set_borderless(arg2);
|
8911
9439
|
}
|
8912
9440
|
catch (const std::exception& e) {
|
8913
9441
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
8914
9442
|
}
|
8915
9443
|
}
|
8916
|
-
|
8917
|
-
return vresult;
|
9444
|
+
return Qnil;
|
8918
9445
|
fail:
|
8919
9446
|
return Qnil;
|
8920
9447
|
}
|
@@ -9350,38 +9877,124 @@ _wrap_Window_needs_cursorq___(int argc, VALUE *argv, VALUE self) {
|
|
9350
9877
|
rb_exc_raise(e.getError());
|
9351
9878
|
SWIG_fail;
|
9352
9879
|
}
|
9353
|
-
vresult = SWIG_From_bool(static_cast< bool >(result));
|
9354
|
-
return vresult;
|
9880
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
9881
|
+
return vresult;
|
9882
|
+
fail:
|
9883
|
+
return Qnil;
|
9884
|
+
}
|
9885
|
+
|
9886
|
+
|
9887
|
+
SWIGINTERN VALUE
|
9888
|
+
_wrap_Window_lose_focus(int argc, VALUE *argv, VALUE self) {
|
9889
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9890
|
+
void *argp1 = 0 ;
|
9891
|
+
int res1 = 0 ;
|
9892
|
+
Swig::Director *director = 0;
|
9893
|
+
bool upcall = false;
|
9894
|
+
|
9895
|
+
if ((argc < 0) || (argc > 0)) {
|
9896
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9897
|
+
}
|
9898
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9899
|
+
if (!SWIG_IsOK(res1)) {
|
9900
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","lose_focus", 1, self ));
|
9901
|
+
}
|
9902
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9903
|
+
director = dynamic_cast<Swig::Director *>(arg1);
|
9904
|
+
upcall = (director && (director->swig_get_self() == self));
|
9905
|
+
try {
|
9906
|
+
{
|
9907
|
+
try {
|
9908
|
+
if (upcall) {
|
9909
|
+
(arg1)->Gosu::Window::lose_focus();
|
9910
|
+
} else {
|
9911
|
+
(arg1)->lose_focus();
|
9912
|
+
}
|
9913
|
+
}
|
9914
|
+
catch (const std::exception& e) {
|
9915
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9916
|
+
}
|
9917
|
+
}
|
9918
|
+
} catch (Swig::DirectorException& e) {
|
9919
|
+
rb_exc_raise(e.getError());
|
9920
|
+
SWIG_fail;
|
9921
|
+
}
|
9922
|
+
return Qnil;
|
9923
|
+
fail:
|
9924
|
+
return Qnil;
|
9925
|
+
}
|
9926
|
+
|
9927
|
+
|
9928
|
+
SWIGINTERN VALUE
|
9929
|
+
_wrap_Window_release_memory(int argc, VALUE *argv, VALUE self) {
|
9930
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9931
|
+
void *argp1 = 0 ;
|
9932
|
+
int res1 = 0 ;
|
9933
|
+
Swig::Director *director = 0;
|
9934
|
+
bool upcall = false;
|
9935
|
+
|
9936
|
+
if ((argc < 0) || (argc > 0)) {
|
9937
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
9938
|
+
}
|
9939
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9940
|
+
if (!SWIG_IsOK(res1)) {
|
9941
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","release_memory", 1, self ));
|
9942
|
+
}
|
9943
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9944
|
+
director = dynamic_cast<Swig::Director *>(arg1);
|
9945
|
+
upcall = (director && (director->swig_get_self() == self));
|
9946
|
+
try {
|
9947
|
+
{
|
9948
|
+
try {
|
9949
|
+
if (upcall) {
|
9950
|
+
(arg1)->Gosu::Window::release_memory();
|
9951
|
+
} else {
|
9952
|
+
(arg1)->release_memory();
|
9953
|
+
}
|
9954
|
+
}
|
9955
|
+
catch (const std::exception& e) {
|
9956
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
9957
|
+
}
|
9958
|
+
}
|
9959
|
+
} catch (Swig::DirectorException& e) {
|
9960
|
+
rb_exc_raise(e.getError());
|
9961
|
+
SWIG_fail;
|
9962
|
+
}
|
9963
|
+
return Qnil;
|
9355
9964
|
fail:
|
9356
9965
|
return Qnil;
|
9357
9966
|
}
|
9358
9967
|
|
9359
9968
|
|
9360
9969
|
SWIGINTERN VALUE
|
9361
|
-
|
9970
|
+
_wrap_Window_button_down(int argc, VALUE *argv, VALUE self) {
|
9362
9971
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9972
|
+
Gosu::Button arg2 ;
|
9363
9973
|
void *argp1 = 0 ;
|
9364
9974
|
int res1 = 0 ;
|
9365
9975
|
Swig::Director *director = 0;
|
9366
9976
|
bool upcall = false;
|
9367
9977
|
|
9368
|
-
if ((argc <
|
9369
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
9978
|
+
if ((argc < 1) || (argc > 1)) {
|
9979
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9370
9980
|
}
|
9371
9981
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9372
9982
|
if (!SWIG_IsOK(res1)) {
|
9373
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","
|
9983
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","button_down", 1, self ));
|
9374
9984
|
}
|
9375
9985
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9986
|
+
{
|
9987
|
+
arg2 = NIL_P(argv[0]) ? Gosu::NO_BUTTON : Gosu::Button(NUM2LONG(argv[0]));
|
9988
|
+
}
|
9376
9989
|
director = dynamic_cast<Swig::Director *>(arg1);
|
9377
9990
|
upcall = (director && (director->swig_get_self() == self));
|
9378
9991
|
try {
|
9379
9992
|
{
|
9380
9993
|
try {
|
9381
9994
|
if (upcall) {
|
9382
|
-
(arg1)->Gosu::Window::
|
9995
|
+
(arg1)->Gosu::Window::button_down(arg2);
|
9383
9996
|
} else {
|
9384
|
-
(arg1)->
|
9997
|
+
(arg1)->button_down(arg2);
|
9385
9998
|
}
|
9386
9999
|
}
|
9387
10000
|
catch (const std::exception& e) {
|
@@ -9399,30 +10012,34 @@ fail:
|
|
9399
10012
|
|
9400
10013
|
|
9401
10014
|
SWIGINTERN VALUE
|
9402
|
-
|
10015
|
+
_wrap_Window_button_up(int argc, VALUE *argv, VALUE self) {
|
9403
10016
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
10017
|
+
Gosu::Button arg2 ;
|
9404
10018
|
void *argp1 = 0 ;
|
9405
10019
|
int res1 = 0 ;
|
9406
10020
|
Swig::Director *director = 0;
|
9407
10021
|
bool upcall = false;
|
9408
10022
|
|
9409
|
-
if ((argc <
|
9410
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
10023
|
+
if ((argc < 1) || (argc > 1)) {
|
10024
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
9411
10025
|
}
|
9412
10026
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9413
10027
|
if (!SWIG_IsOK(res1)) {
|
9414
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","
|
10028
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","button_up", 1, self ));
|
9415
10029
|
}
|
9416
10030
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
10031
|
+
{
|
10032
|
+
arg2 = NIL_P(argv[0]) ? Gosu::NO_BUTTON : Gosu::Button(NUM2LONG(argv[0]));
|
10033
|
+
}
|
9417
10034
|
director = dynamic_cast<Swig::Director *>(arg1);
|
9418
10035
|
upcall = (director && (director->swig_get_self() == self));
|
9419
10036
|
try {
|
9420
10037
|
{
|
9421
10038
|
try {
|
9422
10039
|
if (upcall) {
|
9423
|
-
(arg1)->Gosu::Window::
|
10040
|
+
(arg1)->Gosu::Window::button_up(arg2);
|
9424
10041
|
} else {
|
9425
|
-
(arg1)->
|
10042
|
+
(arg1)->button_up(arg2);
|
9426
10043
|
}
|
9427
10044
|
}
|
9428
10045
|
catch (const std::exception& e) {
|
@@ -9440,11 +10057,13 @@ fail:
|
|
9440
10057
|
|
9441
10058
|
|
9442
10059
|
SWIGINTERN VALUE
|
9443
|
-
|
10060
|
+
_wrap_Window_gamepad_connected(int argc, VALUE *argv, VALUE self) {
|
9444
10061
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9445
|
-
|
10062
|
+
int arg2 ;
|
9446
10063
|
void *argp1 = 0 ;
|
9447
10064
|
int res1 = 0 ;
|
10065
|
+
int val2 ;
|
10066
|
+
int ecode2 = 0 ;
|
9448
10067
|
Swig::Director *director = 0;
|
9449
10068
|
bool upcall = false;
|
9450
10069
|
|
@@ -9453,21 +10072,23 @@ _wrap_Window_button_down(int argc, VALUE *argv, VALUE self) {
|
|
9453
10072
|
}
|
9454
10073
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9455
10074
|
if (!SWIG_IsOK(res1)) {
|
9456
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","
|
10075
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","gamepad_connected", 1, self ));
|
9457
10076
|
}
|
9458
10077
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9459
|
-
|
9460
|
-
|
9461
|
-
|
10078
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
10079
|
+
if (!SWIG_IsOK(ecode2)) {
|
10080
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","gamepad_connected", 2, argv[0] ));
|
10081
|
+
}
|
10082
|
+
arg2 = static_cast< int >(val2);
|
9462
10083
|
director = dynamic_cast<Swig::Director *>(arg1);
|
9463
10084
|
upcall = (director && (director->swig_get_self() == self));
|
9464
10085
|
try {
|
9465
10086
|
{
|
9466
10087
|
try {
|
9467
10088
|
if (upcall) {
|
9468
|
-
(arg1)->Gosu::Window::
|
10089
|
+
(arg1)->Gosu::Window::gamepad_connected(arg2);
|
9469
10090
|
} else {
|
9470
|
-
(arg1)->
|
10091
|
+
(arg1)->gamepad_connected(arg2);
|
9471
10092
|
}
|
9472
10093
|
}
|
9473
10094
|
catch (const std::exception& e) {
|
@@ -9485,11 +10106,13 @@ fail:
|
|
9485
10106
|
|
9486
10107
|
|
9487
10108
|
SWIGINTERN VALUE
|
9488
|
-
|
10109
|
+
_wrap_Window_gamepad_disconnected(int argc, VALUE *argv, VALUE self) {
|
9489
10110
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
9490
|
-
|
10111
|
+
int arg2 ;
|
9491
10112
|
void *argp1 = 0 ;
|
9492
10113
|
int res1 = 0 ;
|
10114
|
+
int val2 ;
|
10115
|
+
int ecode2 = 0 ;
|
9493
10116
|
Swig::Director *director = 0;
|
9494
10117
|
bool upcall = false;
|
9495
10118
|
|
@@ -9498,21 +10121,23 @@ _wrap_Window_button_up(int argc, VALUE *argv, VALUE self) {
|
|
9498
10121
|
}
|
9499
10122
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
9500
10123
|
if (!SWIG_IsOK(res1)) {
|
9501
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","
|
10124
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","gamepad_disconnected", 1, self ));
|
9502
10125
|
}
|
9503
10126
|
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
9504
|
-
|
9505
|
-
|
9506
|
-
|
10127
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
10128
|
+
if (!SWIG_IsOK(ecode2)) {
|
10129
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","gamepad_disconnected", 2, argv[0] ));
|
10130
|
+
}
|
10131
|
+
arg2 = static_cast< int >(val2);
|
9507
10132
|
director = dynamic_cast<Swig::Director *>(arg1);
|
9508
10133
|
upcall = (director && (director->swig_get_self() == self));
|
9509
10134
|
try {
|
9510
10135
|
{
|
9511
10136
|
try {
|
9512
10137
|
if (upcall) {
|
9513
|
-
(arg1)->Gosu::Window::
|
10138
|
+
(arg1)->Gosu::Window::gamepad_disconnected(arg2);
|
9514
10139
|
} else {
|
9515
|
-
(arg1)->
|
10140
|
+
(arg1)->gamepad_disconnected(arg2);
|
9516
10141
|
}
|
9517
10142
|
}
|
9518
10143
|
catch (const std::exception& e) {
|
@@ -9585,6 +10210,67 @@ fail:
|
|
9585
10210
|
}
|
9586
10211
|
|
9587
10212
|
|
10213
|
+
SWIGINTERN VALUE
|
10214
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
10215
|
+
_wrap_Window_allocate(VALUE self)
|
10216
|
+
#else
|
10217
|
+
_wrap_Window_allocate(int argc, VALUE *argv, VALUE self)
|
10218
|
+
#endif
|
10219
|
+
{
|
10220
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Window);
|
10221
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
10222
|
+
rb_obj_call_init(vresult, argc, argv);
|
10223
|
+
#endif
|
10224
|
+
return vresult;
|
10225
|
+
}
|
10226
|
+
|
10227
|
+
|
10228
|
+
SWIGINTERN VALUE
|
10229
|
+
_wrap_new_Window(int argc, VALUE *argv, VALUE self) {
|
10230
|
+
VALUE arg1 = (VALUE) 0 ;
|
10231
|
+
int arg2 ;
|
10232
|
+
int arg3 ;
|
10233
|
+
VALUE arg4 = (VALUE) 0 ;
|
10234
|
+
int val2 ;
|
10235
|
+
int ecode2 = 0 ;
|
10236
|
+
int val3 ;
|
10237
|
+
int ecode3 = 0 ;
|
10238
|
+
const char *classname SWIGUNUSED = "Gosu::Window";
|
10239
|
+
Gosu::Window *result = 0 ;
|
10240
|
+
|
10241
|
+
if ((argc < 2) || (argc > 3)) {
|
10242
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
10243
|
+
}
|
10244
|
+
arg1 = self;
|
10245
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
10246
|
+
if (!SWIG_IsOK(ecode2)) {
|
10247
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Window", 2, argv[0] ));
|
10248
|
+
}
|
10249
|
+
arg2 = static_cast< int >(val2);
|
10250
|
+
ecode3 = SWIG_AsVal_int(argv[1], &val3);
|
10251
|
+
if (!SWIG_IsOK(ecode3)) {
|
10252
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Window", 3, argv[1] ));
|
10253
|
+
}
|
10254
|
+
arg3 = static_cast< int >(val3);
|
10255
|
+
if (argc > 2) {
|
10256
|
+
arg4 = argv[2];
|
10257
|
+
}
|
10258
|
+
{
|
10259
|
+
try {
|
10260
|
+
result = (Gosu::Window *)new_Gosu_Window(arg1,arg2,arg3,arg4);
|
10261
|
+
DATA_PTR(self) = result;
|
10262
|
+
SWIG_RubyAddTracking(result, self);
|
10263
|
+
}
|
10264
|
+
catch (const std::exception& e) {
|
10265
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
10266
|
+
}
|
10267
|
+
}
|
10268
|
+
return self;
|
10269
|
+
fail:
|
10270
|
+
return Qnil;
|
10271
|
+
}
|
10272
|
+
|
10273
|
+
|
9588
10274
|
SWIGINTERN VALUE
|
9589
10275
|
_wrap_Window_widthe___(int argc, VALUE *argv, VALUE self) {
|
9590
10276
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
@@ -10002,7 +10688,7 @@ _wrap_screen_width(int argc, VALUE *argv, VALUE self) {
|
|
10002
10688
|
Gosu::Window *arg1 = (Gosu::Window *) nullptr ;
|
10003
10689
|
void *argp1 = 0 ;
|
10004
10690
|
int res1 = 0 ;
|
10005
|
-
|
10691
|
+
int result;
|
10006
10692
|
VALUE vresult = Qnil;
|
10007
10693
|
|
10008
10694
|
if ((argc < 0) || (argc > 1)) {
|
@@ -10017,13 +10703,13 @@ _wrap_screen_width(int argc, VALUE *argv, VALUE self) {
|
|
10017
10703
|
}
|
10018
10704
|
{
|
10019
10705
|
try {
|
10020
|
-
result = (
|
10706
|
+
result = (int)Gosu::screen_width(arg1);
|
10021
10707
|
}
|
10022
10708
|
catch (const std::exception& e) {
|
10023
10709
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10024
10710
|
}
|
10025
10711
|
}
|
10026
|
-
vresult =
|
10712
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
10027
10713
|
return vresult;
|
10028
10714
|
fail:
|
10029
10715
|
return Qnil;
|
@@ -10035,7 +10721,7 @@ _wrap_screen_height(int argc, VALUE *argv, VALUE self) {
|
|
10035
10721
|
Gosu::Window *arg1 = (Gosu::Window *) nullptr ;
|
10036
10722
|
void *argp1 = 0 ;
|
10037
10723
|
int res1 = 0 ;
|
10038
|
-
|
10724
|
+
int result;
|
10039
10725
|
VALUE vresult = Qnil;
|
10040
10726
|
|
10041
10727
|
if ((argc < 0) || (argc > 1)) {
|
@@ -10050,13 +10736,13 @@ _wrap_screen_height(int argc, VALUE *argv, VALUE self) {
|
|
10050
10736
|
}
|
10051
10737
|
{
|
10052
10738
|
try {
|
10053
|
-
result = (
|
10739
|
+
result = (int)Gosu::screen_height(arg1);
|
10054
10740
|
}
|
10055
10741
|
catch (const std::exception& e) {
|
10056
10742
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10057
10743
|
}
|
10058
10744
|
}
|
10059
|
-
vresult =
|
10745
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
10060
10746
|
return vresult;
|
10061
10747
|
fail:
|
10062
10748
|
return Qnil;
|
@@ -10068,7 +10754,7 @@ _wrap_available_width(int argc, VALUE *argv, VALUE self) {
|
|
10068
10754
|
Gosu::Window *arg1 = (Gosu::Window *) nullptr ;
|
10069
10755
|
void *argp1 = 0 ;
|
10070
10756
|
int res1 = 0 ;
|
10071
|
-
|
10757
|
+
int result;
|
10072
10758
|
VALUE vresult = Qnil;
|
10073
10759
|
|
10074
10760
|
if ((argc < 0) || (argc > 1)) {
|
@@ -10083,13 +10769,13 @@ _wrap_available_width(int argc, VALUE *argv, VALUE self) {
|
|
10083
10769
|
}
|
10084
10770
|
{
|
10085
10771
|
try {
|
10086
|
-
result = (
|
10772
|
+
result = (int)Gosu::available_width(arg1);
|
10087
10773
|
}
|
10088
10774
|
catch (const std::exception& e) {
|
10089
10775
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10090
10776
|
}
|
10091
10777
|
}
|
10092
|
-
vresult =
|
10778
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
10093
10779
|
return vresult;
|
10094
10780
|
fail:
|
10095
10781
|
return Qnil;
|
@@ -10101,7 +10787,7 @@ _wrap_available_height(int argc, VALUE *argv, VALUE self) {
|
|
10101
10787
|
Gosu::Window *arg1 = (Gosu::Window *) nullptr ;
|
10102
10788
|
void *argp1 = 0 ;
|
10103
10789
|
int res1 = 0 ;
|
10104
|
-
|
10790
|
+
int result;
|
10105
10791
|
VALUE vresult = Qnil;
|
10106
10792
|
|
10107
10793
|
if ((argc < 0) || (argc > 1)) {
|
@@ -10116,13 +10802,13 @@ _wrap_available_height(int argc, VALUE *argv, VALUE self) {
|
|
10116
10802
|
}
|
10117
10803
|
{
|
10118
10804
|
try {
|
10119
|
-
result = (
|
10805
|
+
result = (int)Gosu::available_height(arg1);
|
10120
10806
|
}
|
10121
10807
|
catch (const std::exception& e) {
|
10122
10808
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10123
10809
|
}
|
10124
10810
|
}
|
10125
|
-
vresult =
|
10811
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
10126
10812
|
return vresult;
|
10127
10813
|
fail:
|
10128
10814
|
return Qnil;
|
@@ -10149,14 +10835,14 @@ _wrap_char_to_button_id(int argc, VALUE *argv, VALUE self) {
|
|
10149
10835
|
}
|
10150
10836
|
{
|
10151
10837
|
try {
|
10152
|
-
result = Gosu::char_to_button_id(arg1);
|
10838
|
+
result = (Gosu::Button)Gosu::char_to_button_id(arg1);
|
10153
10839
|
}
|
10154
10840
|
catch (const std::exception& e) {
|
10155
10841
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10156
10842
|
}
|
10157
10843
|
}
|
10158
10844
|
{
|
10159
|
-
vresult = result == Gosu::NO_BUTTON ? Qnil : LONG2NUM(
|
10845
|
+
vresult = result == Gosu::NO_BUTTON ? Qnil : LONG2NUM(result);
|
10160
10846
|
}
|
10161
10847
|
return vresult;
|
10162
10848
|
fail:
|
@@ -10218,6 +10904,91 @@ fail:
|
|
10218
10904
|
}
|
10219
10905
|
|
10220
10906
|
|
10907
|
+
SWIGINTERN VALUE
|
10908
|
+
_wrap_button_name(int argc, VALUE *argv, VALUE self) {
|
10909
|
+
Gosu::Button arg1 ;
|
10910
|
+
VALUE result;
|
10911
|
+
VALUE vresult = Qnil;
|
10912
|
+
|
10913
|
+
if ((argc < 1) || (argc > 1)) {
|
10914
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10915
|
+
}
|
10916
|
+
{
|
10917
|
+
arg1 = NIL_P(argv[0]) ? Gosu::NO_BUTTON : Gosu::Button(NUM2LONG(argv[0]));
|
10918
|
+
}
|
10919
|
+
{
|
10920
|
+
try {
|
10921
|
+
result = (VALUE)Gosu::button_name(arg1);
|
10922
|
+
}
|
10923
|
+
catch (const std::exception& e) {
|
10924
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
10925
|
+
}
|
10926
|
+
}
|
10927
|
+
vresult = result;
|
10928
|
+
return vresult;
|
10929
|
+
fail:
|
10930
|
+
return Qnil;
|
10931
|
+
}
|
10932
|
+
|
10933
|
+
|
10934
|
+
SWIGINTERN VALUE
|
10935
|
+
_wrap_gamepad_name(int argc, VALUE *argv, VALUE self) {
|
10936
|
+
int arg1 ;
|
10937
|
+
int val1 ;
|
10938
|
+
int ecode1 = 0 ;
|
10939
|
+
VALUE result;
|
10940
|
+
VALUE vresult = Qnil;
|
10941
|
+
|
10942
|
+
if ((argc < 1) || (argc > 1)) {
|
10943
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10944
|
+
}
|
10945
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
10946
|
+
if (!SWIG_IsOK(ecode1)) {
|
10947
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Gosu::gamepad_name", 1, argv[0] ));
|
10948
|
+
}
|
10949
|
+
arg1 = static_cast< int >(val1);
|
10950
|
+
{
|
10951
|
+
try {
|
10952
|
+
result = (VALUE)Gosu::gamepad_name(arg1);
|
10953
|
+
}
|
10954
|
+
catch (const std::exception& e) {
|
10955
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
10956
|
+
}
|
10957
|
+
}
|
10958
|
+
vresult = result;
|
10959
|
+
return vresult;
|
10960
|
+
fail:
|
10961
|
+
return Qnil;
|
10962
|
+
}
|
10963
|
+
|
10964
|
+
|
10965
|
+
SWIGINTERN VALUE
|
10966
|
+
_wrap_axis(int argc, VALUE *argv, VALUE self) {
|
10967
|
+
Gosu::Button arg1 ;
|
10968
|
+
double result;
|
10969
|
+
VALUE vresult = Qnil;
|
10970
|
+
|
10971
|
+
if ((argc < 1) || (argc > 1)) {
|
10972
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10973
|
+
}
|
10974
|
+
{
|
10975
|
+
arg1 = NIL_P(argv[0]) ? Gosu::NO_BUTTON : Gosu::Button(NUM2LONG(argv[0]));
|
10976
|
+
}
|
10977
|
+
{
|
10978
|
+
try {
|
10979
|
+
result = (double)Gosu::axis(arg1);
|
10980
|
+
}
|
10981
|
+
catch (const std::exception& e) {
|
10982
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
10983
|
+
}
|
10984
|
+
}
|
10985
|
+
vresult = SWIG_From_double(static_cast< double >(result));
|
10986
|
+
return vresult;
|
10987
|
+
fail:
|
10988
|
+
return Qnil;
|
10989
|
+
}
|
10990
|
+
|
10991
|
+
|
10221
10992
|
SWIGINTERN VALUE
|
10222
10993
|
_wrap_draw_line(int argc, VALUE *argv, VALUE self) {
|
10223
10994
|
double arg1 ;
|
@@ -11443,7 +12214,6 @@ fail:
|
|
11443
12214
|
|
11444
12215
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
11445
12216
|
|
11446
|
-
static swig_type_info _swigt__p_Gosu__Button = {"_p_Gosu__Button", "Gosu::Button *", 0, 0, (void*)0, 0};
|
11447
12217
|
static swig_type_info _swigt__p_Gosu__Channel = {"_p_Gosu__Channel", "Gosu::Channel *", 0, 0, (void*)0, 0};
|
11448
12218
|
static swig_type_info _swigt__p_Gosu__Color = {"_p_Gosu__Color", "Gosu::Color *", 0, 0, (void*)0, 0};
|
11449
12219
|
static swig_type_info _swigt__p_Gosu__Font = {"_p_Gosu__Font", "Gosu::Font *", 0, 0, (void*)0, 0};
|
@@ -11459,7 +12229,6 @@ static swig_type_info _swigt__p_std__arrayT_double_16_t = {"_p_std__arrayT_doubl
|
|
11459
12229
|
static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
|
11460
12230
|
|
11461
12231
|
static swig_type_info *swig_type_initial[] = {
|
11462
|
-
&_swigt__p_Gosu__Button,
|
11463
12232
|
&_swigt__p_Gosu__Channel,
|
11464
12233
|
&_swigt__p_Gosu__Color,
|
11465
12234
|
&_swigt__p_Gosu__Font,
|
@@ -11475,7 +12244,6 @@ static swig_type_info *swig_type_initial[] = {
|
|
11475
12244
|
&_swigt__p_std__string,
|
11476
12245
|
};
|
11477
12246
|
|
11478
|
-
static swig_cast_info _swigc__p_Gosu__Button[] = { {&_swigt__p_Gosu__Button, 0, 0, 0},{0, 0, 0, 0}};
|
11479
12247
|
static swig_cast_info _swigc__p_Gosu__Channel[] = { {&_swigt__p_Gosu__Channel, 0, 0, 0},{0, 0, 0, 0}};
|
11480
12248
|
static swig_cast_info _swigc__p_Gosu__Color[] = { {&_swigt__p_Gosu__Color, 0, 0, 0},{0, 0, 0, 0}};
|
11481
12249
|
static swig_cast_info _swigc__p_Gosu__Font[] = { {&_swigt__p_Gosu__Font, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -11491,7 +12259,6 @@ static swig_cast_info _swigc__p_std__arrayT_double_16_t[] = { {&_swigt__p_std__
|
|
11491
12259
|
static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
|
11492
12260
|
|
11493
12261
|
static swig_cast_info *swig_cast_initial[] = {
|
11494
|
-
_swigc__p_Gosu__Button,
|
11495
12262
|
_swigc__p_Gosu__Channel,
|
11496
12263
|
_swigc__p_Gosu__Color,
|
11497
12264
|
_swigc__p_Gosu__Font,
|
@@ -11761,9 +12528,9 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11761
12528
|
SWIG_RubyInitializeTrackings();
|
11762
12529
|
rb_define_const(mGosu, "VERSION", SWIG_From_std_string(static_cast< std::string >(Gosu::VERSION)));
|
11763
12530
|
rb_define_const(mGosu, "LICENSES", SWIG_From_std_string(static_cast< std::string >(Gosu::LICENSES)));
|
11764
|
-
rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(
|
11765
|
-
rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(
|
11766
|
-
rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(
|
12531
|
+
rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(1)));
|
12532
|
+
rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(1)));
|
12533
|
+
rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(0)));
|
11767
12534
|
rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
|
11768
12535
|
rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
|
11769
12536
|
rb_define_module_function(mGosu, "degrees_to_radians", VALUEFUNC(_wrap_degrees_to_radians), -1);
|
@@ -11778,7 +12545,6 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11778
12545
|
rb_define_const(mGosu, "MAX_TEXTURE_SIZE", SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Gosu::MAX_TEXTURE_SIZE)));
|
11779
12546
|
rb_define_module_function(mGosu, "language", VALUEFUNC(_wrap_language), -1);
|
11780
12547
|
rb_define_module_function(mGosu, "enable_undocumented_retrofication", VALUEFUNC(_wrap_enable_undocumented_retrofication), -1);
|
11781
|
-
rb_define_module_function(mGosu, "_release_all_openal_resources", VALUEFUNC(_wrap__release_all_openal_resources), -1);
|
11782
12548
|
|
11783
12549
|
SwigClassColor.klass = rb_define_class_under(mGosu, "Color", rb_cObject);
|
11784
12550
|
SWIG_TypeClientData(SWIGTYPE_p_Gosu__Color, (void *) &SwigClassColor);
|
@@ -11822,9 +12588,12 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11822
12588
|
rb_define_method(SwigClassFont.klass, "name", VALUEFUNC(_wrap_Font_name), -1);
|
11823
12589
|
rb_define_method(SwigClassFont.klass, "height", VALUEFUNC(_wrap_Font_height), -1);
|
11824
12590
|
rb_define_method(SwigClassFont.klass, "flags", VALUEFUNC(_wrap_Font_flags), -1);
|
12591
|
+
rb_define_method(SwigClassFont.klass, "draw_text", VALUEFUNC(_wrap_Font_draw_text), -1);
|
11825
12592
|
rb_define_method(SwigClassFont.klass, "draw_markup", VALUEFUNC(_wrap_Font_draw_markup), -1);
|
12593
|
+
rb_define_method(SwigClassFont.klass, "draw_text_rel", VALUEFUNC(_wrap_Font_draw_text_rel), -1);
|
11826
12594
|
rb_define_method(SwigClassFont.klass, "draw_markup_rel", VALUEFUNC(_wrap_Font_draw_markup_rel), -1);
|
11827
12595
|
rb_define_method(SwigClassFont.klass, "set_image", VALUEFUNC(_wrap_Font_set_image), -1);
|
12596
|
+
rb_define_method(SwigClassFont.klass, "text_width", VALUEFUNC(_wrap_Font_text_width), -1);
|
11828
12597
|
rb_define_method(SwigClassFont.klass, "markup_width", VALUEFUNC(_wrap_Font_markup_width), -1);
|
11829
12598
|
SwigClassFont.mark = 0;
|
11830
12599
|
SwigClassFont.destroy = (void (*)(void *)) free_Gosu_Font;
|
@@ -11861,6 +12630,7 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11861
12630
|
rb_define_method(SwigClassImage.klass, "gl_tex_info", VALUEFUNC(_wrap_Image_gl_tex_info), -1);
|
11862
12631
|
rb_define_method(SwigClassImage.klass, "subimage", VALUEFUNC(_wrap_Image_subimage), -1);
|
11863
12632
|
rb_define_singleton_method(SwigClassImage.klass, "from_text", VALUEFUNC(_wrap_Image_from_text), -1);
|
12633
|
+
rb_define_singleton_method(SwigClassImage.klass, "from_markup", VALUEFUNC(_wrap_Image_from_markup), -1);
|
11864
12634
|
rb_define_singleton_method(SwigClassImage.klass, "load_tiles", VALUEFUNC(_wrap_Image_load_tiles), -1);
|
11865
12635
|
rb_define_method(SwigClassImage.klass, "to_blob", VALUEFUNC(_wrap_Image_to_blob), -1);
|
11866
12636
|
rb_define_method(SwigClassImage.klass, "columns", VALUEFUNC(_wrap_Image_columns), -1);
|
@@ -11956,6 +12726,9 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11956
12726
|
rb_define_const(mGosu, "KB_DOWN", SWIG_From_int(static_cast< int >(Gosu::KB_DOWN)));
|
11957
12727
|
rb_define_const(mGosu, "KB_HOME", SWIG_From_int(static_cast< int >(Gosu::KB_HOME)));
|
11958
12728
|
rb_define_const(mGosu, "KB_END", SWIG_From_int(static_cast< int >(Gosu::KB_END)));
|
12729
|
+
rb_define_const(mGosu, "KB_PRINT_SCREEN", SWIG_From_int(static_cast< int >(Gosu::KB_PRINT_SCREEN)));
|
12730
|
+
rb_define_const(mGosu, "KB_SCROLL_LOCK", SWIG_From_int(static_cast< int >(Gosu::KB_SCROLL_LOCK)));
|
12731
|
+
rb_define_const(mGosu, "KB_PAUSE", SWIG_From_int(static_cast< int >(Gosu::KB_PAUSE)));
|
11959
12732
|
rb_define_const(mGosu, "KB_INSERT", SWIG_From_int(static_cast< int >(Gosu::KB_INSERT)));
|
11960
12733
|
rb_define_const(mGosu, "KB_DELETE", SWIG_From_int(static_cast< int >(Gosu::KB_DELETE)));
|
11961
12734
|
rb_define_const(mGosu, "KB_PAGE_UP", SWIG_From_int(static_cast< int >(Gosu::KB_PAGE_UP)));
|
@@ -11972,6 +12745,7 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11972
12745
|
rb_define_const(mGosu, "KB_COMMA", SWIG_From_int(static_cast< int >(Gosu::KB_COMMA)));
|
11973
12746
|
rb_define_const(mGosu, "KB_PERIOD", SWIG_From_int(static_cast< int >(Gosu::KB_PERIOD)));
|
11974
12747
|
rb_define_const(mGosu, "KB_SLASH", SWIG_From_int(static_cast< int >(Gosu::KB_SLASH)));
|
12748
|
+
rb_define_const(mGosu, "KB_CAPS_LOCK", SWIG_From_int(static_cast< int >(Gosu::KB_CAPS_LOCK)));
|
11975
12749
|
rb_define_const(mGosu, "KB_A", SWIG_From_int(static_cast< int >(Gosu::KB_A)));
|
11976
12750
|
rb_define_const(mGosu, "KB_B", SWIG_From_int(static_cast< int >(Gosu::KB_B)));
|
11977
12751
|
rb_define_const(mGosu, "KB_C", SWIG_From_int(static_cast< int >(Gosu::KB_C)));
|
@@ -12027,10 +12801,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12027
12801
|
rb_define_const(mGosu, "MS_OTHER_5", SWIG_From_int(static_cast< int >(Gosu::MS_OTHER_5)));
|
12028
12802
|
rb_define_const(mGosu, "MS_OTHER_6", SWIG_From_int(static_cast< int >(Gosu::MS_OTHER_6)));
|
12029
12803
|
rb_define_const(mGosu, "MS_OTHER_7", SWIG_From_int(static_cast< int >(Gosu::MS_OTHER_7)));
|
12030
|
-
rb_define_const(mGosu, "
|
12031
|
-
rb_define_const(mGosu, "
|
12032
|
-
rb_define_const(mGosu, "
|
12033
|
-
rb_define_const(mGosu, "
|
12804
|
+
rb_define_const(mGosu, "GP_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_LEFT)));
|
12805
|
+
rb_define_const(mGosu, "GP_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_RIGHT)));
|
12806
|
+
rb_define_const(mGosu, "GP_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_UP)));
|
12807
|
+
rb_define_const(mGosu, "GP_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_DOWN)));
|
12034
12808
|
rb_define_const(mGosu, "GP_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_0)));
|
12035
12809
|
rb_define_const(mGosu, "GP_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_1)));
|
12036
12810
|
rb_define_const(mGosu, "GP_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_2)));
|
@@ -12047,10 +12821,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12047
12821
|
rb_define_const(mGosu, "GP_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_13)));
|
12048
12822
|
rb_define_const(mGosu, "GP_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_14)));
|
12049
12823
|
rb_define_const(mGosu, "GP_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_15)));
|
12050
|
-
rb_define_const(mGosu, "
|
12051
|
-
rb_define_const(mGosu, "
|
12052
|
-
rb_define_const(mGosu, "
|
12053
|
-
rb_define_const(mGosu, "
|
12824
|
+
rb_define_const(mGosu, "GP_0_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_LEFT)));
|
12825
|
+
rb_define_const(mGosu, "GP_0_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_RIGHT)));
|
12826
|
+
rb_define_const(mGosu, "GP_0_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_UP)));
|
12827
|
+
rb_define_const(mGosu, "GP_0_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_DOWN)));
|
12054
12828
|
rb_define_const(mGosu, "GP_0_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_0)));
|
12055
12829
|
rb_define_const(mGosu, "GP_0_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_1)));
|
12056
12830
|
rb_define_const(mGosu, "GP_0_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_2)));
|
@@ -12067,10 +12841,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12067
12841
|
rb_define_const(mGosu, "GP_0_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_13)));
|
12068
12842
|
rb_define_const(mGosu, "GP_0_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_14)));
|
12069
12843
|
rb_define_const(mGosu, "GP_0_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_15)));
|
12070
|
-
rb_define_const(mGosu, "
|
12071
|
-
rb_define_const(mGosu, "
|
12072
|
-
rb_define_const(mGosu, "
|
12073
|
-
rb_define_const(mGosu, "
|
12844
|
+
rb_define_const(mGosu, "GP_1_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_LEFT)));
|
12845
|
+
rb_define_const(mGosu, "GP_1_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_RIGHT)));
|
12846
|
+
rb_define_const(mGosu, "GP_1_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_UP)));
|
12847
|
+
rb_define_const(mGosu, "GP_1_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_DOWN)));
|
12074
12848
|
rb_define_const(mGosu, "GP_1_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_0)));
|
12075
12849
|
rb_define_const(mGosu, "GP_1_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_1)));
|
12076
12850
|
rb_define_const(mGosu, "GP_1_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_2)));
|
@@ -12087,10 +12861,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12087
12861
|
rb_define_const(mGosu, "GP_1_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_13)));
|
12088
12862
|
rb_define_const(mGosu, "GP_1_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_14)));
|
12089
12863
|
rb_define_const(mGosu, "GP_1_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_15)));
|
12090
|
-
rb_define_const(mGosu, "
|
12091
|
-
rb_define_const(mGosu, "
|
12092
|
-
rb_define_const(mGosu, "
|
12093
|
-
rb_define_const(mGosu, "
|
12864
|
+
rb_define_const(mGosu, "GP_2_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_LEFT)));
|
12865
|
+
rb_define_const(mGosu, "GP_2_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_RIGHT)));
|
12866
|
+
rb_define_const(mGosu, "GP_2_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_UP)));
|
12867
|
+
rb_define_const(mGosu, "GP_2_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_DOWN)));
|
12094
12868
|
rb_define_const(mGosu, "GP_2_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_0)));
|
12095
12869
|
rb_define_const(mGosu, "GP_2_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_1)));
|
12096
12870
|
rb_define_const(mGosu, "GP_2_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_2)));
|
@@ -12107,10 +12881,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12107
12881
|
rb_define_const(mGosu, "GP_2_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_13)));
|
12108
12882
|
rb_define_const(mGosu, "GP_2_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_14)));
|
12109
12883
|
rb_define_const(mGosu, "GP_2_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_15)));
|
12110
|
-
rb_define_const(mGosu, "
|
12111
|
-
rb_define_const(mGosu, "
|
12112
|
-
rb_define_const(mGosu, "
|
12113
|
-
rb_define_const(mGosu, "
|
12884
|
+
rb_define_const(mGosu, "GP_3_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_LEFT)));
|
12885
|
+
rb_define_const(mGosu, "GP_3_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_RIGHT)));
|
12886
|
+
rb_define_const(mGosu, "GP_3_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_UP)));
|
12887
|
+
rb_define_const(mGosu, "GP_3_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_DOWN)));
|
12114
12888
|
rb_define_const(mGosu, "GP_3_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_0)));
|
12115
12889
|
rb_define_const(mGosu, "GP_3_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_1)));
|
12116
12890
|
rb_define_const(mGosu, "GP_3_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_2)));
|
@@ -12127,6 +12901,56 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12127
12901
|
rb_define_const(mGosu, "GP_3_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_13)));
|
12128
12902
|
rb_define_const(mGosu, "GP_3_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_14)));
|
12129
12903
|
rb_define_const(mGosu, "GP_3_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_15)));
|
12904
|
+
rb_define_const(mGosu, "GP_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT)));
|
12905
|
+
rb_define_const(mGosu, "GP_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT)));
|
12906
|
+
rb_define_const(mGosu, "GP_UP", SWIG_From_int(static_cast< int >(Gosu::GP_UP)));
|
12907
|
+
rb_define_const(mGosu, "GP_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_DOWN)));
|
12908
|
+
rb_define_const(mGosu, "GP_0_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT)));
|
12909
|
+
rb_define_const(mGosu, "GP_0_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT)));
|
12910
|
+
rb_define_const(mGosu, "GP_0_UP", SWIG_From_int(static_cast< int >(Gosu::GP_0_UP)));
|
12911
|
+
rb_define_const(mGosu, "GP_0_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_0_DOWN)));
|
12912
|
+
rb_define_const(mGosu, "GP_1_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT)));
|
12913
|
+
rb_define_const(mGosu, "GP_1_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT)));
|
12914
|
+
rb_define_const(mGosu, "GP_1_UP", SWIG_From_int(static_cast< int >(Gosu::GP_1_UP)));
|
12915
|
+
rb_define_const(mGosu, "GP_1_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_1_DOWN)));
|
12916
|
+
rb_define_const(mGosu, "GP_2_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT)));
|
12917
|
+
rb_define_const(mGosu, "GP_2_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT)));
|
12918
|
+
rb_define_const(mGosu, "GP_2_UP", SWIG_From_int(static_cast< int >(Gosu::GP_2_UP)));
|
12919
|
+
rb_define_const(mGosu, "GP_2_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_2_DOWN)));
|
12920
|
+
rb_define_const(mGosu, "GP_3_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT)));
|
12921
|
+
rb_define_const(mGosu, "GP_3_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT)));
|
12922
|
+
rb_define_const(mGosu, "GP_3_UP", SWIG_From_int(static_cast< int >(Gosu::GP_3_UP)));
|
12923
|
+
rb_define_const(mGosu, "GP_3_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_3_DOWN)));
|
12924
|
+
rb_define_const(mGosu, "GP_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT_STICK_X_AXIS)));
|
12925
|
+
rb_define_const(mGosu, "GP_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT_STICK_Y_AXIS)));
|
12926
|
+
rb_define_const(mGosu, "GP_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT_STICK_X_AXIS)));
|
12927
|
+
rb_define_const(mGosu, "GP_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT_STICK_Y_AXIS)));
|
12928
|
+
rb_define_const(mGosu, "GP_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT_TRIGGER_AXIS)));
|
12929
|
+
rb_define_const(mGosu, "GP_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT_TRIGGER_AXIS)));
|
12930
|
+
rb_define_const(mGosu, "GP_0_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT_STICK_X_AXIS)));
|
12931
|
+
rb_define_const(mGosu, "GP_0_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT_STICK_Y_AXIS)));
|
12932
|
+
rb_define_const(mGosu, "GP_0_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT_STICK_X_AXIS)));
|
12933
|
+
rb_define_const(mGosu, "GP_0_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT_STICK_Y_AXIS)));
|
12934
|
+
rb_define_const(mGosu, "GP_0_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT_TRIGGER_AXIS)));
|
12935
|
+
rb_define_const(mGosu, "GP_0_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT_TRIGGER_AXIS)));
|
12936
|
+
rb_define_const(mGosu, "GP_1_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT_STICK_X_AXIS)));
|
12937
|
+
rb_define_const(mGosu, "GP_1_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT_STICK_Y_AXIS)));
|
12938
|
+
rb_define_const(mGosu, "GP_1_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT_STICK_X_AXIS)));
|
12939
|
+
rb_define_const(mGosu, "GP_1_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT_STICK_Y_AXIS)));
|
12940
|
+
rb_define_const(mGosu, "GP_1_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT_TRIGGER_AXIS)));
|
12941
|
+
rb_define_const(mGosu, "GP_1_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT_TRIGGER_AXIS)));
|
12942
|
+
rb_define_const(mGosu, "GP_2_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT_STICK_X_AXIS)));
|
12943
|
+
rb_define_const(mGosu, "GP_2_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT_STICK_Y_AXIS)));
|
12944
|
+
rb_define_const(mGosu, "GP_2_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT_STICK_X_AXIS)));
|
12945
|
+
rb_define_const(mGosu, "GP_2_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT_STICK_Y_AXIS)));
|
12946
|
+
rb_define_const(mGosu, "GP_2_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT_TRIGGER_AXIS)));
|
12947
|
+
rb_define_const(mGosu, "GP_2_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT_TRIGGER_AXIS)));
|
12948
|
+
rb_define_const(mGosu, "GP_3_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT_STICK_X_AXIS)));
|
12949
|
+
rb_define_const(mGosu, "GP_3_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT_STICK_Y_AXIS)));
|
12950
|
+
rb_define_const(mGosu, "GP_3_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT_STICK_X_AXIS)));
|
12951
|
+
rb_define_const(mGosu, "GP_3_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT_STICK_Y_AXIS)));
|
12952
|
+
rb_define_const(mGosu, "GP_3_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT_TRIGGER_AXIS)));
|
12953
|
+
rb_define_const(mGosu, "GP_3_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT_TRIGGER_AXIS)));
|
12130
12954
|
|
12131
12955
|
// Call srand() so that Gosu::random() is actually random in Ruby scripts
|
12132
12956
|
std::srand(static_cast<unsigned>(std::time(0)));
|
@@ -12161,6 +12985,9 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12161
12985
|
rb_define_method(SwigClassWindow.klass, "height", VALUEFUNC(_wrap_Window_height), -1);
|
12162
12986
|
rb_define_method(SwigClassWindow.klass, "fullscreen?", VALUEFUNC(_wrap_Window_fullscreenq___), -1);
|
12163
12987
|
rb_define_method(SwigClassWindow.klass, "resizable?", VALUEFUNC(_wrap_Window_resizableq___), -1);
|
12988
|
+
rb_define_method(SwigClassWindow.klass, "resizable=", VALUEFUNC(_wrap_Window_resizablee___), -1);
|
12989
|
+
rb_define_method(SwigClassWindow.klass, "borderless?", VALUEFUNC(_wrap_Window_borderlessq___), -1);
|
12990
|
+
rb_define_method(SwigClassWindow.klass, "borderless=", VALUEFUNC(_wrap_Window_borderlesse___), -1);
|
12164
12991
|
rb_define_method(SwigClassWindow.klass, "update_interval", VALUEFUNC(_wrap_Window_update_interval), -1);
|
12165
12992
|
rb_define_method(SwigClassWindow.klass, "update_interval=", VALUEFUNC(_wrap_Window_update_intervale___), -1);
|
12166
12993
|
rb_define_method(SwigClassWindow.klass, "caption", VALUEFUNC(_wrap_Window_caption), -1);
|
@@ -12176,6 +13003,8 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12176
13003
|
rb_define_method(SwigClassWindow.klass, "release_memory", VALUEFUNC(_wrap_Window_release_memory), -1);
|
12177
13004
|
rb_define_method(SwigClassWindow.klass, "button_down", VALUEFUNC(_wrap_Window_button_down), -1);
|
12178
13005
|
rb_define_method(SwigClassWindow.klass, "button_up", VALUEFUNC(_wrap_Window_button_up), -1);
|
13006
|
+
rb_define_method(SwigClassWindow.klass, "gamepad_connected", VALUEFUNC(_wrap_Window_gamepad_connected), -1);
|
13007
|
+
rb_define_method(SwigClassWindow.klass, "gamepad_disconnected", VALUEFUNC(_wrap_Window_gamepad_disconnected), -1);
|
12179
13008
|
rb_define_method(SwigClassWindow.klass, "drop", VALUEFUNC(_wrap_Window_drop), -1);
|
12180
13009
|
rb_define_method(SwigClassWindow.klass, "width=", VALUEFUNC(_wrap_Window_widthe___), -1);
|
12181
13010
|
rb_define_method(SwigClassWindow.klass, "height=", VALUEFUNC(_wrap_Window_heighte___), -1);
|
@@ -12198,6 +13027,9 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12198
13027
|
rb_define_module_function(mGosu, "char_to_button_id", VALUEFUNC(_wrap_char_to_button_id), -1);
|
12199
13028
|
rb_define_module_function(mGosu, "button_id_to_char", VALUEFUNC(_wrap_button_id_to_char), -1);
|
12200
13029
|
rb_define_module_function(mGosu, "button_down?", VALUEFUNC(_wrap_button_downq___), -1);
|
13030
|
+
rb_define_module_function(mGosu, "button_name", VALUEFUNC(_wrap_button_name), -1);
|
13031
|
+
rb_define_module_function(mGosu, "gamepad_name", VALUEFUNC(_wrap_gamepad_name), -1);
|
13032
|
+
rb_define_module_function(mGosu, "axis", VALUEFUNC(_wrap_axis), -1);
|
12201
13033
|
rb_define_module_function(mGosu, "draw_line", VALUEFUNC(_wrap_draw_line), -1);
|
12202
13034
|
rb_define_module_function(mGosu, "draw_triangle", VALUEFUNC(_wrap_draw_triangle), -1);
|
12203
13035
|
rb_define_module_function(mGosu, "draw_quad", VALUEFUNC(_wrap_draw_quad), -1);
|