- 1 名前:名前は開発中のものです。 [2008/04/02(水) 02:11:27 ID:cxIG00d1]
- Ruby/SDL、StarRubyなどを用いてゲームを作る(作ろうとしている)人が
情報交換したり雑談したり質問したりするためのスレッドです。 ツクールXP(RGSS)についてはツクールスレ等でお願いします。 Ruby/SDL www.kmc.gr.jp/~ohai/rubysdl.html StarRuby www.starruby.info/ja/
- 528 名前:名前は開発中のものです。 mailto:sage [2010/06/17(木) 11:06:08 ID:eGb2uki/]
- rubyすげー
DXライブラリのDLLで試しに ウィンドウの表示だけやってみたら すんなり表示された やろうと思えば3Dのゲームとかも 作れそうだね
- 529 名前:名前は開発中のものです。 mailto:sage [2010/06/17(木) 13:43:20 ID:WAj30wAj]
- >>527
DXライブラリちょっと見てみたけど、APIがC言語用でクラス使ってるわけじゃないから、 Ruby用のラッパー書く分には簡単そうに見えるけど
- 530 名前:529 mailto:sage [2010/06/17(木) 15:12:35 ID:WAj30wAj]
- ちょろっと書いてみたけどC#用DLLで動くね
require "ffi" module DxLib extend FFI::Library ffi_lib "DxLib.dll" attach_function :Init, :dx_DxLib_Init, [], :int attach_function :End, :dx_DxLib_End, [], :void attach_function :ChangeWindowMode, :dx_ChangeWindowMode, [:int], :void attach_function :GetColor, :dx_GetColor, [:int, :int, :int], :int attach_function :DrawString, :dx_DrawString, [:int, :int, :string, :int, :int], :int attach_function :WaitKey, :dx_WaitKey, [], :void end DxLib.ChangeWindowMode(1) if DxLib.Init == -1 raise "dxlib error" end color = DxLib.GetColor(255, 255, 255) DxLib.DrawString(250, 240 - 16, "Hello C World!", color, 0) DxLib.WaitKey DxLib.End
|

|