gosu 0.7.15-universal-darwin → 0.7.16-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/examples/ChipmunkIntegration.rb +7 -7
  2. data/examples/CptnRuby.rb +5 -5
  3. data/examples/OpenGLIntegration.rb +6 -6
  4. data/examples/RMagickIntegration.rb +1 -1
  5. data/examples/TextInput.rb +7 -1
  6. data/examples/Tutorial.rb +5 -5
  7. data/lib/gosu.for_1_8.bundle +0 -0
  8. data/lib/gosu.for_1_9.bundle +0 -0
  9. data/lib/gosu.rb +6 -1
  10. data/lib/gosu/patches.rb +53 -0
  11. data/lib/hotgosu.rb +59 -0
  12. data/lib/hotgosu/color.rb +43 -0
  13. data/lib/hotgosu/constants.rb +143 -0
  14. data/lib/hotgosu/font.rb +26 -0
  15. data/lib/hotgosu/functions.rb +41 -0
  16. data/lib/hotgosu/image.rb +64 -0
  17. data/lib/hotgosu/sample.rb +15 -0
  18. data/lib/hotgosu/song.rb +25 -0
  19. data/lib/hotgosu/window.rb +146 -0
  20. data/{reference/rdoc/classes/Gosu.src/M000003.html → lib/hotgosu/window_primitives.rb} +0 -0
  21. data/reference/rdoc/classes/Gosu.html +23 -3
  22. data/reference/rdoc/classes/Gosu/Color.html +127 -29
  23. data/reference/rdoc/classes/Gosu/Font.html +31 -21
  24. data/reference/rdoc/classes/Gosu/GLTexInfo.html +3 -3
  25. data/reference/rdoc/classes/Gosu/Image.html +52 -37
  26. data/reference/rdoc/classes/Gosu/Sample.html +19 -13
  27. data/reference/rdoc/classes/Gosu/SampleInstance.html +29 -19
  28. data/reference/rdoc/classes/Gosu/Song.html +41 -27
  29. data/reference/rdoc/classes/Gosu/TextInput.html +42 -3
  30. data/reference/rdoc/classes/Gosu/Window.html +102 -69
  31. data/reference/rdoc/classes/Numeric.html +7 -3
  32. data/reference/rdoc/created.rid +1 -1
  33. data/reference/rdoc/files/COPYING_txt.html +3 -3
  34. data/reference/rdoc/files/README_txt.html +3 -3
  35. data/reference/rdoc/files/reference/Deployment on OS X_rdoc.html +4 -19
  36. data/reference/rdoc/files/reference/Deployment on Windows_rdoc.html +18 -31
  37. data/reference/rdoc/files/reference/Drawing with Colors_rdoc.html +3 -3
  38. data/reference/rdoc/files/reference/Order of Corners_rdoc.html +3 -3
  39. data/reference/rdoc/files/reference/Tileability_rdoc.html +3 -3
  40. data/reference/rdoc/files/reference/Z Ordering_rdoc.html +3 -3
  41. data/reference/rdoc/files/reference/gosu_rb.html +3 -3
  42. data/reference/rdoc/fr_method_index.html +49 -48
  43. data/reference/rdoc/index.html +1 -1
  44. metadata +14 -65
  45. data/reference/rdoc/classes/Gosu.src/M000004.html +0 -0
  46. data/reference/rdoc/classes/Gosu.src/M000005.html +0 -0
  47. data/reference/rdoc/classes/Gosu.src/M000006.html +0 -0
  48. data/reference/rdoc/classes/Gosu.src/M000007.html +0 -0
  49. data/reference/rdoc/classes/Gosu.src/M000008.html +0 -0
  50. data/reference/rdoc/classes/Gosu.src/M000009.html +0 -0
  51. data/reference/rdoc/classes/Gosu.src/M000010.html +0 -0
  52. data/reference/rdoc/classes/Gosu.src/M000011.html +0 -0
  53. data/reference/rdoc/classes/Gosu.src/M000012.html +0 -0
  54. data/reference/rdoc/classes/Gosu/Color.src/M000016.html +0 -0
  55. data/reference/rdoc/classes/Gosu/Color.src/M000017.html +0 -0
  56. data/reference/rdoc/classes/Gosu/Color.src/M000018.html +0 -0
  57. data/reference/rdoc/classes/Gosu/Color.src/M000019.html +0 -0
  58. data/reference/rdoc/classes/Gosu/Font.src/M000029.html +0 -0
  59. data/reference/rdoc/classes/Gosu/Font.src/M000030.html +0 -0
  60. data/reference/rdoc/classes/Gosu/Font.src/M000031.html +0 -0
  61. data/reference/rdoc/classes/Gosu/Font.src/M000032.html +0 -0
  62. data/reference/rdoc/classes/Gosu/Font.src/M000033.html +0 -0
  63. data/reference/rdoc/classes/Gosu/Image.src/M000020.html +0 -0
  64. data/reference/rdoc/classes/Gosu/Image.src/M000021.html +0 -0
  65. data/reference/rdoc/classes/Gosu/Image.src/M000022.html +0 -0
  66. data/reference/rdoc/classes/Gosu/Image.src/M000023.html +0 -0
  67. data/reference/rdoc/classes/Gosu/Image.src/M000024.html +0 -0
  68. data/reference/rdoc/classes/Gosu/Image.src/M000025.html +0 -0
  69. data/reference/rdoc/classes/Gosu/Image.src/M000026.html +0 -0
  70. data/reference/rdoc/classes/Gosu/Image.src/M000027.html +0 -0
  71. data/reference/rdoc/classes/Gosu/Image.src/M000028.html +0 -0
  72. data/reference/rdoc/classes/Gosu/Sample.src/M000013.html +0 -0
  73. data/reference/rdoc/classes/Gosu/Sample.src/M000014.html +0 -0
  74. data/reference/rdoc/classes/Gosu/Sample.src/M000015.html +0 -0
  75. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000051.html +0 -0
  76. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000052.html +0 -0
  77. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000053.html +0 -0
  78. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000054.html +0 -0
  79. data/reference/rdoc/classes/Gosu/SampleInstance.src/M000055.html +0 -0
  80. data/reference/rdoc/classes/Gosu/Song.src/M000056.html +0 -0
  81. data/reference/rdoc/classes/Gosu/Song.src/M000057.html +0 -0
  82. data/reference/rdoc/classes/Gosu/Song.src/M000058.html +0 -0
  83. data/reference/rdoc/classes/Gosu/Song.src/M000059.html +0 -0
  84. data/reference/rdoc/classes/Gosu/Song.src/M000060.html +0 -0
  85. data/reference/rdoc/classes/Gosu/Song.src/M000061.html +0 -0
  86. data/reference/rdoc/classes/Gosu/Song.src/M000062.html +0 -0
  87. data/reference/rdoc/classes/Gosu/Window.src/M000034.html +0 -0
  88. data/reference/rdoc/classes/Gosu/Window.src/M000035.html +0 -0
  89. data/reference/rdoc/classes/Gosu/Window.src/M000036.html +0 -0
  90. data/reference/rdoc/classes/Gosu/Window.src/M000037.html +0 -0
  91. data/reference/rdoc/classes/Gosu/Window.src/M000038.html +0 -0
  92. data/reference/rdoc/classes/Gosu/Window.src/M000039.html +0 -0
  93. data/reference/rdoc/classes/Gosu/Window.src/M000040.html +0 -0
  94. data/reference/rdoc/classes/Gosu/Window.src/M000041.html +0 -0
  95. data/reference/rdoc/classes/Gosu/Window.src/M000042.html +0 -0
  96. data/reference/rdoc/classes/Gosu/Window.src/M000043.html +0 -0
  97. data/reference/rdoc/classes/Gosu/Window.src/M000044.html +0 -0
  98. data/reference/rdoc/classes/Gosu/Window.src/M000045.html +0 -0
  99. data/reference/rdoc/classes/Gosu/Window.src/M000046.html +0 -0
  100. data/reference/rdoc/classes/Gosu/Window.src/M000047.html +0 -0
  101. data/reference/rdoc/classes/Gosu/Window.src/M000048.html +0 -0
  102. data/reference/rdoc/classes/Gosu/Window.src/M000049.html +0 -0
  103. data/reference/rdoc/classes/Gosu/Window.src/M000050.html +0 -0
  104. data/reference/rdoc/classes/Numeric.src/M000001.html +0 -0
  105. data/reference/rdoc/classes/Numeric.src/M000002.html +0 -0
