@@ -465,7 +465,69 @@ def __repr__(self):
465465_lib .TCOD_sys_check_for_event .restype = c_int
466466_lib .TCOD_sys_check_for_event .argtypes = (c_int , POINTER (_Key ), POINTER (_Mouse ))
467467
468+ # FOV
469+
470+ TCOD_map_t = c_void_p
471+
472+ _lib .TCOD_map_new .restype = TCOD_map_t
473+ _lib .TCOD_map_new .argtypes = (c_int , c_int )
474+ _lib .TCOD_map_delete .restype = None
475+ _lib .TCOD_map_delete .argtypes = (TCOD_map_t ,)
476+ _lib .TCOD_map_set_properties .restype = None
477+ _lib .TCOD_map_set_properties .argtypes = (TCOD_map_t , c_int , c_int , c_bool , c_bool )
478+
479+ _lib .TCOD_map_compute_fov .restype = None
480+ _lib .TCOD_map_compute_fov .argtypes = (TCOD_map_t , c_int , c_int , c_int , c_bool , c_int )
481+ _lib .TCOD_map_is_in_fov .restype = c_bool
482+ _lib .TCOD_map_is_in_fov .argtypes = (TCOD_map_t , c_int , c_int )
483+
484+ # PATH
485+
486+ TCOD_path_t = c_void_p
487+ PATHCALL = CFUNCTYPE (c_float , (c_int , c_int , c_int , c_int , c_void_p ))
488+
489+ _lib .TCOD_path_new_using_map .restype = TCOD_path_t
490+ _lib .TCOD_path_new_using_map .argtypes = (TCOD_map_t , c_float )
491+ _lib .TCOD_path_new_using_function .restype = TCOD_path_t
492+ _lib .TCOD_path_new_using_function .argtypes = (c_int , c_int , PATHCALL , c_void_p , c_float )
493+ _lib .TCOD_path_compute .restype = c_bool
494+ _lib .TCOD_path_compute .argtypes = (TCOD_path_t , c_int , c_int , c_int , c_int )
495+ _lib .TCOD_path_walk .restype = c_bool
496+ _lib .TCOD_path_walk .argtypes = (TCOD_path_t , POINTER (c_int ), POINTER (c_int ), c_bool )
497+ _lib .TCOD_path_size .restype = c_int
498+ _lib .TCOD_path_size .argtypes = (TCOD_path_t ,)
499+ _lib .TCOD_path_delete .restype = None
500+ _lib .TCOD_path_delete .argtypes = (TCOD_path_t ,)
501+
502+ # Dijkstra
503+
504+ TCOD_dijkstra_t = c_void_p
505+
506+ _lib .TCOD_dijkstra_new .restype = TCOD_dijkstra_t
507+ _lib .TCOD_dijkstra_new .argtypes = (TCOD_map_t , c_float )
508+ _lib .TCOD_dijkstra_new_using_function .restype = TCOD_dijkstra_t
509+ _lib .TCOD_dijkstra_new_using_function .argtypes = (c_int , c_int , PATHCALL , c_void_p , c_float )
510+ _lib .TCOD_dijkstra_compute .restype = None
511+ _lib .TCOD_dijkstra_compute .argtypes = (TCOD_dijkstra_t , c_int , c_int )
512+ _lib .TCOD_dijkstra_get_distance .restype = c_float
513+ _lib .TCOD_dijkstra_get_distance .argtypes = (TCOD_dijkstra_t , c_int , c_int )
514+ _lib .TCOD_dijkstra_path_set .restype = c_bool
515+ _lib .TCOD_dijkstra_path_set .argtypes = (TCOD_dijkstra_t , c_int , c_int )
516+ _lib .TCOD_dijkstra_size .restype = c_int
517+ _lib .TCOD_dijkstra_size .argtypes = (TCOD_dijkstra_t ,)
518+ _lib .TCOD_dijkstra_reverse .restype = None
519+ _lib .TCOD_dijkstra_reverse .argtypes = (TCOD_dijkstra_t ,)
520+ _lib .TCOD_dijkstra_path_walk .restype = None
521+ _lib .TCOD_dijkstra_path_walk .argtypes = (TCOD_path_t , POINTER (c_int ), POINTER (c_int ))
522+ _lib .TCOD_dijkstra_delete .restype = None
523+ _lib .TCOD_dijkstra_delete .argtypes = (TCOD_dijkstra_t ,)
524+
525+ #_lib..restype = None
526+ #_lib..argtypes =
527+
468528# these functions should perform ultra fast once I set them up
529+ # after testing it seems that converting python types to ctypes is slow no
530+ # matter how they are passed to C
469531_lib .TCOD_console_fill_background .restype = None
470532_lib .TCOD_console_fill_background .argtypes = (TCOD_console_t , POINTER (c_int ), POINTER (c_int ), POINTER (c_int ))
471533_lib .TCOD_console_fill_foreground .restype = None
0 commit comments