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 --- ksmiletris/COPYRIGHT | 22 ++ ksmiletris/Makefile.am | 21 ++ ksmiletris/README | 1 + ksmiletris/data/Makefile.am | 16 ++ ksmiletris/data/bg1.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg10.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg11.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg12.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg13.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg14.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg15.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg16.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg2.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg3.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg4.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg5.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg6.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg7.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg8.bmp | Bin 0 -> 3126 bytes ksmiletris/data/bg9.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-a1.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-a2.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-a3.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-a4.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-a5.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-a6.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-a7.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-a8.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-b1.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-b2.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-b3.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-b4.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-b5.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-b6.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-b7.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-b8.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-c1.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-c2.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-c3.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-c4.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-c5.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-c6.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-c7.bmp | Bin 0 -> 3126 bytes ksmiletris/data/block-c8.bmp | Bin 0 -> 3126 bytes ksmiletris/data/broken-mask.bmp | Bin 0 -> 3126 bytes ksmiletris/data/broken.bmp | Bin 0 -> 3126 bytes ksmiletris/data/cleared-a.bmp | Bin 0 -> 3126 bytes ksmiletris/data/cleared-b.bmp | Bin 0 -> 3126 bytes ksmiletris/data/cleared-c.bmp | Bin 0 -> 3126 bytes ksmiletris/data/pause.bmp | Bin 0 -> 41094 bytes ksmiletris/gamewidget.cpp | 518 ++++++++++++++++++++++++++++++++++++ ksmiletris/gamewidget.h | 112 ++++++++ ksmiletris/gamewindow.cpp | 204 ++++++++++++++ ksmiletris/gamewindow.h | 63 +++++ ksmiletris/hi128-app-ksmiletris.png | Bin 0 -> 13287 bytes ksmiletris/hi16-app-ksmiletris.png | Bin 0 -> 877 bytes ksmiletris/hi22-app-ksmiletris.png | Bin 0 -> 1605 bytes ksmiletris/hi32-app-ksmiletris.png | Bin 0 -> 2224 bytes ksmiletris/hi48-app-ksmiletris.png | Bin 0 -> 4225 bytes ksmiletris/hi64-app-ksmiletris.png | Bin 0 -> 6172 bytes ksmiletris/ksmiletris.desktop | 78 ++++++ ksmiletris/ksmiletris.h | 86 ++++++ ksmiletris/ksmiletrisui.rc | 12 + ksmiletris/main.cpp | 53 ++++ ksmiletris/mirrorwidget.cpp | 58 ++++ ksmiletris/mirrorwidget.h | 49 ++++ ksmiletris/npiecewidget.cpp | 63 +++++ ksmiletris/npiecewidget.h | 49 ++++ ksmiletris/screenwidget.cpp | 68 +++++ ksmiletris/screenwidget.h | 49 ++++ ksmiletris/wav/Makefile.am | 7 + ksmiletris/wav/break.wav | Bin 0 -> 12250 bytes ksmiletris/wav/clear.wav | Bin 0 -> 18450 bytes 73 files changed, 1529 insertions(+) create mode 100644 ksmiletris/COPYRIGHT create mode 100644 ksmiletris/Makefile.am create mode 100644 ksmiletris/README create mode 100644 ksmiletris/data/Makefile.am create mode 100644 ksmiletris/data/bg1.bmp create mode 100644 ksmiletris/data/bg10.bmp create mode 100644 ksmiletris/data/bg11.bmp create mode 100644 ksmiletris/data/bg12.bmp create mode 100644 ksmiletris/data/bg13.bmp create mode 100644 ksmiletris/data/bg14.bmp create mode 100644 ksmiletris/data/bg15.bmp create mode 100644 ksmiletris/data/bg16.bmp create mode 100644 ksmiletris/data/bg2.bmp create mode 100644 ksmiletris/data/bg3.bmp create mode 100644 ksmiletris/data/bg4.bmp create mode 100644 ksmiletris/data/bg5.bmp create mode 100644 ksmiletris/data/bg6.bmp create mode 100644 ksmiletris/data/bg7.bmp create mode 100644 ksmiletris/data/bg8.bmp create mode 100644 ksmiletris/data/bg9.bmp create mode 100644 ksmiletris/data/block-a1.bmp create mode 100644 ksmiletris/data/block-a2.bmp create mode 100644 ksmiletris/data/block-a3.bmp create mode 100644 ksmiletris/data/block-a4.bmp create mode 100644 ksmiletris/data/block-a5.bmp create mode 100644 ksmiletris/data/block-a6.bmp create mode 100644 ksmiletris/data/block-a7.bmp create mode 100644 ksmiletris/data/block-a8.bmp create mode 100644 ksmiletris/data/block-b1.bmp create mode 100644 ksmiletris/data/block-b2.bmp create mode 100644 ksmiletris/data/block-b3.bmp create mode 100644 ksmiletris/data/block-b4.bmp create mode 100644 ksmiletris/data/block-b5.bmp create mode 100644 ksmiletris/data/block-b6.bmp create mode 100644 ksmiletris/data/block-b7.bmp create mode 100644 ksmiletris/data/block-b8.bmp create mode 100644 ksmiletris/data/block-c1.bmp create mode 100644 ksmiletris/data/block-c2.bmp create mode 100644 ksmiletris/data/block-c3.bmp create mode 100644 ksmiletris/data/block-c4.bmp create mode 100644 ksmiletris/data/block-c5.bmp create mode 100644 ksmiletris/data/block-c6.bmp create mode 100644 ksmiletris/data/block-c7.bmp create mode 100644 ksmiletris/data/block-c8.bmp create mode 100644 ksmiletris/data/broken-mask.bmp create mode 100644 ksmiletris/data/broken.bmp create mode 100644 ksmiletris/data/cleared-a.bmp create mode 100644 ksmiletris/data/cleared-b.bmp create mode 100644 ksmiletris/data/cleared-c.bmp create mode 100644 ksmiletris/data/pause.bmp create mode 100644 ksmiletris/gamewidget.cpp create mode 100644 ksmiletris/gamewidget.h create mode 100644 ksmiletris/gamewindow.cpp create mode 100644 ksmiletris/gamewindow.h create mode 100644 ksmiletris/hi128-app-ksmiletris.png create mode 100644 ksmiletris/hi16-app-ksmiletris.png create mode 100644 ksmiletris/hi22-app-ksmiletris.png create mode 100644 ksmiletris/hi32-app-ksmiletris.png create mode 100644 ksmiletris/hi48-app-ksmiletris.png create mode 100644 ksmiletris/hi64-app-ksmiletris.png create mode 100644 ksmiletris/ksmiletris.desktop create mode 100644 ksmiletris/ksmiletris.h create mode 100644 ksmiletris/ksmiletrisui.rc create mode 100644 ksmiletris/main.cpp create mode 100644 ksmiletris/mirrorwidget.cpp create mode 100644 ksmiletris/mirrorwidget.h create mode 100644 ksmiletris/npiecewidget.cpp create mode 100644 ksmiletris/npiecewidget.h create mode 100644 ksmiletris/screenwidget.cpp create mode 100644 ksmiletris/screenwidget.h create mode 100644 ksmiletris/wav/Makefile.am create mode 100644 ksmiletris/wav/break.wav create mode 100644 ksmiletris/wav/clear.wav (limited to 'ksmiletris') diff --git a/ksmiletris/COPYRIGHT b/ksmiletris/COPYRIGHT new file mode 100644 index 00000000..783a77c3 --- /dev/null +++ b/ksmiletris/COPYRIGHT @@ -0,0 +1,22 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ diff --git a/ksmiletris/Makefile.am b/ksmiletris/Makefile.am new file mode 100644 index 00000000..2b0c0b3e --- /dev/null +++ b/ksmiletris/Makefile.am @@ -0,0 +1,21 @@ +SUBDIRS= data wav + +INCLUDES = -I$(top_srcdir)/libkdegames -I$(top_srcdir)/libkdegames/highscore $(all_includes) +METASOURCES = AUTO + +bin_PROGRAMS = ksmiletris +ksmiletris_SOURCES = main.cpp gamewindow.cpp gamewidget.cpp \ + screenwidget.cpp mirrorwidget.cpp npiecewidget.cpp +ksmiletris_LDFLAGS = $(all_libraries) $(KDE_RPATH) +ksmiletris_LDADD = $(LIB_KDEGAMES) +ksmiletris_DEPENDENCIES = $(LIB_KDEGAMES_DEP) + +xdg_apps_DATA = ksmiletris.desktop + +KDE_ICON = ksmiletris + +rcdir = $(kde_datadir)/ksmiletris +rc_DATA = ksmiletrisui.rc + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/ksmiletris.pot diff --git a/ksmiletris/README b/ksmiletris/README new file mode 100644 index 00000000..7b4179b2 --- /dev/null +++ b/ksmiletris/README @@ -0,0 +1 @@ +See the HTML documentation in the doc/ subdirectory. diff --git a/ksmiletris/data/Makefile.am b/ksmiletris/data/Makefile.am new file mode 100644 index 00000000..b9b59670 --- /dev/null +++ b/ksmiletris/data/Makefile.am @@ -0,0 +1,16 @@ +AUTOMAKE_OPTIONS = foreign + +ksmiletrisdir = $(kde_datadir)/ksmiletris/data + +ksmiletris_DATA = bg1.bmp bg10.bmp bg11.bmp bg12.bmp bg13.bmp bg14.bmp \ + bg15.bmp bg16.bmp bg2.bmp bg3.bmp bg4.bmp bg5.bmp bg6.bmp \ + bg7.bmp bg8.bmp bg9.bmp block-a1.bmp block-a2.bmp \ + block-a3.bmp block-a4.bmp block-a5.bmp block-a6.bmp \ + block-a7.bmp block-a8.bmp block-b1.bmp block-b2.bmp \ + block-b3.bmp block-b4.bmp block-b5.bmp block-b6.bmp \ + block-b7.bmp block-b8.bmp block-c1.bmp block-c2.bmp \ + block-c3.bmp block-c4.bmp block-c5.bmp block-c6.bmp \ + block-c7.bmp block-c8.bmp broken-mask.bmp broken.bmp \ + pause.bmp cleared-a.bmp cleared-b.bmp cleared-c.bmp + +EXTRA_DIST = $(ksmiletris_DATA) diff --git a/ksmiletris/data/bg1.bmp b/ksmiletris/data/bg1.bmp new file mode 100644 index 00000000..c1a92f86 Binary files /dev/null and b/ksmiletris/data/bg1.bmp differ diff --git a/ksmiletris/data/bg10.bmp b/ksmiletris/data/bg10.bmp new file mode 100644 index 00000000..70f900bf Binary files /dev/null and b/ksmiletris/data/bg10.bmp differ diff --git a/ksmiletris/data/bg11.bmp b/ksmiletris/data/bg11.bmp new file mode 100644 index 00000000..927b4796 Binary files /dev/null and b/ksmiletris/data/bg11.bmp differ diff --git a/ksmiletris/data/bg12.bmp b/ksmiletris/data/bg12.bmp new file mode 100644 index 00000000..05e40ef6 Binary files /dev/null and b/ksmiletris/data/bg12.bmp differ diff --git a/ksmiletris/data/bg13.bmp b/ksmiletris/data/bg13.bmp new file mode 100644 index 00000000..d887e9ee Binary files /dev/null and b/ksmiletris/data/bg13.bmp differ diff --git a/ksmiletris/data/bg14.bmp b/ksmiletris/data/bg14.bmp new file mode 100644 index 00000000..98c70026 Binary files /dev/null and b/ksmiletris/data/bg14.bmp differ diff --git a/ksmiletris/data/bg15.bmp b/ksmiletris/data/bg15.bmp new file mode 100644 index 00000000..8757b0a0 Binary files /dev/null and b/ksmiletris/data/bg15.bmp differ diff --git a/ksmiletris/data/bg16.bmp b/ksmiletris/data/bg16.bmp new file mode 100644 index 00000000..2eb18c21 Binary files /dev/null and b/ksmiletris/data/bg16.bmp differ diff --git a/ksmiletris/data/bg2.bmp b/ksmiletris/data/bg2.bmp new file mode 100644 index 00000000..823723d5 Binary files /dev/null and b/ksmiletris/data/bg2.bmp differ diff --git a/ksmiletris/data/bg3.bmp b/ksmiletris/data/bg3.bmp new file mode 100644 index 00000000..c2ee8de1 Binary files /dev/null and b/ksmiletris/data/bg3.bmp differ diff --git a/ksmiletris/data/bg4.bmp b/ksmiletris/data/bg4.bmp new file mode 100644 index 00000000..6f39972a Binary files /dev/null and b/ksmiletris/data/bg4.bmp differ diff --git a/ksmiletris/data/bg5.bmp b/ksmiletris/data/bg5.bmp new file mode 100644 index 00000000..0e484b81 Binary files /dev/null and b/ksmiletris/data/bg5.bmp differ diff --git a/ksmiletris/data/bg6.bmp b/ksmiletris/data/bg6.bmp new file mode 100644 index 00000000..07420680 Binary files /dev/null and b/ksmiletris/data/bg6.bmp differ diff --git a/ksmiletris/data/bg7.bmp b/ksmiletris/data/bg7.bmp new file mode 100644 index 00000000..86036a44 Binary files /dev/null and b/ksmiletris/data/bg7.bmp differ diff --git a/ksmiletris/data/bg8.bmp b/ksmiletris/data/bg8.bmp new file mode 100644 index 00000000..6ce24fe1 Binary files /dev/null and b/ksmiletris/data/bg8.bmp differ diff --git a/ksmiletris/data/bg9.bmp b/ksmiletris/data/bg9.bmp new file mode 100644 index 00000000..ca3c94fc Binary files /dev/null and b/ksmiletris/data/bg9.bmp differ diff --git a/ksmiletris/data/block-a1.bmp b/ksmiletris/data/block-a1.bmp new file mode 100644 index 00000000..5841d5bd Binary files /dev/null and b/ksmiletris/data/block-a1.bmp differ diff --git a/ksmiletris/data/block-a2.bmp b/ksmiletris/data/block-a2.bmp new file mode 100644 index 00000000..1e447d36 Binary files /dev/null and b/ksmiletris/data/block-a2.bmp differ diff --git a/ksmiletris/data/block-a3.bmp b/ksmiletris/data/block-a3.bmp new file mode 100644 index 00000000..21528d77 Binary files /dev/null and b/ksmiletris/data/block-a3.bmp differ diff --git a/ksmiletris/data/block-a4.bmp b/ksmiletris/data/block-a4.bmp new file mode 100644 index 00000000..5d57813a Binary files /dev/null and b/ksmiletris/data/block-a4.bmp differ diff --git a/ksmiletris/data/block-a5.bmp b/ksmiletris/data/block-a5.bmp new file mode 100644 index 00000000..98d462c5 Binary files /dev/null and b/ksmiletris/data/block-a5.bmp differ diff --git a/ksmiletris/data/block-a6.bmp b/ksmiletris/data/block-a6.bmp new file mode 100644 index 00000000..f5850429 Binary files /dev/null and b/ksmiletris/data/block-a6.bmp differ diff --git a/ksmiletris/data/block-a7.bmp b/ksmiletris/data/block-a7.bmp new file mode 100644 index 00000000..f6684405 Binary files /dev/null and b/ksmiletris/data/block-a7.bmp differ diff --git a/ksmiletris/data/block-a8.bmp b/ksmiletris/data/block-a8.bmp new file mode 100644 index 00000000..b69d0dda Binary files /dev/null and b/ksmiletris/data/block-a8.bmp differ diff --git a/ksmiletris/data/block-b1.bmp b/ksmiletris/data/block-b1.bmp new file mode 100644 index 00000000..4b602027 Binary files /dev/null and b/ksmiletris/data/block-b1.bmp differ diff --git a/ksmiletris/data/block-b2.bmp b/ksmiletris/data/block-b2.bmp new file mode 100644 index 00000000..8b5e8a74 Binary files /dev/null and b/ksmiletris/data/block-b2.bmp differ diff --git a/ksmiletris/data/block-b3.bmp b/ksmiletris/data/block-b3.bmp new file mode 100644 index 00000000..99d7caf3 Binary files /dev/null and b/ksmiletris/data/block-b3.bmp differ diff --git a/ksmiletris/data/block-b4.bmp b/ksmiletris/data/block-b4.bmp new file mode 100644 index 00000000..c25c9031 Binary files /dev/null and b/ksmiletris/data/block-b4.bmp differ diff --git a/ksmiletris/data/block-b5.bmp b/ksmiletris/data/block-b5.bmp new file mode 100644 index 00000000..032591c6 Binary files /dev/null and b/ksmiletris/data/block-b5.bmp differ diff --git a/ksmiletris/data/block-b6.bmp b/ksmiletris/data/block-b6.bmp new file mode 100644 index 00000000..d068c51a Binary files /dev/null and b/ksmiletris/data/block-b6.bmp differ diff --git a/ksmiletris/data/block-b7.bmp b/ksmiletris/data/block-b7.bmp new file mode 100644 index 00000000..0154cf1b Binary files /dev/null and b/ksmiletris/data/block-b7.bmp differ diff --git a/ksmiletris/data/block-b8.bmp b/ksmiletris/data/block-b8.bmp new file mode 100644 index 00000000..3f60e0ad Binary files /dev/null and b/ksmiletris/data/block-b8.bmp differ diff --git a/ksmiletris/data/block-c1.bmp b/ksmiletris/data/block-c1.bmp new file mode 100644 index 00000000..f6d91227 Binary files /dev/null and b/ksmiletris/data/block-c1.bmp differ diff --git a/ksmiletris/data/block-c2.bmp b/ksmiletris/data/block-c2.bmp new file mode 100644 index 00000000..f83013bc Binary files /dev/null and b/ksmiletris/data/block-c2.bmp differ diff --git a/ksmiletris/data/block-c3.bmp b/ksmiletris/data/block-c3.bmp new file mode 100644 index 00000000..bb07ba76 Binary files /dev/null and b/ksmiletris/data/block-c3.bmp differ diff --git a/ksmiletris/data/block-c4.bmp b/ksmiletris/data/block-c4.bmp new file mode 100644 index 00000000..8f9aa21c Binary files /dev/null and b/ksmiletris/data/block-c4.bmp differ diff --git a/ksmiletris/data/block-c5.bmp b/ksmiletris/data/block-c5.bmp new file mode 100644 index 00000000..ca97d6d0 Binary files /dev/null and b/ksmiletris/data/block-c5.bmp differ diff --git a/ksmiletris/data/block-c6.bmp b/ksmiletris/data/block-c6.bmp new file mode 100644 index 00000000..2fa42edf Binary files /dev/null and b/ksmiletris/data/block-c6.bmp differ diff --git a/ksmiletris/data/block-c7.bmp b/ksmiletris/data/block-c7.bmp new file mode 100644 index 00000000..8dd189fe Binary files /dev/null and b/ksmiletris/data/block-c7.bmp differ diff --git a/ksmiletris/data/block-c8.bmp b/ksmiletris/data/block-c8.bmp new file mode 100644 index 00000000..79fbbaf0 Binary files /dev/null and b/ksmiletris/data/block-c8.bmp differ diff --git a/ksmiletris/data/broken-mask.bmp b/ksmiletris/data/broken-mask.bmp new file mode 100644 index 00000000..f84cc4c1 Binary files /dev/null and b/ksmiletris/data/broken-mask.bmp differ diff --git a/ksmiletris/data/broken.bmp b/ksmiletris/data/broken.bmp new file mode 100644 index 00000000..a575c899 Binary files /dev/null and b/ksmiletris/data/broken.bmp differ diff --git a/ksmiletris/data/cleared-a.bmp b/ksmiletris/data/cleared-a.bmp new file mode 100644 index 00000000..4d904604 Binary files /dev/null and b/ksmiletris/data/cleared-a.bmp differ diff --git a/ksmiletris/data/cleared-b.bmp b/ksmiletris/data/cleared-b.bmp new file mode 100644 index 00000000..0193c4ab Binary files /dev/null and b/ksmiletris/data/cleared-b.bmp differ diff --git a/ksmiletris/data/cleared-c.bmp b/ksmiletris/data/cleared-c.bmp new file mode 100644 index 00000000..0193c4ab Binary files /dev/null and b/ksmiletris/data/cleared-c.bmp differ diff --git a/ksmiletris/data/pause.bmp b/ksmiletris/data/pause.bmp new file mode 100644 index 00000000..75f8b8d0 Binary files /dev/null and b/ksmiletris/data/pause.bmp differ diff --git a/ksmiletris/gamewidget.cpp b/ksmiletris/gamewidget.cpp new file mode 100644 index 00000000..7bead2f7 --- /dev/null +++ b/ksmiletris/gamewidget.cpp @@ -0,0 +1,518 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_USLEEP +#include +#endif + +#include "ksmiletris.h" +#include "gamewidget.h" +#include "screenwidget.h" +#include "mirrorwidget.h" +#include "npiecewidget.h" + +#include +#include + +GameWidget::GameWidget(QWidget *parent, const char *name) + : QWidget(parent, name) +{ + in_game = false; + in_pause = false; + + random.setSeed(0); + + loadSprites(); + setPieces(Pieces_Smiles); + + map = new Sprite[scr_width * scr_height]; + mirror_sprites = new Sprite[scr_width]; + + screen = new ScreenWidget(sprites, &in_game, &in_pause, this); + screen->move(10, 10); + screen->setScreenSprites(map); + + mirror = new MirrorWidget(sprites, &in_game, &in_pause, this); + mirror->move(10, 407); + mirror->setMirrorSprites(mirror_sprites); + + next = new NextPieceWidget(sprites, &in_game, &in_pause, this); + next->move(278, 10); + next->setNextPieceSprites(next_piece); + + timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), this, SLOT(timeout())); +} + +GameWidget::~GameWidget() +{ + delete [] sprites; + delete [] map; + delete [] mirror_sprites; +} + +void GameWidget::playSound(Sound s) +{ + if (!do_sounds) + return; + + QString name; + switch (s) { + case Sound_Break: + name = "break.wav"; + break; + case Sound_Clear: + name = "clear.wav"; + break; + } + + KAudioPlayer::play(locate("data", QString("ksmiletris/sounds/") + name)); +} + +void GameWidget::setPieces(PiecesType type) +{ + QString prefix; + + switch (type) { + case Pieces_Smiles: + prefix = "block-a"; + loadSprite(Sprite_Cleared, "cleared-a.bmp"); + break; + case Pieces_Symbols: + prefix = "block-b"; + loadSprite(Sprite_Cleared, "cleared-b.bmp"); + break; + case Pieces_Icons: + prefix = "block-c"; + loadSprite(Sprite_Cleared, "cleared-c.bmp"); + } + + for (int i = 0; i < num_blocks; ++i) { + QString n; + n.setNum(i + 1); + loadSprite((Sprite)(Sprite_Block1 + i), prefix + n + ".bmp"); + } + QPixmap pm(32, 32); + for (int i = 0; i < num_blocks; ++i) { + QPainter p; + p.begin(&pm); + p.drawPixmap(0, 0, sprites[Sprite_Block1 + i]); + p.drawPixmap(0, 0, sprites[Sprite_Broken]); + p.end(); + sprites[Sprite_Broken1 + i] = pm; + } + + if (in_game) repaintChilds(); +} + +void GameWidget::loadSprites() +{ + sprites = new QPixmap[num_sprites]; + loadSprite(Sprite_Bg1, "bg1.bmp"); + loadSprite(Sprite_Bg2, "bg2.bmp"); + loadSprite(Sprite_Bg3, "bg3.bmp"); + loadSprite(Sprite_Bg4, "bg4.bmp"); + loadSprite(Sprite_Bg5, "bg5.bmp"); + loadSprite(Sprite_Bg6, "bg6.bmp"); + loadSprite(Sprite_Bg7, "bg7.bmp"); + loadSprite(Sprite_Bg8, "bg8.bmp"); + loadSprite(Sprite_Bg9, "bg9.bmp"); + loadSprite(Sprite_Bg10, "bg10.bmp"); + loadSprite(Sprite_Bg11, "bg11.bmp"); + loadSprite(Sprite_Bg12, "bg12.bmp"); + loadSprite(Sprite_Bg13, "bg13.bmp"); + loadSprite(Sprite_Bg14, "bg14.bmp"); + loadSprite(Sprite_Bg15, "bg15.bmp"); + loadSprite(Sprite_Bg16, "bg16.bmp"); + loadMaskedSprite(Sprite_Broken, "broken.bmp", "broken-mask.bmp"); +} + +void GameWidget::loadSprite(Sprite spr, const QString & path) +{ + if (!sprites[spr].load(locate("appdata", QString("data/") + path))) + qFatal("Cannot open data files.\nHave you correctly installed KSmiletris?"); +} + +void GameWidget::loadMaskedSprite(Sprite spr, const QString & path1, const QString & path2) +{ + QBitmap bmp; + if (!sprites[spr].load(locate("appdata", QString("data/") + path1))) + qFatal("Cannot open data files.\nHave you correctly installed KSmiletris?"); + if (!bmp.load(locate("appdata", QString("data/") + path2))) + qFatal("Cannot open data files.\nHave you correctly installed KSmiletris?"); + sprites[spr].setMask(bmp); +} + +void GameWidget::newGame() +{ + in_pause = false; + fast_mode = false; + + num_level = 1; + num_pieces_level = 2; + num_points = 0; + + bg_sprite = (Sprite)(Sprite_Bg1 + random.getLong(num_bgs)); + screen->setBackgroundSprite(bg_sprite); + mirror->setBackgroundSprite(bg_sprite); + next->setBackgroundSprite(bg_sprite); + for (int i = 0; i < scr_width; ++i) + mirror_sprites[i] = bg_sprite; + for (int i = 0; i < 4; ++i) + next_piece[i] = bg_sprite; + for (int y = 0; y < scr_height; ++y) + for (int x = 0; x < scr_width; ++x) + ref(x, y) = bg_sprite; + + newPiece(); + nextPiece(); + updateMirror(); + + in_game = true; + repaintChilds(); + emit changedStats(num_level, num_points); + timer_interval = 700; + timer->start(timer_interval); +} + +void GameWidget::repaintChilds() +{ + screen->repaint(false); + mirror->repaint(false); + next->repaint(false); +} + +void GameWidget::putPiece() +{ + if (piece[0] != bg_sprite) ref(xpos + 0, ypos + 0) = piece[0]; + if (piece[1] != bg_sprite) ref(xpos + 1, ypos + 0) = piece[1]; + if (piece[2] != bg_sprite) ref(xpos + 0, ypos + 1) = piece[2]; + if (piece[3] != bg_sprite) ref(xpos + 1, ypos + 1) = piece[3]; + updateMirror(); + screen->repaint(false); +} + +void GameWidget::getPiece() +{ + if (piece[0] != bg_sprite) ref(xpos + 0, ypos + 0) = bg_sprite; + if (piece[1] != bg_sprite) ref(xpos + 1, ypos + 0) = bg_sprite; + if (piece[2] != bg_sprite) ref(xpos + 0, ypos + 1) = bg_sprite; + if (piece[3] != bg_sprite) ref(xpos + 1, ypos + 1) = bg_sprite; +} + +void GameWidget::newPiece() +{ + static int pieces[][4] = {{1, 0, 1, 1}, + {1, 1, 1, 0}, + {1, 1, 0, 1}, + {0, 1, 1, 1}}; + int p = random.getLong(4); + for (int i = 0; i < 4; ++i) + if (pieces[p][i]) + next_piece[i] = (Sprite)(Sprite_Block1 + random.getLong(num_pieces_level)); + else + next_piece[i] = bg_sprite; + next->repaint(false); +} + +void GameWidget::nextPiece() +{ + piece[0] = next_piece[0]; + piece[1] = next_piece[1]; + piece[2] = next_piece[2]; + piece[3] = next_piece[3]; + newPiece(); + xpos = (scr_width - 2) / 2; + ypos = 0; + if ((piece[0] != bg_sprite && ref(xpos + 0, ypos + 0) != bg_sprite) + || (piece[1] != bg_sprite && ref(xpos + 1, ypos + 0) != bg_sprite) + || (piece[2] != bg_sprite && ref(xpos + 0, ypos + 1) != bg_sprite) + || (piece[3] != bg_sprite && ref(xpos + 1, ypos + 1) != bg_sprite)) { + in_game = false; + repaintChilds(); + KMessageBox::sorry(this, i18n("Game Over")); + emit gameOver(); + } + + putPiece(); +} + +void GameWidget::updateMirror() +{ + for (int x = 0; x < scr_width; ++x) + mirror_sprites[x] = bg_sprite; + mirror_sprites[xpos] = piece[2] == bg_sprite ? piece[0] : piece[2]; + mirror_sprites[xpos+1] = piece[3] == bg_sprite ? piece[1] : piece[3]; + mirror->repaint(false); +} + +void GameWidget::keyUp() +{ + if (!in_game || in_pause) return; + + getPiece(); + if ((piece[0] == bg_sprite && ref(xpos + 0, ypos + 0) != bg_sprite) + || (piece[1] == bg_sprite && ref(xpos + 1, ypos + 0) != bg_sprite) + || (piece[2] == bg_sprite && ref(xpos + 0, ypos + 1) != bg_sprite) + || (piece[3] == bg_sprite && ref(xpos + 1, ypos + 1) != bg_sprite)) { + putPiece(); + return; + } + + Sprite npiece[4]; + npiece[2] = piece[0]; + npiece[0] = piece[1]; + npiece[3] = piece[2]; + npiece[1] = piece[3]; + for (int i = 0; i < 4; ++i) + piece[i] = npiece[i]; + putPiece(); +} + +void GameWidget::keyDown() +{ + if (!in_game || in_pause) return; + + getPiece(); + if ((piece[0] == bg_sprite && ref(xpos + 0, ypos + 0) != bg_sprite) + || (piece[1] == bg_sprite && ref(xpos + 1, ypos + 0) != bg_sprite) + || (piece[2] == bg_sprite && ref(xpos + 0, ypos + 1) != bg_sprite) + || (piece[3] == bg_sprite && ref(xpos + 1, ypos + 1) != bg_sprite)) { + putPiece(); + return; + } + + Sprite npiece[4]; + npiece[0] = piece[2]; + npiece[1] = piece[0]; + npiece[2] = piece[3]; + npiece[3] = piece[1]; + for (int i = 0; i < 4; ++i) + piece[i] = npiece[i]; + putPiece(); +} + +void GameWidget::keyLeft() +{ + if (!in_game || in_pause || xpos == 0) return; + + getPiece(); + if ((piece[0] != bg_sprite && ref(xpos - 1, ypos + 0) != bg_sprite) + || (piece[1] != bg_sprite && ref(xpos + 0, ypos + 0) != bg_sprite) + || (piece[2] != bg_sprite && ref(xpos - 1, ypos + 1) != bg_sprite) + || (piece[3] != bg_sprite && ref(xpos + 0, ypos + 1) != bg_sprite)) { + putPiece(); + return; + } + + --xpos; + putPiece(); +} + +void GameWidget::keyRight() +{ + if (!in_game || in_pause || xpos == scr_width - 2) return; + + getPiece(); + if ((piece[0] != bg_sprite && ref(xpos + 1, ypos + 0) != bg_sprite) + || (piece[1] != bg_sprite && ref(xpos + 2, ypos + 0) != bg_sprite) + || (piece[2] != bg_sprite && ref(xpos + 1, ypos + 1) != bg_sprite) + || (piece[3] != bg_sprite && ref(xpos + 2, ypos + 1) != bg_sprite)) { + putPiece(); + return; + } + + ++xpos; + putPiece(); +} + +void GameWidget::keySpace() +{ + if (!in_game || in_pause || fast_mode) return; + fast_mode = true; + timer->changeInterval(50); +} + +void GameWidget::broke(int x, int y, bool *xmap) +{ + xmap[y*scr_width + x] = true; + if (ref(x, y) >= Sprite_Broken1) { + // Clear the piece + playSound(Sound_Clear); + ref(x, y) = Sprite_Cleared; + num_points += 20; + } else { + // Break the piece + playSound(Sound_Break); + ref(x, y) = (Sprite)(Sprite_Broken1 + ref(x, y) - Sprite_Block1); + num_points += 10; + } + int level = num_points / 1000 + 1; + if (level > num_level) { + num_level = level; + num_pieces_level = (num_level/2 + 2) > num_blocks ? + num_blocks : num_level/2 + 2; + timer_interval = timer_interval - 25; + if (timer_interval < 50) + timer_interval = 50; + timer->changeInterval(timer_interval); + } + + emit changedStats(num_level, num_points); + +#ifdef HAVE_USLEEP + screen->repaint(false); + usleep(75 * 1000); +#endif +} + +void GameWidget::recBroke(int x, int y, bool *xmap) +{ + int t = type(ref(x, y)); + + broke(x, y, xmap); + // X-1, Y + if (x > 0 && !xmap[y*scr_width + x - 1] && type(ref(x-1, y)) == t) + recBroke(x-1, y, xmap); + // X+1, Y + if (x < scr_width-1 && !xmap[y*scr_width + x + 1] && type(ref(x+1, y)) == t) + recBroke(x+1, y, xmap); + // X, Y-1 + if (y > 0 && !xmap[(y-1)*scr_width + x] && type(ref(x, y-1)) == t) + recBroke(x, y-1, xmap); + // X, Y+1 + if (y < scr_height-1 && !xmap[(y+1)*scr_width + x] && type(ref(x, y+1)) == t) + recBroke(x, y+1, xmap); + + // X-1, Y+1 + if (x > 0 && y < scr_height-1 && !xmap[(y+1)*scr_width + x - 1] && type(ref(x-1, y+1)) == t) + recBroke(x-1, y+1, xmap); + // X+1, Y+1 + if (x < scr_width-1 && y < scr_height-1 && !xmap[(y+1)*scr_width + x + 1] && type(ref(x+1, y+1)) == t) + recBroke(x+1, y+1, xmap); + // X-1, Y-1 + if (x > 0 && y > 0 && !xmap[(y-1)*scr_width + x - 1] && type(ref(x-1, y-1)) == t) + recBroke(x-1, y-1, xmap); + // X+1, Y-1 + if (x < scr_width-1 && y > 0 && !xmap[(y-1)*scr_width + x + 1] && type(ref(x+1, y-1)) == t) + recBroke(x+1, y-1, xmap); +} + +void GameWidget::checkSolePiece(int x, int y, bool *xmap) +{ + if (y < scr_height-1 && type(ref(x, y+1)) == type(ref(x, y))) + recBroke(x, y, xmap); +} + +void GameWidget::checkPiece(int x, int y) +{ + bool xmap[scr_width * scr_height]; + for (int yy = 0; yy < scr_height; ++yy) + for (int x = 0; x < scr_width; ++x) + xmap[yy*scr_width + x] = false; + checkSolePiece(x, y, xmap); +} + +void GameWidget::compact() +{ + recheck: + bool moved = true; + while (moved) { + moved = false; + for (int x = 0; x < scr_width; ++x) + for (int y = scr_height - 1; y > 0; --y) + if (ref(x, y) == bg_sprite + || ref(x, y) == Sprite_Cleared) { + int i; + for (i = y-1; i >= 0; --i) + if (ref(x, i) != bg_sprite + && ref(x, i) != Sprite_Cleared) { + ref(x, y) = ref(x, i); + ref(x, i) = bg_sprite; + moved = true; + checkPiece(x, y); + goto recheck; + break; + } + if (i < 0) + ref(x, y) = bg_sprite; + } + } +} + +void GameWidget::blockPiece() +{ + if (fast_mode) { + timer->changeInterval(timer_interval); + fast_mode = false; + } + putPiece(); + bool xmap[scr_width * scr_height]; + for (int yy = 0; yy < scr_height; ++yy) + for (int x = 0; x < scr_width; ++x) + xmap[yy*scr_width + x] = false; + if (piece[2] != bg_sprite) + checkSolePiece(xpos, ypos+1, xmap); + if (piece[3] != bg_sprite) + checkSolePiece(xpos+1, ypos+1, xmap); + if (piece[2] == bg_sprite) + checkSolePiece(xpos, ypos, xmap); + if (piece[3] == bg_sprite) + checkSolePiece(xpos+1, ypos, xmap); + compact(); + nextPiece(); +} + +void GameWidget::timeout() +{ + if (!in_game || in_pause) + return; + + getPiece(); + if (ypos == scr_height - 2) { + blockPiece(); + return; + } + + if ((piece[0] != bg_sprite && ref(xpos + 0, ypos + 1) != bg_sprite) + || (piece[1] != bg_sprite && ref(xpos + 1, ypos + 1) != bg_sprite) + || (piece[2] != bg_sprite && ref(xpos + 0, ypos + 2) != bg_sprite) + || (piece[3] != bg_sprite && ref(xpos + 1, ypos + 2) != bg_sprite)) + blockPiece(); + else { + ++ypos; + putPiece(); + } + +} + +#include "gamewidget.moc" diff --git a/ksmiletris/gamewidget.h b/ksmiletris/gamewidget.h new file mode 100644 index 00000000..49901650 --- /dev/null +++ b/ksmiletris/gamewidget.h @@ -0,0 +1,112 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#ifndef GAMEWIDGET_H +#define GAMEWIDGET_H + +#include +#include + +#include "ksmiletris.h" + +class ScreenWidget; +class MirrorWidget; +class NextPieceWidget; +class QTimer; + +class GameWidget : public QWidget { + Q_OBJECT + +signals: + void changedStats(int, int); + void gameOver(); + +public: + bool in_game, in_pause; + bool do_sounds; + int num_level; + int num_points; + + GameWidget(QWidget *parent=0, const char *name=0); + ~GameWidget(); + + void setPieces(PiecesType type); + + Sprite& ref(int x, int y) { + return map[y*scr_width + x]; + } + + Sprite type(Sprite s) { + if (s >= Sprite_Broken1 && s < Sprite_Broken1 + num_blocks) + return (Sprite)(Sprite_Block1 + s - Sprite_Broken1); + return s; + } + + void repaintChilds(); + +private: + QPixmap *sprites; + ScreenWidget *screen; + MirrorWidget *mirror; + NextPieceWidget *next; + int xpos, ypos; + Sprite piece[4]; + Sprite *map; + Sprite *mirror_sprites; + Sprite next_piece[4]; + Sprite bg_sprite; + int timer_interval; + bool fast_mode; + QTimer *timer; + KRandomSequence random; + + int num_pieces_level; + + void playSound(Sound s); + void loadSprites(); + void loadSprite(Sprite spr, const QString & path); + void loadMaskedSprite(Sprite spr, const QString & path1, const QString & path2); + void newBlock(); + void putPiece(); + void getPiece(); + void newPiece(); + void nextPiece(); + void compact(); + void broke(int x, int y, bool *xmap); + void recBroke(int x, int y, bool *xmap); + void checkSolePiece(int x, int y, bool *xmap); + void checkPiece(int x, int y); + void blockPiece(); + void updateMirror(); + +public slots: + void newGame(); + void keyUp(); + void keyDown(); + void keyLeft(); + void keyRight(); + void keySpace(); + void timeout(); +}; + +#endif // !GAMEWIDGET_H diff --git a/ksmiletris/gamewindow.cpp b/ksmiletris/gamewindow.cpp new file mode 100644 index 00000000..60973530 --- /dev/null +++ b/ksmiletris/gamewindow.cpp @@ -0,0 +1,204 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#include "config.h" + +#include +#include +#include +#include +#include + +#include "ksmiletris.h" +#include "gamewindow.h" +#include "gamewidget.h" +#include "kscoredialog.h" + +#include +#include + + + +const int default_width = 362; +const int default_height = 460; + +GameWindow::GameWindow(QWidget *, const char *name) + : KMainWindow(0, name) +{ + //New Games + (void)KStdGameAction::gameNew(this, + SLOT(menu_newGame()), + actionCollection()); + + //Pause Game + (void)KStdGameAction::pause(this, + SLOT(menu_pause()), + actionCollection()); + + //End Game + (void)KStdGameAction::end(this, + SLOT(menu_endGame()), + actionCollection()); + + //Highscores + (void)KStdGameAction::highscores(this, + SLOT(menu_highScores()), + actionCollection()); + + //Quit + (void)KStdGameAction::quit(this, + SLOT(close()), + actionCollection()); + + QStringList list; + KSelectAction* piecesAct = + new KSelectAction(i18n("&Pieces"), 0, this, SLOT(menu_pieces()), + actionCollection(), "settings_pieces"); + list.append(i18n("&Smiles")); + list.append(i18n("S&ymbols")); + list.append(i18n("&Icons")); + piecesAct->setItems(list); + + (void)new KToggleAction(i18n("&Sounds"), 0, this, + SLOT(menu_sounds()), actionCollection(), "settings_sounds"); + + + + + + //connect(menu, SIGNAL(moved(menuPosition)), + // this, SLOT(movedMenu(menuPosition))); ? + + status = new KStatusBar(this); + status->insertItem(i18n("Level: 99"), 1); + status->insertItem(i18n("Score: 999999"), 2); + status->changeItem("", 1); + status->changeItem("", 2); + + game = new GameWidget(this); + setCentralWidget(game); + connect(game, SIGNAL(changedStats(int, int)), + this, SLOT(updateStats(int, int))); + connect(game, SIGNAL(gameOver()), this, SLOT(gameOver())); + + //keys + (void)new KAction(i18n("Move Left"), Key_Left, game, SLOT(keyLeft()), actionCollection(), "left"); + (void)new KAction(i18n("Move Right"), Key_Right, game, SLOT(keyRight()), actionCollection(), "right"); + (void)new KAction(i18n("Rotate Left"), Key_Up, game, SLOT(keyUp()), actionCollection(), "up"); + (void)new KAction(i18n("Rotate Right"), Key_Down, game, SLOT(keyDown()), actionCollection(), "down"); + (void)new KAction(i18n("Drop Down"), Key_Space, game, SLOT(keySpace()), actionCollection(), "space"); + + game->setFixedSize(default_width, default_height); + adjustSize(); + setFixedSize(size()); + + // Read configuration + KConfig *config = kapp->config(); + config->setGroup("Options"); + PiecesType pieces_type = (PiecesType)config->readNumEntry("Pieces", static_cast(Pieces_Smiles)); + game->setPieces(pieces_type); + ((KSelectAction*)actionCollection()->action("settings_pieces"))->setCurrentItem((int)pieces_type); + + + game->do_sounds = config->readBoolEntry("Sounds", true); + ((KToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds); + + setupGUI(KMainWindow::Save | Keys | StatusBar | Create); +} + +void GameWindow::menu_newGame() +{ + ((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false); + game->newGame(); +} + +void GameWindow::menu_pause() +{ + if (game->in_game) { + game->in_pause = !game->in_pause; + ((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(game->in_pause); + game->repaintChilds(); + } +} + +void GameWindow::menu_endGame() +{ + if (game->in_game) { + game->in_game = false; + game->repaintChilds(); + ((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false); + gameOver(); + } +} + +void GameWindow::menu_highScores() +{ + KScoreDialog d(KScoreDialog::Name | KScoreDialog::Level | KScoreDialog::Score, this); + d.exec(); +} + +void GameWindow::menu_pieces() +{ + int index = ((KSelectAction*)actionCollection()->action("settings_pieces"))->currentItem(); + game->setPieces((PiecesType)index); + + KConfig *config = kapp->config(); + config->setGroup("Options"); + config->writeEntry("Pieces", index); +} + +void GameWindow::menu_sounds() +{ + game->do_sounds = !game->do_sounds; + ((KToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds); + + KConfig *config = kapp->config(); + config->setGroup("Options"); + config->writeEntry("Sounds", game->do_sounds); +} + +void GameWindow::updateStats(int level, int points) +{ + QString l, p; + l.setNum(level); + p.setNum(points); + status->changeItem(i18n("Level: %1").arg(l), 1); + status->changeItem(i18n("Score: %1").arg(p), 2); +} + +void GameWindow::gameOver() +{ + KScoreDialog d(KScoreDialog::Name | KScoreDialog::Level | KScoreDialog::Score, this); + + KScoreDialog::FieldInfo scoreInfo; + + scoreInfo[KScoreDialog::Level].setNum(game->num_level); + + if (!d.addScore(game->num_points, scoreInfo)) + return; + + // Show highscore & ask for name. + d.exec(); +} + +#include "gamewindow.moc" diff --git a/ksmiletris/gamewindow.h b/ksmiletris/gamewindow.h new file mode 100644 index 00000000..54e637a0 --- /dev/null +++ b/ksmiletris/gamewindow.h @@ -0,0 +1,63 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#ifndef GAMEWINDOW_H +#define GAMEWINDOW_H + +#include + +#include "ksmiletris.h" + +class KMenuBar; +class QPopupMenu; +class GameWidget; +class KStatusBar; + +class GameWindow : public KMainWindow { + Q_OBJECT + +public: + GameWindow(QWidget *parent=0, const char *name=0); + +public slots: + void menu_newGame(); + void menu_pause(); + void menu_endGame(); + void menu_highScores(); + void menu_pieces(); + void menu_sounds(); + + void updateStats(int level, int points); + void gameOver(); + //void movedMenu(menuPosition); + +private: + //enum menuPosition { Top, Bottom, Floating }; // hack + //KMenuBar *menu; + + KStatusBar *status; + GameWidget *game; + QString m_player; +}; + +#endif // !GAMEWINDOW_H diff --git a/ksmiletris/hi128-app-ksmiletris.png b/ksmiletris/hi128-app-ksmiletris.png new file mode 100644 index 00000000..a7789b74 Binary files /dev/null and b/ksmiletris/hi128-app-ksmiletris.png differ diff --git a/ksmiletris/hi16-app-ksmiletris.png b/ksmiletris/hi16-app-ksmiletris.png new file mode 100644 index 00000000..c0883958 Binary files /dev/null and b/ksmiletris/hi16-app-ksmiletris.png differ diff --git a/ksmiletris/hi22-app-ksmiletris.png b/ksmiletris/hi22-app-ksmiletris.png new file mode 100644 index 00000000..e4b46fea Binary files /dev/null and b/ksmiletris/hi22-app-ksmiletris.png differ diff --git a/ksmiletris/hi32-app-ksmiletris.png b/ksmiletris/hi32-app-ksmiletris.png new file mode 100644 index 00000000..2c38e3ce Binary files /dev/null and b/ksmiletris/hi32-app-ksmiletris.png differ diff --git a/ksmiletris/hi48-app-ksmiletris.png b/ksmiletris/hi48-app-ksmiletris.png new file mode 100644 index 00000000..17696b2c Binary files /dev/null and b/ksmiletris/hi48-app-ksmiletris.png differ diff --git a/ksmiletris/hi64-app-ksmiletris.png b/ksmiletris/hi64-app-ksmiletris.png new file mode 100644 index 00000000..6c9b6263 Binary files /dev/null and b/ksmiletris/hi64-app-ksmiletris.png differ diff --git a/ksmiletris/ksmiletris.desktop b/ksmiletris/ksmiletris.desktop new file mode 100644 index 00000000..59d6034f --- /dev/null +++ b/ksmiletris/ksmiletris.desktop @@ -0,0 +1,78 @@ +[Desktop Entry] +MimeType= +GenericName=Tetris-like Game +GenericName[be]=Гульня ў тэтрыс +GenericName[bg]=Тетрис +GenericName[bn]=টেট্রিস-জাতীয় টালির খেলা +GenericName[br]=Ur c'hoari a seurt gant Tetris +GenericName[bs]=Igra nalik na Tetris +GenericName[ca]=Joc a l'estil Tetris +GenericName[cs]=Hra podobná Tetris +GenericName[cy]=Gêm sy'n debyg i Tetris +GenericName[da]=Tetris-lignende spil +GenericName[de]=Tetris-ähnliches Spiel +GenericName[el]=Παιχνίδι παρόμοιο με το Tetris +GenericName[eo]="Tetris"-simila ludo +GenericName[es]=Juego similar al Tetris +GenericName[et]=Tetrise moodi mäng +GenericName[eu]=Tetris-en antzeko jokoa +GenericName[fa]=بازی شبیه Tetris +GenericName[fi]=Tetris-tyylinen peli +GenericName[fr]=Jeu dans le style de Tetris +GenericName[ga]=Cluiche Mar Tetris +GenericName[he]=חיקוי טטריס +GenericName[hr]=Igra poput Tetrisa +GenericName[hu]=Tetrisz-szerű +GenericName[is]=Leikur líkur Tetris +GenericName[it]=Gioco simile al Tetris +GenericName[ja]=テトリスのようなゲーム +GenericName[km]=ល្បែង​ដូច Tetris +GenericName[ko]=지뢰찾기 게임 +GenericName[lt]=Tetrio tipo žaidimas +GenericName[lv]=Tetrim līdzīga spēle +GenericName[mk]=Игра слична на Тетрис +GenericName[nb]=Tetrislignende spill +GenericName[nds]=Tetris-liek Speel +GenericName[ne]=टेट्रिस जस्तै खेल +GenericName[nl]=Tetris-achtig spel +GenericName[nn]=Tetrisliknande spel +GenericName[pl]=Gra typu Tetris +GenericName[pt]=Jogo tipo Tetris +GenericName[pt_BR]=Jogo como Tetris +GenericName[ru]=Игра в тетрис +GenericName[se]=Tetrislágan speallu +GenericName[sk]=Hra typu Tetris +GenericName[sl]=Igra podobna Tetrisu +GenericName[sr]=Игра налик на Tetris +GenericName[sr@Latn]=Igra nalik na Tetris +GenericName[sv]=Tetrisliknande spel +GenericName[ta]=டெட்ரிஸ் போன்ற விளையாட்டு +GenericName[uk]=Гра схожа на тетріс +GenericName[zh_CN]=俄罗斯方块 +GenericName[zh_TW]=類似俄羅斯方塊遊戲 +Exec=ksmiletris -caption "%c" %i %m +Icon=ksmiletris +Path= +Type=Application +Terminal=false +Name=KSmileTris +Name[af]=K-glimlag-tetris +Name[be]=Смайл-тэтрыс +Name[bn]=কে-স্মাইলট্রিস +Name[eo]=Ridultetriso +Name[hi]=के-स्माईल ट्रिस +Name[is]=Brostris +Name[ne]=केडीई स्माइल ट्रिस +Name[pt_BR]=KSorrisoTris +Name[ru]=Смайлик-тетрис +Name[sv]=Ksmiletris +Name[ta]= Kஸ்மைல் ட்ரிஸ் +Name[tg]=KТетриси ханда +Name[tr]=KSmiletris +Name[zh_CN]=KSmiletris +Name[zh_TW]=KSmileTris 笑臉俄羅斯 +Name[zu]=I-KSmileTris +X-KDE-StartupNotify=true +X-DCOP-ServiceType=Multi +Categories=Qt;KDE;Game;ArcadeGame; +DocPath=ksmiletris/index.html diff --git a/ksmiletris/ksmiletris.h b/ksmiletris/ksmiletris.h new file mode 100644 index 00000000..c141d601 --- /dev/null +++ b/ksmiletris/ksmiletris.h @@ -0,0 +1,86 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#ifndef KSMILETRIS_H +#define KSMILETRIS_H + +const int sprite_width = 32; +const int sprite_height = 32; + +enum Sprite { + Sprite_Bg1, + Sprite_Bg2, + Sprite_Bg3, + Sprite_Bg4, + Sprite_Bg5, + Sprite_Bg6, + Sprite_Bg7, + Sprite_Bg8, + Sprite_Bg9, + Sprite_Bg10, + Sprite_Bg11, + Sprite_Bg12, + Sprite_Bg13, + Sprite_Bg14, + Sprite_Bg15, + Sprite_Bg16, + Sprite_Block1, + Sprite_Block2, + Sprite_Block3, + Sprite_Block4, + Sprite_Block5, + Sprite_Block6, + Sprite_Block7, + Sprite_Block8, + Sprite_Broken, + Sprite_Broken1, + Sprite_Broken2, + Sprite_Broken3, + Sprite_Broken4, + Sprite_Broken5, + Sprite_Broken6, + Sprite_Broken7, + Sprite_Broken8, + Sprite_Cleared, + NUM_SPRITES +}; + +const int num_sprites = NUM_SPRITES; +const int num_blocks = 8; +const int num_bgs = 16; + +const int scr_width = 8; +const int scr_height = 12; + +enum PiecesType { + Pieces_Smiles=0, + Pieces_Symbols=1, + Pieces_Icons=2 +}; + +enum Sound { + Sound_Break, + Sound_Clear +}; + +#endif // !KSMILETRIS_H diff --git a/ksmiletris/ksmiletrisui.rc b/ksmiletris/ksmiletrisui.rc new file mode 100644 index 00000000..66c29179 --- /dev/null +++ b/ksmiletris/ksmiletrisui.rc @@ -0,0 +1,12 @@ + + + + &Game + + &Settings + + + + + + diff --git a/ksmiletris/main.cpp b/ksmiletris/main.cpp new file mode 100644 index 00000000..ebb51ee2 --- /dev/null +++ b/ksmiletris/main.cpp @@ -0,0 +1,53 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#include "config.h" + +#include +#include +#include +#include + +#include "gamewindow.h" + + +static const char description[] = I18N_NOOP("KDE SmileTris"); + + +int main(int argc, char **argv) +{ + KAboutData aboutData( "ksmiletris", I18N_NOOP("KSmileTris"), + VERSION, description, KAboutData::License_GPL, + "(c) 1998, Sandro Sigala"); + aboutData.addAuthor("Sandro Sigala",0, "ssigala@globalnet.it"); + KCmdLineArgs::init( argc, argv, &aboutData ); + + + KApplication app; + KGlobal::locale()->insertCatalogue("libkdegames"); + + GameWindow *w = new GameWindow; + app.setMainWidget(w); + w->show(); + return app.exec(); +} diff --git a/ksmiletris/mirrorwidget.cpp b/ksmiletris/mirrorwidget.cpp new file mode 100644 index 00000000..43ae0175 --- /dev/null +++ b/ksmiletris/mirrorwidget.cpp @@ -0,0 +1,58 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#include "config.h" + +#include +#include +#include + +#include "ksmiletris.h" +#include "mirrorwidget.h" + +MirrorWidget::MirrorWidget(QPixmap *s, bool *game, bool *pause, + QWidget *parent, const char *name) + : QFrame(parent, name) +{ + in_game = game; + in_pause = pause; + sprites = s; + setFrameStyle(QFrame::Box | QFrame::Raised); + setLineWidth(2); + setMidLineWidth(1); + resize(scr_width * sprite_width + 10, sprite_height + 10); +} + +void MirrorWidget::drawContents(QPainter *p) +{ + QRect r = contentsRect(); + + if (!*in_game) { + p->fillRect(r, black); + return; + } + + for (int x = 0; x < scr_width; ++x) + p->drawPixmap(r.x() + x*sprite_width, r.y(), + sprites[mirror_sprites[x]]); +} diff --git a/ksmiletris/mirrorwidget.h b/ksmiletris/mirrorwidget.h new file mode 100644 index 00000000..4b0c7fa0 --- /dev/null +++ b/ksmiletris/mirrorwidget.h @@ -0,0 +1,49 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#ifndef MIRRORWIDGET_H +#define MIRRORWIDGET_H + +#include + +#include "ksmiletris.h" + +class MirrorWidget : public QFrame { +public: + MirrorWidget(QPixmap *s, bool *game, bool *pause, + QWidget *parent=0, const char *name=0); + + void setBackgroundSprite(Sprite s) { bg_sprite = s; } + void setMirrorSprites(Sprite *s) { mirror_sprites = s; } + +private: + QPixmap *sprites; + bool *in_game, *in_pause; + Sprite bg_sprite; + Sprite *mirror_sprites; + +protected: + void drawContents(QPainter *p); +}; + +#endif // !MIRRORWIDGET_H diff --git a/ksmiletris/npiecewidget.cpp b/ksmiletris/npiecewidget.cpp new file mode 100644 index 00000000..5df68f8e --- /dev/null +++ b/ksmiletris/npiecewidget.cpp @@ -0,0 +1,63 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#include "config.h" + +#include +#include +#include + +#include "ksmiletris.h" +#include "npiecewidget.h" + +NextPieceWidget::NextPieceWidget(QPixmap *s, bool *game, bool *pause, + QWidget *parent, const char *name) + : QFrame(parent, name) +{ + in_game = game; + in_pause = pause; + sprites = s; + setFrameStyle(QFrame::Box | QFrame::Raised); + setLineWidth(2); + setMidLineWidth(1); + resize(2 * sprite_width + 10, 2 * sprite_height + 10); +} + +void NextPieceWidget::drawContents(QPainter *p) +{ + QRect r = contentsRect(); + + if (!*in_game) { + p->fillRect(r, black); + return; + } + + p->drawPixmap(r.x(), r.y(), + sprites[next_piece_sprites[0]]); + p->drawPixmap(r.x()+sprite_width, r.y(), + sprites[next_piece_sprites[1]]); + p->drawPixmap(r.x(), r.y()+sprite_height, + sprites[next_piece_sprites[2]]); + p->drawPixmap(r.x()+sprite_width, r.y()+sprite_height, + sprites[next_piece_sprites[3]]); +} diff --git a/ksmiletris/npiecewidget.h b/ksmiletris/npiecewidget.h new file mode 100644 index 00000000..66095e31 --- /dev/null +++ b/ksmiletris/npiecewidget.h @@ -0,0 +1,49 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#ifndef NPIECEWIDGET_H +#define NPIECEWIDGET_H + +#include + +#include "ksmiletris.h" + +class NextPieceWidget : public QFrame { +public: + NextPieceWidget(QPixmap *s, bool *game, bool *pause, + QWidget *parent=0, const char *name=0); + + void setBackgroundSprite(Sprite s) { bg_sprite = s; } + void setNextPieceSprites(Sprite *s) { next_piece_sprites = s; } + +private: + QPixmap *sprites; + bool *in_game, *in_pause; + Sprite bg_sprite; + Sprite *next_piece_sprites; + +protected: + void drawContents(QPainter *p); +}; + +#endif // !NPIECEWIDGET_H diff --git a/ksmiletris/screenwidget.cpp b/ksmiletris/screenwidget.cpp new file mode 100644 index 00000000..0080aadd --- /dev/null +++ b/ksmiletris/screenwidget.cpp @@ -0,0 +1,68 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#include "config.h" + +#include +#include +#include +#include +#include + +#include "ksmiletris.h" +#include "screenwidget.h" + +ScreenWidget::ScreenWidget(QPixmap *s, bool *game, bool *pause, + QWidget *parent, const char *name) + : QFrame(parent, name) +{ + in_game = game; + in_pause = pause; + sprites = s; + setFrameStyle(QFrame::Box | QFrame::Raised); + setLineWidth(2); + setMidLineWidth(1); + resize(scr_width * sprite_width + 10, scr_height * sprite_height + 10); +} + +void ScreenWidget::drawContents(QPainter *p) +{ + QRect r = contentsRect(); + + if (!*in_game) { + p->fillRect(r, black); + return; + } + + for (int y = 0; y < scr_height; ++y) + for (int x = 0; x < scr_width; ++x) + p->drawPixmap(r.x() + x*sprite_width, + r.y() + y*sprite_height, + sprites[screen_sprites[y*scr_width + x]]); + + if (*in_pause) { + QPixmap pause(locate("appdata", "data/pause.bmp")); + p->drawPixmap((width()-pause.width())/2, + (height()-pause.height())/2, pause); + } +} diff --git a/ksmiletris/screenwidget.h b/ksmiletris/screenwidget.h new file mode 100644 index 00000000..5643d7ed --- /dev/null +++ b/ksmiletris/screenwidget.h @@ -0,0 +1,49 @@ +/**************************************************************** +Copyright (c) 1998 Sandro Sigala . +All rights reserved. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of the author not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +The author disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall the author be liable for any +special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + +#ifndef SCREENWIDGET_H +#define SCREENWIDGET_H + +#include + +#include "ksmiletris.h" + +class ScreenWidget : public QFrame { +public: + ScreenWidget(QPixmap *s, bool *game, bool *pause, + QWidget *parent=0, const char *name=0); + + void setBackgroundSprite(Sprite s) { bg_sprite = s; } + void setScreenSprites(Sprite *s) { screen_sprites = s; } + +private: + QPixmap *sprites; + bool *in_game, *in_pause; + Sprite bg_sprite; + Sprite *screen_sprites; + +protected: + void drawContents(QPainter *p); +}; + +#endif // !SCREENWIDGET_H diff --git a/ksmiletris/wav/Makefile.am b/ksmiletris/wav/Makefile.am new file mode 100644 index 00000000..1eed07ad --- /dev/null +++ b/ksmiletris/wav/Makefile.am @@ -0,0 +1,7 @@ +AUTOMAKE_OPTIONS = foreign + +sound_DATA = break.wav clear.wav + +sounddir = $(kde_datadir)/ksmiletris/sounds + +EXTRA_DIST = $(sound_DATA) diff --git a/ksmiletris/wav/break.wav b/ksmiletris/wav/break.wav new file mode 100644 index 00000000..a3596a20 Binary files /dev/null and b/ksmiletris/wav/break.wav differ diff --git a/ksmiletris/wav/clear.wav b/ksmiletris/wav/clear.wav new file mode 100644 index 00000000..dec7f26d Binary files /dev/null and b/ksmiletris/wav/clear.wav differ -- cgit v1.2.1