diff --git a/demos/03-anims.c b/demos/03-anims.c index 9a65094..f511c8d 100644 --- a/demos/03-anims.c +++ b/demos/03-anims.c @@ -10,36 +10,6 @@ #include "v4k.h" -typedef struct anims_t { - int inuse; // animation number in use - float speed; // x1.00 - array(anim_t) anims; // [begin,end,flags] frames of every animation in set - array(mat44) M; // instanced transforms -} anims_t; - -anims_t animations(const char *pathfile, int flags) { - anims_t a = {0}; - char *anim_file = vfs_read(pathfile); - for each_substring(anim_file, "\r\n", anim) { - int from, to; - char anim_name[128] = {0}; - if( sscanf(anim, "%*s %d-%d %127[^\r\n]", &from, &to, anim_name) != 3) continue; - array_push(a.anims, !!strstri(anim_name, "loop") ? loop(from, to, 0, 0) : clip(from, to, 0, 0)); // [from,to,flags] - array_back(a.anims)->name = strswap(strswap(strswap(STRDUP(anim_name), "Loop", ""), "loop", ""), "()", ""); - } - array_resize(a.M, 32*32); - for(int z = 0, i = 0; z < 32; ++z) { - for(int x = 0; x < 32; ++x, ++i) { - vec3 p = vec3(-x*3,0,-z*3); - vec3 r = vec3(0,0,0); - vec3 s = vec3(2,2,2); - compose44(a.M[i], p, eulerq(r), s); - } - } - a.speed = 1.0; - return a; -} - int main() { bool do_showaabb = 0; bool do_showbones = 0; @@ -52,8 +22,10 @@ int main() { camera_t cam = camera(); skybox_t sky = skybox("cubemaps/stardust", 0); - model_t mdl = model("kgirls01.fbx", 0); - anims_t a = animations("kgirl/animlist.txt", 0); + model_t mdl = model("Stan.fbx", 0); + anims_t a = animations("Stan.anim", 0); + + // load all postfx files in all subdirs fx_load("fx**.fs"); @@ -111,7 +83,7 @@ int main() { } if( do_showgizmo ) { - static vec3 p = {0,0,0}, r = {0,0,0}, s = {2,2,2}; + static vec3 p = {0,0,0}, r = {0,-90,0}, s = {1,1,1}; gizmo(&p, &r, &s); compose44(a.M[0], p, eulerq(r), s); } diff --git a/demos/art/models/robots/Stan.anim b/demos/art/models/robots/Stan.anim new file mode 100644 index 0000000..732b698 Binary files /dev/null and b/demos/art/models/robots/Stan.anim differ diff --git a/demos/fwk_netsync.h b/demos/fwk_netsync.h deleted file mode 100644 index bd1e153..0000000 --- a/demos/fwk_netsync.h +++ /dev/null @@ -1,716 +0,0 @@ -// high-level, socket-less networking api. inspired by Quake, MPI and RenderBuckets theories. -// - rlyeh, public domain -// -// Usage: -// 1. configure networked memory buffers with flags (world, player1, player2, etc). network_buffer(); -// 2. then during game loop: -// - modify your buffers as much as needed. -// - sync buffers at least once per frame. network_sync(); -// - render your world -// 3. optionally, monitor network status & variables. network_get(); -// -// @todo: maybe network_send(msg) + msg *network_recv(); instead of event queue of network_sync() ? - -//enum { NETWORK_HANDSHAKE, NETWORK_ENCRYPT, NETWORK_VERSIONED, NETWORK_CHECKSUM }; // negotiation -//enum { NETWORK_TCP, NETWORK_UDP, NETWORK_KCP, NETWORK_ENET, NETWORK_WEBSOCKET }; // transport, where -enum { NETWORK_BIND = 2, NETWORK_CONNECT = 4, NETWORK_NOFAIL = 8 }; -enum { MAX_CLIENTS = 32 }; -API void network_create(const char *ip, const char *port, unsigned flags); // both ip and port can be null - -//enum { NETWORK_LOSSY, NETWORK_COMPRESS }; // post-processes -//enum { NETWORK_UNRELIABLE, NETWORK_UNORDERED, NETWORK_PRIORITY }; // how -//enum { NETWORK_PREDICT, NETWORK_RECONCILE, NETWORK_INTERPOLATE, NETWORK_COMPENSATE }; // time authority, when -//enum { NETWORK_LAGS, NETWORK_DROPS, NETWORK_THROTTLES, NETWORK_DUPES }; // quality sim, how much -//enum { NETWORK_CONST = 1, NETWORK_64,NETWORK_32,NETWORK_16,NETWORK_8, NETWORK_FLT, NETWORK_STR, NETWORK_BLOB }; // type, what -enum { NETWORK_SEND = 2, NETWORK_RECV = 4 }; -API void* network_buffer(void *ptr, unsigned sz, unsigned flags, int64_t rank); // configures a shared/networked buffer -API char** network_sync(unsigned timeout_ms); // syncs all buffers & returns null-terminated list of network events - -enum { NETWORK_RANK = 0 }; // [0..N] where 0 is server -enum { NETWORK_PING = 1 }; // NETWORK_BANDWIDTH, NETWORK_QUALITY }; -enum { NETWORK_PORT = 2, NETWORK_IP, NETWORK_LIVE }; -//enum { NETWORK_USERID, NETWORK_SALT, NETWORK_COUNT/*N users*/ /*...*/, -API int64_t network_get(uint64_t key); -API int64_t network_put(uint64_t key, int64_t value); - -API void network_rpc(const char *signature, void *function); -API void network_rpc_send_to(int64_t rank, unsigned id, const char *cmdline); -API void network_rpc_send(unsigned id, const char *cmdline); - -// ----------------------------------------------------------------------------- -// low-level api (sockets based) - -API bool server_bind(int max_clients, int port); -API void server_poll(); -API void server_broadcast_bin(const void *ptr, int len); -API void server_broadcast(const char *msg); -API void server_terminate(); -API void server_send(int64_t handle, const char *msg); -API void server_send_bin(int64_t handle, const void *ptr, int len); -API void server_drop(int64_t handle); - -API int64_t client_join(const char *ip, int port); -#define client_send(msg) server_broadcast(msg) -#define client_send_bin(ptr,len) server_broadcast_bin(ptr, len) -#define client_terminate() server_terminate() - -#define ANYHOST_IPV4 "0.0.0.0" -#define ANYHOST_IPV6 "::0" - -#define LOCALHOST_IPV4 "127.0.0.1" -#define LOCALHOST_IPV6 "::1" - -// ----------------------------------------------------------------------------- -// implementation - -typedef void* (*rpc_function)(); - -typedef struct rpc_call { - char *method; - rpc_function function; - uint64_t function_hash; -} rpc_call; - -#define RPC_SIGNATURE_i_iii UINT64_C(0x78409099752fa48a) // printf("%llx\n, HASH_STR("int(int,int,int)")); -#define RPC_SIGNATURE_i_ii UINT64_C(0x258290edf43985a5) // printf("%llx\n, HASH_STR("int(int,int)")); -#define RPC_SIGNATURE_s_s UINT64_C(0x97deedd17d9afb12) // printf("%llx\n, HASH_STR("char*(char*)")); -#define RPC_SIGNATURE_s_v UINT64_C(0x09c16a1242049b80) // printf("%llx\n, HASH_STR("char*(void)")); - -static -rpc_call rpc_new_call(const char *signature, rpc_function function) { - if( signature && function ) { - array(char*)tokens = strsplit(signature, "(,)"); - if( array_count(tokens) >= 1 ) { - char *method = strrchr(tokens[0], ' ')+1; - char *rettype = va("%.*s", (int)(method - tokens[0] - 1), tokens[0]); - int num_args = array_count(tokens) - 1; - char* hash_sig = va("%s(%s)", rettype, num_args ? (array_pop_front(tokens), strjoin(tokens, ",")) : "void"); - uint64_t hash = hash_str(hash_sig); - method = va("%s%d", method, num_args ); -#if RPC_DEBUG - printf("%p %p %s `%s` %s(", function, (void*)hash, rettype, hash_sig, method); for(int i = 0, end = array_count(tokens); i < end; ++i) printf("%s%s", tokens[i], i == (end-1)? "":", "); puts(");"); -#endif - return (rpc_call) { strdup(method), function, hash }; // LEAK - } - } - return (rpc_call) {0}; -} - -static map(char*, rpc_call) rpc_calls = 0; - -static -void rpc_insert(const char *signature, void *function ) { - rpc_call call = rpc_new_call(signature, function); - if( call.method ) { - if( !rpc_calls ) map_init(rpc_calls, less_str, hash_str); - if( map_find(rpc_calls, call.method)) { - map_erase(rpc_calls, call.method); - } - map_insert(rpc_calls, call.method, call); - } -} - -static -char *rpc_full(unsigned id, const char* method, unsigned num_args, char *args[]) { -#if RPC_DEBUG - printf("id:%x method:%s args:", id, method ); - for( int i = 0; i < num_args; ++i ) printf("%s,", args[i]); puts(""); -#endif - - method = va("%s%d", method, num_args); - rpc_call *found = map_find(rpc_calls, (char*)method); - if( found ) { - switch(found->function_hash) { - case RPC_SIGNATURE_i_iii: return va("%d %d", id, (int)(uintptr_t)found->function(atoi(args[0]), atoi(args[1]), atoi(args[2])) ); - case RPC_SIGNATURE_i_ii: return va("%d %d", id, (int)(uintptr_t)found->function(atoi(args[0]), atoi(args[1])) ); - case RPC_SIGNATURE_s_s: return va("%d %s", id, (char*)found->function(args[0]) ); - case RPC_SIGNATURE_s_v: return va("%d %s", id, (char*)found->function() ); - default: break; - } - } - return va("%d -1", id); -} - -static -array(char*) rpc_parse_args( const char *cmdline, bool quote_whitespaces ) { // parse cmdline arguments. must array_free() after use - // - supports quotes: "abc" "abc def" "abc \"def\"" "abc \"def\"""ghi" etc. - // - #comments removed - array(char*) args = 0; // LEAK - for( int i = 0; cmdline[i]; ) { - char buf[256] = {0}, *ptr = buf; - while(cmdline[i] && isspace(cmdline[i])) ++i; - bool quoted = cmdline[i] == '\"'; - if( quoted ) { - while(cmdline[++i]) { - char ch = cmdline[i]; - /**/ if (ch == '\\' && cmdline[i + 1] == '\"') *ptr++ = '\"', ++i; - else if (ch == '\"' && cmdline[i + 1] == '\"') ++i; - else if (ch == '\"' && (!cmdline[i + 1] || isspace(cmdline[i + 1]))) { - ++i; break; - } - else *ptr++ = ch; - } - } else { - while(cmdline[i] && !isspace(cmdline[i])) *ptr++ = cmdline[i++]; - } - if (buf[0] && buf[0] != '#') { // exclude empty args + comments - if( quote_whitespaces && quoted ) - array_push(args, va("\"%s\"",buf)); - else - array_push(args, va("%s",buf)); - } - } - return args; -} - -static -char* rpc(unsigned id, const char* cmdline) { - array(char*) args = rpc_parse_args(cmdline, false); - int num_args = array_count(args); - char *ret = num_args ? rpc_full(id, args[0], num_args - 1, &args[1]) : rpc_full(id, "", 0, NULL); - array_free(args); - return ret; -} - -static void enet_quit(void) { - do_once { - // enet_deinitialize(); - } -} -static void enet_init() { - do_once { - if( enet_initialize() != 0 ) { - PANIC("cannot initialize enet"); - } - atexit( enet_quit ); - } -} - -static ENetHost *Server; -static map(ENetPeer *, int64_t) clients; -static map(int64_t, ENetPeer *) peers; -static int64_t next_client_id = 1; // assumes ID 0 is server -enum { MSG_INIT, MSG_BUF, MSG_RPC, MSG_RPC_RESP }; - -bool server_bind(int max_clients, int port) { - map_init(clients, less_64, hash_64); - map_init(peers, less_64, hash_64); - assert(port == 0 || (port > 1024 && port < 65500)); - ENetAddress address = {0}; - address.host = ENET_HOST_ANY; - address.port = port; - Server = enet_host_create(&address, max_clients, 2 /*channels*/, 0 /*in bandwidth*/, 0 /*out bandwidth*/); - return Server != NULL; -} - -static -void server_drop_client(int64_t handle) { - map_erase(clients, *(ENetPeer **)map_find(peers, handle)); - map_erase(peers, *(int64_t *)handle); -} - -static -void server_drop_client_peer(ENetPeer *peer) { - map_erase(peers, *(int64_t *)map_find(clients, peer)); - map_erase(clients, peer); -} - -void server_poll() { - ENetEvent event; - while( enet_host_service(Server, &event, 2 /*timeout,ms*/) > 0 ) { - switch (event.type) { - case ENET_EVENT_TYPE_CONNECT:; - char ip[128]; enet_peer_get_ip(event.peer, ip, 128); - PRINTF( "A new client connected from ::%s:%u.\n", ip, event.peer->address.port ); - /* Store any relevant client information here. */ - event.peer->data = "Client information"; - - int64_t client_id = next_client_id++; - map_find_or_add(clients, event.peer, client_id); - map_find_or_add(peers, client_id, event.peer); - break; - case ENET_EVENT_TYPE_RECEIVE: - PRINTF( "A packet of length %zu containing %s was received from %s on channel %u.\n", - event.packet->dataLength, - event.packet->data, - (char *)event.peer->data, - event.channelID ); - - char *dbg = (char *)event.peer->data; - char *ptr = event.packet->data; - unsigned sz = event.packet->dataLength; - - uint32_t mid = *(uint32_t*)ptr; - ptr += 4; - - // @todo: propagate event to user - switch (mid) { - case MSG_INIT: { - uint64_t *cid = map_find(clients, event.peer); - if (cid) { - char init_msg[12]; - *(uint32_t*)&init_msg[0] = MSG_INIT; - *(uint64_t*)&init_msg[4] = *cid; - ENetPacket *packet = enet_packet_create(init_msg, 12, ENET_PACKET_FLAG_RELIABLE); - enet_peer_send(event.peer, 0, packet); - } else { - PRINTF("ignoring unk MSG_INIT client packet.\n"); - } - } break; - case MSG_RPC: - case MSG_RPC_RESP: - // @todo: process and send a response back - break; - default: - PRINTF("recving unk %d sz %d from peer %s\n", mid, sz, dbg); - } - - /* Clean up the packet now that we're done using it. */ - enet_packet_destroy( event.packet ); - break; - - case ENET_EVENT_TYPE_DISCONNECT: - PRINTF( "%s disconnected.\n", (char *)event.peer->data ); - /* Reset the peer's client information. */ - event.peer->data = NULL; - server_drop_client_peer(event.peer); - break; - - case ENET_EVENT_TYPE_DISCONNECT_TIMEOUT: - PRINTF( "%s timeout.\n", (char *)event.peer->data ); - event.peer->data = NULL; - server_drop_client_peer(event.peer); - break; - - case ENET_EVENT_TYPE_NONE: break; - } - } -} - -void client_poll() { - ENetEvent event; - while( enet_host_service(Server, &event, 2 /*timeout,ms*/) > 0 ) { - switch (event.type) { - case ENET_EVENT_TYPE_CONNECT:; - break; - case ENET_EVENT_TYPE_RECEIVE: - PRINTF( "A packet of length %zu containing %s was received from %s on channel %u.\n", - event.packet->dataLength, - event.packet->data, - (char *)event.peer->data, - event.channelID ); - - char *dbg = (char *)event.peer->data; - char *ptr = event.packet->data; - unsigned sz = event.packet->dataLength; - - uint32_t mid = *(uint32_t*)ptr; - ptr += 4; - - // @todo: propagate event to user - switch (mid) { - case MSG_INIT: - /* handled during client_join */ - break; - case MSG_RPC: - case MSG_RPC_RESP: - // @todo: process and send a response back - break; - default: - PRINTF("recving unk %d sz %d from peer %s\n", mid, sz, dbg); - } - - /* Clean up the packet now that we're done using it. */ - enet_packet_destroy( event.packet ); - break; - - case ENET_EVENT_TYPE_DISCONNECT: - PRINTF( "%s disconnected.\n", (char *)event.peer->data ); - /* Reset the peer's client information. */ - event.peer->data = NULL; - server_drop_client_peer(event.peer); - break; - - case ENET_EVENT_TYPE_DISCONNECT_TIMEOUT: - PRINTF( "%s timeout.\n", (char *)event.peer->data ); - event.peer->data = NULL; - server_drop_client_peer(event.peer); - break; - - case ENET_EVENT_TYPE_NONE: break; - } - } -} - -void server_broadcast_bin(const void *msg, int len) { - ENetPacket *packet = enet_packet_create(msg, len, ENET_PACKET_FLAG_RELIABLE); - enet_host_broadcast(Server, 0, packet); - //enet_host_flush(Server); // flush if needed -} -void server_broadcast(const char *msg) { - server_broadcast_bin(msg, strlen(msg)+1); -} -void server_terminate() { - enet_host_destroy(Server); - Server = 0; -} - -volatile int client_join_connected = 0; -static int client_join_threaded(void *userdata) { - ENetHost *host = (ENetHost *)userdata; - - ENetPacket *packet = enet_packet_create("", 1, ENET_PACKET_FLAG_RELIABLE); - enet_host_broadcast(Server, 0, packet); - - /* Wait up to 5 seconds for the connection attempt to succeed. */ - ENetEvent event; - client_join_connected = 0; - client_join_connected = enet_host_service(host, &event, 5000) > 0 && event.type == ENET_EVENT_TYPE_CONNECT; - return 0; -} - -int64_t client_join(const char *ip, int port) { - assert(port > 1024 && port < 65500); - ENetAddress address = {0}; -// address.host = ENET_HOST_ANY; - enet_address_set_host(&address, !strcmp(ip, "localhost") ? "127.0.0.1" : ip); - address.port = port; - - ENetHost *host = enet_host_create(NULL, 1 /*outgoing connections*/, 2 /*channels*/, 0 /*in bandwidth*/, 0 /*out bandwidth*/); - if(!host) return -1; - ENetPeer *peer = enet_host_connect(host, &address, 2, 0); - if(!peer) return -1; - Server = host; - -#if 1 -#if 0 - // sync wait (not working in localhost, unless threaded) - thread_ptr_t th = thread_init(client_join_threaded, host, "client_join_threaded()", 0 ); - thread_join( th ); - thread_destroy( th ); -#else - ENetEvent event; - bool client_join_connected = enet_host_service(host, &event, 5000) > 0 && event.type == ENET_EVENT_TYPE_CONNECT; -#endif - if(!client_join_connected) { enet_peer_reset(peer); return -1; } -#endif - - // ask for server slot - char init_msg[4]; *(uint32_t*)init_msg = MSG_INIT; - server_broadcast_bin(init_msg, sizeof(init_msg)); - - // wait for the response - bool msg_received = enet_host_service(host, &event, 5000) > 0 && event.type == ENET_EVENT_TYPE_RECEIVE; - if (!msg_received) { enet_peer_reset(peer); return -1; } - - char *ptr = (char *)event.packet->data; - int64_t cid = -1; - - // decapsulate incoming packet. - uint32_t mid = *(uint32_t*)(ptr + 0); - ptr += 4; - - switch (mid) { - case MSG_INIT: - cid = *(int64_t*)ptr; - break; - default: - enet_peer_reset(peer); - return -1; - } - - /* Clean up the packet now that we're done using it. */ - enet_packet_destroy( event.packet ); - - return cid; -} -void server_drop(int64_t handle) { - enet_peer_disconnect_now(*(ENetPeer **)map_find(peers, handle), 0); - server_drop_client(handle); -} - -void server_send_bin(int64_t handle, const void *ptr, int len) { - ENetPacket *packet = enet_packet_create(ptr, len, ENET_PACKET_FLAG_RELIABLE); - enet_peer_send(*(ENetPeer **)map_find(peers, handle), 0, packet); -} - -void server_send(int64_t handle, const char *msg) { - server_send_bin(handle, msg, strlen(msg)+1); -} - -// --- - -typedef struct netbuffer_t { - int64_t owner; - void *ptr; - unsigned sz; - unsigned flags; -} netbuffer_t; - -static array(char*) events; // @todo: make event 128 bytes max? -static array(int64_t) values; // @todo: map instead? -static map( int64_t, array(netbuffer_t) ) buffers; // map> - -void network_create(const char *ip, const char *port_, unsigned flags) { - if (buffers) map_clear(buffers); - do_once { - array_resize(values, 128); - map_init(buffers, less_64, hash_64); - - enet_init(); - } - - ip = ip ? ip : "0.0.0.0"; - int port = atoi(port_ ? port_ : "1234"); - - // network_put(NETWORK_IP, 0x7F000001); // 127.0.0.1 - network_put(NETWORK_PORT, port); - network_put(NETWORK_LIVE, -1); - - if( !(flags&NETWORK_CONNECT) || flags&NETWORK_BIND ) { - // server, else client - PRINTF("Trying to bind server, else we connect as a client...\n"); - network_put(NETWORK_RANK, 0); - if( server_bind(MAX_CLIENTS, port) ) { - network_put(NETWORK_LIVE, 1); - PRINTF("Server bound\n"); - } else { - network_put(NETWORK_RANK, -1); /* unassigned until we connect successfully */ - int64_t socket = client_join(ip, port); - if( socket >= 0 ) { - PRINTF("Client connected, id %lld\n", socket); - network_put(NETWORK_LIVE, 1); - network_put(NETWORK_RANK, socket); - } else { - PRINTF("!Client conn failed\n"); - network_put(NETWORK_LIVE, 0); - - if (!(flags&NETWORK_NOFAIL)) - PANIC("cannot neither connect to %s:%d, nor create a server", ip, port); - } - } - } else { - // client only - PRINTF("Connecting to server...\n"); - network_put(NETWORK_RANK, -1); /* unassigned until we connect successfully */ - int64_t socket = client_join(ip, port); - if( socket > 0 ) { - PRINTF("Client connected, id %lld\n", socket); - network_put(NETWORK_LIVE, 1); - network_put(NETWORK_RANK, socket); - } else { - PRINTF("!Client conn failed\n"); - network_put(NETWORK_LIVE, 0); - if (!(flags&NETWORK_NOFAIL)) - PANIC("cannot connect to server %s:%d", ip, port); - } - } - - PRINTF("Network rank:%lld ip:%s port:%lld\n", network_get(NETWORK_RANK), ip, network_get(NETWORK_PORT)); -} - -int64_t network_put(uint64_t key, int64_t value) { - int64_t *found = key < array_count(values) ? &values[key] : NULL; - if(found) *found = value; - return value; -} -int64_t network_get(uint64_t key) { - int64_t *found = key < array_count(values) ? &values[key] : NULL; - return found ? *found : 0; -} - -void* network_buffer(void *ptr, unsigned sz, unsigned flags, int64_t rank) { - assert(flags); - array(netbuffer_t) *found = map_find_or_add(buffers, rank, NULL); - - netbuffer_t nb; - nb.owner = rank; - nb.ptr = ptr; - nb.sz = sz; - nb.flags = flags; - array_push(*found, nb); - - return ptr; -} - -char** network_sync(unsigned timeout_ms) { - array_clear(events); - - int64_t whoami = network_get(NETWORK_RANK); - bool is_server = whoami == 0; - bool is_client = !is_server; - if(timeout_ms < 2) timeout_ms = 2; - // sleep_ms(timeout_ms); // @fixme. server only? - - // Split buffers into clients @todo - // clients need to do this before network polling; servers should do this after polling. - map_foreach(buffers, int64_t, rank, array(netbuffer_t), list) { - for(int i = 0, end = array_count(list); i < end; ++i) { - netbuffer_t *nb = &list[i]; - if (!is_server && !(nb->flags & NETWORK_SEND)) - continue; - static array(char) encapsulate; - array_resize(encapsulate, nb->sz + 28); - uint32_t *mid = (uint32_t*)&encapsulate[0]; *mid = MSG_BUF; - uint64_t *st = (uint64_t*)&encapsulate[4]; *st = nb->flags; - uint32_t *idx = (uint32_t*)&encapsulate[12]; *idx = i; - uint32_t *len = (uint32_t*)&encapsulate[16]; *len = nb->sz; - uint64_t *who = (uint64_t*)&encapsulate[20]; *who = nb->owner; - // PRINTF("sending %llx %u %lld %u\n", *st, *idx, *who, *len); - memcpy(&encapsulate[28], nb->ptr, nb->sz); - server_broadcast_bin(&encapsulate[0], nb->sz + 28); - } - } - - // network poll - for( ENetEvent event; Server && enet_host_service(Server, &event, timeout_ms) > 0; ) { - char *msg = 0; - char ip[128]; enet_peer_get_ip(event.peer, ip, 128); - - switch (event.type) { - default: // case ENET_EVENT_TYPE_NONE: - break; - - case ENET_EVENT_TYPE_CONNECT:; - msg = va( "A new client connected from ::%s:%u", ip, event.peer->address.port ); - /* Store any relevant client information here. */ - event.peer->data = "Client information"; - - /* ensure we have free slot for client */ - if (map_count(clients) >= MAX_CLIENTS) { - msg = va("%s\n", "Server is at maximum capacity, disconnecting the peer..."); - enet_peer_disconnect_now(event.peer, 1); - break; - } - - int64_t client_id = next_client_id++; - map_find_or_add(clients, event.peer, client_id); - map_find_or_add(peers, client_id, event.peer); - break; - - case ENET_EVENT_TYPE_RECEIVE:; - /* - msg = va( "A packet of length %u containing %s was received from %s on channel %u", - (unsigned)event.packet->dataLength, - event.packet->data, - (char *)event.peer->data, - event.channelID ); - */ - char *dbg = (char *)event.peer->data; - char *ptr = (char *)event.packet->data; - unsigned sz = (unsigned)event.packet->dataLength; - unsigned id = (unsigned)event.channelID; - - // debug - // puts(dbg); - // hexdump(ptr, sz); - - // decapsulate incoming packet. - uint32_t mid = *(uint32_t*)(ptr + 0); - ptr += 4; - - switch (mid) { - case MSG_INIT: - if (is_server) { - uint64_t *cid = map_find(clients, event.peer); - if (cid) { - char init_msg[12]; - *(uint32_t*)&init_msg[0] = MSG_INIT; - *(int64_t*)&init_msg[4] = *cid; - ENetPacket *packet = enet_packet_create(init_msg, 12, ENET_PACKET_FLAG_RELIABLE); - enet_peer_send(event.peer, 0, packet); - PRINTF("Client req id %lld for peer ::%s:%u\n", *cid, ip, event.peer->address.port); - } else { - PRINTF("!Ignoring unk MSG_INIT client packet.\n"); - } - } - break; - case MSG_BUF: { - uint64_t *flags = (uint64_t*)(ptr + 0); - uint32_t *idx = (uint32_t*)(ptr + 8); - uint32_t *len = (uint32_t*)(ptr + 12); - uint64_t *who = (uint64_t*)(ptr + 16); - // PRINTF("recving %d %llx %u %u %lld\n", mid, *flags, *idx, *len, *who); - ptr += 24; - - // validate if peer owns the buffer - uint8_t client_valid = 0; - - if (is_server) { - int64_t *cid = map_find(clients, event.peer); - client_valid = cid ? *cid == *who : 0; - } - - // apply incoming packet. - if( is_client ? *who != whoami : client_valid ) { // clients merge always foreign packets. servers merge foreign packets. - array(netbuffer_t) *list = map_find(buffers, *who); - assert( list ); - assert( *idx < array_count(*list) ); - netbuffer_t *nb = &(*list)[*idx]; - assert( *len == nb->sz ); - memcpy(nb->ptr, ptr, *len); - } - } break; - case MSG_RPC: { - unsigned id = *(uint32_t*)ptr; ptr += 4; - char *cmdline = ptr; - char *resp = rpc(id, cmdline); - char *resp_msg = va("%*.s%s", 4, "", resp); - *(uint32_t*)&resp_msg[0] = MSG_RPC_RESP; - ENetPacket *packet = enet_packet_create(resp_msg, 4 + strlen(resp), ENET_PACKET_FLAG_RELIABLE); - enet_peer_send(event.peer, 0, packet); - } break; - case MSG_RPC_RESP: { - // @todo: react on response? - msg = ptr; - } break; - default: - // PRINTF("!Receiving unk %d sz %d from peer ::%s:%u\n", mid, sz, ip, event.peer->address.port); - break; - } - /* Clean up the packet now that we're done using it. */ - enet_packet_destroy( event.packet ); - break; - - case ENET_EVENT_TYPE_DISCONNECT: - msg = va( "%s disconnected", (char *)event.peer->data ); - /* Reset the peer's client information. */ - event.peer->data = NULL; - if (is_server) server_drop_client_peer(event.peer); - else {network_put(NETWORK_RANK, -1); network_put(NETWORK_LIVE, 0);} - break; - - case ENET_EVENT_TYPE_DISCONNECT_TIMEOUT: - msg = va( "%s timeout", (char *)event.peer->data ); - event.peer->data = NULL; - if (is_server) server_drop_client_peer(event.peer); - else {network_put(NETWORK_RANK, -1); network_put(NETWORK_LIVE, 0);} - break; - } - - if(msg) array_push(events, va("%d %s", event.type, msg)); -// if(msg) server_broadcast(msg); - } - - array_push(events, NULL); - return events; -} - -void network_rpc(const char *signature, void *function) { - rpc_insert(signature, function); -} - -void network_rpc_send_to(int64_t rank, unsigned id, const char *cmdline) { - assert(network_get(NETWORK_RANK) == 0); /* must be a host */ - char *msg = va("%*.s%s", 8, "", cmdline); - *(uint32_t*)&msg[0] = MSG_RPC; - *(uint32_t*)&msg[4] = id; - server_send_bin(rank, msg, 8 + strlen(cmdline)); -} - -void network_rpc_send(unsigned id, const char *cmdline) { - char *msg = va("%*.s%s", 8, "", cmdline); - *(uint32_t*)&msg[0] = MSG_RPC; - *(uint32_t*)&msg[4] = id; - server_broadcast_bin(msg, 8 + strlen(cmdline)); -} diff --git a/demos/html5/demo_collide.c b/demos/html5/demo_collide.c index df8e0b7..f474fd9 100644 --- a/demos/html5/demo_collide.c +++ b/demos/html5/demo_collide.c @@ -12,8 +12,9 @@ camera_t cam; void game_loop(void *userdata) { // key handler - if (input_down(KEY_F11) ) window_fullscreen( window_has_fullscreen()^1 ); - if (input_down(KEY_ESC) ) window_loop_exit(); // @todo: break -> window_close() + // if (input_down(KEY_F11) ) window_fullscreen( window_has_fullscreen()^1 ); + // if (input_down(KEY_ESC) ) window_loop_exit(); // @todo: break -> window_close() + window_resize(); // animation static float dx = 0, dy = 0; diff --git a/demos/html5/template.html b/demos/html5/template.html index 7eb37df..12bef2c 100644 --- a/demos/html5/template.html +++ b/demos/html5/template.html @@ -100,6 +100,13 @@ }, canvas: (function() { var canvas = document.getElementById('canvas'); + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + + window.addEventListener('resize', () => { + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + }) return canvas; })(), setStatus: function(text) { diff --git a/engine/bind/v4k.lua b/engine/bind/v4k.lua index 3ef1a1b..473a68e 100644 --- a/engine/bind/v4k.lua +++ b/engine/bind/v4k.lua @@ -2458,6 +2458,13 @@ unsigned num_instances; bool model_get_bone_pose(model_t m, unsigned joint, mat34 *out); void model_destroy(model_t); vec3 pose(bool forward, float curframe, int minframe, int maxframe, bool loop, float *opt_retframe); +typedef struct anims_t { +int inuse; +float speed; +anim_t* anims; +mat44* M; +} anims_t; + anims_t animations(const char *pathfile, int flags); typedef struct skybox_t { handle program; mesh_t geometry; @@ -2803,6 +2810,7 @@ WINDOW_VSYNC_DISABLED =8192, int window_swap(); void window_loop(void (*function)(void* loopArg), void* loopArg ); void window_loop_exit(); + void window_resize(); void window_title(const char *title); void window_icon(const char *file_icon); void window_color(unsigned color); diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index 2b7f279..b2118ce 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -16619,6 +16619,18 @@ API void model_destroy(model_t); API vec3 pose(bool forward, float curframe, int minframe, int maxframe, bool loop, float *opt_retframe); +// ----------------------------------------------------------------------------- +// model animations + +typedef struct anims_t { + int inuse; // animation number in use + float speed; // x1.00 + array(anim_t) anims; // [begin,end,flags] frames of every animation in set + array(mat44) M; // instanced transforms +} anims_t; + +API anims_t animations(const char *pathfile, int flags); + // ----------------------------------------------------------------------------- // skyboxes @@ -17165,6 +17177,7 @@ API int window_swap(); // single function that combines above functions (de API void window_loop(void (*function)(void* loopArg), void* loopArg ); // run main loop function continuously (emscripten only) API void window_loop_exit(); // exit from main loop function (emscripten only) +API void window_resize(); // resize if canvas size has changed (emscripten only) API void window_title(const char *title); API void window_icon(const char *file_icon); @@ -343986,6 +343999,29 @@ void model_destroy(model_t m) { #undef buf #undef bounds #undef colormaps + +anims_t animations(const char *pathfile, int flags) { + anims_t a = {0}; + char *anim_file = vfs_read(pathfile); + for each_substring(anim_file, "\r\n", anim) { + int from, to; + char anim_name[128] = {0}; + if( sscanf(anim, "%*s %d-%d %127[^\r\n]", &from, &to, anim_name) != 3) continue; + array_push(a.anims, !!strstri(anim_name, "loop") ? loop(from, to, 0, 0) : clip(from, to, 0, 0)); // [from,to,flags] + array_back(a.anims)->name = strswap(strswap(strswap(STRDUP(anim_name), "Loop", ""), "loop", ""), "()", ""); + } + array_resize(a.M, 32*32); + for(int z = 0, i = 0; z < 32; ++z) { + for(int x = 0; x < 32; ++x, ++i) { + vec3 p = vec3(-x*3,0,-z*3); + vec3 r = vec3(0,0,0); + vec3 s = vec3(2,2,2); + compose44(a.M[i], p, eulerq(r), s); + } + } + a.speed = 1.0; + return a; +} #line 0 #line 1 "v4k_renderdd.c" @@ -349762,8 +349798,8 @@ void window_loop_exit() { vec2 window_canvas() { #if is(ems) - int width = EM_ASM_INT_V(return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth); - int height = EM_ASM_INT_V(return window.innerHeight|| document.documentElement.clientHeight|| document.body.clientHeight); + int width = EM_ASM_INT_V(return canvas.width || window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth); + int height = EM_ASM_INT_V(return canvas.height || window.innerHeight || document.documentElement.clientHeight|| document.body.clientHeight); return vec2(width, height); #else glfw_init(); @@ -349773,6 +349809,23 @@ vec2 window_canvas() { #endif /* __EMSCRIPTEN__ */ } +static vec2 last_canvas_size; + +void window_resize() { +#if is(ems) + vec2 size = window_canvas(); + do_once last_canvas_size = size; + if (size.x != last_canvas_size.x || size.y != last_canvas_size.y) { + w = size.x; + h = size.y; + g->width = w; + g->height = h; + glfwSetWindowSize(g->window, w, h); + // emscripten_set_canvas_size(w, h); + } +#endif /* __EMSCRIPTEN__ */ +} + int window_width() { return w; } diff --git a/engine/split/v4k_render.c b/engine/split/v4k_render.c index 6f41924..0b548bd 100644 --- a/engine/split/v4k_render.c +++ b/engine/split/v4k_render.c @@ -4218,3 +4218,26 @@ void model_destroy(model_t m) { #undef buf #undef bounds #undef colormaps + +anims_t animations(const char *pathfile, int flags) { + anims_t a = {0}; + char *anim_file = vfs_read(pathfile); + for each_substring(anim_file, "\r\n", anim) { + int from, to; + char anim_name[128] = {0}; + if( sscanf(anim, "%*s %d-%d %127[^\r\n]", &from, &to, anim_name) != 3) continue; + array_push(a.anims, !!strstri(anim_name, "loop") ? loop(from, to, 0, 0) : clip(from, to, 0, 0)); // [from,to,flags] + array_back(a.anims)->name = strswap(strswap(strswap(STRDUP(anim_name), "Loop", ""), "loop", ""), "()", ""); + } + array_resize(a.M, 32*32); + for(int z = 0, i = 0; z < 32; ++z) { + for(int x = 0; x < 32; ++x, ++i) { + vec3 p = vec3(-x*3,0,-z*3); + vec3 r = vec3(0,0,0); + vec3 s = vec3(2,2,2); + compose44(a.M[i], p, eulerq(r), s); + } + } + a.speed = 1.0; + return a; +} diff --git a/engine/split/v4k_render.h b/engine/split/v4k_render.h index 3f6fe5a..40d0666 100644 --- a/engine/split/v4k_render.h +++ b/engine/split/v4k_render.h @@ -486,6 +486,18 @@ API void model_destroy(model_t); API vec3 pose(bool forward, float curframe, int minframe, int maxframe, bool loop, float *opt_retframe); +// ----------------------------------------------------------------------------- +// model animations + +typedef struct anims_t { + int inuse; // animation number in use + float speed; // x1.00 + array(anim_t) anims; // [begin,end,flags] frames of every animation in set + array(mat44) M; // instanced transforms +} anims_t; + +API anims_t animations(const char *pathfile, int flags); + // ----------------------------------------------------------------------------- // skyboxes diff --git a/engine/split/v4k_window.c b/engine/split/v4k_window.c index b681498..1902bc7 100644 --- a/engine/split/v4k_window.c +++ b/engine/split/v4k_window.c @@ -615,8 +615,8 @@ void window_loop_exit() { vec2 window_canvas() { #if is(ems) - int width = EM_ASM_INT_V(return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth); - int height = EM_ASM_INT_V(return window.innerHeight|| document.documentElement.clientHeight|| document.body.clientHeight); + int width = EM_ASM_INT_V(return canvas.width || window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth); + int height = EM_ASM_INT_V(return canvas.height || window.innerHeight || document.documentElement.clientHeight|| document.body.clientHeight); return vec2(width, height); #else glfw_init(); @@ -626,6 +626,23 @@ vec2 window_canvas() { #endif /* __EMSCRIPTEN__ */ } +static vec2 last_canvas_size; + +void window_resize() { +#if is(ems) + vec2 size = window_canvas(); + do_once last_canvas_size = size; + if (size.x != last_canvas_size.x || size.y != last_canvas_size.y) { + w = size.x; + h = size.y; + g->width = w; + g->height = h; + glfwSetWindowSize(g->window, w, h); + // emscripten_set_canvas_size(w, h); + } +#endif /* __EMSCRIPTEN__ */ +} + int window_width() { return w; } diff --git a/engine/split/v4k_window.h b/engine/split/v4k_window.h index 39f74d3..ab10e8b 100644 --- a/engine/split/v4k_window.h +++ b/engine/split/v4k_window.h @@ -33,6 +33,7 @@ API int window_swap(); // single function that combines above functions (de API void window_loop(void (*function)(void* loopArg), void* loopArg ); // run main loop function continuously (emscripten only) API void window_loop_exit(); // exit from main loop function (emscripten only) +API void window_resize(); // resize if canvas size has changed (emscripten only) API void window_title(const char *title); API void window_icon(const char *file_icon); diff --git a/engine/v4k.c b/engine/v4k.c index 2046505..7d3cc5f 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -15056,6 +15056,29 @@ void model_destroy(model_t m) { #undef buf #undef bounds #undef colormaps + +anims_t animations(const char *pathfile, int flags) { + anims_t a = {0}; + char *anim_file = vfs_read(pathfile); + for each_substring(anim_file, "\r\n", anim) { + int from, to; + char anim_name[128] = {0}; + if( sscanf(anim, "%*s %d-%d %127[^\r\n]", &from, &to, anim_name) != 3) continue; + array_push(a.anims, !!strstri(anim_name, "loop") ? loop(from, to, 0, 0) : clip(from, to, 0, 0)); // [from,to,flags] + array_back(a.anims)->name = strswap(strswap(strswap(STRDUP(anim_name), "Loop", ""), "loop", ""), "()", ""); + } + array_resize(a.M, 32*32); + for(int z = 0, i = 0; z < 32; ++z) { + for(int x = 0; x < 32; ++x, ++i) { + vec3 p = vec3(-x*3,0,-z*3); + vec3 r = vec3(0,0,0); + vec3 s = vec3(2,2,2); + compose44(a.M[i], p, eulerq(r), s); + } + } + a.speed = 1.0; + return a; +} #line 0 #line 1 "v4k_renderdd.c" @@ -20832,8 +20855,8 @@ void window_loop_exit() { vec2 window_canvas() { #if is(ems) - int width = EM_ASM_INT_V(return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth); - int height = EM_ASM_INT_V(return window.innerHeight|| document.documentElement.clientHeight|| document.body.clientHeight); + int width = EM_ASM_INT_V(return canvas.width || window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth); + int height = EM_ASM_INT_V(return canvas.height || window.innerHeight || document.documentElement.clientHeight|| document.body.clientHeight); return vec2(width, height); #else glfw_init(); @@ -20843,6 +20866,23 @@ vec2 window_canvas() { #endif /* __EMSCRIPTEN__ */ } +static vec2 last_canvas_size; + +void window_resize() { +#if is(ems) + vec2 size = window_canvas(); + do_once last_canvas_size = size; + if (size.x != last_canvas_size.x || size.y != last_canvas_size.y) { + w = size.x; + h = size.y; + g->width = w; + g->height = h; + glfwSetWindowSize(g->window, w, h); + // emscripten_set_canvas_size(w, h); + } +#endif /* __EMSCRIPTEN__ */ +} + int window_width() { return w; } diff --git a/engine/v4k.h b/engine/v4k.h index 2732df0..e4c9c01 100644 --- a/engine/v4k.h +++ b/engine/v4k.h @@ -2702,6 +2702,18 @@ API void model_destroy(model_t); API vec3 pose(bool forward, float curframe, int minframe, int maxframe, bool loop, float *opt_retframe); +// ----------------------------------------------------------------------------- +// model animations + +typedef struct anims_t { + int inuse; // animation number in use + float speed; // x1.00 + array(anim_t) anims; // [begin,end,flags] frames of every animation in set + array(mat44) M; // instanced transforms +} anims_t; + +API anims_t animations(const char *pathfile, int flags); + // ----------------------------------------------------------------------------- // skyboxes @@ -3248,6 +3260,7 @@ API int window_swap(); // single function that combines above functions (de API void window_loop(void (*function)(void* loopArg), void* loopArg ); // run main loop function continuously (emscripten only) API void window_loop_exit(); // exit from main loop function (emscripten only) +API void window_resize(); // resize if canvas size has changed (emscripten only) API void window_title(const char *title); API void window_icon(const char *file_icon); diff --git a/engine/v4k.html b/engine/v4k.html index 8123053..eeb9f3a 100644 --- a/engine/v4k.html +++ b/engine/v4k.html @@ -596,7 +596,7 @@ details > summary::-webkit-details-marker { |Version: | 2023.7 | |:--------------|:------------| |Branch: | main | -|Commit: | 34 | +|Commit: | 36 | # [Vยท4ยทK 2023.7 ](https://dev.v4.games/zaklaus/v4k) @@ -8333,6 +8333,32 @@ Other documentation examples: [dll](#dll), [strsplit](#strsplit), [strjoin](#str + +
๐Ÿ…‚ struct anims_t; +~~~~~~C +struct anims_t { + int inuse; + float speed; + array(anim_t) anims; + array(mat44) M; +}; +~~~~~~ + +Under construction. Yet to be documented. + +Other documentation examples: [dll](#dll), [strsplit](#strsplit), [strjoin](#strjoin), [IMAGE_FLAGS](#IMAGE_FLAGS) or [image_t](#image_t). + +
+ + +
๐Ÿ„ต API anims_t animations(const char* pathfile,int flags); + +Under construction. Yet to be documented. + +Other documentation examples: [dll](#dll), [strsplit](#strsplit), [strjoin](#strjoin), [IMAGE_FLAGS](#IMAGE_FLAGS) or [image_t](#image_t). + +
+
๐Ÿ…‚ struct skybox_t; ~~~~~~C @@ -11112,6 +11138,15 @@ Other documentation examples: [dll](#dll), [strsplit](#strsplit), [strjoin](#str
+ +
๐Ÿ„ต API void window_resize(); + +Under construction. Yet to be documented. + +Other documentation examples: [dll](#dll), [strsplit](#strsplit), [strjoin](#strjoin), [IMAGE_FLAGS](#IMAGE_FLAGS) or [image_t](#image_t). + +
+
๐Ÿ„ต API void window_title(const char* title); @@ -11427,9 +11462,9 @@ Other documentation examples: [dll](#dll), [strsplit](#strsplit), [strjoin](#str ## ๐Ÿ„ด enums [ANIM_FLAGS](#ANIM_FLAGS), [AUDIO_FLAGS](#AUDIO_FLAGS), [COMPRESS_FLAGS](#COMPRESS_FLAGS), [COOK_FLAGS](#COOK_FLAGS), [CURSOR_SHAPES](#CURSOR_SHAPES), [EASE_FLAGS](#EASE_FLAGS), [FONT_FLAGS](#FONT_FLAGS), [IMAGE_FLAGS](#IMAGE_FLAGS), [INPUT_ENUMS](#INPUT_ENUMS), [MATERIAL_ENUMS](#MATERIAL_ENUMS), [MESH_FLAGS](#MESH_FLAGS), [MODEL_FLAGS](#MODEL_FLAGS), [PANEL_FLAGS](#PANEL_FLAGS), [SCENE_FLAGS](#SCENE_FLAGS), [SWARM_DISTANCE](#SWARM_DISTANCE), [TEXTURE_FLAGS](#TEXTURE_FLAGS), [TOUCH_BUTTONS](#TOUCH_BUTTONS), [VIDEO_FLAGS](#VIDEO_FLAGS), [WINDOW_FLAGS](#WINDOW_FLAGS), [{](#{) ## ๐Ÿ…ƒ types -[aabb](#aabb), [anim_t](#anim_t), [audio_handle*](#audio_handle*), [boid_t](#boid_t), [bool](#bool), [camera_t](#camera_t), [capsule](#capsule), [colormap_t](#colormap_t), [cubemap_t](#cubemap_t), [frustum](#frustum), [gjk_result](#gjk_result), [gjk_simplex](#gjk_simplex), [gjk_support](#gjk_support), [gjk_vertex](#gjk_vertex), [handle](#handle), [hit](#hit), [image_t](#image_t), [ini_t](#ini_t), [json_t](#json_t), [line](#line), [map](#map), [mat33](#mat33), [mat34](#mat34), [mat44](#mat44), [material_t](#material_t), [mesh_t](#mesh_t), [model_t](#model_t), [object_t](#object_t), [pair](#pair), [pbr_material_t](#pbr_material_t), [plane](#plane), [poly](#poly), [quat](#quat), [ray](#ray), [scene_t](#scene_t), [set](#set), [set_item](#set_item), [shadertoy_t](#shadertoy_t), [shadowmap_t](#shadowmap_t), [skybox_t](#skybox_t), [sphere](#sphere), [spine_t](#spine_t), [swarm_t](#swarm_t), [texture_t](#texture_t), [tiled_t](#tiled_t), [tilemap_t](#tilemap_t), [tileset_t](#tileset_t), [triangle](#triangle), [vec2](#vec2), [vec2i](#vec2i), [vec3](#vec3), [vec3i](#vec3i), [vec4](#vec4), [video_t](#video_t) +[aabb](#aabb), [anim_t](#anim_t), [anims_t](#anims_t), [audio_handle*](#audio_handle*), [boid_t](#boid_t), [bool](#bool), [camera_t](#camera_t), [capsule](#capsule), [colormap_t](#colormap_t), [cubemap_t](#cubemap_t), [frustum](#frustum), [gjk_result](#gjk_result), [gjk_simplex](#gjk_simplex), [gjk_support](#gjk_support), [gjk_vertex](#gjk_vertex), [handle](#handle), [hit](#hit), [image_t](#image_t), [ini_t](#ini_t), [json_t](#json_t), [line](#line), [map](#map), [mat33](#mat33), [mat34](#mat34), [mat44](#mat44), [material_t](#material_t), [mesh_t](#mesh_t), [model_t](#model_t), [object_t](#object_t), [pair](#pair), [pbr_material_t](#pbr_material_t), [plane](#plane), [poly](#poly), [quat](#quat), [ray](#ray), [scene_t](#scene_t), [set](#set), [set_item](#set_item), [shadertoy_t](#shadertoy_t), [shadowmap_t](#shadowmap_t), [skybox_t](#skybox_t), [sphere](#sphere), [spine_t](#spine_t), [swarm_t](#swarm_t), [texture_t](#texture_t), [tiled_t](#tiled_t), [tilemap_t](#tilemap_t), [tileset_t](#tileset_t), [triangle](#triangle), [vec2](#vec2), [vec2i](#vec2i), [vec3](#vec3), [vec3i](#vec3i), [vec4](#vec4), [video_t](#video_t) ## ๐Ÿ„ต functions -[aabb_closest_point](#aabb_closest_point), [aabb_contains_point](#aabb_contains_point), [aabb_distance2_point](#aabb_distance2_point), [aabb_hit_aabb](#aabb_hit_aabb), [aabb_hit_capsule](#aabb_hit_capsule), [aabb_hit_sphere](#aabb_hit_sphere), [aabb_test_aabb](#aabb_test_aabb), [aabb_test_capsule](#aabb_test_capsule), [aabb_test_poly](#aabb_test_poly), [aabb_test_sphere](#aabb_test_sphere), [abs2](#abs2), [abs3](#abs3), [abs4](#abs4), [absf](#absf), [absi](#absi), [add2](#add2), [add3](#add3), [add34](#add34), [add34x2](#add34x2), [add4](#add4), [addq](#addq), [alert](#alert), [alpha](#alpha), [app_battery](#app_battery), [app_cache](#app_cache), [app_cmdline](#app_cmdline), [app_cores](#app_cores), [app_exec](#app_exec), [app_name](#app_name), [app_path](#app_path), [app_temp](#app_temp), [argc](#argc), [argv](#argv), [audio_clip](#audio_clip), [audio_play](#audio_play), [audio_play_gain](#audio_play_gain), [audio_play_gain_pitch](#audio_play_gain_pitch), [audio_play_gain_pitch_pan](#audio_play_gain_pitch_pan), [audio_queue](#audio_queue), [audio_stop](#audio_stop), [audio_stream](#audio_stream), [audio_volume_clip](#audio_volume_clip), [audio_volume_master](#audio_volume_master), [audio_volume_stream](#audio_volume_stream), [bgra](#bgra), [bgraf](#bgraf), [big16](#big16), [big16p](#big16p), [big32](#big32), [big32f](#big32f), [big32p](#big32p), [big32pf](#big32pf), [big64](#big64), [big64f](#big64f), [big64p](#big64p), [big64pf](#big64pf), [brdf_lut](#brdf_lut), [breakpoint](#breakpoint), [cache_insert](#cache_insert), [cache_lookup](#cache_lookup), [callstack](#callstack), [callstackf](#callstackf), [camera](#camera), [camera_enable](#camera_enable), [camera_fov](#camera_fov), [camera_fps](#camera_fps), [camera_get_active](#camera_get_active), [camera_lookat](#camera_lookat), [camera_move](#camera_move), [camera_orbit](#camera_orbit), [camera_teleport](#camera_teleport), [capsule_closest_point](#capsule_closest_point), [capsule_distance2_point](#capsule_distance2_point), [capsule_hit_aabb](#capsule_hit_aabb), [capsule_hit_capsule](#capsule_hit_capsule), [capsule_hit_sphere](#capsule_hit_sphere), [capsule_test_aabb](#capsule_test_aabb), [capsule_test_capsule](#capsule_test_capsule), [capsule_test_poly](#capsule_test_poly), [capsule_test_sphere](#capsule_test_sphere), [cc4](#cc4), [cc4str](#cc4str), [cc8](#cc8), [cc8str](#cc8str), [ceil2](#ceil2), [ceil3](#ceil3), [ceil4](#ceil4), [clamp2](#clamp2), [clamp3](#clamp3), [clamp4](#clamp4), [clampf](#clampf), [clampi](#clampi), [client_join](#client_join), [clip](#clip), [collide_demo](#collide_demo), [colormap](#colormap), [compose33](#compose33), [compose34](#compose34), [compose44](#compose44), [conjq](#conjq), [cook_cancel](#cook_cancel), [cook_config](#cook_config), [cook_jobs](#cook_jobs), [cook_progress](#cook_progress), [cook_start](#cook_start), [cook_stop](#cook_stop), [copy33](#copy33), [copy34](#copy34), [copy44](#copy44), [cross2](#cross2), [cross3](#cross3), [cubemap](#cubemap), [cubemap6](#cubemap6), [cubemap_destroy](#cubemap_destroy), [cubemap_get_active](#cubemap_get_active), [data_tests](#data_tests), [date](#date), [date_epoch](#date_epoch), [date_string](#date_string), [ddraw_aabb](#ddraw_aabb), [ddraw_aabb_corners](#ddraw_aabb_corners), [ddraw_arrow](#ddraw_arrow), [ddraw_axis](#ddraw_axis), [ddraw_boid](#ddraw_boid), [ddraw_bone](#ddraw_bone), [ddraw_bounds](#ddraw_bounds), [ddraw_box](#ddraw_box), [ddraw_capsule](#ddraw_capsule), [ddraw_circle](#ddraw_circle), [ddraw_color](#ddraw_color), [ddraw_color_pop](#ddraw_color_pop), [ddraw_color_push](#ddraw_color_push), [ddraw_cone](#ddraw_cone), [ddraw_cube](#ddraw_cube), [ddraw_cube33](#ddraw_cube33), [ddraw_cylinder](#ddraw_cylinder), [ddraw_demo](#ddraw_demo), [ddraw_diamond](#ddraw_diamond), [ddraw_flush](#ddraw_flush), [ddraw_flush_projview](#ddraw_flush_projview), [ddraw_frustum](#ddraw_frustum), [ddraw_grid](#ddraw_grid), [ddraw_ground](#ddraw_ground), [ddraw_hexagon](#ddraw_hexagon), [ddraw_line](#ddraw_line), [ddraw_line_dashed](#ddraw_line_dashed), [ddraw_line_thin](#ddraw_line_thin), [ddraw_normal](#ddraw_normal), [ddraw_ontop](#ddraw_ontop), [ddraw_ontop_pop](#ddraw_ontop_pop), [ddraw_ontop_push](#ddraw_ontop_push), [ddraw_pentagon](#ddraw_pentagon), [ddraw_plane](#ddraw_plane), [ddraw_point](#ddraw_point), [ddraw_pop_2d](#ddraw_pop_2d), [ddraw_position](#ddraw_position), [ddraw_position_dir](#ddraw_position_dir), [ddraw_prism](#ddraw_prism), [ddraw_push_2d](#ddraw_push_2d), [ddraw_pyramid](#ddraw_pyramid), [ddraw_ring](#ddraw_ring), [ddraw_sphere](#ddraw_sphere), [ddraw_square](#ddraw_square), [ddraw_text](#ddraw_text), [ddraw_text2d](#ddraw_text2d), [ddraw_triangle](#ddraw_triangle), [dec2](#dec2), [dec3](#dec3), [dec4](#dec4), [deg](#deg), [det44](#det44), [dialog_load](#dialog_load), [dialog_save](#dialog_save), [diamond](#diamond), [die](#die), [div2](#div2), [div3](#div3), [div4](#div4), [dll](#dll), [dot2](#dot2), [dot3](#dot3), [dot4](#dot4), [dotq](#dotq), [download](#download), [download_file](#download_file), [ease](#ease), [ease_in_back](#ease_in_back), [ease_in_bounce](#ease_in_bounce), [ease_in_circ](#ease_in_circ), [ease_in_cubic](#ease_in_cubic), [ease_in_elastic](#ease_in_elastic), [ease_in_expo](#ease_in_expo), [ease_in_quad](#ease_in_quad), [ease_in_quart](#ease_in_quart), [ease_in_quint](#ease_in_quint), [ease_in_sine](#ease_in_sine), [ease_inout_back](#ease_inout_back), [ease_inout_bounce](#ease_inout_bounce), [ease_inout_circ](#ease_inout_circ), [ease_inout_cubic](#ease_inout_cubic), [ease_inout_elastic](#ease_inout_elastic), [ease_inout_expo](#ease_inout_expo), [ease_inout_perlin](#ease_inout_perlin), [ease_inout_quad](#ease_inout_quad), [ease_inout_quart](#ease_inout_quart), [ease_inout_quint](#ease_inout_quint), [ease_inout_sine](#ease_inout_sine), [ease_linear](#ease_linear), [ease_out_back](#ease_out_back), [ease_out_bounce](#ease_out_bounce), [ease_out_circ](#ease_out_circ), [ease_out_cubic](#ease_out_cubic), [ease_out_elastic](#ease_out_elastic), [ease_out_expo](#ease_out_expo), [ease_out_quad](#ease_out_quad), [ease_out_quart](#ease_out_quart), [ease_out_quint](#ease_out_quint), [ease_out_sine](#ease_out_sine), [ease_ping_pong](#ease_ping_pong), [ease_pong_ping](#ease_pong_ping), [editor_path](#editor_path), [editor_pick](#editor_pick), [euler](#euler), [eulerq](#eulerq), [extract33](#extract33), [fbo](#fbo), [fbo_bind](#fbo_bind), [fbo_destroy](#fbo_destroy), [fbo_unbind](#fbo_unbind), [file_append](#file_append), [file_base](#file_base), [file_copy](#file_copy), [file_counter](#file_counter), [file_crc32](#file_crc32), [file_delete](#file_delete), [file_directory](#file_directory), [file_exist](#file_exist), [file_ext](#file_ext), [file_id](#file_id), [file_list](#file_list), [file_load](#file_load), [file_md5](#file_md5), [file_move](#file_move), [file_name](#file_name), [file_normalize](#file_normalize), [file_path](#file_path), [file_pathabs](#file_pathabs), [file_read](#file_read), [file_sha1](#file_sha1), [file_size](#file_size), [file_stamp](#file_stamp), [file_stamp_epoch](#file_stamp_epoch), [file_temp](#file_temp), [file_tempname](#file_tempname), [file_write](#file_write), [file_zip_append](#file_zip_append), [file_zip_appendmem](#file_zip_appendmem), [file_zip_extract](#file_zip_extract), [file_zip_list](#file_zip_list), [finite2](#finite2), [finite3](#finite3), [finite4](#finite4), [flag](#flag), [floor2](#floor2), [floor3](#floor3), [floor4](#floor4), [font_color](#font_color), [font_colorize](#font_colorize), [font_face](#font_face), [font_face_from_mem](#font_face_from_mem), [font_goto](#font_goto), [font_highlight](#font_highlight), [font_print](#font_print), [font_rect](#font_rect), [font_scales](#font_scales), [font_xy](#font_xy), [forget](#forget), [fract2](#fract2), [fract3](#fract3), [fract4](#fract4), [fractf](#fractf), [frustum44](#frustum44), [frustum_build](#frustum_build), [frustum_test_aabb](#frustum_test_aabb), [frustum_test_sphere](#frustum_test_sphere), [fullscreen_quad_rgb](#fullscreen_quad_rgb), [fullscreen_quad_ycbcr](#fullscreen_quad_ycbcr), [fx_begin](#fx_begin), [fx_enable](#fx_enable), [fx_enable_all](#fx_enable_all), [fx_enabled](#fx_enabled), [fx_end](#fx_end), [fx_find](#fx_find), [fx_load](#fx_load), [fx_load_from_mem](#fx_load_from_mem), [fx_name](#fx_name), [gizmo](#gizmo), [gizmo_active](#gizmo_active), [gizmo_hover](#gizmo_hover), [gjk](#gjk), [gjk_analyze](#gjk_analyze), [gjk_quad](#gjk_quad), [has_debugger](#has_debugger), [hash_32](#hash_32), [hash_64](#hash_64), [hash_flt](#hash_flt), [hash_int](#hash_int), [hash_ptr](#hash_ptr), [hash_str](#hash_str), [hexdump](#hexdump), [hexdumpf](#hexdumpf), [id33](#id33), [id34](#id34), [id44](#id44), [identity44](#identity44), [idq](#idq), [image](#image), [image_destroy](#image_destroy), [image_from_mem](#image_from_mem), [inc2](#inc2), [inc3](#inc3), [inc4](#inc4), [ini](#ini), [ini_destroy](#ini_destroy), [ini_from_mem](#ini_from_mem), [ini_write](#ini_write), [input](#input), [input2](#input2), [input_anykey](#input_anykey), [input_chord2](#input_chord2), [input_chord3](#input_chord3), [input_chord4](#input_chord4), [input_click](#input_click), [input_click2](#input_click2), [input_demo](#input_demo), [input_diff](#input_diff), [input_diff2](#input_diff2), [input_down](#input_down), [input_filter_deadzone](#input_filter_deadzone), [input_filter_deadzone_4way](#input_filter_deadzone_4way), [input_filter_positive](#input_filter_positive), [input_filter_positive2](#input_filter_positive2), [input_frame](#input_frame), [input_frame2](#input_frame2), [input_frames](#input_frames), [input_held](#input_held), [input_idle](#input_idle), [input_keychar](#input_keychar), [input_load_state](#input_load_state), [input_mappings](#input_mappings), [input_repeat](#input_repeat), [input_save_state](#input_save_state), [input_send](#input_send), [input_touch](#input_touch), [input_touch_active](#input_touch_active), [input_touch_area](#input_touch_area), [input_touch_delta](#input_touch_delta), [input_touch_delta_from_origin](#input_touch_delta_from_origin), [input_up](#input_up), [input_use](#input_use), [invert34](#invert34), [invert44](#invert44), [json_count](#json_count), [json_find](#json_find), [json_get](#json_get), [json_key](#json_key), [json_pop](#json_pop), [json_push](#json_push), [kit_clear](#kit_clear), [kit_dump_state](#kit_dump_state), [kit_insert](#kit_insert), [kit_load](#kit_load), [kit_locale](#kit_locale), [kit_merge](#kit_merge), [kit_reset](#kit_reset), [kit_set](#kit_set), [kit_translate](#kit_translate), [kit_translate2](#kit_translate2), [len2](#len2), [len2sq](#len2sq), [len3](#len3), [len3sq](#len3sq), [len4](#len4), [len4sq](#len4sq), [lerp34](#lerp34), [less_64](#less_64), [less_int](#less_int), [less_ptr](#less_ptr), [less_str](#less_str), [lil16](#lil16), [lil16p](#lil16p), [lil32](#lil32), [lil32f](#lil32f), [lil32p](#lil32p), [lil32pf](#lil32pf), [lil64](#lil64), [lil64f](#lil64f), [lil64p](#lil64p), [lil64pf](#lil64pf), [line_closest_point](#line_closest_point), [line_distance2_point](#line_distance2_point), [lookat44](#lookat44), [loop](#loop), [map_clear](#map_clear), [map_count](#map_count), [map_erase](#map_erase), [map_find](#map_find), [map_free](#map_free), [map_gc](#map_gc), [map_init](#map_init), [map_insert](#map_insert), [map_sort](#map_sort), [mat44q](#mat44q), [max2](#max2), [max3](#max3), [max4](#max4), [maxf](#maxf), [maxi](#maxi), [mesh](#mesh), [mesh_bounds](#mesh_bounds), [mesh_destroy](#mesh_destroy), [mesh_render](#mesh_render), [mesh_update](#mesh_update), [midi_send](#midi_send), [min2](#min2), [min3](#min3), [min4](#min4), [minf](#minf), [mini](#mini), [mix2](#mix2), [mix3](#mix3), [mix4](#mix4), [mixf](#mixf), [mixq](#mixq), [model](#model), [model_aabb](#model_aabb), [model_animate](#model_animate), [model_animate_blends](#model_animate_blends), [model_animate_clip](#model_animate_clip), [model_destroy](#model_destroy), [model_from_mem](#model_from_mem), [model_get_bone_pose](#model_get_bone_pose), [model_render](#model_render), [model_render_instanced](#model_render_instanced), [model_render_skeleton](#model_render_skeleton), [model_set_texture](#model_set_texture), [mul2](#mul2), [mul3](#mul3), [mul4](#mul4), [muladd34](#muladd34), [mulq](#mulq), [multiply33x2](#multiply33x2), [multiply34](#multiply34), [multiply34x2](#multiply34x2), [multiply34x3](#multiply34x3), [multiply44](#multiply44), [multiply44x2](#multiply44x2), [multiply44x3](#multiply44x3), [mulv33](#mulv33), [neg2](#neg2), [neg3](#neg3), [neg4](#neg4), [negq](#negq), [network_buffer](#network_buffer), [network_create](#network_create), [network_get](#network_get), [network_put](#network_put), [network_rpc](#network_rpc), [network_rpc_send](#network_rpc_send), [network_rpc_send_to](#network_rpc_send_to), [network_sync](#network_sync), [network_tests](#network_tests), [norm2](#norm2), [norm3](#norm3), [norm3sq](#norm3sq), [norm4](#norm4), [norm4sq](#norm4sq), [normq](#normq), [obj_calloc](#obj_calloc), [obj_clone](#obj_clone), [obj_copy](#obj_copy), [obj_del](#obj_del), [obj_extend](#obj_extend), [obj_free](#obj_free), [obj_hexdump](#obj_hexdump), [obj_hexdumpf](#obj_hexdumpf), [obj_initialize](#obj_initialize), [obj_instances](#obj_instances), [obj_load](#obj_load), [obj_load_file](#obj_load_file), [obj_load_inplace](#obj_load_inplace), [obj_malloc](#obj_malloc), [obj_mutate](#obj_mutate), [obj_new](#obj_new), [obj_output](#obj_output), [obj_override](#obj_override), [obj_printf](#obj_printf), [obj_ref](#obj_ref), [obj_save](#obj_save), [obj_save_file](#obj_save_file), [obj_save_inplace](#obj_save_inplace), [obj_sizeof](#obj_sizeof), [obj_typeeq](#obj_typeeq), [obj_typeid](#obj_typeid), [obj_typeid_from_name](#obj_typeid_from_name), [obj_typeof](#obj_typeof), [obj_unref](#obj_unref), [obj_zero](#obj_zero), [object](#object), [object_billboard](#object_billboard), [object_diffuse](#object_diffuse), [object_diffuse_pop](#object_diffuse_pop), [object_diffuse_push](#object_diffuse_push), [object_model](#object_model), [object_move](#object_move), [object_pivot](#object_pivot), [object_position](#object_position), [object_rotate](#object_rotate), [object_scale](#object_scale), [object_teleport](#object_teleport), [option](#option), [optionf](#optionf), [optioni](#optioni), [ortho3](#ortho3), [ortho44](#ortho44), [PANIC](#PANIC), [pathfind_astar](#pathfind_astar), [pbr_material](#pbr_material), [pbr_material_destroy](#pbr_material_destroy), [perspective44](#perspective44), [plane4](#plane4), [pmod2](#pmod2), [pmod3](#pmod3), [pmod4](#pmod4), [pmodf](#pmodf), [poly_alloc](#poly_alloc), [poly_free](#poly_free), [poly_hit_aabb](#poly_hit_aabb), [poly_hit_aabb_transform](#poly_hit_aabb_transform), [poly_hit_capsule](#poly_hit_capsule), [poly_hit_capsule_transform](#poly_hit_capsule_transform), [poly_hit_poly](#poly_hit_poly), [poly_hit_poly_transform](#poly_hit_poly_transform), [poly_hit_sphere](#poly_hit_sphere), [poly_hit_sphere_transform](#poly_hit_sphere_transform), [poly_test_aabb](#poly_test_aabb), [poly_test_aabb_transform](#poly_test_aabb_transform), [poly_test_capsule](#poly_test_capsule), [poly_test_capsule_transform](#poly_test_capsule_transform), [poly_test_poly](#poly_test_poly), [poly_test_poly_transform](#poly_test_poly_transform), [poly_test_sphere](#poly_test_sphere), [poly_test_sphere_transform](#poly_test_sphere_transform), [popcnt64](#popcnt64), [portname](#portname), [pose](#pose), [print2](#print2), [print3](#print3), [print33](#print33), [print34](#print34), [print4](#print4), [print44](#print44), [PRINTF](#PRINTF), [printq](#printq), [profile_enable](#profile_enable), [ptr2](#ptr2), [ptr3](#ptr3), [ptr4](#ptr4), [ptrq](#ptrq), [pyramid](#pyramid), [rad](#rad), [rand64](#rand64), [randf](#randf), [randi](#randi), [randset](#randset), [ray_hit_aabb](#ray_hit_aabb), [ray_hit_plane](#ray_hit_plane), [ray_hit_sphere](#ray_hit_sphere), [ray_hit_triangle](#ray_hit_triangle), [ray_test_aabb](#ray_test_aabb), [ray_test_plane](#ray_test_plane), [ray_test_sphere](#ray_test_sphere), [ray_test_triangle](#ray_test_triangle), [record_active](#record_active), [record_start](#record_start), [record_stop](#record_stop), [refl2](#refl2), [refl3](#refl3), [refl4](#refl4), [relocate44](#relocate44), [rgba](#rgba), [rgbaf](#rgbaf), [rnd3](#rnd3), [rotate33](#rotate33), [rotate3q](#rotate3q), [rotate3q_2](#rotate3q_2), [rotate44](#rotate44), [rotatex3](#rotatex3), [rotatey3](#rotatey3), [rotatez3](#rotatez3), [rotation33](#rotation33), [rotation44](#rotation44), [rotationq](#rotationq), [rotationq33](#rotationq33), [rotationq44](#rotationq44), [scale2](#scale2), [scale3](#scale3), [scale33](#scale33), [scale34](#scale34), [scale4](#scale4), [scale44](#scale44), [scaleq](#scaleq), [scaling33](#scaling33), [scaling44](#scaling44), [scene_count](#scene_count), [scene_get_active](#scene_get_active), [scene_index](#scene_index), [scene_merge](#scene_merge), [scene_pop](#scene_pop), [scene_push](#scene_push), [scene_render](#scene_render), [scene_spawn](#scene_spawn), [screenshot](#screenshot), [screenshot_async](#screenshot_async), [script_bind_class](#script_bind_class), [script_bind_function](#script_bind_function), [script_call](#script_call), [script_init](#script_init), [script_run](#script_run), [script_runfile](#script_runfile), [script_tests](#script_tests), [server_bind](#server_bind), [server_broadcast](#server_broadcast), [server_broadcast_bin](#server_broadcast_bin), [server_drop](#server_drop), [server_poll](#server_poll), [server_send](#server_send), [server_send_bin](#server_send_bin), [server_terminate](#server_terminate), [set_clear](#set_clear), [set_count](#set_count), [set_erase](#set_erase), [set_find](#set_find), [set_free](#set_free), [set_gc](#set_gc), [set_init](#set_init), [set_insert](#set_insert), [shader](#shader), [shader_bind](#shader_bind), [shader_bool](#shader_bool), [shader_colormap](#shader_colormap), [shader_destroy](#shader_destroy), [shader_float](#shader_float), [shader_get_active](#shader_get_active), [shader_int](#shader_int), [shader_mat44](#shader_mat44), [shader_texture](#shader_texture), [shader_texture_unit](#shader_texture_unit), [shader_uint](#shader_uint), [shader_vec2](#shader_vec2), [shader_vec3](#shader_vec3), [shader_vec4](#shader_vec4), [shadertoy](#shadertoy), [shadertoy_render](#shadertoy_render), [shadowmap](#shadowmap), [shadowmap_begin](#shadowmap_begin), [shadowmap_destroy](#shadowmap_destroy), [shadowmap_end](#shadowmap_end), [shadowmap_set_shadowmatrix](#shadowmap_set_shadowmatrix), [shadowmatrix_ortho](#shadowmatrix_ortho), [shadowmatrix_proj](#shadowmatrix_proj), [signal_handler_abort](#signal_handler_abort), [signal_handler_debug](#signal_handler_debug), [signal_handler_ignore](#signal_handler_ignore), [signal_handler_quit](#signal_handler_quit), [signal_hooks](#signal_hooks), [signal_name](#signal_name), [signf](#signf), [simplex1](#simplex1), [simplex2](#simplex2), [simplex3](#simplex3), [simplex4](#simplex4), [skybox](#skybox), [skybox_destroy](#skybox_destroy), [skybox_pop_state](#skybox_pop_state), [skybox_push_state](#skybox_push_state), [skybox_render](#skybox_render), [sleep_ms](#sleep_ms), [sleep_ns](#sleep_ns), [sleep_ss](#sleep_ss), [sleep_us](#sleep_us), [slerpq](#slerpq), [sort_64](#sort_64), [sphere_closest_point](#sphere_closest_point), [sphere_hit_aabb](#sphere_hit_aabb), [sphere_hit_capsule](#sphere_hit_capsule), [sphere_hit_sphere](#sphere_hit_sphere), [sphere_test_aabb](#sphere_test_aabb), [sphere_test_capsule](#sphere_test_capsule), [sphere_test_poly](#sphere_test_poly), [sphere_test_sphere](#sphere_test_sphere), [spine](#spine), [spine_animate](#spine_animate), [spine_render](#spine_render), [spine_skin](#spine_skin), [spine_ui](#spine_ui), [sprite](#sprite), [sprite_flush](#sprite_flush), [sprite_rect](#sprite_rect), [sprite_sheet](#sprite_sheet), [stack](#stack), [storage_flush](#storage_flush), [storage_mount](#storage_mount), [storage_read](#storage_read), [strbeg](#strbeg), [strbegi](#strbegi), [strcatf](#strcatf), [strcmp_qsort](#strcmp_qsort), [strcmpi_qsort](#strcmpi_qsort), [strcut](#strcut), [strend](#strend), [strendi](#strendi), [string32](#string32), [string8](#string8), [strjoin](#strjoin), [strlcat](#strlcat), [strlcpy](#strlcpy), [strlerp](#strlerp), [strlower](#strlower), [strmatch](#strmatch), [strmatchi](#strmatchi), [strrepl](#strrepl), [strsplit](#strsplit), [strstri](#strstri), [strswap](#strswap), [strtok_s](#strtok_s), [strupper](#strupper), [sub2](#sub2), [sub3](#sub3), [sub4](#sub4), [subq](#subq), [swarm](#swarm), [swarm_update](#swarm_update), [swarm_update_acceleration_and_velocity_only](#swarm_update_acceleration_and_velocity_only), [swarm_update_acceleration_only](#swarm_update_acceleration_only), [tcp_bind](#tcp_bind), [tcp_close](#tcp_close), [tcp_debug](#tcp_debug), [tcp_host](#tcp_host), [tcp_open](#tcp_open), [tcp_peek](#tcp_peek), [tcp_port](#tcp_port), [tcp_recv](#tcp_recv), [tcp_send](#tcp_send), [tempva](#tempva), [tempvl](#tempvl), [texture](#texture), [texture_checker](#texture_checker), [texture_compressed](#texture_compressed), [texture_compressed_from_mem](#texture_compressed_from_mem), [texture_create](#texture_create), [texture_destroy](#texture_destroy), [texture_from_mem](#texture_from_mem), [texture_rec_begin](#texture_rec_begin), [texture_rec_end](#texture_rec_end), [texture_update](#texture_update), [thread](#thread), [thread_destroy](#thread_destroy), [tiled](#tiled), [tiled_render](#tiled_render), [tiled_ui](#tiled_ui), [tilemap](#tilemap), [tilemap_render](#tilemap_render), [tilemap_render_ext](#tilemap_render_ext), [tileset](#tileset), [tileset_ui](#tileset_ui), [time_hh](#time_hh), [time_mm](#time_mm), [time_ms](#time_ms), [time_ns](#time_ns), [time_ss](#time_ss), [time_us](#time_us), [timer](#timer), [timer_destroy](#timer_destroy), [transform33](#transform33), [transform344](#transform344), [transform444](#transform444), [transformq](#transformq), [translate44](#translate44), [translation44](#translation44), [transpose44](#transpose44), [tty_attach](#tty_attach), [tty_color](#tty_color), [tty_detach](#tty_detach), [tty_reset](#tty_reset), [udp_bind](#udp_bind), [udp_open](#udp_open), [udp_peek](#udp_peek), [udp_recv](#udp_recv), [udp_send](#udp_send), [udp_sendto](#udp_sendto), [ui_active](#ui_active), [ui_bits16](#ui_bits16), [ui_bits8](#ui_bits8), [ui_bool](#ui_bool), [ui_browse](#ui_browse), [ui_buffer](#ui_buffer), [ui_button](#ui_button), [ui_button_transparent](#ui_button_transparent), [ui_buttons](#ui_buttons), [ui_clampf](#ui_clampf), [ui_collapse](#ui_collapse), [ui_collapse_clicked](#ui_collapse_clicked), [ui_collapse_end](#ui_collapse_end), [ui_color3](#ui_color3), [ui_color3f](#ui_color3f), [ui_color4](#ui_color4), [ui_color4f](#ui_color4f), [ui_colormap](#ui_colormap), [ui_console](#ui_console), [ui_const_bool](#ui_const_bool), [ui_const_float](#ui_const_float), [ui_const_string](#ui_const_string), [ui_contextual](#ui_contextual), [ui_contextual_end](#ui_contextual_end), [ui_demo](#ui_demo), [ui_dialog](#ui_dialog), [ui_disable](#ui_disable), [ui_double](#ui_double), [ui_enable](#ui_enable), [ui_float](#ui_float), [ui_float2](#ui_float2), [ui_float3](#ui_float3), [ui_float4](#ui_float4), [ui_has_menubar](#ui_has_menubar), [ui_hover](#ui_hover), [ui_image](#ui_image), [ui_int](#ui_int), [ui_item](#ui_item), [ui_label](#ui_label), [ui_label2](#ui_label2), [ui_label2_toolbar](#ui_label2_toolbar), [ui_list](#ui_list), [ui_menu](#ui_menu), [ui_menu_editbox](#ui_menu_editbox), [ui_notify](#ui_notify), [ui_panel](#ui_panel), [ui_panel_end](#ui_panel_end), [ui_popups](#ui_popups), [ui_radio](#ui_radio), [ui_section](#ui_section), [ui_separator](#ui_separator), [ui_short](#ui_short), [ui_show](#ui_show), [ui_slider](#ui_slider), [ui_slider2](#ui_slider2), [ui_string](#ui_string), [ui_subimage](#ui_subimage), [ui_submenu](#ui_submenu), [ui_subtexture](#ui_subtexture), [ui_swarm](#ui_swarm), [ui_texture](#ui_texture), [ui_toggle](#ui_toggle), [ui_toolbar](#ui_toolbar), [ui_unsigned](#ui_unsigned), [ui_visible](#ui_visible), [ui_window](#ui_window), [ui_window_end](#ui_window_end), [unhash_32](#unhash_32), [unproject44](#unproject44), [vec23](#vec23), [vec34](#vec34), [vec3q](#vec3q), [vec4q](#vec4q), [vfs_handle](#vfs_handle), [vfs_list](#vfs_list), [vfs_load](#vfs_load), [vfs_mount](#vfs_mount), [vfs_read](#vfs_read), [vfs_resolve](#vfs_resolve), [vfs_size](#vfs_size), [video](#video), [video_decode](#video_decode), [video_destroy](#video_destroy), [video_duration](#video_duration), [video_has_finished](#video_has_finished), [video_is_paused](#video_is_paused), [video_is_rgb](#video_is_rgb), [video_pause](#video_pause), [video_position](#video_position), [video_seek](#video_seek), [video_textures](#video_textures), [viewport_clear](#viewport_clear), [viewport_clip](#viewport_clip), [viewport_color](#viewport_color), [viewport_color3](#viewport_color3), [vlen](#vlen), [vrealloc](#vrealloc), [watch](#watch), [window_aspect](#window_aspect), [window_aspect_lock](#window_aspect_lock), [window_aspect_unlock](#window_aspect_unlock), [window_canvas](#window_canvas), [window_color](#window_color), [window_create](#window_create), [window_create_from_handle](#window_create_from_handle), [window_cursor](#window_cursor), [window_cursor_shape](#window_cursor_shape), [window_delta](#window_delta), [window_focus](#window_focus), [window_fps](#window_fps), [window_fps_lock](#window_fps_lock), [window_fps_target](#window_fps_target), [window_fps_unlock](#window_fps_unlock), [window_frame](#window_frame), [window_frame_begin](#window_frame_begin), [window_frame_end](#window_frame_end), [window_frame_swap](#window_frame_swap), [window_fullscreen](#window_fullscreen), [window_handle](#window_handle), [window_has_cursor](#window_has_cursor), [window_has_focus](#window_has_focus), [window_has_fullscreen](#window_has_fullscreen), [window_has_pause](#window_has_pause), [window_has_visible](#window_has_visible), [window_height](#window_height), [window_icon](#window_icon), [window_loop](#window_loop), [window_loop_exit](#window_loop_exit), [window_pause](#window_pause), [window_record](#window_record), [window_reload](#window_reload), [window_screenshot](#window_screenshot), [window_stats](#window_stats), [window_swap](#window_swap), [window_time](#window_time), [window_title](#window_title), [window_visible](#window_visible), [window_width](#window_width), [xml_blob](#xml_blob), [xml_count](#xml_count), [xml_pop](#xml_pop), [xml_push](#xml_push), [xml_string](#xml_string), [xrealloc](#xrealloc), [xsize](#xsize), [xstats](#xstats), [zbounds](#zbounds), [zdecode](#zdecode), [zencode](#zencode), [zexcess](#zexcess) +[aabb_closest_point](#aabb_closest_point), [aabb_contains_point](#aabb_contains_point), [aabb_distance2_point](#aabb_distance2_point), [aabb_hit_aabb](#aabb_hit_aabb), [aabb_hit_capsule](#aabb_hit_capsule), [aabb_hit_sphere](#aabb_hit_sphere), [aabb_test_aabb](#aabb_test_aabb), [aabb_test_capsule](#aabb_test_capsule), [aabb_test_poly](#aabb_test_poly), [aabb_test_sphere](#aabb_test_sphere), [abs2](#abs2), [abs3](#abs3), [abs4](#abs4), [absf](#absf), [absi](#absi), [add2](#add2), [add3](#add3), [add34](#add34), [add34x2](#add34x2), [add4](#add4), [addq](#addq), [alert](#alert), [alpha](#alpha), [animations](#animations), [app_battery](#app_battery), [app_cache](#app_cache), [app_cmdline](#app_cmdline), [app_cores](#app_cores), [app_exec](#app_exec), [app_name](#app_name), [app_path](#app_path), [app_temp](#app_temp), [argc](#argc), [argv](#argv), [audio_clip](#audio_clip), [audio_play](#audio_play), [audio_play_gain](#audio_play_gain), [audio_play_gain_pitch](#audio_play_gain_pitch), [audio_play_gain_pitch_pan](#audio_play_gain_pitch_pan), [audio_queue](#audio_queue), [audio_stop](#audio_stop), [audio_stream](#audio_stream), [audio_volume_clip](#audio_volume_clip), [audio_volume_master](#audio_volume_master), [audio_volume_stream](#audio_volume_stream), [bgra](#bgra), [bgraf](#bgraf), [big16](#big16), [big16p](#big16p), [big32](#big32), [big32f](#big32f), [big32p](#big32p), [big32pf](#big32pf), [big64](#big64), [big64f](#big64f), [big64p](#big64p), [big64pf](#big64pf), [brdf_lut](#brdf_lut), [breakpoint](#breakpoint), [cache_insert](#cache_insert), [cache_lookup](#cache_lookup), [callstack](#callstack), [callstackf](#callstackf), [camera](#camera), [camera_enable](#camera_enable), [camera_fov](#camera_fov), [camera_fps](#camera_fps), [camera_get_active](#camera_get_active), [camera_lookat](#camera_lookat), [camera_move](#camera_move), [camera_orbit](#camera_orbit), [camera_teleport](#camera_teleport), [capsule_closest_point](#capsule_closest_point), [capsule_distance2_point](#capsule_distance2_point), [capsule_hit_aabb](#capsule_hit_aabb), [capsule_hit_capsule](#capsule_hit_capsule), [capsule_hit_sphere](#capsule_hit_sphere), [capsule_test_aabb](#capsule_test_aabb), [capsule_test_capsule](#capsule_test_capsule), [capsule_test_poly](#capsule_test_poly), [capsule_test_sphere](#capsule_test_sphere), [cc4](#cc4), [cc4str](#cc4str), [cc8](#cc8), [cc8str](#cc8str), [ceil2](#ceil2), [ceil3](#ceil3), [ceil4](#ceil4), [clamp2](#clamp2), [clamp3](#clamp3), [clamp4](#clamp4), [clampf](#clampf), [clampi](#clampi), [client_join](#client_join), [clip](#clip), [collide_demo](#collide_demo), [colormap](#colormap), [compose33](#compose33), [compose34](#compose34), [compose44](#compose44), [conjq](#conjq), [cook_cancel](#cook_cancel), [cook_config](#cook_config), [cook_jobs](#cook_jobs), [cook_progress](#cook_progress), [cook_start](#cook_start), [cook_stop](#cook_stop), [copy33](#copy33), [copy34](#copy34), [copy44](#copy44), [cross2](#cross2), [cross3](#cross3), [cubemap](#cubemap), [cubemap6](#cubemap6), [cubemap_destroy](#cubemap_destroy), [cubemap_get_active](#cubemap_get_active), [data_tests](#data_tests), [date](#date), [date_epoch](#date_epoch), [date_string](#date_string), [ddraw_aabb](#ddraw_aabb), [ddraw_aabb_corners](#ddraw_aabb_corners), [ddraw_arrow](#ddraw_arrow), [ddraw_axis](#ddraw_axis), [ddraw_boid](#ddraw_boid), [ddraw_bone](#ddraw_bone), [ddraw_bounds](#ddraw_bounds), [ddraw_box](#ddraw_box), [ddraw_capsule](#ddraw_capsule), [ddraw_circle](#ddraw_circle), [ddraw_color](#ddraw_color), [ddraw_color_pop](#ddraw_color_pop), [ddraw_color_push](#ddraw_color_push), [ddraw_cone](#ddraw_cone), [ddraw_cube](#ddraw_cube), [ddraw_cube33](#ddraw_cube33), [ddraw_cylinder](#ddraw_cylinder), [ddraw_demo](#ddraw_demo), [ddraw_diamond](#ddraw_diamond), [ddraw_flush](#ddraw_flush), [ddraw_flush_projview](#ddraw_flush_projview), [ddraw_frustum](#ddraw_frustum), [ddraw_grid](#ddraw_grid), [ddraw_ground](#ddraw_ground), [ddraw_hexagon](#ddraw_hexagon), [ddraw_line](#ddraw_line), [ddraw_line_dashed](#ddraw_line_dashed), [ddraw_line_thin](#ddraw_line_thin), [ddraw_normal](#ddraw_normal), [ddraw_ontop](#ddraw_ontop), [ddraw_ontop_pop](#ddraw_ontop_pop), [ddraw_ontop_push](#ddraw_ontop_push), [ddraw_pentagon](#ddraw_pentagon), [ddraw_plane](#ddraw_plane), [ddraw_point](#ddraw_point), [ddraw_pop_2d](#ddraw_pop_2d), [ddraw_position](#ddraw_position), [ddraw_position_dir](#ddraw_position_dir), [ddraw_prism](#ddraw_prism), [ddraw_push_2d](#ddraw_push_2d), [ddraw_pyramid](#ddraw_pyramid), [ddraw_ring](#ddraw_ring), [ddraw_sphere](#ddraw_sphere), [ddraw_square](#ddraw_square), [ddraw_text](#ddraw_text), [ddraw_text2d](#ddraw_text2d), [ddraw_triangle](#ddraw_triangle), [dec2](#dec2), [dec3](#dec3), [dec4](#dec4), [deg](#deg), [det44](#det44), [dialog_load](#dialog_load), [dialog_save](#dialog_save), [diamond](#diamond), [die](#die), [div2](#div2), [div3](#div3), [div4](#div4), [dll](#dll), [dot2](#dot2), [dot3](#dot3), [dot4](#dot4), [dotq](#dotq), [download](#download), [download_file](#download_file), [ease](#ease), [ease_in_back](#ease_in_back), [ease_in_bounce](#ease_in_bounce), [ease_in_circ](#ease_in_circ), [ease_in_cubic](#ease_in_cubic), [ease_in_elastic](#ease_in_elastic), [ease_in_expo](#ease_in_expo), [ease_in_quad](#ease_in_quad), [ease_in_quart](#ease_in_quart), [ease_in_quint](#ease_in_quint), [ease_in_sine](#ease_in_sine), [ease_inout_back](#ease_inout_back), [ease_inout_bounce](#ease_inout_bounce), [ease_inout_circ](#ease_inout_circ), [ease_inout_cubic](#ease_inout_cubic), [ease_inout_elastic](#ease_inout_elastic), [ease_inout_expo](#ease_inout_expo), [ease_inout_perlin](#ease_inout_perlin), [ease_inout_quad](#ease_inout_quad), [ease_inout_quart](#ease_inout_quart), [ease_inout_quint](#ease_inout_quint), [ease_inout_sine](#ease_inout_sine), [ease_linear](#ease_linear), [ease_out_back](#ease_out_back), [ease_out_bounce](#ease_out_bounce), [ease_out_circ](#ease_out_circ), [ease_out_cubic](#ease_out_cubic), [ease_out_elastic](#ease_out_elastic), [ease_out_expo](#ease_out_expo), [ease_out_quad](#ease_out_quad), [ease_out_quart](#ease_out_quart), [ease_out_quint](#ease_out_quint), [ease_out_sine](#ease_out_sine), [ease_ping_pong](#ease_ping_pong), [ease_pong_ping](#ease_pong_ping), [editor_path](#editor_path), [editor_pick](#editor_pick), [euler](#euler), [eulerq](#eulerq), [extract33](#extract33), [fbo](#fbo), [fbo_bind](#fbo_bind), [fbo_destroy](#fbo_destroy), [fbo_unbind](#fbo_unbind), [file_append](#file_append), [file_base](#file_base), [file_copy](#file_copy), [file_counter](#file_counter), [file_crc32](#file_crc32), [file_delete](#file_delete), [file_directory](#file_directory), [file_exist](#file_exist), [file_ext](#file_ext), [file_id](#file_id), [file_list](#file_list), [file_load](#file_load), [file_md5](#file_md5), [file_move](#file_move), [file_name](#file_name), [file_normalize](#file_normalize), [file_path](#file_path), [file_pathabs](#file_pathabs), [file_read](#file_read), [file_sha1](#file_sha1), [file_size](#file_size), [file_stamp](#file_stamp), [file_stamp_epoch](#file_stamp_epoch), [file_temp](#file_temp), [file_tempname](#file_tempname), [file_write](#file_write), [file_zip_append](#file_zip_append), [file_zip_appendmem](#file_zip_appendmem), [file_zip_extract](#file_zip_extract), [file_zip_list](#file_zip_list), [finite2](#finite2), [finite3](#finite3), [finite4](#finite4), [flag](#flag), [floor2](#floor2), [floor3](#floor3), [floor4](#floor4), [font_color](#font_color), [font_colorize](#font_colorize), [font_face](#font_face), [font_face_from_mem](#font_face_from_mem), [font_goto](#font_goto), [font_highlight](#font_highlight), [font_print](#font_print), [font_rect](#font_rect), [font_scales](#font_scales), [font_xy](#font_xy), [forget](#forget), [fract2](#fract2), [fract3](#fract3), [fract4](#fract4), [fractf](#fractf), [frustum44](#frustum44), [frustum_build](#frustum_build), [frustum_test_aabb](#frustum_test_aabb), [frustum_test_sphere](#frustum_test_sphere), [fullscreen_quad_rgb](#fullscreen_quad_rgb), [fullscreen_quad_ycbcr](#fullscreen_quad_ycbcr), [fx_begin](#fx_begin), [fx_enable](#fx_enable), [fx_enable_all](#fx_enable_all), [fx_enabled](#fx_enabled), [fx_end](#fx_end), [fx_find](#fx_find), [fx_load](#fx_load), [fx_load_from_mem](#fx_load_from_mem), [fx_name](#fx_name), [gizmo](#gizmo), [gizmo_active](#gizmo_active), [gizmo_hover](#gizmo_hover), [gjk](#gjk), [gjk_analyze](#gjk_analyze), [gjk_quad](#gjk_quad), [has_debugger](#has_debugger), [hash_32](#hash_32), [hash_64](#hash_64), [hash_flt](#hash_flt), [hash_int](#hash_int), [hash_ptr](#hash_ptr), [hash_str](#hash_str), [hexdump](#hexdump), [hexdumpf](#hexdumpf), [id33](#id33), [id34](#id34), [id44](#id44), [identity44](#identity44), [idq](#idq), [image](#image), [image_destroy](#image_destroy), [image_from_mem](#image_from_mem), [inc2](#inc2), [inc3](#inc3), [inc4](#inc4), [ini](#ini), [ini_destroy](#ini_destroy), [ini_from_mem](#ini_from_mem), [ini_write](#ini_write), [input](#input), [input2](#input2), [input_anykey](#input_anykey), [input_chord2](#input_chord2), [input_chord3](#input_chord3), [input_chord4](#input_chord4), [input_click](#input_click), [input_click2](#input_click2), [input_demo](#input_demo), [input_diff](#input_diff), [input_diff2](#input_diff2), [input_down](#input_down), [input_filter_deadzone](#input_filter_deadzone), [input_filter_deadzone_4way](#input_filter_deadzone_4way), [input_filter_positive](#input_filter_positive), [input_filter_positive2](#input_filter_positive2), [input_frame](#input_frame), [input_frame2](#input_frame2), [input_frames](#input_frames), [input_held](#input_held), [input_idle](#input_idle), [input_keychar](#input_keychar), [input_load_state](#input_load_state), [input_mappings](#input_mappings), [input_repeat](#input_repeat), [input_save_state](#input_save_state), [input_send](#input_send), [input_touch](#input_touch), [input_touch_active](#input_touch_active), [input_touch_area](#input_touch_area), [input_touch_delta](#input_touch_delta), [input_touch_delta_from_origin](#input_touch_delta_from_origin), [input_up](#input_up), [input_use](#input_use), [invert34](#invert34), [invert44](#invert44), [json_count](#json_count), [json_find](#json_find), [json_get](#json_get), [json_key](#json_key), [json_pop](#json_pop), [json_push](#json_push), [kit_clear](#kit_clear), [kit_dump_state](#kit_dump_state), [kit_insert](#kit_insert), [kit_load](#kit_load), [kit_locale](#kit_locale), [kit_merge](#kit_merge), [kit_reset](#kit_reset), [kit_set](#kit_set), [kit_translate](#kit_translate), [kit_translate2](#kit_translate2), [len2](#len2), [len2sq](#len2sq), [len3](#len3), [len3sq](#len3sq), [len4](#len4), [len4sq](#len4sq), [lerp34](#lerp34), [less_64](#less_64), [less_int](#less_int), [less_ptr](#less_ptr), [less_str](#less_str), [lil16](#lil16), [lil16p](#lil16p), [lil32](#lil32), [lil32f](#lil32f), [lil32p](#lil32p), [lil32pf](#lil32pf), [lil64](#lil64), [lil64f](#lil64f), [lil64p](#lil64p), [lil64pf](#lil64pf), [line_closest_point](#line_closest_point), [line_distance2_point](#line_distance2_point), [lookat44](#lookat44), [loop](#loop), [map_clear](#map_clear), [map_count](#map_count), [map_erase](#map_erase), [map_find](#map_find), [map_free](#map_free), [map_gc](#map_gc), [map_init](#map_init), [map_insert](#map_insert), [map_sort](#map_sort), [mat44q](#mat44q), [max2](#max2), [max3](#max3), [max4](#max4), [maxf](#maxf), [maxi](#maxi), [mesh](#mesh), [mesh_bounds](#mesh_bounds), [mesh_destroy](#mesh_destroy), [mesh_render](#mesh_render), [mesh_update](#mesh_update), [midi_send](#midi_send), [min2](#min2), [min3](#min3), [min4](#min4), [minf](#minf), [mini](#mini), [mix2](#mix2), [mix3](#mix3), [mix4](#mix4), [mixf](#mixf), [mixq](#mixq), [model](#model), [model_aabb](#model_aabb), [model_animate](#model_animate), [model_animate_blends](#model_animate_blends), [model_animate_clip](#model_animate_clip), [model_destroy](#model_destroy), [model_from_mem](#model_from_mem), [model_get_bone_pose](#model_get_bone_pose), [model_render](#model_render), [model_render_instanced](#model_render_instanced), [model_render_skeleton](#model_render_skeleton), [model_set_texture](#model_set_texture), [mul2](#mul2), [mul3](#mul3), [mul4](#mul4), [muladd34](#muladd34), [mulq](#mulq), [multiply33x2](#multiply33x2), [multiply34](#multiply34), [multiply34x2](#multiply34x2), [multiply34x3](#multiply34x3), [multiply44](#multiply44), [multiply44x2](#multiply44x2), [multiply44x3](#multiply44x3), [mulv33](#mulv33), [neg2](#neg2), [neg3](#neg3), [neg4](#neg4), [negq](#negq), [network_buffer](#network_buffer), [network_create](#network_create), [network_get](#network_get), [network_put](#network_put), [network_rpc](#network_rpc), [network_rpc_send](#network_rpc_send), [network_rpc_send_to](#network_rpc_send_to), [network_sync](#network_sync), [network_tests](#network_tests), [norm2](#norm2), [norm3](#norm3), [norm3sq](#norm3sq), [norm4](#norm4), [norm4sq](#norm4sq), [normq](#normq), [obj_calloc](#obj_calloc), [obj_clone](#obj_clone), [obj_copy](#obj_copy), [obj_del](#obj_del), [obj_extend](#obj_extend), [obj_free](#obj_free), [obj_hexdump](#obj_hexdump), [obj_hexdumpf](#obj_hexdumpf), [obj_initialize](#obj_initialize), [obj_instances](#obj_instances), [obj_load](#obj_load), [obj_load_file](#obj_load_file), [obj_load_inplace](#obj_load_inplace), [obj_malloc](#obj_malloc), [obj_mutate](#obj_mutate), [obj_new](#obj_new), [obj_output](#obj_output), [obj_override](#obj_override), [obj_printf](#obj_printf), [obj_ref](#obj_ref), [obj_save](#obj_save), [obj_save_file](#obj_save_file), [obj_save_inplace](#obj_save_inplace), [obj_sizeof](#obj_sizeof), [obj_typeeq](#obj_typeeq), [obj_typeid](#obj_typeid), [obj_typeid_from_name](#obj_typeid_from_name), [obj_typeof](#obj_typeof), [obj_unref](#obj_unref), [obj_zero](#obj_zero), [object](#object), [object_billboard](#object_billboard), [object_diffuse](#object_diffuse), [object_diffuse_pop](#object_diffuse_pop), [object_diffuse_push](#object_diffuse_push), [object_model](#object_model), [object_move](#object_move), [object_pivot](#object_pivot), [object_position](#object_position), [object_rotate](#object_rotate), [object_scale](#object_scale), [object_teleport](#object_teleport), [option](#option), [optionf](#optionf), [optioni](#optioni), [ortho3](#ortho3), [ortho44](#ortho44), [PANIC](#PANIC), [pathfind_astar](#pathfind_astar), [pbr_material](#pbr_material), [pbr_material_destroy](#pbr_material_destroy), [perspective44](#perspective44), [plane4](#plane4), [pmod2](#pmod2), [pmod3](#pmod3), [pmod4](#pmod4), [pmodf](#pmodf), [poly_alloc](#poly_alloc), [poly_free](#poly_free), [poly_hit_aabb](#poly_hit_aabb), [poly_hit_aabb_transform](#poly_hit_aabb_transform), [poly_hit_capsule](#poly_hit_capsule), [poly_hit_capsule_transform](#poly_hit_capsule_transform), [poly_hit_poly](#poly_hit_poly), [poly_hit_poly_transform](#poly_hit_poly_transform), [poly_hit_sphere](#poly_hit_sphere), [poly_hit_sphere_transform](#poly_hit_sphere_transform), [poly_test_aabb](#poly_test_aabb), [poly_test_aabb_transform](#poly_test_aabb_transform), [poly_test_capsule](#poly_test_capsule), [poly_test_capsule_transform](#poly_test_capsule_transform), [poly_test_poly](#poly_test_poly), [poly_test_poly_transform](#poly_test_poly_transform), [poly_test_sphere](#poly_test_sphere), [poly_test_sphere_transform](#poly_test_sphere_transform), [popcnt64](#popcnt64), [portname](#portname), [pose](#pose), [print2](#print2), [print3](#print3), [print33](#print33), [print34](#print34), [print4](#print4), [print44](#print44), [PRINTF](#PRINTF), [printq](#printq), [profile_enable](#profile_enable), [ptr2](#ptr2), [ptr3](#ptr3), [ptr4](#ptr4), [ptrq](#ptrq), [pyramid](#pyramid), [rad](#rad), [rand64](#rand64), [randf](#randf), [randi](#randi), [randset](#randset), [ray_hit_aabb](#ray_hit_aabb), [ray_hit_plane](#ray_hit_plane), [ray_hit_sphere](#ray_hit_sphere), [ray_hit_triangle](#ray_hit_triangle), [ray_test_aabb](#ray_test_aabb), [ray_test_plane](#ray_test_plane), [ray_test_sphere](#ray_test_sphere), [ray_test_triangle](#ray_test_triangle), [record_active](#record_active), [record_start](#record_start), [record_stop](#record_stop), [refl2](#refl2), [refl3](#refl3), [refl4](#refl4), [relocate44](#relocate44), [rgba](#rgba), [rgbaf](#rgbaf), [rnd3](#rnd3), [rotate33](#rotate33), [rotate3q](#rotate3q), [rotate3q_2](#rotate3q_2), [rotate44](#rotate44), [rotatex3](#rotatex3), [rotatey3](#rotatey3), [rotatez3](#rotatez3), [rotation33](#rotation33), [rotation44](#rotation44), [rotationq](#rotationq), [rotationq33](#rotationq33), [rotationq44](#rotationq44), [scale2](#scale2), [scale3](#scale3), [scale33](#scale33), [scale34](#scale34), [scale4](#scale4), [scale44](#scale44), [scaleq](#scaleq), [scaling33](#scaling33), [scaling44](#scaling44), [scene_count](#scene_count), [scene_get_active](#scene_get_active), [scene_index](#scene_index), [scene_merge](#scene_merge), [scene_pop](#scene_pop), [scene_push](#scene_push), [scene_render](#scene_render), [scene_spawn](#scene_spawn), [screenshot](#screenshot), [screenshot_async](#screenshot_async), [script_bind_class](#script_bind_class), [script_bind_function](#script_bind_function), [script_call](#script_call), [script_init](#script_init), [script_run](#script_run), [script_runfile](#script_runfile), [script_tests](#script_tests), [server_bind](#server_bind), [server_broadcast](#server_broadcast), [server_broadcast_bin](#server_broadcast_bin), [server_drop](#server_drop), [server_poll](#server_poll), [server_send](#server_send), [server_send_bin](#server_send_bin), [server_terminate](#server_terminate), [set_clear](#set_clear), [set_count](#set_count), [set_erase](#set_erase), [set_find](#set_find), [set_free](#set_free), [set_gc](#set_gc), [set_init](#set_init), [set_insert](#set_insert), [shader](#shader), [shader_bind](#shader_bind), [shader_bool](#shader_bool), [shader_colormap](#shader_colormap), [shader_destroy](#shader_destroy), [shader_float](#shader_float), [shader_get_active](#shader_get_active), [shader_int](#shader_int), [shader_mat44](#shader_mat44), [shader_texture](#shader_texture), [shader_texture_unit](#shader_texture_unit), [shader_uint](#shader_uint), [shader_vec2](#shader_vec2), [shader_vec3](#shader_vec3), [shader_vec4](#shader_vec4), [shadertoy](#shadertoy), [shadertoy_render](#shadertoy_render), [shadowmap](#shadowmap), [shadowmap_begin](#shadowmap_begin), [shadowmap_destroy](#shadowmap_destroy), [shadowmap_end](#shadowmap_end), [shadowmap_set_shadowmatrix](#shadowmap_set_shadowmatrix), [shadowmatrix_ortho](#shadowmatrix_ortho), [shadowmatrix_proj](#shadowmatrix_proj), [signal_handler_abort](#signal_handler_abort), [signal_handler_debug](#signal_handler_debug), [signal_handler_ignore](#signal_handler_ignore), [signal_handler_quit](#signal_handler_quit), [signal_hooks](#signal_hooks), [signal_name](#signal_name), [signf](#signf), [simplex1](#simplex1), [simplex2](#simplex2), [simplex3](#simplex3), [simplex4](#simplex4), [skybox](#skybox), [skybox_destroy](#skybox_destroy), [skybox_pop_state](#skybox_pop_state), [skybox_push_state](#skybox_push_state), [skybox_render](#skybox_render), [sleep_ms](#sleep_ms), [sleep_ns](#sleep_ns), [sleep_ss](#sleep_ss), [sleep_us](#sleep_us), [slerpq](#slerpq), [sort_64](#sort_64), [sphere_closest_point](#sphere_closest_point), [sphere_hit_aabb](#sphere_hit_aabb), [sphere_hit_capsule](#sphere_hit_capsule), [sphere_hit_sphere](#sphere_hit_sphere), [sphere_test_aabb](#sphere_test_aabb), [sphere_test_capsule](#sphere_test_capsule), [sphere_test_poly](#sphere_test_poly), [sphere_test_sphere](#sphere_test_sphere), [spine](#spine), [spine_animate](#spine_animate), [spine_render](#spine_render), [spine_skin](#spine_skin), [spine_ui](#spine_ui), [sprite](#sprite), [sprite_flush](#sprite_flush), [sprite_rect](#sprite_rect), [sprite_sheet](#sprite_sheet), [stack](#stack), [storage_flush](#storage_flush), [storage_mount](#storage_mount), [storage_read](#storage_read), [strbeg](#strbeg), [strbegi](#strbegi), [strcatf](#strcatf), [strcmp_qsort](#strcmp_qsort), [strcmpi_qsort](#strcmpi_qsort), [strcut](#strcut), [strend](#strend), [strendi](#strendi), [string32](#string32), [string8](#string8), [strjoin](#strjoin), [strlcat](#strlcat), [strlcpy](#strlcpy), [strlerp](#strlerp), [strlower](#strlower), [strmatch](#strmatch), [strmatchi](#strmatchi), [strrepl](#strrepl), [strsplit](#strsplit), [strstri](#strstri), [strswap](#strswap), [strtok_s](#strtok_s), [strupper](#strupper), [sub2](#sub2), [sub3](#sub3), [sub4](#sub4), [subq](#subq), [swarm](#swarm), [swarm_update](#swarm_update), [swarm_update_acceleration_and_velocity_only](#swarm_update_acceleration_and_velocity_only), [swarm_update_acceleration_only](#swarm_update_acceleration_only), [tcp_bind](#tcp_bind), [tcp_close](#tcp_close), [tcp_debug](#tcp_debug), [tcp_host](#tcp_host), [tcp_open](#tcp_open), [tcp_peek](#tcp_peek), [tcp_port](#tcp_port), [tcp_recv](#tcp_recv), [tcp_send](#tcp_send), [tempva](#tempva), [tempvl](#tempvl), [texture](#texture), [texture_checker](#texture_checker), [texture_compressed](#texture_compressed), [texture_compressed_from_mem](#texture_compressed_from_mem), [texture_create](#texture_create), [texture_destroy](#texture_destroy), [texture_from_mem](#texture_from_mem), [texture_rec_begin](#texture_rec_begin), [texture_rec_end](#texture_rec_end), [texture_update](#texture_update), [thread](#thread), [thread_destroy](#thread_destroy), [tiled](#tiled), [tiled_render](#tiled_render), [tiled_ui](#tiled_ui), [tilemap](#tilemap), [tilemap_render](#tilemap_render), [tilemap_render_ext](#tilemap_render_ext), [tileset](#tileset), [tileset_ui](#tileset_ui), [time_hh](#time_hh), [time_mm](#time_mm), [time_ms](#time_ms), [time_ns](#time_ns), [time_ss](#time_ss), [time_us](#time_us), [timer](#timer), [timer_destroy](#timer_destroy), [transform33](#transform33), [transform344](#transform344), [transform444](#transform444), [transformq](#transformq), [translate44](#translate44), [translation44](#translation44), [transpose44](#transpose44), [tty_attach](#tty_attach), [tty_color](#tty_color), [tty_detach](#tty_detach), [tty_reset](#tty_reset), [udp_bind](#udp_bind), [udp_open](#udp_open), [udp_peek](#udp_peek), [udp_recv](#udp_recv), [udp_send](#udp_send), [udp_sendto](#udp_sendto), [ui_active](#ui_active), [ui_bits16](#ui_bits16), [ui_bits8](#ui_bits8), [ui_bool](#ui_bool), [ui_browse](#ui_browse), [ui_buffer](#ui_buffer), [ui_button](#ui_button), [ui_button_transparent](#ui_button_transparent), [ui_buttons](#ui_buttons), [ui_clampf](#ui_clampf), [ui_collapse](#ui_collapse), [ui_collapse_clicked](#ui_collapse_clicked), [ui_collapse_end](#ui_collapse_end), [ui_color3](#ui_color3), [ui_color3f](#ui_color3f), [ui_color4](#ui_color4), [ui_color4f](#ui_color4f), [ui_colormap](#ui_colormap), [ui_console](#ui_console), [ui_const_bool](#ui_const_bool), [ui_const_float](#ui_const_float), [ui_const_string](#ui_const_string), [ui_contextual](#ui_contextual), [ui_contextual_end](#ui_contextual_end), [ui_demo](#ui_demo), [ui_dialog](#ui_dialog), [ui_disable](#ui_disable), [ui_double](#ui_double), [ui_enable](#ui_enable), [ui_float](#ui_float), [ui_float2](#ui_float2), [ui_float3](#ui_float3), [ui_float4](#ui_float4), [ui_has_menubar](#ui_has_menubar), [ui_hover](#ui_hover), [ui_image](#ui_image), [ui_int](#ui_int), [ui_item](#ui_item), [ui_label](#ui_label), [ui_label2](#ui_label2), [ui_label2_toolbar](#ui_label2_toolbar), [ui_list](#ui_list), [ui_menu](#ui_menu), [ui_menu_editbox](#ui_menu_editbox), [ui_notify](#ui_notify), [ui_panel](#ui_panel), [ui_panel_end](#ui_panel_end), [ui_popups](#ui_popups), [ui_radio](#ui_radio), [ui_section](#ui_section), [ui_separator](#ui_separator), [ui_short](#ui_short), [ui_show](#ui_show), [ui_slider](#ui_slider), [ui_slider2](#ui_slider2), [ui_string](#ui_string), [ui_subimage](#ui_subimage), [ui_submenu](#ui_submenu), [ui_subtexture](#ui_subtexture), [ui_swarm](#ui_swarm), [ui_texture](#ui_texture), [ui_toggle](#ui_toggle), [ui_toolbar](#ui_toolbar), [ui_unsigned](#ui_unsigned), [ui_visible](#ui_visible), [ui_window](#ui_window), [ui_window_end](#ui_window_end), [unhash_32](#unhash_32), [unproject44](#unproject44), [vec23](#vec23), [vec34](#vec34), [vec3q](#vec3q), [vec4q](#vec4q), [vfs_handle](#vfs_handle), [vfs_list](#vfs_list), [vfs_load](#vfs_load), [vfs_mount](#vfs_mount), [vfs_read](#vfs_read), [vfs_resolve](#vfs_resolve), [vfs_size](#vfs_size), [video](#video), [video_decode](#video_decode), [video_destroy](#video_destroy), [video_duration](#video_duration), [video_has_finished](#video_has_finished), [video_is_paused](#video_is_paused), [video_is_rgb](#video_is_rgb), [video_pause](#video_pause), [video_position](#video_position), [video_seek](#video_seek), [video_textures](#video_textures), [viewport_clear](#viewport_clear), [viewport_clip](#viewport_clip), [viewport_color](#viewport_color), [viewport_color3](#viewport_color3), [vlen](#vlen), [vrealloc](#vrealloc), [watch](#watch), [window_aspect](#window_aspect), [window_aspect_lock](#window_aspect_lock), [window_aspect_unlock](#window_aspect_unlock), [window_canvas](#window_canvas), [window_color](#window_color), [window_create](#window_create), [window_create_from_handle](#window_create_from_handle), [window_cursor](#window_cursor), [window_cursor_shape](#window_cursor_shape), [window_delta](#window_delta), [window_focus](#window_focus), [window_fps](#window_fps), [window_fps_lock](#window_fps_lock), [window_fps_target](#window_fps_target), [window_fps_unlock](#window_fps_unlock), [window_frame](#window_frame), [window_frame_begin](#window_frame_begin), [window_frame_end](#window_frame_end), [window_frame_swap](#window_frame_swap), [window_fullscreen](#window_fullscreen), [window_handle](#window_handle), [window_has_cursor](#window_has_cursor), [window_has_focus](#window_has_focus), [window_has_fullscreen](#window_has_fullscreen), [window_has_pause](#window_has_pause), [window_has_visible](#window_has_visible), [window_height](#window_height), [window_icon](#window_icon), [window_loop](#window_loop), [window_loop_exit](#window_loop_exit), [window_pause](#window_pause), [window_record](#window_record), [window_reload](#window_reload), [window_resize](#window_resize), [window_screenshot](#window_screenshot), [window_stats](#window_stats), [window_swap](#window_swap), [window_time](#window_time), [window_title](#window_title), [window_visible](#window_visible), [window_width](#window_width), [xml_blob](#xml_blob), [xml_count](#xml_count), [xml_pop](#xml_pop), [xml_push](#xml_push), [xml_string](#xml_string), [xrealloc](#xrealloc), [xsize](#xsize), [xstats](#xstats), [zbounds](#zbounds), [zdecode](#zdecode), [zencode](#zencode), [zexcess](#zexcess) ## ๐Ÿ„ผ macros [aabb](#aabb), [acosf](#acosf), [array](#array), [array_at](#array_at), [array_back](#array_back), [array_bytes](#array_bytes), [array_cast](#array_cast), [array_clear](#array_clear), [array_copy](#array_copy), [array_count](#array_count), [array_data](#array_data), [array_empty](#array_empty), [array_erase](#array_erase), [array_foreach](#array_foreach), [array_foreach_ptr](#array_foreach_ptr), [array_free](#array_free), [array_init](#array_init), [array_insert](#array_insert), [array_pop](#array_pop), [array_pop_front](#array_pop_front), [array_push](#array_push), [array_push_front](#array_push_front), [array_realloc_](#array_realloc_), [array_reserve](#array_reserve), [array_resize](#array_resize), [array_reverse](#array_reverse), [array_search](#array_search), [array_shuffle](#array_shuffle), [array_sort](#array_sort), [array_unique](#array_unique), [array_vlen_](#array_vlen_), [asinf](#asinf), [atan2f](#atan2f), [axis](#axis), [benchmark](#benchmark), [boid](#boid), [capsule](#capsule), [cc4](#cc4), [cc8](#cc8), [ceilf](#ceilf), [client_send](#client_send), [client_send_bin](#client_send_bin), [client_terminate](#client_terminate), [conc4t](#conc4t), [concat](#concat), [copysignf](#copysignf), [cosf](#cosf), [countof](#countof), [ctor](#ctor), [defer](#defer), [do_once](#do_once), [dtor](#dtor), [each_array](#each_array), [each_array_ptr](#each_array_ptr), [each_map](#each_map), [each_map_ptr](#each_map_ptr), [each_map_ptr_sorted](#each_map_ptr_sorted), [each_set](#each_set), [each_set_ptr](#each_set_ptr), [each_substring](#each_substring), [expf](#expf), [floorf](#floorf), [fmodf](#fmodf), [frustum](#frustum), [gladLoadGL](#gladLoadGL), [hit](#hit), [hypotf](#hypotf), [ifdef](#ifdef), [ifdef_32](#ifdef_32), [ifdef_64](#ifdef_64), [ifdef_bsd](#ifdef_bsd), [ifdef_c](#ifdef_c), [ifdef_cl](#ifdef_cl), [ifdef_cpp](#ifdef_cpp), [ifdef_debug](#ifdef_debug), [ifdef_ems](#ifdef_ems), [ifdef_false](#ifdef_false), [ifdef_gcc](#ifdef_gcc), [ifdef_linux](#ifdef_linux), [ifdef_mingw](#ifdef_mingw), [ifdef_osx](#ifdef_osx), [ifdef_release](#ifdef_release), [ifdef_tcc](#ifdef_tcc), [ifdef_true](#ifdef_true), [ifdef_win32](#ifdef_win32), [ifndef](#ifndef), [is](#is), [isnt](#isnt), [json_count](#json_count), [json_float](#json_float), [json_int](#json_int), [json_key](#json_key), [json_string](#json_string), [line](#line), [log10f](#log10f), [logf](#logf), [macro](#macro), [map](#map), [map_cast](#map_cast), [map_clear](#map_clear), [map_count](#map_count), [map_erase](#map_erase), [map_find](#map_find), [map_find_or_add](#map_find_or_add), [map_find_or_add_allocated_key](#map_find_or_add_allocated_key), [map_foreach](#map_foreach), [map_foreach_ptr](#map_foreach_ptr), [map_foreach_ptr_sorted](#map_foreach_ptr_sorted), [map_free](#map_free), [map_gc](#map_gc), [map_init](#map_init), [map_init_int](#map_init_int), [map_init_ptr](#map_init_ptr), [map_init_str](#map_init_str), [map_insert](#map_insert), [mat33](#mat33), [mat34](#mat34), [mat44](#mat44), [obj_calloc](#obj_calloc), [obj_extend](#obj_extend), [obj_malloc](#obj_malloc), [obj_method](#obj_method), [obj_method0](#obj_method0), [obj_new](#obj_new), [obj_new0](#obj_new0), [obj_override](#obj_override), [obj_printf](#obj_printf), [plane](#plane), [poly](#poly), [powf](#powf), [profile](#profile), [profile_enable](#profile_enable), [profile_incstat](#profile_incstat), [profile_init](#profile_init), [profile_render](#profile_render), [profile_setstat](#profile_setstat), [quat](#quat), [ray](#ray), [scope](#scope), [set](#set), [set_cast](#set_cast), [set_clear](#set_clear), [set_count](#set_count), [set_erase](#set_erase), [set_find](#set_find), [set_find_or_add](#set_find_or_add), [set_find_or_add_allocated_key](#set_find_or_add_allocated_key), [set_foreach](#set_foreach), [set_foreach_ptr](#set_foreach_ptr), [set_free](#set_free), [set_gc](#set_gc), [set_init](#set_init), [set_init_int](#set_init_int), [set_init_ptr](#set_init_ptr), [set_init_str](#set_init_str), [set_insert](#set_insert), [sinf](#sinf), [sphere](#sphere), [sqrtf](#sqrtf), [strcatf](#strcatf), [strcmpi](#strcmpi), [stringf](#stringf), [strtok_r](#strtok_r), [tanf](#tanf), [triangle](#triangle), [va](#va), [vec2](#vec2), [vec2i](#vec2i), [vec3](#vec3), [vec3i](#vec3i), [vec4](#vec4), [xml_blob](#xml_blob), [xml_count](#xml_count), [xml_float](#xml_float), [xml_int](#xml_int)