@@ -0,0 +1,26 @@
1
+ module Gosu
2
+ Font = ::ObjGosuFont
3
+
4
+ class Font
5
+ def self.new(window, font_name, height)
6
+ alloc.initWithWindow window, fontName: font_name, height: height
7
+ end
8
+
9
+ def text_width(text, factor_x = 1)
10
+ widthOfText(text) * factor_x
11
+ end
12
+
13
+ def draw(text, x, y, z, factor_x = 1, factor_y = 1, color = 0xffffffff, mode = :default)
14
+ drawText text, atX: x, y: y, z: z, factorX: factor_x, factorY: factor_y, color: color
15
+ # TODO mode
16
+ end
17
+
18
+ def draw_rel(text, x, y, z, rel_x, rel_y, factor_x = 1, factor_y = 1, color = 0xffffffff, mode = :default)
19
+ raise :TODO
20
+ end
21
+
22
+ def draw_rot(text, x, y, z, angle, factor_x = 1, factor_y = 1, color = 0xffffffff, mode = :default)
23
+ raise :TODO
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,41 @@
1
+ module Gosu
2
+ def self.random(min, max)
3
+ ::ObjGosu.randomFrom min, to: max
4
+ end
5
+
6
+ def self.offset_x(angle, dist)
7
+ ::ObjGosu.offsetXWithAngle angle, distance: dist
8
+ end
9
+
10
+ def self.offset_y(angle, dist)
11
+ ::ObjGosu.offsetYWithAngle angle, distance: dist
12
+ end
13
+
14
+ def self.angle(x1, y1, x2, y2, default = 0)
15
+ ::ObjGosu.angleFromX x1, y: y1, toX: x2, y: y2, default: default
16
+ end
17
+
18
+ def self.angle_diff(angle1, angle2)
19
+ ::ObjGosu.angleDiffBetween angle1, andOtherAngle: angle2
20
+ end
21
+
22
+ def self.distance(x1, y1, x2, y2)
23
+ ::ObjGosu.distanceFromX x1, y: y1, toX: x2, y: y2
24
+ end
25
+
26
+ def self.milliseconds
27
+ ::ObjGosu.milliseconds
28
+ end
29
+
30
+ def self.default_font_name
31
+ ::ObjGosu.defaultFontName
32
+ end
33
+
34
+ def self.screen_width
35
+ ::ObjGosu.screenWidth
36
+ end
37
+
38
+ def self.screen_height
39
+ ::ObjGosu.screenHeight
40
+ end
41
+ end
@@ -0,0 +1,64 @@
1
+ module Gosu
2
+ Image = ::ObjGosuImage
3
+
4
+ class Image
5
+ def self.new(*args)
6
+ case args.length
7
+ when 2..3 then
8
+ alloc.initWithWindow args[0], filename: args[1], tileable: (args[2] || false)
9
+ when 7 then
10
+ alloc.initWithWindow args[0], filename: args[1], tileable: args[2],
11
+ sourceX: src_x, sourceY: src_y, sourceWidth: src_width, sourceHeight: src_height
12
+ else
13
+ raise ArgumentError.new("wrong number of arguments (#{args.length} for 2, 3 or 7)")
14
+ end
15
+ end
16
+
17
+ def self.load_tiles(window, filename, tile_width, tile_height, tileable)
18
+ loadTilesWithWindow window, filename: filename,
19
+ tileWidth: tile_width, tileHeight: tile_height, tileable: tileable
20
+ end
21
+
22
+ def draw(x, y, z, factor_x = 1, factor_y = 1, color = 0xffffffff, mode = :default)
23
+ drawWithX x, y: y, z: z, factorX: factor_x, factorY: factor_y, color: color
24
+ # TODO mode
25
+ end
26
+
27
+ def draw_rot(x, y, z, angle, center_x = 0.5, center_y = 0.5, factor_x = 1, factor_y = 1,
28
+ color = 0xffffffff, mode = :default)
29
+ drawRotWithX x, y: y, z: z, angle: angle, centerX: center_x, centerY: center_y,
30
+ factorX: factor_x, factorY: factor_y, color: color
31
+ end
32
+ end
33
+
34
+ # # Like Window#draw_quad, but with this texture instead of colors. Can be used to implement advanced, non-rectangular drawing techniques and takes four points and the modulation color at each of them.
35
+ # # The points can be in clockwise order, or in a Z shape, starting at the top left.
36
+ # def draw_as_quad(x1, y1, c1, x2, y2, c2, x3, y3, c3, x4, y4, c4, z, mode=:default); end
37
+ #
38
+ # # Creates an Image containing a line of text.
39
+ # #
40
+ # # The text is always rendered in white. If you want to draw it in a
41
+ # # different color, just modulate it by the target color.
42
+ # # font_name:: Name of a system font, or a filename to a TTF file (must contain '/', does not work on Linux).
43
+ # # font_height:: Height of the font in pixels.
44
+ # def self.from_text(window, text, font_name, font_height); end
45
+ #
46
+ # # Creates an Image that is filled with the text given to the function.
47
+ # #
48
+ # # The text may contain line breaks.
49
+ # #
50
+ # # The text is always rendered in white. If you want to draw it in a
51
+ # # different color, just modulate it by the target color.
52
+ # # font_name:: Name of a system font, or a filename to a TTF file (must contain '/', does not work on Linux).
53
+ # # font_height:: Height of the font in pixels.
54
+ # # line_spacing:: Spacing between two lines of text in pixels.
55
+ # # max_width:: Width of the bitmap that will be returned. Text will be split into multiple lines to avoid drawing over the right border. When a single word is too long, it will be truncated.
56
+ # # align:: One of :left, :right, :center or :justify.
57
+ # def self.from_text(window, text, font_name, font_height, line_spacing, max_width, align); end
58
+ #
59
+ #
60
+ # # See examples/OpenGLIntegration.rb.
61
+ # def gl_tex_info; end
62
+ # end
63
+ #
64
+ end
@@ -0,0 +1,15 @@
1
+ module Gosu
2
+ class Sample < ::ObjGosuSample
3
+ def self.new(window, filename)
4
+ alloc.initWithWindow window, filename: filename
5
+ end
6
+
7
+ def play(vol = 1, speed = 1, looping = false)
8
+ playWithVolume vol, speed: speed, looping: looping
9
+ end
10
+
11
+ def play_pan(pan = 0, vol = 1, speed = 1, looping = false)
12
+ playWithPan pan, volume: vol, speed: speed, looping: looping
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,25 @@
1
+ module Gosu
2
+ Song = ::ObjGosuSong
3
+
4
+ class Song
5
+ def self.current_song
6
+ currentSong
7
+ end
8
+
9
+ def self.new(window, filename)
10
+ alloc.initWithWindow window, filename: filename
11
+ end
12
+
13
+ def play(looping = false)
14
+ playWithLoop looping
15
+ end
16
+
17
+ def paused?
18
+ isPaused
19
+ end
20
+
21
+ def playing?
22
+ isPlaying
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,146 @@
1
+ class Window
2
+ def _objcObject
3
+ @ref
4
+ end
5
+
6
+ def initialize(width, height, fullscreen, update_interval = 16.666666)
7
+ @ref = ::ObjGosuWindow.alloc.initWithDelegate self, width: width, height: height,
8
+ inFullscreen: fullscreen, updateInterval: update_interval
9
+ end
10
+
11
+ def caption; @ref.caption; end
12
+ def caption=(s); @ref.setCaption s; end
13
+
14
+ def show; @ref.show; end
15
+ def close; @ref.close; end
16
+
17
+ def mouse_x; @ref.mouseX; end
18
+ def mouse_y; @ref.mouseY; end
19
+
20
+ def buttonDown id
21
+ button_down id
22
+ end
23
+
24
+ def buttonUp id
25
+ button_up id
26
+ end
27
+
28
+ def button_up id; end
29
+ def button_down id; end
30
+ def draw; end
31
+ def update; end
32
+ def needs_redraw?; false; end
33
+
34
+ def button_down? id
35
+ @ref.isButtonDown id
36
+ end
37
+
38
+ # attr_accessor :caption
39
+ # attr_accessor :mouse_x
40
+ # attr_accessor :mouse_y
41
+ # attr_accessor :text_input
42
+ # attr_reader :width, :height
43
+ # attr_reader :update_interval
44
+ #
45
+ # # update_interval:: Interval in milliseconds between two calls
46
+ # # to the update member function. The default means the game will run
47
+ # # at 60 FPS, which is ideal on standard 60 Hz TFT screens.
48
+ #
49
+ # # Enters a modal loop where the Window is visible on screen and receives calls to draw, update etc.
50
+ # def show; end
51
+ #
52
+ # # Tells the window to end the current show loop as soon as possible.
53
+ # def close; end
54
+ #
55
+ # # Called every update_interval milliseconds while the window is being
56
+ # # shown. Your application's main game logic goes here.
57
+ # def update; end
58
+ #
59
+ # # Called after every update and when the OS wants the window to
60
+ # # repaint itself. Your application's rendering code goes here.
61
+ # def draw; end
62
+ #
63
+ # # Can be overriden to give the game a chance to say no to being redrawn.
64
+ # # This is not a definitive answer. The operating system can still cause
65
+ # # redraws for one reason or another.
66
+ # #
67
+ # # By default, the window is redrawn all the time (i.e. Window#needs_redraw?
68
+ # # always returns true.)
69
+ # def needs_redraw?; end
70
+ #
71
+ # # DEPRECATED.
72
+ # def set_mouse_position(x, y); end
73
+ #
74
+ # # Called before update when the user pressed a button while the
75
+ # # window had the focus.
76
+ # def button_down(id); end
77
+ # # Same as buttonDown. Called then the user released a button.
78
+ # def button_up(id); end
79
+ #
80
+ # # Draws a line from one point to another (last pixel exclusive).
81
+ # def draw_line(x1, y1, c1, x2, y2, c2, z=0, mode=:default); end
82
+ #
83
+ # def draw_triangle(x1, y1, c1, x2, y2, c2, x3, y3, c3, z=0, mode=:default); end
84
+ #
85
+ # # Draws a rectangle (two triangles) with given corners and corresponding
86
+ # # colors.
87
+ # # The points can be in clockwise order, or in a Z shape.
88
+ # def draw_quad(x1, y1, c1, x2, y2, c2, x3, y3, c3, x4, y4, c4, z=0, mode=:default); end
89
+ #
90
+ # # Returns true if a button is currently pressed. Updated every tick.
91
+ # def button_down?(id); end
92
+ #
93
+ # # DEPRECATED: Returns the character a button usually produces, or nil. Please use TextInput instead.
94
+ # def self.button_id_to_char(id); end
95
+ #
96
+ # # DEPRECATED: Returns the button that has to be pressed to produce the
97
+ # # given character, or nil. Please use TextInput instead.
98
+ # def self.char_to_button_id(char); end
99
+ #
100
+ # # See examples/OpenGLIntegration.rb.
101
+ # def gl(&custom_gl_code); end
102
+ #
103
+ # # Limits the drawing area to a given rectangle while evaluating the code inside of the block.
104
+ # def clip_to(x, y, w, h, &drawing_code); end
105
+ # end
106
+ #
107
+ # # Contains information about the underlying OpenGL texture and the u/v space used for image data.
108
+ # #
109
+ # # Can be retrieved from some images to use them in OpenGL operations. nil will be returned instead by images that are too large for a single texture.)
110
+ # #
111
+ # # See examples/OpenGLIntegration.rb.
112
+ # class GLTexInfo
113
+ # attr_reader :tex_name, :left, :right, :top, :bottom
114
+ # end
115
+ #
116
+ # # Returns a random double between min (inclusive) and max (exclusive).
117
+ # def random(min, max); end
118
+ #
119
+ # # 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.
120
+ # def offset_x(angle, dist); end
121
+ #
122
+ # # 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.
123
+ # def offset_y(angle, dist); end
124
+ #
125
+ # # Returns the angle from point 1 to point 2 in degrees, where 0.0 means upwards. Returns 0 if both points are equal.
126
+ # def angle(x1, y1, x2, y2); end
127
+ #
128
+ # # Returns the smallest angle that can be added to angle1 to get to angle2 (can be negative if counter-clockwise movement is shorter).
129
+ # def angle_diff(angle1, angle2); end
130
+ #
131
+ # # Returns the distance between two points.
132
+ # def distance(x1, y1, x2, y2); end
133
+ #
134
+ # # Incrementing, possibly wrapping millisecond timer.
135
+ # def milliseconds(); end
136
+ #
137
+ # # Returns the name of a neutral font that is available on the current
138
+ # # platform.
139
+ # def default_font_name(); end
140
+ #
141
+ # # Returns the width, in pixels, of the user's primary screen.
142
+ # def screen_width(); end
143
+ #
144
+ # # Returns the height, in pixels, of the user's primary screen.
145
+ # def screen_height(); end
146
+ end
@@ -1,4 +1,4 @@
1
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Module: Gosu</title><link type="text/css" media="screen" rel="stylesheet" href=".././rdoc-style.css"/><script type="text/javascript">
1
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Module: Gosu</title><link type="text/css" media="screen" href=".././rdoc-style.css" rel="stylesheet"/><script type="text/javascript">
2
2
  // Allison template
