smalruby 0.0.20-x86-mingw32 → 0.0.21-x86-mingw32
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.
Potentially problematic release.
This version of smalruby might be problematic. Click here for more details.
- checksums.yaml +4 -4
 - data/assets/ryu1.png +0 -0
 - data/assets/ryu2.png +0 -0
 - data/assets/taichi1.png +0 -0
 - data/assets/taichi2.png +0 -0
 - data/lib/smalruby/character.rb +20 -8
 - data/lib/smalruby/version.rb +1 -1
 - data/samples/car.rb +1 -2
 - data/smalruby.gemspec +1 -1
 - metadata +6 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 011780bbacc86925ec636a2f6457cfce411df6c9
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 836f8929844613b04593a2ead72db15b22295b97
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 92587434753211c565f1ea77fe98defb12fbf54d88d1a29bd4e9754f9408752340de58219b61363a42cfe5e11bd6cb7ada13248aac0b981981d762bf622658bb
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 26c79258c0d5757e0666e51b339cf9646d56333ce2f3d3b23cca2f9c6060a03a768ec2e7c71323e74b391c925b99a070b7c55129e9d8a5c161ae02dc796fc587
         
     | 
    
        data/assets/ryu1.png
    ADDED
    
    | 
         Binary file 
     | 
    
        data/assets/ryu2.png
    ADDED
    
    | 
         Binary file 
     | 
    
        data/assets/taichi1.png
    ADDED
    
    | 
         Binary file 
     | 
    
        data/assets/taichi2.png
    ADDED
    
    | 
         Binary file 
     | 
    
        data/lib/smalruby/character.rb
    CHANGED
    
    | 
         @@ -22,7 +22,8 @@ module Smalruby 
     | 
|
| 
       22 
22 
     | 
    
         
             
                attr_accessor :event_handlers
         
     | 
| 
       23 
23 
     | 
    
         
             
                attr_accessor :threads
         
     | 
| 
       24 
24 
     | 
    
         
             
                attr_accessor :checking_hit_targets
         
     | 
| 
       25 
     | 
    
         
            -
                attr_accessor : 
     | 
| 
      
 25 
     | 
    
         
            +
                attr_accessor :costumes
         
     | 
| 
      
 26 
     | 
    
         
            +
                attr_accessor :costume_index
         
     | 
| 
       26 
27 
     | 
    
         
             
                attr_reader :rotation_style
         
     | 
| 
       27 
28 
     | 
    
         | 
| 
       28 
29 
     | 
    
         
             
                def initialize(option = {})
         
     | 
| 
         @@ -36,11 +37,11 @@ module Smalruby 
     | 
|
| 
       36 
37 
     | 
    
         
             
                  }
         
     | 
| 
       37 
38 
     | 
    
         
             
                  opt = process_optional_arguments(option, defaults)
         
     | 
| 
       38 
39 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
                   
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
                   
     | 
