diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | c90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch) | |
tree | 6d8391395bce9eaea4ad78958617edb20c6a7573 /kasteroids/main.cpp | |
download | tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kasteroids/main.cpp')
-rw-r--r-- | kasteroids/main.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/kasteroids/main.cpp b/kasteroids/main.cpp new file mode 100644 index 00000000..361c9c77 --- /dev/null +++ b/kasteroids/main.cpp @@ -0,0 +1,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("KDE Space Game"); + +int main( int argc, char *argv[] ) +{ + KAboutData aboutData( "kasteroids", I18N_NOOP("KAsteroids"), + KASTEROIDS_VERSION, description, KAboutData::License_GPL, + "(c) 1997, Martin R. Jones"); + aboutData.addAuthor("Martin R. Jones",0, "[email protected]"); + KCmdLineArgs::init( argc, argv, &aboutData ); + + KApplication app; + KGlobal::locale()->insertCatalogue("libkdegames"); + KGlobal::dirs()->addResourceType("sprite", KStandardDirs::kde_default("data") + "kasteroids/sprites/"); + KGlobal::dirs()->addResourceType("sounds", KStandardDirs::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(); +} + |