3
3
  // Copyright 2007, 2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file.
4
4
 
@@ -409,7 +409,7 @@ screen_width<br/>
409
409
 
410
410
 
411
411
  </div>
412
- <div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link" href="#">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_class" onKeyUp="return filterList('class', this.value, event);"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link" href="#">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_file" onKeyUp="return filterList('file', this.value, event);"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link" href="#">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_method" onKeyUp="return filterList('method', this.value, event);"></input></form></div></div></div><div id="content">
412
+ <div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a href="#" onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_class" onKeyUp="return filterList('class', this.value, event);"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a href="#" onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_file" onKeyUp="return filterList('file', this.value, event);"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a href="#" onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_method" onKeyUp="return filterList('method', this.value, event);"></input></form></div></div></div><div id="content">
413
413
 
414
414
 
415
415
 
@@ -1364,6 +1364,8 @@ Returns the <a href="Gosu.html#M000006">angle</a> from point 1 to point 2
1364
1364
  in degrees, where 0.0 means upwards. Returns 0 if both points are equal.
1365
1365
  </p>
1366
1366
 
1367
+ <p class="source_link" id="M000006-show-link"><a href="#" onclick="toggle('M000006-source'); toggleText('M000006-link'); return false;" id="M000006-link">Show source...</a></p><div class="source" id="M000006-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 458</span>
1368
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">angle</span>(<span class="ruby-identifier">x1</span>, <span class="ruby-identifier">y1</span>, <span class="ruby-identifier">x2</span>, <span class="ruby-identifier">y2</span>); <span class="ruby-keyword kw">end</span></pre></div>
1367
1369
  </div>
