scottkit 0.1.0 → 0.2.0
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.
- data/README +10 -2
- data/VERSION +1 -1
- data/bin/scottkit +17 -4
- data/data/dan-and-matt.sck +1 -0
- data/lib/scottkit/play.rb +4 -0
- metadata +2 -2
data/README
CHANGED
@@ -80,7 +80,15 @@ STILL TO DO
|
|
80
80
|
|
81
81
|
CHANGES
|
82
82
|
|
83
|
-
0.
|
83
|
+
Release 0.2.0
|
84
|
+
- Add -z option to sleep after finishing -- useful when
|
85
|
+
running in a DOS Shell under Windows, so that error messages
|
86
|
+
can be seen.
|
87
|
+
- Add facility to load a game while playing using "#load"
|
84
88
|
|
85
|
-
0.
|
89
|
+
Release 0.1.0
|
90
|
+
- Add -p option to compile and play a game from source.
|
91
|
+
|
92
|
+
Release 0.0.0
|
93
|
+
- Initial release.
|
86
94
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/bin/scottkit
CHANGED
@@ -32,6 +32,8 @@ end
|
|
32
32
|
mode = :play
|
33
33
|
options = {}
|
34
34
|
compile, decompile, play_from_source = false, false, false
|
35
|
+
sleep_at_end = false
|
36
|
+
|
35
37
|
opts = OptionParser.new do |x|
|
36
38
|
x.banner = "Usage: #$0 [options] [<data-file>]"
|
37
39
|
x.on("-c", "--compile", "Compile <data-file> instead of loading") {
|
@@ -61,6 +63,9 @@ opts = OptionParser.new do |x|
|
|
61
63
|
x.on("-b", "--bug-tolerant", "Copy with out-of-range locations, etc.") {
|
62
64
|
options[:bug_tolerant] = true
|
63
65
|
}
|
66
|
+
x.on("-z", "--sleep-at-end", "Sleep for a long time after program ends") {
|
67
|
+
sleep_at_end = true
|
68
|
+
}
|
64
69
|
x.on("-W", "--no-wait", "Do not wait on pause actions or death") {
|
65
70
|
options[:no_wait] = true
|
66
71
|
}
|
@@ -89,6 +94,7 @@ rescue
|
|
89
94
|
exit 1
|
90
95
|
end
|
91
96
|
|
97
|
+
exitval = 0
|
92
98
|
game = ScottKit::Game.new(options)
|
93
99
|
case mode
|
94
100
|
when :play_from_source
|
@@ -96,15 +102,17 @@ when :play_from_source
|
|
96
102
|
withIO(nil, f) do
|
97
103
|
if !game.compile_to_stdout(ARGV[0])
|
98
104
|
$stderr.puts "#$0: compilation failed: not playing"
|
99
|
-
|
105
|
+
exitval = 1
|
100
106
|
end
|
101
107
|
end
|
102
|
-
|
103
|
-
|
108
|
+
if exitval == 0
|
109
|
+
game.load(f.string)
|
110
|
+
play(game)
|
111
|
+
end
|
104
112
|
when :compile
|
105
113
|
if !game.compile_to_stdout(ARGV[0])
|
106
114
|
$stderr.puts "#$0: compilation failed"
|
107
|
-
|
115
|
+
exitval = 1
|
108
116
|
end
|
109
117
|
when :decompile
|
110
118
|
game.load(IO.read(ARGV[0]))
|
@@ -115,3 +123,8 @@ when :play
|
|
115
123
|
game.load(IO.read(ARGV[0]))
|
116
124
|
play(game)
|
117
125
|
end
|
126
|
+
|
127
|
+
if sleep_at_end
|
128
|
+
sleep 9999
|
129
|
+
end
|
130
|
+
exit exitval
|
data/data/dan-and-matt.sck
CHANGED
data/lib/scottkit/play.rb
CHANGED