rubysdl-mswin32-1.8 2.1.0.1 → 2.1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/sample/rubysdl.rb DELETED
@@ -1,34 +0,0 @@
1
- require 'rubygems'
2
- require 'sdl'
3
-
4
- printf "%d \n" , SDL::INIT_TIMER | SDL::INIT_VIDEO
5
-
6
- SDL.init(SDL::INIT_TIMER | SDL::INIT_VIDEO )
7
- screen = SDL::Screen.setVideoMode(640,480,16,SDL::SWSURFACE)
8
- exit if screen == nil
9
-
10
- sprite = SDL::Surface.loadBMP("icon.bmp")
11
- sprite.setColorKey( 0x00001000 | 0x00002000 ,0)
12
- sprite = sprite.displayFormat
13
-
14
-
15
- screen.fillRect(100,100,100,100,678432)
16
- SDL.blitSurface(sprite,0,0,32,32,screen,0,0)
17
- screen.updateRect(0,0,640,480)
18
- event = SDL::Event.new
19
-
20
- while true
21
- if event.pollEvent != 0 then
22
- if event.type==SDL::Event::QUIT then
23
- break
24
- end
25
- if event.type==SDL::Event::KEYDOWN then
26
- break
27
- end
28
- end
29
- end
30
-
31
-
32
-
33
-
34
-