1368
1370
 
1369
1371
  <a class="small" name="M000007"><br/></a>
@@ -1383,6 +1385,8 @@ added to angle1 to get to angle2 (can be negative if counter-clockwise
1383
1385
  movement is shorter).
1384
1386
  </p>
1385
1387
 
1388
+ <p class="source_link" id="M000007-show-link"><a href="#" onclick="toggle('M000007-source'); toggleText('M000007-link'); return false;" id="M000007-link">Show source...</a></p><div class="source" id="M000007-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 461</span>
1389
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">angle_diff</span>(<span class="ruby-identifier">angle1</span>, <span class="ruby-identifier">angle2</span>); <span class="ruby-keyword kw">end</span></pre></div>
1386
1390
  </div>
1387
1391
 
1388
1392
  <a class="small" name="M000010"><br/></a>
@@ -1401,6 +1405,8 @@ Returns the name of a neutral font that is available on the current
1401
1405
  platform.
1402
1406
  </p>
1403
1407
 
1408
+ <p class="source_link" id="M000010-show-link"><a href="#" onclick="toggle('M000010-source'); toggleText('M000010-link'); return false;" id="M000010-link">Show source...</a></p><div class="source" id="M000010-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 471</span>
1409
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_font_name</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1404
1410
  </div>
1405
1411
 
