ToDo:
require "dl/import" require "dl/struct" require 'tcc' module SDL extend DL::Importable dlload "libSDL.so" c_include [ 'SDL/SDL.h' ] signature_each do |t, s, r, a| next if s !~ /^SDL_(.*)/ as = $1 begin case t when :ident import(s, r, a) s[0,1] = s[0,1].downcase as[0,1] = as[0,1].downcase alias_method as, s module_function as when :struct const_set(as, struct(a)) end rescue end end end SDL.init(0x20) SDL.setVideoMode(640,480,16,0) SDL.delay(1000) SDL.quit()
¥¦¥£¥ó¥É¥¦¤Ç¤¿¡¼¡£ module_function ¤¬¥¥â¤À¤Ã¤¿¤È¤¤¤¦¤«ÃΤé¤Í¡¼¡£
¤¢¤È¤Ï¥Þ¥¯¥í¤Ç½ª¤ï¤ê¡£
(05:52)
Á° | 2006ǯ 5·î |
¼¡ | ||||
Æü | ·î | ²Ð | ¿å | ÌÚ | ¶â | ÅÚ |
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Á´¤Æ¥ê¥ó¥¯¥Õ¥ê¡¼¤Ç¤¹¡£ ¥³¡¼¥ÉÊҤϼ«Í³¤Ë»ÈÍѤ·¤Æ¤¤¤¿¤À¤¤¤Æ¹½¤¤¤Þ¤»¤ó¡£ ¤½¤Î¾¤Î¤â¤Î¤ÏGPL°·¤¤¤Ç¤¢¤ì¤Ð¤¢¤é¤æ¤ë»ÈÍѤ˴ؤ·¤Æʸ¶ç¤Ï¸À¤¤¤Þ¤»¤ó¡£ ¤Ê¤Ë¤«¤¢¤ì¤Ð²¼µ¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ø¡£