| 
       43 
     | 
    
         
            -
                  super(opt[:x], opt[:y],  
     | 
| 
      
 40 
     | 
    
         
            +
                  @costumes = [opt[:costume]].flatten.compact.map { |costume|
         
     | 
| 
      
 41 
     | 
    
         
            +
                    costume.is_a?(String) ? Image.load(asset_path(costume)) : costume
         
     | 
| 
      
 42 
     | 
    
         
            +
                  }
         
     | 
| 
      
 43 
     | 
    
         
            +
                  @costume_index = 0
         
     | 
| 
      
 44 
     | 
    
         
            +
                  super(opt[:x], opt[:y], @costumes[@costume_index])
         
     | 
| 
       44 
45 
     | 
    
         | 
| 
       45 
46 
     | 
    
         
             
                  @event_handlers = {}
         
     | 
| 
       46 
47 
     | 
    
         
             
                  @threads = []
         
     | 
| 
         @@ -57,10 +58,10 @@ module Smalruby 
     | 
|
| 
       57 
58 
     | 
    
         
             
                    end
         
     | 
| 
       58 
59 
     | 
    
         
             
                  end
         
     | 
| 
       59 
60 
     | 
    
         | 
| 
       60 
     | 
    
         
            -
                  self.angle = opt[:angle] if opt[:angle] != 0
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
61 
     | 
    
         
             
                  self.rotation_style = opt[:rotation_style]
         
     | 
| 
       63 
62 
     | 
    
         | 
| 
      
 63 
     | 
    
         
            +
                  self.angle = opt[:angle] if opt[:angle] != 0
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
       64 
65 
     | 
    
         
             
                  # HACK: Windows XP SP3の環境でワーカースレッドで音声を読み込めな
         
     | 
| 
       65 
66 
     | 
    
         
             
                  # い不具合が発生した。このためメインスレッドでプリロードしておく。
         
     | 
| 
       66 
67 
     | 
    
         
             
                  %w(do re mi fa so ra si do_2).each do |n|
         
     | 
| 
         @@ -147,6 +148,10 @@ module Smalruby 
     | 
|
| 
       147 
148 
     | 
    
         
             
                    else
         
     | 
| 
       148 
149 
     | 
    
         
             
                      self.scale_x = -1
         
     | 
| 
       149 
150 
     | 
    
         
             
                    end
         
     | 
| 
      
 151 
     | 
    
         
            +
                    super(0)
         
     | 
| 
      
 152 
     | 
    
         
            +
                  else
         
     | 
| 
      
 153 
     | 
    
         
            +
                    self.scale_x = 1
         
     | 
| 
      
 154 
     | 
    
         
            +
                    super(0)
         
     | 
| 
       150 
155 
     | 
    
         
             
                  end
         
     | 
| 
       151 
156 
     | 
    
         
             
                end
         
     | 
| 
       152 
157 
     | 
    
         | 
| 
         @@ -209,6 +214,13 @@ module Smalruby 
     | 
|
| 
       209 
214 
     | 
    
         
             
                  @balloon = Sprite.new(self.x, self.y, image)
         
     | 
| 
       210 
215 
     | 
    
         
             
                end
         
     | 
| 
       211 
216 
     | 
    
         | 
| 
      
 217 
     | 
    
         
            +
                # 次のコスチュームにする
         
     | 
| 
      
 218 
     | 
    
         
            +
                def next_costume
         
     | 
| 
      
 219 
     | 
    
         
            +
                  @costume_index += 1
         
     | 
| 
      
 220 
     | 
    
         
            +
                  @costume_index = @costume_index % @costumes.length
         
     | 
| 
      
 221 
     | 
    
         
            +
                  self.image = @costumes[@costume_index]
         
     | 
| 
      
 222 
     | 
    
         
            +
                end
         
     | 
| 
      
 223 
     | 
    
         
            +
             
     | 
| 
       212 
224 
     | 
    
         
             
                # @!endgroup
         
     | 
| 
       213 
225 
     | 
    
         | 
| 
       214 
226 
     | 
    
         
             
                # @!group 調べる
         
     | 
    
        data/lib/smalruby/version.rb
    CHANGED
    
    
    
        data/samples/car.rb
    CHANGED
    
    
    
        data/smalruby.gemspec
    CHANGED
    
    | 
         @@ -40,7 +40,7 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       40 
40 
     | 
    
         
             
              if is_windows
         
     | 
| 
       41 
41 
     | 
    
         
             
                spec.add_runtime_dependency 'dxruby', '1.4.0'
         
     | 
| 
       42 
42 
     | 
    
         
             
              else
         
     | 
| 
       43 
     | 
    
         
            -
                spec.add_runtime_dependency 'dxruby_sdl', '~> 0.0. 
     | 
| 
      
 43 
     | 
    
         
            +
                spec.add_runtime_dependency 'dxruby_sdl', '~> 0.0.8'
         
     | 
| 
       44 
44 
     | 
    
         
             
              end
         
     | 
| 
       45 
45 
     | 
    
         
             
              spec.add_runtime_dependency 'dino', '~> 0.11.2'
         
     | 
| 
       46 
46 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: smalruby
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.21
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: x86-mingw32
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Kouji Takao
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-05- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-05-16 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -245,6 +245,10 @@ files: 
     | 
|
| 
       245 
245 
     | 
    
         
             
            - assets/piano_re.wav
         
     | 
| 
       246 
246 
     | 
    
         
             
            - assets/piano_si.wav
         
     | 
| 
       247 
247 
     | 
    
         
             
            - assets/piano_so.wav
         
     | 
| 
      
 248 
     | 
    
         
            +
            - assets/ryu1.png
         
     | 
| 
      
 249 
     | 
    
         
            +
            - assets/ryu2.png
         
     | 
| 
      
 250 
     | 
    
         
            +
            - assets/taichi1.png
         
     | 
| 
      
 251 
     | 
    
         
            +
            - assets/taichi2.png
         
     | 
| 
       248 
252 
     | 
    
         
             
            - lib/smalruby.rb
         
     | 
| 
       249 
253 
     | 
    
         
             
            - lib/smalruby/canvas.rb
         
     | 
| 
       250 
254 
     | 
    
         
             
            - lib/smalruby/character.rb
         
     |