#include #include static unsigned int green = RGBA(0, 255, 0, 255); void shared_native_print(const char * message, GRRLIB_ttfFont * font) { GRRLIB_PrintfTTF(0, 0, font, message, 32, green); } void shared_native_exit(bool * running) { *running = false; } unsigned int shared_pad_buttons_down() { return PAD_ButtonsDown(0); } shared_file_obj shared_get_file(const char * filename) { void* ptr; size_t size; if (get_file_pointer(filename, &ptr, &size)) { shared_file_obj file = { .size = size, .file_ptr = ptr, .filename = filename }; return file; } shared_file_obj file = { .size = 0, .file_ptr = NULL, .filename = NULL }; return file; } bool shared_is_valid_file(shared_file_obj file) { return file.size > 0 && file.file_ptr != NULL && file.filename != NULL; }