lib/libtcod/bindings.rb in libtcod-0.0.3 vs lib/libtcod/bindings.rb in libtcod-0.0.4

- old
+ new

@@ -75,10 +75,14 @@ :lalt, :bool, :lctrl, :bool, :ralt, :bool, :rctrl, :bool, :shift, :bool + + def c + self[:c].chr + end end TCOD_renderer_t = :int TCOD_bkgnd_flag_t = :int TCOD_alignment_t = :int @@ -262,11 +266,11 @@ tcod_function :TCOD_image_delete, [ :pointer ], :void tcod_function :TCOD_image_set_key_color, [ :pointer, Color.val ], :void tcod_function :TCOD_image_is_pixel_transparent, [ :pointer, :int, :int ], :bool ### Mouse module - class MouseStatus < MethodStruct + class Mouse < MethodStruct layout( :x, :int, :y, :int, :dx, :int, :dy, :int, @@ -282,14 +286,14 @@ :mbutton_pressed, :bool, :wheel_up, :bool, :wheel_down, :bool ) end - attach_function :TCOD_mouse_show_cursor, [ :bool ], :void - attach_function :TCOD_mouse_get_status, [ ], MouseStatus - attach_function :TCOD_mouse_is_cursor_visible, [ ], :bool - attach_function :TCOD_mouse_move, [ :int, :int ], :void - #attach_function :TCOD_mouse_includes_touch, [ :bool ], :void + tcod_function :TCOD_mouse_show_cursor, [ :bool ], :void + tcod_function :TCOD_mouse_get_status, [ ], Mouse + tcod_function :TCOD_mouse_is_cursor_visible, [ ], :bool + tcod_function :TCOD_mouse_move, [ :int, :int ], :void + #tcod_function :TCOD_mouse_includes_touch, [ :bool ], :void ### Parser module TYPE_NONE = 0 TYPE_BOOL = 1 TYPE_VALUELIST02 = 10