/* * Open Surge no navegador (fredygames.com): o addon de dialogos nativos do Allegro nao existe no * Emscripten. Estas funcoes ocupam o lugar das que o jogo chama: o aviso vai para o console do * navegador e a escolha de arquivo e pasta nunca abre (o jogo ja trata o NULL / a resposta vazia). * Licenca: GPL-3.0-or-later, como o resto do codigo desta build. */ #include #include #include #include static bool initialized = false; bool al_init_native_dialog_addon(void) { initialized = true; return true; } bool al_is_native_dialog_addon_initialized(void) { return initialized; } void al_shutdown_native_dialog_addon(void) { initialized = false; } uint32_t al_get_allegro_native_dialog_version(void) { return ALLEGRO_VERSION_INT; } ALLEGRO_FILECHOOSER *al_create_native_file_dialog(const char *initial_path, const char *title, const char *patterns, int mode) { (void)initial_path; (void)title; (void)patterns; (void)mode; return NULL; } bool al_show_native_file_dialog(ALLEGRO_DISPLAY *display, ALLEGRO_FILECHOOSER *dialog) { (void)display; (void)dialog; return false; } int al_get_native_file_dialog_count(const ALLEGRO_FILECHOOSER *dialog) { (void)dialog; return 0; } const char *al_get_native_file_dialog_path(const ALLEGRO_FILECHOOSER *dialog, size_t i) { (void)dialog; (void)i; return NULL; } void al_destroy_native_file_dialog(ALLEGRO_FILECHOOSER *dialog) { (void)dialog; } int al_show_native_message_box(ALLEGRO_DISPLAY *display, const char *title, const char *heading, const char *text, const char *buttons, int flags) { (void)display; (void)buttons; (void)flags; fprintf(stderr, "[%s] %s: %s\n", title ? title : "", heading ? heading : "", text ? text : ""); return 0; } ALLEGRO_TEXTLOG *al_open_native_text_log(const char *title, int flags) { (void)title; (void)flags; return NULL; } void al_close_native_text_log(ALLEGRO_TEXTLOG *textlog) { (void)textlog; } void al_append_native_text_log(ALLEGRO_TEXTLOG *textlog, const char *format, ...) { (void)textlog; (void)format; }