doomfire 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -3
- data/Gemfile.lock +1 -1
- data/README.md +14 -0
- data/exe/doomfire +11 -1
- data/lib/doomfire.rb +0 -2
- data/lib/doomfire/ffi_sdl.rb +0 -1
- data/lib/doomfire/sdl.rb +4 -6
- data/lib/doomfire/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89b6b146226294362b53ab49479381e4fd58ebba7481ecfd1c8f2106ad8e1714
|
4
|
+
data.tar.gz: 9141d2f4f5ffcf4be8b4a3447db05a8b08158b916c9914184d3a48a4e26e4b21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45a8f024ba820a3aca42ae5a64e6bef4a2cb2388f17a2f7174da05d4aa56cda344dcbea2b802275569969e6110f53097d5a1d3b8fa82d1c41da405812cdcd623
|
7
|
+
data.tar.gz: 16362cf09982cc961aab53e7034c2f0060a0272539300db4a08f6583635a1030e26d9047cd723033dd13027ad869697bb3f98c675bae5b17eba7d3ff80afacdb
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,14 @@
|
|
1
|
+
# 0.3.1
|
2
|
+
|
3
|
+
- [x] Updated documentation
|
4
|
+
- [x] Switched SDL window to 320x240
|
5
|
+
- [x] Don't explode if there's no libsDL2 installed
|
6
|
+
|
1
7
|
# 0.3.0
|
2
8
|
|
3
|
-
- [
|
4
|
-
- [
|
5
|
-
- [
|
9
|
+
- [x] SDL output in progress.
|
10
|
+
- [x] Improve SDL performance
|
11
|
+
- [x] Fixed accidental bug breaking terminal/spinner output
|
6
12
|
|
7
13
|
# 0.2.0
|
8
14
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -55,6 +55,20 @@ end
|
|
55
55
|
|
56
56
|
This will run the fire in a separate thread while your rake tasks works in the main thread, and at the end of the task it will gracefully extinguish the fire and clear the terminal.
|
57
57
|
|
58
|
+
## SDL
|
59
|
+
|
60
|
+
Now with actual pixel manipulation! You can set the output to use the SDL2 library, which will put the output in a graphical window. It's a bit restricted right now to a small window and sometimes blows up, so I consider it a bit of an experiment.
|
61
|
+
|
62
|
+
You need [libSDL2](http://www.libsdl.org/download-2.0.php) installed on your system (most likely through Homebrew, apt or whatever your system uses). The doomfire executable script will complain if you don't have it.
|
63
|
+
|
64
|
+
$ brew install sdl2
|
65
|
+
|
66
|
+
Then you can run the executable:
|
67
|
+
|
68
|
+
$ doomfire --sdl
|
69
|
+
|
70
|
+
And the output should be shown in a separate window. Closing the window will end the program after a few seconds of the ending animation.
|
71
|
+
|
58
72
|
## Contributing
|
59
73
|
|
60
74
|
Bug reports and pull requests are welcome on GitHub at https://github.com/marcinruszkiewicz/doomfire.
|
data/exe/doomfire
CHANGED
@@ -21,4 +21,14 @@ OptionParser.new do |opts|
|
|
21
21
|
end
|
22
22
|
end.parse!
|
23
23
|
|
24
|
-
options[:sdl]
|
24
|
+
if options[:sdl]
|
25
|
+
begin
|
26
|
+
require 'doomfire/ffi_sdl'
|
27
|
+
require 'doomfire/sdl'
|
28
|
+
Doomfire::SDL.new.run
|
29
|
+
rescue Fiddle::DLError
|
30
|
+
puts 'You need to install libSDL2 to use the SDL output.'
|
31
|
+
end
|
32
|
+
else
|
33
|
+
Doomfire::Terminal.new.run
|
34
|
+
end
|
data/lib/doomfire.rb
CHANGED
data/lib/doomfire/ffi_sdl.rb
CHANGED
data/lib/doomfire/sdl.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'pry'
|
4
|
-
|
5
3
|
module Doomfire
|
6
4
|
# Output to a separate SDL window
|
7
5
|
class SDL < Base
|
@@ -89,14 +87,14 @@ module Doomfire
|
|
89
87
|
end
|
90
88
|
|
91
89
|
def prepare_output
|
92
|
-
@fire_width =
|
93
|
-
@fire_height =
|
90
|
+
@fire_width = 320
|
91
|
+
@fire_height = 240
|
94
92
|
|
95
93
|
FFI_SDL.SDL_Init(FFI_SDL::SDL_INIT_VIDEO)
|
96
94
|
@window = FFI_SDL.SDL_CreateWindow(
|
97
95
|
'Doomfire.rb',
|
98
|
-
FFI_SDL::
|
99
|
-
FFI_SDL::
|
96
|
+
FFI_SDL::SDL_WINDOWPOS_CENTERED,
|
97
|
+
FFI_SDL::SDL_WINDOWPOS_CENTERED,
|
100
98
|
@fire_width,
|
101
99
|
@fire_height,
|
102
100
|
FFI_SDL::SDL_WINDOW_OPENGL
|
data/lib/doomfire/version.rb
CHANGED