rubypunk 0.0.0 → 0.0.1
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/ext/rubypunk/extconf.rb +7 -0
- data/ext/rubypunk/rubypunk.c +24 -0
- data/lib/rubypunk.rb +4 -2
- metadata +6 -3
@@ -0,0 +1,24 @@
|
|
1
|
+
#include <ruby.h>
|
2
|
+
#include <stdlib.h>
|
3
|
+
#include "SDL.h"
|
4
|
+
|
5
|
+
static VALUE rubypunk_start(VALUE self) {
|
6
|
+
SDL_Surface* screen = NULL;
|
7
|
+
|
8
|
+
SDL_Init(SDL_INIT_EVERYTHING);
|
9
|
+
|
10
|
+
screen = SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);
|
11
|
+
|
12
|
+
SDL_Delay(10000);
|
13
|
+
|
14
|
+
SDL_Quit();
|
15
|
+
|
16
|
+
return Qnil;
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
void Init_rubypunk(void) {
|
21
|
+
VALUE klass = rb_define_class("RubyPunk",rb_cObject);
|
22
|
+
|
23
|
+
rb_define_singleton_method(klass, "start", rubypunk_start, 0);
|
24
|
+
}
|
data/lib/rubypunk.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubypunk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -15,10 +15,13 @@ description: A 3D voxel based environment for those new to coding or ruby to exp
|
|
15
15
|
the language visually.
|
16
16
|
email: lblackburn@outlook.com
|
17
17
|
executables: []
|
18
|
-
extensions:
|
18
|
+
extensions:
|
19
|
+
- ext/rubypunk/extconf.rb
|
19
20
|
extra_rdoc_files: []
|
20
21
|
files:
|
21
22
|
- lib/rubypunk.rb
|
23
|
+
- ext/rubypunk/rubypunk.c
|
24
|
+
- ext/rubypunk/extconf.rb
|
22
25
|
homepage: http://www.loganb.me/projects/rubypunk
|
23
26
|
licenses: []
|
24
27
|
post_install_message:
|
@@ -39,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
39
42
|
version: '0'
|
40
43
|
requirements: []
|
41
44
|
rubyforge_project:
|
42
|
-
rubygems_version: 1.8.
|
45
|
+
rubygems_version: 1.8.24
|
43
46
|
signing_key:
|
44
47
|
specification_version: 3
|
45
48
|
summary: A tool for learning ruby visually
|