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 --- kfouleggs/main.cpp | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 kfouleggs/main.cpp (limited to 'kfouleggs/main.cpp') diff --git a/kfouleggs/main.cpp b/kfouleggs/main.cpp new file mode 100644 index 00000000..4fbee4c7 --- /dev/null +++ b/kfouleggs/main.cpp @@ -0,0 +1,92 @@ +#include "main.h" +#include "main.moc" + +#include +#include +#include + +#include "common/inter.h" +#include "common/highscores.h" +#include "prefs.h" +#include "piece.h" + +//----------------------------------------------------------------------------- +const MPGameInfo MP_GAME_INFO = { + "004", // multiplayer id (increase when incompatible changes are made) + 4, // max nb local games + 500, // interval + true, // IA allowed + 0, 0 // no setting slots +}; + +const MainData MAIN_DATA = { + "kfouleggs", + I18N_NOOP("KFoulEggs"), + I18N_NOOP("KFoulEggs is an adaptation of the well-known\n(at least in " + "Japan) PuyoPuyo game"), + "http://kfouleggs.sourceforge.net/", + I18N_NOOP("Puyos"), + "2.1.11", + "2.1.11 (12 September 2004)" +}; + +const uint HISTOGRAM_SIZE = 8; +const uint HISTOGRAM[HISTOGRAM_SIZE] = { + 1, 5000, 10000, 20000, 50000, 100000, 200000, 300000 +}; + +const BaseBoardInfo BASE_BOARD_INFO = { + 6, 15, // width - height + true, // with pieces + + 150, // before remove time + 10, // after removed time + 3, // nb toggles + 5, // nb partial fall stages + + 0, // nb arcade stages + + HISTOGRAM, HISTOGRAM_SIZE, false, // score is not bound +}; + +const CommonBoardInfo COMMON_BOARD_INFO = { + 1000, // base time + 10, // drop down time + 10, // before glue time + 10, // after glue time + 10, // after gift time + 3, // nb bump stages + + 100, // nb removed to level + 5, 6, 800, 2000 // nb leds, max to send, shower timeout, pool timeout +}; + +FEFactory::FEFactory() + : CommonFactory(MAIN_DATA, BASE_BOARD_INFO, COMMON_BOARD_INFO) +{} + +BaseInterface *FEFactory::createInterface(QWidget *parent) +{ + return new Interface(MP_GAME_INFO, parent); +} + + +//----------------------------------------------------------------------------- +int main(int argc, char **argv) +{ + KHighscore::init(MAIN_DATA.appName); + FEFactory fef; + fef.init(argc, argv); + + FEPieceInfo pieceInfo; + CommonHighscores highscores; + (void) Prefs::self(); // Create preferences + + if ( kapp->isRestored() ) RESTORE(FEMainWindow) + else { + FEMainWindow *mw = new FEMainWindow; + kapp->setMainWidget(mw); + mw->show(); + } + return kapp->exec(); +} -- cgit v1.2.1