lol its in c
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
462 B

  1. #ifndef GBSDK_ASSETS_H
  2. #define GBSDK_ASSETS_H
  3. #include <stdint.h>
  4. #define EXTERN_ASSET(var_name) \
  5. extern const uint8_t var_name[]; \
  6. extern const uint8_t var_name ## _end[]
  7. #define ASSET(var_name, filename) \
  8. void __ ## var_name ## __() __naked { \
  9. __asm__("_" #var_name "::"); \
  10. __asm__(".incbin \"_build/assets/" filename "\""); \
  11. __asm__("_" #var_name "_end::"); \
  12. } EXTERN_ASSET(var_name)
  13. #endif//GBSDK_ASSETS_H