gosu 0.7.16-universal-darwin → 0.7.17-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,25 +0,0 @@
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
@@ -1,146 +0,0 @@
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
File without changes