rubysdl 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/MANIFEST CHANGED
@@ -10,13 +10,10 @@ lib/rubysdl_aliases.rb
10
10
  lib/sdl.rb
11
11
  lib/rubysdl_compatible_ver1.rb
12
12
  rubysdl.h
13
- rubysdl_const_list.txt
14
- rubysdl_doc_old.rd
15
13
  rubysdl_ref.rd
16
14
  rubysdl_ref.html
17
15
  rubysdl_ref.en.rd
18
16
  rubysdl_ref.en.html
19
- rubysdl_doc_old.en.rd
20
17
  rubysdl_event.c
21
18
  rubysdl_event_key.c
22
19
  rubysdl_main.c
@@ -47,6 +44,7 @@ sample/font.rb
47
44
  sample/cdrom.rb
48
45
  sample/playmod.rb
49
46
  sample/testgl.rb
47
+ sample/testgl_old.rb
50
48
  sample/icon.bmp
51
49
  sample/cursor.rb
52
50
  sample/event2.rb
@@ -98,4 +96,4 @@ doc-en/opengl.rsd
98
96
  doc-en/sdlskk.rsd
99
97
  doc-en/time.rsd
100
98
  doc-en/video.rsd
101
- doc-en/wm.rsd
99
+ doc-en/wm.rsd
data/NEWS.en CHANGED
@@ -1,3 +1,16 @@
1
+ version 2.1.1
2
+ Fix a compile problem on MacOS X
3
+ Rename sdl.so to sdl_ext
4
+ Add following constants
5
+ * SDL::Mixer::NO_FADING
6
+ * SDL::Mixer::FADING_OUT
7
+ * SDL::Mixer::FADING_IN
8
+ * SDL::TRANSFORM_AA(for compatible with 1.x)
9
+ * SDL::TRANSFORM_TMAP(for compatible with 1.x)
10
+ * SDL::TRANSFORM_SAFE(for compatible with 1.x)
11
+ Fix documents
12
+ Remove obsolete documents
13
+
1
14
  version 2.1.0
2
15
  add following methods
3
16
  * SDL::TTF#close
