rubysdl-mswin32-1.8 2.1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/NEWS.en +280 -0
  2. data/NEWS.ja +291 -0
  3. data/README.en +118 -0
  4. data/README.en.win32 +72 -0
  5. data/README.ja +166 -0
  6. data/README.ja.win32 +80 -0
  7. data/dll/SDL.dll +0 -0
  8. data/dll/SDL_image.dll +0 -0
  9. data/dll/SDL_mixer.dll +0 -0
  10. data/dll/SDL_ttf.dll +0 -0
  11. data/dll/SGE.dll +0 -0
  12. data/dll/jpeg.dll +0 -0
  13. data/dll/libcharset-1.dll +0 -0
  14. data/dll/libfreetype-6.dll +0 -0
  15. data/dll/libiconv-2.dll +0 -0
  16. data/dll/libogg-0.dll +0 -0
  17. data/dll/libpng12-0.dll +0 -0
  18. data/dll/libtiff-3.dll +0 -0
  19. data/dll/libvorbis-0.dll +0 -0
  20. data/dll/libvorbisfile-3.dll +0 -0
  21. data/dll/smpeg.dll +0 -0
  22. data/dll/zlib1.dll +0 -0
  23. data/doc/cdrom.rd +305 -0
  24. data/doc/collision.rd +121 -0
  25. data/doc/event.rd +1090 -0
  26. data/doc/font.rd +625 -0
  27. data/doc/general.rd +60 -0
  28. data/doc/init.rd +142 -0
  29. data/doc/joystick.rd +301 -0
  30. data/doc/mixer.rd +584 -0
  31. data/doc/mpeg.rd +420 -0
  32. data/doc/opengl.rd +144 -0
  33. data/doc/rsd.rb +158 -0
  34. data/doc/sdlskk.rd +404 -0
  35. data/doc/time.rd +34 -0
  36. data/doc/video.rd +2269 -0
  37. data/doc/wm.rd +78 -0
  38. data/ext/opengl.so +0 -0
  39. data/ext/sdl.so +0 -0
  40. data/install_rubysdl.rb +30 -0
  41. data/lib/rubysdl_aliases.rb +303 -0
  42. data/lib/rubysdl_compatible_ver1.rb +243 -0
  43. data/lib/sdl.rb +224 -0
  44. data/rubysdl_doc_old.en.rd +2181 -0
  45. data/rubysdl_doc_old.rd +2402 -0
  46. data/rubysdl_ref.html +5888 -0
  47. data/rubysdl_ref.rd +6577 -0
  48. data/sample/aadraw.rb +25 -0
  49. data/sample/alpha.rb +26 -0
  50. data/sample/alphadraw.rb +25 -0
  51. data/sample/bfont.rb +24 -0
  52. data/sample/cdrom.rb +24 -0
  53. data/sample/collision.rb +97 -0
  54. data/sample/cursor.bmp +0 -0
  55. data/sample/cursor.rb +22 -0
  56. data/sample/ellipses.rb +39 -0
  57. data/sample/event2.rb +34 -0
  58. data/sample/font.bmp +0 -0
  59. data/sample/font.rb +26 -0
  60. data/sample/fpstimer.rb +175 -0
  61. data/sample/icon.bmp +0 -0
  62. data/sample/icon.bmp.gz +0 -0
  63. data/sample/icon.png +0 -0
  64. data/sample/joy2.rb +81 -0
  65. data/sample/kanji.rb +36 -0
  66. data/sample/load_from_io.rb +45 -0
  67. data/sample/movesp.rb +94 -0
  68. data/sample/playmod.rb +13 -0
  69. data/sample/plaympeg.rb +44 -0
  70. data/sample/playwave.rb +15 -0
  71. data/sample/randrect.rb +40 -0
  72. data/sample/rubysdl.rb +34 -0
  73. data/sample/sample.ttf +0 -0
  74. data/sample/sdlskk.rb +70 -0
  75. data/sample/sgetest.rb +33 -0
  76. data/sample/stetris.rb +274 -0
  77. data/sample/testgl.rb +165 -0
  78. data/sample/testsprite.rb +69 -0
  79. data/sample/transformblit.rb +42 -0
  80. metadata +135 -0
