mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-27 03:40:06 +00:00
Remove references to allegro_message() from outside of she library
This commit is contained in:
parent
76ec93ea80
commit
7d0e0f4b4a
@ -66,6 +66,7 @@
|
|||||||
#include "raster/palette.h"
|
#include "raster/palette.h"
|
||||||
#include "raster/sprite.h"
|
#include "raster/sprite.h"
|
||||||
#include "scripting/engine.h"
|
#include "scripting/engine.h"
|
||||||
|
#include "she/error.h"
|
||||||
#include "ui/intern.h"
|
#include "ui/intern.h"
|
||||||
#include "ui/ui.h"
|
#include "ui/ui.h"
|
||||||
|
|
||||||
@ -78,7 +79,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef ALLEGRO_WINDOWS
|
#ifdef ALLEGRO_WINDOWS
|
||||||
#include <winalleg.h>
|
#include <winalleg.h>
|
||||||
#endif
|
#endif
|
||||||
@ -313,7 +313,7 @@ App::~App()
|
|||||||
m_instance = NULL;
|
m_instance = NULL;
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
allegro_message("Error closing ASE.\n(uncaught exception)");
|
she::error_message("Error closing ASE.\n(uncaught exception)");
|
||||||
|
|
||||||
// no re-throw
|
// no re-throw
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "app/modules/gui.h"
|
#include "app/modules/gui.h"
|
||||||
#include "app/modules/palettes.h"
|
#include "app/modules/palettes.h"
|
||||||
#include "app/ui/main_window.h"
|
#include "app/ui/main_window.h"
|
||||||
|
#include "she/error.h"
|
||||||
#include "ui/manager.h"
|
#include "ui/manager.h"
|
||||||
#include "ui/window.h"
|
#include "ui/window.h"
|
||||||
|
|
||||||
@ -107,7 +108,7 @@ bool CurrentGfxModeGuard::tryGfxMode(const GfxMode& newMode)
|
|||||||
if (!m_oldMode.setGfxMode()) {
|
if (!m_oldMode.setGfxMode()) {
|
||||||
// Oh no! more errors!, we can't restore the old graphics mode!
|
// Oh no! more errors!, we can't restore the old graphics mode!
|
||||||
set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
|
set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
|
||||||
allegro_message("FATAL ERROR: Unable to restore the old graphics mode!\n");
|
she::error_message("FATAL ERROR: Unable to restore the old graphics mode!\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
// Only print a message of the old error
|
// Only print a message of the old error
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#include "raster/sprite.h"
|
#include "raster/sprite.h"
|
||||||
#include "she/clipboard.h"
|
#include "she/clipboard.h"
|
||||||
#include "she/display.h"
|
#include "she/display.h"
|
||||||
|
#include "she/error.h"
|
||||||
#include "she/surface.h"
|
#include "she/surface.h"
|
||||||
#include "she/system.h"
|
#include "she/system.h"
|
||||||
#include "ui/intern.h"
|
#include "ui/intern.h"
|
||||||
@ -188,7 +189,7 @@ int init_module_gui()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!main_display) {
|
if (!main_display) {
|
||||||
allegro_message("Unable to create a user-interface display.\n");
|
she::error_message("Unable to create a user-interface display.\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
17
src/she/error.h
Normal file
17
src/she/error.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// SHE library
|
||||||
|
// Copyright (C) 2012-2014 David Capello
|
||||||
|
//
|
||||||
|
// This file is released under the terms of the MIT license.
|
||||||
|
// Read LICENSE.txt for more information.
|
||||||
|
|
||||||
|
#ifndef SHE_ERROR_H_INCLUDED
|
||||||
|
#define SHE_ERROR_H_INCLUDED
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace she {
|
||||||
|
|
||||||
|
void error_message(const char* msg);
|
||||||
|
|
||||||
|
} // namespace she
|
||||||
|
|
||||||
|
#endif
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "she/clipboard.h"
|
#include "she/clipboard.h"
|
||||||
#include "she/display.h"
|
#include "she/display.h"
|
||||||
|
#include "she/error.h"
|
||||||
#include "she/event.h"
|
#include "she/event.h"
|
||||||
#include "she/event_queue.h"
|
#include "she/event_queue.h"
|
||||||
#include "she/locked_surface.h"
|
#include "she/locked_surface.h"
|
||||||
|
@ -665,8 +665,13 @@ System* Instance()
|
|||||||
return g_instance;
|
return g_instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void error_message(const char* msg)
|
||||||
|
{
|
||||||
|
allegro_message(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace she
|
||||||
|
|
||||||
// It must be defined by the user program code.
|
// It must be defined by the user program code.
|
||||||
extern int app_main(int argc, char* argv[]);
|
extern int app_main(int argc, char* argv[]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user