Load a better palette by default

This commit is contained in:
David Capello 2014-04-19 20:52:56 -03:00
parent 5ba85c01dc
commit bc3d3e9413

View File

@ -45,6 +45,7 @@
#include "app/modules/gui.h"
#include "app/modules/palettes.h"
#include "app/recent_files.h"
#include "app/resource_finder.h"
#include "app/shell.h"
#include "app/tools/tool_box.h"
#include "app/ui/color_bar.h"
@ -77,6 +78,7 @@
#include <string.h>
#include <time.h>
#ifdef ALLEGRO_WINDOWS
#include <winalleg.h>
#endif
@ -147,6 +149,14 @@ App::App(int argc, const char* argv[])
options.paletteFileName():
base::string(get_config_string("GfxMode", "Palette", "")));
if (palFile.empty()) {
// Try to use a default pixel art palette.
ResourceFinder rf;
rf.includeDataDir("palettes/db32.gpl");
if (rf.findFirst())
palFile = rf.filename();
}
if (!palFile.empty()) {
PRINTF("Loading custom palette file: %s\n", palFile.c_str());