# native.ludic - the shim's symbols (native/shim/nav_shim.cpp). A navmesh is a handle the package # keeps; points come back through a float buffer it owns. None of this is exported. extern function nvc_build(v: pointer, nv: int, t: pointer, nt: int, area: pointer, cyl: pointer, nc: int, foot: pointer, nf: int, c: pointer) -> pointer = "nav_build" extern function nvc_tiled(ox: float, oz: float, tile: float, max_tiles: int, max_polys: int) -> pointer = "nav_tiled" extern function nvc_tile_build(h: pointer, tx: int, tz: int, v: pointer, nv: int, t: pointer, nt: int, area: pointer, cyl: pointer, nc: int, foot: pointer, nf: int, c: pointer) -> int = "nav_tile_build" extern function nvc_save(h: pointer, buf: pointer, cap: int) -> int = "nav_save" extern function nvc_load(buf: pointer, size: int) -> pointer = "nav_load" extern function nvc_free(h: pointer) -> void = "nav_free" extern function nvc_polys(h: pointer) -> int = "nav_polys" extern function nvc_nearest(h: pointer, x: float, y: float, z: float, out: pointer) -> int = "nav_nearest" extern function nvc_area_cost(h: pointer, f: int, area: int, cost: float) -> void = "nav_area_cost" extern function nvc_path(h: pointer, f: int, sx: float, sy: float, sz: float, ex: float, ey: float, ez: float, out: pointer, max: int) -> int = "nav_path" extern function nvc_partial(h: pointer) -> int = "nav_partial" extern function nvc_us(h: pointer) -> int = "nav_us" extern function nvc_raycast(h: pointer, f: int, sx: float, sy: float, sz: float, ex: float, ez: float) -> int = "nav_raycast" extern function nvc_random_near(h: pointer, f: int, x: float, y: float, z: float, r: float, seed: int, out: pointer) -> int = "nav_random_near" extern function nvc_stage(size: int) -> pointer = "nav_stage" extern function nvc_crowd_new(h: pointer, max: int, max_radius: float) -> pointer = "nav_crowd_new" extern function nvc_crowd_free(c: pointer) -> void = "nav_crowd_free" extern function nvc_crowd_add(c: pointer, x: float, y: float, z: float, radius: float, height: float, speed: float, filter: int, separation: float) -> int = "nav_crowd_add" extern function nvc_crowd_add_fixed(c: pointer, x: float, y: float, z: float, radius: float, height: float) -> int = "nav_crowd_add_fixed" extern function nvc_crowd_place(c: pointer, i: int, x: float, y: float, z: float, vx: float, vz: float) -> int = "nav_crowd_place" extern function nvc_crowd_remove(c: pointer, i: int) -> void = "nav_crowd_remove" extern function nvc_crowd_target(c: pointer, i: int, x: float, y: float, z: float) -> int = "nav_crowd_target" extern function nvc_crowd_speed(c: pointer, i: int, speed: float) -> void = "nav_crowd_speed" extern function nvc_crowd_update(c: pointer, dt: float) -> void = "nav_crowd_update" extern function nvc_crowd_read(c: pointer, i: int, out: pointer) -> int = "nav_crowd_read" extern function nvc_crowd_us(c: pointer) -> int = "nav_crowd_us" extern function nvc_unstage(buf: pointer) -> void = "nav_unstage" extern function nvc_index_open(head: pointer) -> pointer = "nav_index_open" extern function nvc_index_count_in(head: pointer) -> int = "nav_index_count_in" extern function nvc_index_put(h: pointer, rec: pointer, offset: long) -> int = "nav_index_put" extern function nvc_index_count(h: pointer) -> int = "nav_index_count" extern function nvc_index_tile(h: pointer, i: int, out: pointer) -> int = "nav_index_tile" extern function nvc_index_offset(h: pointer, i: int) -> long = "nav_index_offset" extern function nvc_index_size(h: pointer, i: int) -> int = "nav_index_size" extern function nvc_index_in(h: pointer, i: int, data: pointer, size: int) -> int = "nav_index_in" extern function nvc_index_out(h: pointer, i: int) -> int = "nav_index_out" extern function nvc_load_staged(buf: pointer, size: int) -> pointer = "nav_load_staged" extern function nvc_heap_bytes() -> long = "nav_heap_bytes" extern function nvc_heap_peak() -> long = "nav_heap_peak" extern function nvc_heap_allocs() -> long = "nav_heap_allocs" # the bytes Recast and Detour hold now (every tile in, the queries, the crowds), the most they ever # held, and how many blocks they asked for: counted in the shim, apart from the game's heap export function nav_heap_bytes() -> long { return nvc_heap_bytes() } export function nav_heap_peak() -> long { return nvc_heap_peak() } export function nav_heap_allocs() -> long { return nvc_heap_allocs() }