1406
1412
  <a class="small" name="M000008"><br/></a>
@@ -1418,6 +1424,8 @@ distance
1418
1424
  Returns the <a href="Gosu.html#M000008">distance</a> between two points.
1419
1425
  </p>
1420
1426
 
1427
+ <p class="source_link" id="M000008-show-link"><a href="#" onclick="toggle('M000008-source'); toggleText('M000008-link'); return false;" id="M000008-link">Show source...</a></p><div class="source" id="M000008-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 464</span>
1428
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance</span>(<span class="ruby-identifier">x1</span>, <span class="ruby-identifier">y1</span>, <span class="ruby-identifier">x2</span>, <span class="ruby-identifier">y2</span>); <span class="ruby-keyword kw">end</span></pre></div>
1421
1429
  </div>
1422
1430
 
1423
1431
  <a class="small" name="M000009"><br/></a>
@@ -1435,6 +1443,8 @@ milliseconds
1435
1443
  Incrementing, possibly wrapping millisecond timer.
1436
1444
  </p>
1437
1445
 
1446
+ <p class="source_link" id="M000009-show-link"><a href="#" onclick="toggle('M000009-source'); toggleText('M000009-link'); return false;" id="M000009-link">Show source...</a></p><div class="source" id="M000009-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 467</span>
1447
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">milliseconds</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1438
1448
  </div>
