1 // Copyright (C) 2008, 2009 Ben Asselstine
3 // This program is free software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation; either version 3 of the License, or
6 // (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU Library General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 #include "Configuration.h"
29 #include "GraphicsCache.h"
32 #include "tileset-window.h"
35 int main(int argc, char* argv[])
37 srand(time(NULL)); // set the random seed
39 initialize_configuration();
40 Vector<int>::setMaximumWidth(1000);
42 setlocale(LC_ALL, Configuration::s_lang.c_str());
43 textdomain ("lordsawar");
45 // Check if tilesets are in the path (otherwise exit)
46 Tileset::scanSystemCollection();
49 g_set_application_name(_("LordsAWar! Tileset Editor"));
51 TileSetWindow *tileset_window = NULL;
54 Gtk::Main kit(argc, argv);
57 tileset_window = new TileSetWindow(argv[1]);
59 tileset_window = new TileSetWindow;
60 tileset_window->show();
62 kit.run(tileset_window->get_window());
63 delete tileset_window;
65 catch (const Glib::Error &ex) {
66 std::cerr << ex.what() << std::endl;