data/NEWS.ja CHANGED
@@ -1,3 +1,16 @@
1
+ version 2.1.1
2
+ Ruby 1.9$B$H(BMacOS X$B$G%3%s%Q%$%k$G$-$J$$LdBj$r=$@5(B
3
+ sdl.so $B$r(B sdl_ext $B$H$$$&L>A0$KJQ99(B
4
+ $B0J2<$NDj?t$rDI2C(B
5
+ * SDL::Mixer::NO_FADING
6
+ * SDL::Mixer::FADING_OUT
7
+ * SDL::Mixer::FADING_IN
8
+ * SDL::TRANSFORM_AA(for compatible with 1.x)
9
+ * SDL::TRANSFORM_TMAP(for compatible with 1.x)
10
+ * SDL::TRANSFORM_SAFE(for compatible with 1.x)
11
+ $B%I%-%e%a%s%H$N=$@5(B
12
+ $B8E$$%I%-%e%a%s%H$r:o=|(B
13
+
1
14
  version 2.1.0
2
15
  $B0J2<$N%a%=%C%I$rDI2C(B
3
16
  * SDL::TTF#close
data/README.en CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- Ruby/SDL 2.1.0
2
+ Ruby/SDL 2.1.1
3
3
  Ohbayashi Ippei
4
4
 
5
5
  1 What's Ruby/SDL
@@ -72,20 +72,13 @@ install on Linux
72
72
  You can use OpenGL with this library.
73
73
 
74
74
  (1) Setup OpenGL and SDL.
75
- (2) Get OpenGL Interface (http://raa.ruby-lang.org/project/opengl/)
76
- (3) Install OpenGL Interface
77
- (4) Run "ruby extconf.rb" with "--enable-opengl".
78
- (5) Run "make" and "make install"
79
- (6) Write "require 'sdl'; require 'opengl'" in your script.
75
+ (2) Install ruby-opengl (http://ruby-opengl.rubyforge.org/)
76
+ (3) Run "ruby extconf.rb", "make", and "make install"
77
+ (4) Write "require 'sdl'; require 'opengl'" in your script.
80
78
 
81
- The interface of OpenGL is same as "OpenGL Interface".
79
+ We use OpenGL through ruby-opengl.
82
80
  Please see SDL's document,OpenGL document and sample/testgl.rb .
83
81
 
84
- Each OpenGL implementation are a little different in API, so
85
- you may fail to compile Ruby's OpenGL Interface. If you can't
86
- compile, but if you want to complile it, you should modify
87
- sources.
88
-
89
82
  7 LICENSE
90
83
  This library is distributed under GNU LGPL version 2.1 or later,
91
84
  which can be found in the file "LICENSE".
data/README.ja CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- Ruby/SDL 2.1.0
2
+ Ruby/SDL 2.1.1
3
3
  ���Ӱ�ʿ
4
4
 
5
5
  1 ����
@@ -109,25 +109,18 @@ FreeBSD
109
109
  ��ե���󥹥ޥ˥奢��θ��ǡ����Ǥ���
110
110
 
111
111
  6 OpenGL�ˤĤ���
112
- ���Υ饤�ե��ˤ�ä�OpenGL�ؤΥ�����������ǽ�ˤʤ�ޤ���
112
+ ���Υ饤�֥��ˤ�ä�OpenGL�ؤΥ�����������ǽ�ˤʤ�ޤ���
113
113
 
114
114
  (1) SDL����OpenGL��Ȥ���褦�����ꤹ�롣
115
- (2) http://raa.ruby-lang.org/project/opengl/ ����Ruby�Ѥ�
116
- OpenGL Interface ���äƤ��ƥ��󥹥ȡ��뤹�롣
115
+ (2) http://ruby-opengl.rubyforge.org/ �򥤥󥹥ȡ��뤹�롣
117
116
  (3) ruby extconf.rb �򤹤�Ȥ��ˡ�--enable-opengl ����ꤹ�롣
118
117
  (4) make ; make install ���롣
119
118
  ���ξ���Ruby�Υ�����ץ����require 'opengl'�򤹤�ɬ�פ�����ޤ���
120
119
 
121
- ���󥿡��ե������� OpenGL Interface �Τ�Τ򤽤Τޤ޻ȤäƤ��ޤ���
120
+ ���󥿡��ե������� ruby-opengl ���Τ�ΤʤΤǡ�
122
121
  ����λȤ������ϡ�SDL�Υɥ�����ȡ�OpenGL�Υɥ�����ȡ�
123
122
  ����� sample/testgl.rb �򸫤�Ĵ�٤Ƥ���������
124
123
 
125
- ����
126
- OpenGL�Υ��󥿡��ե������ϼ����ˤ�äƾ������İۤʤ�ޤ������Τ���
127
- ���Τޤޤ��Ȥȥ���ѥ���Ǥ��ʤ������ޤ�ư���ʤ��ʤɤθ��ݤ�������
128
- ���Ȥ�����ޤ������ξ�� OpenGL Interface �Υ������˼�������ɬ��
129
- ������ޤ���
130
-
131
124
  7 �饤����
132
125
  GNU LGPL(GNU Lesser General Public License) version 2.1 �ʹߤ˽����ޤ���
133
126
  �ܤ�����LICENSE�򸫤Ƥ���������
@@ -76,6 +76,31 @@ internally.
76
76
  SEEALSO
77
77
  CollisionMap#bounding_box_check
78
78
 
79
+ %%
80
+ NAME bounding_box_check
81
+ MOD CollisionMap
82
+ TYPE .
83
+ DEP SGE
84
+ PURPOSE Checks if two shapes overlap.
85
+ RVAL true/false
86
+
87
+ PROTO
88
+ bounding_box_check(x1,y1,w1,h1,x2,y2,w2,h2)
89
+ boundingBoxCheck(x1,y1,w1,h1,x2,y2,w2,h2)
90
+
91
+ DESC
92
+
93
+ Checks if two rectangles
94
+ ($[x1], $[$y1], $[w1], $[h1]) and
95
+ ($[x2], $[$y2], $[w2], $[h2]) overlap.
96
+
97
+ RET
98
+ Returns true if two rectangles overlap, otherwise
99
+ returns false.
100
+
101
+ SEEALSO
102
+ CollisionMap#bounding_box_check
103
+
79
104
  %%
80
105
  NAME bounding_box_check
81
106
  MOD CollisionMap
@@ -101,6 +126,7 @@ Returns true if two rectangles overlap, otherwise
101
126
  returns false.
102
127
 
103
128
  SEEALSO
129
+ CollisionMap.bounding_box_check
104
130
  CollisionMap#collision_check
105
131
  CollisionMap#w
106
132
  CollisionMap#h
@@ -1158,7 +1158,7 @@ Joystick#button
1158
1158
  %%
1159
1159
  NAME which
1160
1160
  MOD Event::JoyButtonUp
1161
- TYPE
1161
+ TYPE #
1162
1162
  PURPOSE Joystick device index
1163
1163
  RVAL Integer
1164
1164
 
@@ -583,7 +583,7 @@ not documented yet
583
583
 
584
584
  %%
585
585
  NAME delete
586
- MDO MPEG
586
+ MOD MPEG
587
587
  TYPE #
588
588
  DEP SMPEG
589
589
  PURPOSE
@@ -596,7 +596,7 @@ not documented yet
596
596
 
597
597
  %%
598
598
  NAME deleted?
599
- MDO MPEG
599
+ MOD MPEG
600
600
  TYPE #
601
601
  DEP SMPEG
602
602
  PURPOSE
@@ -12,7 +12,7 @@ This allows you to use SDL's audio, event handling and times in your
12
12
  OpenGL applications (a function often performed by GLUT).
13
13
 
14
14
  Ruby/SDL has no OpenGL methods, please use
15
- ((<OpenGL Interface|URL:http://www2.giganet.net/~yoshi/>)) or
15
+ ((<ruby-opengl|URL:http://ruby-opengl.rubyforge.org/>)) or
16
16
  ((<riko|URL:http://www.kumaryu.net/?(Ruby)+Riko>))
17
17
  with Ruby/SDL.
18
18
 
@@ -2243,15 +2243,15 @@ $[flags] is OR'd combination of follwing values:
2243
2243
 
2244
2244
  :0
2245
2245
  Default
2246
- :SDL::TRANSFORM_SAFE
2246
+ :SDL::Surface::TRANSFORM_SAFE
2247
2247
  Don't asume that the $[src] and $[dst] surfaces has
2248
2248
  the same pixel format. This is the default when the two
2249
2249
  surfaces don't have the same BPP. This is slower but will
2250
2250
  render wierd pixel formats right.
2251
- :SDL::TRANSFORM_AA
2251
+ :SDL::Surface::TRANSFORM_AA
2252
2252
  Use the interpolating renderer. Much slower but
2253
2253
  can look better.
2254
- :SDL::TRANSFORM_TMAP
2254
+ :SDL::Surface::TRANSFORM_TMAP
2255
2255
  Use texture mapping. This is a bit faster but
2256
2256
  the result isn't as nice as in the normal mode. This mode
2257
2257
  will also ignore the px/py coordinates and the other flags.
@@ -2306,11 +2306,11 @@ transformBlit(src,dst,angle,xscale,yscale,px,py,qx,qy,flags)
2306
2306
 
2307
2307
  DESC
2308
2308
  Draw a rotated and scaled image.
2309
- This method is same as @[Surface.transform] except
2309
+ This method is same as @[Surface.transform_draw] except
2310
2310
  colorkey and blending are enabled.
2311
2311
 
2312
2312
  SEEALSO
2313
- Surface.transform
2313
+ Surface.transform_draw
2314
2314
  Surface#transform_surface
2315
2315
  Surface#set_color_key
2316
2316
  Surface#set_alpha
@@ -2829,7 +2829,7 @@ transformSurface(bgcolor,angle,xscale,yscale,flags)
2829
2829
 
2830
2830
  DESC
2831
2831
  Returns a rotated and scaled version of $[self].
2832
- See $[Surface.transform] for more information.
2832
+ See $[Surface.transform_draw] for more information.
2833
2833
  $[bgcolor] is background color that new surface have.
2834
2834
 
2835
2835
  The new surface object will have the same depth
@@ -2838,6 +2838,6 @@ and pixel format as $[self].
2838
2838
  EXCEPTION *
2839
2839
 
2840
2840
  SEEALSO
2841
- Surface.transform
2841
+ Surface.transform_draw
2842
2842
  Surface.transform_blit
2843
2843
 
@@ -69,6 +69,29 @@ $[self]
69
69
  SEEALSO
70
70
  CollisionMap#bounding_box_check
71
71
 
72
+ %%
73
+ NAME bounding_box_check
74
+ MOD CollisionMap
75
+ TYPE .
76
+ DEP SGE
77
+ PURPOSE 2�Ĥ�Ĺ�������ŤʤäƤ��뤫�ɤ�����Ƚ�ꤷ�ޤ���
78
+ RVAL true/false
79
+
80
+ PROTO
81
+ bounding_box_check(x1,y1,w1,h1,x2,y2,w2,h2)
82
+ boundingBoxCheck(x1,y1,w1,h1,x2,y2,w2,h2)
83
+
84
+ DESC
85
+ ���夬($[x1],$[y1])����$[w1]�⤵$[h1]��Ĺ������
86
+ ���夬($[x2],$[y2])����$[w2]�⤵$[h2]��Ĺ������
87
+ �ŤʤäƤ��뤫�ɤ�����Ƚ�ꤷ�ޤ���
88
+
89
+ RET
90
+ Ĺ�������ŤʤäƤ���� true �򡢤��ʤ���� false ���֤��ޤ���
91
+
92
+ SEEALSO
93
+ CollisionMap#bounding_box_check
94
+
72
95
  %%
73
96
  NAME bounding_box_check
74
97
  MOD CollisionMap
@@ -90,6 +113,7 @@ RET
90
113
  Ĺ�������ŤʤäƤ���� true �򡢤��ʤ���� false ���֤��ޤ���
91
114
 
92
115
  SEEALSO
116
+ CollisionMap.bounding_box_check
93
117
  CollisionMap#collision_check
94
118
  CollisionMap#w
95
119
  CollisionMap#h
@@ -1147,7 +1147,7 @@ Joystick#button
1147
1147
  %%
1148
1148
  NAME which
1149
1149
  MOD Event::JoyButtonUp
1150
- TYPE
1150
+ TYPE #
1151
1151
  PURPOSE ���祤���ƥ��å��ǥХ������ֹ���֤��ޤ���
1152
1152
  RVAL Integer
1153
1153
 
@@ -593,7 +593,7 @@ not documented yet
593
593
 
594
594
  %%
595
595
  NAME delete
596
- MDO MPEG
596
+ MOD MPEG
597
597
  TYPE #
598
598
  DEP SMPEG
599
599
  PURPOSE
@@ -606,7 +606,7 @@ not documented yet
606
606
 
607
607
  %%
608
608
  NAME deleted?
609
- MDO MPEG
609
+ MOD MPEG
610
610
  TYPE #
611
611
  DEP SMPEG
612
612
  PURPOSE
@@ -51,10 +51,44 @@ SDL
51
51
  ���ͤȤ�������줿�����ե������Ф���¾�Υե졼��Хåե��Τ褦�˽񤭹��ߡ�
52
52
  ���Ĥ�Τ褦�˹���������Ƥ֤��Ȥ��Ǥ��ޤ���
53
53
 
54
+ == ��®������Τ����
55
+ Ruby/SDL�ǥ�����������ͤ���ȡ���ǽ��Υܥȥ�ͥå��Ȥʤ�Τ�
56
+ ������ʬ����ˤʤ�ޤ��������ǡ�������ʬ���®�����뤳�Ȥ�
57
+ ���Τ��®�����뤳�Ȥ��Ǥ��ޤ����ʲ���������®�����뤿���
58
+ ���Ĥ򤤤��Ĥ��񤤤Ƥ����ޤ���
59
+
60
+ * @[Surface#display_format]��Ȥ�
61
+
62
+ ���餫���ᤳ�Υ᥽�åɤ�Ƥ�Ǥ����ƹ�®�����ǽ�ʥե����ޥå�
63
+ ���ѹ����Ƥ����ȡ���Ū�˹�®�����ޤ���
64
+
65
+ * ����ե��֥��ɤϤǤ��뤫����Ȥ�ʤ�
66
+
67
+ �����٤��Ǥ���
68
+
69
+ * ����ˤ�
70
+ @[Surface.blit], @[Surface#put], @[Surface#fill_rect] �Τߤ�
71
+ �Ȥ���
72
+
73
+ �ޤȤ�˹�®������Ƥ���Τϰʾ������᥽�åɤΤߤǤ���
74
+
75
+ * ��ž�����̾���������ˤ�������������ˤ��Τ褦��@[Surface]��
76
+ ���餫����������Ƥ���
77
+
78
+ ��ž�����̾�����Ͼ�ι�˽񤤤��̤��٤��Τǡ���ǽ��ɬ�פ�
79
+ ���ˤϤ��餫�����ž����̾����ơ�@[Surface#display_format]
80
+ �ǹ�®�ʷ������Ѵ����Ƥ����ơ������Ȥ��٤��Ǥ���
81
+
82
+ �ޤ�������ե��֥��ɤ��ž�����̾����®�˹Ԥ������Τ�
83
+ ����С�Video subsystem ��Ȥ鷺�� OpenGL ��Ȥ��Ȥ�����ˡ
84
+ �⤢��ޤ�����®�ʥӥǥ������ɤȥɥ饤�Ф�
85
+ �ѰդǤ���ΤǤ���� Video subsystem ��Ȥ����
86
+ ��®�����褬��ǽ�Ȥʤ�Ǥ��礦��
87
+
54
88
  == SDL::Surface
55
89
  ���Υ����ե�����ɽ�魯���饹�Ǥ���
56
90
 
57
- ���Υ��饹�����褵���ֳ��פΥ����ɽ�����Ƥ��ޤ���
91
+ ���Υ��饹�����褵���ֲ����פΥ����ɽ�����Ƥ��ޤ���
58
92
 
59
93
  �᥽�åɤ���ӥ��饹�᥽�åɤΥꥹ��
60
94
  METHODS(Surface)
@@ -2318,13 +2352,13 @@ $[angle]
2318
2352
 
2319
2353
  :0
2320
2354
  ����
2321
- :SDL::TRANSFORM_SAFE
2355
+ :SDL::Surface::TRANSFORM_SAFE
2322
2356
  $[src] �� $[dst] �Υԥ�����ե����ޥåȤ��ۤʤäƤ��Ƥ����������褷�ޤ���
2323
2357
  $[src].bpp �� $[dst].bpp ���ۤʤ���ϼ�ưŪ��ͭ���ˤʤ�ޤ���
2324
2358
  ���������ͭ���ˤ�����٤��ʤ�ޤ���
2325
- :SDL::TRANSFORM_AA
2359
+ :SDL::Surface::TRANSFORM_AA
2326
2360
  �䴰����򤷤ޤ����٤����ߤ��᤬�ɤ��ʤ�ޤ���
2327
- :SDL::TRANSFORM_TMAP
2361
+ :SDL::Surface::TRANSFORM_TMAP
2328
2362
  �ƥ�������ޥåԥ󥰤�Ȥ��ޤ���������®���ʤ뤬�����ܤϰ����ʤ�ޤ���
2329
2363
  ���Υե饰��ͭ���ˤ������ $[px] ��$[py] ���ǵ󤲤��ե饰��̵�뤷�ޤ���
2330
2364
 
@@ -2335,10 +2369,10 @@ NOTES
2335
2369
  @[Surface#set_clip_rect] �����ꤷ������åԥ󥰶���� $[src]
2336
2370
  ����� $[dst] ��ͭ���Ǥ���
2337
2371
 
2338
- SDL::TRANSFORM_AA ��Ȥ����ϡ��⤵����������������ˤ��줾��
2372
+ SDL::Surface::TRANSFORM_AA ��Ȥ����ϡ��⤵����������������ˤ��줾��
2339
2373
  1�ԥ�����ŤĴְ�����ޤ�(�ѥե����ޥ󥹤��ɤ����뤿��Ǥ�)��
2340
2374
 
2341
- $[src]��32bpp RGBA �ե����ޥåȤξ��ˤϡ�SDL::TRANSFORM_SAFE��Ȥ��٤��Ǥ���
2375
+ $[src]��32bpp RGBA �ե����ޥåȤξ��ˤϡ�SDL::Surface::TRANSFORM_SAFE��Ȥ��٤��Ǥ���
2342
2376
 
2343
2377
  ���Υ᥽�åɤϥ���ե��֥��ǥ��󥰤ϰ��ڤ��ޤ��󤬡�����ե������ͥ��
2344
2378
  �ͤ��ݤ��ޤ����⤷������ե��֥��ǥ��󥰡����顼�����θ��̤Τ���
@@ -2373,12 +2407,12 @@ transformBlit(src,dst,angle,xscale,yscale,px,py,qx,qy,flags)
2373
2407
 
2374
2408
  DESC
2375
2409
  ��ž�̾���������򤷤ޤ��������ΰ�̣�ʤɤ�
2376
- @[Surface.transform] ��Ʊ�ͤǤ���
2377
- @[Surface.transform] �Ȥΰ㤤�� $[src] �����ꤵ�줿���顼����(ȴ����)
2410
+ @[Surface.transform_draw] ��Ʊ�ͤǤ���
2411
+ @[Surface.transform_draw] �Ȥΰ㤤�� $[src] �����ꤵ�줿���顼����(ȴ����)
2378
2412
  ����ӥ���ե��֥��ǥ��󥰤�ͭ���ˤʤ뤳�ȤǤ���
2379
2413
 
2380
2414
  SEEALSO
2381
- Surface.transform
2415
+ Surface.transform_draw
2382
2416
  Surface#transform_surface
2383
2417
  Surface#set_color_key
2384
2418
  Surface#set_alpha
@@ -2929,7 +2963,7 @@ DESC
2929
2963
  $[self] �����̾��ѷ����������ե������������֤���
2930
2964
  ��ž�ˤ�ä���������֤� $[bgcolor] �ǻ��ꤷ�����������롣
2931
2965
  ���� $[angle]��$[xscale]��$[yscale]��$[flags] ��
2932
- @[Surface.transform] ��Ʊ����̣�Ǥ��롣
2966
+ @[Surface.transform_draw] ��Ʊ����̣�Ǥ��롣
2933
2967
 
2934
2968
  �����������ե����� $[self] ��Ʊ�� bpp ����ӥԥ�����ե����ޥåȤ�
2935
2969
  ���ġ�
@@ -2937,6 +2971,6 @@ $[self]
2937
2971
  EXCEPTION *
2938
2972
 
2939
2973
  SEEALSO
2940
- Surface.transform
2974
+ Surface.transform_draw
2941
2975
  Surface.transform_blit
2942
2976
 
data/extconf.rb CHANGED
@@ -45,6 +45,11 @@ end
45
45
 
46
46
  if have_library("smpeg","SMPEG_new") then
47
47
  $CFLAGS+= " -D HAVE_SMPEG "
48
+ smpeg_config = with_config('smpeg-config', 'smpeg-config')
49
+ if system(smpeg_config, "--version")
50
+ $CFLAGS += ' ' + `#{smpeg_config} --cflags`.chomp
51
+ $LOCAL_LIBS += ' ' + `#{smpeg_config} --libs`.chomp
52
+ end
48
53
  end
49
54
  if have_library("SDL_mixer","Mix_OpenAudio") then
50
55
  $CFLAGS+= " -D HAVE_SDL_MIXER "
@@ -90,5 +95,5 @@ if enable_config("opengl",true) then
90
95
  have_library("glu32","gluGetString")
91
96
  end
92
97
  end
93
- create_makefile("sdl")
98
+ create_makefile("sdl_ext")
94
99