libtcod 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,24 +1,76 @@
1
- # Libtcod
1
+ # libtcod-ruby 0.0.2
2
2
 
3
- TODO: Write a gem description
3
+ Ruby bindings for [libtcod 1.5.1](http://doryen.eptalys.net/libtcod/)
4
+
5
+ Currently only tested on Linux; other platforms may work if you have libtcod in a place where ffi\_lib knows to get it. Basic wrapping of the C functions is complete, and a more idiomatic Ruby API is in progress.
4
6
 
5
7
  ## Installation
6
8
 
7
- Add this line to your application's Gemfile:
9
+ gem install libtcod
10
+
11
+ ## Examples
12
+
13
+ Here's a straight port of the [example code](http://roguebasin.roguelikedevelopment.org/index.php?title=Complete_Roguelike_Tutorial,_using_python%2Blibtcod,_part_1_code#Moving_around) from part 1 of the python tutorial:
14
+
15
+ ```ruby
16
+ require 'libtcod'
17
+
18
+ #actual size of the window
19
+ SCREEN_WIDTH = 80
20
+ SCREEN_HEIGHT = 50
21
+
22
+ LIMIT_FPS = 20 #20 frames-per-second maximum
23
+
24
+ def handle_keys
25
+ #key = TCOD.console_check_for_keypress() #real-time
26
+ key = TCOD.console_wait_for_keypress(true) #turn-based
27
+
28
+ if key.vk == TCOD::KEY_ENTER && key.lalt
29
+ #Alt+Enter: toggle fullscreen
30
+ TCOD.console_set_fullscreen(!TCOD.console_is_fullscreen())
31
+ elsif key.vk == TCOD::KEY_ESCAPE
32
+ return true #exit game
33
+ end
34
+
35
+ #movement keys
36
+ if TCOD.console_is_key_pressed(TCOD::KEY_UP)
37
+ $playery -= 1
38
+ elsif TCOD.console_is_key_pressed(TCOD::KEY_DOWN)
39
+ $playery += 1
40
+ elsif TCOD.console_is_key_pressed(TCOD::KEY_LEFT)
41
+ $playerx -= 1
42
+ elsif TCOD.console_is_key_pressed(TCOD::KEY_RIGHT)
43
+ $playerx += 1
44
+ end
45
+
46
+ false
47
+ end
48
+
49
+ #############################################
50
+ # Initialization & Main Loop
51
+ #############################################
8
52
 
9
- gem 'libtcod'
53
+ TCOD.console_set_custom_font('arial10x10.png', TCOD::FONT_TYPE_GREYSCALE | TCOD::FONT_LAYOUT_TCOD, 0, 0)
54
+ TCOD.console_init_root(SCREEN_WIDTH, SCREEN_HEIGHT, 'ruby/TCOD tutorial', false, TCOD::RENDERER_SDL)
55
+ TCOD.sys_set_fps(LIMIT_FPS)
10
56
 
11
- And then execute:
57
+ $playerx = SCREEN_WIDTH/2
58
+ $playery = SCREEN_HEIGHT/2
12
59
 
13
- $ bundle
60
+ until TCOD.console_is_window_closed
61
+ TCOD.console_set_default_foreground(nil, TCOD::Color::WHITE)
62
+ TCOD.console_put_char(nil, $playerx, $playery, '@'.ord, TCOD::BKGND_NONE)
14
63
 
15
- Or install it yourself as:
64
+ TCOD.console_flush()
16
65
 
17
- $ gem install libtcod
66
+ TCOD.console_put_char(nil, $playerx, $playery, ' '.ord, TCOD::BKGND_NONE)
18
67
 
19
- ## Usage
68
+ #handle keys and exit game if needed
69
+ will_exit = handle_keys
70
+ break if will_exit
71
+ end
72
+ ```
20
73
 
21
- TODO: Write usage instructions here
22
74
 
23
75
  ## Contributing
24
76
 
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'libtcod'
4
+
5
+ #actual size of the window
6
+ SCREEN_WIDTH = 80
7
+ SCREEN_HEIGHT = 50
8
+
9
+ LIMIT_FPS = 20 #20 frames-per-second maximum
10
+
11
+ def handle_keys
12
+ #key = TCOD.console_check_for_keypress() #real-time
13
+ key = TCOD.console_wait_for_keypress(true) #turn-based
14
+
15
+ if key.vk == TCOD::KEY_ENTER && key.lalt
16
+ #Alt+Enter: toggle fullscreen
17
+ TCOD.console_set_fullscreen(!TCOD.console_is_fullscreen())
18
+ elsif key.vk == TCOD::KEY_ESCAPE
19
+ return true #exit game
20
+ end
21
+
22
+ #movement keys
23
+ if TCOD.console_is_key_pressed(TCOD::KEY_UP)
24
+ $playery -= 1
25
+ elsif TCOD.console_is_key_pressed(TCOD::KEY_DOWN)
26
+ $playery += 1
27
+ elsif TCOD.console_is_key_pressed(TCOD::KEY_LEFT)
28
+ $playerx -= 1
29
+ elsif TCOD.console_is_key_pressed(TCOD::KEY_RIGHT)
30
+ $playerx += 1
31
+ end
32
+
33
+ false
34
+ end
35
+
36
+ #############################################
37
+ # Initialization & Main Loop
38
+ #############################################
39
+
40
+ TCOD.console_set_custom_font('arial10x10.png', TCOD::FONT_TYPE_GREYSCALE | TCOD::FONT_LAYOUT_TCOD, 0, 0)
41
+ TCOD.console_init_root(SCREEN_WIDTH, SCREEN_HEIGHT, 'ruby/TCOD tutorial', false, TCOD::RENDERER_SDL)
42
+ TCOD.sys_set_fps(LIMIT_FPS)
43
+
44
+ $playerx = SCREEN_WIDTH/2
45
+ $playery = SCREEN_HEIGHT/2
46
+
47
+ until TCOD.console_is_window_closed
48
+ TCOD.console_set_default_foreground(nil, TCOD::Color::WHITE)
49
+ TCOD.console_put_char(nil, $playerx, $playery, '@'.ord, TCOD::BKGND_NONE)
50
+
51
+ TCOD.console_flush()
52
+
53
+ TCOD.console_put_char(nil, $playerx, $playery, ' '.ord, TCOD::BKGND_NONE)
54
+
55
+ #handle keys and exit game if needed
56
+ will_exit = handle_keys
57
+ break if will_exit
58
+ end
@@ -1,5 +1,9 @@
1
- require "libtcod/version"
1
+ require 'ffi'
2
+ require 'libtcod/version'
3
+ require 'libtcod/struct'
4
+ require 'libtcod/consts'
5
+ require 'libtcod/bindings'
6
+ require 'libtcod/color_consts'
7
+ require 'libtcod/console'
2
8
 
3
- module Libtcod
4
-
5
- end
9
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
@@ -0,0 +1,640 @@
1
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
2
+
3
+ module TCOD
4
+ extend FFI::Library
5
+
6
+ if RUBY_PLATFORM.include?('x86_64')
7
+ ffi_lib ['libtcod', File.join(APP_ROOT, "clib/amd64/libtcod.so")]
8
+ else
9
+ ffi_lib ['libtcod', File.join(APP_ROOT, "clib/i686/libtcod.so")]
10
+ end
11
+
12
+ # Remove redundant namespacing
13
+ def self.tcod_function(sym, *args)
14
+ attach_function(sym[5..-1].to_sym, sym, *args)
15
+ end
16
+
17
+ ### Color module
18
+ class Color < FFI::Struct
19
+ layout :r, :uchar,
20
+ :g, :uchar,
21
+ :b, :uchar
22
+
23
+ def self.rgb(r,g,b)
24
+ TCOD.color_RGB(r,g,b)
25
+ end
26
+
27
+ def self.hsv(h,s,v)
28
+ TCOD.color_HSV(h,s,v)
29
+ end
30
+
31
+ def ==(col)
32
+ TCOD.color_equals(self, col)
33
+ end
34
+
35
+ def *(col_or_float)
36
+ if col_or_float.is_a? Color
37
+ TCOD.color_multiply(self, col_or_float)
38
+ else
39
+ TCOD.color_multiply_scalar(self, col_or_float)
40
+ end
41
+ end
42
+
43
+ def to_s
44
+ "<Color #{self[:r]}, #{self[:g]}, #{self[:b]}>"
45
+ end
46
+ end
47
+
48
+ tcod_function :TCOD_color_RGB, [ :uchar, :uchar, :uchar ], Color.val
49
+ tcod_function :TCOD_color_HSV, [ :float, :float, :float ], Color.val
50
+ tcod_function :TCOD_color_equals, [ Color.val, Color.val ], :bool
51
+ tcod_function :TCOD_color_add, [ Color.val, Color.val ], Color.val
52
+ tcod_function :TCOD_color_subtract, [ Color.val, Color.val ], Color.val
53
+ tcod_function :TCOD_color_multiply, [ Color.val, Color.val ], Color.val
54
+ tcod_function :TCOD_color_multiply_scalar, [ Color.val, :float ], Color.val
55
+ tcod_function :TCOD_color_lerp, [ Color.val, Color.val, :float ], Color.val
56
+ tcod_function :TCOD_color_set_HSV, [ :pointer, :float, :float, :float ], :void
57
+ tcod_function :TCOD_color_get_HSV, [ Color.val, :pointer, :pointer, :pointer ], :void
58
+ tcod_function :TCOD_color_get_hue, [ Color.val ], :float
59
+ tcod_function :TCOD_color_set_hue, [ :pointer, :float ], :void
60
+ tcod_function :TCOD_color_get_saturation, [ Color.val ], :float
61
+ tcod_function :TCOD_color_set_saturation, [ :pointer, :float ], :void
62
+ tcod_function :TCOD_color_get_value, [ Color.val ], :float
63
+ tcod_function :TCOD_color_set_value, [ :pointer, :float ], :void
64
+ tcod_function :TCOD_color_shift_hue, [ :pointer, :float ], :void
65
+ tcod_function :TCOD_color_scale_HSV, [ :pointer, :float, :float ], :void
66
+ tcod_function :TCOD_color_gen_map, [ :pointer, :int, :pointer, :pointer ], :void
67
+
68
+ ### Console module
69
+ class Key < MethodStruct
70
+ layout :vk, :int,
71
+ :c, :uchar,
72
+ :pressed, :bool,
73
+ :lalt, :bool,
74
+ :lctrl, :bool,
75
+ :ralt, :bool,
76
+ :rctrl, :bool,
77
+ :shift, :bool
78
+ end
79
+
80
+ TCOD_renderer_t = :int
81
+ TCOD_bkgnd_flag_t = :int
82
+ TCOD_alignment_t = :int
83
+ TCOD_keycode_t = :int
84
+ TCOD_colctrl_t = :int
85
+ TCOD_console_t = :pointer
86
+
87
+ tcod_function :TCOD_console_init_root, [ :int, :int, :string, :bool, TCOD_renderer_t ], :void
88
+ tcod_function :TCOD_console_set_window_title, [ :string ], :void
89
+ tcod_function :TCOD_console_set_fullscreen, [ :bool ], :void
90
+ tcod_function :TCOD_console_is_fullscreen, [ ], :bool
91
+ tcod_function :TCOD_console_is_window_closed, [ ], :bool
92
+ tcod_function :TCOD_console_set_custom_font, [ :string, :int, :int, :int ], :void
93
+ tcod_function :TCOD_console_map_ascii_code_to_font, [ :int, :int, :int ], :void
94
+ tcod_function :TCOD_console_map_ascii_codes_to_font, [ :int, :int, :int, :int ], :void
95
+ tcod_function :TCOD_console_map_string_to_font, [ :string, :int, :int ], :void
96
+ tcod_function :TCOD_console_set_dirty, [ :int, :int, :int, :int ], :void
97
+ tcod_function :TCOD_console_set_default_background, [ :pointer, Color.val ], :void
98
+ tcod_function :TCOD_console_set_default_foreground, [ :pointer, Color.val ], :void
99
+ tcod_function :TCOD_console_clear, [ :pointer ], :void
100
+ tcod_function :TCOD_console_set_char_background, [ :pointer, :int, :int, Color.val, TCOD_bkgnd_flag_t ], :void
101
+ tcod_function :TCOD_console_set_char_foreground, [ :pointer, :int, :int, Color.val ], :void
102
+ tcod_function :TCOD_console_set_char, [ :pointer, :int, :int, :int ], :void
103
+ tcod_function :TCOD_console_put_char, [ :pointer, :int, :int, :int, TCOD_bkgnd_flag_t ], :void
104
+ tcod_function :TCOD_console_put_char_ex, [ :pointer, :int, :int, :int, Color.val, Color.val ], :void
105
+ tcod_function :TCOD_console_set_background_flag, [ :pointer, TCOD_bkgnd_flag_t ], :void
106
+ tcod_function :TCOD_console_get_background_flag, [ :pointer ], TCOD_bkgnd_flag_t
107
+ tcod_function :TCOD_console_set_alignment, [ :pointer, TCOD_alignment_t ], :void
108
+ tcod_function :TCOD_console_get_alignment, [ :pointer ], TCOD_alignment_t
109
+ tcod_function :TCOD_console_print, [ :pointer, :int, :int, :string, :varargs ], :void
110
+ tcod_function :TCOD_console_print_ex, [ :pointer, :int, :int, TCOD_bkgnd_flag_t, TCOD_alignment_t, :string, :varargs ], :void
111
+ tcod_function :TCOD_console_print_rect, [ :pointer, :int, :int, :int, :int, :string, :varargs ], :int
112
+ tcod_function :TCOD_console_print_rect_ex, [ :pointer, :int, :int, :int, :int, TCOD_bkgnd_flag_t, TCOD_alignment_t, :string, :varargs ], :int
113
+ tcod_function :TCOD_console_get_height_rect, [ :pointer, :int, :int, :int, :int, :string, :varargs ], :int
114
+ tcod_function :TCOD_console_rect, [ :pointer, :int, :int, :int, :int, :bool, TCOD_bkgnd_flag_t ], :void
115
+ tcod_function :TCOD_console_hline, [ :pointer, :int, :int, :int, TCOD_bkgnd_flag_t ], :void
116
+ tcod_function :TCOD_console_vline, [ :pointer, :int, :int, :int, TCOD_bkgnd_flag_t ], :void
117
+ tcod_function :TCOD_console_print_frame, [ :pointer, :int, :int, :int, :int, :bool, TCOD_bkgnd_flag_t, :string, :varargs ], :void
118
+ tcod_function :TCOD_console_map_string_to_font_utf, [ :pointer, :int, :int ], :void
119
+ tcod_function :TCOD_console_print_utf, [ :pointer, :int, :int, :pointer, :varargs ], :void
120
+ tcod_function :TCOD_console_print_ex_utf, [ :pointer, :int, :int, TCOD_bkgnd_flag_t, TCOD_alignment_t, :pointer, :varargs ], :void
121
+ tcod_function :TCOD_console_print_rect_utf, [ :pointer, :int, :int, :int, :int, :pointer, :varargs ], :int
122
+ tcod_function :TCOD_console_print_rect_ex_utf, [ :pointer, :int, :int, :int, :int, TCOD_bkgnd_flag_t, TCOD_alignment_t, :pointer, :varargs ], :int
123
+ tcod_function :TCOD_console_get_height_rect_utf, [ :pointer, :int, :int, :int, :int, :pointer, :varargs ], :int
124
+ tcod_function :TCOD_console_get_default_background, [ :pointer ], Color.val
125
+ tcod_function :TCOD_console_get_default_foreground, [ :pointer ], Color.val
126
+ tcod_function :TCOD_console_get_char_background, [ :pointer, :int, :int ], Color.val
127
+ tcod_function :TCOD_console_get_char_foreground, [ :pointer, :int, :int ], Color.val
128
+ tcod_function :TCOD_console_get_char, [ :pointer, :int, :int ], :int
129
+ tcod_function :TCOD_console_set_fade, [ :uchar, Color.val ], :void
130
+ tcod_function :TCOD_console_get_fade, [ ], :uchar
131
+ tcod_function :TCOD_console_get_fading_color, [ ], Color.val
132
+ tcod_function :TCOD_console_flush, [ ], :void
133
+ tcod_function :TCOD_console_set_color_control, [ TCOD_colctrl_t, Color.val, Color.val ], :void
134
+ tcod_function :TCOD_console_check_for_keypress, [ :int ], Key.val
135
+ tcod_function :TCOD_console_wait_for_keypress, [ :bool ], Key.val
136
+ tcod_function :TCOD_console_set_keyboard_repeat, [ :int, :int ], :void
137
+ tcod_function :TCOD_console_disable_keyboard_repeat, [ ], :void
138
+ tcod_function :TCOD_console_is_key_pressed, [ TCOD_keycode_t ], :bool
139
+ tcod_function :TCOD_console_from_file, [ :string ], :pointer
140
+ tcod_function :TCOD_console_load_asc, [ :pointer, :string ], :bool
141
+ tcod_function :TCOD_console_load_apf, [ :pointer, :string ], :bool
142
+ tcod_function :TCOD_console_save_asc, [ :pointer, :string ], :bool
143
+ tcod_function :TCOD_console_save_apf, [ :pointer, :string ], :bool
144
+ tcod_function :TCOD_console_new, [ :int, :int ], :pointer
145
+ tcod_function :TCOD_console_get_width, [ :pointer ], :int
146
+ tcod_function :TCOD_console_get_height, [ :pointer ], :int
147
+ tcod_function :TCOD_console_set_key_color, [ :pointer, Color.val ], :void
148
+ tcod_function :TCOD_console_blit, [ :pointer, :int, :int, :int, :int, :pointer, :int, :int, :float, :float ], :void
149
+ tcod_function :TCOD_console_delete, [ :pointer ], :void
150
+ tcod_function :TCOD_console_credits, [ ], :void
151
+ tcod_function :TCOD_console_credits_reset, [ ], :void
152
+ tcod_function :TCOD_console_credits_render, [ :int, :int, :bool ], :bool
153
+
154
+ ### System module
155
+ EVENT_KEY_PRESS = 1
156
+ EVENT_MOUSE_RELEASE = 16
157
+ EVENT_KEY_RELEASE = 2
158
+ EVENT_MOUSE_MOVE = 4
159
+ EVENT_MOUSE_PRESS = 8
160
+ EVENT_MOUSE = EVENT_MOUSE_MOVE|EVENT_MOUSE_PRESS|EVENT_MOUSE_RELEASE
161
+ EVENT_KEY = EVENT_KEY_PRESS|EVENT_KEY_RELEASE
162
+ EVENT_ANY = EVENT_KEY|EVENT_MOUSE
163
+
164
+ TCOD_image_t = :pointer
165
+ TCOD_list_t = :pointer
166
+
167
+ tcod_function :TCOD_sys_elapsed_milli, [ ], :uint32
168
+ tcod_function :TCOD_sys_elapsed_seconds, [ ], :float
169
+ tcod_function :TCOD_sys_sleep_milli, [ :uint32 ], :void
170
+ tcod_function :TCOD_sys_save_screenshot, [ :string ], :void
171
+ tcod_function :TCOD_sys_force_fullscreen_resolution, [ :int, :int ], :void
172
+ tcod_function :TCOD_sys_set_renderer, [ TCOD_renderer_t ], :void
173
+ tcod_function :TCOD_sys_get_renderer, [ ], TCOD_renderer_t
174
+ tcod_function :TCOD_sys_set_fps, [ :int ], :void
175
+ tcod_function :TCOD_sys_get_fps, [ ], :int
176
+ tcod_function :TCOD_sys_get_last_frame_length, [ ], :float
177
+ tcod_function :TCOD_sys_get_current_resolution, [ :pointer, :pointer ], :void
178
+ tcod_function :TCOD_sys_get_fullscreen_offsets, [ :pointer, :pointer ], :void
179
+ tcod_function :TCOD_sys_update_char, [ :int, :int, :int, TCOD_image_t, :int, :int ], :void
180
+ tcod_function :TCOD_sys_get_char_size, [ :pointer, :pointer ], :void
181
+ #tcod_function :TCOD_sys_get_sdl_window, [ ], :pointer
182
+
183
+ tcod_function :TCOD_sys_wait_for_event, [ :int, :pointer, :pointer, :bool ], :int
184
+ tcod_function :TCOD_sys_check_for_event, [ :int, :pointer, :pointer ], :int
185
+ tcod_function :TCOD_sys_create_directory, [ :string ], :bool
186
+ tcod_function :TCOD_sys_delete_file, [ :string ], :bool
187
+ tcod_function :TCOD_sys_delete_directory, [ :string ], :bool
188
+ tcod_function :TCOD_sys_is_directory, [ :string ], :bool
189
+ tcod_function :TCOD_sys_get_directory_content, [ :string, :string ], TCOD_list_t
190
+ tcod_function :TCOD_sys_file_exists, [ :string, :varargs ], :bool
191
+ tcod_function :TCOD_sys_read_file, [ :string, :pointer, :pointer ], :bool
192
+ tcod_function :TCOD_sys_write_file, [ :string, :pointer, :uint32 ], :bool
193
+ tcod_function :TCOD_sys_clipboard_set, [ :string ], :void
194
+ tcod_function :TCOD_sys_clipboard_get, [ ], :string
195
+ tcod_function :TCOD_thread_new, [ callback([ :pointer ], :int), :pointer ], :pointer
196
+ tcod_function :TCOD_thread_delete, [ :pointer ], :void
197
+ tcod_function :TCOD_sys_get_num_cores, [ ], :int
198
+ tcod_function :TCOD_thread_wait, [ :pointer ], :void
199
+ tcod_function :TCOD_mutex_new, [ ], :pointer
200
+ tcod_function :TCOD_mutex_in, [ :pointer ], :void
201
+ tcod_function :TCOD_mutex_out, [ :pointer ], :void
202
+ tcod_function :TCOD_mutex_delete, [ :pointer ], :void
203
+ tcod_function :TCOD_semaphore_new, [ :int ], :pointer
204
+ tcod_function :TCOD_semaphore_lock, [ :pointer ], :void
205
+ tcod_function :TCOD_semaphore_unlock, [ :pointer ], :void
206
+ tcod_function :TCOD_semaphore_delete, [ :pointer ], :void
207
+ tcod_function :TCOD_condition_new, [ ], :pointer
208
+ tcod_function :TCOD_condition_signal, [ :pointer ], :void
209
+ tcod_function :TCOD_condition_broadcast, [ :pointer ], :void
210
+ tcod_function :TCOD_condition_wait, [ :pointer, :pointer ], :void
211
+ tcod_function :TCOD_condition_delete, [ :pointer ], :void
212
+ tcod_function :TCOD_load_library, [ :string ], :pointer
213
+ tcod_function :TCOD_get_function_address, [ :pointer, :string ], :pointer
214
+ tcod_function :TCOD_close_library, [ :pointer ], :void
215
+ callback(:SDL_renderer_t, [ :pointer ], :void)
216
+ tcod_function :TCOD_sys_register_SDL_renderer, [ :SDL_renderer_t ], :void
217
+
218
+ ### Line module
219
+ class BresenhamData < MethodStruct
220
+ layout(
221
+ :stepx, :int,
222
+ :stepy, :int,
223
+ :e, :int,
224
+ :deltax, :int,
225
+ :deltay, :int,
226
+ :origx, :int,
227
+ :origy, :int,
228
+ :destx, :int,
229
+ :desty, :int
230
+ )
231
+ end
232
+ callback(:TCOD_line_listener_t, [ :int, :int ], :bool)
233
+ tcod_function :TCOD_line_init, [ :int, :int, :int, :int ], :void
234
+ tcod_function :TCOD_line_step, [ :pointer, :pointer ], :bool
235
+ tcod_function :TCOD_line, [ :int, :int, :int, :int, :TCOD_line_listener_t ], :bool
236
+ tcod_function :TCOD_line_init_mt, [ :int, :int, :int, :int, :pointer ], :void
237
+ tcod_function :TCOD_line_step_mt, [ :pointer, :pointer, :pointer ], :bool
238
+ tcod_function :TCOD_line_mt, [ :int, :int, :int, :int, :TCOD_line_listener_t, :pointer ], :bool
239
+
240
+ ### Image module
241
+ tcod_function :TCOD_image_new, [ :int, :int ], :pointer
242
+ tcod_function :TCOD_image_from_console, [ TCOD_console_t ], :pointer
243
+ tcod_function :TCOD_image_refresh_console, [ :pointer, TCOD_console_t ], :void
244
+ tcod_function :TCOD_image_load, [ :string ], :pointer
245
+ tcod_function :TCOD_image_clear, [ :pointer, Color.val ], :void
246
+ tcod_function :TCOD_image_invert, [ :pointer ], :void
247
+ tcod_function :TCOD_image_hflip, [ :pointer ], :void
248
+ tcod_function :TCOD_image_rotate90, [ :pointer, :int ], :void
249
+ tcod_function :TCOD_image_vflip, [ :pointer ], :void
250
+ tcod_function :TCOD_image_scale, [ :pointer, :int, :int ], :void
251
+ tcod_function :TCOD_image_save, [ :pointer, :string ], :void
252
+ tcod_function :TCOD_image_get_size, [ :pointer, :pointer, :pointer ], :void
253
+ tcod_function :TCOD_image_get_pixel, [ :pointer, :int, :int ], Color.val
254
+ tcod_function :TCOD_image_get_alpha, [ :pointer, :int, :int ], :int
255
+ tcod_function :TCOD_image_get_mipmap_pixel, [ :pointer, :float, :float, :float, :float ], Color.val
256
+ tcod_function :TCOD_image_put_pixel, [ :pointer, :int, :int, Color.val ], :void
257
+ tcod_function :TCOD_image_blit, [ :pointer, TCOD_console_t, :float, :float, TCOD_bkgnd_flag_t, :float, :float, :float ], :void
258
+ tcod_function :TCOD_image_blit_rect, [ :pointer, TCOD_console_t, :int, :int, :int, :int, TCOD_bkgnd_flag_t ], :void
259
+ tcod_function :TCOD_image_blit_2x, [ :pointer, TCOD_console_t, :int, :int, :int, :int, :int, :int ], :void
260
+ tcod_function :TCOD_image_delete, [ :pointer ], :void
261
+ tcod_function :TCOD_image_set_key_color, [ :pointer, Color.val ], :void
262
+ tcod_function :TCOD_image_is_pixel_transparent, [ :pointer, :int, :int ], :bool
263
+
264
+ ### Mouse module
265
+ class MouseStatus < MethodStruct
266
+ layout(
267
+ :x, :int,
268
+ :y, :int,
269
+ :dx, :int,
270
+ :dy, :int,
271
+ :cx, :int,
272
+ :cy, :int,
273
+ :dcx, :int,
274
+ :dcy, :int,
275
+ :lbutton, :bool,
276
+ :rbutton, :bool,
277
+ :mbutton, :bool,
278
+ :lbutton_pressed, :bool,
279
+ :rbutton_pressed, :bool,
280
+ :mbutton_pressed, :bool,
281
+ :wheel_up, :bool,
282
+ :wheel_down, :bool
283
+ )
284
+ end
285
+ attach_function :TCOD_mouse_show_cursor, [ :bool ], :void
286
+ attach_function :TCOD_mouse_get_status, [ ], MouseStatus
287
+ attach_function :TCOD_mouse_is_cursor_visible, [ ], :bool
288
+ attach_function :TCOD_mouse_move, [ :int, :int ], :void
289
+ #attach_function :TCOD_mouse_includes_touch, [ :bool ], :void
290
+
291
+ ### Parser module
292
+ TYPE_NONE = 0
293
+ TYPE_BOOL = 1
294
+ TYPE_VALUELIST02 = 10
295
+ TYPE_LIST = 1024
296
+ TYPE_VALUELIST03 = 11
297
+ TYPE_VALUELIST04 = 12
298
+ TYPE_VALUELIST05 = 13
299
+ TYPE_VALUELIST06 = 14
300
+ TYPE_VALUELIST07 = 15
301
+ TYPE_VALUELIST08 = 16
302
+ TYPE_VALUELIST09 = 17
303
+ TYPE_VALUELIST10 = 18
304
+ TYPE_VALUELIST11 = 19
305
+ TYPE_CHAR = 2
306
+ TYPE_VALUELIST12 = 20
307
+ TYPE_VALUELIST13 = 21
308
+ TYPE_VALUELIST14 = 22
309
+ TYPE_VALUELIST15 = 23
310
+ TYPE_CUSTOM00 = 24
311
+ TYPE_CUSTOM01 = 25
312
+ TYPE_CUSTOM02 = 26
313
+ TYPE_CUSTOM03 = 27
314
+ TYPE_CUSTOM04 = 28
315
+ TYPE_CUSTOM05 = 29
316
+ TYPE_INT = 3
317
+ TYPE_CUSTOM06 = 30
318
+ TYPE_CUSTOM07 = 31
319
+ TYPE_CUSTOM08 = 32
320
+ TYPE_CUSTOM09 = 33
321
+ TYPE_CUSTOM10 = 34
322
+ TYPE_CUSTOM11 = 35
323
+ TYPE_CUSTOM12 = 36
324
+ TYPE_CUSTOM13 = 37
325
+ TYPE_CUSTOM14 = 38
326
+ TYPE_CUSTOM15 = 39
327
+ TYPE_FLOAT = 4
328
+ TYPE_STRING = 5
329
+ TYPE_COLOR = 6
330
+ TYPE_DICE = 7
331
+ TYPE_VALUELIST00 = 8
332
+ TYPE_VALUELIST01 = 9
333
+
334
+ class Dice < MethodStruct
335
+ layout(
336
+ :nb_rolls, :int,
337
+ :nb_faces, :int,
338
+ :multiplier, :float,
339
+ :addsub, :float
340
+ )
341
+ end
342
+
343
+ class TCODValueT < MethodUnion
344
+ layout(
345
+ :b, :bool,
346
+ :c, :char,
347
+ :i, :int32,
348
+ :f, :float,
349
+ :s, :pointer,
350
+ :col, Color,
351
+ :dice, Dice,
352
+ :list, TCOD_list_t,
353
+ :custom, :pointer
354
+ )
355
+ def s=(str)
356
+ @s = FFI::MemoryPointer.from_string(str)
357
+ self[:s] = @s
358
+ end
359
+ def s
360
+ @s.get_string(0)
361
+ end
362
+ end
363
+
364
+ class TCODStructIntT < MethodStruct
365
+ layout(
366
+ :name, :pointer,
367
+ :flags, TCOD_list_t,
368
+ :props, TCOD_list_t,
369
+ :lists, TCOD_list_t,
370
+ :structs, TCOD_list_t
371
+ )
372
+ def name=(str)
373
+ @name = FFI::MemoryPointer.from_string(str)
374
+ self[:name] = @name
375
+ end
376
+ def name
377
+ @name.get_string(0)
378
+ end
379
+ end
380
+
381
+ callback(:TCOD_parser_custom_t, [ :pointer, :pointer, :pointer, :string ], TCODValueT.val)
382
+ class TCODParserIntT < MethodStruct
383
+ layout(
384
+ :structs, TCOD_list_t,
385
+ :customs, [:TCOD_parser_custom_t, 16],
386
+ :fatal, :bool,
387
+ :props, TCOD_list_t
388
+ )
389
+ end
390
+
391
+ class TCODParserListenerT < MethodStruct
392
+ layout(
393
+ :new_struct, callback([ :pointer, :string ], :bool),
394
+ :new_flag, callback([ :string ], :bool),
395
+ :new_property, callback([ :string, :int, TCODValueT ], :bool),
396
+ :end_struct, callback([ :pointer, :string ], :bool),
397
+ :error, callback([ :string ], :void)
398
+ )
399
+ end
400
+
401
+ tcod_function :TCOD_struct_get_name, [ :pointer ], :string
402
+ tcod_function :TCOD_struct_add_property, [ :pointer, :string, :int, :bool ], :void
403
+ tcod_function :TCOD_struct_add_list_property, [ :pointer, :string, :int, :bool ], :void
404
+ tcod_function :TCOD_struct_add_value_list, [ :pointer, :string, :pointer, :bool ], :void
405
+ tcod_function :TCOD_struct_add_value_list_sized, [ :pointer, :string, :pointer, :int, :bool ], :void
406
+ tcod_function :TCOD_struct_add_flag, [ :pointer, :string ], :void
407
+ tcod_function :TCOD_struct_add_structure, [ :pointer, :pointer ], :void
408
+ tcod_function :TCOD_struct_is_mandatory, [ :pointer, :string ], :bool
409
+ tcod_function :TCOD_struct_get_type, [ :pointer, :string ], :int
410
+
411
+ tcod_function :TCOD_parser_new, [ ], :pointer
412
+ tcod_function :TCOD_parser_new_struct, [ :pointer, :string ], :pointer
413
+ tcod_function :TCOD_parser_new_custom_type, [ :pointer, :TCOD_parser_custom_t ], :int
414
+ tcod_function :TCOD_parser_run, [ :pointer, :string, :pointer ], :void
415
+ tcod_function :TCOD_parser_delete, [ :pointer ], :void
416
+ tcod_function :TCOD_parser_error, [ :string, :varargs ], :void
417
+ tcod_function :TCOD_parser_get_bool_property, [ :pointer, :string ], :bool
418
+ tcod_function :TCOD_parser_get_char_property, [ :pointer, :string ], :int
419
+ tcod_function :TCOD_parser_get_int_property, [ :pointer, :string ], :int
420
+ tcod_function :TCOD_parser_get_float_property, [ :pointer, :string ], :float
421
+ tcod_function :TCOD_parser_get_string_property, [ :pointer, :string ], :string
422
+ tcod_function :TCOD_parser_get_color_property, [ :pointer, :string ], Color.val
423
+ tcod_function :TCOD_parser_get_dice_property, [ :pointer, :string ], Dice.val
424
+ tcod_function :TCOD_parser_get_dice_property_py, [ :pointer, :string, :pointer ], :void
425
+ tcod_function :TCOD_parser_get_custom_property, [ :pointer, :string ], :pointer
426
+ tcod_function :TCOD_parser_get_list_property, [ :pointer, :string, :int ], TCOD_list_t
427
+
428
+ tcod_function :TCOD_parse_bool_value, [ ], TCODValueT
429
+ tcod_function :TCOD_parse_char_value, [ ], TCODValueT
430
+ tcod_function :TCOD_parse_integer_value, [ ], TCODValueT
431
+ tcod_function :TCOD_parse_float_value, [ ], TCODValueT
432
+ tcod_function :TCOD_parse_string_value, [ ], TCODValueT
433
+ tcod_function :TCOD_parse_color_value, [ ], TCODValueT
434
+ tcod_function :TCOD_parse_dice_value, [ ], TCODValueT
435
+ tcod_function :TCOD_parse_value_list_value, [ :pointer, :int ], TCODValueT
436
+ tcod_function :TCOD_parse_property_value, [ :pointer, :pointer, :string, :bool ], TCODValueT
437
+
438
+ ### Random module
439
+ RNG_MT = 0
440
+ RNG_CMWC = 1
441
+
442
+ DISTRIBUTION_LINEAR = 0
443
+ DISTRIBUTION_GAUSSIAN = 1
444
+ DISTRIBUTION_GAUSSIAN_RANGE = 2
445
+ DISTRIBUTION_GAUSSIAN_INVERSE = 3
446
+ DISTRIBUTION_GAUSSIAN_RANGE_INVERSE = 4
447
+
448
+ TCOD_random_algo_t = :int
449
+ TCOD_distribution_t = :int
450
+ TCOD_random_t = :pointer
451
+
452
+ tcod_function :TCOD_random_get_instance, [ ], :pointer
453
+ tcod_function :TCOD_random_new, [ TCOD_random_algo_t ], :pointer
454
+ tcod_function :TCOD_random_save, [ :pointer ], :pointer
455
+ tcod_function :TCOD_random_restore, [ :pointer, :pointer ], :void
456
+ tcod_function :TCOD_random_new_from_seed, [ TCOD_random_algo_t, :uint32 ], :pointer
457
+ tcod_function :TCOD_random_delete, [ :pointer ], :void
458
+ tcod_function :TCOD_random_set_distribution, [ :pointer, TCOD_distribution_t ], :void
459
+ tcod_function :TCOD_random_get_int, [ :pointer, :int, :int ], :int
460
+ tcod_function :TCOD_random_get_float, [ :pointer, :float, :float ], :float
461
+ tcod_function :TCOD_random_get_double, [ :pointer, :double, :double ], :double
462
+ tcod_function :TCOD_random_get_int_mean, [ :pointer, :int, :int, :int ], :int
463
+ tcod_function :TCOD_random_get_float_mean, [ :pointer, :float, :float, :float ], :float
464
+ tcod_function :TCOD_random_get_double_mean, [ :pointer, :double, :double, :double ], :double
465
+ tcod_function :TCOD_random_dice_new, [ :string ], Dice.val
466
+ tcod_function :TCOD_random_dice_roll, [ :pointer, Dice.val ], :int
467
+ tcod_function :TCOD_random_dice_roll_s, [ :pointer, :string ], :int
468
+
469
+ ### Noise module
470
+ NOISE_DEFAULT_HURST = 0.5
471
+ NOISE_DEFAULT_LACUNARITY = 2.0
472
+
473
+ NOISE_DEFAULT = 0
474
+ NOISE_PERLIN = 1
475
+ NOISE_SIMPLEX = 2
476
+ NOISE_WAVELET = 4
477
+
478
+ tcod_function :TCOD_noise_new, [ :int, :float, :float, TCOD_random_t ], :pointer
479
+ tcod_function :TCOD_noise_set_type, [ :pointer, :int ], :void
480
+ tcod_function :TCOD_noise_get_ex, [ :pointer, :pointer, :int ], :float
481
+ tcod_function :TCOD_noise_get_fbm_ex, [ :pointer, :pointer, :float, :int ], :float
482
+ tcod_function :TCOD_noise_get_turbulence_ex, [ :pointer, :pointer, :float, :int ], :float
483
+ tcod_function :TCOD_noise_get, [ :pointer, :pointer ], :float
484
+ tcod_function :TCOD_noise_get_fbm, [ :pointer, :pointer, :float ], :float
485
+ tcod_function :TCOD_noise_get_turbulence, [ :pointer, :pointer, :float ], :float
486
+ tcod_function :TCOD_noise_delete, [ :pointer ], :void
487
+
488
+ ### FOV module
489
+ FOV_BASIC = 0
490
+ FOV_DIAMOND = 1
491
+ FOV_SHADOW = 2
492
+ FOV_PERMISSIVE_0 = 3
493
+ FOV_PERMISSIVE_1 = 4
494
+ FOV_PERMISSIVE_2 = 5
495
+ FOV_PERMISSIVE_3 = 6
496
+ FOV_PERMISSIVE_4 = 7
497
+ FOV_PERMISSIVE_5 = 8
498
+ FOV_PERMISSIVE_6 = 9
499
+ FOV_PERMISSIVE_7 = 10
500
+ FOV_PERMISSIVE_8 = 11
501
+ FOV_RESTRICTIVE = 12
502
+ NB_FOV_ALGORITHMS = 13
503
+
504
+ TCOD_fov_algorithm_t = :int
505
+
506
+ tcod_function :TCOD_map_new, [ :int, :int ], :pointer
507
+ tcod_function :TCOD_map_clear, [ :pointer, :bool, :bool ], :void
508
+ tcod_function :TCOD_map_copy, [ :pointer, :pointer ], :void
509
+ tcod_function :TCOD_map_set_properties, [ :pointer, :int, :int, :bool, :bool ], :void
510
+ tcod_function :TCOD_map_delete, [ :pointer ], :void
511
+ tcod_function :TCOD_map_compute_fov, [ :pointer, :int, :int, :int, :bool, TCOD_fov_algorithm_t ], :void
512
+ tcod_function :TCOD_map_is_in_fov, [ :pointer, :int, :int ], :bool
513
+ tcod_function :TCOD_map_set_in_fov, [ :pointer, :int, :int, :bool ], :void
514
+ tcod_function :TCOD_map_is_transparent, [ :pointer, :int, :int ], :bool
515
+ tcod_function :TCOD_map_is_walkable, [ :pointer, :int, :int ], :bool
516
+ tcod_function :TCOD_map_get_width, [ :pointer ], :int
517
+ tcod_function :TCOD_map_get_height, [ :pointer ], :int
518
+ tcod_function :TCOD_map_get_nb_cells, [ :pointer ], :int
519
+
520
+ ### Pathfinding module
521
+ TCOD_map_t = :pointer
522
+
523
+ callback(:TCOD_path_func_t, [ :int, :int, :int, :int, :pointer ], :float)
524
+ tcod_function :TCOD_path_new_using_map, [ TCOD_map_t, :float ], :pointer
525
+ tcod_function :TCOD_path_new_using_function, [ :int, :int, :TCOD_path_func_t, :pointer, :float ], :pointer
526
+ tcod_function :TCOD_path_compute, [ :pointer, :int, :int, :int, :int ], :bool
527
+ tcod_function :TCOD_path_walk, [ :pointer, :pointer, :pointer, :bool ], :bool
528
+ tcod_function :TCOD_path_is_empty, [ :pointer ], :bool
529
+ tcod_function :TCOD_path_size, [ :pointer ], :int
530
+ tcod_function :TCOD_path_reverse, [ :pointer ], :void
531
+ tcod_function :TCOD_path_get, [ :pointer, :int, :pointer, :pointer ], :void
532
+ tcod_function :TCOD_path_get_origin, [ :pointer, :pointer, :pointer ], :void
533
+ tcod_function :TCOD_path_get_destination, [ :pointer, :pointer, :pointer ], :void
534
+ tcod_function :TCOD_path_delete, [ :pointer ], :void
535
+ tcod_function :TCOD_dijkstra_new, [ TCOD_map_t, :float ], :pointer
536
+ tcod_function :TCOD_dijkstra_new_using_function, [ :int, :int, :TCOD_path_func_t, :pointer, :float ], :pointer
537
+ tcod_function :TCOD_dijkstra_compute, [ :pointer, :int, :int ], :void
538
+ tcod_function :TCOD_dijkstra_get_distance, [ :pointer, :int, :int ], :float
539
+ tcod_function :TCOD_dijkstra_path_set, [ :pointer, :int, :int ], :bool
540
+ tcod_function :TCOD_dijkstra_is_empty, [ :pointer ], :bool
541
+ tcod_function :TCOD_dijkstra_size, [ :pointer ], :int
542
+ tcod_function :TCOD_dijkstra_reverse, [ :pointer ], :void
543
+ tcod_function :TCOD_dijkstra_get, [ :pointer, :int, :pointer, :pointer ], :void
544
+ tcod_function :TCOD_dijkstra_path_walk, [ :pointer, :pointer, :pointer ], :bool
545
+ tcod_function :TCOD_dijkstra_delete, [ :pointer ], :void
546
+
547
+ ### BSP module
548
+ class TCODTreeT < FFI::Struct
549
+ layout(
550
+ :next, :pointer,
551
+ :father, :pointer,
552
+ :sons, :pointer
553
+ )
554
+ end
555
+ tcod_function :TCOD_tree_new, [ ], :pointer
556
+ tcod_function :TCOD_tree_add_son, [ :pointer, :pointer ], :void
557
+
558
+
559
+ class TCODBspT < MethodStruct
560
+ layout(
561
+ :tree, TCODTreeT,
562
+ :x, :int,
563
+ :y, :int,
564
+ :w, :int,
565
+ :h, :int,
566
+ :position, :int,
567
+ :level, :uint8,
568
+ :horizontal, :bool
569
+ )
570
+ end
571
+ callback(:TCOD_bsp_callback_t, [ :pointer, :pointer ], :bool)
572
+ tcod_function :TCOD_bsp_new, [ ], :pointer
573
+ tcod_function :TCOD_bsp_new_with_size, [ :int, :int, :int, :int ], :pointer
574
+ tcod_function :TCOD_bsp_delete, [ :pointer ], :void
575
+ tcod_function :TCOD_bsp_left, [ :pointer ], :pointer
576
+ tcod_function :TCOD_bsp_right, [ :pointer ], :pointer
577
+ tcod_function :TCOD_bsp_father, [ :pointer ], :pointer
578
+ tcod_function :TCOD_bsp_is_leaf, [ :pointer ], :bool
579
+ tcod_function :TCOD_bsp_traverse_pre_order, [ :pointer, :TCOD_bsp_callback_t, :pointer ], :bool
580
+ tcod_function :TCOD_bsp_traverse_in_order, [ :pointer, :TCOD_bsp_callback_t, :pointer ], :bool
581
+ tcod_function :TCOD_bsp_traverse_post_order, [ :pointer, :TCOD_bsp_callback_t, :pointer ], :bool
582
+ tcod_function :TCOD_bsp_traverse_level_order, [ :pointer, :TCOD_bsp_callback_t, :pointer ], :bool
583
+ tcod_function :TCOD_bsp_traverse_inverted_level_order, [ :pointer, :TCOD_bsp_callback_t, :pointer ], :bool
584
+ tcod_function :TCOD_bsp_contains, [ :pointer, :int, :int ], :bool
585
+ tcod_function :TCOD_bsp_find_node, [ :pointer, :int, :int ], :pointer
586
+ tcod_function :TCOD_bsp_resize, [ :pointer, :int, :int, :int, :int ], :void
587
+ tcod_function :TCOD_bsp_split_once, [ :pointer, :bool, :int ], :void
588
+ tcod_function :TCOD_bsp_split_recursive, [ :pointer, TCOD_random_t, :int, :int, :int, :float, :float ], :void
589
+ tcod_function :TCOD_bsp_remove_sons, [ :pointer ], :void
590
+
591
+ ### Heightmap module
592
+ class TCODHeightmapT < MethodStruct
593
+ layout(
594
+ :w, :int,
595
+ :h, :int,
596
+ :values, :pointer
597
+ )
598
+ end
599
+
600
+ TCOD_noise_t = :pointer
601
+ float_3 = :pointer # float n[3]
602
+ int_4 = :pointer
603
+
604
+ tcod_function :TCOD_heightmap_new, [ :int, :int ], :pointer
605
+ tcod_function :TCOD_heightmap_delete, [ :pointer ], :void
606
+ tcod_function :TCOD_heightmap_get_value, [ :pointer, :int, :int ], :float
607
+ tcod_function :TCOD_heightmap_get_interpolated_value, [ :pointer, :float, :float ], :float
608
+ tcod_function :TCOD_heightmap_set_value, [ :pointer, :int, :int, :float ], :void
609
+ tcod_function :TCOD_heightmap_get_slope, [ :pointer, :int, :int ], :float
610
+ tcod_function :TCOD_heightmap_get_normal, [ :pointer, :float, :float, float_3, :float ], :void
611
+ tcod_function :TCOD_heightmap_count_cells, [ :pointer, :float, :float ], :int
612
+ tcod_function :TCOD_heightmap_has_land_on_border, [ :pointer, :float ], :bool
613
+ tcod_function :TCOD_heightmap_get_minmax, [ :pointer, :pointer, :pointer ], :void
614
+ tcod_function :TCOD_heightmap_copy, [ :pointer, :pointer ], :void
615
+ tcod_function :TCOD_heightmap_add, [ :pointer, :float ], :void
616
+ tcod_function :TCOD_heightmap_scale, [ :pointer, :float ], :void
617
+ tcod_function :TCOD_heightmap_clamp, [ :pointer, :float, :float ], :void
618
+ tcod_function :TCOD_heightmap_normalize, [ :pointer, :float, :float ], :void
619
+ tcod_function :TCOD_heightmap_clear, [ :pointer ], :void
620
+ tcod_function :TCOD_heightmap_lerp_hm, [ :pointer, :pointer, :pointer, :float ], :void
621
+ tcod_function :TCOD_heightmap_add_hm, [ :pointer, :pointer, :pointer ], :void
622
+ tcod_function :TCOD_heightmap_multiply_hm, [ :pointer, :pointer, :pointer ], :void
623
+ tcod_function :TCOD_heightmap_add_hill, [ :pointer, :float, :float, :float, :float ], :void
624
+ tcod_function :TCOD_heightmap_dig_hill, [ :pointer, :float, :float, :float, :float ], :void
625
+ tcod_function :TCOD_heightmap_dig_bezier, [ :pointer, int_4, int_4, :float, :float, :float, :float ], :void
626
+ tcod_function :TCOD_heightmap_rain_erosion, [ :pointer, :int, :float, :float, TCOD_random_t ], :void
627
+ tcod_function :TCOD_heightmap_kernel_transform, [ :pointer, :int, :pointer, :pointer, :pointer, :float, :float ], :void
628
+ tcod_function :TCOD_heightmap_add_voronoi, [ :pointer, :int, :int, :pointer, TCOD_random_t ], :void
629
+ tcod_function :TCOD_heightmap_add_fbm, [ :pointer, TCOD_noise_t, :float, :float, :float, :float, :float, :float, :float ], :void
630
+ tcod_function :TCOD_heightmap_scale_fbm, [ :pointer, TCOD_noise_t, :float, :float, :float, :float, :float, :float, :float ], :void
631
+ tcod_function :TCOD_heightmap_islandify, [ :pointer, :float, TCOD_random_t ], :void
632
+
633
+
634
+ ### Name Generator module
635
+ tcod_function :TCOD_namegen_parse, [ :string, TCOD_random_t ], :void
636
+ tcod_function :TCOD_namegen_generate, [ :string, :bool ], :string
637
+ tcod_function :TCOD_namegen_generate_custom, [ :string, :string, :bool ], :string
638
+ tcod_function :TCOD_namegen_get_sets, [ ], TCOD_list_t
639
+ tcod_function :TCOD_namegen_destroy, [ ], :void
640
+ end