gamebox 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3008b56dae9d3f599c6ea9cf087fab7eda3f7415
4
- data.tar.gz: 839970de9cdc8bf84b494b9235ab00c05c1f905a
3
+ metadata.gz: 6bc0be49028df4d4a95829f576283707724f0674
4
+ data.tar.gz: 84d355063593a23155b473a0a7cb9217515a8a1b
5
5
  SHA512:
6
- metadata.gz: 8f415885718ab713f721576793cd6a40871c65ce6a2d5fbefea48aed95f1b7819de5d9667d467d36e6c5e0918ac34b29ed7bd414728b64d62e5356873cdb854d
7
- data.tar.gz: 4016cdab6f3868066794c50aa4b52fe00df4e874ca26f816a8814a15174adce68c36cf3d80b38217e7cb837d683c9610f017e11e8c4409cbff171afa723fb96f
6
+ metadata.gz: 0a425bfc057c4ea8f29cf9c5ab8fa38b31eedbcb08e600c68f0bba971edb10a5b753b2bdf0b8231690affb4e83740846aeffb65c5fc1089f9aefdb54b6df4114
7
+ data.tar.gz: 50a526d23c43b03e7b839db373c7e72750aa099f31b73b37256106ce5ed4013a098450ad3016f1af10105e278cf1fae8b1c9c12520867db846f447749abf40f0
@@ -8,22 +8,23 @@ Behavior.define :graphical do
8
8
  requires :resource_manager
9
9
  setup do
10
10
  image = actor.do_or_do_not(:image) || resource_manager.load_actor_image(actor)
11
- image = resource_manager.load_image(image) if image.is_a? String
12
- scale = @opts[:scale] || 1
11
+ tileable = opts[:tileable] || false
12
+ image = resource_manager.load_image(image, tileable) if image.is_a? String
13
+ scale = opts[:scale] || 1
13
14
 
14
15
  actor.has_attribute :image
15
16
  actor.image = image
16
17
 
17
18
  actor.has_attributes( width: image.width,
18
19
  height: image.height,
19
- tiled: @opts[:tiled],
20
- view: @opts[:view] || :graphical_actor_view,
21
- num_x_tiles: @opts[:num_x_tiles] || 1,
22
- num_y_tiles: @opts[:num_y_tiles] || 1,
20
+ tiled: opts[:tiled],
21
+ view: opts[:view] || :graphical_actor_view,
22
+ num_x_tiles: opts[:num_x_tiles] || 1,
23
+ num_y_tiles: opts[:num_y_tiles] || 1,
23
24
  scale: scale,
24
- x_scale: @opts[:x_scale] || scale,
25
- y_scale: @opts[:y_scale] || scale,
26
- anchor: @opts[:anchor] || :center,
25
+ x_scale: opts[:x_scale] || scale,
26
+ y_scale: opts[:y_scale] || scale,
27
+ anchor: opts[:anchor] || :center,
27
28
  rotation: 0.0 )
28
29
 
29
30
  actor.when :image_changed do |old, new|
@@ -75,7 +75,7 @@ class ResourceManager
75
75
  action_imgs
76
76
  end
77
77
 
78
- def load_image(file_name)
78
+ def load_image(file_name, tileable=false)
79
79
  cached_img = @loaded_images[file_name]
80
80
  if cached_img.nil?
81
81
  begin
@@ -84,7 +84,7 @@ class ResourceManager
84
84
  #check global gamebox location
85
85
  full_name = Gamebox.configuration.gb_gfx_path + file_name
86
86
  end
87
- cached_img = Image.new(@window, full_name)
87
+ cached_img = Image.new(@window, full_name, tileable)
88
88
  rescue Exception => ex
89
89
  # log "Cannot load image #{file_name}", :warn
90
90
  end
@@ -2,7 +2,7 @@ module Gamebox
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- TINY = 4
5
+ TINY = 5
6
6
  RC = 0
7
7
 
8
8
  if RC > 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gamebox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Anderson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-01-07 00:00:00.000000000 Z
13
+ date: 2015-01-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: gosu
@@ -563,4 +563,3 @@ test_files:
563
563
  - spec/lib/class_finder_spec.rb
564
564
  - spec/lib/rect_spec.rb
565
565
  - spec/views/graphical_actor_view_spec.rb
566
- has_rdoc: