gosu 0.7.47.1 → 0.7.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/Gosu/ImageData.hpp +2 -1
  3. data/Gosu/Version.hpp +25 -25
  4. data/GosuImpl/Audio/ALChannelManagement.hpp +1 -1
  5. data/GosuImpl/Audio/AudioOpenAL.cpp +5 -5
  6. data/GosuImpl/Audio/AudioOpenAL.mm +1 -1
  7. data/GosuImpl/Audio/AudioToolboxFile.hpp +2 -2
  8. data/GosuImpl/Audio/OggFile.hpp +1 -1
  9. data/GosuImpl/DirectoriesMac.mm +1 -1
  10. data/GosuImpl/DirectoriesTouch.mm +1 -1
  11. data/GosuImpl/Graphics/BitmapApple.mm +1 -1
  12. data/GosuImpl/Graphics/BlockAllocator.cpp +8 -3
  13. data/GosuImpl/Graphics/BlockAllocator.hpp +2 -1
  14. data/GosuImpl/Graphics/ClipRectStack.hpp +1 -1
  15. data/GosuImpl/Graphics/DrawOp.hpp +3 -3
  16. data/GosuImpl/Graphics/DrawOpQueue.hpp +4 -4
  17. data/GosuImpl/Graphics/Font.cpp +2 -2
  18. data/GosuImpl/Graphics/GosuView.mm +2 -2
  19. data/GosuImpl/Graphics/Graphics.cpp +7 -8
  20. data/GosuImpl/Graphics/Image.cpp +3 -0
  21. data/GosuImpl/Graphics/LargeImageData.cpp +2 -2
  22. data/GosuImpl/Graphics/LargeImageData.hpp +6 -0
  23. data/GosuImpl/Graphics/Macro.hpp +7 -2
  24. data/GosuImpl/Graphics/RenderState.hpp +2 -2
  25. data/GosuImpl/Graphics/TexChunk.cpp +25 -7
  26. data/GosuImpl/Graphics/TexChunk.hpp +5 -1
  27. data/GosuImpl/Graphics/Text.cpp +2 -2
  28. data/GosuImpl/Graphics/TextTouch.mm +1 -1
  29. data/GosuImpl/Graphics/Texture.cpp +10 -7
  30. data/GosuImpl/Graphics/Texture.hpp +5 -5
  31. data/GosuImpl/Graphics/Transform.cpp +1 -1
  32. data/GosuImpl/Graphics/TransformStack.hpp +1 -1
  33. data/GosuImpl/Input/AccelerometerReader.mm +1 -1
  34. data/GosuImpl/InputMac.mm +1 -1
  35. data/GosuImpl/InputTouch.mm +3 -3
  36. data/GosuImpl/Orientation.mm +1 -1
  37. data/GosuImpl/RubyGosu.swg +6 -0
  38. data/GosuImpl/RubyGosu_wrap.cxx +87 -30
  39. data/GosuImpl/RubyGosu_wrap.h +1 -1
  40. data/GosuImpl/Sockets/CommSocket.cpp +1 -1
  41. data/GosuImpl/Sockets/ListenerSocket.cpp +1 -1
  42. data/GosuImpl/Sockets/MessageSocket.cpp +1 -1
  43. data/GosuImpl/Sockets/Socket.cpp +1 -1
  44. data/GosuImpl/Sockets/{Sockets.hpp → Socket.hpp} +0 -0
  45. data/GosuImpl/TextInputMac.mm +1 -1
  46. data/GosuImpl/Utility.cpp +1 -1
  47. data/GosuImpl/UtilityApple.mm +1 -1
  48. data/GosuImpl/WindowMac.mm +25 -14
  49. data/GosuImpl/WindowTouch.mm +2 -2
  50. data/linux/extconf.rb +35 -23
  51. data/reference/gosu.rb +142 -36
  52. metadata +3 -3
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 2.0.9
3
+ * Version 2.0.10
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
@@ -1,6 +1,6 @@
1
1
  #include <Gosu/Sockets.hpp>
2
2
  #include <Gosu/TR1.hpp>
3
- #include <GosuImpl/Sockets/Sockets.hpp>
3
+ #include "Socket.hpp"
4
4
  #include <cassert>
5
5
  #include <cstring>
6
6
  #include <stdexcept>
@@ -1,5 +1,5 @@
1
1
  #include <Gosu/Sockets.hpp>
