summaryrefslogtreecommitdiffstats
path: root/kasteroids/main.cpp
blob: 1438bfc9e63ebf149f64c652b5c64754b6ab995f (plain)
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
/*
 * KAsteroids - Copyright (c) Martin R. Jones 1997
 *
 * Part of the KDE project
 */
#include <config.h>

#include <kstandarddirs.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
#include <kaboutdata.h>

#include "version.h"
#include "toplevel.h"

#ifdef KA_ENABLE_SOUND
#include <arts/dispatcher.h>
#endif


static const char description[] =
	I18N_NOOP("TDE Space Game");

int main( int argc, char *argv[] )
{
    TDEAboutData aboutData( "kasteroids", I18N_NOOP("KAsteroids"),
        KASTEROIDS_VERSION, description, TDEAboutData::License_GPL,
        "(c) 1997, Martin R. Jones");
    aboutData.addAuthor("Martin R. Jones",0, "[email protected]");
    TDECmdLineArgs::init( argc, argv, &aboutData );

    TDEApplication app;
    TDEGlobal::locale()->insertCatalogue("libtdegames");
    TDEGlobal::dirs()->addResourceType("sprite", TDEStandardDirs::kde_default("data") + "kasteroids/sprites/");
    TDEGlobal::dirs()->addResourceType("sounds", TDEStandardDirs::kde_default("data") + "kasteroids/sounds/");

#ifdef KA_ENABLE_SOUND
    // setup mcop communication
    Arts::Dispatcher dispatcher;
#endif

    if( app.isRestored() )
        RESTORE(KAstTopLevel)
    else {
        KAstTopLevel *w = new KAstTopLevel;
        app.setMainWidget(w);
        w->show();
    }
    return app.exec();
}