summaryrefslogtreecommitdiffstats
path: root/klickety/main.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /klickety/main.cpp
downloadtdegames-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 'klickety/main.cpp')
-rw-r--r--klickety/main.cpp73
1 files changed, 73 insertions, 0 deletions
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 <klocale.h>
+#include <kapplication.h>
+#include <khighscore.h>
+#include <kaboutdata.h>
+
+#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<Field *>(_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();
+}