2
- #include <GosuImpl/Sockets/Sockets.hpp>
2
+ #include "Socket.hpp"
3
3
  #include <cassert>
4
4
  #include <cstring>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #include <Gosu/Sockets.hpp>
2
- #include <GosuImpl/Sockets/Sockets.hpp>
2
+ #include "Socket.hpp"
3
3
  #include <cassert>
4
4
  #include <cstring>
5
5
  #include <vector>
@@ -1,5 +1,5 @@
1
1
  #include <Gosu/Sockets.hpp>
2
- #include <GosuImpl/Sockets/Sockets.hpp>
2
+ #include "Socket.hpp"
3
3
  #ifdef GOSU_IS_WIN
4
4
  #include <Gosu/WinUtility.hpp>
5
5
  #endif
@@ -1,6 +1,6 @@
1
1
  #include <Gosu/TextInput.hpp>
2
2
  #include <Gosu/Buttons.hpp>
3
- #include <GosuImpl/MacUtility.hpp>
3
+ #include "MacUtility.hpp"
4
4
  #include <algorithm>
5
5
  #include <vector>
6
6
  #include <wctype.h>
@@ -11,7 +11,7 @@
11
11
  #ifndef GOSU_IS_IPHONE
12
12
 
13
13
  #ifndef GOSU_IS_WIN
14
- #include <GosuImpl/Iconv.hpp>
14
+ #include "Iconv.hpp"
15
15
  #endif
16
16
  using namespace std;
17
17
 
@@ -1,6 +1,6 @@
1
1
  #include <Gosu/Utility.hpp>
2
2
  #include <Gosu/Platform.hpp>
3
- #include <GosuImpl/MacUtility.hpp>
3
+ #include "MacUtility.hpp"
4
4
  #import <Foundation/Foundation.h>
5
5
  #include <stdexcept>
6
6
  #include <vector>
@@ -2,7 +2,7 @@
2
2
  #include <Gosu/Audio.hpp>
3
3
  #include <Gosu/Graphics.hpp>
4
4
  #include <Gosu/Input.hpp>
5
- #include <GosuImpl/MacUtility.hpp>
5
+ #include "MacUtility.hpp"
6
6
  #include <Gosu/Timing.hpp>
7
7
  #include <Gosu/TR1.hpp>
8
8
  #include <Gosu/Utility.hpp>
@@ -201,6 +201,12 @@ OVERRIDE_METHOD(scrollWheel);
201
201
 
202
202
  #undef OVERRIDE_METHOD
203
203
 
204
+ #if __MAC_OS_X_VERSION_MAX_ALLOWED < 1070
205
+ @interface NSView (GosuProvideMissingMethodDeclaration)
206
+ - (NSRect)convertRectToBacking:(NSRect)aRect;
207
+ @end
208
+ #endif
209
+
204
210
  struct Gosu::Window::Impl