1439
1449
 
1440
1450
  <a class="small" name="M000004"><br/></a>
@@ -1454,6 +1464,8 @@ origin and the point to which you would get if you moved radius pixels in
1454
1464
  the direction specified by <a href="Gosu.html#M000006">angle</a>.
1455
1465
  </p>
1456
1466
 
1467
+ <p class="source_link" id="M000004-show-link"><a href="#" onclick="toggle('M000004-source'); toggleText('M000004-link'); return false;" id="M000004-link">Show source...</a></p><div class="source" id="M000004-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 452</span>
1468
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">offset_x</span>(<span class="ruby-identifier">angle</span>, <span class="ruby-identifier">dist</span>); <span class="ruby-keyword kw">end</span></pre></div>
1457
1469
  </div>
1458
1470
 
1459
1471
  <a class="small" name="M000005"><br/></a>
@@ -1473,6 +1485,8 @@ origin and the point to which you would get if you moved radius pixels in
1473
1485
  the direction specified by <a href="Gosu.html#M000006">angle</a>.
1474
1486
  </p>
1475
1487
 
1488
+ <p class="source_link" id="M000005-show-link"><a href="#" onclick="toggle('M000005-source'); toggleText('M000005-link'); return false;" id="M000005-link">Show source...</a></p><div class="source" id="M000005-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 455</span>
1489
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">offset_y</span>(<span class="ruby-identifier">angle</span>, <span class="ruby-identifier">dist</span>); <span class="ruby-keyword kw">end</span></pre></div>
1476
1490
  </div>
1477
1491
 
1478
1492
  <a class="small" name="M000003"><br/></a>
@@ -1491,6 +1505,8 @@ Returns a <a href="Gosu.html#M000003">random</a> double between min
1491
1505
  (inclusive) and max (exclusive).
1492
1506
  </p>
1493
1507
 
1508
+ <p class="source_link" id="M000003-show-link"><a href="#" onclick="toggle('M000003-source'); toggleText('M000003-link'); return false;" id="M000003-link">Show source...</a></p><div class="source" id="M000003-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 449</span>
1509
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">random</span>(<span class="ruby-identifier">min</span>, <span class="ruby-identifier">max</span>); <span class="ruby-keyword kw">end</span></pre></div>
1494
1510
  </div>
1495
1511
 
1496
1512
  <a class="small" name="M000012"><br/></a>
@@ -1508,6 +1524,8 @@ screen_height
1508
1524
  Returns the height, in pixels, of the user&#8216;s primary screen.
1509
1525
  </p>
1510
1526
 
1527
+ <p class="source_link" id="M000012-show-link"><a href="#" onclick="toggle('M000012-source'); toggleText('M000012-link'); return false;" id="M000012-link">Show source...</a></p><div class="source" id="M000012-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 477</span>
1528
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">screen_height</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1511
1529
  </div>
1512
1530
 
1513
1531
  <a class="small" name="M000011"><br/></a>
@@ -1525,10 +1543,12 @@ screen_width
1525
1543
  Returns the width, in pixels, of the user&#8216;s primary screen.
1526
1544
  </p>
1527
1545
 
1546
+ <p class="source_link" id="M000011-show-link"><a href="#" onclick="toggle('M000011-source'); toggleText('M000011-link'); return false;" id="M000011-link">Show source...</a></p><div class="source" id="M000011-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 474</span>
1547
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">screen_width</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1528
1548
  </div>
1529
1549
 
1530
1550
 
1531
1551
 
1532
1552
 
1533
1553
 
