libtcod 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile +4 -4
- data/LICENSE +21 -21
- data/README.md +81 -81
- data/Rakefile +2 -2
- data/clib/i686/SDL.dll +0 -0
- data/clib/i686/libtcod-mingw.dll +0 -0
- data/examples/python_tutorial_part_1/main.rb +58 -58
- data/examples/tile_demo/oryx_tiles.png +0 -0
- data/examples/tile_demo/tile_demo.rb +341 -0
- data/lib/libtcod.rb +10 -9
- data/lib/libtcod/bindings.rb +642 -640
- data/lib/libtcod/color_consts.rb +225 -225
- data/lib/libtcod/console.rb +80 -46
- data/lib/libtcod/consts.rb +218 -218
- data/lib/libtcod/struct.rb +34 -34
- data/lib/libtcod/system.rb +7 -0
- data/lib/libtcod/version.rb +3 -3
- data/libtcod.gemspec +21 -21
- data/test/color.rb +39 -39
- data/test/console.rb +8 -8
- data/test/helpers.rb +2 -2
- metadata +7 -2
data/lib/libtcod/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module TCOD
|
2
|
-
VERSION = "0.0.
|
3
|
-
end
|
1
|
+
module TCOD
|
2
|
+
VERSION = "0.0.3"
|
3
|
+
end
|
data/libtcod.gemspec
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
require File.expand_path('../lib/libtcod/version', __FILE__)
|
3
|
-
|
4
|
-
Gem::Specification.new do |gem|
|
5
|
-
gem.authors = ["Jaiden Mispy"]
|
6
|
-
gem.email = ["mispy@staff.draftable.com"]
|
7
|
-
gem.description = %q{Ruby bindings for the libtcod roguelike library}
|
8
|
-
gem.summary = %q{Ruby bindings for the libtcod roguelike library}
|
9
|
-
gem.homepage = ""
|
10
|
-
|
11
|
-
gem.files = `git ls-files`.split($\)
|
12
|
-
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
-
gem.name = "libtcod"
|
15
|
-
gem.require_paths = ["lib"]
|
16
|
-
gem.version = TCOD::VERSION
|
17
|
-
|
18
|
-
gem.add_development_dependency 'minitest'
|
19
|
-
|
20
|
-
gem.add_runtime_dependency 'ffi'
|
21
|
-
end
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/libtcod/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Jaiden Mispy"]
|
6
|
+
gem.email = ["mispy@staff.draftable.com"]
|
7
|
+
gem.description = %q{Ruby bindings for the libtcod roguelike library}
|
8
|
+
gem.summary = %q{Ruby bindings for the libtcod roguelike library}
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "libtcod"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = TCOD::VERSION
|
17
|
+
|
18
|
+
gem.add_development_dependency 'minitest'
|
19
|
+
|
20
|
+
gem.add_runtime_dependency 'ffi'
|
21
|
+
end
|
data/test/color.rb
CHANGED
@@ -1,39 +1,39 @@
|
|
1
|
-
require_relative 'helpers'
|
2
|
-
require 'libtcod'
|
3
|
-
require 'minitest/autorun'
|
4
|
-
|
5
|
-
class TestColor < Minitest::Test
|
6
|
-
def setup
|
7
|
-
@c1 = TCOD::Color.rgb(255,0,1)
|
8
|
-
@c2 = TCOD::Color.rgb(100,4,58)
|
9
|
-
end
|
10
|
-
|
11
|
-
def test_create_colors
|
12
|
-
c = TCOD::Color.rgb(5,5,5)
|
13
|
-
c2 = TCOD::Color.hsv(5,5,5)
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_compare_colors
|
17
|
-
c1 = TCOD::Color.rgb(2, 4, 8)
|
18
|
-
c2 = TCOD::Color.rgb(2, 4, 8)
|
19
|
-
c3 = TCOD::Color.rgb(8, 16, 32)
|
20
|
-
assert_equal c1, c2
|
21
|
-
refute_equal c1, c3
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_multiply_colors
|
25
|
-
c1 = TCOD::Color.rgb(55,100,250)
|
26
|
-
c2 = TCOD::Color.rgb(70, 130, 224)
|
27
|
-
c3 = c1 * c2
|
28
|
-
assert_equal c3, TCOD::Color.rgb(15, 50, 219)
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_multiply_colors_float
|
32
|
-
c1 = TCOD::Color.rgb(55,100,250)
|
33
|
-
c2 = c1*2
|
34
|
-
assert_equal c2, TCOD::Color.rgb(110, 200, 255)
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_adding_colors
|
38
|
-
end
|
39
|
-
end
|
1
|
+
require_relative 'helpers'
|
2
|
+
require 'libtcod'
|
3
|
+
require 'minitest/autorun'
|
4
|
+
|
5
|
+
class TestColor < Minitest::Test
|
6
|
+
def setup
|
7
|
+
@c1 = TCOD::Color.rgb(255,0,1)
|
8
|
+
@c2 = TCOD::Color.rgb(100,4,58)
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_create_colors
|
12
|
+
c = TCOD::Color.rgb(5,5,5)
|
13
|
+
c2 = TCOD::Color.hsv(5,5,5)
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_compare_colors
|
17
|
+
c1 = TCOD::Color.rgb(2, 4, 8)
|
18
|
+
c2 = TCOD::Color.rgb(2, 4, 8)
|
19
|
+
c3 = TCOD::Color.rgb(8, 16, 32)
|
20
|
+
assert_equal c1, c2
|
21
|
+
refute_equal c1, c3
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_multiply_colors
|
25
|
+
c1 = TCOD::Color.rgb(55,100,250)
|
26
|
+
c2 = TCOD::Color.rgb(70, 130, 224)
|
27
|
+
c3 = c1 * c2
|
28
|
+
assert_equal c3, TCOD::Color.rgb(15, 50, 219)
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_multiply_colors_float
|
32
|
+
c1 = TCOD::Color.rgb(55,100,250)
|
33
|
+
c2 = c1*2
|
34
|
+
assert_equal c2, TCOD::Color.rgb(110, 200, 255)
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_adding_colors
|
38
|
+
end
|
39
|
+
end
|
data/test/console.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require_relative 'helpers'
|
2
|
-
require 'libtcod'
|
3
|
-
require 'minitest/autorun'
|
4
|
-
|
5
|
-
class TestConsole < Minitest::Test
|
6
|
-
def setup
|
7
|
-
end
|
8
|
-
end
|
1
|
+
require_relative 'helpers'
|
2
|
+
require 'libtcod'
|
3
|
+
require 'minitest/autorun'
|
4
|
+
|
5
|
+
class TestConsole < Minitest::Test
|
6
|
+
def setup
|
7
|
+
end
|
8
|
+
end
|
data/test/helpers.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
2
|
-
$: << File.join(APP_ROOT, 'lib')
|
1
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
2
|
+
$: << File.join(APP_ROOT, 'lib')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libtcod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -57,17 +57,22 @@ files:
|
|
57
57
|
- Rakefile
|
58
58
|
- clib/amd64/libSDL.so
|
59
59
|
- clib/amd64/libtcod.so
|
60
|
+
- clib/i686/SDL.dll
|
60
61
|
- clib/i686/libSDL.so
|
62
|
+
- clib/i686/libtcod-mingw.dll
|
61
63
|
- clib/i686/libtcod.so
|
62
64
|
- examples/python_tutorial_part_1/arial10x10.png
|
63
65
|
- examples/python_tutorial_part_1/main.rb
|
64
66
|
- examples/python_tutorial_part_1/terminal.png
|
67
|
+
- examples/tile_demo/oryx_tiles.png
|
68
|
+
- examples/tile_demo/tile_demo.rb
|
65
69
|
- lib/libtcod.rb
|
66
70
|
- lib/libtcod/bindings.rb
|
67
71
|
- lib/libtcod/color_consts.rb
|
68
72
|
- lib/libtcod/console.rb
|
69
73
|
- lib/libtcod/consts.rb
|
70
74
|
- lib/libtcod/struct.rb
|
75
|
+
- lib/libtcod/system.rb
|
71
76
|
- lib/libtcod/version.rb
|
72
77
|
- libtcod.gemspec
|
73
78
|
- terminal.png
|