gaminator 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +14 -8
- data/lib/gaminator/runner.rb +6 -0
- data/lib/gaminator/version.rb +1 -1
- metadata +3 -4
data/README.md
CHANGED
@@ -42,18 +42,24 @@ interface:
|
|
42
42
|
|
43
43
|
You have to define either char or texture method on each object.
|
44
44
|
|
45
|
-
|
45
|
+
Every color-capable terminal will support at least the 8 basic ANSI colors:
|
46
46
|
|
47
47
|
```
|
48
|
-
Curses::
|
49
|
-
Curses::COLOR_RED
|
50
|
-
Curses::
|
51
|
-
Curses::
|
52
|
-
Curses::
|
53
|
-
Curses::COLOR_MAGENTA
|
54
|
-
Curses::
|
48
|
+
Curses::COLOR_BLACK = 0
|
49
|
+
Curses::COLOR_RED = 1
|
50
|
+
Curses::COLOR_GREEN = 2
|
51
|
+
Curses::COLOR_YELLOW = 3
|
52
|
+
Curses::COLOR_BLUE = 4
|
53
|
+
Curses::COLOR_MAGENTA = 5
|
54
|
+
Curses::COLOR_CYAN = 6
|
55
|
+
Curses::COLOR_WHITE = 7
|
55
56
|
```
|
56
57
|
|
58
|
+
If available, gaminator initializes color pairs for the remaining additional
|
59
|
+
colors (up to 256 total) so you can literally puke 8-bit rainbows. These
|
60
|
+
color pairs are assigned the numbers 8-255, without any fancy constants defined
|
61
|
+
for them. Could YOU name 256 colors?
|
62
|
+
|
57
63
|
## Installation
|
58
64
|
|
59
65
|
Add this line to your application's Gemfile:
|
data/lib/gaminator/runner.rb
CHANGED
@@ -25,6 +25,12 @@ module Gaminator
|
|
25
25
|
init_pair(color, color, COLOR_BLACK)
|
26
26
|
end
|
27
27
|
|
28
|
+
if colors > 8
|
29
|
+
(8..colors-1).each do |color|
|
30
|
+
init_pair(color, color, COLOR_BLACK)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
@plane_width = cols
|
29
35
|
@plane_height = lines - 5
|
30
36
|
@plane = Window.new(@plane_height, @plane_width, 0, 0)
|
data/lib/gaminator/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gaminator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-03-
|
13
|
+
date: 2013-03-26 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: A simple wrapper around Curses for writing ASCII-art games
|
16
16
|
email:
|
@@ -49,9 +49,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
49
|
version: '0'
|
50
50
|
requirements: []
|
51
51
|
rubyforge_project:
|
52
|
-
rubygems_version: 1.8.
|
52
|
+
rubygems_version: 1.8.23
|
53
53
|
signing_key:
|
54
54
|
specification_version: 3
|
55
55
|
summary: See https://github.com/futuresimple/gaminator/blob/master/README.md
|
56
56
|
test_files: []
|
57
|
-
has_rdoc:
|