1/*******************************************************************
2 *
3 * Copyright 2006 Dmitry Suzdalev <dimsuz@gmail.com>
4 *
5 * This file is part of the KDE project "KReversi"
6 *
7 * KReversi is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * KReversi is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with KReversi; see the file COPYING. If not, write to
19 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 *
22 *******************************************************************
23 */
24
25#include <KApplication>
26#include <KLocale>
27#include <KCmdLineArgs>
28#include <KAboutData>
29
30#include <highscores.h>
31#include <mainwindow.h>
32
33static const char description[] = I18N_NOOP("KDE Reversi Board Game");
34
35int main(int argc, char **argv)
36{
37 KAboutData aboutData("kreversi", 0, ki18n("KReversi"),
38 "2.0", ki18n(description), KAboutData::License_GPL,
39 ki18n("(c) 1997-2000, Mario Weilguni\n(c) 2004-2006, Inge Wallin\n(c) 2006, Dmitry Suzdalev"),
40 KLocalizedString(), "http://games.kde.org/kreversi");
41 aboutData.addAuthor(ki18n("Mario Weilguni"), ki18n("Original author"), "mweilguni@sime.com");
42 aboutData.addAuthor(ki18n("Inge Wallin"), ki18n("Original author"), "inge@lysator.liu.se");
43 aboutData.addAuthor(ki18n("Dmitry Suzdalev"), ki18n("Game rewrite for KDE4. Current maintainer."), "dimsuz@gmail.com");
44 aboutData.addCredit(ki18n("Simon Hürlimann"), ki18n("Action refactoring"));
45 aboutData.addCredit(ki18n("Mats Luthman"), ki18n("Game engine, ported from his JAVA applet."));
46 aboutData.addCredit(ki18n("Arne Klaassen"), ki18n("Original raytraced chips."));
47 aboutData.addCredit(ki18n("Mauricio Piacentini"), ki18n("Vector chips and background for KDE4."));
48 aboutData.addCredit(ki18n("Brian Croom"), ki18n("Port rendering code to KGameRenderer"), "brian.s.croom@gmail.com");
49 aboutData.addCredit(ki18n("Denis Kuplyakov"), ki18n("Port rendering code to QML, redesign and a lot of improvements"), "dener.kup@gmail.com");
50
51 KCmdLineArgs::init(argc, argv, &aboutData);
52
53 KCmdLineOptions options;
54 options.add("demo", ki18n("Start with demo game playing"));
55 KCmdLineArgs::addCmdLineOptions(options);
56
57 KApplication application;
58 KGlobal::locale()->insertCatalog(QLatin1String("libkdegames"));
59
60 if (application.isSessionRestored()) {
61 RESTORE(KReversiMainWindow)
62 } else {
63 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
64 KReversiMainWindow *mainWin = new KReversiMainWindow(0, args->isSet("demo"));
65 args->clear();
66 mainWin->show();
67 }
68
69 KExtHighscore::ExtManager highscoresManager;
70
71 return application.exec();
72}
73
74