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 /kblackbox | |
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 'kblackbox')
32 files changed, 3578 insertions, 0 deletions
diff --git a/kblackbox/CHANGES b/kblackbox/CHANGES new file mode 100644 index 00000000..985fa5c9 --- /dev/null +++ b/kblackbox/CHANGES @@ -0,0 +1,52 @@ +1999-06-07 Petter Reinholdtsen <[email protected]> + * kbbgame.cpp: Changed text Quit to Exit to match KDE style guide. + +0.3.0 from 0.2.6 (17.1.1999) + - KBBGraphic derived only from QWidget, not QTableView + -> a complete rewrite of gfx stuff + -> massive changes almost everywhere + - minimal size fixed + - new icons (I am just learning the povray :-) +0.2.6 from 0.2.5 (25.8.1998) + - the game is active after starting + - fixed bad drawing after setting the board size + - config. scripts from new kexample (KDE 1.0) + - moc dependencies in Makefile.am done by automoc to + avoid problems on Solaris (bug report by David Faure) + - some string fixes for better translation +0.2.5 from 0.2.4 (19.3.1998) + - es language support added + - sk language support added +0.2.4 from 0.2.3 (6.3.1998) + - pt language support added + - it language support added +0.2.3 from 0.2.2 (10.2.1998) + - new icon for fired laser + - new icon for "give up" + - "done" added to menu and toolbar (new icon) + - help file updated +0.2.2 from 0.2.1 (2.2.1998) + - "done" button removed - middle mouse button instead + - kde toolbar + - kde status bar + - new icons + - help file updated +0.2.1 from 0.2.0: + - KBlackBox.kdelnk + - icon kblackbox.xpm + - double updating during resize fixed + - saves the application size + - doesn't autoresize after changing a board size +0.2.0 from 0.1.1: + - kblackbox is now a KDE application -> help, configuration, ... + - autoconf usage (by kexample-0.4.0) + - remembers last used options + - pixmaps on fields in the box +0.1.1 from 0.1.0: + - you are warned if you try to change # of balls when a game is running + - game->resize works properly, even if you moved scrollbars now + - mouseMoveEvent reimplemented, so that you can "draw" when a button + is pressed + - marking with the right mouse button + - displaying more game statistics + - possibility to give up the game (shows you where the balls were) diff --git a/kblackbox/Makefile.am b/kblackbox/Makefile.am new file mode 100644 index 00000000..813aff83 --- /dev/null +++ b/kblackbox/Makefile.am @@ -0,0 +1,22 @@ +SUBDIRS = pics + +INCLUDES = -I$(top_srcdir)/libkdegames $(all_includes) + +bin_PROGRAMS = kblackbox +kblackbox_SOURCES = kbbgfx.cpp kbbgame.cpp util.cpp main.cpp +kblackbox_LDFLAGS = $(all_libraries) $(KDE_RPATH) +kblackbox_LDADD = $(LIB_KDEGAMES) +kblackbox_DEPENDENCIES = $(LIB_KDEGAMES_DEP) + +METASOURCES = AUTO +KDE_ICON = kblackbox + +xdg_apps_DATA = kblackbox.desktop + +EXTRA_DIST = VERSION CHANGES $(xdg_apps_DATA) + +rcdir = $(kde_datadir)/kblackbox +rc_DATA = kblackboxui.rc + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kblackbox.pot diff --git a/kblackbox/README b/kblackbox/README new file mode 100644 index 00000000..a7678515 --- /dev/null +++ b/kblackbox/README @@ -0,0 +1,28 @@ +Program: kblackbox +Author: Robert Cimrman, e-mail: [email protected] + +A simple logical game for the KDE project. + +FEATURES: + -stunning gfx (in the next version :-) + -high logical requirements +USING: + -see help +KNOWN BUGS: + -none +UNKNOWN BUGS: + -still unknown + ->report any "bogus features" to the author, please +TODO: + -improve gfx? +HISTORY: + 23.4.1997 -> start + 28.4.1997 -> 0.1.0 + 29.4.1997 -> 0.1.1 + 29.7.1997 -> 0.2.0 + 2.2.1997 -> 0.2.2 + 10.2.1998 -> 0.2.3 + 6.3.1998 -> 0.2.4 + 19.3.1998 -> 0.2.5 + 25.8.1998 -> 0.2.6 + 17.1.1999 -> 0.3.0 diff --git a/kblackbox/VERSION b/kblackbox/VERSION new file mode 100644 index 00000000..064bd513 --- /dev/null +++ b/kblackbox/VERSION @@ -0,0 +1,2 @@ +kblackbox-0.3.0 + diff --git a/kblackbox/big_kblackbox.xpm b/kblackbox/big_kblackbox.xpm new file mode 100644 index 00000000..e448e5a7 --- /dev/null +++ b/kblackbox/big_kblackbox.xpm @@ -0,0 +1,269 @@ +/* XPM */ +static char * kblackbox_xpm[] = { +"48 48 218 2", +" c None", +". c #414141", +"+ c #404040", +"@ c #464646", +"# c #424242", +"$ c #484848", +"% c #585858", +"& c #818181", +"* c #7D7D7D", +"= c #7F7F7F", +"- c #4D4D4D", +"; c #727272", +"> c #5A5A5A", +", c #878787", +"' c #4B4B4B", +") c #6E6E6E", +"! c #666666", +"~ c #626262", +"{ c #767676", +"] c #555555", +"^ c #6F6F6F", +"/ c #5F5F5F", +"( c #797979", +"_ c #454545", +": c #858585", +"< c #272727", +"[ c #595959", +"} c #787878", +"| c #696969", +"1 c #5B5B5B", +"2 c #868686", +"3 c #262626", +"4 c #2F2F2F", +"5 c #2E2E2E", +"6 c #A5A5A5", +"7 c #575757", +"8 c #4C4C4C", +"9 c #4F4F4F", +"0 c #5E5E5E", +"a c #2D2D2D", +"b c #565656", +"c c #7E7E7E", +"d c #303030", +"e c #6B6B6B", +"f c #363636", +"g c #505050", +"h c #545454", +"i c #3F3F3F", +"j c #4E4E4E", +"k c #4A4A4A", +"l c #373737", +"m c #5D5D5D", +"n c #393939", +"o c #383838", +"p c #353535", +"q c #676767", +"r c #3D3D3D", +"s c #3E3E3E", +"t c #343434", +"u c #606060", +"v c #262600", +"w c #2F2F01", +"x c #5A5A06", +"y c #4B4B04", +"z c #2C2C01", +"A c #2D2D01", +"B c #2E2E01", +"C c #3C3C3C", +"D c #737373", +"E c #292900", +"F c #333301", +"G c #494949", +"H c #D4D400", +"I c #606000", +"J c #272700", +"K c #242400", +"L c #313103", +"M c #5C5C5C", +"N c #3B3B3B", +"O c #6B6B00", +"P c #404001", +"Q c #363603", +"R c #E0E000", +"S c #5E5E00", +"T c #5D5D00", +"U c #252500", +"V c #333304", +"W c #393907", +"X c #282828", +"Y c #878700", +"Z c #AAAA05", +"` c #373704", +" . c #303002", +".. c #323232", +"+. c #E9E902", +"@. c #5A5A00", +"#. c #565600", +"$. c #383806", +"%. c #343406", +"&. c #5A5A11", +"*. c #313131", +"=. c #292929", +"-. c #FFFF2B", +";. c #FFFF25", +">. c #5E5E03", +",. c #606002", +"'. c #545400", +"). c #5B5B05", +"!. c #353506", +"~. c #585811", +"{. c #515151", +"]. c #525252", +"^. c #F5F50A", +"/. c #646401", +"(. c #696903", +"_. c #EFEF0E", +":. c #535305", +"<. c #4D4D06", +"[. c #444406", +"}. c #54540D", +"|. c #6A6A0E", +"1. c #444444", +"2. c #DEDE00", +"3. c #626200", +"4. c #6E6E00", +"5. c #D6D60A", +"6. c #3F3F05", +"7. c #363605", +"8. c #3E3E05", +"9. c #53530C", +"0. c #61610D", +"a. c #4E4E0E", +"b. c #474747", +"c. c #B5B509", +"d. c #3D3D04", +"e. c #313104", +"f. c #83830C", +"g. c #7D7D0D", +"h. c #4D4D0D", +"i. c #646464", +"j. c #333333", +"k. c #434343", +"l. c #9F9F09", +"m. c #474706", +"n. c #51510A", +"o. c #7C7C0B", +"p. c #7C7C0C", +"q. c #7E7E0E", +"r. c #727205", +"s. c #202000", +"t. c #494909", +"u. c #7B7B0A", +"v. c #7D7D0C", +"w. c #3A3A3A", +"x. c #474708", +"y. c #484808", +"z. c #484809", +"A. c #7A7A0A", +"B. c #7B7B0B", +"C. c #9D9D0C", +"D. c #9D9D0D", +"E. c #2C2C2C", +"F. c #636363", +"G. c #464606", +"H. c #474707", +"I. c #999909", +"J. c #9B9B0A", +"K. c #8F8F0B", +"L. c #90900C", +"M. c #535353", +"N. c #585806", +"O. c #464607", +"P. c #656507", +"Q. c #676708", +"R. c #8D8D09", +"S. c #6D6D02", +"T. c #6C6C02", +"U. c #62620F", +"V. c #606005", +"W. c #454506", +"X. c #4C4C06", +"Y. c #2B2B01", +"Z. c #636301", +"`. c #616102", +" + c #7C7C02", +".+ c #70700B", +"++ c #646411", +"@+ c #575701", +"#+ c #939301", +"$+ c #989801", +"%+ c #949401", +"&+ c #8F8F01", +"*+ c #686801", +"=+ c #717103", +"-+ c #94940B", +";+ c #868601", +">+ c #8F8F02", +",+ c #707000", +"'+ c #B0B00E", +")+ c #787800", +"!+ c #A5A504", +"~+ c #717171", +"{+ c #686868", +"]+ c #D5D50A", +"^+ c #555502", +"/+ c #5C5C02", +"(+ c #353504", +"_+ c #616161", +":+ c #FFFF21", +"<+ c #606001", +"[+ c #626201", +"}+ c #6A6A02", +"|+ c #E4E404", +"1+ c #D8D801", +"2+ c #616100", +"3+ c #686800", +"4+ c #949400", +"5+ c #747474", +" ", +" ", +" ", +" . + + . + @ + + # ", +" . . + . + $ + % & . + + + . + . * + + . + + . . + + ", +" + + . . = - ; > + + + . # + . , . ' ) ! ~ + + . { + . . % + ] + + ^ . / + + ", +" + + . # . + + . . . . . + . . . ( + + . + + . ~ _ + . . + . + . + # : / . + + + + < < ", +"$ _ _ . + . . + . + . + # . + + . . + . # [ ^ % - $ } | 1 % 2 + + # . + . # ) . + + 3 < 3 ", +"4 5 5 4 4 4 - . . + . . # . + + . . + + . # . + + + # 6 . + + . 7 8 9 . . . 0 [ + 3 4 3 3 ", +"4 4 5 a ' 5 5 4 4 4 4 5 + # * 7 . b c . . # + . # + # . . + . . . . . + . . + + 3 3 < 3 ", +"5 5 d e 4 4 4 4 4 4 4 4 5 f g 5 # 4 . . . . + . . + . + + . . + h + . + = i { < < < < < ", +"d 5 5 g 5 4 4 d j d 4 4 7 5 4 5 5 k l 5 5 5 5 5 + + + . + . . m @ + . + # 3 7 < 3 < 3 < ", +"4 n o 4 5 4 4 ! 5 l p 4 o 4 a 4 4 7 q 5 4 5 4 b ' 5 5 d 4 5 + + + [ ) j 3 3 3 3 3 3 < < ", +"5 5 ' 4 4 4 4 4 5 4 9 5 4 5 5 5 5 5 ; g r 4 4 5 s k t 4 d 4 5 4 4 4 5 < < 3 < 3 < < 3 < ", +"5 4 5 u d 5 v w x y z A B B 4 5 C [ D 0 5 5 4 4 5 d # 5 4 4 5 4 # 4 4 3 3 < < < < 3 < ", +" 4 5 u 4 E w F 5 5 p G H I I J K L % M f 5 5 5 4 4 5 4 5 4 4 4 5 G 4 < < f 3 3 3 3 < ", +" 4 5 N O P Q 9 p n u 4 4 4 4 R S T U V W 5 5 d 4 4 5 4 4 4 5 5 % 4 4 a < < X 3 < 3 X ", +" 8 p 5 Y Z ` ...4 q g 5 5 _ 9 5 +.@.#.$.%.&.5 4 5 4 5 5 5 4 4 *.@ 4 < < < =.3 < l 5 ", +" 5 d / 5 -.;.>.,.4 4 k 4 4 N o 5 4 5 '.).!.%.~.5 5 5 5 4 4 5 d i {.[ < < # ] < o < < ", +" d 4 5 ].^./.(.5 4 5 5 4 5 4 4 5 4 _.:.<.[.}.}.|.5 4 5 4 5 4 i {.p i < < 1.3 < s ", +" 4 5 4 5 5 2.3.4.4 4 d 4 N 4 5 4 4 j 5.6.7.8.9.0.a.4 5 5 4 5 5 s ' 3 3 < 3 C < h ", +" p G b.4 4 4 5 4 5 5 4 4 4 f 5 s 4 [ s c.d.e.f.g.h.a.4 5 4 o G i.j.< < p u < =.3 ", +" 4 4 5 4 5 d 4 4 # 4 5 d 4 5 # 0 . 4 k.l.m.n.o.p.g.q.4 5 k.1 4 r 5 3 p 3 < 3 < < ", +" ) 4 5 5 5 ; 5 d 5 4 4 5 5 4 $ 5 4 5 r.s.t.u.o.v.g.q.5 4 4 5 N 3 3 s 3 X < *.3 ", +" r 4 4 4 5 5 s 4 4 _ d 4 d w.4 4 4 4 x.y.z.A.B.o.C.D.4 5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5 4 4 4 _ 5 4 5 [ ' 5 j.4 {.l . d 3 < ", +" 4 5 5 5 j.5 4 4 5 d 5 d h 4 4 =.3 < ", +" 4 4 5 ].4 d 4 4 4 4 4 r 5 < 3 ", +" 4 4 5 u 4 4 5 _ ; 1.- 3 < ", +" 5 5 5 4 d N 5 4 4 3 ", +" 5 5 d 1 4 a < 3 ", +" 5 _ % 4 3 ", +" 4 4 p "}; diff --git a/kblackbox/hi128-app-kblackbox.png b/kblackbox/hi128-app-kblackbox.png Binary files differnew file mode 100644 index 00000000..76d581e0 --- /dev/null +++ b/kblackbox/hi128-app-kblackbox.png diff --git a/kblackbox/hi16-app-kblackbox.png b/kblackbox/hi16-app-kblackbox.png Binary files differnew file mode 100644 index 00000000..2b28f5ee --- /dev/null +++ b/kblackbox/hi16-app-kblackbox.png diff --git a/kblackbox/hi22-app-kblackbox.png b/kblackbox/hi22-app-kblackbox.png Binary files differnew file mode 100644 index 00000000..77d0d2b2 --- /dev/null +++ b/kblackbox/hi22-app-kblackbox.png diff --git a/kblackbox/hi32-app-kblackbox.png b/kblackbox/hi32-app-kblackbox.png Binary files differnew file mode 100644 index 00000000..6e8f897e --- /dev/null +++ b/kblackbox/hi32-app-kblackbox.png diff --git a/kblackbox/hi48-app-kblackbox.png b/kblackbox/hi48-app-kblackbox.png Binary files differnew file mode 100644 index 00000000..77c86d12 --- /dev/null +++ b/kblackbox/hi48-app-kblackbox.png diff --git a/kblackbox/hi64-app-kblackbox.png b/kblackbox/hi64-app-kblackbox.png Binary files differnew file mode 100644 index 00000000..f97a1f5c --- /dev/null +++ b/kblackbox/hi64-app-kblackbox.png diff --git a/kblackbox/kbbgame.cpp b/kblackbox/kbbgame.cpp new file mode 100644 index 00000000..82028871 --- /dev/null +++ b/kblackbox/kbbgame.cpp @@ -0,0 +1,740 @@ +// +// KBlackbox +// +// A simple game inspired by an emacs module +// +// File: kbbgame.cpp +// +// The implementation of the KBBGame widget +// + +#include <config.h> + +#include <qpopupmenu.h> +#include <qkeycode.h> +#include <qlabel.h> +#include <qpushbutton.h> +#include <qtooltip.h> +#include <qstring.h> + +#include <kmessagebox.h> +#include <kdebug.h> +#include <kapplication.h> +#include <klocale.h> +#include <kconfig.h> +#include <kglobal.h> +#include <kmenubar.h> +#include <kiconloader.h> +#include <khelpmenu.h> +#include <kaction.h> +#include <kstdaction.h> +#include <kstatusbar.h> +#include <kstdgameaction.h> + +#include "kbbgame.h" +#include "util.h" +#include "version.h" + +/* + Names of pixmap files. +*/ + +const char *pFNames[NROFTYPES] = { + "white", + "gray", + "green", + "red", + "blue", + "cyan", + "brown", + "green2" +}; + +/* + Creates the KBBGame widget and sets saved options (if any). +*/ + +KBBGame::KBBGame() +{ + int i; + + QPixmap **pix = new QPixmap * [NROFTYPES]; + pix[0] = new QPixmap(); + *pix[0] = BarIcon( pFNames[0] ); + if (!pix[0]->isNull()) { + kdDebug(12009) << "Pixmap \"" << pFNames[0] << "\" loaded." << endl; + for (i = 1; i < NROFTYPES; i++) { + pix[i] = new QPixmap; + *pix[i] = BarIcon( pFNames[i] ); + if (!pix[i]->isNull()) { + kdDebug(12009) << "Pixmap \"" << pFNames[i] << "\" loaded." << endl; + } else { + pix[i] = pix[i-1]; + pix[i]->detach(); + kdDebug(12009) << "Cannot find pixmap \"" << pFNames[i] << "\". Using previous one." << endl; + } + } + } else { + kdDebug(12009) << "Cannot find pixmap \"" << pFNames[0] << "\". Pixmaps will not be loaded." << endl; + delete pix[0]; + delete pix; + pix = NULL; + } + gr = new KBBGraphic( pix, this, "KBBGraphic" ); + + statusBar()->insertItem(i18n("Score: 0000"), SSCORE); + statusBar()->insertItem(i18n("Placed: 00 / 00"), SBALLS); + statusBar()->insertItem(i18n("Run: yesno"), SRUN); + statusBar()->insertItem(i18n("Size: 00 x 00"), SSIZE); + + initKAction(); + + connect( gr, SIGNAL(inputAt(int,int,int)), + this, SLOT(gotInputAt(int,int,int)) ); + connect( this, SIGNAL(gameRuns(bool)), + gr, SLOT(setInputAccepted(bool)) ); + connect( gr, SIGNAL(endMouseClicked()), + this, SLOT(gameFinished()) ); + + /* + QToolTip::add( doneButton, i18n( + "Click here when you think you placed all the balls.") ); + */ + + /* + Game initializations + */ + running = FALSE; + gameBoard = NULL; + + KConfig *kConf; + int j; + kConf = kapp->config(); + kConf->setGroup( "KBlackBox Setup" ); + if (kConf->hasKey( "Balls" )) { + i = kConf->readNumEntry( "Balls" ); + balls = i; + switch (i) { + case 4: ballsAction->setCurrentItem(0); break; + case 6: ballsAction->setCurrentItem(1); break; + case 8: ballsAction->setCurrentItem(2); break; + } + } else { + balls = 4; + ballsAction->setCurrentItem(0); + } + if ((kConf->hasKey( "Width" )) && + (kConf->hasKey( "Balls" ))) { + i = kConf->readNumEntry( "Width" ); + j = kConf->readNumEntry( "Height" ); + gr->setSize( i+4, j+4 ); // +4 is the space for "lasers" and an edge... + gameBoard = new RectOnArray( gr->numC(), gr->numR() ); + switch (i) { + case 8: sizeAction->setCurrentItem(0); break; + case 10: sizeAction->setCurrentItem(1); break; + case 12: sizeAction->setCurrentItem(2); break; + } + } else { + gr->setSize( 8+4, 8+4 ); // +4 is the space for "lasers" and an edge... + gameBoard = new RectOnArray( gr->numC(), gr->numR() ); + sizeAction->setCurrentItem(0); + } + if (kConf->hasKey( "tutorial" )) { + tutorial = (bool) kConf->readNumEntry( "tutorial" ); + } else tutorial = FALSE; + tutorialAction->setChecked(tutorial); + + setCentralWidget( gr ); + + setScore( 0 ); + ballsPlaced = 0; + + updateStats(); + + newGame(); + setMinSize(); + + setupGUI(); +} + +/* + Saves the options and destroys the KBBGame widget. +*/ + +KBBGame::~KBBGame() +{ + KConfig *kConf; + QString s; + + kConf = kapp->config(); + kConf->setGroup( "KBlackBox Setup" ); + kConf->writeEntry( "Balls", balls ); + kConf->writeEntry( "Width", gr->numC() - 4); + kConf->writeEntry( "Height", gr->numR() - 4); + kConf->writeEntry( "tutorial", (int) tutorial ); + + delete gameBoard; + // All the rest has "this" for parent so it doesn't need to be deleted. +} + + +/* + Resizes yourself to fit the contents perfectly, from menu. +*/ +void KBBGame::gameResize() +{ + resize( gr->wHint(), gr->hHint() + menuBar()->height() + statusBar()->height() + + toolBar()->height() ); +} + +void KBBGame::setMinSize() +{ + setMinimumSize( gr->wHint(), gr->hHint() + menuBar()->height() + statusBar()->height() + + toolBar()->height() ); +} + +/* + Settings of various options. +*/ +void KBBGame::slotSize() +{ + int i = sizeAction->currentItem(); + bool ok = false; + switch (i) { + case 0: + ok = setSize( 8, 8 ); + break; + case 1: + ok = setSize( 10, 10 ); + break; + case 2: + ok = setSize( 12, 12 ); + break; + } + + if (!ok) { + switch(gr->numR() - 4) { + case 8: + sizeAction->setCurrentItem(0); break; + case 10: + sizeAction->setCurrentItem(1); break; + case 12: + sizeAction->setCurrentItem(2); break; + } + } +} + +void KBBGame::slotBalls() +{ + int i = ballsAction->currentItem(); + bool ok = false; + switch (i) { + case 0: + ok = setBalls( 4 ); + break; + case 1: + ok = setBalls( 6 ); + break; + case 2: + ok = setBalls( 8 ); + break; + } + if (!ok) { + switch (balls) { + case 4: + ballsAction->setCurrentItem(0); break; + case 6: + ballsAction->setCurrentItem(1); break; + case 8: + ballsAction->setCurrentItem(2); break; + } + } +} + +void KBBGame::tutorialSwitch() +{ + tutorial = !tutorial; +} + +/* + Creates a new game. +*/ +void KBBGame::newGame() +{ + int i, j; + + if (running) { + bool cancel; + cancel = KMessageBox::warningContinueCancel(0, + i18n("Do you really want to give up this game?"),QString::null,i18n("Give Up")) + == KMessageBox::Cancel; + if (cancel) + return; + + abortGame(); + } + + gameBoard->fill( INNERBBT ); + for (j = 0; j < (gr->numR()); j++) { + gameBoard->set( 0, j, OUTERBBT ); + gameBoard->set( gr->numC()-1, j, OUTERBBT ); + } + for (i = 0; i < (gr->numC()); i++) { + gameBoard->set( i, 0, OUTERBBT ); + gameBoard->set( i, gr->numR()-1, OUTERBBT ); + } + for (j = 2; j < (gr->numR()-2); j++) { + gameBoard->set( 1, j, LASERBBT ); + gameBoard->set( gr->numC()-2, j, LASERBBT ); + } + for (i = 2; i < (gr->numC()-2); i++) { + gameBoard->set( i, 1, LASERBBT ); + gameBoard->set( i, gr->numR()-2, LASERBBT ); + } + gameBoard->set( 1, 1, OUTERBBT ); + gameBoard->set( 1, gr->numR()-2, OUTERBBT ); + gameBoard->set( gr->numC()-2, 1, OUTERBBT ); + gameBoard->set( gr->numC()-2, gr->numR()-2, OUTERBBT ); + + randomBalls( balls ); + remap( gameBoard, gr->getGraphicBoard() ); + gr->repaint( TRUE ); + setScore( 0 ); + detourCounter = -1; + ballsPlaced = 0; + running = TRUE; + updateStats(); + emit gameRuns( running ); +} + +/* + Ends the current game. +*/ + +void KBBGame::gameFinished() +{ + if (running) { + QString s; + if (ballsPlaced == balls) { + getResults(); + abortGame(); + if (score <= (balls*3)) + s = i18n("Your final score is: %1\n" + "You did really well!"); + else + s = i18n("Your final score is: %1\n" + "I guess you need more practice."); + + KMessageBox::information(this, + s.arg(KGlobal::locale()->formatNumber(score, 0))); + } else { + s = i18n( "You should place %1 balls!\n" + "You have placed %2.") + .arg(KGlobal::locale()->formatNumber(balls, 0)) + .arg(KGlobal::locale()->formatNumber(ballsPlaced, 0)); + + KMessageBox::sorry(this, s); + } + } +} + +/* + Computes the final score and indicate errors. +*/ + +void KBBGame::getResults() +{ + int i, j, tgam, tgra; + RectOnArray *r = gr->getGraphicBoard(); + for (j = 0; j < (gr->numR()); j++) { + for (i = 0; i < (gr->numC()); i++) { + tgam = gameBoard->get( i, j ); + tgra = r->get( i, j ); + if ((tgam == BALLBBT) && (tgra != TBALLBBG)) { + setScore( score+5 ); + r->set( i, j, WBALLBBG ); + gr->updateElement( i, j ); + } + if ((tgam != BALLBBT) && (tgra == TBALLBBG)) { + r->set( i, j, FBALLBBG ); + gr->updateElement( i, j ); + } + } + } +} + +/* + Aborts the current game. +*/ + +void KBBGame::abortGame() +{ + if (running) { + running = FALSE; + ballsPlaced = 0; + updateStats(); + gr->clearFocus(); + emit gameRuns( running ); + } +} + +/* + Gives the game up. +*/ + +void KBBGame::giveUp() +{ + if (running) { + bool stop; + stop = KMessageBox::warningContinueCancel(0, + i18n( + "Do you really want to give up this game?"),QString::null,i18n("Give Up")) + == KMessageBox::Continue; + + if (stop) { + getResults(); + abortGame(); + } + } +} + +/* + Displays game statistics. +*/ + +void KBBGame::updateStats() +{ + QString tmp; + QString s = i18n("Run: "); + if (running) + s += i18n("Yes"); + else + s += i18n("No"); + statusBar()->changeItem( s, SRUN ); + s = i18n( "Size: " ); + s += tmp.sprintf( "%2d x %2d", + gr->numC()-4, gr->numR()-4 ); + statusBar()->changeItem( s, SSIZE ); + s = i18n( "Placed: " ); + s += tmp.sprintf( "%2d / %2d", + ballsPlaced, balls ); + statusBar()->changeItem( s, SBALLS ); +} + +/* + Sets the score value to n. +*/ + +void KBBGame::setScore( int n ) +{ + score = n; + statusBar()->changeItem( i18n("Score: %1").arg(n), SSCORE ); +} + +/* + Sets the size of the black box. +*/ + +bool KBBGame::setSize( int w, int h ) +{ + bool ok = FALSE; + if (((w+4) != gr->numC()) || ((h+4) != gr->numR())) { + if (running) { + ok = KMessageBox::warningContinueCancel(0, + i18n( + "This will be the end of the current game!"),QString::null,i18n("End Game")) + == KMessageBox::Continue; + + } else ok = TRUE; + if (ok) { + gr->setSize( w+4, h+4 ); // +4 is the space for "lasers" and an edge... + setMinSize(); + gameResize(); + delete gameBoard; + gameBoard = new RectOnArray( gr->numC(), gr->numR() ); + if (running) abortGame(); + newGame(); + // gr->repaint( TRUE ); + } + } + return ok; +} + +/* + Sets the number of balls in the black box to n. +*/ + +bool KBBGame::setBalls( int n ) +{ + bool ok = FALSE; + if (balls != n) { + if (running) { + ok = KMessageBox::warningContinueCancel(0, + i18n("This will be the end of the current game!"),QString::null,i18n("End Game")) + == KMessageBox::Continue; + } else ok = TRUE; + if (ok) { + balls = n; + if (running) abortGame(); + newGame(); + } + } + return ok; +} + +/* + Puts n balls in the black box on random positions. +*/ + +void KBBGame::randomBalls( int n ) +{ + int i; + random.setSeed(0); + for (i = 0; i < n; i++) { + int x=0, y=0; // there is OUTERBBT... + while (gameBoard->get( x, y ) != INNERBBT ) { + x = 2 + random.getLong(gameBoard->width()-4); + y = 2 + random.getLong(gameBoard->height()-4); + } + gameBoard->set( x, y, BALLBBT ); + } +} + +/* + This is, in fact, the whole game... +*/ + +int KBBGame::traceRay( int startX, int startY, int *endX, int *endY ) +{ + int type, x, y, d, refl; + int slx, scx, srx, sly, scy, sry; + bool directionChanged; + *endX = x = startX; + *endY = y = startY; + /* + Just to avoid compiler warnings + */ + type = slx = scx = srx = sly = scy = sry = 0; + /* + Get the initial direction d. + 0 .. up, 1 .. right, 2 .. down, 3 .. left + (0,0) is the upper-left corner. + */ + if ((gameBoard->get( x, y-1 ) == INNERBBT) || + (gameBoard->get( x, y-1 ) == BALLBBT)) { d = 0; } + else if ((gameBoard->get( x+1, y ) == INNERBBT) || + (gameBoard->get( x+1, y ) == BALLBBT)) { d = 1; } + else if ((gameBoard->get( x, y+1 ) == INNERBBT) || + (gameBoard->get( x, y+1 ) == BALLBBT)) { d = 2; } + else if ((gameBoard->get( x-1, y ) == INNERBBT) || + (gameBoard->get( x-1, y ) == BALLBBT)) { d = 3; } + else return WRONGSTART; + /* + And now trace the ray. + */ + while (1) { + switch (d) { + case 0: + slx = -1; scx = 0; srx = 1; + sly = -1; scy = -1; sry = -1; + break; + case 1: + slx = 1; scx = 1; srx = 1; + sly = -1; scy = 0; sry = 1; + break; + case 2: + slx = 1; scx = 0; srx = -1; + sly = 1; scy = 1; sry = 1; + break; + case 3: + slx = -1; scx = -1; srx = -1; + sly = 1; scy = 0; sry = -1; + break; + } + directionChanged = FALSE; + if (gameBoard->get( x+scx, y+scy ) == LASERBBT) { + type = DETOUR; + *endX = x+scx; + *endY = y+scy; + break; + } + if (gameBoard->get( x+scx, y+scy ) == BALLBBT) { + type = HIT; + break; + } + refl = 0; + if (gameBoard->get( x+slx, y+sly ) == BALLBBT) { + type = REFLECTION; + if (gameBoard->get( x, y ) == LASERBBT) break; + directionChanged = TRUE; + refl += 1; + } + if (gameBoard->get( x+srx, y+sry ) == BALLBBT) { + type = REFLECTION; + if (gameBoard->get( x, y ) == LASERBBT) break; + directionChanged = TRUE; + refl +=2; + } + // turn to the right + if (refl == 1) d = (d + 1) % 4; + // turn to the left + if (refl == 2) if ((d -= 1) < 0) d += 4; + // turn back -- no need to trace again the same way + if (refl == 3) break; + if (!directionChanged) { + x += scx; + y += scy; + } + } + return type; +} + +/* + Remaps the gameBoard to its graphic representation. +*/ + +void KBBGame::remap( RectOnArray *gam, RectOnArray *gra ) +{ + int i, j; + for (j = 0; j < (gam->height()); j++) { + for (i = 0; i < (gam->width()); i++) { + switch (gam->get( i,j )) { + case BALLBBT: if (tutorial) { gra->set( i,j, WBALLBBG ); break; } + case INNERBBT: gra->set( i,j, INNERBBG ); break; + case OUTERBBT: gra->set( i,j, OUTERBBG ); break; + case LASERBBT: gra->set( i,j, LASERBBG ); break; + default: gra->set( i,j, OUTERBBG ); + } + } + } +} + +/* + Processes the user input. +*/ + +void KBBGame::gotInputAt( int col, int row, int state ) +{ + RectOnArray *r = gr->getGraphicBoard(); + int type = r->get( col, row ); + int x, y; + int ex, ey; + int w = gameBoard->width() - 2; + int h = gameBoard->height() - 2; + + if (state & LeftButton) { + switch (type) { + case WBALLBBG: // because of the tutorial mode + case INNERBBG: + r->set( col, row, TBALLBBG ); + ballsPlaced++; + break; + case MARK1BBG: + r->set( col, row, INNERBBG ); + break; + case TBALLBBG: + r->set( col, row, INNERBBG ); + ballsPlaced--; + break; + case LASERBBG: + int endX, endY, result; + result = traceRay( col, row, &endX, &endY ); + r->set( col, row, LFIREBBG ); + //kdDebug << endX << " " << endY << endl; + if (col == 1) x = 0; else + if (col == w) x = w + 1; + else x = col; + + if (row == 1) y = 0; else + if (row == h) y = h + 1; + else y = row; + + switch (result) { + case DETOUR: + r->set( endX, endY, LFIREBBG ); + r->set( x, y, detourCounter ); + if (endX == 1) ex = 0; else + if (endX == w) ex = w + 1; + else ex = endX; + if (endY == 1) ey = 0; else + if (endY == h) ey = h + 1; + else ey = endY; + r->set( ex, ey, detourCounter-- ); + gr->updateElement( x, y ); + gr->updateElement( ex, ey ); + gr->updateElement( endX, endY ); + setScore( score+2 ); + break; + case REFLECTION: + r->set( x, y, RLASERBBG ); + gr->updateElement( x, y ); + setScore( score+1 ); + break; + case HIT: + r->set( x, y, HLASERBBG ); + gr->updateElement( x, y ); + setScore( score+1 ); + break; + case WRONGSTART: + kdDebug(12009) << "Wrong start?! It should't happen!!" << endl; + break; + } + break; + } + } else if (state & RightButton) { + switch (type) { + case INNERBBG: + r->set( col, row, MARK1BBG ); + break; + /*case MARK1BBG: + r->set( col, row, INNERBBG ); + break;*/ + } + } + gr->updateElement( col, row ); + updateStats(); +} + +void KBBGame::initKAction() +{ +// game + KStdGameAction::gameNew(this, SLOT(newGame()), actionCollection()); + (void)new KAction( i18n("&Give Up"), SmallIcon("giveup"), 0, this, SLOT(giveUp()), actionCollection(), "game_giveup" ); + (void)new KAction( i18n("&Done"), SmallIcon("done"), 0, this, SLOT(gameFinished()), actionCollection(), "game_done" ); + (void)new KAction( i18n("&Resize"), 0, this, SLOT(slotResize()), actionCollection(), "game_resize" ); + KStdGameAction::quit(this, SLOT(close()), actionCollection()); + + +// settings + sizeAction = new KSelectAction( i18n("&Size"), 0, this, SLOT(slotSize()), actionCollection(), "options_size"); + QStringList list; + list.append(i18n(" 8 x 8 ")); + list.append(i18n(" 10 x 10 ")); + list.append(i18n(" 12 x 12 ")); + sizeAction->setItems(list); + + ballsAction = new KSelectAction( i18n("&Balls"), 0, this, SLOT(slotBalls()), actionCollection(), "options_balls"); + list.clear(); + list.append(i18n(" 4 ")); + list.append(i18n(" 6 ")); + list.append(i18n(" 8 ")); + ballsAction->setItems(list); + tutorialAction = new KToggleAction( i18n("&Tutorial"), 0, this, SLOT(tutorialSwitch()), actionCollection(), "options_tutorial" ); +// KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), +//actionCollection()); + +// keyboard only + (void)new KAction( i18n("Move Down"), Qt::Key_Down, gr, SLOT(slotDown()), actionCollection(), "move_down" ); + (void)new KAction( i18n("Move Up"), Qt::Key_Up, gr, SLOT(slotUp()), actionCollection(), "move_up" ); + (void)new KAction( i18n("Move Left"), Qt::Key_Left, gr, SLOT(slotLeft()), actionCollection(), "move_left" ); + (void)new KAction( i18n("Move Right"), Qt::Key_Right, gr, SLOT(slotRight()), actionCollection(), "move_right" ); + (void)new KAction( i18n("Trigger Action"), Qt::Key_Return, gr, SLOT(slotInput()), actionCollection(), "move_trigger" ); +} + +void KBBGame::slotResize() +{ + setMinSize(); + gameResize(); +} + +#include "kbbgame.moc" diff --git a/kblackbox/kbbgame.h b/kblackbox/kbbgame.h new file mode 100644 index 00000000..70f6ad48 --- /dev/null +++ b/kblackbox/kbbgame.h @@ -0,0 +1,104 @@ +// +// +// KBlackBox +// +// A simple game inspired by an emacs module +// +// File: kbbgame.h +// +// The definition of the KBBGame widget +// + +#ifndef KBBGAME_H +#define KBBGAME_H + +#include "kbbgfx.h" +#include "util.h" + +#include <kmainwindow.h> +#include <krandomsequence.h> + +class KSelectAction; +class KToggleAction; + +/* + Types of the boxes (used f.e.g. in the traceRay() method) +*/ + +#define OUTERBBT 0 +#define INNERBBT 1 +#define LASERBBT 2 +#define BALLBBT 3 + +/* + Ray-tracing results. +*/ + +#define WRONGSTART -1 +#define DETOUR 0 +#define REFLECTION 1 +#define HIT 2 + +/* + * Statusbar IDs. + */ +#define SSCORE 0 +#define SBALLS 1 +#define SRUN 2 +#define SSIZE 3 + +class KBBGame : public KMainWindow +{ + Q_OBJECT +public: + KBBGame(); + ~KBBGame(); + +signals: + void gameRuns( bool ); + +private slots: + void slotSize(); + void slotBalls(); + + void tutorialSwitch(); + + void newGame(); + + bool setSize( int w, int h ); + bool setBalls( int n ); + void setMinSize(); + void randomBalls( int n ); + void slotResize(); + void gameResize(); + void setScore( int n ); + void updateStats(); + void gameFinished(); + void abortGame(); + void giveUp(); + void gotInputAt( int col, int row, int state ); + +private: + int traceRay( int startX, int startY, int *endX, int *endY ); + void remap( RectOnArray *gam, RectOnArray *gra ); + void getResults(); + void initKAction(); + + int balls; + int detourCounter; + int ballsPlaced; + bool running; + bool tutorial; + RectOnArray *gameBoard; + KBBGraphic *gr; + + int score; + /* QLabel *scoreText; + QLabel *statusText;*/ + KRandomSequence random; + + KSelectAction *ballsAction, *sizeAction; + KToggleAction *tutorialAction; +}; + +#endif // KBBGAME_H diff --git a/kblackbox/kbbgfx.cpp b/kblackbox/kbbgfx.cpp new file mode 100644 index 00000000..d37edc1e --- /dev/null +++ b/kblackbox/kbbgfx.cpp @@ -0,0 +1,473 @@ +// +// +// KBlackBox +// +// A simple game inspired by an emacs module +// +// File: kbbgfx.cpp +// +// The implementation of the KBBGraphic widget +// + +#include <qpainter.h> +#include <qpixmap.h> +#include <qcolor.h> +#include <qkeycode.h> +#include <qwmatrix.h> + +#include "kbbgfx.h" +#include "util.h" + +/* + Constructs a KBBGraphic widget. +*/ + +KBBGraphic::KBBGraphic( QPixmap **p, QWidget* parent, const char* name ) + : QWidget( parent, name ) +{ + int i; + + curRow = curCol = 0; + setFocusPolicy( NoFocus ); + setBackgroundColor( gray ); + setCellWidth( CELLW ); // set width of cell in pixels + setCellHeight( CELLH ); // set height of cell in pixels + setMouseTracking( FALSE ); + + pix = p; + if (pix == NULL) pixScaled = NULL; + else { + pixScaled = new QPixmap * [NROFTYPES]; + for (i = 0; i < NROFTYPES; i++) { + pixScaled[i] = new QPixmap; + } + } + graphicBoard = NULL; + drawBuffer = NULL; +} + +/* + Destructor: deallocates memory for contents +*/ + +KBBGraphic::~KBBGraphic() +{ + int i; + + if (pix != NULL) { + for (i = 0; i < NROFTYPES; i++) { + delete pix[i]; + } + delete pix; + } + if (pixScaled != NULL) { + for (i = 0; i < NROFTYPES; i++) { + delete pixScaled[i]; + } + delete pixScaled; + } + delete graphicBoard; + delete drawBuffer; +} + +/* + Sets the size of the table +*/ + +void KBBGraphic::setSize( int w, int h ) +{ + if ((w != numCols) || (h != numRows)) { + delete graphicBoard; + graphicBoard = new RectOnArray( w, h ); + graphicBoard->fill( OUTERBBG ); + setNumCols( w ); + setNumRows( h ); + setCellWidth( CELLW ); + setCellHeight( CELLH ); + minW = cellW * numRows; + minH = cellH * numCols; + emit(sizeChanged()); + } +} + +void KBBGraphic::setCellWidth( int w ) +{ + cellW = w; +} + +void KBBGraphic::setCellHeight( int h ) +{ + cellH = h; +} + +void KBBGraphic::setNumRows( int rows ) +{ + numRows = rows; +} + +void KBBGraphic::setNumCols( int cols ) +{ + numCols = cols; +} + +/* + Scales all pixmaps to desired size. +*/ + +void KBBGraphic::scalePixmaps( int w, int h ) +{ + int i, w0, h0; + QWMatrix wm; + + w0 = pix[0]->width(); + h0 = pix[0]->height(); + wm.scale( (float) w / (float) w0, (float) h / (float) h0 ); + for (i = 0; i < NROFTYPES; i++) { + *pixScaled[i] = pix[i]->xForm( wm ); + } +} + +/* + Returns the sizes of the table +*/ + +int KBBGraphic::numC() { return numCols; } +int KBBGraphic::numR() { return numRows; } +int KBBGraphic::width() { return cellW * numRows; } +int KBBGraphic::height() { return cellH * numCols; } +int KBBGraphic::wHint() const { return minW; } +int KBBGraphic::hHint() const { return minH; } +QSize KBBGraphic::sizeHint() const { return QSize(wHint(), hHint()); } + +/* + Returns a pointer to graphicBoard +*/ + +RectOnArray *KBBGraphic::getGraphicBoard() { return graphicBoard; } + +/* + Handles cell painting for the KBBGraphic widget. +*/ + +void KBBGraphic::paintCell( QPainter* p, int row, int col ) +{ + if (pix == NULL) paintCellDefault( p, row, col ); + else paintCellPixmap( p, row, col ); +} + +void KBBGraphic::paintCellPixmap( QPainter* p, int row, int col ) +{ + int w = cellW; + int h = cellH; + int x2 = w - 1; + int y2 = h - 1; + int type; + QPixmap pm; + + // kdDebug(12009) << p->viewport().width() << endl; + + switch (type = graphicBoard->get( col, row )) { + case MARK1BBG: pm = *pixScaled[MARK1BBG]; break; + case OUTERBBG: pm = *pixScaled[OUTERBBG]; break; + case INNERBBG: pm = *pixScaled[INNERBBG]; break; + case LASERBBG: pm = *pixScaled[LASERBBG]; break; + case LFIREBBG: pm = *pixScaled[LFIREBBG]; break; + case FBALLBBG: pm = *pixScaled[FBALLBBG]; break; + case TBALLBBG: pm = *pixScaled[TBALLBBG]; break; + case WBALLBBG: pm = *pixScaled[WBALLBBG]; break; + default: pm = *pixScaled[OUTERBBG]; + } + // kdDebug(12009) << pm.width() << " " << w << endl; + p->drawPixmap( 0, 0, pm ); + // bitBlt( this, col * w, row * h, &pm ); + + p->setPen( black ); + + if (type == INNERBBG) { + p->drawLine( x2, 0, x2, y2 ); // draw vertical line on right + p->drawLine( 0, y2, x2, y2 ); // draw horiz. line at bottom + p->drawLine( 0, 0, x2, 0 ); + p->drawLine( 0, 0, 0, y2 ); + } + + /* + Extra drawings for boxes aroud lasers. + */ + QString s; + switch (type) { + case RLASERBBG: + s.sprintf( "%c", 'R' ); + p->drawText( 1, 1, x2-1, y2-1, AlignCenter, s ); + break; + case HLASERBBG: + s.sprintf( "%c", 'H' ); + p->drawText( 1, 1, x2-1, y2-1, AlignCenter, s ); + break; + } + if (type < 0) { + s.sprintf( "%d", -type ); + p->drawText( 1, 1, x2-1, y2-1, AlignCenter, s ); + } + + /* + Draw extra frame inside if this is the current cell. + */ + p->setPen( yellow ); + if ( (row == curRow) && (col == curCol) ) { // if we are on current cell, + if ( hasFocus() ) { + p->drawRect( 0, 0, x2, y2 ); + } + else { // we don't have focus, so + p->setPen( DotLine ); // use dashed line to + p->drawRect( 0, 0, x2, y2 ); + p->setPen( SolidLine ); // restore to normal + } + } +} + +void KBBGraphic::paintCellDefault( QPainter* p, int row, int col ) +{ + int w = cellW; + int h = cellH; + int x2 = w - 1; + int y2 = h - 1; + int type; + QColor color; + + switch (type = graphicBoard->get( col, row )) { + case MARK1BBG: color = darkRed; break; + case OUTERBBG: color = white; break; + case INNERBBG: color = gray; break; + case LASERBBG: color = darkGreen; break; + case LFIREBBG: color = green; break; + case FBALLBBG: color = red; break; + case TBALLBBG: color = blue; break; + case WBALLBBG: color = cyan; break; + default: color = white; + } + p->fillRect( 0, 0, x2, y2, color ); + + p->setPen( black ); + p->drawLine( x2, 0, x2, y2 ); // draw vertical line on right + p->drawLine( 0, y2, x2, y2 ); // draw horiz. line at bottom + + /* + Extra drawings for boxes aroud lasers. + */ + QString s; + switch (type) { + case RLASERBBG: + s.sprintf( "%c", 'R' ); + p->drawText( 1, 1, x2-1, y2-1, AlignCenter, s ); + break; + case HLASERBBG: + s.sprintf( "%c", 'H' ); + p->drawText( 1, 1, x2-1, y2-1, AlignCenter, s ); + break; + } + if (type < 0) { + s.sprintf( "%d", -type ); + p->drawText( 1, 1, x2-1, y2-1, AlignCenter, s ); + } + + /* + Draw extra frame inside if this is the current cell. + */ + if ( (row == curRow) && (col == curCol) ) { // if we are on current cell, + if ( hasFocus() ) { + p->drawEllipse( 1, 1, x2-2, y2-2 ); // draw ellipse + } + else { // we don't have focus, so + p->setPen( DotLine ); // use dashed line to + p->drawEllipse( 1, 1, x2-2, y2-2 ); // draw ellipse + p->setPen( SolidLine ); // restore to normal + } + } +} + +/* + Xperimantal... +*/ + +void KBBGraphic::paintEvent( QPaintEvent* ) +{ + int i, j; + QPainter paint( drawBuffer ); + + // kdDebug(12009) << drawBuffer->width() << endl; + for (i = 0; i < numRows; i++) { + for (j = 0; j < numCols; j++) { + paint.setViewport( j * cellW, i * cellH, width(), height() ); + paintCell( &paint, i, j ); + } + } + bitBlt( this, 0, 0, drawBuffer ); +} + +/* + Resize event of the KBBGraphic widget. +*/ + +void KBBGraphic::resizeEvent( QResizeEvent* ) +{ + int w = QWidget::width(); + int h = QWidget::height(); + int wNew, hNew; + + // kbDebug() << w << " " << h << " " << minW << " " << minH << endl; + if (w > minW) { + wNew = w / numC(); + } else { + wNew = CELLW; + } + if (h > minH) { + hNew = h / numR(); + } else { + hNew = CELLH; + } + if (pix != NULL) scalePixmaps( wNew, hNew ); + setCellWidth( wNew ); + setCellHeight( hNew ); + + delete drawBuffer; + drawBuffer = new QPixmap( cellW * numRows, cellH * numCols ); +} + +/* + Handles mouse press events for the KBBGraphic widget. +*/ +void KBBGraphic::mousePressEvent( QMouseEvent* e ) +{ + if (inputAccepted) { + /* + * Middle click finishes the game. + */ + if (e->button() == MidButton) { + emit endMouseClicked(); + return; + } + int oldRow = curRow; + int oldCol = curCol; + QPoint pos = e->pos(); // extract pointer position + curRow = pos.y() / cellH; + curCol = pos.x() / cellW; + //kdDebug(12009) << e->state() << " " << LeftButton << " " << e->state()&LeftButton << endl; + updateElement( oldCol, oldRow ); + emit inputAt( curCol, curRow, e->button() ); + } +} + + +/* + Handles mouse move events for the KBBGraphic widget. +*/ + +void KBBGraphic::mouseMoveEvent( QMouseEvent* e ) { + if (inputAccepted) { + int oldRow = curRow; + int oldCol = curCol; + QPoint pos = e->pos(); // extract pointer position + int movRow = pos.y() / cellH; + int movCol = pos.x() / cellW; + // kdDebug(12009) << movRow << " " << curRow << endl; + if ( (curRow != movRow) // if current cell has moved, + || (curCol != movCol) ) { + curRow = movRow; + curCol = movCol; + updateElement( oldCol, oldRow ); + emit inputAt( curCol, curRow, e->state() ); + } + } +} + +void KBBGraphic::slotUp() +{ + if( curRow > 0 ) { + moveSelection( -1, 0 ); + } +} + +void KBBGraphic::slotDown() +{ + if( curRow < numRows-1 ) { + moveSelection( 1, 0 ); + } +} + +void KBBGraphic::slotLeft() +{ + if( curCol > 0 ) { + moveSelection( 0, -1 ); + } +} + +void KBBGraphic::slotRight() +{ + if( curCol < numCols-1 ) { + moveSelection( 0, 1 ); + } +} + +void KBBGraphic::slotInput() +{ + if ( !inputAccepted ) { + return; + } + emit inputAt( curCol, curRow, LeftButton ); +// updateElement( curCol, curRow ); +} + +void KBBGraphic::moveSelection(int drow, int dcol) +{ + if ( !dcol && !drow || !inputAccepted ) { + return; + } + curCol += dcol; + curRow += drow; + updateElement( curCol - dcol, curRow - drow ); + updateElement( curCol, curRow ); +} + +/* + Handles focus reception events for the KBBGraphic widget. +*/ + +void KBBGraphic::focusInEvent( QFocusEvent* ) +{ + repaint( FALSE ); +} + + +/* + Handles focus loss events for the KBBGraphic widget. +*/ + +void KBBGraphic::focusOutEvent( QFocusEvent* ) +{ + repaint( FALSE ); +} + +/* + Sets whether user input is processed or not. +*/ + +void KBBGraphic::setInputAccepted( bool b ) +{ + inputAccepted = b; + if (b) setFocusPolicy( StrongFocus ); + else setFocusPolicy( NoFocus ); +} + +/* + Updates the cell at (col,row). +*/ + +void KBBGraphic::updateElement( int col, int row ) +{ + QPainter paint( this ); + + paint.setViewport( col * cellW, row * cellH, width(), height() ); + paintCell( &paint, row, col ); +} + +#include "kbbgfx.moc" diff --git a/kblackbox/kbbgfx.h b/kblackbox/kbbgfx.h new file mode 100644 index 00000000..ae4d207c --- /dev/null +++ b/kblackbox/kbbgfx.h @@ -0,0 +1,120 @@ +// +// +// KBlackBox +// +// A simple game inspired by an emacs module +// +// File: kbbgfx.h +// +// The definition of the KBBGraphic widget +// + +#ifndef KBBGFX_H +#define KBBGFX_H + +#include <qwidget.h> +#include <qpixmap.h> + +#include "util.h" + +/* + Default size of a cell +*/ + +#define CELLW 32 +#define CELLH 32 + +/* + Graphical types of the boxes +*/ + +#define OUTERBBG 0 +#define INNERBBG 1 +#define LASERBBG 2 +#define FBALLBBG 3 +#define TBALLBBG 4 +#define WBALLBBG 5 +#define MARK1BBG 6 +#define LFIREBBG 7 + +/* + These have the same pixmaps as some of those above... +*/ + +#define RLASERBBG 8 +#define HLASERBBG 9 + +#define NROFTYPES 8 + +/* + Negative numbers are deflected lasers... +*/ + +class KBBGraphic : public QWidget +{ + Q_OBJECT +public: + KBBGraphic( QPixmap** p=0, QWidget* parent=0, const char* name=0 ); + ~KBBGraphic(); + + friend class KBBGame; + + void setSize( int w, int h ); + RectOnArray *getGraphicBoard(); + int numC(); + int numR(); + int width(); + int height(); + int wHint() const; + int hHint() const; + void setCellWidth( int w ); + void setCellHeight( int h ); + void setNumRows( int rows ); + void setNumCols( int cols ); + +public slots: + void setInputAccepted( bool b ); + void updateElement( int col, int row ); + void slotUp(); + void slotDown(); + void slotLeft(); + void slotRight(); + void slotInput(); + +signals: + void sizeChanged(); + void inputAt( int, int, int ); + void endMouseClicked(); + +protected: + virtual QSize sizeHint() const; + void paintEvent( QPaintEvent* ); + void mousePressEvent( QMouseEvent* ); + void mouseMoveEvent( QMouseEvent* ); + void focusInEvent( QFocusEvent* ); + void focusOutEvent( QFocusEvent* ); + void resizeEvent( QResizeEvent* e ); + + void moveSelection(int drow, int dcol); + +private: + void paintCell( QPainter* p, int row, int col ); + void paintCellDefault( QPainter*, int row, int col ); + void paintCellPixmap( QPainter*, int row, int col ); + void scalePixmaps( int w, int h ); + RectOnArray *graphicBoard; + int curRow; + int curCol; + bool inputAccepted; + int minW; + int minH; + int cellW; + int cellH; + int numCols; + int numRows; + QPixmap **pix; + QPixmap **pixScaled; + QPixmap *drawBuffer; +}; + +#endif // KBBGFX_H diff --git a/kblackbox/kblackbox.desktop b/kblackbox/kblackbox.desktop new file mode 100644 index 00000000..a599cec6 --- /dev/null +++ b/kblackbox/kblackbox.desktop @@ -0,0 +1,77 @@ +[Desktop Entry] +GenericName=Blackbox Logic Game +GenericName[be]=Лагічная гульня з чорнай скрыняй +GenericName[bg]=Логическа игра +GenericName[bn]=যুক্তির খেলা ব্ল্যাকবক্স +GenericName[bs]=Logička igra "Crna kutija" +GenericName[ca]=Joc de lògica Blackbox +GenericName[cs]=Logická hra s černou skříňkou +GenericName[cy]=Gêm Resymeg Blackbox +GenericName[da]=Blackbox logikspil +GenericName[de]=Logikspiel +GenericName[el]=Παιχνίδι λογικής Blackbox +GenericName[eo]=Divenlogika ludo +GenericName[es]=Juego de lógica Blackbox +GenericName[et]=Blackboxi loogikamäng +GenericName[eu]=Blackbox joko logikoa +GenericName[fa]=بازی Blackbox Logic +GenericName[fi]=Logiikkapeli +GenericName[fr]=Jeu de logique Blackbox +GenericName[he]=משחק לוגיקה +GenericName[hr]=Blackbox logička igra +GenericName[hu]=Logikai +GenericName[is]=Blackbox kænskuleikur +GenericName[it]=Gioco di logica Blackbox +GenericName[ja]=ブラックボックス論理ゲーム +GenericName[km]=ល្បែងតក្កវិជ្ជា Blackbox +GenericName[ko]=블랙박스 논리 게임 +GenericName[lt]=Blackbox loginis žaidimas +GenericName[lv]=Melnās kastes loģikas spēle +GenericName[mk]=Логичка игра Blackbox +GenericName[nb]=Logikkspillet Blackbox +GenericName[nds]=Blackbox Logikspeel +GenericName[ne]=कालोबाकस युक्तिसंगत खेल +GenericName[nl]=Blackbox: Logisch spel +GenericName[nn]=Logikkspelet Blackbox +GenericName[pl]=Gra logiczna - Czarna skrzynka +GenericName[pt]=Jogo de Lógica Caixa Preta +GenericName[pt_BR]=Jogo lógico de Caixa Preta +GenericName[ru]=Чёрный ящик +GenericName[se]=Logihkkaspeallu Blackbox +GenericName[sk]=Blackbox logická hra +GenericName[sl]=Logična igra Blackbox +GenericName[sr]=Логичка игра црне кутије +GenericName[sr@Latn]=Logička igra crne kutije +GenericName[sv]=Svart låda logiskt spel +GenericName[ta]=கறுப்புபெட்டி லாஜிக் விளையாட்டு +GenericName[uk]=Гра на логіку (чорний ящик) +GenericName[wa]=Djeu d' lodjike noere boesse +GenericName[zh_TW]=黑盒子智力遊戲 +Exec=kblackbox %i %m -caption "%c" +Name=KBlackBox +Name[af]=Kblackbox +Name[ar]=لعبة الصندوق الأسود (KBlackBox) +Name[be]=Чорная скрыня +Name[bn]=কে-ব্ল্যাকবক্স +Name[hi]=के-ब्लेकबॉक्स +Name[hu]=Fekete doboz +Name[is]=Svarti kassinn +Name[ne]=केडीई कालोबाकस +Name[pa]=ਕੇ-ਬਲੈਕ ਬਾਕਸ +Name[pl]=Czarna skrzynka +Name[pt_BR]=KCaixa Preta +Name[sv]=Kblackbox +Name[ta]=கேகருப்பு பெட்டி +Name[tg]=KҚуттии Сиёҳ +Name[th]=กล่องดำ - K +Name[tr]=Kara Kutu +Name[uk]=Чорна скринька +Name[zh_TW]=KBlackBox 黑盒子 +Icon=kblackbox +Path= +DocPath=kblackbox/index.html +Type=Application +Terminal=false +X-KDE-StartupNotify=true +X-DCOP-ServiceType=Multi +Categories=Qt;KDE;Game;BoardGame; diff --git a/kblackbox/kblackboxui.rc b/kblackbox/kblackboxui.rc new file mode 100644 index 00000000..c7c2b634 --- /dev/null +++ b/kblackbox/kblackboxui.rc @@ -0,0 +1,24 @@ +<!DOCTYPE kpartgui> +<kpartgui name="kblackbox" version="5"> + +<MenuBar> + <Menu name="game"><text>&Game</text> + <Action name="game_giveup" append="new_merge"/> + <Action name="game_done" append="new_merge"/> + <Separator/> + <Action name="game_resize" append="misc_merge"/> + </Menu> + <Menu name="settings"><text>&Settings</text> + <Action name="options_size" append="save_merge"/> + <Action name="options_balls" append="save_merge"/> + <Action name="options_tutorial" append="save_merge"/> + </Menu> +</MenuBar> + +<ToolBar name="mainToolBar" noMerge="1"><text>Main Toolbar</text> + <Action name="game_new"/> + <Action name="game_giveup"/> + <Action name="game_done"/> +</ToolBar> + +</kpartgui> diff --git a/kblackbox/main.cpp b/kblackbox/main.cpp new file mode 100644 index 00000000..ba0db293 --- /dev/null +++ b/kblackbox/main.cpp @@ -0,0 +1,46 @@ +// +// KBlackbox +// +// A simple game inspired by an emacs module +// +// File: main.cpp +// +// The main() function +// + + +#include <kapplication.h> +#include <klocale.h> +#include <kcmdlineargs.h> +#include <kaboutdata.h> + +#include "kbbgame.h" +#include "version.h" + + +static const char description[] = I18N_NOOP("KDE Blackbox Game"); + +/* + The program starts here. +*/ + +int main( int argc, char **argv ) +{ + KAboutData aboutData( "kblackbox", I18N_NOOP("KBlackBox"), + KBVERSION, description, KAboutData::License_GPL, + "(c) 1999-2000, Robert Cimrman"); + aboutData.addAuthor("Robert Cimrman",0, "[email protected]"); + KCmdLineArgs::init( argc, argv, &aboutData ); + + KApplication a; + KGlobal::locale()->insertCatalogue("libkdegames"); + + if (a.isRestored()) + RESTORE(KBBGame) + else { + KBBGame *w = new KBBGame; + a.setMainWidget(w); + w->show(); + } + return a.exec(); +} diff --git a/kblackbox/pics/Makefile.am b/kblackbox/pics/Makefile.am new file mode 100644 index 00000000..bfc5d607 --- /dev/null +++ b/kblackbox/pics/Makefile.am @@ -0,0 +1,10 @@ + +# add here all files +pics_DATA = blue.xpm brown.xpm cyan.xpm gray.xpm green.xpm red.xpm white.xpm\ + green2.xpm giveup.xpm done.xpm + +picsdir = $(kde_datadir)/kblackbox/pics + +# extra files for "make dist" +EXTRA_DIST = $(pics_DATA) + diff --git a/kblackbox/pics/blue.xpm b/kblackbox/pics/blue.xpm new file mode 100644 index 00000000..fca9f04c --- /dev/null +++ b/kblackbox/pics/blue.xpm @@ -0,0 +1,199 @@ +/* XPM */ +static char *blue[] = { +/* width height num_colors chars_per_pixel */ +" 48 48 144 2", +/* colors */ +".. c #04021c", +".# c #7476fc", +".a c #3c3e3c", +".b c #040284", +".c c #2422bc", +".d c #1412a4", +".e c #3c3edc", +".f c #acaefc", +".g c #242224", +".h c #3432cc", +".i c #5c5afc", +".j c #0402a4", +".k c #04024c", +".l c #1412bc", +".m c #4c4ef4", +".n c #9492fc", +".o c #2c2ac4", +".p c #cccafc", +".q c #141214", +".r c #545654", +".s c #0c0aa4", +".t c #3432e4", +".u c #1c1abc", +".v c #0c0a9c", +".w c #04022c", +".x c #8486fc", +".y c #040294", +".z c #1c1ab4", +".A c #3c3eec", +".B c #bcbefc", +".C c #343234", +".D c #6c6afc", +".E c #04026c", +".F c #a4a2fc", +".G c #dcdafc", +".H c #0c0ab4", +".I c #4c4a4c", +".J c #3c3adc", +".K c #2c2ad4", +".L c #646264", +".M c #1c1acc", +".N c #1412b4", +".O c #3432dc", +".P c #0406b4", +".Q c #4c4aec", +".R c #0c0a0c", +".S c #7c7efc", +".T c #b4b6fc", +".U c #2c2a2c", +".V c #6462fc", +".W c #0406a4", +".X c #04025c", +".Y c #1416bc", +".Z c #5456fc", +".0 c #9c9afc", +".1 c #d4d2fc", +".2 c #1c1a1c", +".3 c #0c0ea4", +".4 c #3c3ae4", +".5 c #1c1ebc", +".6 c #04023c", +".7 c #2426cc", +".8 c #040694", +".9 c #4442ec", +"#. c #444644", +"## c #04068c", +"#a c #1416ac", +"#b c #4442e4", +"#c c #3436d4", +"#d c #2c2ecc", +"#e c #5c5e5c", +"#f c #4446f4", +"#g c #8c8efc", +"#h c #c4c6fc", +"#i c #3c3a3c", +"#j c #7472fc", +"#k c #04027c", +"#l c #acaafc", +"#m c #e4e2fc", +"#n c #0c0eb4", +"#o c #545254", +"#p c #2c2ed4", +"#q c #6c6a6c", +"#r c #040224", +"#s c #7c7afc", +"#t c #444244", +"#u c #04028c", +"#v c #2422c4", +"#w c #1412ac", +"#x c #3c3ee4", +"#y c #242624", +"#z c #3432d4", +"#A c #5c5efc", +"#B c #0402ac", +"#C c #040254", +"#D c #4c4efc", +"#E c #9496fc", +"#F c #2c2acc", +"#G c #cccefc", +"#H c #141614", +"#I c #5c5a5c", +"#J c #4446ec", +"#K c #0c0aac", +"#L c #3436e4", +"#M c #1c1ac4", +"#N c #0c0e9c", +"#O c #040234", +"#P c #2422d4", +"#Q c #8c8afc", +"#R c #04029c", +"#S c #1c1eb4", +"#T c #3c3ef4", +"#U c #c4c2fc", +"#V c #343634", +"#W c #6c6efc", +"#X c #040274", +"#Y c #a4a6fc", +"#Z c #dcdefc", +"#0 c #4c4e4c", +"#1 c #1c1ecc", +"#2 c #1416b4", +"#3 c #3436dc", +"#4 c #8482fc", +"#5 c #bcbafc", +"#6 c #0c0e0c", +"#7 c #2c2e2c", +"#8 c #6466fc", +"#9 c #9c9efc", +"a. c #d4d6fc", +"a# c #1c1e1c", +"aa c #4c4af4", +"ab c #2426c4", +"ac c #0406ac", +"ad c #040264", +"ae c #1416c4", +"af c #0c0eac", +"ag c #3c3aec", +"ah c #1c1ec4", +"ai c #040244", +"aj c #2426d4", +"ak c #04069c", +"al c #4442f4", +"am c #0c0ebc", +"an c #2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#O.6aiad.E.X.k#C.k.6.X.k.6#H#7a##y#y.a#o.I.g#0.Ca##t.r#t", +".g#6#0.I#y.q.U#t#7#y.U.a#y#H.U#V.a.g#r..#O.k#O.6.k.6ai.6#O.6#O.g.Ca##V#o#t#t.C#ta##i#i#7a##y#V#.", +".2.U.ga#.g#ya##0#i.2.C.q#V#V#y.Ca##I#e.U#H.g#7#6#7#H.C#7.C#V#7a#.C.g.g.r.r#o#0.g.g#o.C#y.ga#.qa#", +"#y#H.C.C.g.U.C#i#H.C.r.C#t#..U.2.a.r.r.a#7.2a#.2.C.C#H#H#H#t.2.2.U#y#y.g#.#o#7a#.ga##y.I.I.C.g#H", +".C.Ua#.2#V#i#7.2a##7#.#t.2#q.aa##t#o#o#0.C.q#H#V#y#y.2.a#7a#.U#y#o.a.C#6.C#o#t#y.2.r#0#0.I#t.C.U", +".Ua#.I#i#i#6#y#7#I.C#V.I#V#7a##H.U#H#i#y.2#H#i.L#t#t.C.q#t.g#i#V.a#I#.#i#i#..a#i#H#I#o#..g#V#7a#" +}; diff --git a/kblackbox/pics/brown.xpm b/kblackbox/pics/brown.xpm new file mode 100644 index 00000000..4ccd55fe --- /dev/null +++ b/kblackbox/pics/brown.xpm @@ -0,0 +1,77 @@ +/* XPM */ +static char * image_name[] = { +"48 48 26 1", +" c #69A645141861", +". c #514434D31040", +"X c #30C220810820", +"o c #41032CB21040", +"O c #618541031861", +"+ c #492430C21040", +"@ c #59653CF31040", +"# c #596538E31040", +"$ c #28A21C710820", +"% c #514438E31040", +"& c #30C21C710820", +"* c #61853CF31861", +"= c #28A218610820", +"- c #18610C300000", +"; c #38E324920820", +": c #186110400820", +"> c #208114510820", +", c #082004100000", +"< c #104008200000", +"1 c #410328A21040", +"2 c #49242CB21040", +"3 c #71C649241861", +"4 c #38E328A21040", +"5 c #69A649241861", +"6 c #208118610820", +"7 c #000000000000", +" .Xo o O ++X+@+#@O.$%.. ##+&o*.=-$;:>-,<1..#+ ", +"O2;O3# ##1o%O .##.oX*#@O.#.1&o#X1;.OX;%o+O@1+o@", +"$::+#+#@%%X$+%#1;&4.+@#@@.*#.;#O;%1#*1o*.. #+", +"&&$++411X$-<X+1;&1#@+41*@1+#.o@O;4X+@o+#.#*#@#1$", +"..1++XX;&$$$@#1++.@+>=1%+;..o;+o>4o#O.++.##o##;o", +"@;o*O#*@.%+X%.o##@@#+o* +;+%+;;4>o.@*+o+#oX>;;=.", +"@1o%OO @.1>%*.#.+#@.#@ +o+++1.@+##OO#+@O%.1*@+O", +"#;o.#@#.+.o1 5@##.o1X&1o;;+o+o#O+o#* .%O*.+oO *5", +"XXo4++..1112 #+@++@%++o++ooo##++X&+@@++#ooo&+.1o", +"1.%%@#OOo+2.*## ;1+o1++%1;4% #.@o;*O*+.#1o%+#+#+", +"4o+@ @5*X+@@O@*OX1*;;o1%++%* @%O%1OO*.++o+#o%#*.", +"o*#+#o%1:X+oo+++X;@&o+++1#O#+1&&X&+41o1+;o.%4o@#", +"+ O#@1o+$+%4;+.%;1@X;.%#o11X11X&1X;1++++4211XXo1", +".@+1*#@*1@O+##@+&1*;%@++X++1#@..*## 5@@.1@+;1+*%", +"..XX+1+.&o%X4+%o$1.&+O1X=+##.+.@@+O @1o4=.12**O@", +".@11%.+oX+1&+o14X#%X1%;+# *+.#%#oX++;=XX6%;1#+.+", +"O 1o*.o;;.%o@*@#.OOX+%1o@O#+@ @%+1OO+o%#1O++@4.@", +"%+;.*.1;+ @o.+.O*OO;. +%%*#.@ @#O# O.++@+@+o%Xo+", +".+1.+o+o@ @1+2%%114:$#X;.#.+#%++##@+44;++@2+@;.@", +"++1+X+@1**+;+1.#o.+>+O+. %+*#+%#..;1+;++.o#O1.@", +"1+o+%o@o@@#2;&+#o.1&O oo#%+o+11%#+%X4.;1o%+.%$1+", +"+#11o;++@+X;X$%*++1$#@;411o&1o+++X+X;1=$;o111&%.", +".@1%@.O*O#%@2;##X+.X.%&$+%+&;.%o1;o&X%o12.1411##", +"$1;##1+.#41%o>+#=;.X*@$X+#o;+**##%*11*o1+O@#%# +", +"X+Xo;-=>$->;;-oO1@ 1O ;+ #+@ O%%#@1;.+;+O+...*+", +"$#+@@+ @%;@ +X 3o*5+@@&.#@*1+#%+1o.1X%+o# +1+oo$", +"X;$+@%** # 524 3o@@;#@X%@@@X+*%+o.%1o#.;%O;1#@O+", +".*+ ##@@o%@$&++X2%&o+$+###&1*#..%*oo+.1#@4o*OO.", +";o+5 #* O;@*X>++X1@12@X.*.@1.@;1+1o44o+;1+&;+++o", +"X+o%+1.#.;.@&=O +2+;X%;+@o#o+#;;11o4X+o4++1++%%1", +".#%#.+o++;+.>>o2&1@;XoX+%1o++%;#@.*@+@*.%#OO#O *", +"o.+%.+o.#1.%X;#o&+@XX4;+@1+%+.+*@+@@%@*+@##O@@O*", +"$>;+o2@@[email protected]*# ;&@.##.#@%++@++@@@O*#@O O*@O#", +"4;+*#O OO%.@+1@.%#@1X*#.@#* O%#@++#1o1XX14o+;1#.", +"X;+@+%#@O%[email protected]@@+.+oX.## @#%#++#%.#%@%+;++++X%#X", +">>>&:$Xo#2+...OO+@*#+@OO5##O++..+o%@*O@+#@@@1.@>", +"1+1+;.@+%X++1+#%11+;+.@++o+*.1.;+1o1o++4##o.1.@&", +"1o+#+@*o1$$+4@%.%++X4o1;XX&X>>4=XXX;X1;>o#+*1#Oo", +"oo.%;+@++oo@4++1%.%++#..+##%+o*++#@O.*.&oo;@+@O+", +";++1$2*...*O2++2.11X1#@@4+@@..O@%@OO+%@;@*;o1.#X", +"+%%1X@ @@#O5X@%@Oo1&1* %&+O*oo*@@@@.;# o* +@;XX;", +"o;1;o@5@++##>[email protected]:+@1>6+++1+#+O +@*1.;111", +".;;>>;.+1;.#<;+11;1++1X>-o+$6X+4;1+.X1+X11;%X#*#", +" OO+11@@#% >#@%*#.+.+O+X* .%* @@ *%1.#+2;;@;;;.", +" @1X22O @..@$*O.O##..+.>>#O#1.1@*O+1+@O.%;o@11o*", +" @>&+;@#&;o+$@#1%+++++1:X* .X1$1++44#+%%@X1 #++ ", +"o+:1@X@@o+@OoO@1o.++oo+=# %X.X@*.@*@#@@+>$.X>-X", +"o=7:+=@*@O@#1#@o.#*1;o4XO5 *+#153%1%+;1X<7$%o1X."}; diff --git a/kblackbox/pics/cyan.xpm b/kblackbox/pics/cyan.xpm new file mode 100644 index 00000000..591f9c90 --- /dev/null +++ b/kblackbox/pics/cyan.xpm @@ -0,0 +1,193 @@ +/* XPM */ +static char *cyan[] = { +/* width height num_colors chars_per_pixel */ +" 48 48 138 2", +/* colors */ +".. c #0c0a0c", +".# c #048684", +".a c #7cfefc", +".b c #14c6c4", +".c c #044a4c", +".d c #4ceeec", +".e c #04a6a4", +".f c #34e2e4", +".g c #0cb6b4", +".h c #042a2c", +".i c #4c4a4c", +".j c #2cc6c4", +".k c #2c2a2c", +".l c #046a6c", +".m c #b4fefc", +".n c #1cb6b4", +".o c #14a6a4", +".p c #2cd6d4", +".q c #049694", +".r c #3cf2f4", +".s c #041e1c", +".t c #64fefc", +".u c #24d2d4", +".v c #5c5e5c", +".w c #045a5c", +".x c #04aeac", +".y c #043a3c", +".z c #3c3a3c", +".A c #9cfefc", +".B c #24c6c4", +".C c #4cfefc", +".D c #44e2e4", +".E c #047a7c", +".F c #d4fefc", +".G c #1cbebc", +".H c #3cdedc", +".I c #049e9c", +".J c #2ccecc", +".K c #2cdedc", +".L c #1c1a1c", +".M c #545654", +".N c #14aeac", +".O c #141214", +".P c #048e8c", +".Q c #8cfefc", +".R c #1ccecc", +".S c #045254", +".T c #0ca6a4", +".U c #3ceaec", +".V c #14b6b4", +".W c #043234", +".X c #343234", +".Y c #047274", +".Z c #c4fefc", +".0 c #34d6d4", +".1 c #046264", +".2 c #0caeac", +".3 c #044244", +".4 c #444244", +".5 c #5cfefc", +".6 c #24bebc", +".7 c #0c9e9c", +".8 c #34cecc", +".9 c #242224", +"#. c #1cc6c4", +"## c #3ce2e4", +"#a c #545254", +"#b c #24babc", +"#c c #0c9a9c", +"#d c #44eeec", +"#e c #74fefc", +"#f c #acfefc", +"#g c #54fafc", +"#h c #44eaec", +"#i c #14bebc", +"#j c #048284", +"#k c #e4fefc", +"#l c #1cb2b4", +"#m c #0c0e0c", +"#n c #048a8c", +"#o c #84fefc", +"#p c #044e4c", +"#q c #4cf2f4", +"#r c #04aaac", +"#s c #34e6e4", +"#t c #0cbabc", +"#u c #042e2c", +"#v c #4c4e4c", +"#w c #2ccacc", +"#x c #2c2e2c", +"#y c #046e6c", +"#z c #bcfefc", +"#A c #1cbabc", +"#B c #14aaac", +"#C c #2cdadc", +"#D c #049a9c", +"#E c #042624", +"#F c #6cfefc", +"#G c #24d6d4", +"#H c #646264", +"#I c #045e5c", +"#J c #04b2b4", +"#K c #043e3c", +"#L c #3c3e3c", +"#M c #a4fefc", +"#N c #24cacc", +"#O c #047e7c", +"#P c #dcfefc", +"#Q c #1cc2c4", +"#R c #04a2a4", +"#S c #2cd2d4", +"#T c #34dedc", +"#U c #1c1e1c", +"#V c #5c5a5c", +"#W c #14b2b4", +"#X c #141614", +"#Y c #049294", +"#Z c #94fefc", +"#0 c #045654", +"#1 c #0caaac", +"#2 c #14babc", +"#3 c #043634", +"#4 c #343634", +"#5 c #6c6a6c", +"#6 c #ccfefc", +"#7 c #0cb2b4", +"#8 c #24c2c4", +"#9 c #0ca2a4", +"a. c #34d2d4", +"a# c #1ccacc", +"aa c #44f2f4", +"ab c #14c2c4", +"ac c #047674", +"ad c #046664", +"ae c #044644", +"af c #444644", +"ag c #242624", +"ah c #54fefc", +/* pixels */ +".i.X.k#U.X#v.z.L#X.Oag.z.4.k.9#X.9#x...k.z#4.z.4#x#U.9.9#4ag#x.9.zaf#v#x#a.9.L#Uag...zaf#v.k.9.L", +"af#X.9#v#U.i.9#U.L#x.i.k.kagaf#U.4.k#x#x#U.L#U#x.4#a.zag#U.X.L#4#L.k.X.z.L#4#U.O#x#L.i.i#4ag.9af", +".X.X#m.z#X.4#4#U.kaf.v#4#X.9.i#X#5#L.z.Xag.k.L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x.X#4#x#U.X.9.9.M.M#a.i.9ag#a.Xag.9#U.O#U", +"ag#X.X.Xagag.X#4.L.X#a.X.4af.k.L#L.M.M#L#x.L#U.L#4.X.O#X#X.4#U.L.kagag.9af#a#x#U.9#Uag.i.i.X.9#X", +".X.k#U.L#4.z.X.L#U#xaf.4.L#5#L#U.4#a#a.i#4.O#X#4agag.L#L#x#U.k.9.M#L.X#m.X#a.4ag.L#a#v#v.i.4.X.k", +".k#U.i.z.z#mag#x.M.X#4.i#4#x#U#X.k.O.zag.L#X.z#H.4.4.X.O.4.9.z#4#L#Vaf#L.zaf#L.z#X.v#aaf.9#4#x#U" +}; diff --git a/kblackbox/pics/done.xpm b/kblackbox/pics/done.xpm new file mode 100644 index 00000000..218de4e2 --- /dev/null +++ b/kblackbox/pics/done.xpm @@ -0,0 +1,33 @@ +/* XPM */ +static char * done_xpm[] = { +"26 26 4 1", +" c None", +". c #000000000000", +"X c #C71B9E799E79", +"o c #861786178617", +" ", +" ", +" ", +" .. ", +" .X. ", +" .Xo. ", +" .Xo. ", +" .XX. ", +" .XX. ", +" .XX. ", +" ..XX. ", +" ......XXX. ", +" .XXX.XoXXXX. ", +" .XXXX.XoXXXXX. ", +" .....XXoXXXXXX...... ", +" .XXXX.XoXXXXXXoXXXX. ", +" .XXXX.XXoXXXXoXXXXX. ", +" .....XXXXooooXXXoXX. ", +" .XXXX.XXXXXXXXXoXXX. ", +" .XXXX.XXoXXXXXoXXX. ", +" .....XXoXXXX....... ", +" .XXXX.XoXX.. ", +" ......... ", +" ", +" ", +" "}; diff --git a/kblackbox/pics/giveup.xpm b/kblackbox/pics/giveup.xpm new file mode 100644 index 00000000..4c67802a --- /dev/null +++ b/kblackbox/pics/giveup.xpm @@ -0,0 +1,28 @@ +/* XPM */ +static char * giveup_xpm[] = { +"22 21 4 1", +" c None", +". c #000000000000", +"X c #B6DA8E388617", +"o c #FFFFFFFFFFFF", +" ", +" .. ", +" .X.... ", +" .XX.ooo. ", +" .X.ooooo. ", +" .X.oooooo... ", +" .XX.ooooooooo. ", +" .X.ooooooooooo. ", +" .X.oooooooooooo. ", +" .XX.oooooooooooo. ", +" .X. ....oooooooo. ", +" .X. .ooooooo. ", +" .X. .ooooo. ", +" .XX. ...oo. ", +" .X. .o. ", +" .X. . ", +" .XX. ", +" .X. ", +" .. ", +" ", +" "}; diff --git a/kblackbox/pics/gray.xpm b/kblackbox/pics/gray.xpm new file mode 100644 index 00000000..913b3afc --- /dev/null +++ b/kblackbox/pics/gray.xpm @@ -0,0 +1,150 @@ +/* XPM */ +static char *gray[] = { +/* width height num_colors chars_per_pixel */ +" 48 48 95 2", +/* colors */ +".. c #070707", +".# c #080808", +".a c #090909", +".b c #0a0a0a", +".c c #0b0b0b", +".d c #0c0c0c", +".e c #0d0d0d", +".f c #0e0e0e", +".g c #0f0f0f", +".h c #101010", +".i c #111111", +".j c #121212", +".k c #131313", +".l c #141414", +".m c #151515", +".n c #161616", +".o c #171717", +".p c #181818", +".q c #191919", +".r c #1a1a1a", +".s c #1b1b1b", +".t c #1c1c1c", +".u c #1d1d1d", +".v c #1e1e1e", +".w c #1f1f1f", +".x c #202020", +".y c #212121", +".z c #222222", +".A c #232323", +".B c #242424", +".C c #252525", +".D c #262626", +".E c #272727", +".F c #282828", +".G c #292929", +".H c #2a2a2a", +".I c #2b2b2b", +".J c #2c2c2c", +".K c #2d2d2d", +".L c #2e2e2e", +".M c #2f2f2f", +".N c #303030", +".O c #313131", +".P c #323232", +".Q c #333333", +".R c #343434", +".S c #353535", +".T c #363636", +".U c #373737", +".V c #383838", +".W c #393939", +".X c #3a3a3a", +".Y c #3b3b3b", +".Z c #3c3c3c", +".0 c #3d3d3d", +".1 c #3e3e3e", +".2 c #3f3f3f", +".3 c #404040", +".4 c #414141", +".5 c #424242", +".6 c #434343", +".7 c #444444", +".8 c #454545", +".9 c #464646", +"#. c #474747", +"## c #484848", +"#a c #494949", +"#b c #4a4a4a", +"#c c #4b4b4b", +"#d c #4c4c4c", +"#e c #4d4d4d", +"#f c #4e4e4e", +"#g c #4f4f4f", +"#h c #505050", +"#i c #515151", +"#j c #525252", +"#k c #535353", +"#l c #545454", +"#m c #555555", +"#n c #565656", +"#o c #575757", +"#p c #585858", +"#q c #595959", +"#r c #5a5a5a", +"#s c #5b5b5b", +"#t c #5c5c5c", +"#u c #5d5d5d", +"#v c #5e5e5e", +"#w c #5f5f5f", +"#x c #606060", +"#y c #616161", +"#z c #626262", +"#A c #636363", +"#B c #646464", +"#C c #696969", +/* pixels */ +"#c.P.H.t.R#d.Y.r.p.j.D.X.5.I.z.n.x.N.b.F.Z.S.X.4.N.u.z.y.V.A.K.B.V.9#f.K#g.z.s.u.C.c.V#a#f.H.z.r", +".7.n.B#f.u#b.z.s.s.J#a.I.I.B.9.w.6.H.M.L.w.o.w.O.5#j.W.D.v.O.r.S.2.I.N.X.r.W.u.k.J.4#c#b.Q.G.y##", +".N.R.f.V.q.6.R.v.G.8#y.R.l.z#c.l#C.2.U.O.D.J.q.j.E#c#u.9.y.o.n.s.w.M.f.B.W#i.4.M.K.N.8#b.r.D.j.M", +".x.X.t.L.S.M.V.x.8#y#A#i.K.R.w.T#w.P.8.t.n.w.6.y.y.Q#g.6.q.o.J.T#.##.l.a#m.9#n.w.g.w.A.W.G.W.E.u", +".3.z.Q.S#b.w.g.o.2.Q.P.4.Q.q.M.K.u.0.2.L.y.u.J.E.2.J.P.E.o.G.Y.z.O.S.e.J#s#b.M.s.m.F.L.R.T.2.Q.v", +".8.n#j.4.C.3.A.s.E.B.B.T.v.C.r.x.C#t#l#i.e.x.o.o.Y.W.Q.E.G.Y.Y.D.w.C.n.1#d##.H.l.G.O.H.u.I.6.z.I", +"##.I#h#e.O#j.R.w.J.A.C.L.T#g.1.y.K.s.M#r.7.E.t.L.X.U.C.h#..1.A.Y#a.t.M#b#q.W.X.x.q.I.L.0.s.p.L#n", +"#d.i#j#i.v#d.Y.I.t.x#h.Z.T#b##.w.9#d.k.Z.E.P.q.5.S.B.s.6.1.l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@@ -0,0 +1,218 @@ +/* XPM */ +static char *green[] = { +/* width height num_colors chars_per_pixel */ +" 48 48 163 2", +/* colors */ +".. c #040204", +".# c #047e04", +".a c #14be14", +".b c #044204", +".c c #7c7e7c", +".d c #049e04", +".e c #2cde2c", +".f c #1cce1c", +".g c #0cae0c", +".h c #444244", +".i c #042204", +".j c #048e04", +".k c #3cee3c", +".l c #2cbe2c", +".m c #046204", +".n c #149e14", +".o c #34ce34", +".p c #1cae1c", +".q c #242224", +".r c #646264", +".s c #3cde3c", +".t c #049604", +".u c #041a04", +".v c #14c614", +".w c #24d624", +".x c #048604", +".y c #045204", +".z c #04a604", +".A c #0cb60c", +".B c #545254", +".C c #043204", +".D c #047204", +".E c #14a614", +".F c #1cb61c", +".G c #343234", +".H c #34d634", +".I c #747274", +".J c #3ce63c", +".K c #24be24", +".L c #34e634", +".M c #148e14", +".N c #4cee4c", +".O c #2cc62c", +".P c #149614", +".Q c #141214", +".R c #8c8a8c", +".S c #2cce2c", +".T c #0c0a0c", +".U c #0c7e0c", +".V c #1cbe1c", +".W c #044a04", +".X c #0c9e0c", +".Y c #34de34", +".Z c #14ae14", +".0 c #4c4a4c", +".1 c #042a04", +".2 c #0c8e0c", +".3 c #046a04", +".4 c #1c9e1c", +".5 c #24ae24", +".6 c #2c2a2c", +".7 c #6c6a6c", +".8 c #0c960c", +".9 c #24c624", +"#. c #2cd62c", +"## c #0c860c", +"#a c #045a04", +"#b c #0ca60c", +"#c c #14b614", +"#d c #5c5a5c", +"#e c #043a04", +"#f c #047a04", +"#g c #1ca61c", +"#h c #24b624", +"#i c #3c3a3c", +"#j c #3cd63c", +"#k c #44e644", +"#l c #34c634", +"#m c #1c1a1c", +"#n c #848684", +"#o c #24ce24", +"#p c #44ee44", +"#q c #3cd23c", +"#r c #44e244", +"#s c #1cc61c", +"#t c #7c7a7c", +"#u c #4cf64c", +"#v c #040604", +"#w c #048204", +"#x c #14c214", +"#y c #044604", +"#z c #848284", +"#A c #04a204", +"#B c #2ce22c", +"#C c #0cb20c", +"#D c #444644", +"#E c #042604", +"#F c #049204", +"#G c #2cc22c", +"#H c #046604", +"#I c #14a214", +"#J c #34d234", +"#K c #1cb21c", +"#L c #242624", +"#M c #646664", +"#N c #3ce23c", +"#O c #049a04", +"#P c #041e04", +"#Q c #24da24", +"#R c #048a04", +"#S c #045604", +"#T c #04aa04", +"#U c #0cba0c", +"#V c #545654", +"#W c #043604", +"#X c #047604", +"#Y c #14aa14", +"#Z c #1cba1c", +"#0 c #343634", +"#1 c #34da34", +"#2 c #747674", +"#3 c #3cea3c", +"#4 c #24c224", +"#5 c #34ea34", +"#6 c #149214", +"#7 c #2cca2c", +"#8 c #149a14", +"#9 c #141614", +"a. c #0c7a0c", +"a# c #8c8e8c", +"aa c #2cd22c", +"ab c #0c0e0c", +"ac c #0c820c", +"ad c #1cc21c", +"ae c #044e04", +"af c #0ca20c", +"ag c #34e234", +"ah c #4c4e4c", +"ai c #042e04", +"aj c #0c920c", +"ak c #046e04", +"al c #1ca21c", +"am c #24b224", +"an c #2c2e2c", +"ao c #6c6e6c", +"ap c #0c9a0c", +"aq c #2cda2c", +"ar c #0c8a0c", +"as c #045e04", +"at c #0caa0c", +"au c #14ba14", +"av c #5c5e5c", +"aw c #043e04", +"ax c #1caa1c", +"ay c #24ba24", +"az c #3c3e3c", +"aA c #3cda3c", +"aB c #44ea44", +"aC c #34ca34", +"aD c #1c1e1c", +"aE c #24d224", +"aF c #44f244", +"aG c #1cca1c", +/* pixels */ +"#i#M.G#L#Laoa#.0.Ban#maz.G.raoaoaz.q#D#D#0.B#M.q.q#0.Gan.0aD.6.7ah.r#Dah#D.q#9.h#Lah#D.B#ianaz.G", +".Bab#0#m#m#L.0.6abanah.6azah.B.qan.0.caz.6#i.c#V.h.7#D#Van#Laz#0.0#0.G.B#V.7#0.G#maD.6.G.0#D.h.q", +"#V#i.0.B.hazanah#L.r.0anaz.B#L.B.Q#i.Q#d.q#L.Rahanaz.q.0#i.6#V#iao.r#L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ban.I#t.G#0ahao.0.0.0#i#9.6#iav.c#D.0", +"#Lan.0.6.Ban.q#man.0#0#t#i.q#V.0#2#dan#D.G.q.qan#mav.0.0#L#L#L.R#V#L#M.G.B#i.G#L.G#m#0.G#D.0ah.q" +}; diff --git a/kblackbox/pics/green2.xpm b/kblackbox/pics/green2.xpm new file mode 100644 index 00000000..92ef2acb --- /dev/null +++ b/kblackbox/pics/green2.xpm @@ -0,0 +1,300 @@ +/* XPM */ +static char *green2[] = { +/* width height num_colors chars_per_pixel */ +" 48 48 245 2", +/* colors */ +".. c #040204", +".# c #3cc23c", +".a c #044204", +".b c #848284", +".c c #444244", +".d c #2ca22c", +".e c #0c620c", +".f c #8cc68c", +".g c #4ce24c", +".h c #448244", +".i c #2c622c", +".j c #045604", +".k c #042204", +".l c #249224", +".m c #6ca66c", +".n c #147214", +".o c #449244", +".p c #44d244", +".q c #242224", +".r c #34b234", +".s c #447244", +".t c #2c722c", +".u c #2c822c", +".v c #a4a2a4", +".w c #1c521c", +".x c #54b254", +".y c #1c421c", +".z c #5cf65c", +".A c #043204", +".B c #5c925c", +".C c #1c621c", +".D c #5cc25c", +".E c #3ca23c", +".F c #94e294", +".G c #84d284", +".H c #349234", +".I c #6cb66c", +".J c #646264", +".K c #147a14", +".L c #2c7a2c", +".M c #2c8a2c", +".N c #044a04", +".O c #5ce25c", +".P c #449e44", +".Q c #54d254", +".R c #043a04", +".S c #44ca44", +".T c #448a44", +".U c #5ca25c", +".V c #7cc27c", +".W c #1c5a1c", +".X c #041a04", +".Y c #8c8a8c", +".Z c #2c6a2c", +".0 c #0c5a0c", +".1 c #3cba3c", +".2 c #7cb67c", +".3 c #1c8e1c", +".4 c #545254", +".5 c #2caa2c", +".6 c #343234", +".7 c #1c6a1c", +".8 c #747274", +".9 c #0c6a0c", +"#. c #c4c2c4", +"## c #249a24", +"#a c #b4b3b4", +"#b c #5ceb5c", +"#c c #54dc54", +"#d c #5cae5c", +"#e c #4cc34c", +"#f c #144414", +"#g c #042c04", +"#h c #247524", +"#i c #549354", +"#j c #44b544", +"#k c #7cfe7c", +"#l c #3c753c", +"#m c #3c833c", +"#n c #1c4d1c", +"#o c #5c9c5c", +"#p c #3cad3c", +"#q c #8cfe8c", +"#r c #349d34", +"#s c #247c24", +"#t c #3c7d3c", +"#u c #3c8c3c", +"#v c #143b14", +"#w c #548c54", +"#x c #7ccc7c", +"#y c #2c5d2c", +"#z c #141514", +"#A c #949694", +"#B c #248424", +"#C c #8cde8c", +"#D c #145514", +"#E c #447d44", +"#F c #64b464", +"#G c #143614", +"#H c #144b14", +"#I c #549d54", +"#J c #3c6e3c", +"#K c #7cbe7c", +"#L c #a4fea4", +"#M c #44c444", +"#N c #0c440c", +"#O c #4c4c4c", +"#P c #34a334", +"#Q c #146314", +"#R c #54ee54", +"#S c #4c854c", +"#T c #346434", +"#U c #6cce6c", +"#V c #2c942c", +"#W c #6cb26c", +"#X c #1c741c", +"#Y c #4c944c", +"#Z c #4cda4c", +"#0 c #2c2c2c", +"#1 c #3cb43c", +"#2 c #6cfe6c", +"#3 c #347434", +"#4 c #348334", +"#5 c #6c9e6c", +"#6 c #0c0d0c", +"#7 c #4cae4c", +"#8 c #acacac", +"#9 c #54cd54", +"a. c #6c6c6c", +"a# c #5c5c5c", +"aa c #3c3c3c", +"ab c #7c7c7c", +"ac c #1c1c1c", +"ad c #9cfe9c", +"ae c #74be74", +"af c #949294", +"ag c #cccacc", +"ah c #bcbabc", +"ai c #9c9e9c", +"aj c #8cce8c", +"ak c #84da84", +"al c #1c851c", +"am c #54e554", +"an c #0c540c", +"ao c #4cd34c", +"ap c #245324", +"aq c #5cb25c", +"ar c #64f364", +"as c #0c340c", +"at c #246424", +"au c #44a244", +"av c #74b874", +"aw c #1c7c1c", +"ax c #347c34", +"ay c #348c34", +"az c #0c4c0c", +"aA c #64e264", +"aB c #4c9b4c", +"aC c #0c3c0c", +"aD c #4ccc4c", +"aE c #4c8d4c", +"aF c #64a364", +"aG c #84c684", +"aH c #245c24", +"aI c #346c34", +"aJ c #145c14", +"aK c #44bb44", +"aL c #84ba84", +"aM c #248c24", +"aN c #34ac34", +"aO c #64bc64", +"aP c #246c24", +"aQ c #146c14", +"aR c #2c9c2c", +"aS c #64ee64", +"aT c #5cdc5c", +"aU c #64ac64", +"aV c #0c2d0c", +"aW c #244b24", +"aX c #64fc64", +"aY c #649d64", +"aZ c #44aa44", +"a0 c #3c9d3c", +"a1 c #84ce84", +"a2 c #9c9a9c", +"a3 c #4c7e4c", +"a4 c #74ae74", +"a5 c #5cca5c", +"a6 c #54a254", +"a7 c #3c923c", +"a8 c #84fe84", +"a9 c #94fe94", +"b. c #94de94", +"b# c #acfeac", +"ba c #74ce74", +"bb c #74fe74", +"bc c #3cc63c", +"bd c #044604", +"be c #848684", +"bf c #444644", +"bg c #2ca62c", +"bh c #0c660c", +"bi c #8cca8c", +"bj c #448644", +"bk c #2c662c", +"bl c #042604", +"bm c #249624", +"bn c #6caa6c", +"bo c #147614", +"bp c #449644", +"bq c #242624", +"br c #34b634", +"bs c #6cfa6c", +"bt c #2c762c", +"bu c #2c862c", +"bv c #a4a6a4", +"bw c #1c561c", +"bx c #54b654", +"by c #1c461c", +"bz c #043604", +"bA c #5c965c", +"bB c #1c661c", +"bC c #84d684", +"bD c #646664", +"bE c #147e14", +"bF c #2c7e2c", +"bG c #2c8e2c", +"bH c #5ce65c", +"bI c #54d654", +"bJ c #043e04", +"bK c #44ce44", +"bL c #448e44", +"bM c #5ca65c", +"bN c #7cc67c", +"bO c #1c5e1c", +"bP c #041e04", +"bQ c #8c8e8c", +"bR c #2c6e2c", +"bS c #0c5e0c", +"bT c #7cba7c", +"bU c #545654", +"bV c #2cae2c", +"bW c #343634", +"bX c #1c6e1c", +"bY c #747674", +/* pixels */ +".4af.cbWbWa2agbD.8aabqbU.cbea2#AbU#0a#a##Oa..Y#0#0#Oaaaa.JbqaabQa..b.JbDa#.6acbU.6bDa#a..4aabUbf", +"bY#z#ObqbqaabDaa#z.ca.aaa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cbUaa#0bUaaa..bbWa2.8aaaa.4aabUaa.qa#.baaab.qbUbebD#AbD.cbebf.bbU.4a.bfac.c", +"bf#Aa.#8bv#0aabD.4aa.c#0bU#O.b#ObUbYbfa#bW#O.c#O#0a.#0abaaah.8#ObU.Jaa.4bY#A#aabbUbYbqbq#z.c.6.8", +"afa#af.bbYabbD#Obq.c#0bU.c#6bY#Oaf#Aab#0bQ.cbfaaa.bQ.Ya#bfbY.cai#8bf#Oa.a2a.bDbD.4.qaa.4.Y#8bDa.", +"aa.ca..cbY.c.6#0bfbD.4#a.4.6aba.bv.b.c.Jbf.6#0.cbq.ba.a.bW.6bW#.abaabQ#ObY.4#ObWbfbq#O.ca.bD.8.6" +}; diff --git a/kblackbox/pics/red.xpm b/kblackbox/pics/red.xpm new file mode 100644 index 00000000..8e96946e --- /dev/null +++ b/kblackbox/pics/red.xpm @@ -0,0 +1,202 @@ +/* XPM */ +static char *red[] = { +/* width height num_colors chars_per_pixel */ +" 48 48 147 2", +/* colors */ +".. c #0c0a0c", +".# c #fc7674", +".a c #8c0204", +".b c #dc3e3c", +".c c #3c3a3c", +".d c #ac1614", +".e c #fcaeac", +".f c #c42a2c", +".g c #4c0204", +".h c #ac0204", +".i c #fc5a5c", +".j c #1c1e1c", +".k c #f44e4c", +".l c #dc2e2c", +".m c #fc9294", +".n c #fccacc", +".o c #9c0e0c", +".p c #545654", +".q c #ec3e3c", +".r c #c41e1c", +".s c #2c0204", +".t c #ac0e0c", +".u c #9c0204", +".v c #bc2224", +".w c #6c0204", +".x c #dc3634", +".y c #ec4644", +".z c #d42224", +".A c #141214", +".B c #fc8684", +".C c #4c4a4c", +".D c #bc1614", +".E c #fcbebc", +".F c #fc6a6c", +".G c #2c2e2c", +".H c #fca2a4", +".I c #fcdadc", +".J c #646264", +".K c #c42624", +".L c #bc0e0c", +".M c #9c0a0c", +".N c #d42a2c", +".O c #ac0a0c", +".P c #ec3a3c", +".Q c #1c0204", +".R c #fc7e7c", +".S c #940204", +".T c #e44644", +".U c #c41a1c", +".V c #444244", +".W c #b41e1c", +".X c #fcb6b4", +".Y c #5c0204", +".Z c #fc6264", +".0 c #242624", +".1 c #fc5654", +".2 c #fc9a9c", +".3 c #fcd2d4", +".4 c #f43e3c", +".5 c #cc1e1c", +".6 c #3c0204", +".7 c #b40e0c", +".8 c #a40204", +".9 c #7c0204", +"#. c #e43634", +"## c #f44644", +"#a c #e43e3c", +"#b c #b41614", +"#c c #cc2a2c", +"#d c #b40604", +"#e c #fc4e4c", +"#f c #e43234", +"#g c #a40e0c", +"#h c #5c5e5c", +"#i c #d43234", +"#j c #1c1a1c", +"#k c #fc8e8c", +"#l c #545254", +"#m c #bc1e1c", +"#n c #fcc6c4", +"#o c #fc7274", +"#p c #343634", +"#q c #fcaaac", +"#r c #fce2e4", +"#s c #6c6a6c", +"#t c #0c0e0c", +"#u c #fc7a7c", +"#v c #8c0604", +"#w c #c41614", +"#x c #3c3e3c", +"#y c #540204", +"#z c #ac0604", +"#A c #fc5e5c", +"#B c #242224", +"#C c #f45254", +"#D c #dc3234", +"#E c #fc9694", +"#F c #fccecc", +"#G c #5c5a5c", +"#H c #ec4244", +"#I c #c42224", +"#J c #340204", +"#K c #ac1214", +"#L c #9c0604", +"#M c #740204", +"#N c #dc3a3c", +"#O c #ec4a4c", +"#P c #d42624", +"#Q c #141614", +"#R c #fc8a8c", +"#S c #4c4e4c", +"#T c #bc1a1c", +"#U c #fcc2c4", +"#V c #fc6e6c", +"#W c #343234", +"#X c #fca6a4", +"#Y c #fcdedc", +"#Z c #646664", +"#0 c #cc2624", +"#1 c #bc1214", +"#2 c #a40a0c", +"#3 c #d42e2c", +"#4 c #b40a0c", +"#5 c #240204", +"#6 c #fc8284", +"#7 c #2c2a2c", +"#8 c #cc1a1c", +"#9 c #640204", +"a. c #440204", +"a# c #840204", +"aa c #fcbabc", +"ab c #f44244", +"ac c #cc2224", +"ad c #b41214", +"ae c #e43a3c", +"af c #f44a4c", +"ag c #e44244", +"ah c #b41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.0#5.s.6a..Y.Y#9.w.w.w.Y#y.g#y.g.g.g#y.g#Ma#.Y.ga.#J.C#p#7.C#p#x.0#7ak.p.0", +"#S#p#Q#W.0#Q.A.A.0#Q#j.c#G.J#5.6.g#y#y.Ya.a..g.Y#y.Y.Y#y#y.ga..w#9a.#J.V#W#W#S.pak#Q.c.c.0#l.C#S", +".c.G#B.j#x#p#7#Q#7#p#W#t.cak#W#7#Ja.#J#J#J.6a.#9.w.Y.g#y.g.6.Y.g.6#Q#7.j#B.0.c.p.C#B#S#W.jak.p.V", +"#B#t#S.C.0.A#7.V.G.0#7#x.0.A#7.c#x#B#5.Q#J.g#J.6.g.6a..6#J.6#J#B#W#B#p#l.V.V.G.V#j.c.c.G.j.0#pak", +"#j#7#B.j#B.0.j#S.c.j#W.A#p#p.0.G#B#G.J#7.A.0.G...G#j#W.G#W.c#7.j#W#B#B.p.p#l#S#B.0#l#W.0#B.j.A.j", +".0#Q#W#W.0#7#W#p#j#W#l#W.Vak#7#j#x.p#l.V.G#j.j#j#W#W#Q#Q#Q#x#j.j.0.0.0#Bak#l.G.j#B.j.0.C.C#W#B#Q", +"#W#7.j#j#W.c#W#j.j.Gak.V#j#Z.V#j.V#l#lak#p.A#Q.c.0.0#j#x#W.j#7.0.p.V.G#t#W#l.V.0#j#l#S#S.C.V#W#7", +"#7.j.C.c#x#t.0.G.p#W#pak.c.G.j#Q#7.A#x.0#j#Q.c#hak#x#W.A#x#B.c#p#x#G.C#x#p.C#x.c#Q#h#lak#B#p.G.j" +}; diff --git a/kblackbox/pics/white.xpm b/kblackbox/pics/white.xpm new file mode 100644 index 00000000..06c38cec --- /dev/null +++ b/kblackbox/pics/white.xpm @@ -0,0 +1,100 @@ +/* XPM */ +static char *white[] = { +/* width height num_colors chars_per_pixel */ +" 48 48 45 1", +/* colors */ +". c #9e9e9e", +"# c #9f9f9f", +"a c #a0a0a0", +"b c #a1a1a1", +"c c #a2a2a2", +"d c #a3a3a3", +"e c #a4a4a4", +"f c #a5a5a5", +"g c #a6a6a6", +"h c #a7a7a7", +"i c #a8a8a8", +"j c #a9a9a9", +"k c #aaaaaa", +"l c #ababab", +"m c #acacac", +"n c #adadad", +"o c #aeaeae", +"p c #afafaf", +"q c #b0b0b0", +"r c #b1b1b1", +"s c #b2b2b2", +"t c #b3b3b3", +"u c #b4b4b4", +"v c #b5b5b5", +"w c #b6b6b6", +"x c #b7b7b7", +"y c #b8b8b8", +"z c #b9b9b9", +"A c #bababa", +"B c #bbbbbb", +"C c #bcbcbc", +"D c #bdbdbd", +"E c #bebebe", +"F c #bfbfbf", +"G c #c0c0c0", +"H c #c1c1c1", +"I c #c2c2c2", +"J c #c3c3c3", +"K c #c4c4c4", +"L c #c5c5c5", +"M c #c6c6c6", +"N c #c7c7c7", +"O c #c8c8c8", +"P c #c9c9c9", +"Q c #cacaca", +/* pixels */ +".aefbgjl.jtledrehhigdfkmrnehqkoffilj#ehrgefdaecd", +"abgmennigjiiichejkkyJnpglnkprkpsIFGrmcmptrleacc.", +"edcbkCtGCing#mIHINLLHLHjgGKNIILADIGJGCangjxFxumw", +"srlxyzHzFxIAGFLLGKJIJHILNLLIMFFIFJJDFFyDxptxzxqn", +"mwopxAwCzCyLFGDNLMNEFILOMOKFIxGIGLGBKIDFHysqutzi", +"usnEExCGEyGMuDHilsirFMMCyKGFIDxsBNJECEBDIzxptumu", +"qwyykvgonihhpoptsssvqltvurwNIFGtqkJFICDCDgdjgios", +"if#ilefjiehojprpxquqjvvuxstkrCBxBsrhrljmrtqljfpf", +"iebkjjqfmkrwztsvqxwrGtsuuxyutqotvjnmgiiipslndidi", +"fcptmgpBpvGJyzCyFCwBDrmppyqpnkovposormdilkuomwnd", +"vAtmtDDyEBMGCGAuBGMMHONMPMkINNMMKNHFJBFFmBurxqAw", +"uDwtuCBGADJzwJJLKONNNPPPOOMNPNPKLMLNGJJGDxEmwtBp", +"rFwGyyFxHDDJAHEMNPNNPPNNOOKNOPNIPMKKHHKLAGwuyEsv", +"xArkjvzyrzvGDIIFHLHMPPOPNPuunwuzqOKJIAIKIwtCDlvu", +"mrnwtusxqDvuwuuwltuxDmwGxtFxFCyvCtBBowilzJxuBktp", +"jpivtAuACsDCBHEFvBzwwxBDvyFIGzEEBCzvzDnfnmwAsqyv", +"msmxoryqtvywEutuyBCHFCFDGCyNNLHzzxDACwvtklhqmtso", +"wpklzBAFCxDEttJKMJMOPMMMQOQQPLNCECzzCABCGsrnrprl", +"tDyxvwxFyAEEFJKCOJFONNNPOQPQOOQOLGHGHBwIJKAEAlyt", +"mCAvvvDJwsACHJPGMNFMLNPOQOPNNOPPKDxEExHIJCFHvirw", +"uwsvyuAFxwCJEJKIKLHJLMQNQLDMINPGEvHJFHIIFHuDupnm", +"xtxxCvszAGDAEHIDKHGMNQNNONIIFJPJBJNEHFvEzxvHxtpv", +"sBBvruxpsGwKEELDHMNDGyyGIHKIBGHGILKFBuGzAAntzsBx", +"twyxlqCqIAKKvEDJIKEKFJIIMOJINELJKIOHstyJyEynryBw", +"rslylqqsFGLExGzHKHMCMKPPIONMMGDJDMIJKuABBptzzsBy", +"yqnprxCzutGMBEDCFJINIIKIIQJGEwwQHNHGCsrrDHFrzovf", +"tqjrtvAzyoAFMEDEEGMNNLCDDHDEJCECEEuDzAxDzzuqpnmj", +"oskqzyGwutuvEDDHuKGINJKDEEBGEEHDACvxzyBysCrqrwlo", +"tBvumruxDpzBFKyAwFNMFBPPOQHNPNIFBvIHByECJyAqyvpw", +"uEDCzBvByKJyEEIKJCGMJLOPPQPOQOIIFPJIGGExFEyCtArv", +"rtCAAxAEJECGzNKIMMLLJQPPOOOONKPFKIPMIEBFDJHEBxuw", +"xsHGxxxFAyxAKOKDPPNKIKLQLJOOPLPNLHALOyHFEJzEBzqz", +"ghkeDtsyHKruqMMJDwNyrEPPOMPFAIEwrBwoJJEIzuppsxrq", +"hmpkkhsolrsvsDywwGxzFHzDoCGFyAAmrxoErAxuvslyvskq", +"igkjkntygplnwrwABGvHzIvssytusDuAwqAzuyrshnlAtowg", +"qqouloxxywlgpBvzEFABBwwspxzuomqyPJxupgxrvpmvojnh", +"vwikzgwCEEFHMgitruxuszNPNOqrPKLOKJKGJGxpspCztwoh", +"yDwirCtzAJNJLMKMNMJJOOONNKOKMONLNLFJGEDGEFFttptr", +"uByvvAvzyDKHLHKKOHOKNLNPPJPMJFNJJIEILHAGEDxAwozz", +"vpwxssvznoIJKIFGELINNFJMEHNOLMMOJHHBjpGwDCzsuwBy", +"#avzxjqixhkmjJGBkhmrttqyvxqxxLrvvqlmioqsxxDBvyuu", +"phghddtolkmkilpqmyjtqtnnBsswDqvrswhgttmrqqvpjhdc", +"hdffkporpwskmupqfjshwsuugppuxkkpikmkhmmlgnjeejc.", +"dceelgkkvtjllqqrhtslnnniedke#ekorefeIzkgblcdhdgd", +"nvxBxglcnifGqdhFHMHLHIIJHDljmipKHKGEzzzEuhbg#wsy", +"ouwuwzqEDEyFEADAwFHIJNEFzIFJIGJICCEzBDFswpAwEvDw", +"osuIzFuECvDADBHGGJIJIJKDFKIGGHExCCJxzDBwstCyFEwr", +"tpvjzBtvCABHFEDEGBoHfeiILILLGKGAEHGyClgcBwGFuuie" +}; diff --git a/kblackbox/util.cpp b/kblackbox/util.cpp new file mode 100644 index 00000000..7282fe41 --- /dev/null +++ b/kblackbox/util.cpp @@ -0,0 +1,68 @@ +// +// +// KBlackBox +// +// A simple game inspired by an emacs module +// +// File: util.cpp +// +// The implementation of the RectOnArray class +// + +#include "util.h" + +RectOnArray::RectOnArray( int newWidth, int newHeight ) +{ + w = newWidth; + h = newHeight; + array = new ArrayType[w*h]; +} + +RectOnArray::~RectOnArray() +{ + delete[] array; +} + +/* + Size info... +*/ + +int RectOnArray::width() { return w; } +int RectOnArray::height() { return h; } + +/* + Utility function for mapping from 2D table to 1D array +*/ + +int RectOnArray::indexOf( int col, int row ) const +{ + return (row * w) + col; +} + +/* + Return content of cell +*/ + +ArrayType RectOnArray::get( int col, int row ) +{ + return array[indexOf( col, row )]; +} + +/* + Set content of cell +*/ + +void RectOnArray::set( int col, int row, ArrayType type ) +{ + array[indexOf( col, row )] = type; +} + +/* + Fill all cells witj type +*/ + +void RectOnArray::fill( ArrayType type ) +{ + int i; + for (i = 0; i < w*h; i++) array[i] = type; +} diff --git a/kblackbox/util.h b/kblackbox/util.h new file mode 100644 index 00000000..9effb880 --- /dev/null +++ b/kblackbox/util.h @@ -0,0 +1,42 @@ +// +// +// KBlackBox +// +// A simple game inspired by an emacs module +// +// File: util.h +// +// The definition of the RectOnArray class +// + +#ifndef UTIL_H +#define UTIL_H + +/* + This is used for gameBoard and graphicBoard fields +*/ + +#define ArrayType int + +class RectOnArray +{ +public: + RectOnArray( int w, int h ); + ~RectOnArray(); + + int get( int col, int row ); + void set( int col, int row, ArrayType type ); + void fill( ArrayType type ); + + int width(); + int height(); + +private: + int indexOf( int col, int row ) const; + + int w; + int h; + ArrayType *array; +}; + +#endif // UTIL_H diff --git a/kblackbox/version.h b/kblackbox/version.h new file mode 100644 index 00000000..f959cc8c --- /dev/null +++ b/kblackbox/version.h @@ -0,0 +1 @@ +#define KBVERSION "0.3.0" |