1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/***************************************************************************
main.cpp
----------
Developers: (c) 2000-2001 Nikolas Zimmermann <[email protected]>
(c) 2000-2001 Daniel Molkentin <[email protected]>
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include "kbattleship.h"
extern const char *clientName, *clientVersion, *clientDescription;
static KCmdLineOptions options[] =
{
{"!+[URL]", I18N_NOOP("URL of server to attach to. In the form kbattleship://host:port/ or host:port"), 0},
KCmdLineLastOption
};
int main(int argc, char *argv[])
{
KAboutData aboutData("kbattleship", clientName, clientVersion, clientDescription, KAboutData::License_GPL, "(c) 2000-2005 Nikolas Zimmermann, Daniel Molkentin");
aboutData.addAuthor("Nikolas Zimmermann", I18N_NOOP("Project Founder, GUI Handling, Client/Server"), "[email protected]");
aboutData.addAuthor("Daniel Molkentin", I18N_NOOP("Dialog Stuff, Client/Server"), "[email protected]");
aboutData.addAuthor("Kevin Krammer", I18N_NOOP("Computer Player"), "[email protected]");
aboutData.addCredit("Benjamin Adler", I18N_NOOP("Icon"), "[email protected]");
aboutData.addCredit("Nils Trzebin", I18N_NOOP("Sounds"), "[email protected]");
aboutData.addCredit("Elmar Hoefner", I18N_NOOP("GFX"), "[email protected]");
aboutData.addCredit("Lukas Tinkl", I18N_NOOP("Non-Latin1 Support"), "[email protected]");
aboutData.addCredit("Malte Starostik", I18N_NOOP("Various improvements"), "[email protected]");
aboutData.addCredit("Albert Astals Cid", I18N_NOOP("Various improvements and bugfixes"), "[email protected]");
aboutData.addCredit("John Tapsell", I18N_NOOP("Various improvements and bugfixes"), "[email protected]");
aboutData.addCredit("Inge Wallin", I18N_NOOP("Bugfixes and refactoring"), "[email protected]");
aboutData.addCredit("Jakub Stachowski", I18N_NOOP("DNS-SD discovery"), "[email protected]");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication app;
KGlobal::locale()->insertCatalogue("libkdegames");
TQString picDirCheck = locate("data", "kbattleship/pictures/");
TQString onePicCheck = locate("data", "kbattleship/pictures/hit.png");
if(picDirCheck.isEmpty() || onePicCheck.isEmpty())
{
KMessageBox::error(0, i18n("You don't have KBattleship pictures installed. The game cannot run without them!"));
return 1;
}
if( app.isRestored() )
RESTORE(KBattleshipWindow)
else {
KBattleshipWindow *mainwin = new KBattleshipWindow;
mainwin->show();
}
return app.exec();
}
|