1534
- </div><div class="clear" id="footer">Generated on Sep 13, 2009 / Allison 2 &copy; 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a><br/>slightly adapted for the Gosu project by Julian Raschke</div></div></body></html>
1554
+ </div><div class="clear" id="footer">Allison 2 &copy; 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a><br/>slightly adapted for the Gosu project by Julian Raschke</div></div></body></html>
@@ -1,4 +1,4 @@
1
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Class: Gosu::Color</title><link type="text/css" media="screen" rel="stylesheet" href="../.././rdoc-style.css"/><script type="text/javascript">
1
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Class: Gosu::Color</title><link type="text/css" media="screen" href="../.././rdoc-style.css" rel="stylesheet"/><script type="text/javascript">
2
2
  // Allison template
3
3
  // Copyright 2007, 2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file.
4
4
 
@@ -344,34 +344,34 @@ Object
344
344
  <div class="navigation top" id="methods"><h3>Methods</h3>
345
345
 
346
346
 
347
- <a href='#M000019'>
347
+ <a href='#M000020'>
348
348
  from_ahsv<br/>
349
349
  </a>
350
350
 
351
351
 
352
352
 
353
353
 
354
- <a href='#M000018'>
354
+ <a href='#M000019'>
355
355
  from_hsv<br/>
356
356
  </a>
357
357
 
358
358
 
359
359
 
360
360
 
361
- <a href='#M000017'>
361
+ <a href='#M000018'>
362
362
  new<br/>
363
363
  </a>
364
364
 
365
365
 
366
366
 
367
367
 
368
- <a href='#M000016'>
368
+ <a href='#M000017'>
369
369
  new<br/>
370
370
  </a>
371
371
 
372
372
 
373
373
  </div>
374
- <div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link" href="#">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_class" onKeyUp="return filterList('class', this.value, event);"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link" href="#">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_file" onKeyUp="return filterList('file', this.value, event);"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link" href="#">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_method" onKeyUp="return filterList('method', this.value, event);"></input></form></div></div></div><div id="content">
374
+ <div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a href="#" onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_class" onKeyUp="return filterList('class', this.value, event);"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a href="#" onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_file" onKeyUp="return filterList('file', this.value, event);"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a href="#" onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter:&nbsp;&nbsp;</label><input type="text" onKeyPress="return disableSubmit(event);" id="filter_method" onKeyUp="return filterList('method', this.value, event);"></input></form></div></div></div><div id="content">
375
375
  <div id="description"><p>
376
376
  Represents an ARGB color value with 8 bits for each channel. Can be
377
377
  replaced by literals of the form 0xaarrggbb in all of <a
@@ -385,6 +385,96 @@ href="../Gosu.html">Gosu</a>.
385
385
  <p></p>
386
386
 
387
387
 
388
+ <h1>Constants</h1><p><table><tr><th>Name</th><th>Value</th></tr>
389
+ <tr>
390
+ <td class="highlight">NONE</td>
391
+
392
+ <td class="normal">Gosu::Color.new(0x00000000)</td>
393
+
394
+
395
+
396
+ </tr>
397
+ <tr>
398
+ <td class="highlight">BLACK</td>
399
+
400
+ <td class="normal">Gosu::Color.new(0xff000000)</td>
401
+
402
+
403
+
404
+ </tr>
405
+ <tr>
406
+ <td class="highlight">GRAY</td>
407
+
408
+ <td class="normal">Gosu::Color.new(0xff808080)</td>
409
+
410
+
411
+
412
+ </tr>
413
+ <tr>
414
+ <td class="highlight">WHITE</td>
415
+
416
+ <td class="normal">Gosu::Color.new(0xffffffff)</td>
417
+
418
+
419
+
420
+ </tr>
421
+ <tr>
422
+ <td class="highlight">AQUA</td>
423
+
424
+ <td class="normal">Gosu::Color.new(0xff00ffff)</td>
425
+
426
+
427
+
428
+ </tr>
429
+ <tr>
430
+ <td class="highlight">RED</td>
431
+
432
+ <td class="normal">Gosu::Color.new(0xffff0000)</td>
433
+
434
+
435
+
436
+ </tr>
437
+ <tr>
438
+ <td class="highlight">GREEN</td>
439
+
440
+ <td class="normal">Gosu::Color.new(0xff00ff00)</td>
441
+
442
+
443
+
444
+ </tr>
445
+ <tr>
446
+ <td class="highlight">BLUE</td>
447
+
448
+ <td class="normal">Gosu::Color.new(0xff0000ff)</td>
449
+
450
+
451
+
452
+ </tr>
453
+ <tr>
454
+ <td class="highlight">YELLOW</td>
455
+
456
+ <td class="normal">Gosu::Color.new(0xffffff00)</td>
457
+
458
+
459
+
460
+ </tr>
461
+ <tr>
462
+ <td class="highlight">FUCHSIA</td>
463
+
464
+ <td class="normal">Gosu::Color.new(0xffff00ff)</td>
465
+
466
+
467
+
468
+ </tr>
469
+ <tr>
470
+ <td class="highlight">CYAN</td>
471
+
472
+ <td class="normal">Gosu::Color.new(0xff00ffff)</td>
473
+
474
+
475
+
476
+ </tr>
477
+ </table></p>
388
478
 
