Techneck/code/source-c/blocks.h

47 lines
1.1 KiB
C
Raw Normal View History

2023-10-10 19:23:07 +00:00
#ifndef TC_BLOCK_H
#define TC_BLOCK_H
#include <stdbool.h>
#include <stdint.h>
#include <glad/glad.h>
typedef struct tc_block_attribute
{
uint32_t len_name;
uint32_t len_content;
char *name;
void *content;
} tc_block_attribute_s;
typedef struct tc_block_entry
{
char *name;
uint32_t attributes_capacity;
uint32_t num_attributes;
tc_block_attribute_s *attributes;
} tc_block_entry_s;
typedef struct tc_block_registry
{
uint32_t blocks_capacity;
uint32_t num_blocks;
tc_block_entry_s *blocks;
} tc_block_registry_s;
tc_block_entry_s tc_new_block_entry (char *name);
void tc_add_attribute_to_block
(tc_block_entry_s *entry, tc_block_attribute_s attribute);
tc_block_entry_s * tc_get_block (char *name);
tc_block_registry_s tc_init_blocks ();
#endif