gosu 0.8.0.pre3 → 0.8.0.pre4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gosu/Buttons.hpp +13 -11
- data/{linux → ext/gosu}/extconf.rb +25 -47
- data/{GosuImpl/RubyGosu_wrap.cxx → ext/gosu/gosu_wrap.cxx} +3 -2
- data/{GosuImpl/RubyGosu_wrap.h → ext/gosu/gosu_wrap.h} +0 -0
- data/lib/gosu.rb +6 -7
- data/lib/gosu/zen.rb +12 -0
- data/{GosuImpl → src}/Audio/ALChannelManagement.hpp +0 -0
- data/{GosuImpl → src}/Audio/AudioFile.hpp +0 -0
- data/{GosuImpl → src}/Audio/AudioOpenAL.cpp +0 -0
- data/{GosuImpl → src}/Audio/AudioOpenAL.mm +0 -0
- data/{GosuImpl → src}/Audio/AudioToolboxFile.hpp +0 -0
- data/{GosuImpl → src}/Audio/OggFile.hpp +0 -0
- data/{GosuImpl → src}/Audio/SndFile.hpp +0 -0
- data/{GosuImpl/Graphics → src/Bitmap}/Bitmap.cpp +2 -0
- data/{GosuImpl/Graphics → src/Bitmap}/BitmapApple.mm +0 -0
- data/{GosuImpl/Graphics → src/Bitmap}/BitmapBMP.cpp +0 -0
- data/{GosuImpl/Graphics → src/Bitmap}/BitmapColorKey.cpp +0 -0
- data/{GosuImpl/Graphics → src/Bitmap}/BitmapFreeImage.cpp +0 -0
- data/{GosuImpl/Graphics → src/Bitmap}/BitmapGDIplus.cpp +0 -0
- data/{GosuImpl/Graphics → src/Bitmap}/BitmapUtils.cpp +0 -0
- data/{GosuImpl → src}/DirectoriesMac.mm +0 -0
- data/{GosuImpl → src}/DirectoriesTouch.mm +0 -0
- data/{GosuImpl → src}/DirectoriesUnix.cpp +0 -0
- data/{GosuImpl → src}/DirectoriesWin.cpp +0 -0
- data/{GosuImpl → src}/FileUnix.cpp +0 -0
- data/{GosuImpl → src}/FileWin.cpp +0 -0
- data/{GosuImpl/Graphics → src}/GosuView.hpp +0 -0
- data/{GosuImpl/Graphics → src}/GosuView.mm +0 -0
- data/{GosuImpl → src}/Graphics/BlockAllocator.cpp +0 -0
- data/{GosuImpl → src}/Graphics/BlockAllocator.hpp +0 -0
- data/{GosuImpl → src}/Graphics/ClipRectStack.hpp +0 -0
- data/{GosuImpl → src}/Graphics/Color.cpp +0 -0
- data/{GosuImpl → src}/Graphics/Common.hpp +0 -0
- data/{GosuImpl → src}/Graphics/DrawOp.hpp +0 -0
- data/{GosuImpl → src}/Graphics/DrawOpQueue.hpp +0 -0
- data/{GosuImpl → src}/Graphics/Graphics.cpp +0 -0
- data/{GosuImpl → src}/Graphics/Image.cpp +0 -0
- data/{GosuImpl → src}/Graphics/LargeImageData.cpp +0 -0
- data/{GosuImpl → src}/Graphics/LargeImageData.hpp +0 -0
- data/{GosuImpl → src}/Graphics/Macro.hpp +0 -0
- data/{GosuImpl → src}/Graphics/RenderState.hpp +0 -0
- data/{GosuImpl → src}/Graphics/TexChunk.cpp +0 -0
- data/{GosuImpl → src}/Graphics/TexChunk.hpp +0 -0
- data/{GosuImpl → src}/Graphics/Texture.cpp +0 -0
- data/{GosuImpl → src}/Graphics/Texture.hpp +0 -0
- data/{GosuImpl → src}/Graphics/Transform.cpp +0 -0
- data/{GosuImpl → src}/Graphics/TransformStack.hpp +0 -0
- data/{GosuImpl → src}/IO.cpp +0 -0
- data/{GosuImpl → src}/Iconv.hpp +0 -0
- data/{GosuImpl → src}/Input/AccelerometerReader.hpp +0 -0
- data/{GosuImpl → src}/Input/AccelerometerReader.mm +0 -0
- data/{GosuImpl → src/Input}/Input.cpp +0 -0
- data/{GosuImpl → src/Input}/InputTouch.mm +0 -0
- data/{GosuImpl → src/Input}/TextInput.cpp +0 -0
- data/{GosuImpl → src/Input}/TextInputMac.mm +0 -0
- data/{GosuImpl → src}/Inspection.cpp +0 -0
- data/{GosuImpl → src}/MacUtility.hpp +0 -0
- data/{GosuImpl → src}/Math.cpp +0 -0
- data/{GosuImpl → src}/Sockets/CommSocket.cpp +0 -0
- data/{GosuImpl → src}/Sockets/ListenerSocket.cpp +0 -0
- data/{GosuImpl → src}/Sockets/MessageSocket.cpp +0 -0
- data/{GosuImpl → src}/Sockets/Socket.cpp +0 -0
- data/{GosuImpl → src}/Sockets/Socket.hpp +0 -0
- data/{GosuImpl/Graphics → src/Text}/Font.cpp +1 -1
- data/{GosuImpl/Graphics → src/Text}/FormattedString.hpp +0 -0
- data/{GosuImpl/Graphics → src/Text}/Text.cpp +1 -1
- data/{GosuImpl/Graphics/TextTouch.mm → src/Text/TextApple.mm} +0 -0
- data/{GosuImpl/Graphics → src/Text}/TextMac.cpp +1 -1
- data/{GosuImpl/Graphics → src/Text}/TextTTFWin.cpp +0 -0
- data/{GosuImpl/Graphics → src/Text}/TextUnix.cpp +0 -0
- data/{GosuImpl/Graphics → src/Text}/TextWin.cpp +0 -0
- data/{GosuImpl → src}/TimingApple.cpp +0 -0
- data/{GosuImpl → src}/TimingUnix.cpp +0 -0
- data/{GosuImpl → src}/TimingWin.cpp +0 -0
- data/{GosuImpl → src}/Utility.cpp +0 -0
- data/{GosuImpl → src}/UtilityApple.mm +0 -0
- data/{GosuImpl → src}/UtilityWin.cpp +0 -0
- data/{GosuImpl → src}/WinMain.cpp +0 -0
- data/{GosuImpl → src}/WinUtility.cpp +0 -0
- data/{GosuImpl → src}/Window.cpp +0 -0
- data/{GosuImpl → src}/WindowTouch.mm +0 -0
- data/{GosuImpl → src}/X11vroot.h +0 -0
- metadata +97 -193
- data/.yardopts +0 -1
- data/COPYING +0 -29
- data/GosuImpl/InputMac.mm +0 -733
- data/GosuImpl/InputWin.cpp +0 -483
- data/GosuImpl/InputX.cpp +0 -243
- data/GosuImpl/RubyGosu.swg +0 -821
- data/GosuImpl/RubyGosu_SWIG_GC_PATCH.patch +0 -126
- data/GosuImpl/RubyGosu_SWIG_RENAME_PATCH.patch +0 -62
- data/GosuImpl/TextInputWin.cpp +0 -211
- data/GosuImpl/TextInputX.cpp +0 -217
- data/GosuImpl/WindowWin.cpp +0 -534
- data/GosuImpl/WindowX.cpp +0 -458
- data/README.txt +0 -25
- data/dependencies/libogg/AUTHORS +0 -4
- data/dependencies/libogg/CHANGES +0 -70
- data/dependencies/libogg/COPYING +0 -28
- data/dependencies/libogg/include/ogg/ogg.h +0 -209
- data/dependencies/libogg/include/ogg/os_types.h +0 -147
- data/dependencies/libogg/src/bitwise.c +0 -857
- data/dependencies/libogg/src/framing.c +0 -2089
- data/dependencies/libvorbis/AUTHORS +0 -3
- data/dependencies/libvorbis/CHANGES +0 -126
- data/dependencies/libvorbis/COPYING +0 -28
- data/dependencies/libvorbis/include/vorbis/codec.h +0 -243
- data/dependencies/libvorbis/include/vorbis/vorbisenc.h +0 -436
- data/dependencies/libvorbis/include/vorbis/vorbisfile.h +0 -206
- data/dependencies/libvorbis/lib/analysis.c +0 -120
- data/dependencies/libvorbis/lib/backends.h +0 -144
- data/dependencies/libvorbis/lib/barkmel.c +0 -64
- data/dependencies/libvorbis/lib/bitrate.c +0 -253
- data/dependencies/libvorbis/lib/bitrate.h +0 -59
- data/dependencies/libvorbis/lib/block.c +0 -1046
- data/dependencies/libvorbis/lib/books/coupled/res_books_51.h +0 -12257
- data/dependencies/libvorbis/lib/books/coupled/res_books_stereo.h +0 -15783
- data/dependencies/libvorbis/lib/books/floor/floor_books.h +0 -1547
- data/dependencies/libvorbis/lib/books/uncoupled/res_books_uncoupled.h +0 -7758
- data/dependencies/libvorbis/lib/codebook.c +0 -479
- data/dependencies/libvorbis/lib/codebook.h +0 -119
- data/dependencies/libvorbis/lib/codec_internal.h +0 -167
- data/dependencies/libvorbis/lib/envelope.c +0 -375
- data/dependencies/libvorbis/lib/envelope.h +0 -80
- data/dependencies/libvorbis/lib/floor0.c +0 -222
- data/dependencies/libvorbis/lib/floor1.c +0 -1099
- data/dependencies/libvorbis/lib/highlevel.h +0 -58
- data/dependencies/libvorbis/lib/info.c +0 -664
- data/dependencies/libvorbis/lib/lookup.c +0 -94
- data/dependencies/libvorbis/lib/lookup.h +0 -32
- data/dependencies/libvorbis/lib/lookup_data.h +0 -192
- data/dependencies/libvorbis/lib/lpc.c +0 -160
- data/dependencies/libvorbis/lib/lpc.h +0 -29
- data/dependencies/libvorbis/lib/lsp.c +0 -456
- data/dependencies/libvorbis/lib/lsp.h +0 -28
- data/dependencies/libvorbis/lib/mapping0.c +0 -816
- data/dependencies/libvorbis/lib/masking.h +0 -785
- data/dependencies/libvorbis/lib/mdct.c +0 -563
- data/dependencies/libvorbis/lib/mdct.h +0 -71
- data/dependencies/libvorbis/lib/misc.h +0 -57
- data/dependencies/libvorbis/lib/modes/floor_all.h +0 -260
- data/dependencies/libvorbis/lib/modes/psych_11.h +0 -51
- data/dependencies/libvorbis/lib/modes/psych_16.h +0 -133
- data/dependencies/libvorbis/lib/modes/psych_44.h +0 -642
- data/dependencies/libvorbis/lib/modes/psych_8.h +0 -101
- data/dependencies/libvorbis/lib/modes/residue_16.h +0 -163
- data/dependencies/libvorbis/lib/modes/residue_44.h +0 -292
- data/dependencies/libvorbis/lib/modes/residue_44p51.h +0 -451
- data/dependencies/libvorbis/lib/modes/residue_44u.h +0 -318
- data/dependencies/libvorbis/lib/modes/residue_8.h +0 -109
- data/dependencies/libvorbis/lib/modes/setup_11.h +0 -143
- data/dependencies/libvorbis/lib/modes/setup_16.h +0 -153
- data/dependencies/libvorbis/lib/modes/setup_22.h +0 -128
- data/dependencies/libvorbis/lib/modes/setup_32.h +0 -132
- data/dependencies/libvorbis/lib/modes/setup_44.h +0 -117
- data/dependencies/libvorbis/lib/modes/setup_44p51.h +0 -74
- data/dependencies/libvorbis/lib/modes/setup_44u.h +0 -74
- data/dependencies/libvorbis/lib/modes/setup_8.h +0 -149
- data/dependencies/libvorbis/lib/modes/setup_X.h +0 -225
- data/dependencies/libvorbis/lib/os.h +0 -186
- data/dependencies/libvorbis/lib/psy.c +0 -1203
- data/dependencies/libvorbis/lib/psy.h +0 -154
- data/dependencies/libvorbis/lib/psytune.c +0 -524
- data/dependencies/libvorbis/lib/registry.c +0 -45
- data/dependencies/libvorbis/lib/registry.h +0 -32
- data/dependencies/libvorbis/lib/res0.c +0 -889
- data/dependencies/libvorbis/lib/scales.h +0 -90
- data/dependencies/libvorbis/lib/sharedbook.c +0 -579
- data/dependencies/libvorbis/lib/smallft.c +0 -1255
- data/dependencies/libvorbis/lib/smallft.h +0 -34
- data/dependencies/libvorbis/lib/synthesis.c +0 -184
- data/dependencies/libvorbis/lib/tone.c +0 -54
- data/dependencies/libvorbis/lib/vorbisenc.c +0 -1215
- data/dependencies/libvorbis/lib/vorbisfile.c +0 -2337
- data/dependencies/libvorbis/lib/window.c +0 -2135
- data/dependencies/libvorbis/lib/window.h +0 -26
- data/dependencies/ogg_vorbis.license +0 -28
- data/reference/gosu.rb +0 -1284
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9671065f952ce2b0c1c21c05764bf32e21413839
|
4
|
+
data.tar.gz: 6bdab075165e4ee1a8d02c82c15d0d9a7bbcd2ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be621974356bc5a746bafeb2cc4da576a3cc157599fc18d6b6b47a4bb9bb39fbeff4502a4cb4b7f884441e3951b91f6d3cccb95a08a1ebcc48cc31a1b4ea2f6e
|
7
|
+
data.tar.gz: 71f034d78c7cf1b5b57d5486b856ff33c69ebfcd05dfd29d9007756d52793fe1a75ac3c324fc5e89614f34d2c3eba67d7f18a4bd82040f3bc3499e4c2d7881b2
|
data/Gosu/Buttons.hpp
CHANGED
@@ -36,16 +36,16 @@ namespace Gosu
|
|
36
36
|
kbF10 = 67,
|
37
37
|
kbF11 = 68,
|
38
38
|
kbF12 = 69,
|
39
|
-
kb0 =
|
40
|
-
kb1 =
|
41
|
-
kb2 =
|
42
|
-
kb3 =
|
43
|
-
kb4 =
|
44
|
-
kb5 =
|
45
|
-
kb6 =
|
46
|
-
kb7 =
|
47
|
-
kb8 =
|
48
|
-
kb9 =
|
39
|
+
kb0 = 39,
|
40
|
+
kb1 = 30,
|
41
|
+
kb2 = 31,
|
42
|
+
kb3 = 32,
|
43
|
+
kb4 = 33,
|
44
|
+
kb5 = 34,
|
45
|
+
kb6 = 35,
|
46
|
+
kb7 = 36,
|
47
|
+
kb8 = 37,
|
48
|
+
kb9 = 38,
|
49
49
|
kbTab = 43,
|
50
50
|
kbReturn = 40,
|
51
51
|
kbSpace = 44,
|
@@ -106,6 +106,8 @@ namespace Gosu
|
|
106
106
|
kbX = 27,
|
107
107
|
kbY = 28,
|
108
108
|
kbZ = 29,
|
109
|
+
// ` on US/UK Mac, < on EU Mac, \ in US/UK Windows
|
110
|
+
kbISO = 100,
|
109
111
|
kbNumpad0 = 98,
|
110
112
|
kbNumpad1 = 89,
|
111
113
|
kbNumpad2 = 90,
|
@@ -124,8 +126,8 @@ namespace Gosu
|
|
124
126
|
|
125
127
|
msRangeBegin,
|
126
128
|
msLeft = msRangeBegin,
|
127
|
-
msRight,
|
128
129
|
msMiddle,
|
130
|
+
msRight,
|
129
131
|
msWheelUp,
|
130
132
|
msWheelDown,
|
131
133
|
msOther0,
|
@@ -2,84 +2,71 @@
|
|
2
2
|
|
3
3
|
WINDOWS_HINTS = %w(-win32 win32- mswin mingw32)
|
4
4
|
|
5
|
-
if
|
5
|
+
if RUBY_PLATFORM =~ /mswin|mingw32|mingw64|win32\-|\-win32/ then
|
6
6
|
puts 'This gem is not meant to be installed on Windows. Instead, please use:'
|
7
7
|
puts 'gem install gosu --platform=i386-mingw32'
|
8
8
|
exit 1
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
puts '
|
13
|
-
puts '
|
14
|
-
puts
|
11
|
+
if `uname`.chomp != "Darwin" then
|
12
|
+
puts 'The Gosu gem requires some libraries to be installed system-wide.'
|
13
|
+
puts 'See the following site for a list:'
|
14
|
+
puts 'https://github.com/jlnr/gosu/wiki/Getting-Started-on-Linux'
|
15
|
+
puts
|
16
|
+
end
|
15
17
|
|
16
18
|
BASE_FILES = %w(
|
19
|
+
Bitmap/Bitmap.cpp
|
20
|
+
Bitmap/BitmapColorKey.cpp
|
21
|
+
Bitmap/BitmapUtils.cpp
|
17
22
|
DirectoriesUnix.cpp
|
18
23
|
FileUnix.cpp
|
19
|
-
Graphics/Bitmap.cpp
|
20
|
-
Graphics/BitmapColorKey.cpp
|
21
|
-
Graphics/BitmapUtils.cpp
|
22
24
|
Graphics/BlockAllocator.cpp
|
23
25
|
Graphics/Color.cpp
|
24
|
-
Graphics/Font.cpp
|
25
26
|
Graphics/Graphics.cpp
|
26
27
|
Graphics/Image.cpp
|
27
28
|
Graphics/LargeImageData.cpp
|
28
29
|
Graphics/TexChunk.cpp
|
29
|
-
Graphics/Text.cpp
|
30
30
|
Graphics/Texture.cpp
|
31
31
|
Graphics/Transform.cpp
|
32
|
-
Input.cpp
|
32
|
+
Input/Input.cpp
|
33
|
+
Input/TextInput.cpp
|
33
34
|
Inspection.cpp
|
34
35
|
IO.cpp
|
35
36
|
Math.cpp
|
36
|
-
|
37
|
+
Text/Font.cpp
|
38
|
+
Text/Text.cpp
|
37
39
|
Utility.cpp
|
38
|
-
TextInput.cpp
|
39
40
|
Window.cpp
|
40
41
|
)
|
41
42
|
|
42
43
|
MAC_FILES = %w(
|
43
44
|
Audio/AudioOpenAL.mm
|
44
|
-
|
45
|
-
|
46
|
-
|
45
|
+
Bitmap/BitmapApple.mm
|
46
|
+
Text/TextApple.mm
|
47
|
+
Text/TextMac.cpp
|
47
48
|
TimingApple.cpp
|
48
49
|
UtilityApple.mm
|
49
50
|
)
|
50
51
|
|
51
52
|
LINUX_FILES = %w(
|
52
53
|
Audio/AudioOpenAL.cpp
|
53
|
-
|
54
|
-
|
54
|
+
Bitmap/BitmapFreeImage.cpp
|
55
|
+
Text/TextUnix.cpp
|
55
56
|
TimingUnix.cpp
|
56
57
|
)
|
57
58
|
|
58
|
-
OGG_VORBIS_FILES = Dir['../dependencies/libogg/src/*.c'] +
|
59
|
-
Dir['../dependencies/libvorbis/lib/vorbisfile.c'] +
|
60
|
-
%w(analysis bitrate block codebook envelope floor0 floor1
|
61
|
-
info lookup lpc lsp mapping0 mdct psy registry res0
|
62
|
-
sharedbook smallft synthesis window).map do |basename|
|
63
|
-
"../dependencies/libvorbis/lib/#{basename}.c"
|
64
|
-
end
|
65
|
-
|
66
59
|
require 'mkmf'
|
67
60
|
require 'fileutils'
|
68
61
|
|
69
62
|
# Silence internal deprecation warnings in Gosu
|
70
63
|
$CFLAGS << " -DGOSU_DEPRECATED="
|
71
64
|
|
72
|
-
$INCFLAGS << " -I
|
65
|
+
$INCFLAGS << " -I../.. -I../../src"
|
73
66
|
|
74
67
|
if `uname`.chomp == 'Darwin' then
|
75
|
-
SOURCE_FILES = BASE_FILES + MAC_FILES
|
68
|
+
SOURCE_FILES = BASE_FILES + MAC_FILES
|
76
69
|
|
77
|
-
# Apple curiously distributes libpng only inside X11
|
78
|
-
$INCFLAGS << " -I/usr/X11/include"
|
79
|
-
# Use included libogg, libvorbis to make Gosu easier to install on OS X
|
80
|
-
$INCFLAGS << " -I../dependencies/libogg/include"
|
81
|
-
$INCFLAGS << " -I../dependencies/libvorbis/include"
|
82
|
-
$INCFLAGS << " -I../dependencies/libvorbis/lib"
|
83
70
|
# To make everything work with the Objective C runtime
|
84
71
|
$CFLAGS << " -x objective-c -DNDEBUG"
|
85
72
|
# Compile all C++ files as Objective C++ on OS X since mkmf does not support .mm
|
@@ -93,25 +80,23 @@ if `uname`.chomp == 'Darwin' then
|
|
93
80
|
# TODO: This can probably be enabled starting from 10.6?
|
94
81
|
CONFIG['CXXFLAGS'] << " -std=gnu++11"
|
95
82
|
end
|
96
|
-
$LDFLAGS << " -
|
83
|
+
$LDFLAGS << " -liconv -lSDL2 -logg -lvorbis -lvorbisfile"
|
97
84
|
%w(AudioToolbox IOKit OpenAL OpenGL AppKit ApplicationServices Foundation Carbon).each do |f|
|
98
85
|
$LDFLAGS << " -framework #{f}"
|
99
86
|
end
|
100
87
|
else
|
101
88
|
SOURCE_FILES = BASE_FILES + LINUX_FILES
|
102
89
|
|
103
|
-
|
104
|
-
|
105
|
-
if /Raspbian/ =~ `cat /etc/issue` then
|
90
|
+
if /Raspbian/ =~ `cat /etc/issue` or /BCM2708/ =~ `cat /proc/cpuinfo` then
|
106
91
|
$INCFLAGS << " -I/opt/vc/include/GLES"
|
107
92
|
$INCFLAGS << " -I/opt/vc/include"
|
108
|
-
$CFLAGS << " -DGOSU_IS_RASPBERRY_PI"
|
109
93
|
$LDFLAGS << " -L/opt/vc/lib"
|
110
94
|
$LDFLAGS << " -lGLESv1_CM"
|
111
95
|
else
|
112
96
|
pkg_config 'gl'
|
113
97
|
end
|
114
98
|
|
99
|
+
pkg_config 'sdl2'
|
115
100
|
pkg_config 'pangoft2'
|
116
101
|
pkg_config 'vorbisfile'
|
117
102
|
pkg_config 'openal'
|
@@ -122,13 +107,6 @@ else
|
|
122
107
|
have_header 'AL/al.h' if have_library('openal')
|
123
108
|
end
|
124
109
|
|
125
|
-
# Symlink our pretty gosu.so into ../lib
|
126
|
-
# TODO gosu.rb should just look in the right place.
|
127
|
-
unless File.exist? "../lib/gosu.#{RbConfig::CONFIG['DLEXT']}"
|
128
|
-
FileUtils.ln_s "../linux/gosu.#{RbConfig::CONFIG['DLEXT']}",
|
129
|
-
"../lib/gosu.#{RbConfig::CONFIG['DLEXT']}"
|
130
|
-
end
|
131
|
-
|
132
110
|
# And now it gets ridiculous (or I am overcomplicating things...):
|
133
111
|
# mkmf will compile all .c/.cpp files in this directory, but if they are nested
|
134
112
|
# inside folders, it will not find the resulting .o files during linking.
|
@@ -139,7 +117,7 @@ end
|
|
139
117
|
SOURCE_FILES.each do |file|
|
140
118
|
shim_name = file.gsub('/', '-').sub(/\.mm$/, '.cpp')
|
141
119
|
File.open(shim_name, "w") do |shim|
|
142
|
-
shim.puts "#include \"
|
120
|
+
shim.puts "#include \"../../src/#{file}\""
|
143
121
|
end
|
144
122
|
end
|
145
123
|
|
@@ -2848,7 +2848,7 @@ SWIGINTERN void Gosu_Window_translate(Gosu::Window *self,double x,double y){
|
|
2848
2848
|
* C++ director class methods
|
2849
2849
|
* --------------------------------------------------- */
|
2850
2850
|
|
2851
|
-
#include "
|
2851
|
+
#include "gosu_wrap.h"
|
2852
2852
|
|
2853
2853
|
SwigDirector_TextInput::SwigDirector_TextInput(VALUE self): Gosu::TextInput(), Swig::Director(self) {
|
2854
2854
|
|
@@ -11073,6 +11073,7 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11073
11073
|
rb_define_const(mGosu, "KbX", SWIG_From_int(static_cast< int >(Gosu::kbX)));
|
11074
11074
|
rb_define_const(mGosu, "KbY", SWIG_From_int(static_cast< int >(Gosu::kbY)));
|
11075
11075
|
rb_define_const(mGosu, "KbZ", SWIG_From_int(static_cast< int >(Gosu::kbZ)));
|
11076
|
+
rb_define_const(mGosu, "KbISO", SWIG_From_int(static_cast< int >(Gosu::kbISO)));
|
11076
11077
|
rb_define_const(mGosu, "KbNumpad0", SWIG_From_int(static_cast< int >(Gosu::kbNumpad0)));
|
11077
11078
|
rb_define_const(mGosu, "KbNumpad1", SWIG_From_int(static_cast< int >(Gosu::kbNumpad1)));
|
11078
11079
|
rb_define_const(mGosu, "KbNumpad2", SWIG_From_int(static_cast< int >(Gosu::kbNumpad2)));
|
@@ -11088,8 +11089,8 @@ SWIGEXPORT void Init_gosu(void) {
|
|
11088
11089
|
rb_define_const(mGosu, "KbNumpadMultiply", SWIG_From_int(static_cast< int >(Gosu::kbNumpadMultiply)));
|
11089
11090
|
rb_define_const(mGosu, "KbNumpadDivide", SWIG_From_int(static_cast< int >(Gosu::kbNumpadDivide)));
|
11090
11091
|
rb_define_const(mGosu, "MsLeft", SWIG_From_int(static_cast< int >(Gosu::msLeft)));
|
11091
|
-
rb_define_const(mGosu, "MsRight", SWIG_From_int(static_cast< int >(Gosu::msRight)));
|
11092
11092
|
rb_define_const(mGosu, "MsMiddle", SWIG_From_int(static_cast< int >(Gosu::msMiddle)));
|
11093
|
+
rb_define_const(mGosu, "MsRight", SWIG_From_int(static_cast< int >(Gosu::msRight)));
|
11093
11094
|
rb_define_const(mGosu, "MsWheelUp", SWIG_From_int(static_cast< int >(Gosu::msWheelUp)));
|
11094
11095
|
rb_define_const(mGosu, "MsWheelDown", SWIG_From_int(static_cast< int >(Gosu::msWheelDown)));
|
11095
11096
|
rb_define_const(mGosu, "MsOther0", SWIG_From_int(static_cast< int >(Gosu::msOther0)));
|
File without changes
|
data/lib/gosu.rb
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
require 'rbconfig'
|
2
2
|
|
3
|
-
if
|
4
|
-
|
3
|
+
if RUBY_PLATFORM =~ /mswin|mingw32|mingw64|win32\-|\-win32/ then
|
4
|
+
# Add this gem to the PATH on Windows so that DLLs can be found
|
5
5
|
ENV['PATH'] = "#{File.dirname(__FILE__)};#{ENV['PATH']}"
|
6
6
|
end
|
7
7
|
|
8
|
-
|
8
|
+
begin
|
9
|
+
RUBY_VERSION =~ /(\d+.\d+)/
|
10
|
+
require "#{$1}/gosu.#{RbConfig::CONFIG['DLEXT']}"
|
11
|
+
rescue LoadError
|
9
12
|
require "gosu.#{RbConfig::CONFIG['DLEXT']}"
|
10
|
-
elsif defined? RUBY_VERSION and RUBY_VERSION >= '1.9' then
|
11
|
-
require "gosu.for_1_9.#{RbConfig::CONFIG['DLEXT']}"
|
12
|
-
else
|
13
|
-
require "gosu.for_1_8.#{RbConfig::CONFIG['DLEXT']}"
|
14
13
|
end
|
15
14
|
|
16
15
|
require "gosu/swig_patches"
|
data/lib/gosu/zen.rb
CHANGED
@@ -24,6 +24,10 @@ module Gosu
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
+
def init &body
|
28
|
+
ZenWindow.send :define_method, :init, &body
|
29
|
+
end
|
30
|
+
|
27
31
|
def button_down id = nil, &body
|
28
32
|
m = id ? "button_down_#{id}" : :button_down_other
|
29
33
|
ZenWindow.send :define_method, m, &body
|
@@ -57,6 +61,14 @@ module Gosu
|
|
57
61
|
end
|
58
62
|
|
59
63
|
class ZenWindow < Window
|
64
|
+
def initialize *args
|
65
|
+
super
|
66
|
+
init
|
67
|
+
end
|
68
|
+
|
69
|
+
def init
|
70
|
+
end
|
71
|
+
|
60
72
|
def button_down id
|
61
73
|
m = :"button_down_#{id}"
|
62
74
|
respond_to?(m) ? send(m) : button_down_other(id)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -38,6 +38,8 @@ void Gosu::Bitmap::insert(const Bitmap& source, int x, int y)
|
|
38
38
|
void Gosu::Bitmap::insert(const Bitmap& source, int x, int y, unsigned srcX,
|
39
39
|
unsigned srcY, unsigned srcWidth, unsigned srcHeight)
|
40
40
|
{
|
41
|
+
// TODO: This should use memcpy if possible (x == 0 && srcWidth == this->width())
|
42
|
+
|
41
43
|
if (x < 0)
|
42
44
|
{
|
43
45
|
unsigned clipLeft = -x;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{GosuImpl → src}/IO.cpp
RENAMED
File without changes
|
data/{GosuImpl → src}/Iconv.hpp
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{GosuImpl → src}/Math.cpp
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|