389
479
 
390
480
  <h1>Attributes</h1><p><table><tr><th>Name</th><th>Read/write?</th></tr>
@@ -450,9 +540,9 @@ href="../Gosu.html">Gosu</a>.
450
540
  <h1>Public Class Methods</h1>
451
541
 
452
542
 
453
- <a class="small" name="M000019"><br/></a>
543
+ <a class="small" name="M000020"><br/></a>
454
544
  <div class="method_block"><h3>
455
- <a href='#M000019'>
545
+ <a href='#M000020'>
456
546
 
457
547
 
458
548
  from_ahsv
@@ -479,11 +569,13 @@ Converts a HSV triple into a color, with a given alpha.
479
569
  </td></tr>
480
570
  </table>
481
571
 
572
+ <p class="source_link" id="M000020-show-link"><a href="#" onclick="toggle('M000020-source'); toggleText('M000020-link'); return false;" id="M000020-link">Show source...</a></p><div class="source" id="M000020-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 149</span>
573
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">from_ahsv</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">h</span>, <span class="ruby-identifier">s</span>, <span class="ruby-identifier">v</span>); <span class="ruby-keyword kw">end</span></pre></div>
482
574
  </div>
483
575
 
484
- <a class="small" name="M000018"><br/></a>
576
+ <a class="small" name="M000019"><br/></a>
485
577
  <div class="method_block"><h3>
486
- <a href='#M000018'>
578
+ <a href='#M000019'>
487
579
 
488
580
 
489
581
  from_hsv
@@ -494,7 +586,7 @@ from_hsv
494
586
  </h3>
495
587
  <p>
496
588
  Converts a HSV triple into a color. Same as <a
497
- href="Color.html#M000019">from_ahsv</a> with alpha set to 255.
589
+ href="Color.html#M000020">from_ahsv</a> with alpha set to 255.
498
590
  </p>
499
591
  <table>
500
592
  <tr><td valign="top">h:</td><td>Integer from 0..360
@@ -508,6 +600,27 @@ href="Color.html#M000019">from_ahsv</a> with alpha set to 255.
508
600
  </td></tr>
509
601
  </table>
510
602
 
603
+ <p class="source_link" id="M000019-show-link"><a href="#" onclick="toggle('M000019-source'); toggleText('M000019-link'); return false;" id="M000019-link">Show source...</a></p><div class="source" id="M000019-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 142</span>
604
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">from_hsv</span>(<span class="ruby-identifier">h</span>, <span class="ruby-identifier">s</span>, <span class="ruby-identifier">v</span>); <span class="ruby-keyword kw">end</span></pre></div>
605
+ </div>
606
+
607
+ <a class="small" name="M000018"><br/></a>
608
+ <div class="method_block"><h3>
609
+ <a href='#M000018'>
610
+
611
+
612
+ new
613
+
614
+ (argb)
615
+
616
+ </a>
617
+ </h3>
618
+ <p>
619
+ argb: 0xAARRGGBB integer.
620
+ </p>
621
+
622
+ <p class="source_link" id="M000018-show-link"><a href="#" onclick="toggle('M000018-source'); toggleText('M000018-link'); return false;" id="M000018-link">Show source...</a></p><div class="source" id="M000018-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 136</span>
623
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">argb</span>); <span class="ruby-keyword kw">end</span></pre></div>
511
624
  </div>
512
625
 
513
626
  <a class="small" name="M000017"><br/></a>
@@ -536,27 +649,12 @@ new
536
649
  </td></tr>
537
650
  </table>
538
651
 
539
- </div>
540
-
541
- <a class="small" name="M000016"><br/></a>
542
- <div class="method_block"><h3>
543
- <a href='#M000016'>
544
-
545
-
546
- new
547
-
548
- (argb)
549
-
550
- </a>
551
- </h3>
552
- <p>
553
- argb: 0xAARRGGBB integer.
554
- </p>
555
-
652
+ <p class="source_link" id="M000017-show-link"><a href="#" onclick="toggle('M000017-source'); toggleText('M000017-link'); return false;" id="M000017-link">Show source...</a></p><div class="source" id="M000017-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 133</span>
653
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">r</span>, <span class="ruby-identifier">g</span>, <span class="ruby-identifier">b</span>); <span class="ruby-keyword kw">end</span></pre></div>
556
654
  </div>
557
655
 
558
656
 
559
657
 
560
658
 
561
659
 
562
- </div><div class="clear" id="footer">Generated on Sep 13, 2009 / Allison 2 &copy; 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a><br/>slightly adapted for the Gosu project by Julian Raschke</div></div></body></html>
660
+ </div><div class="clear" id="footer">Allison 2 &copy; 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a><br/>slightly adapted for the Gosu project by Julian Raschke</div></div></body></html>