rubysdl 2.0 → 2.0.1
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.
- data/NEWS.en +4 -0
- data/NEWS.ja +5 -0
- data/README.en +1 -1
- data/README.ja +1 -1
- data/doc/video.rsd +5 -2
- data/doc-en/general.rsd +1 -1
- data/doc-en/video.rsd +4 -2
- data/rubysdl_opengl.c +1 -1
- data/rubysdl_pixel.c +5 -1
- data/rubysdl_ref.en.html +5 -4
- data/rubysdl_ref.en.rd +4 -3
- data/rubysdl_ref.html +4 -3
- data/rubysdl_ref.rd +3 -1
- data/rubysdl_video.c +10 -3
- metadata +2 -2
data/NEWS.en
CHANGED
data/NEWS.ja
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
version 2.0.1
|
|
2
|
+
$B%3%s%Q%$%k$G$-$J$$>l9g$,$"$k$N$r=$@5(B
|
|
3
|
+
SDL::Surface.blit$B$G%S%G%*%a%b%j$,%m%9%H$7$?>l9g$K(B
|
|
4
|
+
$BNc30(BSDL::Surface::VideoMemoryLost$B$rH/@8$5$;$k$h$&$K$7$?!#(B
|
|
5
|
+
|
|
1
6
|
version 2.0
|
|
2
7
|
ruby 1.9$B$G;H$($k$h$&$KJQ99(B
|
|
3
8
|
SDL_RWops$BBP1~$r=$@5$7!"(BSDL::Mixer::Wave.load_from_io$B$,;H$($k$h$&$K$7$?!#(B
|
data/README.en
CHANGED
data/README.ja
CHANGED
data/doc/video.rsd
CHANGED
|
@@ -1462,7 +1462,7 @@ Surface.blit
|
|
|
1462
1462
|
NAME blit_surface
|
|
1463
1463
|
TYPE .
|
|
1464
1464
|
PURPOSE ž���������ե�������ž���襵���ե����ع�® blit ž����Ԥ��ޤ���
|
|
1465
|
-
RVAL 0
|
|
1465
|
+
RVAL 0
|
|
1466
1466
|
OBSOLETE Surface.blit
|
|
1467
1467
|
|
|
1468
1468
|
PROTO
|
|
@@ -1511,8 +1511,11 @@ Surface#set_alpha
|
|
|
1511
1511
|
|
|
1512
1512
|
RET
|
|
1513
1513
|
�������ˤ�0���֤��ޤ���
|
|
1514
|
+
|
|
1515
|
+
EXCEPTION
|
|
1514
1516
|
�ɤ��餫�Υ����ե������ӥǥ�����ˤ��ꡢ���Υ�åɤ�
|
|
1515
|
-
|
|
1517
|
+
�㳰SDL::Surface::VideoMemoryLost��ȯ����������ϡ�
|
|
1518
|
+
�ӥǥ����꤬����줿���ᡢ
|
|
1516
1519
|
�������ߤǤ⤦���٥����ɤ��� blit ����ɬ�פ�����ޤ���
|
|
1517
1520
|
|
|
1518
1521
|
����� DirextX5.0 �β��ǡ�
|
data/doc-en/general.rsd
CHANGED
data/doc-en/video.rsd
CHANGED
|
@@ -1423,7 +1423,7 @@ NAME blit
|
|
|
1423
1423
|
MOD Surface
|
|
1424
1424
|
TYPE .
|
|
1425
1425
|
PURPOSE This performs a fast blit from the source surface to the destination surface.
|
|
1426
|
-
RVAL 0
|
|
1426
|
+
RVAL 0
|
|
1427
1427
|
|
|
1428
1428
|
PROTO
|
|
1429
1429
|
blit(src,srcX,srcY,srcW,srcH,dst,dstX,dstY)
|
|
@@ -1460,8 +1460,10 @@ interact with surface blitting, as the following pseudo-code should hopefully ex
|
|
|
1460
1460
|
RET
|
|
1461
1461
|
If the blit is successful, it returns 0.
|
|
1462
1462
|
|
|
1463
|
+
EXCEPTION
|
|
1463
1464
|
If either of the surfaces were in video memory,
|
|
1464
|
-
and the blit
|
|
1465
|
+
and the blit raises SDL::Surface::VideoMemoryLost,
|
|
1466
|
+
the video memory was lost, so it
|
|
1465
1467
|
should be reloaded with artwork and re-blitted.
|
|
1466
1468
|
|
|
1467
1469
|
This happens under DirectX 5.0 when the system switches away from your fullscreen application. Locking
|
data/rubysdl_opengl.c
CHANGED
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
License along with this library; if not, write to the Free Software
|
|
18
18
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
19
19
|
*/
|
|
20
|
-
#ifdef ENABLE_OPENGL
|
|
21
20
|
#include "rubysdl.h"
|
|
21
|
+
#ifdef ENABLE_OPENGL
|
|
22
22
|
static VALUE GL_getAttr(VALUE class, VALUE attr)
|
|
23
23
|
{
|
|
24
24
|
int val;
|
data/rubysdl_pixel.c
CHANGED
|
@@ -48,7 +48,11 @@
|
|
|
48
48
|
#define clip_ymin(pnt) pnt->clip_miny
|
|
49
49
|
#define clip_ymax(pnt) pnt->clip_maxy
|
|
50
50
|
#endif
|
|
51
|
-
|
|
51
|
+
|
|
52
|
+
#ifdef HAVE_SGE
|
|
53
|
+
#include <sge.h>
|
|
54
|
+
#endif
|
|
55
|
+
|
|
52
56
|
void rubysdl_putPixel(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
|
|
53
57
|
{
|
|
54
58
|
#ifdef HAVE_SGE
|
data/rubysdl_ref.en.html
CHANGED
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
<li><a href="#label-637">MPEG playback</a></li>
|
|
27
27
|
</ul>
|
|
28
28
|
<h1><a name="label-1" id="label-1">Ruby/SDL Outline</a></h1><!-- RDLabel: "Ruby/SDL Outline" -->
|
|
29
|
-
<p>Ruby/SDL is Ruby extension library for
|
|
30
|
-
<
|
|
31
|
-
|
|
29
|
+
<p>Ruby/SDL is Ruby extension library for
|
|
30
|
+
<a href="http://www.libsdl.org/">SDL</a>.
|
|
31
|
+
This library enables you to create games, demo, or so on.</p>
|
|
32
32
|
<p>Ruby/SDL has following functions.</p>
|
|
33
33
|
<ul>
|
|
34
34
|
<li><a href="#label-17">access to 2D video framebuffer</a></li>
|
|
@@ -1317,7 +1317,8 @@ else
|
|
|
1317
1317
|
end</pre>
|
|
1318
1318
|
<p>If the blit is successful, it returns 0.</p>
|
|
1319
1319
|
<p>If either of the surfaces were in video memory,
|
|
1320
|
-
and the blit
|
|
1320
|
+
and the blit raises SDL::Surface::VideoMemoryLost,
|
|
1321
|
+
the video memory was lost, so it
|
|
1321
1322
|
should be reloaded with artwork and re-blitted.</p>
|
|
1322
1323
|
<p>This happens under DirectX 5.0 when the system switches away from your fullscreen application. Locking
|
|
1323
1324
|
the surface will also fail until you have access to the video memory again.</p></dd>
|
data/rubysdl_ref.en.rd
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
= Ruby/SDL Outline
|
|
18
18
|
Ruby/SDL is Ruby extension library for
|
|
19
|
-
|
|
19
|
+
((<SDL|URL:http://www.libsdl.org/>)).
|
|
20
20
|
This library enables you to create games, demo, or so on.
|
|
21
21
|
|
|
22
22
|
Ruby/SDL has following functions.
|
|
@@ -1420,9 +1420,10 @@ Not documented yet.
|
|
|
1420
1420
|
end
|
|
1421
1421
|
|
|
1422
1422
|
If the blit is successful, it returns 0.
|
|
1423
|
-
|
|
1423
|
+
|
|
1424
1424
|
If either of the surfaces were in video memory,
|
|
1425
|
-
and the blit
|
|
1425
|
+
and the blit raises SDL::Surface::VideoMemoryLost,
|
|
1426
|
+
the video memory was lost, so it
|
|
1426
1427
|
should be reloaded with artwork and re-blitted.
|
|
1427
1428
|
|
|
1428
1429
|
This happens under DirectX 5.0 when the system switches away from your fullscreen application. Locking
|
data/rubysdl_ref.html
CHANGED
|
@@ -1390,9 +1390,10 @@ elsif ž
|
|
|
1390
1390
|
else
|
|
1391
1391
|
���̤ζ�� blit
|
|
1392
1392
|
end</pre>
|
|
1393
|
-
<p>�������ˤ�0
|
|
1394
|
-
|
|
1395
|
-
|
|
1393
|
+
<p>�������ˤ�0���֤��ޤ���</p>
|
|
1394
|
+
<p>�ɤ��餫�Υ����ե������ӥǥ�����ˤ��ꡢ���Υ�åɤ�
|
|
1395
|
+
�㳰SDL::Surface::VideoMemoryLost��ȯ����������ϡ�
|
|
1396
|
+
�ӥǥ����꤬����줿���ᡢ
|
|
1396
1397
|
�������ߤǤ⤦���٥����ɤ��� blit ����ɬ�פ�����ޤ���</p>
|
|
1397
1398
|
<p>����� DirextX5.0 �β��ǡ�
|
|
1398
1399
|
�����ƥब���ʤ��Υե륹����ץꥱ���������ڤ괹�������ȯ�����ޤ���
|
data/rubysdl_ref.rd
CHANGED
|
@@ -1510,8 +1510,10 @@ R,G,B
|
|
|
1510
1510
|
end
|
|
1511
1511
|
|
|
1512
1512
|
�������ˤ�0���֤��ޤ���
|
|
1513
|
+
|
|
1513
1514
|
�ɤ��餫�Υ����ե������ӥǥ�����ˤ��ꡢ���Υ�åɤ�
|
|
1514
|
-
|
|
1515
|
+
�㳰SDL::Surface::VideoMemoryLost��ȯ����������ϡ�
|
|
1516
|
+
�ӥǥ����꤬����줿���ᡢ
|
|
1515
1517
|
�������ߤǤ⤦���٥����ɤ��� blit ����ɬ�פ�����ޤ���
|
|
1516
1518
|
|
|
1517
1519
|
����� DirextX5.0 �β��ǡ�
|
data/rubysdl_video.c
CHANGED
|
@@ -23,6 +23,7 @@ static VALUE cScreen = Qnil;
|
|
|
23
23
|
static VALUE cPixelFormat = Qnil;
|
|
24
24
|
static VALUE cVideoInfo = Qnil;
|
|
25
25
|
static VALUE cSurface = Qnil;
|
|
26
|
+
static VALUE eSurfaceLostMem = Qnil;
|
|
26
27
|
|
|
27
28
|
typedef struct {
|
|
28
29
|
SDL_Surface* surface;
|
|
@@ -497,9 +498,14 @@ static VALUE Surface_s_blit(VALUE klass,VALUE src,VALUE srcX,VALUE srcY,
|
|
|
497
498
|
dr = (zero_rect_p(dst_rect))?NULL:&dst_rect;
|
|
498
499
|
|
|
499
500
|
result = SDL_BlitSurface(src_surface, sr, dst_surface, dr);
|
|
500
|
-
|
|
501
|
-
|
|
501
|
+
|
|
502
|
+
switch(result) {
|
|
503
|
+
case -1:
|
|
502
504
|
rb_raise(eSDLError,"SDL::Surface.blit fail: %s",SDL_GetError());
|
|
505
|
+
break;
|
|
506
|
+
case -2:
|
|
507
|
+
rb_raise(eSurfaceLostMem, "SDL::Surface lost video memory");
|
|
508
|
+
break;
|
|
503
509
|
}
|
|
504
510
|
return INT2NUM(result);
|
|
505
511
|
}
|
|
@@ -777,7 +783,8 @@ VALUE rubysdl_init_video(VALUE mSDL)
|
|
|
777
783
|
cSurface = rb_define_class_under(mSDL,"Surface",rb_cObject);
|
|
778
784
|
cScreen = rb_define_class_under(mSDL,"Screen",cSurface);
|
|
779
785
|
cPixelFormat = rb_define_class_under(mSDL, "PixelFormat", rb_cObject);
|
|
780
|
-
|
|
786
|
+
eSurfaceLostMem = rb_define_class_under(cSurface, "VideoMemoryLost",
|
|
787
|
+
rb_eStandardError);
|
|
781
788
|
rb_define_alloc_func(cSurface, Surface_s_alloc);
|
|
782
789
|
rb_undef_alloc_func(cPixelFormat);
|
|
783
790
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubysdl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ohbayashi Ippei
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2008-04-
|
|
12
|
+
date: 2008-04-23 00:00:00 +09:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|