dxruby_sdl 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +30 -1
- data/dxruby_sdl.gemspec +2 -2
- data/lib/dxruby_sdl/version.rb +1 -1
- data/lib/dxruby_sdl/window.rb +9 -1
- data/samples/bgm.mid +0 -0
- data/samples/sound.wav +0 -0
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82b99192a60bd7641748589be74167e21dba38c5
|
4
|
+
data.tar.gz: 9c2edce859d57617bca04d5d1a0bd7e2a419434f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aeaea9c533d458178c3e0e0ba00d0b9a88a359fec6a80987624f358a0108a8c46e8748ecf7a012c2637d3d6f08fec29f2754d1bfbb1454b0ee60749fdf7aff7
|
7
|
+
data.tar.gz: e40aed3cf377772e55ec4cc3eade1052489c3e48931ced540a597c7a1a7c67f2803d6fec49a8d28c74b7918552aa982845b604c6053193d7264782610a89dcaa
|
data/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_helper'
|
2
2
|
require "rspec/core/rake_task"
|
3
3
|
|
4
4
|
if /darwin/ =~ RUBY_PLATFORM
|
@@ -34,4 +34,33 @@ task :rubocop do
|
|
34
34
|
sh "rubocop #{files.split(/\s+/m).join(' ')}"
|
35
35
|
end
|
36
36
|
|
37
|
+
namespace :gem do
|
38
|
+
Bundler::GemHelper.install_tasks
|
39
|
+
end
|
40
|
+
|
41
|
+
task :build do
|
42
|
+
Rake::Task['gem:build'].invoke
|
43
|
+
end
|
44
|
+
|
45
|
+
task :release do
|
46
|
+
Rake::Task['gem:release'].invoke
|
47
|
+
|
48
|
+
require 'dxruby_sdl/version'
|
49
|
+
next_version = DXRubySDL::VERSION.split('.').tap { |versions|
|
50
|
+
versions[-1] = (versions[-1].to_i + 1).to_s
|
51
|
+
}.join('.')
|
52
|
+
File.open('lib/dxruby_sdl/version.rb', 'r+') do |f|
|
53
|
+
lines = []
|
54
|
+
while line = f.gets
|
55
|
+
line = "#{$1} '#{next_version}'\n" if /(\s*VERSION = )/.match(line)
|
56
|
+
lines << line
|
57
|
+
end
|
58
|
+
f.rewind
|
59
|
+
f.write(lines.join)
|
60
|
+
end
|
61
|
+
sh 'git add lib/dxruby_sdl/version.rb'
|
62
|
+
sh "git commit -m #{next_version}"
|
63
|
+
sh 'git push'
|
64
|
+
end
|
65
|
+
|
37
66
|
task :default => [:rubocop, :spec]
|
data/dxruby_sdl.gemspec
CHANGED
@@ -23,10 +23,10 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency 'rspec'
|
24
24
|
spec.add_development_dependency 'coveralls'
|
25
25
|
spec.add_development_dependency 'travis-lint'
|
26
|
-
spec.add_development_dependency 'rubocop'
|
26
|
+
spec.add_development_dependency 'rubocop', '0.15.0'
|
27
27
|
spec.add_development_dependency 'guard-rspec'
|
28
28
|
spec.add_development_dependency 'guard-rubocop'
|
29
29
|
|
30
30
|
spec.add_runtime_dependency 'rubysdl'
|
31
|
-
spec.add_runtime_dependency 'rsdl'
|
31
|
+
spec.add_runtime_dependency 'rsdl'
|
32
32
|
end
|
data/lib/dxruby_sdl/version.rb
CHANGED
data/lib/dxruby_sdl/window.rb
CHANGED
@@ -33,6 +33,14 @@ module DXRubySDL
|
|
33
33
|
FPSTimer.instance.fps = val
|
34
34
|
end
|
35
35
|
|
36
|
+
def bgcolor
|
37
|
+
@bgcolor ||= DEFAULTS[:background_color]
|
38
|
+
end
|
39
|
+
|
40
|
+
def bgcolor=(val)
|
41
|
+
@bgcolor = val
|
42
|
+
end
|
43
|
+
|
36
44
|
def loop(&block)
|
37
45
|
timer = FPSTimer.instance
|
38
46
|
timer.reset
|
@@ -48,7 +56,7 @@ module DXRubySDL
|
|
48
56
|
end
|
49
57
|
end
|
50
58
|
|
51
|
-
screen.fill_rect(0, 0, width, height,
|
59
|
+
screen.fill_rect(0, 0, width, height, bgcolor)
|
52
60
|
|
53
61
|
yield
|
54
62
|
|
data/samples/bgm.mid
CHANGED
Binary file
|
data/samples/sound.wav
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dxruby_sdl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouji Takao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: rubocop
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - '
|
87
|
+
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 0.15.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - '
|
94
|
+
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 0.15.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: guard-rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rsdl
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
description: '`dxruby-sdl` is a ruby library for 2D graphics and game. It has same
|
140
154
|
DXRuby API. It use SDL/Ruby.'
|
141
155
|
email:
|