stbhw_generate_image function
generate a map that is w * h pixels (3-bytes each) returns non-zero on success, 0 on error not thread-safe (uses a global data structure to avoid memory management) weighting should be NULL, as non-NULL weighting is currently untested
Implementation
@ffi.Native<
ffi.Int Function(
ffi.Pointer<stbhw_tileset>,
ffi.Pointer<ffi.Pointer<ffi.Int>>,
ffi.Pointer<ffi.UnsignedChar>,
ffi.Int,
ffi.Int,
ffi.Int,
)
>()
external int stbhw_generate_image(
ffi.Pointer<stbhw_tileset> ts,
ffi.Pointer<ffi.Pointer<ffi.Int>> weighting,
ffi.Pointer<ffi.UnsignedChar> pixels,
int stride_in_bytes,
int w,
int h,
);