okami 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/okami/image.rb +5 -0
  2. data/lib/okami/window.rb +12 -7
  3. metadata +3 -3
data/lib/okami/image.rb CHANGED
@@ -28,6 +28,11 @@ class Okami::Image < Gosu::Image
28
28
  def require_tiles path, tile_width, tile_height, tileable=@tileable
29
29
  ImageTiles[ "size:#{tile_width},#{tile_height}&" + @load_path + path ] ||= load_tiles path, tile_width, tile_height, tileable
30
30
  end
31
+
32
+ def retrofy
33
+ Gosu::enable_undocumented_retrofication \
34
+ rescue puts "Unable to use Gosu::enable_undocumented_retrofication"
35
+ end
31
36
 
32
37
  end
33
38
  end
data/lib/okami/window.rb CHANGED
@@ -1,7 +1,4 @@
1
1
  module Okami
2
- def self.method_missing *args; Gosu.send *args end
3
- def self.const_missing const; Gosu.const_get const end
4
-
5
2
  class Window < Gosu::Window
6
3
  include Gosu
7
4
  include Okami
@@ -25,10 +22,18 @@ module Okami
25
22
  Okami::Keyboard.button_up id
26
23
  Okami::Mouse.button_up id
27
24
  end
28
-
29
- def retrofy
30
- Gosu::enable_undocumented_retrofication \
31
- rescue puts "Unable to use Gosu::enable_undocumented_retrofication"
25
+
26
+ def fill color, z=0
27
+ color = case color
28
+ when :white then 0xFFFFFFFF
29
+ when :black then 0xFF000000
30
+ end
31
+
32
+ draw_quad 0, 0, color,
33
+ width, 0, color,
34
+ 0, height, color,
35
+ width, height, color,
36
+ z, mode = :default
32
37
  end
33
38
 
34
39
  def calculate_dt
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okami
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-03-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gosu
16
- requirement: &70203535643060 !ruby/object:Gem::Requirement
16
+ requirement: &70206768948740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70203535643060
24
+ version_requirements: *70206768948740
25
25
  description: Gosu Interface with fancy functionality for simplicity.
26
26
  email: aerotune@gmail.com
27
27
  executables: []