@@ -0,0 +1,69 @@
1
+ require 'sdl'
2
+
3
+ SDL.init(SDL::INIT_VIDEO)
4
+ screen = SDL::Screen.open(640, 480, 16, SDL::SWSURFACE)
5
+ SDL::WM::set_caption('testsprite.rb','testsprite.rb icon')
6
+ image = SDL::Surface.load_bmp("icon.bmp")
7
+ image.set_color_key(SDL::SRCCOLORKEY ,0)
8
+ $image = image.display_format
9
+
10
+ class Sprite
11
+ def initialize
12
+ @x=rand(640)
13
+ @y=rand(480)
14
+ @dx=rand(11)-5
15
+ @dy=rand(11)-5
16
+ end
17
+
18
+ def move
19
+ @x += @dx
20
+ if @x >= 640 then
21
+ @dx *= -1
22
+ @x = 639
23
+ end
24
+ if @x < 0 then
25
+ @dx *= -1
26
+ @x = 0
27
+ end
28
+ @y += @dy
29
+ if @y >= 480 then
30
+ @dy *= -1
31
+ @y = 479
32
+ end
33
+ @y += @dy
34
+ if @y < 0 then
35
+ @dy *= -1
36
+ @y = 0
37
+ end
38
+ end
39
+
40
+ def draw(screen)
41
+ SDL::Surface.blit($image, 0, 0, 32, 32, screen, @x, @y)
42
+ end
43
+
44
+ end
45
+
46
+ sprites = []
47
+ for i in 1..100
48
+ sprites << Sprite.new
49
+ end
50
+
51
+
52
+ while true
53
+ while event = SDL::Event.poll
54
+ case event
55
+ when SDL::Event::KeyDown, SDL::Event::Quit
56
+ exit
57
+ end
58
+ end
59
+ screen.fill_rect(0, 0, 640, 480, 0)
60
+
61
+ sprites.each {|i|
62
+ i.move
63
+ i.draw(screen)
64
+ }
65
+
66
+ screen.update_rect(0, 0, 0, 0)
67
+ end
68
+
69
+
@@ -0,0 +1,42 @@
1
+ require 'sdl'
2
+
3
+ SDL.init( SDL::INIT_VIDEO )
4
+ screen = SDL::Screen.open(640,480,16,SDL::SWSURFACE)
5
+
6
+ image = SDL::Surface.load_bmp("icon.bmp")
7
+ image.set_color_key( SDL::SRCCOLORKEY , image[0,0])
8
+ image = image.display_format
9
+
10
+ aimage = SDL::Surface.load_bmp("icon.bmp")
11
+ aimage.set_color_key( SDL::SRCCOLORKEY, aimage[0,0] )
12
+ aimage.set_alpha(SDL::SRCALPHA, 128 )
13
+ aimage = aimage.display_format
14
+
15
+ angle = 0
16
+
17
+ loop do
18
+
19
+ while event = SDL::Event.poll
20
+ case event
21
+ when SDL::Event::Quit
22
+ exit
23
+ when SDL::Event::KeyDown
24
+ exit if event.sym == SDL::Key::ESCAPE
25
+ end
26
+ end
27
+
28
+ angle += 2
29
+
30
+ screen.fill_rect(0,0,640,480,[100,100,100])
31
+
32
+ SDL::Surface.transform_draw(image,screen,angle,1,1,image.w/2,image.h/2,100,100,0 )
33
+ SDL::Surface.transform_blit(image,screen,angle,1,1,image.w/2,image.h/2,200,200,0 )
34
+
35
+ SDL::Surface.transform_draw(image,screen,angle,1,1,0,0,300,300,0 )
36
+ SDL::Surface.transform_blit(image,screen,angle,1,1,0,0,400,200,0 )
37
+
38
+ SDL::Surface.transform_blit(aimage,screen,angle,1,1,0,0,100,400,0 )
39
+
40
+ screen.update_rect(0,0,0,0)
41
+
42
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubysdl-mswin32-1.8
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Cyross Makoto
8
+ - Ippei Obayashi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2009-05-24 00:00:00 +09:00
14
+ default_executable:
15
+ dependencies: []
16
+
17
+ description: Ruby/SDL is Ruby library to use SDL
18
+ email: cyross@po.twin.ne.jp
19
+ executables: []
20
+
21
+ extensions: []
22
+
23
+ extra_rdoc_files: []
24
+
25
+ files:
26
+ - ./dll/jpeg.dll
27
+ - ./dll/libcharset-1.dll
28
+ - ./dll/libfreetype-6.dll
29
+ - ./dll/libiconv-2.dll
30
+ - ./dll/libogg-0.dll
31
+ - ./dll/libpng12-0.dll
32
+ - ./dll/libtiff-3.dll
33
+ - ./dll/libvorbis-0.dll
34
+ - ./dll/libvorbisfile-3.dll
35
+ - ./dll/SDL.dll
36
+ - ./dll/SDL_image.dll
37
+ - ./dll/SDL_mixer.dll
38
+ - ./dll/SDL_ttf.dll
39
+ - ./dll/SGE.dll
40
+ - ./dll/smpeg.dll
41
+ - ./dll/zlib1.dll
42
+ - ./doc/cdrom.rd
43
+ - ./doc/collision.rd
44
+ - ./doc/event.rd
45
+ - ./doc/font.rd
46
+ - ./doc/general.rd
47
+ - ./doc/init.rd
48
+ - ./doc/joystick.rd
49
+ - ./doc/mixer.rd
50
+ - ./doc/mpeg.rd
51
+ - ./doc/opengl.rd
52
+ - ./doc/rsd.rb
53
+ - ./doc/sdlskk.rd
54
+ - ./doc/time.rd
55
+ - ./doc/video.rd
56
+ - ./doc/wm.rd
57
+ - ./ext/opengl.so
58
+ - ./ext/sdl.so
59
+ - ./install_rubysdl.rb
60
+ - ./lib/rubysdl_aliases.rb
61
+ - ./lib/rubysdl_compatible_ver1.rb
62
+ - ./lib/sdl.rb
63
+ - ./NEWS.en
64
+ - ./NEWS.ja
65
+ - ./README.en
66
+ - ./README.en.win32
67
+ - ./README.ja
68
+ - ./README.ja.win32
69
+ - ./rubysdl_doc_old.en.rd
70
+ - ./rubysdl_doc_old.rd
71
+ - ./rubysdl_ref.html
72
+ - ./rubysdl_ref.rd
73
+ - ./sample/aadraw.rb
74
+ - ./sample/alpha.rb
75
+ - ./sample/alphadraw.rb
76
+ - ./sample/bfont.rb
77
+ - ./sample/cdrom.rb
78
+ - ./sample/collision.rb
79
+ - ./sample/cursor.bmp
80
+ - ./sample/cursor.rb
81
+ - ./sample/ellipses.rb
82
+ - ./sample/event2.rb
83
+ - ./sample/font.bmp
84
+ - ./sample/font.rb
85
+ - ./sample/fpstimer.rb
86
+ - ./sample/icon.bmp
87
+ - ./sample/icon.bmp.gz
88
+ - ./sample/icon.png
89
+ - ./sample/joy2.rb
90
+ - ./sample/kanji.rb
91
+ - ./sample/load_from_io.rb
92
+ - ./sample/movesp.rb
93
+ - ./sample/playmod.rb
94
+ - ./sample/plaympeg.rb
95
+ - ./sample/playwave.rb
96
+ - ./sample/randrect.rb
97
+ - ./sample/sample.ttf
98
+ - ./sample/rubysdl.rb
99
+ - ./sample/sdlskk.rb
100
+ - ./sample/sgetest.rb
101
+ - ./sample/stetris.rb
102
+ - ./sample/testgl.rb
103
+ - ./sample/testsprite.rb
104
+ - ./sample/transformblit.rb
105
+ has_rdoc: true
106
+ homepage: http://www.kmc.gr.jp/~ohai/rubysdl.html
107
+ licenses: []
108
+
109
+ post_install_message:
110
+ rdoc_options:
111
+ - -c utf-8
112
+ require_paths:
113
+ - lib
114
+ - ext
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 1.8.0
120
+ version:
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: "0"
126
+ version:
127
+ requirements: []
128
+
129
+ rubyforge_project:
130
+ rubygems_version: 1.3.2
131
+ signing_key:
132
+ specification_version: 3
133
+ summary: SDL wrapper library for Ruby
134
+ test_files: []
135
+