feat(profile): refactor lua, bc code

This commit is contained in:
phaneron 2026-04-01 17:37:40 -04:00
parent e79ee08905
commit 37db5336e4
40 changed files with 3424 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#ifndef BC_UTIL_BUFFER_H
#define BC_UTIL_BUFFER_H
// Blizzard::Util::Buffer<size_t N, typename T> : Blizzard::Util::BufferData<typename T, size_t N>
#define BC_UTIL_BUFFER(N, T) \
typedef struct Blizzard__Util__Buffer_##N##_##T Blizzard__Util__Buffer_##N##_##T; \
typedef struct Blizzard__Util__BufferData_##T##_##N Blizzard__Util__BufferData_##T##_##N; \
struct Blizzard__Util__BufferData_##T##_##N { \
uint32_t elements; \
T* data; \
T local[N]; \
}; \
struct Blizzard__Util__Buffer_##N##_##T { \
Blizzard__Util__BufferData_##T##_##N _; \
};
BC_UTIL_BUFFER(300, char);
BC_UTIL_BUFFER(300, uint16_t);
#endif

View file

@ -0,0 +1,6 @@
#ifndef BC_UTIL_OFFSET_H
#define BC_UTIL_OFFSET_H
#define BC_OFFSET_INTO(C, T) typedef uintptr_t offset_in_##C##_to_##T
#endif