2024-01-05 18:54:35 -05:00

19 lines
665 B
C++

#pragma once
#include <stdint.h>
#include <cstddef>
extern "C" {
typedef struct __attribute__((__packed__)) _asset {
uint8_t* buf;
size_t size;
} asset;
}
#define ASSET(x) \
extern "C" { \
extern uint8_t _binary_static_##x##_start[], _binary_static_##x##_size[]; \
static asset x = {_binary_static_##x##_start, (size_t)_binary_static_##x##_size}; \
}