205
211
  {
206
212
  ObjRef<NSAutoreleasePool> pool;
@@ -219,7 +225,7 @@ struct Gosu::Window::Impl
219
225
  double interval;
220
226
  bool mouseViz;
221
227
 
222
- void createWindow(unsigned width, unsigned height)
228
+ void createWindowAndAdjustWidthHeight(unsigned& width, unsigned& height)
223
229
  {
224
230
  NSRect rect = NSMakeRect(0, 0, width, height);
225
231
  window.reset([[GosuWindow alloc] initWithContentRect:rect styleMask:windowStyleMask
@@ -227,14 +233,22 @@ struct Gosu::Window::Impl
227
233
  [window.obj() retain]; // TODO: Why?
228
234
 
229
235
  [window.obj() setContentView:[[GosuView alloc] init]];
236
+ if ([[window.obj() contentView] respondsToSelector:@selector(wantsBestResolutionOpenGLSurface)])
237
+ {
238
+ [[window.obj() contentView] setValue:[NSNumber numberWithBool:YES] forKey:@"wantsBestResolutionOpenGLSurface"];
239
+ NSRect pointRect = NSMakeRect(0, 0, width, height);
240
+ NSRect backingRect = [(id)[window.obj() contentView] convertRectToBacking:pointRect];
241
+ width = backingRect.size.width;
242
+ height = backingRect.size.height;
243
+ }
230
244
  [window.obj() center];
231
245
  }
232
246
 
233
247
  static void doTick(Window& window);
234
248
  };
235
249
 
236
- // Without this variable, the context seems to get eaten by the GC. Oh
237
- // wow, this sounds hacky and fragile. I am scared :(
250
+ // An addition for MacRuby support:
251
+ // Without this variable, the context seems to get eaten by the GC. (?)
238
252
 
239
253
  static NSOpenGLContext* context;
240
254
 
@@ -287,6 +301,7 @@ Gosu::Window::Window(unsigned width, unsigned height, bool fullscreen,
287
301
  throw std::runtime_error("Unable to create an OpenGL context with the supplied pixel format");
288
302
 
289
303
  unsigned realWidth = width, realHeight = height;
304
+ unsigned pixelWidth = width, pixelHeight = height;
290
305
 
291
306
  if (fullscreen) {
292
307
  // Fullscreen: Create no window, instead change resolution.
@@ -309,7 +324,9 @@ Gosu::Window::Window(unsigned width, unsigned height, bool fullscreen,
309
324
  else
310
325
  {
311
326
  scaleDownWindowIfNecessary(realWidth, realHeight);
312
- pimpl->createWindow(realWidth, realHeight);
327
+ pixelWidth = realWidth;
328
+ pixelHeight = realHeight;
329
+ pimpl->createWindowAndAdjustWidthHeight(pixelWidth, pixelHeight);
313
330
  // Tell context to draw on this window.
314
331
  [pimpl->context.obj() setView:[pimpl->window.obj() contentView]];
315
332
  }
@@ -318,7 +335,7 @@ Gosu::Window::Window(unsigned width, unsigned height, bool fullscreen,
318
335
 
319
336
  [pimpl->context.obj() makeCurrentContext];
320
337
 
321
- pimpl->graphics.reset(new Gosu::Graphics(realWidth, realHeight, fullscreen));
338
+ pimpl->graphics.reset(new Gosu::Graphics(pixelWidth, pixelHeight, fullscreen));
322
339
  pimpl->graphics->setResolution(width, height);
323
340
 
324
341
  pimpl->input.reset(new Input(pimpl->window.get()));
@@ -360,22 +377,16 @@ Gosu::Window::~Window()
360
377
 
361
378
  std::wstring Gosu::Window::caption() const
362
379
  {
363
- if (! pimpl->window.get())
364
- return L"";
365
-
366
380
  ObjRef<NSAutoreleasePool> pool([[NSAutoreleasePool alloc] init]);
367
- const char* utf8 = [[pimpl->window.obj() title] UTF8String];
381
+ const char* utf8 = [[pimpl->window.get() title] UTF8String];
368
382
  return utf8 ? Gosu::utf8ToWstring(utf8) : std::wstring();
369
383
  }
370
384
 
371
385
  void Gosu::Window::setCaption(const std::wstring& caption)
372
386
  {
373
- if (! pimpl->window.get())
374
- return;
375
-
376
387
  std::string utf8 = wstringToUTF8(caption);
377
388
  ObjRef<NSString> title([[NSString alloc] initWithUTF8String:utf8.c_str()]);
378
- [pimpl->window.obj() setTitle: title.obj()];
389
+ [pimpl->window.get() setTitle:title.obj()];
379
390
  }
380
391
 
381
392
  double Gosu::Window::updateInterval() const
@@ -2,8 +2,8 @@
2
2
  #include <Gosu/Graphics.hpp>
3
3
  #include <Gosu/Audio.hpp>
4
4
  #include <Gosu/Input.hpp>
5
- #include <GosuImpl/MacUtility.hpp>
6
- #include <GosuImpl/Graphics/GosuView.hpp>
5
+ #include "MacUtility.hpp"
6
+ #include "Graphics/GosuView.hpp"
7
7
 
8
8
  #import <CoreGraphics/CoreGraphics.h>
9
9
  #import <UIKit/UIKit.h>
@@ -93,36 +93,48 @@ if `uname`.chomp == 'Darwin' then
93
93
  %w(AudioToolbox IOKit OpenAL OpenGL AppKit ApplicationServices Foundation Carbon).each do |f|
94
94
  $LDFLAGS << " -framework #{f}"
95
95
  end
96
-
97
- # Symlink our pretty gosu.so into ../lib
98
- # FIXME gosu.rb should just look in the right place.
99
- FileUtils.ln_s("../linux/gosu.bundle", "../lib/gosu.bundle")
100
96
  else
101
97
  SOURCE_FILES = BASE_FILES + LINUX_FILES
102
98
 
103
- # Symlink our pretty gosu.so into ../lib
104
- # FIXME gosu.rb should just look in the right place.
105
- FileUtils.ln_s("../linux/gosu.so", "../lib/gosu.so")
106
-
107
- pkg_config("sdl")
108
- pkg_config("pangoft2")
109
- pkg_config("x11")
110
- pkg_config("xinerama")
99
+ pkg_config 'sdl'
100
+ pkg_config 'pangoft2'
101
+ pkg_config 'x11'
102
+ pkg_config 'xinerama'
111
103
 
112
- pkg_config("gl")
113
- pkg_config("vorbisfile")
114
- pkg_config("openal")
115
- pkg_config("sndfile")
104
+ pkg_config 'gl'
105
+ pkg_config 'vorbisfile'
106
+ pkg_config 'openal'
107
+ pkg_config 'sndfile'
116
108
 
117
- have_header('SDL_ttf.h') if have_library('SDL_ttf', 'TTF_RenderUTF8_Blended')
118
- have_header('FreeImage.h') if have_library('freeimage', 'FreeImage_ConvertFromRawBits')
119
- have_header('AL/al.h') if have_library('openal')
109
+ have_header 'SDL_ttf.h' if have_library('SDL_ttf', 'TTF_RenderUTF8_Blended')
110
+ have_header 'FreeImage.h' if have_library('freeimage', 'FreeImage_ConvertFromRawBits')
111
+ have_header 'AL/al.h' if have_library('openal')
112
+ end
113
+
114
+ # Symlink our pretty gosu.so into ../lib
115
+ # TODO gosu.rb should just look in the right place.
116
+ unless File.exist? "../lib/gosu.#{RbConfig::CONFIG['DLEXT']}"
117
+ FileUtils.ln_s "../linux/gosu.#{RbConfig::CONFIG['DLEXT']}",
118
+ "../lib/gosu.#{RbConfig::CONFIG['DLEXT']}"
120
119
  end
121
120
 
122
- # Copy all relevant C++ files into the current directory
123
- # FIXME Could be done by gem task instead.
121
+ # And now it gets ridiculous (or I am overcomplicating things...):
122
+ # mkmf will compile all .c/.cpp files in this directory, but if they are nested
123
+ # inside folders, it will not find the resulting .o files during linking.
124
+ # So we create a shim .c/.cpp file for each file that we want to compile, ensuring
125
+ # that all .o files are built into the current directory, without any nesting.
126
+ # TODO - would be nicer if the Rakefile would just create these shim files and
127
+ # ship them along with the gem
124
128
  SOURCE_FILES.each do |file|
125
- FileUtils.cp("../GosuImpl/#{file}", File.basename(file).sub(/\.mm$/, '.cpp'))
129
+ shim_name = File.basename(file).sub(/\.mm$/, '.cpp')
130
+ File.open(shim_name, "w") do |shim|
131
+ shim.puts "#include \"../GosuImpl/#{file}\""
132
+ end
133
+ end
134
+
135
+ if RUBY_VERSION >= '2.0.0' then
136
+ # See http://bugs.ruby-lang.org/issues/8315
137
+ CONFIG['CXXFLAGS'] = "#$CFLAGS #{CONFIG['CXXFLAGS']}"
126
138
  end
127
139
 
128
- create_makefile("gosu")
140
+ create_makefile 'gosu'
@@ -96,11 +96,32 @@ module Gosu
96
96
  KbSpace = :implementation_defined
97
97
  KbTab = :implementation_defined
98
98
  KbUp = :implementation_defined
99
+ KbBacktick = :implementation_defined
100
+ KbMinus = :implementation_defined
101
+ KbEqual = :implementation_defined
102
+ KbBracketLeft = :implementation_defined
103
+ KbBracketRight = :implementation_defined
104
+ KbBackslash = :implementation_defined
105
+ KbSemicolon = :implementation_defined
106
+ KbApostrophe = :implementation_defined
107
+ KbComma = :implementation_defined
108
+ KbPeriod = :implementation_defined
109
+ KbSlash = :implementation_defined
110
+
99
111
  MsLeft = :implementation_defined
100
112
  MsMiddle = :implementation_defined
101
113
  MsRight = :implementation_defined
102
114
  MsWheelDown = :implementation_defined
103
115
  MsWheelUp = :implementation_defined
116
+ MsOther0 = :implementation_defined
117
+ MsOther1 = :implementation_defined
118
+ MsOther2 = :implementation_defined
119
+ MsOther3 = :implementation_defined
120
+ MsOther4 = :implementation_defined
121
+ MsOther5 = :implementation_defined
122
+ MsOther6 = :implementation_defined
123
+ MsOther7 = :implementation_defined
124
+
104
125
  GpButton0 = :implementation_defined
105
126
  GpButton1 = :implementation_defined
106
127
  GpButton10 = :implementation_defined
@@ -121,6 +142,86 @@ module Gosu
121
142
  GpLeft = :implementation_defined
122
143
  GpRight = :implementation_defined
123
144
  GpUp = :implementation_defined
145
+ Gp0Button0 = :implementation_defined
146
+ Gp0Button1 = :implementation_defined
147
+ Gp0Button10 = :implementation_defined
148
+ Gp0Button11 = :implementation_defined
149
+ Gp0Button12 = :implementation_defined
150
+ Gp0Button13 = :implementation_defined
151
+ Gp0Button14 = :implementation_defined
152
+ Gp0Button15 = :implementation_defined
153
+ Gp0Button2 = :implementation_defined
154
+ Gp0Button3 = :implementation_defined
155
+ Gp0Button4 = :implementation_defined
156
+ Gp0Button5 = :implementation_defined
157
+ Gp0Button6 = :implementation_defined
158
+ Gp0Button7 = :implementation_defined
159
+ Gp0Button8 = :implementation_defined
160
+ Gp0Button9 = :implementation_defined
161
+ Gp0Down = :implementation_defined
162
+ Gp0Left = :implementation_defined
163
+ Gp0Right = :implementation_defined
164
+ Gp0Up = :implementation_defined
165
+ Gp1Button0 = :implementation_defined
166
+ Gp1Button1 = :implementation_defined
167
+ Gp1Button10 = :implementation_defined
168
+ Gp1Button11 = :implementation_defined
169
+ Gp1Button12 = :implementation_defined
170
+ Gp1Button13 = :implementation_defined
171
+ Gp1Button14 = :implementation_defined
172
+ Gp1Button15 = :implementation_defined
173
+ Gp1Button2 = :implementation_defined
174
+ Gp1Button3 = :implementation_defined
175
+ Gp1Button4 = :implementation_defined
176
+ Gp1Button5 = :implementation_defined
177
+ Gp1Button6 = :implementation_defined
178
+ Gp1Button7 = :implementation_defined
179
+ Gp1Button8 = :implementation_defined
180
+ Gp1Button9 = :implementation_defined
181
+ Gp1Down = :implementation_defined
182
+ Gp1Left = :implementation_defined
183
+ Gp1Right = :implementation_defined
184
+ Gp1Up = :implementation_defined
185
+ Gp2Button0 = :implementation_defined
186
+ Gp2Button1 = :implementation_defined
187
+ Gp2Button10 = :implementation_defined
188
+ Gp2Button11 = :implementation_defined
189
+ Gp2Button12 = :implementation_defined
190
+ Gp2Button13 = :implementation_defined
191
+ Gp2Button14 = :implementation_defined
192
+ Gp2Button15 = :implementation_defined
193
+ Gp2Button2 = :implementation_defined
194
+ Gp2Button3 = :implementation_defined
195
+ Gp2Button4 = :implementation_defined
196
+ Gp2Button5 = :implementation_defined
197
+ Gp2Button6 = :implementation_defined
198
+ Gp2Button7 = :implementation_defined
199
+ Gp2Button8 = :implementation_defined
200
+ Gp2Button9 = :implementation_defined
201
+ Gp2Down = :implementation_defined
202
+ Gp2Left = :implementation_defined
203
+ Gp2Right = :implementation_defined
204
+ Gp2Up = :implementation_defined
205
+ Gp3Button0 = :implementation_defined
206
+ Gp3Button1 = :implementation_defined
207
+ Gp3Button10 = :implementation_defined
208
+ Gp3Button11 = :implementation_defined
209
+ Gp3Button12 = :implementation_defined
210
+ Gp3Button13 = :implementation_defined
211
+ Gp3Button14 = :implementation_defined
212
+ Gp3Button15 = :implementation_defined
213
+ Gp3Button2 = :implementation_defined
214
+ Gp3Button3 = :implementation_defined
215
+ Gp3Button4 = :implementation_defined
216
+ Gp3Button5 = :implementation_defined
217
+ Gp3Button6 = :implementation_defined
218
+ Gp3Button7 = :implementation_defined
219
+ Gp3Button8 = :implementation_defined
220
+ Gp3Button9 = :implementation_defined
221
+ Gp3Down = :implementation_defined
222
+ Gp3Left = :implementation_defined
223
+ Gp3Right = :implementation_defined
224
+ Gp3Up = :implementation_defined
124
225
 
125
226
  # Represents an ARGB color value with 8 bits for each channel. Can be
126
227
  # replaced by literals of the form 0xaarrggbb in all of Gosu.
@@ -537,42 +638,47 @@ module Gosu
537
638
  class GLTexInfo
538
639
  attr_reader :tex_name, :left, :right, :top, :bottom
539
640
  end
540
-
541
- # Returns a random double between min (inclusive) and max (exclusive).
542
- def random(min, max); end
543
-
544
- # Returns the horizontal distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle.
545
- def offset_x(angle, dist); end
546
-
547
- # Returns the vertical distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle.
548
- def offset_y(angle, dist); end
549
-
550
- # Returns the angle from point 1 to point 2 in degrees, where 0.0 means upwards. Returns 0 if both points are equal.
551
- def angle(x1, y1, x2, y2); end
552
-
553
- # Returns the smallest angle that can be added to angle1 to get to angle2 (can be negative if counter-clockwise movement is shorter).
554
- def angle_diff(angle1, angle2); end
555
-
556
- # Returns the distance between two points.
557
- def distance(x1, y1, x2, y2); end
558
-
559
- # Incrementing, possibly wrapping millisecond timer.
560
- def milliseconds(); end
561
-
562
- # Returns the name of a neutral font that is available on the current
563
- # platform.
564
- def default_font_name(); end
565
-
566
- # Returns the width, in pixels, of the user's primary screen.
567
- def screen_width(); end
568
-
569
- # Returns the height, in pixels, of the user's primary screen.
570
- def screen_height(); end
571
-
572
- # Returns the user's preferred language, at the moment of calling the function. Expect return
573
- # values such as 'en_US', 'de_DE.UTF-8', 'ja', 'zh-Hans'. You can rely only on the first two letters
574
- # being a common language abbreviation.
575
- def language(); end
641
+
642
+ class << self
643
+ # Returns a random double between min (inclusive) and max (exclusive).
644
+ def random(min, max); end
645
+
646
+ # Returns the horizontal distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle.
647
+ def offset_x(angle, dist); end
648
+
649
+ # Returns the vertical distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle.
650
+ def offset_y(angle, dist); end
651
+
652
+ # Returns the angle from point 1 to point 2 in degrees, where 0.0 means upwards. Returns 0 if both points are equal.
653
+ def angle(x1, y1, x2, y2); end
654
+
655
+ # Returns the smallest angle that can be added to angle1 to get to angle2 (can be negative if counter-clockwise movement is shorter).
656
+ def angle_diff(angle1, angle2); end
657
+
658
+ # Returns the distance between two points.
659
+ def distance(x1, y1, x2, y2); end
660
+
661
+ # Incrementing, possibly wrapping millisecond timer.
662
+ def milliseconds(); end
663
+
664
+ # Return current framerate (frames per second.)
665
+ def fps(); end
666
+
667
+ # Returns the name of a neutral font that is available on the current
668
+ # platform.
669
+ def default_font_name(); end
670
+
671
+ # Returns the width, in pixels, of the user's primary screen.
672
+ def screen_width(); end
673
+
674
+ # Returns the height, in pixels, of the user's primary screen.
675
+ def screen_height(); end
676
+
677
+ # Returns the user's preferred language, at the moment of calling the function. Expect return
678
+ # values such as 'en_US', 'de_DE.UTF-8', 'ja', 'zh-Hans'. You can rely only on the first two letters
679
+ # being a common language abbreviation.
680
+ def language(); end
681
+ end
576
682
  end
577
683
 
578
684
  # Small additions to Numeric to make it easier to integrate Gosu with