rubysdl-mswin32-1.9 2.1.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.
Files changed (81) 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 +77 -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 +24 -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/caption.rb +21 -0
  53. data/sample/cdrom.rb +24 -0
  54. data/sample/collision.rb +97 -0
  55. data/sample/cursor.bmp +0 -0
  56. data/sample/cursor.rb +22 -0
  57. data/sample/ellipses.rb +39 -0
  58. data/sample/event2.rb +34 -0
  59. data/sample/font.bmp +0 -0
  60. data/sample/font.rb +26 -0
  61. data/sample/fpstimer.rb +175 -0
  62. data/sample/icon.bmp +0 -0
  63. data/sample/icon.bmp.gz +0 -0
  64. data/sample/icon.png +0 -0
  65. data/sample/joy2.rb +81 -0
  66. data/sample/kanji.rb +36 -0
  67. data/sample/load_from_io.rb +45 -0
  68. data/sample/movesp.rb +94 -0
  69. data/sample/playmod.rb +13 -0
  70. data/sample/plaympeg.rb +44 -0
  71. data/sample/playwave.rb +15 -0
  72. data/sample/randrect.rb +40 -0
  73. data/sample/sample.ttf +0 -0
  74. data/sample/sdl.rb +33 -0
  75. data/sample/sdlskk.rb +70 -0
  76. data/sample/sgetest.rb +33 -0
  77. data/sample/stetris.rb +274 -0
  78. data/sample/testgl.rb +165 -0
  79. data/sample/testsprite.rb +69 -0
  80. data/sample/transformblit.rb +42 -0
  81. metadata +134 -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,134 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubysdl-mswin32-1.9
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Cyross Makoto
8
+ - Ippei Obayashi
9
+ autorequire:
10
+ bindir: dll
11
+ cert_chain: []
12
+
13
+ date: 2009-04-27 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/caption.rb
78
+ - ./sample/cdrom.rb
79
+ - ./sample/collision.rb
80
+ - ./sample/cursor.bmp
81
+ - ./sample/cursor.rb
82
+ - ./sample/ellipses.rb
83
+ - ./sample/event2.rb
84
+ - ./sample/font.bmp
85
+ - ./sample/font.rb
86
+ - ./sample/fpstimer.rb
87
+ - ./sample/icon.bmp
88
+ - ./sample/icon.bmp.gz
89
+ - ./sample/icon.png
90
+ - ./sample/joy2.rb
91
+ - ./sample/kanji.rb
92
+ - ./sample/load_from_io.rb
93
+ - ./sample/movesp.rb
94
+ - ./sample/playmod.rb
95
+ - ./sample/plaympeg.rb
96
+ - ./sample/playwave.rb
97
+ - ./sample/randrect.rb
98
+ - ./sample/sample.ttf
99
+ - ./sample/sdl.rb
100
+ - ./sample/sdlskk.rb
101
+ - ./sample/sgetest.rb
102
+ - ./sample/stetris.rb
103
+ - ./sample/testgl.rb
104
+ - ./sample/testsprite.rb
105
+ - ./sample/transformblit.rb
106
+ has_rdoc: true
107
+ homepage: http://www.kmc.gr.jp/~ohai/rubysdl.html
108
+ post_install_message:
109
+ rdoc_options:
110
+ - -c utf-8
111
+ require_paths:
112
+ - lib
113
+ - ext
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: 1.9.1
119
+ version:
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: "0"
125
+ version:
126
+ requirements: []
127
+
128
+ rubyforge_project:
129
+ rubygems_version: 1.3.1
130
+ signing_key:
131
+ specification_version: 2
132
+ summary: SDL wrapper library for Ruby
133
+ test_files: []
134
+