rubysdl 1.3.0 → 1.3.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 +16 -0
- data/NEWS.ja +16 -0
- data/README.en +1 -1
- data/README.ja +1 -1
- data/doc/video.rsd +113 -1
- data/lib/rubysdl_aliases.rb +1 -0
- data/lib/sdl.rb +1 -1
- data/rubysdl_ref.html +1480 -1432
- data/rubysdl_ref.rd +59 -1
- data/rubysdl_smpeg.c +3 -1
- data/rubysdl_video.c +72 -1
- metadata +97 -92
data/rubysdl_ref.rd
CHANGED
@@ -95,6 +95,7 @@ Ruby/SDL
|
|
95
95
|
|
96
96
|
���������Ƥ��륵�֥����ƥ�������¤��֤��ޤ���
|
97
97
|
|
98
|
+
|
98
99
|
EXAMPLE
|
99
100
|
# SDL.inited_system�λȤ�����
|
100
101
|
|
@@ -152,6 +153,7 @@ Ruby/SDL
|
|
152
153
|
|
153
154
|
���Ի��ˤ��㳰((<SDL::Error>))��ȯ�������ޤ���
|
154
155
|
|
156
|
+
|
155
157
|
EXAMPLE
|
156
158
|
# http://moriq.tdiary.net/20051006.html ���
|
157
159
|
# Ruby/SDL �� Apollo��ʻ��
|
@@ -189,7 +191,7 @@ Ruby/SDL
|
|
189
191
|
end
|
190
192
|
|
191
193
|
= Video
|
192
|
-
* ((<Video Subsystem ����>))
|
194
|
+
* ((<Video Subsystem ����>))
|
193
195
|
* ((<SDL::Screen>))
|
194
196
|
* ((<SDL::Surface>))
|
195
197
|
* ((<SDL::VideoInfo>))
|
@@ -240,6 +242,14 @@ Ruby/SDL
|
|
240
242
|
* ((<SDL::Surface#Gmask>)) -- �Х����ͥ���ͤ��������Τ˻Ȥ���ӥåȥޥ���
|
241
243
|
* ((<SDL::Surface#Bmask>)) -- �ĥ����ͥ���ͤ��������Τ˻Ȥ���ӥåȥޥ���
|
242
244
|
* ((<SDL::Surface#Amask>)) -- �������ͥ���ͤ��������Τ˻Ȥ���ӥåȥޥ���
|
245
|
+
* ((<SDL::Surface#Rloss>)) -- �֥����ͥ�Ǽ���������
|
246
|
+
* ((<SDL::Surface#Gloss>)) -- �Х����ͥ�Ǽ���������
|
247
|
+
* ((<SDL::Surface#Bloss>)) -- �ĥ����ͥ�Ǽ���������
|
248
|
+
* ((<SDL::Surface#Aloss>)) -- �������ͥ�Ǽ���������
|
249
|
+
* ((<SDL::Surface#Rshift>)) -- �ԥ������ͤ��֥����ͥ��2�ʿ��κ����եȿ�
|
250
|
+
* ((<SDL::Surface#Gshift>)) -- �ԥ������ͤ��Х����ͥ��2�ʿ��κ����եȿ�
|
251
|
+
* ((<SDL::Surface#Bshift>)) -- �ԥ������ͤ��ĥ����ͥ��2�ʿ��κ����եȿ�
|
252
|
+
* ((<SDL::Surface#Ashift>)) -- �ԥ������ͤΦ������ͥ��2�ʿ��κ����եȿ�
|
243
253
|
* ((<SDL::Surface#colorkey>)) -- Ʃ���ԥ�����Υԥ�������
|
244
254
|
* ((<SDL::Surface#alpha>)) -- �����ե������ΤΦ���
|
245
255
|
* ((<SDL::Surface#bpp>)) -- �����ե����γƥԥ������ɽ�魯�Τ˻Ȥ���ӥåȿ�
|
@@ -361,6 +371,14 @@ SDL
|
|
361
371
|
* ((<SDL::Surface#Gmask>)) -- �Х����ͥ���ͤ��������Τ˻Ȥ���ӥåȥޥ���
|
362
372
|
* ((<SDL::Surface#Bmask>)) -- �ĥ����ͥ���ͤ��������Τ˻Ȥ���ӥåȥޥ���
|
363
373
|
* ((<SDL::Surface#Amask>)) -- �������ͥ���ͤ��������Τ˻Ȥ���ӥåȥޥ���
|
374
|
+
* ((<SDL::Surface#Rloss>)) -- �֥����ͥ�Ǽ���������
|
375
|
+
* ((<SDL::Surface#Gloss>)) -- �Х����ͥ�Ǽ���������
|
376
|
+
* ((<SDL::Surface#Bloss>)) -- �ĥ����ͥ�Ǽ���������
|
377
|
+
* ((<SDL::Surface#Aloss>)) -- �������ͥ�Ǽ���������
|
378
|
+
* ((<SDL::Surface#Rshift>)) -- �ԥ������ͤ��֥����ͥ��2�ʿ��κ����եȿ�
|
379
|
+
* ((<SDL::Surface#Gshift>)) -- �ԥ������ͤ��Х����ͥ��2�ʿ��κ����եȿ�
|
380
|
+
* ((<SDL::Surface#Bshift>)) -- �ԥ������ͤ��ĥ����ͥ��2�ʿ��κ����եȿ�
|
381
|
+
* ((<SDL::Surface#Ashift>)) -- �ԥ������ͤΦ������ͥ��2�ʿ��κ����եȿ�
|
364
382
|
* ((<SDL::Surface#colorkey>)) -- Ʃ���ԥ�����Υԥ�������
|
365
383
|
* ((<SDL::Surface#alpha>)) -- �����ե������ΤΦ���
|
366
384
|
* ((<SDL::Surface#bpp>)) -- �����ե����γƥԥ������ɽ�魯�Τ˻Ȥ���ӥåȿ�
|
@@ -1603,6 +1621,46 @@ R,G,B
|
|
1603
1621
|
|
1604
1622
|
�������ͥ���ͤ��������Τ˻Ȥ���ӥåȥޥ������������֤��ޤ���
|
1605
1623
|
|
1624
|
+
--- SDL::Surface#Rloss
|
1625
|
+
|
1626
|
+
�֥����ͥ��8bit���ͤ�ѥå�����Ȥ��˼�����
|
1627
|
+
�ӥåȿ����������֤��ޤ���
|
1628
|
+
|
1629
|
+
--- SDL::Surface#Gloss
|
1630
|
+
|
1631
|
+
�Х����ͥ��8bit���ͤ�ѥå�����Ȥ��˼�����
|
1632
|
+
�ӥåȿ����������֤��ޤ���
|
1633
|
+
|
1634
|
+
--- SDL::Surface#Bloss
|
1635
|
+
|
1636
|
+
�ĥ����ͥ��8bit���ͤ�ѥå�����Ȥ��˼�����
|
1637
|
+
�ӥåȿ����������֤��ޤ���
|
1638
|
+
|
1639
|
+
--- SDL::Surface#Aloss
|
1640
|
+
|
1641
|
+
�������ͥ��8bit���ͤ�ѥå�����Ȥ��˼�����
|
1642
|
+
�ӥåȿ����������֤��ޤ���
|
1643
|
+
|
1644
|
+
--- SDL::Surface#Rshift
|
1645
|
+
|
1646
|
+
�ԥ������ͤ��֥����ͥ�α�ü����bit�ܤˤ��뤫��������
|
1647
|
+
�֤��ޤ���
|
1648
|
+
|
1649
|
+
--- SDL::Surface#Gshift
|
1650
|
+
|
1651
|
+
�ԥ������ͤ��Х����ͥ�α�ü����bit�ܤˤ��뤫��������
|
1652
|
+
�֤��ޤ���
|
1653
|
+
|
1654
|
+
--- SDL::Surface#Bshift
|
1655
|
+
|
1656
|
+
�ԥ������ͤ��ĥ����ͥ�α�ü����bit�ܤˤ��뤫��������
|
1657
|
+
�֤��ޤ���
|
1658
|
+
|
1659
|
+
--- SDL::Surface#Ashift
|
1660
|
+
|
1661
|
+
�ԥ������ͤΦ������ͥ�α�ü����bit�ܤˤ��뤫��������
|
1662
|
+
�֤��ޤ���
|
1663
|
+
|
1606
1664
|
--- SDL::Surface#colorkey
|
1607
1665
|
|
1608
1666
|
Ʃ���ԥ�����Υԥ������ͤ������������֤��ޤ���
|
data/rubysdl_smpeg.c
CHANGED
@@ -175,7 +175,7 @@ static VALUE smpeg_play(VALUE obj)
|
|
175
175
|
|
176
176
|
Data_Get_Struct(obj,SMPEG,mpeg);
|
177
177
|
|
178
|
-
#
|
178
|
+
#ifdef HAVE_SDL_MIXER
|
179
179
|
use_audio = RTEST(rb_iv_get(obj,"enable_audio")) &&
|
180
180
|
Mix_QuerySpec( NULL, NULL, NULL );
|
181
181
|
|
@@ -218,7 +218,9 @@ static VALUE smpeg_stop(VALUE obj)
|
|
218
218
|
SMPEG *mpeg;
|
219
219
|
Data_Get_Struct(obj,SMPEG,mpeg);
|
220
220
|
SMPEG_stop(mpeg);
|
221
|
+
#ifdef HAVE_SDL_MIXER
|
221
222
|
Mix_HookMusic(NULL,NULL);
|
223
|
+
#endif
|
222
224
|
return Qnil;
|
223
225
|
}
|
224
226
|
|
data/rubysdl_video.c
CHANGED
@@ -633,13 +633,74 @@ static VALUE sdl_surface_amask(VALUE obj)
|
|
633
633
|
Data_Get_Struct(obj,SDL_Surface,surface);
|
634
634
|
return UINT2NUM(surface->format->Amask);
|
635
635
|
}
|
636
|
+
static VALUE sdl_surface_rloss(VALUE obj)
|
637
|
+
{
|
638
|
+
SDL_Surface *surface;
|
639
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
640
|
+
return UINT2NUM(surface->format->Rloss);
|
641
|
+
}
|
642
|
+
static VALUE sdl_surface_gloss(VALUE obj)
|
643
|
+
{
|
644
|
+
SDL_Surface *surface;
|
645
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
646
|
+
return UINT2NUM(surface->format->Gloss);
|
647
|
+
}
|
648
|
+
static VALUE sdl_surface_bloss(VALUE obj)
|
649
|
+
{
|
650
|
+
SDL_Surface *surface;
|
651
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
652
|
+
return UINT2NUM(surface->format->Bloss);
|
653
|
+
}
|
654
|
+
static VALUE sdl_surface_aloss(VALUE obj)
|
655
|
+
{
|
656
|
+
SDL_Surface *surface;
|
657
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
658
|
+
return UINT2NUM(surface->format->Aloss);
|
659
|
+
}
|
660
|
+
static VALUE sdl_surface_rshift(VALUE obj)
|
661
|
+
{
|
662
|
+
SDL_Surface *surface;
|
663
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
664
|
+
return UINT2NUM(surface->format->Rshift);
|
665
|
+
}
|
666
|
+
static VALUE sdl_surface_gshift(VALUE obj)
|
667
|
+
{
|
668
|
+
SDL_Surface *surface;
|
669
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
670
|
+
return UINT2NUM(surface->format->Gshift);
|
671
|
+
}
|
672
|
+
static VALUE sdl_surface_bshift(VALUE obj)
|
673
|
+
{
|
674
|
+
SDL_Surface *surface;
|
675
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
676
|
+
return UINT2NUM(surface->format->Bshift);
|
677
|
+
}
|
678
|
+
static VALUE sdl_surface_ashift(VALUE obj)
|
679
|
+
{
|
680
|
+
SDL_Surface *surface;
|
681
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
682
|
+
return UINT2NUM(surface->format->Ashift);
|
683
|
+
}
|
684
|
+
|
685
|
+
static VALUE sdl_surface_pitch(VALUE obj)
|
686
|
+
{
|
687
|
+
SDL_Surface *surface;
|
688
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
689
|
+
return UINT2NUM(surface->pitch);
|
690
|
+
}
|
691
|
+
static VALUE sdl_surface_bytes_per_pixel(VALUE obj)
|
692
|
+
{
|
693
|
+
SDL_Surface *surface;
|
694
|
+
Data_Get_Struct(obj,SDL_Surface,surface);
|
695
|
+
return UINT2NUM(surface->format->BytesPerPixel);
|
696
|
+
}
|
636
697
|
|
637
698
|
static VALUE sdl_surface_pixels(VALUE obj)
|
638
699
|
{
|
639
700
|
SDL_Surface *surface;
|
640
701
|
Data_Get_Struct(obj,SDL_Surface,surface);
|
641
702
|
return rb_str_new(surface->pixels,
|
642
|
-
surface->
|
703
|
+
surface->h * surface->pitch);
|
643
704
|
}
|
644
705
|
|
645
706
|
static void defineConstForVideo()
|
@@ -737,7 +798,17 @@ void init_video()
|
|
737
798
|
rb_define_method(cSurface,"Gmask",sdl_surface_gmask,0);
|
738
799
|
rb_define_method(cSurface,"Bmask",sdl_surface_bmask,0);
|
739
800
|
rb_define_method(cSurface,"Amask",sdl_surface_amask,0);
|
801
|
+
rb_define_method(cSurface,"Rloss",sdl_surface_rloss,0);
|
802
|
+
rb_define_method(cSurface,"Gloss",sdl_surface_gloss,0);
|
803
|
+
rb_define_method(cSurface,"Bloss",sdl_surface_bloss,0);
|
804
|
+
rb_define_method(cSurface,"Aloss",sdl_surface_aloss,0);
|
805
|
+
rb_define_method(cSurface,"Rshift",sdl_surface_rshift,0);
|
806
|
+
rb_define_method(cSurface,"Gshift",sdl_surface_gshift,0);
|
807
|
+
rb_define_method(cSurface,"Bshift",sdl_surface_bshift,0);
|
808
|
+
rb_define_method(cSurface,"Ashift",sdl_surface_ashift,0);
|
740
809
|
rb_define_method(cSurface,"pixels",sdl_surface_pixels,0);
|
810
|
+
rb_define_method(cSurface,"pitch",sdl_surface_pitch,0);
|
811
|
+
rb_define_method(cSurface,"BytesPerPixel",sdl_surface_bytes_per_pixel,0);
|
741
812
|
|
742
813
|
cScreen = rb_define_class_under(mSDL,"Screen",cSurface);
|
743
814
|
rb_define_method(cScreen,"updateRect",sdl_updateRect,4);
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: rubysdl
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.3.
|
7
|
-
date: 2007-
|
6
|
+
version: 1.3.1
|
7
|
+
date: 2007-08-27 00:00:00 +09:00
|
8
8
|
summary: The simple ruby extension library to use SDL
|
9
9
|
require_paths:
|
10
|
-
|
10
|
+
- lib
|
11
11
|
email: ohai@kmc.gr.jp
|
12
12
|
homepage: http://www.kmc.gr.jp/~ohai/
|
13
13
|
rubyforge_project:
|
@@ -18,104 +18,109 @@ bindir: bin
|
|
18
18
|
has_rdoc: false
|
19
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
20
|
requirements:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
version: 0.0.0
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
25
24
|
version:
|
26
25
|
platform: ruby
|
27
26
|
signing_key:
|
28
27
|
cert_chain:
|
29
28
|
post_install_message:
|
30
29
|
authors:
|
31
|
-
|
30
|
+
- Ohbayashi Ippei
|
32
31
|
files:
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
32
|
+
- MANIFEST
|
33
|
+
- README.ja
|
34
|
+
- README.en
|
35
|
+
- NEWS.ja
|
36
|
+
- NEWS.en
|
37
|
+
- LICENSE
|
38
|
+
- depend
|
39
|
+
- extconf.rb
|
40
|
+
- lib/rubysdl_aliases.rb
|
41
|
+
- lib/sdl.rb
|
42
|
+
- rubysdl.h
|
43
|
+
- rubysdl_const_list.txt
|
44
|
+
- rubysdl_doc_old.rd
|
45
|
+
- rubysdl_ref.rd
|
46
|
+
- rubysdl_ref.html
|
47
|
+
- rubysdl_doc.en.rd
|
48
|
+
- rubysdl_event.c
|
49
|
+
- rubysdl_event_key.c
|
50
|
+
- rubysdl_main.c
|
51
|
+
- rubysdl_mixer.c
|
52
|
+
- rubysdl_mouse.c
|
53
|
+
- rubysdl_sge_video.c
|
54
|
+
- rubysdl_time.c
|
55
|
+
- rubysdl_video.c
|
56
|
+
- rubysdl_wm.c
|
57
|
+
- rubysdl_ttf.c
|
58
|
+
- rubysdl_cdrom.c
|
59
|
+
- rubysdl_joystick.c
|
60
|
+
- rubysdl_image.c
|
61
|
+
- rubysdl_opengl.c
|
62
|
+
- rubysdl_pixel.c
|
63
|
+
- rubysdl_event2.c
|
64
|
+
- rubysdl_smpeg.c
|
65
|
+
- rubysdl_sdlskk.c
|
66
|
+
- rubysdl_kanji.c
|
67
|
+
- rubysdl_rwops.c
|
68
|
+
- SDL_kanji.c
|
69
|
+
- SDL_kanji.h
|
70
|
+
- sample/testsprite.rb
|
71
|
+
- sample/playwave.rb
|
72
|
+
- sample/movesp.rb
|
73
|
+
- sample/alpha.rb
|
74
|
+
- sample/sgetest.rb
|
75
|
+
- sample/font.rb
|
76
|
+
- sample/cdrom.rb
|
77
|
+
- sample/playmod.rb
|
78
|
+
- sample/testgl.rb
|
79
|
+
- sample/icon.bmp
|
80
|
+
- sample/cursor.rb
|
81
|
+
- sample/event2.rb
|
82
|
+
- sample/joy2.rb
|
83
|
+
- sample/plaympeg.rb
|
84
|
+
- sample/cursor.bmp
|
85
|
+
- sample/transformblit.rb
|
86
|
+
- sample/randrect.rb
|
87
|
+
- sample/sdlskk.rb
|
88
|
+
- sample/ellipses.rb
|
89
|
+
- sample/collision.rb
|
90
|
+
- sample/stetris.rb
|
91
|
+
- sample/aadraw.rb
|
92
|
+
- sample/alphadraw.rb
|
93
|
+
- sample/fpstimer.rb
|
94
|
+
- sample/bfont.rb
|
95
|
+
- sample/font.bmp
|
96
|
+
- sample/kanji.rb
|
97
|
+
- sample/sample.ttf
|
98
|
+
- doc/Makefile
|
99
|
+
- doc/rsd.rb
|
100
|
+
- doc/cdrom.rsd
|
101
|
+
- doc/collision.rsd
|
102
|
+
- doc/event.rsd
|
103
|
+
- doc/font.rsd
|
104
|
+
- doc/general.rsd
|
105
|
+
- doc/init.rsd
|
106
|
+
- doc/joystick.rsd
|
107
|
+
- doc/mixer.rsd
|
108
|
+
- doc/mpeg.rsd
|
109
|
+
- doc/sdlskk.rsd
|
110
|
+
- doc/time.rsd
|
111
|
+
- doc/video.rsd
|
112
|
+
- doc/wm.rsd
|
114
113
|
test_files: []
|
114
|
+
|
115
115
|
rdoc_options: []
|
116
|
+
|
116
117
|
extra_rdoc_files: []
|
118
|
+
|
117
119
|
executables: []
|
120
|
+
|
118
121
|
extensions:
|
119
|
-
|
122
|
+
- extconf.rb
|
120
123
|
requirements: []
|
121
|
-
|
124
|
+
|
125
|
+
dependencies: []
|
126
|
+
|