rubysdl-mswin32-1.9 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.
@@ -1,21 +0,0 @@
1
- # -*- coding: euc-jp -*-
2
- require 'sdl'
3
- SDL.init(SDL::INIT_VIDEO)
4
- screen = SDL::Screen.open(640, 480, 16, SDL::SWSURFACE)
5
- SDL::WM::set_caption('����ץ����Υƥ���','����ץ����')
6
-
7
- s,* = SDL::WM.caption
8
- STDOUT.puts s.encode('external')
9
- p s.encoding
10
- loop do
11
- while event = SDL::Event.poll
12
- case event
13
- when SDL::Event::KeyDown, SDL::Event::Quit
14
- exit
15
- end
16
- end
17
- screen.fill_rect(0, 0, 640, 480, 0)
18
- screen.update_rect(0, 0, 0, 0)
19
-
20
- SDL.delay(10)
21
- end
@@ -1,33 +0,0 @@
1
- require 'sdl'
2
-
3
- printf "%d \n" , SDL::INIT_TIMER | SDL::INIT_VIDEO
4
-
5
- SDL.init(SDL::INIT_TIMER | SDL::INIT_VIDEO )
6
- screen = SDL::Screen.setVideoMode(640,480,16,SDL::SWSURFACE)
7
- exit if screen == nil
8
-
9
- sprite = SDL::Surface.loadBMP("icon.bmp")
10
- sprite.setColorKey( 0x00001000 | 0x00002000 ,0)
11
- sprite = sprite.displayFormat
12
-
13
-
14
- screen.fillRect(100,100,100,100,678432)
15
- SDL.blitSurface(sprite,0,0,32,32,screen,0,0)
16
- screen.updateRect(0,0,640,480)
17
- event = SDL::Event.new
18
-
19
- while true
20
- if event.pollEvent != 0 then
21
- if event.type==SDL::Event::QUIT then
22
- break
23
- end
24
- if event.type==SDL::Event::KEYDOWN then
25
- break
26
- end
27
- end
28
- end
29
-
30
-
31
-
32
-
33
-