rubypunk 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ require 'mkmf'
2
+
3
+ $CFLAGS << " " << `sdl-config --cflags`.chomp
4
+ $LIBS << " " << `sdl-config --libs`.chomp
5
+ have_library('sdl')
6
+ create_makefile('rubypunk/rubypunk')
7
+
@@ -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
@@ -1,5 +1,7 @@
1
- class Game
2
- def self.start
1
+ require 'rubypunk/rubypunk'
2
+
3
+ class RubyPunk
4
+ def self.test
3
5
  puts "Hello World!"
4
6
  end
5
7
  end
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.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.23
45
+ rubygems_version: 1.8.24
43
46
  signing_key:
44
47
  specification_version: 3
45
48
  summary: A tool for learning ruby visually