gosu 0.15.0 → 1.0.0
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} +128 -23
- 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 +476 -176
- data/{src → dependencies/stb}/stb_image_write.h +253 -131
- data/{src → dependencies/stb}/stb_truetype.h +262 -104
- data/{src → dependencies/utf8proc}/utf8proc.c +47 -29
- data/{src → dependencies/utf8proc}/utf8proc.h +46 -24
- data/{src → dependencies/utf8proc}/utf8proc_data.h +10043 -9609
- 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/include/Gosu/Channel.h +25 -0
- data/include/Gosu/Color.h +38 -0
- data/{Gosu → include/Gosu}/Color.hpp +0 -0
- data/{Gosu → include/Gosu}/Directories.hpp +0 -0
- data/include/Gosu/Font.h +36 -0
- data/{Gosu → include/Gosu}/Font.hpp +1 -1
- data/{Gosu → include/Gosu}/Fwd.hpp +0 -5
- data/include/Gosu/Gosu.h +82 -0
- 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/include/Gosu/Image.h +54 -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/include/Gosu/Sample.h +19 -0
- data/include/Gosu/Song.h +24 -0
- data/{Gosu → include/Gosu}/Text.hpp +0 -0
- data/include/Gosu/TextInput.h +30 -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 +2 -2
- data/include/Gosu/Window.h +63 -0
- data/{Gosu → include/Gosu}/Window.hpp +23 -25
- 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 +3 -2
- data/lib64/OpenAL32.dll +0 -0
- data/lib64/SDL2.dll +0 -0
- data/rdoc/gosu.rb +98 -22
- 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/ChannelWrapper.cpp +50 -0
- data/src/ColorWrapper.cpp +126 -0
- data/src/Constants.cpp +338 -0
- data/src/Font.cpp +4 -1
- data/src/FontWrapper.cpp +74 -0
- data/src/GosuWrapper.cpp +251 -0
- data/src/Graphics.cpp +7 -4
- data/src/Image.cpp +13 -16
- data/src/ImageWrapper.cpp +168 -0
- data/src/Input.cpp +412 -164
- data/src/LargeImageData.cpp +2 -1
- data/src/MarkupParser.cpp +2 -1
- data/src/RubyGosu.cxx +912 -172
- data/src/RubyGosu.h +4 -2
- data/src/SampleWrapper.cpp +30 -0
- data/src/SongWrapper.cpp +52 -0
- data/src/TexChunk.cpp +1 -1
- data/src/Text.cpp +1 -0
- data/src/TextBuilder.cpp +3 -1
- data/src/TextInputWrapper.cpp +101 -0
- data/src/Texture.cpp +1 -1
- data/src/TrueTypeFont.cpp +2 -1
- data/src/Utility.cpp +11 -7
- data/src/Window.cpp +30 -39
- data/src/WindowWrapper.cpp +317 -0
- metadata +212 -43
- 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/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/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
|
@@ -978,38 +978,46 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
978
978
|
|
979
979
|
|
980
980
|
/*
|
981
|
-
*
|
982
|
-
*
|
981
|
+
* The following macros are used for providing the correct type of a
|
982
|
+
* function pointer to the Ruby C API.
|
983
|
+
* Starting with Ruby 2.7 (corresponding to RB_METHOD_DEFINITION_DECL being
|
984
|
+
* defined) these macros act transparently due to Ruby's moving away from
|
985
|
+
* ANYARGS and instead employing strict function signatures.
|
983
986
|
*
|
984
|
-
*
|
985
|
-
*
|
986
|
-
*
|
987
|
+
* Note: In case of C (not C++) the macros are transparent even before
|
988
|
+
* Ruby 2.7 due to the fact that the Ruby C API used function declarators
|
989
|
+
* with empty parentheses, which allows for an unspecified number of
|
990
|
+
* arguments.
|
987
991
|
*
|
988
|
-
*
|
989
|
-
*
|
990
|
-
*
|
992
|
+
* PROTECTFUNC(f) is used for the function pointer argument of the Ruby
|
993
|
+
* C API function rb_protect().
|
994
|
+
*
|
995
|
+
* VALUEFUNC(f) is used for the function pointer argument(s) of Ruby C API
|
996
|
+
* functions like rb_define_method() and rb_define_singleton_method().
|
997
|
+
*
|
998
|
+
* VOIDFUNC(f) is used to typecast a C function that implements either
|
999
|
+
* the "mark" or "free" stuff for a Ruby Data object, so that it can be
|
1000
|
+
* passed as an argument to Ruby C API functions like Data_Wrap_Struct()
|
991
1001
|
* and Data_Make_Struct().
|
1002
|
+
*
|
1003
|
+
* SWIG_RUBY_VOID_ANYARGS_FUNC(f) is used for the function pointer
|
1004
|
+
* argument(s) of Ruby C API functions like rb_define_virtual_variable().
|
1005
|
+
*
|
1006
|
+
* SWIG_RUBY_INT_ANYARGS_FUNC(f) is used for the function pointer
|
1007
|
+
* argument(s) of Ruby C API functions like st_foreach().
|
992
1008
|
*/
|
993
|
-
|
994
|
-
#
|
995
|
-
#
|
996
|
-
#
|
997
|
-
#
|
998
|
-
#
|
999
|
-
# else
|
1000
|
-
# ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
|
1001
|
-
# define PROTECTFUNC(f) ((VALUE (*)()) f)
|
1002
|
-
# define VALUEFUNC(f) ((VALUE (*)()) f)
|
1003
|
-
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
|
1004
|
-
# else /* These definitions should work for Ruby 1.7+ */
|
1005
|
-
# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
|
1006
|
-
# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
|
1007
|
-
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
|
1008
|
-
# endif
|
1009
|
-
# endif
|
1009
|
+
#if defined(__cplusplus) && !defined(RB_METHOD_DEFINITION_DECL)
|
1010
|
+
# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
|
1011
|
+
# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
|
1012
|
+
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
|
1013
|
+
# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) ((void (*)(ANYARGS))(f))
|
1014
|
+
# define SWIG_RUBY_INT_ANYARGS_FUNC(f) ((int (*)(ANYARGS))(f))
|
1010
1015
|
#else
|
1016
|
+
# define PROTECTFUNC(f) (f)
|
1011
1017
|
# define VALUEFUNC(f) (f)
|
1012
1018
|
# define VOIDFUNC(f) (f)
|
1019
|
+
# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) (f)
|
1020
|
+
# define SWIG_RUBY_INT_ANYARGS_FUNC(f) (f)
|
1013
1021
|
#endif
|
1014
1022
|
|
1015
1023
|
/* Don't use for expressions have side effect */
|
@@ -1228,7 +1236,7 @@ extern "C" {
|
|
1228
1236
|
*/
|
1229
1237
|
static st_table* swig_ruby_trackings = NULL;
|
1230
1238
|
|
1231
|
-
static VALUE swig_ruby_trackings_count(
|
1239
|
+
static VALUE swig_ruby_trackings_count(ID id, VALUE *var) {
|
1232
1240
|
return SWIG2NUM(swig_ruby_trackings->num_entries);
|
1233
1241
|
}
|
1234
1242
|
|
@@ -1265,7 +1273,9 @@ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
|
1265
1273
|
swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
|
1266
1274
|
}
|
1267
1275
|
|
1268
|
-
rb_define_virtual_variable("SWIG_TRACKINGS_COUNT",
|
1276
|
+
rb_define_virtual_variable("SWIG_TRACKINGS_COUNT",
|
1277
|
+
VALUEFUNC(swig_ruby_trackings_count),
|
1278
|
+
SWIG_RUBY_VOID_ANYARGS_FUNC((rb_gvar_setter_t*)NULL));
|
1269
1279
|
}
|
1270
1280
|
|
1271
1281
|
/* Add a Tracking from a C/C++ struct to a Ruby object */
|
@@ -1314,13 +1324,15 @@ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
|
|
1314
1324
|
to the passed callback function. */
|
1315
1325
|
|
1316
1326
|
/* Proxy method to abstract the internal trackings datatype */
|
1317
|
-
static int swig_ruby_internal_iterate_callback(
|
1318
|
-
(*meth)(ptr, obj);
|
1327
|
+
static int swig_ruby_internal_iterate_callback(st_data_t ptr, st_data_t obj, st_data_t meth) {
|
1328
|
+
((void (*) (void *, VALUE))meth)((void *)ptr, (VALUE)obj);
|
1319
1329
|
return ST_CONTINUE;
|
1320
1330
|
}
|
1321
1331
|
|
1322
1332
|
SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
|
1323
|
-
st_foreach(swig_ruby_trackings,
|
1333
|
+
st_foreach(swig_ruby_trackings,
|
1334
|
+
SWIG_RUBY_INT_ANYARGS_FUNC(swig_ruby_internal_iterate_callback),
|
1335
|
+
(st_data_t)meth);
|
1324
1336
|
}
|
1325
1337
|
|
1326
1338
|
#ifdef __cplusplus
|
@@ -1601,6 +1613,8 @@ SWIGRUNTIMEINLINE char *
|
|
1601
1613
|
SWIG_Ruby_MangleStr(VALUE obj)
|
1602
1614
|
{
|
1603
1615
|
VALUE stype = rb_iv_get(obj, "@__swigtype__");
|
1616
|
+
if (NIL_P(stype))
|
1617
|
+
return NULL;
|
1604
1618
|
return StringValuePtr(stype);
|
1605
1619
|
}
|
1606
1620
|
|
@@ -2160,22 +2174,21 @@ namespace Swig {
|
|
2160
2174
|
|
2161
2175
|
/* -------- TYPES TABLE (BEGIN) -------- */
|
2162
2176
|
|
2163
|
-
#define
|
2164
|
-
#define
|
2165
|
-
#define
|
2166
|
-
#define
|
2167
|
-
#define
|
2168
|
-
#define
|
2169
|
-
#define
|
2170
|
-
#define
|
2171
|
-
#define
|
2172
|
-
#define
|
2173
|
-
#define
|
2174
|
-
#define
|
2175
|
-
#define
|
2176
|
-
|
2177
|
-
static
|
2178
|
-
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};
|
2179
2192
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
2180
2193
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
2181
2194
|
|
@@ -2190,7 +2203,7 @@ static VALUE mGosu;
|
|
2190
2203
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
2191
2204
|
|
2192
2205
|
|
2193
|
-
#define SWIGVERSION
|
2206
|
+
#define SWIGVERSION 0x040100
|
2194
2207
|
#define SWIG_VERSION SWIGVERSION
|
2195
2208
|
|
2196
2209
|
|
@@ -2253,20 +2266,21 @@ namespace Gosu
|
|
2253
2266
|
rb_funcall(block, rb_intern("call"), 0);
|
2254
2267
|
}
|
2255
2268
|
|
2256
|
-
void load_bitmap(Bitmap& bitmap, VALUE val)
|
2269
|
+
void load_bitmap(Gosu::Bitmap& bitmap, VALUE val)
|
2257
2270
|
{
|
2258
2271
|
// Try to treat as filename first.
|
2259
2272
|
if (rb_respond_to(val, rb_intern("to_str"))) {
|
2260
2273
|
VALUE to_str = rb_funcall(val, rb_intern("to_str"), 0);
|
2261
2274
|
const char* filename = StringValuePtr(to_str);
|
2262
|
-
load_image_file(
|
2275
|
+
bitmap = Gosu::load_image_file(filename);
|
2263
2276
|
return;
|
2264
2277
|
}
|
2265
2278
|
|
2266
2279
|
// Otherwise, try to call .to_blob on it (works with RMagick, TexPlay etc).
|
2267
2280
|
VALUE conversion = rb_str_new2("to_blob { self.format = 'RGBA'; self.depth = 8 }");
|
2268
2281
|
VALUE blob = rb_obj_instance_eval(1, &conversion, val);
|
2269
|
-
|
2282
|
+
Check_Type(blob, T_STRING);
|
2283
|
+
|
2270
2284
|
int width = NUM2ULONG(rb_funcall(val, rb_intern("columns"), 0));
|
2271
2285
|
int height = NUM2ULONG(rb_funcall(val, rb_intern("rows"), 0));
|
2272
2286
|
|
@@ -2314,6 +2328,23 @@ namespace Gosu
|
|
2314
2328
|
{
|
2315
2329
|
return Gosu::Input::down(btn);
|
2316
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
|
+
}
|
2317
2348
|
}
|
2318
2349
|
|
2319
2350
|
// Global graphics functions
|
@@ -2482,15 +2513,16 @@ SWIG_From_unsigned_SS_long (unsigned long value)
|
|
2482
2513
|
|
2483
2514
|
|
2484
2515
|
SWIGINTERN VALUE
|
2485
|
-
SWIG_ruby_failed(
|
2516
|
+
SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
|
2486
2517
|
{
|
2487
2518
|
return Qnil;
|
2488
2519
|
}
|
2489
2520
|
|
2490
2521
|
|
2491
|
-
/*@SWIG:/usr/local/Cellar/swig/
|
2492
|
-
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE
|
2522
|
+
/*@SWIG:/usr/local/Cellar/swig/HEAD-975f8fc/share/swig/4.1.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2523
|
+
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE arg)
|
2493
2524
|
{
|
2525
|
+
VALUE *args = (VALUE *)arg;
|
2494
2526
|
VALUE obj = args[0];
|
2495
2527
|
VALUE type = TYPE(obj);
|
2496
2528
|
double *res = (double *)(args[1]);
|
@@ -2508,7 +2540,7 @@ SWIG_AsVal_double (VALUE obj, double *val)
|
|
2508
2540
|
VALUE a[2];
|
2509
2541
|
a[0] = obj;
|
2510
2542
|
a[1] = (VALUE)(&v);
|
2511
|
-
if (rb_rescue(
|
2543
|
+
if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2DBL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
|
2512
2544
|
if (val) *val = v;
|
2513
2545
|
return SWIG_OK;
|
2514
2546
|
}
|
@@ -2530,9 +2562,10 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2530
2562
|
#include <string>
|
2531
2563
|
|
2532
2564
|
|
2533
|
-
/*@SWIG:/usr/local/Cellar/swig/
|
2534
|
-
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE
|
2565
|
+
/*@SWIG:/usr/local/Cellar/swig/HEAD-975f8fc/share/swig/4.1.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2566
|
+
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
|
2535
2567
|
{
|
2568
|
+
VALUE *args = (VALUE *)arg;
|
2536
2569
|
VALUE obj = args[0];
|
2537
2570
|
VALUE type = TYPE(obj);
|
2538
2571
|
unsigned long *res = (unsigned long *)(args[1]);
|
@@ -2550,7 +2583,7 @@ SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
|
|
2550
2583
|
VALUE a[2];
|
2551
2584
|
a[0] = obj;
|
2552
2585
|
a[1] = (VALUE)(&v);
|
2553
|
-
if (rb_rescue(
|
2586
|
+
if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
|
2554
2587
|
if (val) *val = v;
|
2555
2588
|
return SWIG_OK;
|
2556
2589
|
}
|
@@ -2735,9 +2768,10 @@ SWIG_AsPtr_std_string (VALUE obj, std::string **val)
|
|
2735
2768
|
}
|
2736
2769
|
|
2737
2770
|
|
2738
|
-
/*@SWIG:/usr/local/Cellar/swig/
|
2739
|
-
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE
|
2771
|
+
/*@SWIG:/usr/local/Cellar/swig/HEAD-975f8fc/share/swig/4.1.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2772
|
+
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
|
2740
2773
|
{
|
2774
|
+
VALUE *args = (VALUE *)arg;
|
2741
2775
|
VALUE obj = args[0];
|
2742
2776
|
VALUE type = TYPE(obj);
|
2743
2777
|
long *res = (long *)(args[1]);
|
@@ -2755,7 +2789,7 @@ SWIG_AsVal_long (VALUE obj, long* val)
|
|
2755
2789
|
VALUE a[2];
|
2756
2790
|
a[0] = obj;
|
2757
2791
|
a[1] = (VALUE)(&v);
|
2758
|
-
if (rb_rescue(
|
2792
|
+
if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
|
2759
2793
|
if (val) *val = v;
|
2760
2794
|
return SWIG_OK;
|
2761
2795
|
}
|
@@ -2822,11 +2856,19 @@ SWIGINTERN Gosu::Font *new_Gosu_Font__SWIG_1(int height,VALUE options=0){
|
|
2822
2856
|
|
2823
2857
|
return new Gosu::Font(height, font_name, font_flags);
|
2824
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
|
+
}
|
2825
2867
|
SWIGINTERN double Gosu_Font_markup_width(Gosu::Font *self,std::string const &markup,double scale_x=1.0){
|
2826
2868
|
static bool issued_warning = false;
|
2827
2869
|
if (scale_x != 1.0 && !issued_warning) {
|
2828
2870
|
issued_warning = true;
|
2829
|
-
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");
|
2830
2872
|
}
|
2831
2873
|
return self->markup_width(markup) * scale_x;
|
2832
2874
|
}
|
@@ -2834,8 +2876,8 @@ SWIGINTERN Gosu::Image *new_Gosu_Image(VALUE source,VALUE options=0){
|
|
2834
2876
|
Gosu::Bitmap bmp;
|
2835
2877
|
Gosu::load_bitmap(bmp, source);
|
2836
2878
|
|
2837
|
-
|
2838
|
-
|
2879
|
+
int src_x = 0, src_y = 0;
|
2880
|
+
int src_width = bmp.width(), src_height = bmp.height();
|
2839
2881
|
unsigned flags = 0;
|
2840
2882
|
|
2841
2883
|
if (options) {
|
@@ -2892,7 +2934,81 @@ SWIGINTERN Gosu::Image *Gosu_Image_subimage(Gosu::Image *self,int x,int y,int w,
|
|
2892
2934
|
std::unique_ptr<Gosu::ImageData> image_data = self->data().subimage(x, y, w, h);
|
2893
2935
|
return image_data.get() ? new Gosu::Image(std::move(image_data)) : nullptr;
|
2894
2936
|
}
|
2895
|
-
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){
|
2896
3012
|
std::string font = Gosu::default_font_name();
|
2897
3013
|
int width = -1;
|
2898
3014
|
double spacing = 0;
|
@@ -3032,10 +3148,10 @@ SWIGINTERN VALUE Gosu_Image_to_blob(Gosu::Image const *self){
|
|
3032
3148
|
auto size = bmp.width() * bmp.height() * sizeof(Gosu::Color);
|
3033
3149
|
return rb_str_new(reinterpret_cast<const char*>(bmp.data()), size);
|
3034
3150
|
}
|
3035
|
-
SWIGINTERN
|
3151
|
+
SWIGINTERN int Gosu_Image_columns(Gosu::Image const *self){
|
3036
3152
|
return self->width();
|
3037
3153
|
}
|
3038
|
-
SWIGINTERN
|
3154
|
+
SWIGINTERN int Gosu_Image_rows(Gosu::Image const *self){
|
3039
3155
|
return self->height();
|
3040
3156
|
}
|
3041
3157
|
SWIGINTERN void Gosu_Image_save(Gosu::Image const *self,std::string const &filename){
|
@@ -3184,7 +3300,7 @@ std::string SwigDirector_TextInput::filter(std::string text) const {
|
|
3184
3300
|
}
|
3185
3301
|
|
3186
3302
|
|
3187
|
-
SwigDirector_Window::SwigDirector_Window(VALUE self,
|
3303
|
+
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) {
|
3188
3304
|
|
3189
3305
|
}
|
3190
3306
|
|
@@ -3285,7 +3401,7 @@ void SwigDirector_Window::button_down(Gosu::Button arg0) {
|
|
3285
3401
|
VALUE SWIGUNUSED result;
|
3286
3402
|
|
3287
3403
|
{
|
3288
|
-
obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(
|
3404
|
+
obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(arg0);
|
3289
3405
|
}
|
3290
3406
|
result = rb_funcall(swig_get_self(), rb_intern("protected_button_down"), 1,obj0);
|
3291
3407
|
}
|
@@ -3296,18 +3412,36 @@ void SwigDirector_Window::button_up(Gosu::Button arg0) {
|
|
3296
3412
|
VALUE SWIGUNUSED result;
|
3297
3413
|
|
3298
3414
|
{
|
3299
|
-
obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(
|
3415
|
+
obj0 = arg0 == Gosu::NO_BUTTON ? Qnil : LONG2NUM(arg0);
|
3300
3416
|
}
|
3301
3417
|
result = rb_funcall(swig_get_self(), rb_intern("protected_button_up"), 1,obj0);
|
3302
3418
|
}
|
3303
3419
|
|
3304
3420
|
|
3421
|
+
void SwigDirector_Window::gamepad_connected(int index) {
|
3422
|
+
VALUE obj0 = Qnil ;
|
3423
|
+
VALUE SWIGUNUSED result;
|
3424
|
+
|
3425
|
+
obj0 = SWIG_From_int(static_cast< int >(index));
|
3426
|
+
result = rb_funcall(swig_get_self(), rb_intern("protected_gamepad_connected"), 1,obj0);
|
3427
|
+
}
|
3428
|
+
|
3429
|
+
|
3430
|
+
void SwigDirector_Window::gamepad_disconnected(int index) {
|
3431
|
+
VALUE obj0 = Qnil ;
|
3432
|
+
VALUE SWIGUNUSED result;
|
3433
|
+
|
3434
|
+
obj0 = SWIG_From_int(static_cast< int >(index));
|
3435
|
+
result = rb_funcall(swig_get_self(), rb_intern("protected_gamepad_disconnected"), 1,obj0);
|
3436
|
+
}
|
3437
|
+
|
3438
|
+
|
3305
3439
|
void SwigDirector_Window::drop(std::string const &filename) {
|
3306
3440
|
VALUE obj0 = Qnil ;
|
3307
3441
|
VALUE SWIGUNUSED result;
|
3308
3442
|
|
3309
3443
|
obj0 = SWIG_From_std_string(static_cast< std::string >(filename));
|
3310
|
-
result = rb_funcall(swig_get_self(), rb_intern("
|
3444
|
+
result = rb_funcall(swig_get_self(), rb_intern("protected_drop"), 1,obj0);
|
3311
3445
|
}
|
3312
3446
|
|
3313
3447
|
|
@@ -3774,25 +3908,6 @@ fail:
|
|
3774
3908
|
}
|
3775
3909
|
|
3776
3910
|
|
3777
|
-
SWIGINTERN VALUE
|
3778
|
-
_wrap__release_all_openal_resources(int argc, VALUE *argv, VALUE self) {
|
3779
|
-
if ((argc < 0) || (argc > 0)) {
|
3780
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3781
|
-
}
|
3782
|
-
{
|
3783
|
-
try {
|
3784
|
-
Gosu::al_shutdown();
|
3785
|
-
}
|
3786
|
-
catch (const std::exception& e) {
|
3787
|
-
SWIG_exception(SWIG_RuntimeError, e.what());
|
3788
|
-
}
|
3789
|
-
}
|
3790
|
-
return Qnil;
|
3791
|
-
fail:
|
3792
|
-
return Qnil;
|
3793
|
-
}
|
3794
|
-
|
3795
|
-
|
3796
3911
|
static swig_class SwigClassColor;
|
3797
3912
|
|
3798
3913
|
SWIGINTERN VALUE
|
@@ -5248,6 +5363,134 @@ fail:
|
|
5248
5363
|
}
|
5249
5364
|
|
5250
5365
|
|
5366
|
+
SWIGINTERN VALUE
|
5367
|
+
_wrap_Font_draw_text(int argc, VALUE *argv, VALUE self) {
|
5368
|
+
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
5369
|
+
std::string *arg2 = 0 ;
|
5370
|
+
double arg3 ;
|
5371
|
+
double arg4 ;
|
5372
|
+
Gosu::ZPos arg5 ;
|
5373
|
+
double arg6 = (double) 1 ;
|
5374
|
+
double arg7 = (double) 1 ;
|
5375
|
+
Gosu::Color arg8 = (Gosu::Color) Gosu::Color::WHITE ;
|
5376
|
+
Gosu::AlphaMode arg9 = (Gosu::AlphaMode) Gosu::AM_DEFAULT ;
|
5377
|
+
void *argp1 = 0 ;
|
5378
|
+
int res1 = 0 ;
|
5379
|
+
int res2 = SWIG_OLDOBJ ;
|
5380
|
+
double val3 ;
|
5381
|
+
int ecode3 = 0 ;
|
5382
|
+
double val4 ;
|
5383
|
+
int ecode4 = 0 ;
|
5384
|
+
double val5 ;
|
5385
|
+
int ecode5 = 0 ;
|
5386
|
+
double val6 ;
|
5387
|
+
int ecode6 = 0 ;
|
5388
|
+
double val7 ;
|
5389
|
+
int ecode7 = 0 ;
|
5390
|
+
|
5391
|
+
if ((argc < 4) || (argc > 8)) {
|
5392
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
5393
|
+
}
|
5394
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
|
5395
|
+
if (!SWIG_IsOK(res1)) {
|
5396
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_text", 1, self ));
|
5397
|
+
}
|
5398
|
+
arg1 = reinterpret_cast< Gosu::Font * >(argp1);
|
5399
|
+
{
|
5400
|
+
std::string *ptr = (std::string *)0;
|
5401
|
+
res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
5402
|
+
if (!SWIG_IsOK(res2)) {
|
5403
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_text", 2, argv[0] ));
|
5404
|
+
}
|
5405
|
+
if (!ptr) {
|
5406
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_text", 2, argv[0]));
|
5407
|
+
}
|
5408
|
+
arg2 = ptr;
|
5409
|
+
}
|
5410
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
5411
|
+
if (!SWIG_IsOK(ecode3)) {
|
5412
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_text", 3, argv[1] ));
|
5413
|
+
}
|
5414
|
+
arg3 = static_cast< double >(val3);
|
5415
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
5416
|
+
if (!SWIG_IsOK(ecode4)) {
|
5417
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_text", 4, argv[2] ));
|
5418
|
+
}
|
5419
|
+
arg4 = static_cast< double >(val4);
|
5420
|
+
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
5421
|
+
if (!SWIG_IsOK(ecode5)) {
|
5422
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_text", 5, argv[3] ));
|
5423
|
+
}
|
5424
|
+
arg5 = static_cast< Gosu::ZPos >(val5);
|
5425
|
+
if (argc > 4) {
|
5426
|
+
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
5427
|
+
if (!SWIG_IsOK(ecode6)) {
|
5428
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_text", 6, argv[4] ));
|
5429
|
+
}
|
5430
|
+
arg6 = static_cast< double >(val6);
|
5431
|
+
}
|
5432
|
+
if (argc > 5) {
|
5433
|
+
ecode7 = SWIG_AsVal_double(argv[5], &val7);
|
5434
|
+
if (!SWIG_IsOK(ecode7)) {
|
5435
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_text", 7, argv[5] ));
|
5436
|
+
}
|
5437
|
+
arg7 = static_cast< double >(val7);
|
5438
|
+
}
|
5439
|
+
if (argc > 6) {
|
5440
|
+
{
|
5441
|
+
if (TYPE(argv[6]) == T_FIXNUM || TYPE(argv[6]) == T_BIGNUM) {
|
5442
|
+
arg8 = Gosu::Color(NUM2ULONG(argv[6]));
|
5443
|
+
}
|
5444
|
+
else {
|
5445
|
+
void* ptr;
|
5446
|
+
int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
5447
|
+
if (!SWIG_IsOK(res)) {
|
5448
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
5449
|
+
}
|
5450
|
+
else if (ptr == nullptr) {
|
5451
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
5452
|
+
}
|
5453
|
+
else {
|
5454
|
+
arg8 = *reinterpret_cast<Gosu::Color*>(ptr);
|
5455
|
+
}
|
5456
|
+
}
|
5457
|
+
}
|
5458
|
+
}
|
5459
|
+
if (argc > 7) {
|
5460
|
+
{
|
5461
|
+
const char* cstr = Gosu::cstr_from_symbol(argv[7]);
|
5462
|
+
|
5463
|
+
if (!strcmp(cstr, "default")) {
|
5464
|
+
arg9 = Gosu::AM_DEFAULT;
|
5465
|
+
}
|
5466
|
+
else if (!strcmp(cstr, "add") || !strcmp(cstr, "additive")) {
|
5467
|
+
arg9 = Gosu::AM_ADD;
|
5468
|
+
}
|
5469
|
+
else if (!strcmp(cstr, "multiply")) {
|
5470
|
+
arg9 = Gosu::AM_MULTIPLY;
|
5471
|
+
}
|
5472
|
+
else {
|
5473
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode (expected one of :default, :add, "
|
5474
|
+
":multiply)");
|
5475
|
+
}
|
5476
|
+
}
|
5477
|
+
}
|
5478
|
+
{
|
5479
|
+
try {
|
5480
|
+
((Gosu::Font const *)arg1)->draw_text((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
|
5481
|
+
}
|
5482
|
+
catch (const std::exception& e) {
|
5483
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
5484
|
+
}
|
5485
|
+
}
|
5486
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
5487
|
+
return Qnil;
|
5488
|
+
fail:
|
5489
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
5490
|
+
return Qnil;
|
5491
|
+
}
|
5492
|
+
|
5493
|
+
|
5251
5494
|
SWIGINTERN VALUE
|
5252
5495
|
_wrap_Font_draw_markup(int argc, VALUE *argv, VALUE self) {
|
5253
5496
|
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
@@ -5376,6 +5619,150 @@ fail:
|
|
5376
5619
|
}
|
5377
5620
|
|
5378
5621
|
|
5622
|
+
SWIGINTERN VALUE
|
5623
|
+
_wrap_Font_draw_text_rel(int argc, VALUE *argv, VALUE self) {
|
5624
|
+
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
5625
|
+
std::string *arg2 = 0 ;
|
5626
|
+
double arg3 ;
|
5627
|
+
double arg4 ;
|
5628
|
+
Gosu::ZPos arg5 ;
|
5629
|
+
double arg6 ;
|
5630
|
+
double arg7 ;
|
5631
|
+
double arg8 = (double) 1 ;
|
5632
|
+
double arg9 = (double) 1 ;
|
5633
|
+
Gosu::Color arg10 = (Gosu::Color) Gosu::Color::WHITE ;
|
5634
|
+
Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::AM_DEFAULT ;
|
5635
|
+
void *argp1 = 0 ;
|
5636
|
+
int res1 = 0 ;
|
5637
|
+
int res2 = SWIG_OLDOBJ ;
|
5638
|
+
double val3 ;
|
5639
|
+
int ecode3 = 0 ;
|
5640
|
+
double val4 ;
|
5641
|
+
int ecode4 = 0 ;
|
5642
|
+
double val5 ;
|
5643
|
+
int ecode5 = 0 ;
|
5644
|
+
double val6 ;
|
5645
|
+
int ecode6 = 0 ;
|
5646
|
+
double val7 ;
|
5647
|
+
int ecode7 = 0 ;
|
5648
|
+
double val8 ;
|
5649
|
+
int ecode8 = 0 ;
|
5650
|
+
double val9 ;
|
5651
|
+
int ecode9 = 0 ;
|
5652
|
+
|
5653
|
+
if ((argc < 6) || (argc > 10)) {
|
5654
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
|
5655
|
+
}
|
5656
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
|
5657
|
+
if (!SWIG_IsOK(res1)) {
|
5658
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw_text_rel", 1, self ));
|
5659
|
+
}
|
5660
|
+
arg1 = reinterpret_cast< Gosu::Font * >(argp1);
|
5661
|
+
{
|
5662
|
+
std::string *ptr = (std::string *)0;
|
5663
|
+
res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
5664
|
+
if (!SWIG_IsOK(res2)) {
|
5665
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","draw_text_rel", 2, argv[0] ));
|
5666
|
+
}
|
5667
|
+
if (!ptr) {
|
5668
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","draw_text_rel", 2, argv[0]));
|
5669
|
+
}
|
5670
|
+
arg2 = ptr;
|
5671
|
+
}
|
5672
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
5673
|
+
if (!SWIG_IsOK(ecode3)) {
|
5674
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_text_rel", 3, argv[1] ));
|
5675
|
+
}
|
5676
|
+
arg3 = static_cast< double >(val3);
|
5677
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
5678
|
+
if (!SWIG_IsOK(ecode4)) {
|
5679
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw_text_rel", 4, argv[2] ));
|
5680
|
+
}
|
5681
|
+
arg4 = static_cast< double >(val4);
|
5682
|
+
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
5683
|
+
if (!SWIG_IsOK(ecode5)) {
|
5684
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_text_rel", 5, argv[3] ));
|
5685
|
+
}
|
5686
|
+
arg5 = static_cast< Gosu::ZPos >(val5);
|
5687
|
+
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
5688
|
+
if (!SWIG_IsOK(ecode6)) {
|
5689
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw_text_rel", 6, argv[4] ));
|
5690
|
+
}
|
5691
|
+
arg6 = static_cast< double >(val6);
|
5692
|
+
ecode7 = SWIG_AsVal_double(argv[5], &val7);
|
5693
|
+
if (!SWIG_IsOK(ecode7)) {
|
5694
|
+
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw_text_rel", 7, argv[5] ));
|
5695
|
+
}
|
5696
|
+
arg7 = static_cast< double >(val7);
|
5697
|
+
if (argc > 6) {
|
5698
|
+
ecode8 = SWIG_AsVal_double(argv[6], &val8);
|
5699
|
+
if (!SWIG_IsOK(ecode8)) {
|
5700
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","draw_text_rel", 8, argv[6] ));
|
5701
|
+
}
|
5702
|
+
arg8 = static_cast< double >(val8);
|
5703
|
+
}
|
5704
|
+
if (argc > 7) {
|
5705
|
+
ecode9 = SWIG_AsVal_double(argv[7], &val9);
|
5706
|
+
if (!SWIG_IsOK(ecode9)) {
|
5707
|
+
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","draw_text_rel", 9, argv[7] ));
|
5708
|
+
}
|
5709
|
+
arg9 = static_cast< double >(val9);
|
5710
|
+
}
|
5711
|
+
if (argc > 8) {
|
5712
|
+
{
|
5713
|
+
if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) {
|
5714
|
+
arg10 = Gosu::Color(NUM2ULONG(argv[8]));
|
5715
|
+
}
|
5716
|
+
else {
|
5717
|
+
void* ptr;
|
5718
|
+
int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0);
|
5719
|
+
if (!SWIG_IsOK(res)) {
|
5720
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid value");
|
5721
|
+
}
|
5722
|
+
else if (ptr == nullptr) {
|
5723
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color");
|
5724
|
+
}
|
5725
|
+
else {
|
5726
|
+
arg10 = *reinterpret_cast<Gosu::Color*>(ptr);
|
5727
|
+
}
|
5728
|
+
}
|
5729
|
+
}
|
5730
|
+
}
|
5731
|
+
if (argc > 9) {
|
5732
|
+
{
|
5733
|
+
const char* cstr = Gosu::cstr_from_symbol(argv[9]);
|
5734
|
+
|
5735
|
+
if (!strcmp(cstr, "default")) {
|
5736
|
+
arg11 = Gosu::AM_DEFAULT;
|
5737
|
+
}
|
5738
|
+
else if (!strcmp(cstr, "add") || !strcmp(cstr, "additive")) {
|
5739
|
+
arg11 = Gosu::AM_ADD;
|
5740
|
+
}
|
5741
|
+
else if (!strcmp(cstr, "multiply")) {
|
5742
|
+
arg11 = Gosu::AM_MULTIPLY;
|
5743
|
+
}
|
5744
|
+
else {
|
5745
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode (expected one of :default, :add, "
|
5746
|
+
":multiply)");
|
5747
|
+
}
|
5748
|
+
}
|
5749
|
+
}
|
5750
|
+
{
|
5751
|
+
try {
|
5752
|
+
((Gosu::Font const *)arg1)->draw_text_rel((std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
|
5753
|
+
}
|
5754
|
+
catch (const std::exception& e) {
|
5755
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
5756
|
+
}
|
5757
|
+
}
|
5758
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
5759
|
+
return Qnil;
|
5760
|
+
fail:
|
5761
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
5762
|
+
return Qnil;
|
5763
|
+
}
|
5764
|
+
|
5765
|
+
|
5379
5766
|
SWIGINTERN VALUE
|
5380
5767
|
_wrap_Font_draw_markup_rel(int argc, VALUE *argv, VALUE self) {
|
5381
5768
|
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
@@ -5733,6 +6120,62 @@ fail:
|
|
5733
6120
|
}
|
5734
6121
|
|
5735
6122
|
|
6123
|
+
SWIGINTERN VALUE
|
6124
|
+
_wrap_Font_text_width(int argc, VALUE *argv, VALUE self) {
|
6125
|
+
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
6126
|
+
std::string *arg2 = 0 ;
|
6127
|
+
double arg3 = (double) 1.0 ;
|
6128
|
+
void *argp1 = 0 ;
|
6129
|
+
int res1 = 0 ;
|
6130
|
+
int res2 = SWIG_OLDOBJ ;
|
6131
|
+
double val3 ;
|
6132
|
+
int ecode3 = 0 ;
|
6133
|
+
double result;
|
6134
|
+
VALUE vresult = Qnil;
|
6135
|
+
|
6136
|
+
if ((argc < 1) || (argc > 2)) {
|
6137
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
6138
|
+
}
|
6139
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 );
|
6140
|
+
if (!SWIG_IsOK(res1)) {
|
6141
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font *","text_width", 1, self ));
|
6142
|
+
}
|
6143
|
+
arg1 = reinterpret_cast< Gosu::Font * >(argp1);
|
6144
|
+
{
|
6145
|
+
std::string *ptr = (std::string *)0;
|
6146
|
+
res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
6147
|
+
if (!SWIG_IsOK(res2)) {
|
6148
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","text_width", 2, argv[0] ));
|
6149
|
+
}
|
6150
|
+
if (!ptr) {
|
6151
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","text_width", 2, argv[0]));
|
6152
|
+
}
|
6153
|
+
arg2 = ptr;
|
6154
|
+
}
|
6155
|
+
if (argc > 1) {
|
6156
|
+
ecode3 = SWIG_AsVal_double(argv[1], &val3);
|
6157
|
+
if (!SWIG_IsOK(ecode3)) {
|
6158
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","text_width", 3, argv[1] ));
|
6159
|
+
}
|
6160
|
+
arg3 = static_cast< double >(val3);
|
6161
|
+
}
|
6162
|
+
{
|
6163
|
+
try {
|
6164
|
+
result = (double)Gosu_Font_text_width(arg1,(std::string const &)*arg2,arg3);
|
6165
|
+
}
|
6166
|
+
catch (const std::exception& e) {
|
6167
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
6168
|
+
}
|
6169
|
+
}
|
6170
|
+
vresult = SWIG_From_double(static_cast< double >(result));
|
6171
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
6172
|
+
return vresult;
|
6173
|
+
fail:
|
6174
|
+
if (SWIG_IsNewObj(res2)) delete arg2;
|
6175
|
+
return Qnil;
|
6176
|
+
}
|
6177
|
+
|
6178
|
+
|
5736
6179
|
SWIGINTERN VALUE
|
5737
6180
|
_wrap_Font_markup_width(int argc, VALUE *argv, VALUE self) {
|
5738
6181
|
Gosu::Font *arg1 = (Gosu::Font *) 0 ;
|
@@ -6178,7 +6621,7 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
|
|
6178
6621
|
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
6179
6622
|
double arg2 ;
|
6180
6623
|
double arg3 ;
|
6181
|
-
Gosu::ZPos arg4 ;
|
6624
|
+
Gosu::ZPos arg4 = (Gosu::ZPos) 0 ;
|
6182
6625
|
double arg5 = (double) 1 ;
|
6183
6626
|
double arg6 = (double) 1 ;
|
6184
6627
|
Gosu::Color arg7 = (Gosu::Color) Gosu::Color::WHITE ;
|
@@ -6196,8 +6639,8 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
|
|
6196
6639
|
double val6 ;
|
6197
6640
|
int ecode6 = 0 ;
|
6198
6641
|
|
6199
|
-
if ((argc <
|
6200
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
6642
|
+
if ((argc < 2) || (argc > 7)) {
|
6643
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
6201
6644
|
}
|
6202
6645
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
|
6203
6646
|
if (!SWIG_IsOK(res1)) {
|
@@ -6214,11 +6657,13 @@ _wrap_Image_draw(int argc, VALUE *argv, VALUE self) {
|
|
6214
6657
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw", 3, argv[1] ));
|
6215
6658
|
}
|
6216
6659
|
arg3 = static_cast< double >(val3);
|
6217
|
-
|
6218
|
-
|
6219
|
-
|
6220
|
-
|
6221
|
-
|
6660
|
+
if (argc > 2) {
|
6661
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
6662
|
+
if (!SWIG_IsOK(ecode4)) {
|
6663
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","draw", 4, argv[2] ));
|
6664
|
+
}
|
6665
|
+
arg4 = static_cast< Gosu::ZPos >(val4);
|
6666
|
+
}
|
6222
6667
|
if (argc > 3) {
|
6223
6668
|
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
6224
6669
|
if (!SWIG_IsOK(ecode5)) {
|
@@ -6455,8 +6900,8 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
|
|
6455
6900
|
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
6456
6901
|
double arg2 ;
|
6457
6902
|
double arg3 ;
|
6458
|
-
Gosu::ZPos arg4 ;
|
6459
|
-
double arg5 ;
|
6903
|
+
Gosu::ZPos arg4 = (Gosu::ZPos) 0 ;
|
6904
|
+
double arg5 = (double) 0 ;
|
6460
6905
|
double arg6 = (double) 0.5 ;
|
6461
6906
|
double arg7 = (double) 0.5 ;
|
6462
6907
|
double arg8 = (double) 1 ;
|
@@ -6482,8 +6927,8 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
|
|
6482
6927
|
double val9 ;
|
6483
6928
|
int ecode9 = 0 ;
|
6484
6929
|
|
6485
|
-
if ((argc <
|
6486
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
6930
|
+
if ((argc < 2) || (argc > 10)) {
|
6931
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
6487
6932
|
}
|
6488
6933
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 );
|
6489
6934
|
if (!SWIG_IsOK(res1)) {
|
@@ -6500,16 +6945,20 @@ _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) {
|
|
6500
6945
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw_rot", 3, argv[1] ));
|
6501
6946
|
}
|
6502
6947
|
arg3 = static_cast< double >(val3);
|
6503
|
-
|
6504
|
-
|
6505
|
-
|
6506
|
-
|
6507
|
-
|
6508
|
-
|
6509
|
-
|
6510
|
-
|
6511
|
-
|
6512
|
-
|
6948
|
+
if (argc > 2) {
|
6949
|
+
ecode4 = SWIG_AsVal_double(argv[2], &val4);
|
6950
|
+
if (!SWIG_IsOK(ecode4)) {
|
6951
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","draw_rot", 4, argv[2] ));
|
6952
|
+
}
|
6953
|
+
arg4 = static_cast< Gosu::ZPos >(val4);
|
6954
|
+
}
|
6955
|
+
if (argc > 3) {
|
6956
|
+
ecode5 = SWIG_AsVal_double(argv[3], &val5);
|
6957
|
+
if (!SWIG_IsOK(ecode5)) {
|
6958
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","draw_rot", 5, argv[3] ));
|
6959
|
+
}
|
6960
|
+
arg5 = static_cast< double >(val5);
|
6961
|
+
}
|
6513
6962
|
if (argc > 4) {
|
6514
6963
|
ecode6 = SWIG_AsVal_double(argv[4], &val6);
|
6515
6964
|
if (!SWIG_IsOK(ecode6)) {
|
@@ -6890,44 +7339,94 @@ _wrap_Image_subimage(int argc, VALUE *argv, VALUE self) {
|
|
6890
7339
|
if (!SWIG_IsOK(res1)) {
|
6891
7340
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image *","subimage", 1, self ));
|
6892
7341
|
}
|
6893
|
-
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
6894
|
-
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
7342
|
+
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
7343
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
7344
|
+
if (!SWIG_IsOK(ecode2)) {
|
7345
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","subimage", 2, argv[0] ));
|
7346
|
+
}
|
7347
|
+
arg2 = static_cast< int >(val2);
|
7348
|
+
ecode3 = SWIG_AsVal_int(argv[1], &val3);
|
7349
|
+
if (!SWIG_IsOK(ecode3)) {
|
7350
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","subimage", 3, argv[1] ));
|
7351
|
+
}
|
7352
|
+
arg3 = static_cast< int >(val3);
|
7353
|
+
ecode4 = SWIG_AsVal_int(argv[2], &val4);
|
7354
|
+
if (!SWIG_IsOK(ecode4)) {
|
7355
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","subimage", 4, argv[2] ));
|
7356
|
+
}
|
7357
|
+
arg4 = static_cast< int >(val4);
|
7358
|
+
ecode5 = SWIG_AsVal_int(argv[3], &val5);
|
7359
|
+
if (!SWIG_IsOK(ecode5)) {
|
7360
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","subimage", 5, argv[3] ));
|
7361
|
+
}
|
7362
|
+
arg5 = static_cast< int >(val5);
|
7363
|
+
{
|
7364
|
+
try {
|
7365
|
+
result = (Gosu::Image *)Gosu_Image_subimage(arg1,arg2,arg3,arg4,arg5);
|
7366
|
+
}
|
7367
|
+
catch (const std::exception& e) {
|
7368
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
7369
|
+
}
|
7370
|
+
}
|
7371
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN | 0 );
|
7372
|
+
return vresult;
|
7373
|
+
fail:
|
7374
|
+
return Qnil;
|
7375
|
+
}
|
7376
|
+
|
7377
|
+
|
7378
|
+
SWIGINTERN VALUE
|
7379
|
+
_wrap_Image_from_text(int argc, VALUE *argv, VALUE self) {
|
7380
|
+
std::string *arg1 = 0 ;
|
7381
|
+
double arg2 ;
|
7382
|
+
VALUE arg3 = (VALUE) 0 ;
|
7383
|
+
int res1 = SWIG_OLDOBJ ;
|
7384
|
+
double val2 ;
|
7385
|
+
int ecode2 = 0 ;
|
7386
|
+
Gosu::Image *result = 0 ;
|
7387
|
+
VALUE vresult = Qnil;
|
7388
|
+
|
7389
|
+
if ((argc < 2) || (argc > 3)) {
|
7390
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
7391
|
+
}
|
7392
|
+
{
|
7393
|
+
std::string *ptr = (std::string *)0;
|
7394
|
+
res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
7395
|
+
if (!SWIG_IsOK(res1)) {
|
7396
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Gosu_Image_from_text", 1, argv[0] ));
|
7397
|
+
}
|
7398
|
+
if (!ptr) {
|
7399
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Gosu_Image_from_text", 1, argv[0]));
|
7400
|
+
}
|
7401
|
+
arg1 = ptr;
|
7402
|
+
}
|
7403
|
+
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
6895
7404
|
if (!SWIG_IsOK(ecode2)) {
|
6896
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "
|
6897
|
-
}
|
6898
|
-
arg2 = static_cast< int >(val2);
|
6899
|
-
ecode3 = SWIG_AsVal_int(argv[1], &val3);
|
6900
|
-
if (!SWIG_IsOK(ecode3)) {
|
6901
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","subimage", 3, argv[1] ));
|
6902
|
-
}
|
6903
|
-
arg3 = static_cast< int >(val3);
|
6904
|
-
ecode4 = SWIG_AsVal_int(argv[2], &val4);
|
6905
|
-
if (!SWIG_IsOK(ecode4)) {
|
6906
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","subimage", 4, argv[2] ));
|
6907
|
-
}
|
6908
|
-
arg4 = static_cast< int >(val4);
|
6909
|
-
ecode5 = SWIG_AsVal_int(argv[3], &val5);
|
6910
|
-
if (!SWIG_IsOK(ecode5)) {
|
6911
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","subimage", 5, argv[3] ));
|
7405
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu_Image_from_text", 2, argv[1] ));
|
6912
7406
|
}
|
6913
|
-
|
7407
|
+
arg2 = static_cast< double >(val2);
|
7408
|
+
if (argc > 2) {
|
7409
|
+
arg3 = argv[2];
|
7410
|
+
}
|
6914
7411
|
{
|
6915
7412
|
try {
|
6916
|
-
result = (Gosu::Image *)
|
7413
|
+
result = (Gosu::Image *)Gosu_Image_from_text((std::string const &)*arg1,arg2,arg3);
|
6917
7414
|
}
|
6918
7415
|
catch (const std::exception& e) {
|
6919
7416
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
6920
7417
|
}
|
6921
7418
|
}
|
6922
7419
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN | 0 );
|
7420
|
+
if (SWIG_IsNewObj(res1)) delete arg1;
|
6923
7421
|
return vresult;
|
6924
7422
|
fail:
|
7423
|
+
if (SWIG_IsNewObj(res1)) delete arg1;
|
6925
7424
|
return Qnil;
|
6926
7425
|
}
|
6927
7426
|
|
6928
7427
|
|
6929
7428
|
SWIGINTERN VALUE
|
6930
|
-
|
7429
|
+
_wrap_Image_from_markup(int argc, VALUE *argv, VALUE self) {
|
6931
7430
|
std::string *arg1 = 0 ;
|
6932
7431
|
double arg2 ;
|
6933
7432
|
VALUE arg3 = (VALUE) 0 ;
|
@@ -6944,16 +7443,16 @@ _wrap_Image_from_text(int argc, VALUE *argv, VALUE self) {
|
|
6944
7443
|
std::string *ptr = (std::string *)0;
|
6945
7444
|
res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
|
6946
7445
|
if (!SWIG_IsOK(res1)) {
|
6947
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","
|
7446
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Gosu_Image_from_markup", 1, argv[0] ));
|
6948
7447
|
}
|
6949
7448
|
if (!ptr) {
|
6950
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","
|
7449
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Gosu_Image_from_markup", 1, argv[0]));
|
6951
7450
|
}
|
6952
7451
|
arg1 = ptr;
|
6953
7452
|
}
|
6954
7453
|
ecode2 = SWIG_AsVal_double(argv[1], &val2);
|
6955
7454
|
if (!SWIG_IsOK(ecode2)) {
|
6956
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","
|
7455
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu_Image_from_markup", 2, argv[1] ));
|
6957
7456
|
}
|
6958
7457
|
arg2 = static_cast< double >(val2);
|
6959
7458
|
if (argc > 2) {
|
@@ -6961,7 +7460,7 @@ _wrap_Image_from_text(int argc, VALUE *argv, VALUE self) {
|
|
6961
7460
|
}
|
6962
7461
|
{
|
6963
7462
|
try {
|
6964
|
-
result = (Gosu::Image *)
|
7463
|
+
result = (Gosu::Image *)Gosu_Image_from_markup((std::string const &)*arg1,arg2,arg3);
|
6965
7464
|
}
|
6966
7465
|
catch (const std::exception& e) {
|
6967
7466
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
@@ -7206,7 +7705,7 @@ _wrap_Image_columns(int argc, VALUE *argv, VALUE self) {
|
|
7206
7705
|
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
7207
7706
|
void *argp1 = 0 ;
|
7208
7707
|
int res1 = 0 ;
|
7209
|
-
|
7708
|
+
int result;
|
7210
7709
|
VALUE vresult = Qnil;
|
7211
7710
|
|
7212
7711
|
if ((argc < 0) || (argc > 0)) {
|
@@ -7219,13 +7718,13 @@ _wrap_Image_columns(int argc, VALUE *argv, VALUE self) {
|
|
7219
7718
|
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
7220
7719
|
{
|
7221
7720
|
try {
|
7222
|
-
result = (
|
7721
|
+
result = (int)Gosu_Image_columns((Gosu::Image const *)arg1);
|
7223
7722
|
}
|
7224
7723
|
catch (const std::exception& e) {
|
7225
7724
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
7226
7725
|
}
|
7227
7726
|
}
|
7228
|
-
vresult =
|
7727
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
7229
7728
|
return vresult;
|
7230
7729
|
fail:
|
7231
7730
|
return Qnil;
|
@@ -7237,7 +7736,7 @@ _wrap_Image_rows(int argc, VALUE *argv, VALUE self) {
|
|
7237
7736
|
Gosu::Image *arg1 = (Gosu::Image *) 0 ;
|
7238
7737
|
void *argp1 = 0 ;
|
7239
7738
|
int res1 = 0 ;
|
7240
|
-
|
7739
|
+
int result;
|
7241
7740
|
VALUE vresult = Qnil;
|
7242
7741
|
|
7243
7742
|
if ((argc < 0) || (argc > 0)) {
|
@@ -7250,13 +7749,13 @@ _wrap_Image_rows(int argc, VALUE *argv, VALUE self) {
|
|
7250
7749
|
arg1 = reinterpret_cast< Gosu::Image * >(argp1);
|
7251
7750
|
{
|
7252
7751
|
try {
|
7253
|
-
result = (
|
7752
|
+
result = (int)Gosu_Image_rows((Gosu::Image const *)arg1);
|
7254
7753
|
}
|
7255
7754
|
catch (const std::exception& e) {
|
7256
7755
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
7257
7756
|
}
|
7258
7757
|
}
|
7259
|
-
vresult =
|
7758
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
7260
7759
|
return vresult;
|
7261
7760
|
fail:
|
7262
7761
|
return Qnil;
|
@@ -9514,6 +10013,104 @@ fail:
|
|
9514
10013
|
}
|
9515
10014
|
|
9516
10015
|
|
10016
|
+
SWIGINTERN VALUE
|
10017
|
+
_wrap_Window_gamepad_connected(int argc, VALUE *argv, VALUE self) {
|
10018
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
10019
|
+
int arg2 ;
|
10020
|
+
void *argp1 = 0 ;
|
10021
|
+
int res1 = 0 ;
|
10022
|
+
int val2 ;
|
10023
|
+
int ecode2 = 0 ;
|
10024
|
+
Swig::Director *director = 0;
|
10025
|
+
bool upcall = false;
|
10026
|
+
|
10027
|
+
if ((argc < 1) || (argc > 1)) {
|
10028
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10029
|
+
}
|
10030
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
10031
|
+
if (!SWIG_IsOK(res1)) {
|
10032
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","gamepad_connected", 1, self ));
|
10033
|
+
}
|
10034
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
10035
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
10036
|
+
if (!SWIG_IsOK(ecode2)) {
|
10037
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","gamepad_connected", 2, argv[0] ));
|
10038
|
+
}
|
10039
|
+
arg2 = static_cast< int >(val2);
|
10040
|
+
director = dynamic_cast<Swig::Director *>(arg1);
|
10041
|
+
upcall = (director && (director->swig_get_self() == self));
|
10042
|
+
try {
|
10043
|
+
{
|
10044
|
+
try {
|
10045
|
+
if (upcall) {
|
10046
|
+
(arg1)->Gosu::Window::gamepad_connected(arg2);
|
10047
|
+
} else {
|
10048
|
+
(arg1)->gamepad_connected(arg2);
|
10049
|
+
}
|
10050
|
+
}
|
10051
|
+
catch (const std::exception& e) {
|
10052
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
10053
|
+
}
|
10054
|
+
}
|
10055
|
+
} catch (Swig::DirectorException& e) {
|
10056
|
+
rb_exc_raise(e.getError());
|
10057
|
+
SWIG_fail;
|
10058
|
+
}
|
10059
|
+
return Qnil;
|
10060
|
+
fail:
|
10061
|
+
return Qnil;
|
10062
|
+
}
|
10063
|
+
|
10064
|
+
|
10065
|
+
SWIGINTERN VALUE
|
10066
|
+
_wrap_Window_gamepad_disconnected(int argc, VALUE *argv, VALUE self) {
|
10067
|
+
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
10068
|
+
int arg2 ;
|
10069
|
+
void *argp1 = 0 ;
|
10070
|
+
int res1 = 0 ;
|
10071
|
+
int val2 ;
|
10072
|
+
int ecode2 = 0 ;
|
10073
|
+
Swig::Director *director = 0;
|
10074
|
+
bool upcall = false;
|
10075
|
+
|
10076
|
+
if ((argc < 1) || (argc > 1)) {
|
10077
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10078
|
+
}
|
10079
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 );
|
10080
|
+
if (!SWIG_IsOK(res1)) {
|
10081
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","gamepad_disconnected", 1, self ));
|
10082
|
+
}
|
10083
|
+
arg1 = reinterpret_cast< Gosu::Window * >(argp1);
|
10084
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
10085
|
+
if (!SWIG_IsOK(ecode2)) {
|
10086
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","gamepad_disconnected", 2, argv[0] ));
|
10087
|
+
}
|
10088
|
+
arg2 = static_cast< int >(val2);
|
10089
|
+
director = dynamic_cast<Swig::Director *>(arg1);
|
10090
|
+
upcall = (director && (director->swig_get_self() == self));
|
10091
|
+
try {
|
10092
|
+
{
|
10093
|
+
try {
|
10094
|
+
if (upcall) {
|
10095
|
+
(arg1)->Gosu::Window::gamepad_disconnected(arg2);
|
10096
|
+
} else {
|
10097
|
+
(arg1)->gamepad_disconnected(arg2);
|
10098
|
+
}
|
10099
|
+
}
|
10100
|
+
catch (const std::exception& e) {
|
10101
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
10102
|
+
}
|
10103
|
+
}
|
10104
|
+
} catch (Swig::DirectorException& e) {
|
10105
|
+
rb_exc_raise(e.getError());
|
10106
|
+
SWIG_fail;
|
10107
|
+
}
|
10108
|
+
return Qnil;
|
10109
|
+
fail:
|
10110
|
+
return Qnil;
|
10111
|
+
}
|
10112
|
+
|
10113
|
+
|
9517
10114
|
SWIGINTERN VALUE
|
9518
10115
|
_wrap_Window_drop(int argc, VALUE *argv, VALUE self) {
|
9519
10116
|
Gosu::Window *arg1 = (Gosu::Window *) 0 ;
|
@@ -10134,14 +10731,14 @@ _wrap_char_to_button_id(int argc, VALUE *argv, VALUE self) {
|
|
10134
10731
|
}
|
10135
10732
|
{
|
10136
10733
|
try {
|
10137
|
-
result = Gosu::char_to_button_id(arg1);
|
10734
|
+
result = (Gosu::Button)Gosu::char_to_button_id(arg1);
|
10138
10735
|
}
|
10139
10736
|
catch (const std::exception& e) {
|
10140
10737
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
10141
10738
|
}
|
10142
10739
|
}
|
10143
10740
|
{
|
10144
|
-
vresult = result == Gosu::NO_BUTTON ? Qnil : LONG2NUM(
|
10741
|
+
vresult = result == Gosu::NO_BUTTON ? Qnil : LONG2NUM(result);
|
10145
10742
|
}
|
10146
10743
|
return vresult;
|
10147
10744
|
fail:
|
@@ -10203,6 +10800,91 @@ fail:
|
|
10203
10800
|
}
|
10204
10801
|
|
10205
10802
|
|
10803
|
+
SWIGINTERN VALUE
|
10804
|
+
_wrap_button_name(int argc, VALUE *argv, VALUE self) {
|
10805
|
+
Gosu::Button arg1 ;
|
10806
|
+
VALUE result;
|
10807
|
+
VALUE vresult = Qnil;
|
10808
|
+
|
10809
|
+
if ((argc < 1) || (argc > 1)) {
|
10810
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10811
|
+
}
|
10812
|
+
{
|
10813
|
+
arg1 = NIL_P(argv[0]) ? Gosu::NO_BUTTON : Gosu::Button(NUM2LONG(argv[0]));
|
10814
|
+
}
|
10815
|
+
{
|
10816
|
+
try {
|
10817
|
+
result = (VALUE)Gosu::button_name(arg1);
|
10818
|
+
}
|
10819
|
+
catch (const std::exception& e) {
|
10820
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
10821
|
+
}
|
10822
|
+
}
|
10823
|
+
vresult = result;
|
10824
|
+
return vresult;
|
10825
|
+
fail:
|
10826
|
+
return Qnil;
|
10827
|
+
}
|
10828
|
+
|
10829
|
+
|
10830
|
+
SWIGINTERN VALUE
|
10831
|
+
_wrap_gamepad_name(int argc, VALUE *argv, VALUE self) {
|
10832
|
+
int arg1 ;
|
10833
|
+
int val1 ;
|
10834
|
+
int ecode1 = 0 ;
|
10835
|
+
VALUE result;
|
10836
|
+
VALUE vresult = Qnil;
|
10837
|
+
|
10838
|
+
if ((argc < 1) || (argc > 1)) {
|
10839
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10840
|
+
}
|
10841
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
10842
|
+
if (!SWIG_IsOK(ecode1)) {
|
10843
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Gosu::gamepad_name", 1, argv[0] ));
|
10844
|
+
}
|
10845
|
+
arg1 = static_cast< int >(val1);
|
10846
|
+
{
|
10847
|
+
try {
|
10848
|
+
result = (VALUE)Gosu::gamepad_name(arg1);
|
10849
|
+
}
|
10850
|
+
catch (const std::exception& e) {
|
10851
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
10852
|
+
}
|
10853
|
+
}
|
10854
|
+
vresult = result;
|
10855
|
+
return vresult;
|
10856
|
+
fail:
|
10857
|
+
return Qnil;
|
10858
|
+
}
|
10859
|
+
|
10860
|
+
|
10861
|
+
SWIGINTERN VALUE
|
10862
|
+
_wrap_axis(int argc, VALUE *argv, VALUE self) {
|
10863
|
+
Gosu::Button arg1 ;
|
10864
|
+
double result;
|
10865
|
+
VALUE vresult = Qnil;
|
10866
|
+
|
10867
|
+
if ((argc < 1) || (argc > 1)) {
|
10868
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10869
|
+
}
|
10870
|
+
{
|
10871
|
+
arg1 = NIL_P(argv[0]) ? Gosu::NO_BUTTON : Gosu::Button(NUM2LONG(argv[0]));
|
10872
|
+
}
|
10873
|
+
{
|
10874
|
+
try {
|
10875
|
+
result = (double)Gosu::axis(arg1);
|
10876
|
+
}
|
10877
|
+
catch (const std::exception& e) {
|
10878
|
+
SWIG_exception(SWIG_RuntimeError, e.what());
|
10879
|
+
}
|
10880
|
+
}
|
10881
|
+
vresult = SWIG_From_double(static_cast< double >(result));
|
10882
|
+
return vresult;
|
10883
|
+
fail:
|
10884
|
+
return Qnil;
|
10885
|
+
}
|
10886
|
+
|
10887
|
+
|
10206
10888
|
SWIGINTERN VALUE
|
10207
10889
|
_wrap_draw_line(int argc, VALUE *argv, VALUE self) {
|
10208
10890
|
double arg1 ;
|
@@ -11428,7 +12110,6 @@ fail:
|
|
11428
12110
|
|
11429
12111
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
11430
12112
|
|
11431
|
-
static swig_type_info _swigt__p_Gosu__Button = {"_p_Gosu__Button", "Gosu::Button *", 0, 0, (void*)0, 0};
|
11432
12113
|
static swig_type_info _swigt__p_Gosu__Channel = {"_p_Gosu__Channel", "Gosu::Channel *", 0, 0, (void*)0, 0};
|
11433
12114
|
static swig_type_info _swigt__p_Gosu__Color = {"_p_Gosu__Color", "Gosu::Color *", 0, 0, (void*)0, 0};
|
11434
12115
|
static swig_type_info _swigt__p_Gosu__Font = {"_p_Gosu__Font", "Gosu::Font *", 0, 0, (void*)0, 0};
|
@@ -11444,7 +12125,6 @@ static swig_type_info _swigt__p_std__arrayT_double_16_t = {"_p_std__arrayT_doubl
|
|
11444
12125
|
static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
|
11445
12126
|
|
11446
12127
|
static swig_type_info *swig_type_initial[] = {
|
11447
|
-
&_swigt__p_Gosu__Button,
|
11448
12128
|
&_swigt__p_Gosu__Channel,
|
11449
12129
|
&_swigt__p_Gosu__Color,
|
11450
12130
|
&_swigt__p_Gosu__Font,
|
@@ -11460,7 +12140,6 @@ static swig_type_info *swig_type_initial[] = {
|
|
11460
12140
|
&_swigt__p_std__string,
|
11461
12141
|
};
|
11462
12142
|
|
11463
|
-
static swig_cast_info _swigc__p_Gosu__Button[] = { {&_swigt__p_Gosu__Button, 0, 0, 0},{0, 0, 0, 0}};
|
11464
12143
|
static swig_cast_info _swigc__p_Gosu__Channel[] = { {&_swigt__p_Gosu__Channel, 0, 0, 0},{0, 0, 0, 0}};
|
11465
12144
|
static swig_cast_info _swigc__p_Gosu__Color[] = { {&_swigt__p_Gosu__Color, 0, 0, 0},{0, 0, 0, 0}};
|
11466
12145
|
static swig_cast_info _swigc__p_Gosu__Font[] = { {&_swigt__p_Gosu__Font, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -11476,7 +12155,6 @@ static swig_cast_info _swigc__p_std__arrayT_double_16_t[] = { {&_swigt__p_std__
|
|
11476
12155
|
static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
|
11477
12156
|
|
11478
12157
|
static swig_cast_info *swig_cast_initial[] = {
|
11479
|
-
_swigc__p_Gosu__Button,
|
11480
12158
|
_swigc__p_Gosu__Channel,
|
11481
12159
|
_swigc__p_Gosu__Color,
|
11482
12160
|
_swigc__p_Gosu__Font,
|
@@ -11746,8 +12424,8 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11746
12424
|
SWIG_RubyInitializeTrackings();
|
11747
12425
|
rb_define_const(mGosu, "VERSION", SWIG_From_std_string(static_cast< std::string >(Gosu::VERSION)));
|
11748
12426
|
rb_define_const(mGosu, "LICENSES", SWIG_From_std_string(static_cast< std::string >(Gosu::LICENSES)));
|
11749
|
-
rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(
|
11750
|
-
rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(
|
12427
|
+
rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(1)));
|
12428
|
+
rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(0)));
|
11751
12429
|
rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(0)));
|
11752
12430
|
rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
|
11753
12431
|
rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
|
@@ -11763,7 +12441,6 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11763
12441
|
rb_define_const(mGosu, "MAX_TEXTURE_SIZE", SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Gosu::MAX_TEXTURE_SIZE)));
|
11764
12442
|
rb_define_module_function(mGosu, "language", VALUEFUNC(_wrap_language), -1);
|
11765
12443
|
rb_define_module_function(mGosu, "enable_undocumented_retrofication", VALUEFUNC(_wrap_enable_undocumented_retrofication), -1);
|
11766
|
-
rb_define_module_function(mGosu, "_release_all_openal_resources", VALUEFUNC(_wrap__release_all_openal_resources), -1);
|
11767
12444
|
|
11768
12445
|
SwigClassColor.klass = rb_define_class_under(mGosu, "Color", rb_cObject);
|
11769
12446
|
SWIG_TypeClientData(SWIGTYPE_p_Gosu__Color, (void *) &SwigClassColor);
|
@@ -11807,9 +12484,12 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11807
12484
|
rb_define_method(SwigClassFont.klass, "name", VALUEFUNC(_wrap_Font_name), -1);
|
11808
12485
|
rb_define_method(SwigClassFont.klass, "height", VALUEFUNC(_wrap_Font_height), -1);
|
11809
12486
|
rb_define_method(SwigClassFont.klass, "flags", VALUEFUNC(_wrap_Font_flags), -1);
|
12487
|
+
rb_define_method(SwigClassFont.klass, "draw_text", VALUEFUNC(_wrap_Font_draw_text), -1);
|
11810
12488
|
rb_define_method(SwigClassFont.klass, "draw_markup", VALUEFUNC(_wrap_Font_draw_markup), -1);
|
12489
|
+
rb_define_method(SwigClassFont.klass, "draw_text_rel", VALUEFUNC(_wrap_Font_draw_text_rel), -1);
|
11811
12490
|
rb_define_method(SwigClassFont.klass, "draw_markup_rel", VALUEFUNC(_wrap_Font_draw_markup_rel), -1);
|
11812
12491
|
rb_define_method(SwigClassFont.klass, "set_image", VALUEFUNC(_wrap_Font_set_image), -1);
|
12492
|
+
rb_define_method(SwigClassFont.klass, "text_width", VALUEFUNC(_wrap_Font_text_width), -1);
|
11813
12493
|
rb_define_method(SwigClassFont.klass, "markup_width", VALUEFUNC(_wrap_Font_markup_width), -1);
|
11814
12494
|
SwigClassFont.mark = 0;
|
11815
12495
|
SwigClassFont.destroy = (void (*)(void *)) free_Gosu_Font;
|
@@ -11846,6 +12526,7 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11846
12526
|
rb_define_method(SwigClassImage.klass, "gl_tex_info", VALUEFUNC(_wrap_Image_gl_tex_info), -1);
|
11847
12527
|
rb_define_method(SwigClassImage.klass, "subimage", VALUEFUNC(_wrap_Image_subimage), -1);
|
11848
12528
|
rb_define_singleton_method(SwigClassImage.klass, "from_text", VALUEFUNC(_wrap_Image_from_text), -1);
|
12529
|
+
rb_define_singleton_method(SwigClassImage.klass, "from_markup", VALUEFUNC(_wrap_Image_from_markup), -1);
|
11849
12530
|
rb_define_singleton_method(SwigClassImage.klass, "load_tiles", VALUEFUNC(_wrap_Image_load_tiles), -1);
|
11850
12531
|
rb_define_method(SwigClassImage.klass, "to_blob", VALUEFUNC(_wrap_Image_to_blob), -1);
|
11851
12532
|
rb_define_method(SwigClassImage.klass, "columns", VALUEFUNC(_wrap_Image_columns), -1);
|
@@ -11941,6 +12622,9 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11941
12622
|
rb_define_const(mGosu, "KB_DOWN", SWIG_From_int(static_cast< int >(Gosu::KB_DOWN)));
|
11942
12623
|
rb_define_const(mGosu, "KB_HOME", SWIG_From_int(static_cast< int >(Gosu::KB_HOME)));
|
11943
12624
|
rb_define_const(mGosu, "KB_END", SWIG_From_int(static_cast< int >(Gosu::KB_END)));
|
12625
|
+
rb_define_const(mGosu, "KB_PRINT_SCREEN", SWIG_From_int(static_cast< int >(Gosu::KB_PRINT_SCREEN)));
|
12626
|
+
rb_define_const(mGosu, "KB_SCROLL_LOCK", SWIG_From_int(static_cast< int >(Gosu::KB_SCROLL_LOCK)));
|
12627
|
+
rb_define_const(mGosu, "KB_PAUSE", SWIG_From_int(static_cast< int >(Gosu::KB_PAUSE)));
|
11944
12628
|
rb_define_const(mGosu, "KB_INSERT", SWIG_From_int(static_cast< int >(Gosu::KB_INSERT)));
|
11945
12629
|
rb_define_const(mGosu, "KB_DELETE", SWIG_From_int(static_cast< int >(Gosu::KB_DELETE)));
|
11946
12630
|
rb_define_const(mGosu, "KB_PAGE_UP", SWIG_From_int(static_cast< int >(Gosu::KB_PAGE_UP)));
|
@@ -11957,6 +12641,7 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11957
12641
|
rb_define_const(mGosu, "KB_COMMA", SWIG_From_int(static_cast< int >(Gosu::KB_COMMA)));
|
11958
12642
|
rb_define_const(mGosu, "KB_PERIOD", SWIG_From_int(static_cast< int >(Gosu::KB_PERIOD)));
|
11959
12643
|
rb_define_const(mGosu, "KB_SLASH", SWIG_From_int(static_cast< int >(Gosu::KB_SLASH)));
|
12644
|
+
rb_define_const(mGosu, "KB_CAPS_LOCK", SWIG_From_int(static_cast< int >(Gosu::KB_CAPS_LOCK)));
|
11960
12645
|
rb_define_const(mGosu, "KB_A", SWIG_From_int(static_cast< int >(Gosu::KB_A)));
|
11961
12646
|
rb_define_const(mGosu, "KB_B", SWIG_From_int(static_cast< int >(Gosu::KB_B)));
|
11962
12647
|
rb_define_const(mGosu, "KB_C", SWIG_From_int(static_cast< int >(Gosu::KB_C)));
|
@@ -12012,10 +12697,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12012
12697
|
rb_define_const(mGosu, "MS_OTHER_5", SWIG_From_int(static_cast< int >(Gosu::MS_OTHER_5)));
|
12013
12698
|
rb_define_const(mGosu, "MS_OTHER_6", SWIG_From_int(static_cast< int >(Gosu::MS_OTHER_6)));
|
12014
12699
|
rb_define_const(mGosu, "MS_OTHER_7", SWIG_From_int(static_cast< int >(Gosu::MS_OTHER_7)));
|
12015
|
-
rb_define_const(mGosu, "
|
12016
|
-
rb_define_const(mGosu, "
|
12017
|
-
rb_define_const(mGosu, "
|
12018
|
-
rb_define_const(mGosu, "
|
12700
|
+
rb_define_const(mGosu, "GP_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_LEFT)));
|
12701
|
+
rb_define_const(mGosu, "GP_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_RIGHT)));
|
12702
|
+
rb_define_const(mGosu, "GP_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_UP)));
|
12703
|
+
rb_define_const(mGosu, "GP_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_DPAD_DOWN)));
|
12019
12704
|
rb_define_const(mGosu, "GP_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_0)));
|
12020
12705
|
rb_define_const(mGosu, "GP_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_1)));
|
12021
12706
|
rb_define_const(mGosu, "GP_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_2)));
|
@@ -12032,10 +12717,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12032
12717
|
rb_define_const(mGosu, "GP_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_13)));
|
12033
12718
|
rb_define_const(mGosu, "GP_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_14)));
|
12034
12719
|
rb_define_const(mGosu, "GP_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_BUTTON_15)));
|
12035
|
-
rb_define_const(mGosu, "
|
12036
|
-
rb_define_const(mGosu, "
|
12037
|
-
rb_define_const(mGosu, "
|
12038
|
-
rb_define_const(mGosu, "
|
12720
|
+
rb_define_const(mGosu, "GP_0_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_LEFT)));
|
12721
|
+
rb_define_const(mGosu, "GP_0_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_RIGHT)));
|
12722
|
+
rb_define_const(mGosu, "GP_0_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_UP)));
|
12723
|
+
rb_define_const(mGosu, "GP_0_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_0_DPAD_DOWN)));
|
12039
12724
|
rb_define_const(mGosu, "GP_0_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_0)));
|
12040
12725
|
rb_define_const(mGosu, "GP_0_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_1)));
|
12041
12726
|
rb_define_const(mGosu, "GP_0_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_2)));
|
@@ -12052,10 +12737,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12052
12737
|
rb_define_const(mGosu, "GP_0_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_13)));
|
12053
12738
|
rb_define_const(mGosu, "GP_0_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_14)));
|
12054
12739
|
rb_define_const(mGosu, "GP_0_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_0_BUTTON_15)));
|
12055
|
-
rb_define_const(mGosu, "
|
12056
|
-
rb_define_const(mGosu, "
|
12057
|
-
rb_define_const(mGosu, "
|
12058
|
-
rb_define_const(mGosu, "
|
12740
|
+
rb_define_const(mGosu, "GP_1_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_LEFT)));
|
12741
|
+
rb_define_const(mGosu, "GP_1_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_RIGHT)));
|
12742
|
+
rb_define_const(mGosu, "GP_1_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_UP)));
|
12743
|
+
rb_define_const(mGosu, "GP_1_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_1_DPAD_DOWN)));
|
12059
12744
|
rb_define_const(mGosu, "GP_1_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_0)));
|
12060
12745
|
rb_define_const(mGosu, "GP_1_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_1)));
|
12061
12746
|
rb_define_const(mGosu, "GP_1_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_2)));
|
@@ -12072,10 +12757,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12072
12757
|
rb_define_const(mGosu, "GP_1_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_13)));
|
12073
12758
|
rb_define_const(mGosu, "GP_1_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_14)));
|
12074
12759
|
rb_define_const(mGosu, "GP_1_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_1_BUTTON_15)));
|
12075
|
-
rb_define_const(mGosu, "
|
12076
|
-
rb_define_const(mGosu, "
|
12077
|
-
rb_define_const(mGosu, "
|
12078
|
-
rb_define_const(mGosu, "
|
12760
|
+
rb_define_const(mGosu, "GP_2_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_LEFT)));
|
12761
|
+
rb_define_const(mGosu, "GP_2_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_RIGHT)));
|
12762
|
+
rb_define_const(mGosu, "GP_2_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_UP)));
|
12763
|
+
rb_define_const(mGosu, "GP_2_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_2_DPAD_DOWN)));
|
12079
12764
|
rb_define_const(mGosu, "GP_2_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_0)));
|
12080
12765
|
rb_define_const(mGosu, "GP_2_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_1)));
|
12081
12766
|
rb_define_const(mGosu, "GP_2_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_2)));
|
@@ -12092,10 +12777,10 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12092
12777
|
rb_define_const(mGosu, "GP_2_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_13)));
|
12093
12778
|
rb_define_const(mGosu, "GP_2_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_14)));
|
12094
12779
|
rb_define_const(mGosu, "GP_2_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_2_BUTTON_15)));
|
12095
|
-
rb_define_const(mGosu, "
|
12096
|
-
rb_define_const(mGosu, "
|
12097
|
-
rb_define_const(mGosu, "
|
12098
|
-
rb_define_const(mGosu, "
|
12780
|
+
rb_define_const(mGosu, "GP_3_DPAD_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_LEFT)));
|
12781
|
+
rb_define_const(mGosu, "GP_3_DPAD_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_RIGHT)));
|
12782
|
+
rb_define_const(mGosu, "GP_3_DPAD_UP", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_UP)));
|
12783
|
+
rb_define_const(mGosu, "GP_3_DPAD_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_3_DPAD_DOWN)));
|
12099
12784
|
rb_define_const(mGosu, "GP_3_BUTTON_0", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_0)));
|
12100
12785
|
rb_define_const(mGosu, "GP_3_BUTTON_1", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_1)));
|
12101
12786
|
rb_define_const(mGosu, "GP_3_BUTTON_2", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_2)));
|
@@ -12112,6 +12797,56 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12112
12797
|
rb_define_const(mGosu, "GP_3_BUTTON_13", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_13)));
|
12113
12798
|
rb_define_const(mGosu, "GP_3_BUTTON_14", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_14)));
|
12114
12799
|
rb_define_const(mGosu, "GP_3_BUTTON_15", SWIG_From_int(static_cast< int >(Gosu::GP_3_BUTTON_15)));
|
12800
|
+
rb_define_const(mGosu, "GP_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT)));
|
12801
|
+
rb_define_const(mGosu, "GP_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT)));
|
12802
|
+
rb_define_const(mGosu, "GP_UP", SWIG_From_int(static_cast< int >(Gosu::GP_UP)));
|
12803
|
+
rb_define_const(mGosu, "GP_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_DOWN)));
|
12804
|
+
rb_define_const(mGosu, "GP_0_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT)));
|
12805
|
+
rb_define_const(mGosu, "GP_0_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT)));
|
12806
|
+
rb_define_const(mGosu, "GP_0_UP", SWIG_From_int(static_cast< int >(Gosu::GP_0_UP)));
|
12807
|
+
rb_define_const(mGosu, "GP_0_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_0_DOWN)));
|
12808
|
+
rb_define_const(mGosu, "GP_1_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT)));
|
12809
|
+
rb_define_const(mGosu, "GP_1_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT)));
|
12810
|
+
rb_define_const(mGosu, "GP_1_UP", SWIG_From_int(static_cast< int >(Gosu::GP_1_UP)));
|
12811
|
+
rb_define_const(mGosu, "GP_1_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_1_DOWN)));
|
12812
|
+
rb_define_const(mGosu, "GP_2_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT)));
|
12813
|
+
rb_define_const(mGosu, "GP_2_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT)));
|
12814
|
+
rb_define_const(mGosu, "GP_2_UP", SWIG_From_int(static_cast< int >(Gosu::GP_2_UP)));
|
12815
|
+
rb_define_const(mGosu, "GP_2_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_2_DOWN)));
|
12816
|
+
rb_define_const(mGosu, "GP_3_LEFT", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT)));
|
12817
|
+
rb_define_const(mGosu, "GP_3_RIGHT", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT)));
|
12818
|
+
rb_define_const(mGosu, "GP_3_UP", SWIG_From_int(static_cast< int >(Gosu::GP_3_UP)));
|
12819
|
+
rb_define_const(mGosu, "GP_3_DOWN", SWIG_From_int(static_cast< int >(Gosu::GP_3_DOWN)));
|
12820
|
+
rb_define_const(mGosu, "GP_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT_STICK_X_AXIS)));
|
12821
|
+
rb_define_const(mGosu, "GP_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT_STICK_Y_AXIS)));
|
12822
|
+
rb_define_const(mGosu, "GP_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT_STICK_X_AXIS)));
|
12823
|
+
rb_define_const(mGosu, "GP_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT_STICK_Y_AXIS)));
|
12824
|
+
rb_define_const(mGosu, "GP_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_LEFT_TRIGGER_AXIS)));
|
12825
|
+
rb_define_const(mGosu, "GP_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_RIGHT_TRIGGER_AXIS)));
|
12826
|
+
rb_define_const(mGosu, "GP_0_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT_STICK_X_AXIS)));
|
12827
|
+
rb_define_const(mGosu, "GP_0_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT_STICK_Y_AXIS)));
|
12828
|
+
rb_define_const(mGosu, "GP_0_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT_STICK_X_AXIS)));
|
12829
|
+
rb_define_const(mGosu, "GP_0_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT_STICK_Y_AXIS)));
|
12830
|
+
rb_define_const(mGosu, "GP_0_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_LEFT_TRIGGER_AXIS)));
|
12831
|
+
rb_define_const(mGosu, "GP_0_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_0_RIGHT_TRIGGER_AXIS)));
|
12832
|
+
rb_define_const(mGosu, "GP_1_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT_STICK_X_AXIS)));
|
12833
|
+
rb_define_const(mGosu, "GP_1_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT_STICK_Y_AXIS)));
|
12834
|
+
rb_define_const(mGosu, "GP_1_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT_STICK_X_AXIS)));
|
12835
|
+
rb_define_const(mGosu, "GP_1_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT_STICK_Y_AXIS)));
|
12836
|
+
rb_define_const(mGosu, "GP_1_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_LEFT_TRIGGER_AXIS)));
|
12837
|
+
rb_define_const(mGosu, "GP_1_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_1_RIGHT_TRIGGER_AXIS)));
|
12838
|
+
rb_define_const(mGosu, "GP_2_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT_STICK_X_AXIS)));
|
12839
|
+
rb_define_const(mGosu, "GP_2_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT_STICK_Y_AXIS)));
|
12840
|
+
rb_define_const(mGosu, "GP_2_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT_STICK_X_AXIS)));
|
12841
|
+
rb_define_const(mGosu, "GP_2_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT_STICK_Y_AXIS)));
|
12842
|
+
rb_define_const(mGosu, "GP_2_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_LEFT_TRIGGER_AXIS)));
|
12843
|
+
rb_define_const(mGosu, "GP_2_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_2_RIGHT_TRIGGER_AXIS)));
|
12844
|
+
rb_define_const(mGosu, "GP_3_LEFT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT_STICK_X_AXIS)));
|
12845
|
+
rb_define_const(mGosu, "GP_3_LEFT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT_STICK_Y_AXIS)));
|
12846
|
+
rb_define_const(mGosu, "GP_3_RIGHT_STICK_X_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT_STICK_X_AXIS)));
|
12847
|
+
rb_define_const(mGosu, "GP_3_RIGHT_STICK_Y_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT_STICK_Y_AXIS)));
|
12848
|
+
rb_define_const(mGosu, "GP_3_LEFT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_LEFT_TRIGGER_AXIS)));
|
12849
|
+
rb_define_const(mGosu, "GP_3_RIGHT_TRIGGER_AXIS", SWIG_From_int(static_cast< int >(Gosu::GP_3_RIGHT_TRIGGER_AXIS)));
|
12115
12850
|
|
12116
12851
|
// Call srand() so that Gosu::random() is actually random in Ruby scripts
|
12117
12852
|
std::srand(static_cast<unsigned>(std::time(0)));
|
@@ -12161,6 +12896,8 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12161
12896
|
rb_define_method(SwigClassWindow.klass, "release_memory", VALUEFUNC(_wrap_Window_release_memory), -1);
|
12162
12897
|
rb_define_method(SwigClassWindow.klass, "button_down", VALUEFUNC(_wrap_Window_button_down), -1);
|
12163
12898
|
rb_define_method(SwigClassWindow.klass, "button_up", VALUEFUNC(_wrap_Window_button_up), -1);
|
12899
|
+
rb_define_method(SwigClassWindow.klass, "gamepad_connected", VALUEFUNC(_wrap_Window_gamepad_connected), -1);
|
12900
|
+
rb_define_method(SwigClassWindow.klass, "gamepad_disconnected", VALUEFUNC(_wrap_Window_gamepad_disconnected), -1);
|
12164
12901
|
rb_define_method(SwigClassWindow.klass, "drop", VALUEFUNC(_wrap_Window_drop), -1);
|
12165
12902
|
rb_define_method(SwigClassWindow.klass, "width=", VALUEFUNC(_wrap_Window_widthe___), -1);
|
12166
12903
|
rb_define_method(SwigClassWindow.klass, "height=", VALUEFUNC(_wrap_Window_heighte___), -1);
|
@@ -12183,6 +12920,9 @@ SWIGEXPORT void Init_gosu(void) {
|
|
12183
12920
|
rb_define_module_function(mGosu, "char_to_button_id", VALUEFUNC(_wrap_char_to_button_id), -1);
|
12184
12921
|
rb_define_module_function(mGosu, "button_id_to_char", VALUEFUNC(_wrap_button_id_to_char), -1);
|
12185
12922
|
rb_define_module_function(mGosu, "button_down?", VALUEFUNC(_wrap_button_downq___), -1);
|
12923
|
+
rb_define_module_function(mGosu, "button_name", VALUEFUNC(_wrap_button_name), -1);
|
12924
|
+
rb_define_module_function(mGosu, "gamepad_name", VALUEFUNC(_wrap_gamepad_name), -1);
|
12925
|
+
rb_define_module_function(mGosu, "axis", VALUEFUNC(_wrap_axis), -1);
|
12186
12926
|
rb_define_module_function(mGosu, "draw_line", VALUEFUNC(_wrap_draw_line), -1);
|
12187
12927
|
rb_define_module_function(mGosu, "draw_triangle", VALUEFUNC(_wrap_draw_triangle), -1);
|
12188
12928
|
rb_define_module_function(mGosu, "draw_quad", VALUEFUNC(_wrap_draw_quad), -1);
|