From c90c389a8a8d9d8661e9772ec4144c5cf2039f23 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- klickety/main.cpp | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 klickety/main.cpp (limited to 'klickety/main.cpp') diff --git a/klickety/main.cpp b/klickety/main.cpp new file mode 100644 index 00000000..da6b0afe --- /dev/null +++ b/klickety/main.cpp @@ -0,0 +1,73 @@ +#include "main.h" +#include "main.moc" + +#include +#include +#include +#include + +#include "base/settings.h" +#include "piece.h" +#include "highscores.h" + +//----------------------------------------------------------------------------- +const MainData MAIN_DATA = { + "klickety", + I18N_NOOP("Klickety"), + I18N_NOOP("Klickety is an adaptation of the \"clickomania\" game"), + "http://klickety.sourceforge.net/", + I18N_NOOP("Removed blocks"), + "1.0.3", + "1.0.3 (5 August 2004)" +}; + +const uint HISTOGRAM_SIZE = 16; +const uint HISTOGRAM[HISTOGRAM_SIZE] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 20, 160 +}; + +const BaseBoardInfo BASE_BOARD_INFO = { + 10, 16, false, // width, height, with pieces + + 50, // before remove time + 10, // after removed time + 3, // nb toggles + 7, // nb partial fall stages + + 0, // nb arcade stages + + HISTOGRAM, HISTOGRAM_SIZE, true, // score is bound +}; + +KLFactory::KLFactory() + : BaseFactory(MAIN_DATA, BASE_BOARD_INFO) +{ + _aboutData->addCredit("Dan Hill", I18N_NOOP("Icons")); +} + + +//----------------------------------------------------------------------------- +KLMainWindow::KLMainWindow() +{ + Field *field = static_cast(_inter); + buildGUI(field); +} + +//----------------------------------------------------------------------------- +int main(int argc, char **argv) +{ + KHighscore::init(MAIN_DATA.appName); + KLFactory flf; + flf.init(argc, argv); + + KLPieceInfo pieceInfo; + KLHighscores highscores; + + if ( kapp->isRestored() ) RESTORE(KLMainWindow) + else { + KLMainWindow *mw = new KLMainWindow; + kapp->setMainWidget(mw); + mw->show(); + } + return kapp->exec(); +} -- cgit v1.2.1