debian/0000755000000000000000000000000012164345337007176 5ustar debian/source/0000755000000000000000000000000012164345337010476 5ustar debian/source/format0000644000000000000000000000001412164345337011704 0ustar 3.0 (quilt) debian/docs0000644000000000000000000000002612164345337010047 0ustar Readme.txt Thanks.txt debian/kiki-the-nano-bot.install0000644000000000000000000000050112164345337014002 0ustar debian/*.xpm usr/share/pixmaps/ debian/*.desktop usr/share/applications/ # It seems best that kiki.py and KikiPy_wrap.cpp are generated by the same # version of SWIG. Ensure this by putting kiki.py in the same package as # the kiki binary. SWIG/kiki.py usr/share/games/kiki-the-nano-bot/py/ debian/copyright0000644000000000000000000000243212164345337011132 0ustar This package was debianized by Peter De Wachter on Mon, 28 Apr 2008 23:40:30 +0200. It was downloaded from http://kiki.sourceforge.net/ Upstream Author: Thorsten Kohnhorst Copyright: None, placed in the public domain. Confirmed with the author: To: Peter De Wachter Subject: Re: copyright status of kiki the nano bot From: Thorsten Kohnhorst Date: Tue, 13 May 2008 12:07:12 +0200 Hello Peter, yes, Kiki the nano bot is in the Public Domain. I hope that statement is clear enough :-) yours kodi > Hi, > > I'm packaging Kiki the nano bot for Debian, and I was wondering about > the copyright status of the game. Popular opinion seems to be that > you've placed it in the public domain, but I can't find that in the > source package or on the kiki.sourceforge.net website. I'd appreciate > it if you could give me a clear statement, having accurate > documentation on package copyrights is quite important to Debian. > > Thanks for the excellent game, > > Peter De Wachter The Debian packaging is placed in the public domain. debian/README.source0000644000000000000000000000043512164345337011357 0ustar This package uses quilt to manage all modifications to the upstream source. The fully patched source can be generated using the patch target provided by `debian/rules'. If you want to know more about how to use quilt to manage Debian patches, read /usr/share/doc/quilt/README.source. debian/menu0000644000000000000000000000027212164345337010066 0ustar ?package(kiki-the-nano-bot):needs="X11" section="Games/Puzzles" \ title="Kiki the nano bot" command="/usr/games/kiki-the-nano-bot" \ icon="/usr/share/pixmaps/kiki-the-nano-bot.xpm" debian/kiki-the-nano-bot.desktop0000644000000000000000000000024412164345337014011 0ustar [Desktop Entry] Type=Application Name=Kiki the nano bot Icon=kiki-the-nano-bot Exec=kiki-the-nano-bot Terminal=false Categories=Game;LogicGame; StartupNotify=false debian/changelog0000644000000000000000000000324512164345337011054 0ustar kiki-the-nano-bot (1.0.2+dfsg1-5) unstable; urgency=low * Fixed FTBFS (incorrect python-config command) (Closes: #713274) * Add virtual-destructors.patch to fix undefined behavior * Packaging cleanups - Switch to source format 3 - Use build-hardening flags - Switch to debhelper 9 * Bumped Standards-Version to 3.9.4. -- Peter De Wachter Tue, 02 Jul 2013 00:01:32 +0200 kiki-the-nano-bot (1.0.2+dfsg1-4) unstable; urgency=low [ Peter De Wachter ] * Fixed FTBFS with newer gcc. (Closes: #625047) - Added patch: SWIG-KikiText.patch [ Evgeni Golov ] * Adjust descriptions, thanks lintian. -- Peter De Wachter Sun, 08 May 2011 21:11:32 +0200 kiki-the-nano-bot (1.0.2+dfsg1-3) unstable; urgency=low * Fixed typo in package description. (Closes: #503717) * Fixed FTBFS on kfreebsd-i386. Thanks to Petr Salinger. (Closes: #542802) * Bumped Standards-Version to 3.8.3. No changes needed. -- Peter De Wachter Sat, 22 Aug 2009 22:38:50 +0200 kiki-the-nano-bot (1.0.2+dfsg1-2) unstable; urgency=low * List vorbis-tools as Build-Depends instead of Build-Depends-Indep. * Fixed a crash that occured when using the level selection dialog before solving any levels. (Closes: #503389) -- Peter De Wachter Sat, 25 Oct 2008 15:52:17 +0200 kiki-the-nano-bot (1.0.2+dfsg1-1) unstable; urgency=low * Initial release (Closes: #384581) * Several patches applied, see individual patches in the source package for details. * Converted sound files to Ogg Vorbis for smaller download size. -- Peter De Wachter Mon, 25 Aug 2008 00:32:53 +0200 debian/kiki-the-nano-bot.xpm0000644000000000000000000002074612164345337013155 0ustar /* XPM */ static char * kiki32_xpm[] = { "32 32 403 2", " c None", ". c #000000", "+ c #000006", "@ c #00000D", "# c #00000E", "$ c #000007", "% c #000001", "& c #000002", "* c #000004", "= c #00000F", "- c #00001F", "; c #000026", "> c #000029", ", c #00002A", "' c #000028", ") c #00001D", "! c #000024", "~ c #000027", "{ c #00001C", "] c #000012", "^ c #000008", "/ c #000022", "( c #00002C", "_ c #000037", ": c #000040", "< c #000044", "[ c #000043", "} c #01013F", "| c #020234", "1 c #000032", "2 c #000036", "3 c #00003C", "4 c #000041", "5 c #000042", "6 c #00003E", "7 c #020233", "8 c #030318", "9 c #000020", "0 c #00002B", "a c #00002D", "b c #000038", "c c #01014F", "d c #040452", "e c #06064B", "f c #080845", "g c #010132", "h c #000010", "i c #040200", "j c #06030C", "k c #000033", "l c #00003F", "m c #000046", "n c #00004D", "o c #040454", "p c #0B0B4D", "q c #0F0F40", "r c #020214", "s c #000030", "t c #000039", "u c #01014E", "v c #09095C", "w c #0B0B57", "x c #0D0D51", "y c #050540", "z c #000023", "A c #201004", "B c #391C00", "C c #2B1512", "D c #0C072E", "E c #000045", "F c #00004A", "G c #00004E", "H c #050556", "I c #151563", "J c #1A1A56", "K c #0A0A33", "L c #00002E", "M c #01014B", "N c #0C0C63", "O c #111162", "P c #13135C", "Q c #0A0A4D", "R c #100810", "S c #643100", "T c #5F2F00", "U c #562B00", "V c #2F170C", "W c #070423", "X c #1D1D71", "Y c #25256B", "Z c #19194F", "` c #010115", " . c #000014", ".. c #000019", "+. c #010149", "@. c #0D0D64", "#. c #16166E", "$. c #181868", "%. c #111159", "&. c #020241", "*. c #000021", "=. c #6D3602", "-. c #814000", ";. c #773C00", ">. c #6E3700", ",. c #4E2700", "'. c #150B0C", "). c #010033", "!. c #00004C", "~. c #020252", "{. c #1D1D74", "]. c #303080", "^. c #29296A", "/. c #090936", "(. c #000003", "_. c #000031", ":. c #000034", "<. c #000015", "[. c #00003D", "}. c #0D0D61", "|. c #1B1B78", "1. c #1E1E73", "2. c #171765", "3. c #07074E", "4. c #44230C", "5. c #A75504", "6. c #994C02", "7. c #8E4700", "8. c #844200", "9. c #6B3500", "0. c #24120E", "a. c #010147", "b. c #010150", "c. c #1A1A70", "d. c #383891", "e. c #383883", "f. c #181853", "g. c #010117", "h. c #00003B", "i. c #00002F", "j. c #000025", "k. c #00001A", "l. c #0C0C5E", "m. c #1E1E7D", "n. c #23237E", "o. c #0D0D5A", "p. c #010141", "q. c #09051A", "r. c #BD660E", "s. c #CA6F12", "t. c #C46B11", "u. c #B5600B", "v. c #9F5103", "w. c #884400", "x. c #341A1B", "y. c #17176C", "z. c #393995", "A. c #46469B", "B. c #2A2A6F", "C. c #080839", "D. c #010151", "E. c #010125", "F. c #0C0C5A", "G. c #282889", "H. c #23237D", "I. c #131366", "J. c #04044F", "K. c #804610", "L. c #D77816", "M. c #DC7D19", "N. c #E1821D", "O. c #E68620", "P. c #DC7F1D", "Q. c #C36C12", "R. c #522C2D", "S. c #151568", "T. c #373792", "U. c #5151AF", "V. c #3B3B8A", "W. c #171757", "X. c #010119", "Y. c #010129", "Z. c #050558", "`. c #050552", " + c #02024C", ".+ c #070318", "++ c #1B0D0E", "@+ c #1E1E7A", "#+ c #2D2D93", "$+ c #292989", "%+ c #191972", "&+ c #2E1A16", "*+ c #E78219", "=+ c #E9841C", "-+ c #E7831B", ";+ c #E07E18", ">+ c #D87714", ",+ c #CB6D0E", "'+ c #753E11", ")+ c #111165", "!+ c #34348E", "~+ c #5555B6", "{+ c #4C4CA5", "]+ c #262670", "^+ c #050533", "/+ c #050550", "(+ c #090960", "_+ c #080859", ":+ c #140A0F", "<+ c #482402", "[+ c #0A0A54", "}+ c #1D1D77", "|+ c #2F2F97", "1+ c #2F2F95", "2+ c #1F1F7E", "3+ c #0F0F68", "4+ c #02024F", "5+ c #AC5B0A", "6+ c #C86706", "7+ c #C16204", "8+ c #BC5F03", "9+ c #B15801", "0+ c #753A00", "a+ c #120921", "b+ c #131365", "c+ c #363690", "d+ c #5656B6", "e+ c #42429A", "f+ c #1A1A5F", "g+ c #010123", "h+ c #020232", "i+ c #0A0A5A", "j+ c #0C0C67", "k+ c #07075F", "l+ c #020257", "m+ c #261309", "n+ c #6F3700", "o+ c #120923", "p+ c #090950", "q+ c #1C1C73", "r+ c #2F2F96", "s+ c #3535A1", "t+ c #25258B", "u+ c #151573", "v+ c #05055C", "w+ c #6D3809", "x+ c #BF6104", "y+ c #B95D02", "z+ c #A65300", "A+ c #713800", "B+ c #3B1E00", "C+ c #02023A", "D+ c #1B1B6D", "E+ c #3D3D98", "F+ c #4C4CAB", "G+ c #2D2D7D", "H+ c #080846", "I+ c #000013", "J+ c #050538", "K+ c #0D0D6A", "L+ c #070762", "M+ c #01015A", "N+ c #271309", "O+ c #673300", "P+ c #2A1515", "Q+ c #09094F", "R+ c #1D1D72", "S+ c #303095", "T+ c #232389", "U+ c #12126F", "V+ c #020256", "W+ c #834204", "X+ c #B65C02", "Y+ c #9D4E00", "Z+ c #733900", "`+ c #5A2D00", " @ c #110907", ".@ c #04044B", "+@ c #222276", "@@ c #3D3D97", "#@ c #3D3D96", "$@ c #171760", "%@ c #010136", "&@ c #030328", "*@ c #0B0B5A", "=@ c #0A0A67", "-@ c #05055E", ";@ c #000056", ">@ c #09041D", ",@ c #462300", "'@ c #160B1B", ")@ c #0C0C52", "!@ c #1F1F76", "~@ c #303096", "{@ c #2C2C95", "]@ c #1B1B7B", "^@ c #090961", "/@ c #00001E", "(@ c #9B4E01", "_@ c #974B00", ":@ c #793C00", "<@ c #653200", "[@ c #351A00", "}@ c #050319", "|@ c #080853", "1@ c #27277B", "2@ c #33338B", "3@ c #2A2A7D", "4@ c #070748", "5@ c #080860", "6@ c #02025A", "7@ c #000053", "8@ c #000048", "9@ c #221108", "0@ c #080422", "a@ c #0E0E55", "b@ c #212179", "c@ c #2D2D91", "d@ c #242487", "e@ c #12126D", "f@ c #030355", "g@ c #080413", "h@ c #964A00", "i@ c #803F00", "j@ c #512800", "k@ c #1A0D03", "l@ c #01002F", "m@ c #0D0D5B", "n@ c #212174", "o@ c #29297E", "p@ c #151561", "q@ c #00001B", "r@ c #070746", "s@ c #060658", "t@ c #010156", "u@ c #00004F", "v@ c #010113", "w@ c #02012B", "x@ c #101059", "y@ c #272788", "z@ c #1C1C79", "A@ c #0A0A60", "B@ c #1F0F0B", "C@ c #884300", "D@ c #723800", "E@ c #5D2E00", "F@ c #351B02", "G@ c #050327", "H@ c #0E0E5B", "I@ c #171767", "J@ c #1D1D6E", "K@ c #06064A", "L@ c #040435", "M@ c #03034E", "N@ c #000051", "O@ c #020231", "P@ c #12125C", "Q@ c #21217E", "R@ c #13136C", "S@ c #030354", "T@ c #000047", "U@ c #301806", "V@ c #703800", "W@ c #603000", "X@ c #452303", "Y@ c #0A0531", "Z@ c #05054F", "`@ c #0C0C59", " # c #020221", ".# c #00004B", "+# c #000011", "@# c #030338", "## c #19196B", "$# c #1A1A73", "%# c #0B0B5E", "&# c #321903", "*# c #502700", "=# c #3D1E05", "-# c #0A0534", ";# c #03034D", "># c #03034A", ",# c #000035", "'# c #05053D", ")# c #0F0F56", "!# c #131363", "~# c #131368", "{# c #000018", "]# c #211002", "^# c #261305", "/# c #080430", "(# c #00003A", "_# c #04043F", ":# c #09094E", "<# c #0C0C5C", "[# c #010148", "}# c #01013B", "|# c #040446", "1# c #090953", "2# c #00000A", "3# c #000005", "4# c #000017", "5# c #000016", "6# c #000009", " ", " ", " ", " . + @ # $ % & * % ", " = - ; > , ' ) = & @ ! ~ ! { ] ^ % ", " ^ / / ( _ : < [ } | ] % # 1 1 2 3 4 5 6 7 8 % ", " % 9 0 > a b < c d e f g h i j k l 6 3 : m n o p q r ", " h ( ( s s t < u v w x y z A B C D 3 [ E F G H I J K & ", " + ; ( > / L t 5 M N O P Q 1 R S T U V W b m n o X Y Z ` ", " ., , 0 9 ..0 l +.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(. ", " ) _.:.:.~ <. .[.m }.|.1.2.3.1 4.5.6.7.8.9.0.a.b.c.d.e.f.g. ", " *.: m h.i.j.k.1 < l.m.n.X o.p.q.r.s.t.u.v.w.x.c y.z.A.B.C.(. ", " z [ D.M < :.{ E.4 F.m.G.H.I.J.a K.L.M.N.O.P.Q.R.S.T.U.V.W.X. ", " Y.a.Z.`. +b .+++l w @+#+$+%+v l &+*+=+-+;+>+,+'+)+!+~+{+]+^+ ", " L /+(+_+~.h.:+<+2 [+}+|+1+2+3+4+! 5+6+7+8+9+0+a+b+c+d+e+f+g+ ", " h+i+j+k+l+3 m+n+o+p+q+r+s+t+u+v+:.w+x+y+z+A+B+C+D+E+F+G+H+I+ ", " J+}.K+L+M+l N+O+P+Q+R+S+s+T+U+V+0 W+X+Y+Z+`+ @.@+@@@#@$@%@+ ", " &@*@=@-@;@E >@,@'@)@!@~@{@]@^@!./@(@_@:@<@[@}@|@1@2@3@4@, . ", " g.p+5@6@7@8@0 9@0@a@b@c@d@e@f@[ g@h@i@9.j@k@l@m@n@o@p@t q@ ", " $ r@s@t@u@8@s v@w@x@b@y@z@A@n b B@C@D@E@F@G@3 H@I@J@K@1 # ", " L@M@N@F 5 s <.O@P@1.Q@R@S@T@a U@V@W@X@Y@< T@Z@`@H@[.> * ", " #[ .#5 t ' +#@#P@##$#%#.#4 *.&#*#=#-#[ m T@8@;#>#,#k.. ", " # b < [.1 / ..'#)#!#~#d E h.{#]#^#/#l : 4 5 5 l 1 k.* ", " (.0 (#(#s s a _#:#H@<#[#l k h . . ] a _.s 0 - # & ", " h i.,#i.1 ,#}#|#1#/+5 t , 2# 3#+## 3#. ", " . I+i.i.k _ 3 : .@a.3 k ) % ", " . <.( _.2 (#l 4 3 :./@& ", " % 4#z ' 0 ' / 5#$ ", " % @ ] # 6#& ", " ", " ", " "}; debian/compat0000644000000000000000000000000212164345337010374 0ustar 9 debian/watch0000644000000000000000000000014012164345337010222 0ustar version=3 opts="dversionmangle=s/[+.]dfsg(.?\d+)?$//" \ http://sf.net/kiki/kiki-(.*)-src.tgz debian/kiki-the-nano-bot.dirs0000644000000000000000000000001212164345337013272 0ustar usr/games debian/rules0000755000000000000000000000430312164345337010256 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk build: build-arch build-indep build-arch: build-arch-stamp build-arch-stamp: dh_testdir # Add here commands to compile the package. rm -f SWIG/KikiPy_wrap.cpp #force regeneration of SWIG bindings make -C kodilib/linux make -C linux \ PYTHON_INCLUDES="$(shell python-config --includes)" \ PYTHONLIBS="$(shell python-config --libs)" rm -f py/kiki.py touch $@ build-indep: build-indep-stamp build-indep-stamp: dh_testdir oggenc sound/*.wav touch $@ clean: dh_testdir dh_testroot rm -f build-stamp patch-stamp # Add here commands to clean up after the build process. make -C linux clean make -C kodilib/linux clean rm -f py/kiki.py SWIG/kiki.py SWIG/KikiPy_wrap.cpp rm -f sound/*.ogg dh_clean install: install-indep install-arch install-indep: build dh_testdir dh_testroot dh_prep -i dh_installdirs -i dh_install -i install-arch: build dh_testdir dh_testroot dh_prep -a dh_installdirs -a install linux/kiki debian/kiki-the-nano-bot/usr/games/kiki-the-nano-bot dh_install -a binary: binary-indep binary-arch binary-indep: build install dh_testdir -i dh_testroot -i dh_installchangelogs -i dh_installdocs -i dh_compress -i dh_fixperms -i dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i binary-arch: build install dh_testdir -a dh_testroot -a dh_installchangelogs -a dh_installdocs -a dh_installmenu -a dh_installman -a debian/kiki-the-nano-bot.6 # python stuff meeded? dh_strip -a dh_compress -a dh_fixperms -a dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a get-orig-source: VERSION=1.0.2 get-orig-source: dh_testdir dh_testroot wget http://switch.dl.sourceforge.net/sourceforge/kiki/kiki-$(VERSION)-src.tgz tar xfz kiki-$(VERSION)-src.tgz rm -f kiki/*.dll rm -rf kiki/py_crippled find kiki -type f -print0 | xargs -0 chmod -x rm -f ../kiki-the-nano-bot-$(VERSION)+dfsg1.orig.tar.gz tar cfz ../kiki-the-nano-bot-$(VERSION)+dfsg1.orig.tar.gz kiki/* rm -rf kiki kiki-$(VERSION)-src.tgz .PHONY: build clean binary-indep binary-arch binary install patch get-orig-source debian/control0000644000000000000000000000257512164345337010612 0ustar Source: kiki-the-nano-bot Section: games Priority: optional Maintainer: Debian Games Team Uploaders: Peter De Wachter Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), swig, libglu1-mesa-dev | libglu-dev, libgl1-mesa-dev | libgl-dev, freeglut3-dev, libsdl1.2-dev, libsdl-image1.2-dev, libsdl-mixer1.2-dev, python-dev, vorbis-tools Standards-Version: 3.9.4 Homepage: http://kiki.sourceforge.net/ Vcs-Svn: svn://anonscm.debian.org/pkg-games/packages/trunk/kiki-the-nano-bot/ Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-games/packages/trunk/kiki-the-nano-bot/ Package: kiki-the-nano-bot Architecture: any Depends: kiki-the-nano-bot-data (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} Description: 3D puzzle game, mixing Sokoban and Kula-World Kiki the nano bot is a 3D puzzle game, a mixture of Sokoban and Kula-World. Your task is to help Kiki, a small robot living in the nano world, repair its Maker. Package: kiki-the-nano-bot-data Architecture: all Multi-Arch: foreign Depends: ${misc:Depends} Recommends: kiki-the-nano-bot Description: Kiki the nano bot - game data Kiki the nano bot is a 3D puzzle game, a mixture of Sokoban and Kula-World. Your task is to help Kiki, a small robot living in the nano world, repair its Maker. . This package contains data files required by the game Kiki the nano bot. debian/kiki-the-nano-bot-data.install0000644000000000000000000000062512164345337014720 0ustar sound/*.ogg usr/share/games/kiki-the-nano-bot/sound/ py/*.py usr/share/games/kiki-the-nano-bot/py/ py/lang/*.py usr/share/games/kiki-the-nano-bot/py/lang/ py/levels/*.py usr/share/games/kiki-the-nano-bot/py/levels/ # default config and high scores, kiki won't try to write these py/kiki.cfg usr/share/games/kiki-the-nano-bot/py/ py/kiki.hsc usr/share/games/kiki-the-nano-bot/py/ debian/kiki-the-nano-bot.60000644000000000000000000000550412164345337012511 0ustar .\" Copyright 2008 Peter De Wachter .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License .\" version 2 as published by the Free Software Foundation. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, .\" MA 02110-1301, USA. . .\" URL macro recipe from Branden Robinson's presentation .de URL \\$2 \(laURL: \\$1 \(ra\\$3 .. .if \n[.g] .mso www.tmac .\" End of recipe. . .TH kiki-the-nano-bot 6 "2008-05-12" .\" Please adjust this date whenever revising the manpage. . .SH "NAME" . kiki-the-nano-bot \- Kiki the nano bot, a 3D puzzle game . .SH "SYNOPSIS" . .B kiki-the-nano-bot . .SH "DESCRIPTION" . Kiki the nano bot is a 3D puzzle game, mixing Sokoban and Kula World. . .SH "THE STORY" . Once upon a time, there were some tiny little robots living in the nano world. They lived a happy artificial life busily collecting resources for the Maker who made more and more tiny little robots. But one day, a parasitic capacity destroyed the Maker's master control program. Since then he is malfunctioning and only producing lazy stupid little robots which shoot each other and destroy the nano world. Your task is to help kiki, the only sane bot left over, to repair the Maker. . .SH "HOW TO PLAY" . To solve the game, you have to complete several levels. Every level has it's own task. .PP Pressing ESC will display a menu with a 'help' item which explains what you have to do in order to fulfill this task. .PP Once you managed to fulfill the task, the exit gate will be activated. If kiki moves through the activated exit gate, it will be 'beamed' to the next level. .PP The following table lists the default keys you will use to control kiki's actions: . .IP "Up" 10 Move forward .IP "Down" Move backward .IP "Left" Turn left .IP "Right" Turn right .IP "Space" Shoot .IP "Control" Jump .IP "Shift" Push .IP "Page down" Change view .IP "Home" Look up .IP "End" Look down .PP You may change the keys in the keyboard setup screen. .PP For more information, see the game's web site. . .SH "SEE ALSO" . .URL "http://kiki.sourceforge.net/" "The game's web site" "" . .SH "AUTHOR" . Kiki the nano bot was developed by Thorsten Kohnhorst (aka Monsterkodi) and others. debian/patches/0000755000000000000000000000000012164345337010625 5ustar debian/patches/gcc-annoying-warnings.patch0000644000000000000000000000151412164345337016051 0ustar Silences a couple of annoying gcc warnings. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/kodilib/src/tools/KFileTools.h +++ b/kodilib/src/tools/KFileTools.h @@ -6,7 +6,9 @@ #ifndef __KFileTools #define __KFileTools +#ifdef WIN32 #pragma warning(disable:4786) +#endif #include #include @@ -35,4 +37,4 @@ string kFileJoinPaths ( const string &, const string & ); string kFileNativePath ( const string & ); -#endif \ No newline at end of file +#endif --- a/kodilib/src/tools/KFileTools.cpp +++ b/kodilib/src/tools/KFileTools.cpp @@ -7,7 +7,9 @@ #include "KConsole.h" #include "KStringTools.h" +#ifdef WIN32 #pragma warning(disable:4786) +#endif #include // open #include // stat debian/patches/missing-includes.patch0000644000000000000000000000303312164345337015122 0ustar Status: in upstream CVS --- a/kodilib/src/handler/KPickable.h +++ b/kodilib/src/handler/KPickable.h @@ -8,6 +8,7 @@ #include "KIntrospection.h" #include +#include #define DEBUG_PICKING false --- a/kodilib/src/tools/KIntrospection.h +++ b/kodilib/src/tools/KIntrospection.h @@ -11,6 +11,7 @@ #endif #include +#include // -------------------------------------------------------------------------------------------------------- class KClassInfo --- a/kodilib/src/tools/KStringTools.cpp +++ b/kodilib/src/tools/KStringTools.cpp @@ -6,7 +6,7 @@ #include "KStringTools.h" #include "KVector.h" -#include // INT_MAX +#include // INT_MAX #include // -------------------------------------------------------------------------------------------------------- --- a/kodilib/src/tools/KStringTools.h +++ b/kodilib/src/tools/KStringTools.h @@ -9,6 +9,7 @@ #include #include #include +#include // -------------------------------------------------------------------------------------------------------- --- a/kodilib/src/tools/KXMLTools.cpp +++ b/kodilib/src/tools/KXMLTools.cpp @@ -7,6 +7,7 @@ #include "KConsole.h" #include "KSeparatedMatrix.h" #include +#include // -------------------------------------------------------------------------------------------------------- std::string kXMLTag ( const std::string & name, const std::string & attributes, int depth ) debian/patches/series0000644000000000000000000000111412164345337012037 0ustar from-upstream-cvs.patch directories.patch Makefile.patch missing-includes.patch portability-64bit.patch gcc-const-correctness.patch gcc-annoying-warnings.patch gcc-miscompilation-479086.patch dont-use-getwd.patch SWIG.patch SWIG-KikiText.patch kikiaction-delete-hack.patch kikievent-empty-check.patch dont-leak-python-results.patch dont-leak-menu-objects.patch look-up-down.patch turn-and-exit-level.patch sdl-set-video-mode.patch fix-french-translation.patch fix-dutch-translation.patch ogg-sound.patch level-selection-with-no-levels-solved.patch freebsd.patch virtual-destructors.patch debian/patches/sdl-set-video-mode.patch0000644000000000000000000001704512164345337015256 0ustar - Allow the use of widescreen resolutions in fullscreen mode - Remember window size when playing in windowed mode Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: submitted upstream --- a/kodilib/src/handler/KEventHandler.cpp +++ b/kodilib/src/handler/KEventHandler.cpp @@ -226,86 +226,55 @@ // -------------------------------------------------------------------------------------------------------- bool KEventHandler::setScreenSize ( int width, int height, bool fullscreen ) { - int flags = SDL_OPENGL; // | SDL_ANYFORMAT; - if (fullscreen) - { - flags |= SDL_FULLSCREEN; - } - else - { - flags |= SDL_RESIZABLE; - } - - if (SDL_VideoModeOK (width, height, 32, flags) == 0) // video mode not ok - { - if (fullscreen) - { - switch (width) - { - case 1600: - KConsole::printf ("couldn't set video mode %dx%d:\ntrying to fallback to 1280x1024 mode", width, height); - return setScreenSize (1280, 1024, true); - case 1280: - KConsole::printf ("couldn't set video mode %dx%d:\ntrying to fallback to 1024x768 mode", width, height); - return setScreenSize (1024, 768, true); - case 1024: - KConsole::printf ("couldn't set video mode %dx%d:\ntrying to fallback to 800x600 mode", width, height); - return setScreenSize (800, 600, true); - default: - break; - } - - // fallback to window mode - KConsole::printf ("couldn't set video mode %dx%d (%s) test failed", - width, height, - fullscreen ? "fullscreen" : "window"); - KConsole::printf ("trying to fallback to window mode"); - return setScreenSize (width, height, false); - } - else - { - KConsole::printError( kStringPrintf("couldn't set video mode %dx%d (window test failed)", width, height)); - return false; - } - } - - if (SDL_SetVideoMode (width, height, 32, flags) == NULL) // paranoid + // For fullscreen mode the requested resolution is ignore, we'll pick what + // SDL thinks is best. + + int baseFlags = SDL_OPENGL; + + if (fullscreen) { - if (fullscreen) + int flags = baseFlags | SDL_FULLSCREEN; + KSize fallbackSize = getScreenSize(); + + SDL_Rect ** modes = SDL_ListModes (NULL, flags); + + if (modes != 0 && modes != (SDL_Rect **)-1) { - switch (width) - { - case 1600: - KConsole::printf ("couldn't init video mode %dx%d:\ntrying to fallback to 1280x1024 mode", width, height); - return setScreenSize (1280, 1024, true); - case 1280: - KConsole::printf ("couldn't init video mode %dx%d:\ntrying to fallback to 1024x768 mode", width, height); - return setScreenSize (1024, 768, true); - case 1024: - KConsole::printf ("couldn't init video mode %dx%d:\ntrying to fallback to 800x600 mode", width, height); - return setScreenSize (800, 600, true); - default: - break; - } - - // fallback to window mode - KConsole::printf ("couldn't change video mode %dx%d (fullscreen setting failed)", width, height); - KConsole::printf ("trying to fallback to window mode"); - return setScreenSize (width, height, false); + for (int i = 0; modes[i]; ++i) + { + if (SDL_SetVideoMode (modes[i]->w, modes[i]->h, 0, flags) != NULL) + { + // notify interested receivers that the resolution changed + notification_center.notifyReceiversType(KDL_NOTIFICATION_TYPE_VIDEO_MODE_CHANGED); + return true; + } + + KConsole::printf ("couldn't change vidoe mode %dx%d (fullscreen):\n%s", + modes[i]->w, modes[i]->h, SDL_GetError()); + } } else { - KConsole::printError(kStringPrintf("couldn't change video mode %dx%d (%s):\n%s\n", - width, height, - fullscreen ? "fullscreen" : "window", SDL_GetError()), true); - return false; + KConsole::printf ("SDL didn't give us a list of video modes"); } + + // fallback to window mode + KConsole::printf ("trying to fallback to window mode"); + width = fallbackSize.w; + height = fallbackSize.h; } - // notify interested receivers that the resolution changed - notification_center.notifyReceiversType(KDL_NOTIFICATION_TYPE_VIDEO_MODE_CHANGED); + int flags = baseFlags | SDL_RESIZABLE; + if (SDL_SetVideoMode (width, height, 0, flags) != NULL) + { + // notify interested receivers that the resolution changed + notification_center.notifyReceiversType(KDL_NOTIFICATION_TYPE_VIDEO_MODE_CHANGED); + return true; + } - return true; + KConsole::printError(kStringPrintf("couldn't change video mode %dx%d (window):\n%s\n", + width, height, SDL_GetError()), true); + return false; } // -------------------------------------------------------------------------------------------------------- @@ -332,7 +301,7 @@ return; } // check if resolution is restricted - if (modes != (SDL_Rect **)-1) + if (modes == (SDL_Rect **)-1) { // all resolutions available width = 1024; @@ -359,7 +328,7 @@ return; } // check if resolution is restricted - if (modes != (SDL_Rect **)-1) + if (modes == (SDL_Rect **)-1) { // all resolutions available width = 1024; --- a/py/config.py +++ b/py/config.py @@ -46,11 +46,14 @@ Controller.setGamma(int(value)) elif option == "fullscreen": fullscreen = self.getboolean(section, option) - if fullscreen <> Controller.getFullscreen(): - screen_size = self.get (section, fullscreen and "fullscreen size" or "window size") - screen_size = tuple (map (int, screen_size.split("x"))) - Controller.changeScreenSize (screen_size[0], screen_size[1], self.getboolean(section, option)) - self.set (section, "fullscreen size", "%dx%d" % Controller.getScreenSize()) + if fullscreen: + # remember window size before switching to fullscreen + if not Controller.getFullscreen(): + self.set (section, "window size", "%dx%d" % Controller.getScreenSize()) + Controller.changeScreenSize (0, 0, true) + else: + window_size = map (int, self.get (section, "window size").split("x")) + Controller.changeScreenSize (window_size[0], window_size[1], false) elif section == "keyboard": player = Controller.getPlayer() player.setKeyForAction (value, option.replace("_", " ")) @@ -70,6 +73,10 @@ def save (self): """save the configuration""" + # Save the window size. We need to do this here as the resize + # notifications don't get transfered to the Python code (AFAICS). + if not Controller.getFullscreen(): + self.set ("display", "window size", "%dx%d" % Controller.getScreenSize()) try: cfg_file = file (self.config_file_path, "w+") self.write (cfg_file) debian/patches/from-upstream-cvs.patch0000644000000000000000000001134712164345337015246 0ustar Changes from upstream CVS. This includes a French translation and some build fixes. Status: in upstream CVS --- /dev/null +++ b/py/lang/francaise.py @@ -0,0 +1,77 @@ +# -*- encoding: utf-8 -*- +# Versions Francaise de kiki texts +# translation by philrich123.free.fr + +lang['francais'] = { + +# game title + +"kiki the nano bot": "kiki le nano robot", + +# menu + +"new game": "nouvelle Partie", +"load level": "charger le niveau", +"next level": "niveau suivant", +"restart": "redemarrer", +"setup": "configuration", +"story": "histoire", +"demo": "demonstration", +"about": "a propos", +"help": "aide", +"quit": "quitter", +"back": "retour", + +# about + +"version": "version", +"programmed by": "programmation de", +"sounds from": "les sons sont de", +"thanks": "remerciements", +"visit": "visiter", +"for more games": "pour plus de jeux", +"main menu": "menu principal", + +# story + +"STORY_PAGE_1": "Il etait une fois,\ndes tout petis robots\nvivants dans un tout\npetit monde.\n\nIls vivaient une vie\ntres agitee, collectant\nles ressources necessaires\na la fabrication d'autres robots\nminuscules.", +"STORY_PAGE_2": "Mais un jour,\nun virus detruisit le programme\nde l'appareil a fabriquer les nouveaux\nrobots.\n\nDepuis lors il \nfonctionne mal\net ne produit plus\nque des affreux petits robots\nstupides qui ne pense qu'a\ntout detruire.", +"STORY_PAGE_3": "Votre tache est d'aider kiki,\nle seul robot sain qui reste,\na depanner le programme.\n\nbonne chance!", + +# statistics + +"STATISTICS_TEXT": "$scale(1.5)statistiques\n\nvous avez resolu %d des %d niveaux\n\nvotre score actuel est\n\n$scale(2.0)%d", + +# setup + +"language": "langue", +"off": "non", +"on": "oui", +"sound": "son", +"volume": "volume", +"fullscreen": "plein ecran", +"fov": "fov", +"speed": "vitesse", +"keyboard setup": "configuration du clavier", +"save": "sauver", + +# keyboard setup + +"$no_itemkeyboard setup": "$no_itemconfiguration du clavier", # don't translate $no_item +"$no_item": "$no_item", # don't change this + +"move forward": "aller en avant", +"move backward": "aller en arriere", +"turn left": "tourner a gauche", +"turn right": "tourner a droite", +"jump": "sauter", +"push": "pousser", +"shoot": "tirer", +"change view": "changer de vue", +"look up": "regarder vers le haut", +"look down": "regarder vers le bas", + +"press the new key": "appuyer sur la nouvelle touche", +"action without key": "action sans touche", +"back to setup": "retour a la configuration", +} \ No newline at end of file --- a/py/lang.py +++ b/py/lang.py @@ -4,7 +4,7 @@ Controller.language = "english" -lang_list = [ "dutch", "english", "euskara", "german", "portuguese", "spanish", "swedish", ] +lang_list = [ "dutch", "english", "euskara", "francaise", "german", "portuguese", "spanish", "swedish", ] lang = {} for langName in lang_list: execfile (kikipy_path + os.path.sep + "lang" + os.path.sep + langName + ".py") --- a/src/main/KikiPython.cpp +++ b/src/main/KikiPython.cpp @@ -106,9 +106,9 @@ void KikiPython::initPython () { #if defined(__APPLE__) && defined(__MACH__) - //putenv ("PYTHONDEBUG=1"); - //putenv ("PYTHONVERBOSE=1"); - putenv ("PYTHONPATH=./py:../Frameworks/Python.framework/Versions/A/lib/python2.2"); + putenv ("PYTHONDEBUG=1"); + putenv ("PYTHONVERBOSE=1"); + putenv ("PYTHONPATH=./py"); // :../Frameworks/Python.framework/Versions/A/lib/python2.2"); #elif defined(WIN32) putenv ("PYTHONDEBUG=1"); putenv ("PYTHONVERBOSE=1"); --- a/src/main/KikiPythonWidget.h +++ b/src/main/KikiPythonWidget.h @@ -7,6 +7,7 @@ #define __KikiPythonWidget #include "KikiPos.h" +#include "KikiPython.h" #include class KikiPythonWidget : public KTextField --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -9,6 +9,10 @@ #include #include + +#define K_INCLUDE_GLUT +#include "KIncludeTools.h" + #include "KikiController.h" // __________________________________________________________________________________________________ @@ -19,6 +23,11 @@ int width, height; SDL_Surface * screen; +#if defined(__APPLE__) && defined(__MACH__) +#else + glutInit(&argc,argv); +#endif + // initialize SDL if ( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_VIDEO) < 0 ) // SDL_INIT_TIMER { --- a/src/sound/KikiSound.cpp +++ b/src/sound/KikiSound.cpp @@ -88,7 +88,7 @@ Mix_Volume (-1, sound_volume); // set the start volume // title song -#ifndef _WINDOWS +/* #ifndef _WINDOWS std::string song_path = kFileNativePath(Controller.getKikiHome() + "/sound/" + "title_song.mp3"); Mix_Music * music = Mix_LoadMUS(song_path.c_str()); if(!music) @@ -103,7 +103,7 @@ } } #endif - + */ int soundIndex = 0; while (soundIndex < KikiSound::END) { debian/patches/Makefile.patch0000644000000000000000000000307112164345337013364 0ustar Makefile fixes: - Make CXXFLAGS, CPPFLAGS, LDFLAGS available for user-specified flags. - run SWIG before compiling Peter De Wachter (pdewacht@gmail.com) placed in the public domain --- a/kodilib/linux/Makefile +++ b/kodilib/linux/Makefile @@ -21,7 +21,7 @@ INCLUDES = $(KODI_INCLUDES) $(X11_INCLUDES) $(SDL_INCLUDES) -CXXFLAGS = $(INCLUDES) $(SDL_CFLAGS) +CXXOPTS = -Wall $(INCLUDES) $(SDL_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) src = \ $(KODISRCDIR)/handler/KEventHandler.cpp \ @@ -95,4 +95,4 @@ $(RM) -f $(obj) libkodi.a %.o: %.cpp - $(CXX) -c $(CXXFLAGS) -o $@ $< + $(CXX) -c $(CXXOPTS) -o $@ $< --- a/linux/Makefile +++ b/linux/Makefile @@ -46,7 +46,7 @@ INCLUDES = $(KIKI_INCLUDES) $(X11_INCLUDES) $(PYTHON_INCLUDES) -CXXFLAGS = $(INCLUDES) $(SDLCFLAGS) +CXXOPTS = -Wall $(INCLUDES) $(SDLCFLAGS) $(CPPFLAGS) $(CXXFLAGS) src = \ $(KIKISRC)/base/KikiAction.cpp \ @@ -105,8 +105,10 @@ obj = $(src:.cpp=.o) kiki: $(KIKISRC)/../SWIG/KikiPy_wrap.cpp $(obj) - -(cd ../SWIG; swig -c++ -python -globals kiki -o KikiPy_wrap.cpp KikiPy.i; cp kiki.py ../py) - $(CXX) $(obj) $(KODILIB) -o kiki $(GLLIBS) $(SDLLIBS) $(PYTHONLIBS) + $(CXX) $(LDFLAGS) $(obj) $(KODILIB) -o kiki $(GLLIBS) $(SDLLIBS) $(PYTHONLIBS) + +$(KIKISRC)/../SWIG/KikiPy_wrap.cpp: $(wildcard ../SWIG/*.i) + -(cd ../SWIG && swig -c++ -python -globals kiki -o KikiPy_wrap.cpp KikiPy.i && cp kiki.py ../py) obj-clean: $(RM) -f $(obj) @@ -115,5 +117,5 @@ $(RM) -f $(obj) kiki %.o: %.cpp - $(CXX) -c $(CXXFLAGS) -o $@ $< + $(CXX) -c $(CXXOPTS) -o $@ $< debian/patches/virtual-destructors.patch0000644000000000000000000000203412164345337015712 0ustar Description: add missing virtual destructors GCC gives the following warning: deleting object of polymorphic class type KObject/KikiCharacter which has non-virtual destructor might cause undefined behaviour Fix this by adding empty virtual destructors. The warning is probably spurious for KikiCharacter but better safe than sorry. Author: Peter De Wachter --- a/kodilib/src/tools/KNotificationObject.h +++ b/kodilib/src/tools/KNotificationObject.h @@ -17,6 +17,9 @@ class KObject { INTROSPECTION + +public: + virtual ~KObject() { } }; // -------------------------------------------------------------------------------------------------------- --- a/src/gui/KikiCharacter.h +++ b/src/gui/KikiCharacter.h @@ -20,6 +20,7 @@ public: // ........................................................................ PUBLIC KikiCharacter ( char ); + virtual ~KikiCharacter () { } virtual void display (); virtual void render (); debian/patches/gcc-miscompilation-479086.patch0000644000000000000000000000117112164345337016206 0ustar A workaround for a gcc miscompilation on amd64 when optimization is enabled (debian bug #479086) Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/src/base/KikiEvent.cpp +++ b/src/base/KikiEvent.cpp @@ -20,10 +20,7 @@ // -------------------------------------------------------------------------------------------------------- KikiEvent::~KikiEvent () { - while (actions.empty() == false) - { - actions.pop_back(); - } + actions.clear(); } // -------------------------------------------------------------------------------------------------------- debian/patches/turn-and-exit-level.patch0000644000000000000000000000314712164345337015457 0ustar As suggested by Philipp Bouillon in SourceForge bug 1405898. If kiki rotates while entering a level exit, the keyboard controls won't work in the next level. Status: in upstream CVS --- a/src/bots/KikiPlayer.cpp +++ b/src/bots/KikiPlayer.cpp @@ -474,6 +474,7 @@ if (rotate) { rotate_action = getActionWithId (rotate); + rotate_action->reset(); Controller.timer_event->addAction (rotate_action); } } @@ -742,3 +743,12 @@ return colors[KikiPlayer_tire_color]; } +// __________________________________________________________________________________________________ +void KikiPlayer::finishRotateAction () +{ + if (rotate_action) + { + rotate = false; + finishAction(rotate_action); + } +} --- a/src/bots/KikiPlayer.h +++ b/src/bots/KikiPlayer.h @@ -40,6 +40,8 @@ void performAction ( KikiAction * action ); void finishAction ( KikiAction * action ); + void finishRotateAction (); + // ........................................................................ display void display (); void die (); --- a/src/world/KikiWorld.cpp +++ b/src/world/KikiWorld.cpp @@ -287,6 +287,7 @@ if (Controller.player) { + Controller.player->finishRotateAction(); removeObject (Controller.player); // remove the player first, to keep it's state Controller.timer_event->removeAllActions (); Controller.removeKeyHandler (Controller.player); // prevent keyboard input while building world debian/patches/SWIG-KikiText.patch0000644000000000000000000000116412164345337014153 0ustar Description: fix SWIG declaration of KikiText::getText() to match the C++ header Author: Peter De Wachter Bug: https://sourceforge.net/support/tracker.php?aid=3299098 Bug-Debian: http://bugs.debian.org/625047 --- a/SWIG/KikiText.i +++ b/SWIG/KikiText.i @@ -10,7 +10,7 @@ KikiText ( const std::string & = "", bool center = true, int colorIndex = 0 ); void setText ( const std::string & str, int colorIndex = base_color ); - const std::string & getText () const; + std::string getText () const; void clear (); bool isEmpty () const; debian/patches/fix-french-translation.patch0000644000000000000000000000112012164345337016225 0ustar Kiki crashes when the French translation is selected, because of this name inconsistency. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/py/lang/francaise.py +++ b/py/lang/francaise.py @@ -2,7 +2,7 @@ # Versions Francaise de kiki texts # translation by philrich123.free.fr -lang['francais'] = { +lang['francaise'] = { # game title @@ -74,4 +74,4 @@ "press the new key": "appuyer sur la nouvelle touche", "action without key": "action sans touche", "back to setup": "retour a la configuration", -} \ No newline at end of file +} debian/patches/gcc-const-correctness.patch0000644000000000000000000002201212164345337016053 0ustar Silences tons of gcc warnings about const correctness. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/kodilib/src/tools/KKeySymbols.h +++ b/kodilib/src/tools/KKeySymbols.h @@ -5,7 +5,7 @@ #ifndef __KKeySymbols #define __KKeySymbols -static char *KDL_KEY_ICON_META[] = +static const char *KDL_KEY_ICON_META[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -28,7 +28,7 @@ ".###.....###.", }; -static char *KDL_KEY_ICON_ALT[] = +static const char *KDL_KEY_ICON_ALT[] = { // width height ncolors chars_per_pixel "17 13 2 1", @@ -51,7 +51,7 @@ ".................", }; -static char *KDL_KEY_ICON_CTRL[] = +static const char *KDL_KEY_ICON_CTRL[] = { // width height ncolors chars_per_pixel "11 13 2 1", @@ -74,7 +74,7 @@ "...######..", }; -static char *KDL_KEY_ICON_SHIFT[] = +static const char *KDL_KEY_ICON_SHIFT[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -97,7 +97,7 @@ "......#......", }; -static char *KDL_KEY_ICON_RETURN[] = +static const char *KDL_KEY_ICON_RETURN[] = { // width height ncolors chars_per_pixel "17 13 2 1", @@ -120,7 +120,7 @@ ".................", }; -static char *KDL_KEY_ICON_ENTER[] = +static const char *KDL_KEY_ICON_ENTER[] = { // width height ncolors chars_per_pixel "11 13 2 1", @@ -143,7 +143,7 @@ "...........", }; -static char *KDL_KEY_ICON_UP[] = +static const char *KDL_KEY_ICON_UP[] = { // width height ncolors chars_per_pixel "12 13 2 1", @@ -166,7 +166,7 @@ ".....##.....", }; -static char *KDL_KEY_ICON_DOWN[] = +static const char *KDL_KEY_ICON_DOWN[] = { // width height ncolors chars_per_pixel "12 13 2 1", @@ -189,7 +189,7 @@ ".....##.....", }; -static char *KDL_KEY_ICON_RIGHT[] = +static const char *KDL_KEY_ICON_RIGHT[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -212,7 +212,7 @@ "......##.....", }; -static char *KDL_KEY_ICON_LEFT[] = +static const char *KDL_KEY_ICON_LEFT[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -235,7 +235,7 @@ ".....##......", }; -static char *KDL_KEY_ICON_HOME[] = +static const char *KDL_KEY_ICON_HOME[] = { // width height ncolors chars_per_pixel "11 13 2 1", @@ -258,7 +258,7 @@ "...........", }; -static char *KDL_KEY_ICON_END[] = +static const char *KDL_KEY_ICON_END[] = { // width height ncolors chars_per_pixel "11 13 2 1", @@ -281,7 +281,7 @@ "...........", }; -static char *KDL_KEY_ICON_PAGEUP[] = +static const char *KDL_KEY_ICON_PAGEUP[] = { // width height ncolors chars_per_pixel "12 13 2 1", @@ -304,7 +304,7 @@ ".....##.....", }; -static char *KDL_KEY_ICON_PAGEDOWN[] = +static const char *KDL_KEY_ICON_PAGEDOWN[] = { // width height ncolors chars_per_pixel "12 13 2 1", @@ -328,7 +328,7 @@ }; /* -static char *KDL_KEY_ICON_CAPSLOCK[] = +static const char *KDL_KEY_ICON_CAPSLOCK[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -352,7 +352,7 @@ }; */ -static char *KDL_KEY_ICON_BACKSPACE[] = +static const char *KDL_KEY_ICON_BACKSPACE[] = { // width height ncolors chars_per_pixel "19 13 2 1", @@ -375,7 +375,7 @@ ".....##############", }; -static char *KDL_KEY_ICON_DELETE[] = +static const char *KDL_KEY_ICON_DELETE[] = { // width height ncolors chars_per_pixel "19 13 2 1", @@ -398,7 +398,7 @@ "##############.....", }; -static char *KDL_KEY_ICON_TAB[] = +static const char *KDL_KEY_ICON_TAB[] = { // width height ncolors chars_per_pixel "17 13 2 1", @@ -421,7 +421,7 @@ "........##.....##", }; -static char *KDL_KEY_ICON_KP[] = +static const char *KDL_KEY_ICON_KP[] = { // width height ncolors chars_per_pixel "4 13 2 1", --- a/kodilib/src/tools/KDisplayTools.cpp +++ b/kodilib/src/tools/KDisplayTools.cpp @@ -38,7 +38,7 @@ }; // -------------------------------------------------------------------------------------------------------- -int kDisplayXPMIcon ( char ** xpmData, const KPosition & pos ) +int kDisplayXPMIcon ( const char ** xpmData, const KPosition & pos ) { glPushAttrib(GL_PIXEL_MODE_BIT); @@ -49,7 +49,7 @@ glPixelTransferf(GL_GREEN_SCALE, color[1]); glPixelTransferf(GL_BLUE_SCALE, color[2]); - SDL_Surface * xpmSurface = IMG_ReadXPMFromArray (xpmData); + SDL_Surface * xpmSurface = IMG_ReadXPMFromArray (const_cast(xpmData)); if (xpmSurface == NULL) { KConsole::printError("kDisplayXPMIcon: IMG_ReadXPMFromArray failed"); --- a/kodilib/src/tools/KDisplayTools.h +++ b/kodilib/src/tools/KDisplayTools.h @@ -15,7 +15,7 @@ void kDisplayString ( const std::string &, const KPosition &, bool = true ); void kDisplayString ( const std::string &, const KVector &, void * ); -int kDisplayXPMIcon ( char ** xpmData, const KPosition & pos ); +int kDisplayXPMIcon ( const char ** xpmData, const KPosition & pos ); void kDisplayWireSphere ( float radius = 0.5, int subdivisions = 8); void kDisplaySolidSphere ( float radius = 0.5, int subdivisions = 8); void kDisplaySolidCube ( float sidelength = 1.0); --- a/kodilib/src/widgets/KButtonSymbols.h +++ b/kodilib/src/widgets/KButtonSymbols.h @@ -6,7 +6,7 @@ #ifndef __KButtonSymbols #define __KButtonSymbols -static char *KDS_BUTTONICON_CLEAR[] = +static const char *KDS_BUTTONICON_CLEAR[] = { // width height ncolors chars_per_pixel "13 13 1 1", @@ -28,7 +28,7 @@ ".............", }; -static char *KDS_BUTTONICON_CROSS[] = +static const char *KDS_BUTTONICON_CROSS[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -51,7 +51,7 @@ "#...........#", }; -static char *KDS_BUTTONICON_UP[] = +static const char *KDS_BUTTONICON_UP[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -74,7 +74,7 @@ ".............", }; -static char *KDS_BUTTONICON_DOWN[] = +static const char *KDS_BUTTONICON_DOWN[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -97,7 +97,7 @@ ".............", }; -static char *KDS_BUTTONICON_ARROW_RIGHT[] = +static const char *KDS_BUTTONICON_ARROW_RIGHT[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -120,7 +120,7 @@ ".............", }; -static char *KDS_BUTTONICON_ARROW_LEFT[] = +static const char *KDS_BUTTONICON_ARROW_LEFT[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -143,7 +143,7 @@ ".............", }; -static char *KDS_BUTTONICON_ARROW_UP[] = +static const char *KDS_BUTTONICON_ARROW_UP[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -166,7 +166,7 @@ ".............", }; -static char *KDS_BUTTONICON_ARROW_DOWN[] = +static const char *KDS_BUTTONICON_ARROW_DOWN[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -189,7 +189,7 @@ ".............", }; -static char *KDS_BUTTONICON_TOP[] = +static const char *KDS_BUTTONICON_TOP[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -212,7 +212,7 @@ ".............", }; -static char *KDS_BUTTONICON_BOTTOM[] = +static const char *KDS_BUTTONICON_BOTTOM[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -235,7 +235,7 @@ ".............", }; -static char *KDS_BUTTONICON_DOUBLE_UP[] = +static const char *KDS_BUTTONICON_DOUBLE_UP[] = { // width height ncolors chars_per_pixel "13 13 2 1", @@ -258,7 +258,7 @@ ".............", }; -static char *KDS_BUTTONICON_DOUBLE_DOWN[] = +static const char *KDS_BUTTONICON_DOUBLE_DOWN[] = { // width height ncolors chars_per_pixel "13 13 2 1", --- a/src/base/KikiPyAction.cpp +++ b/src/base/KikiPyAction.cpp @@ -44,8 +44,9 @@ } else if (PyInstance_Check(python_object)) { - result = PyObject_CallMethod (python_object, "performAction", "sf", action_name.c_str(), - getRelativeTime()); + result = PyObject_CallMethod (python_object, const_cast("performAction"), + const_cast("sf"), + action_name.c_str(), getRelativeTime()); } if (result) { @@ -63,7 +64,7 @@ { if (PyObject_TypeCheck(python_object, &PyInstance_Type)) { - if (PyObject_CallMethod(python_object, "finishAction", "s", action_name.c_str()) == NULL) + if (PyObject_CallMethod(python_object, const_cast("finishAction"), const_cast("s"), action_name.c_str()) == NULL) { KConsole::printError("KikiPyAction::finish failed"); } @@ -75,7 +76,7 @@ { if (PyObject_TypeCheck(python_object, &PyInstance_Type)) { - if (PyObject_CallMethod(python_object, "actionFinished", "s", action_name.c_str()) == NULL) + if (PyObject_CallMethod(python_object, const_cast("actionFinished"), const_cast("s"), action_name.c_str()) == NULL) { KConsole::printError("KikiPyAction::finished failed"); } debian/patches/kikiaction-delete-hack.patch0000644000000000000000000000415412164345337016143 0ustar This works around a subtle memory corruption. Consider the following chain of events: - KikiAction::finished() is called - This method calls KikiActionObject::actionFinished(), a virtual method - Some implementations of this method (e.g. KikiBotFume's) delete themselves ("delete this;") - The destructor of KikiActionObject deletes all associated actions, which includes the KikiAction whose finished() method is still executing! - And this finished() method goes on to read/write freed memory. I haven't found a proper fix, so this hack will have to do. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/src/base/KikiAction.cpp +++ b/src/base/KikiAction.cpp @@ -19,6 +19,8 @@ mode = m; duration = d; event = NULL; + + delete_flag_ptr = NULL; reset(); } @@ -32,6 +34,8 @@ duration = d; event = NULL; + delete_flag_ptr = NULL; + reset(); } @@ -40,6 +44,7 @@ { if (event) event->removeAction(this); if (action_object) action_object->removeAction(this); + if (delete_flag_ptr) *delete_flag_ptr = true; } // -------------------------------------------------------------------------------------------------------- @@ -50,9 +55,18 @@ void KikiAction::finish () { action_object->finishAction (this); } // -------------------------------------------------------------------------------------------------------- void KikiAction::finished () -{ +{ + bool delete_flag = false; + delete_flag_ptr = &delete_flag; + action_object->actionFinished(this); + if (delete_flag) + { + return; + } + delete_flag_ptr = NULL; + if (current == getDuration()) // if keepRest wasn't called -> reset start and current values { reset(); --- a/src/base/KikiAction.h +++ b/src/base/KikiAction.h @@ -68,6 +68,8 @@ int duration; int mode; KikiEvent * event; + + bool * delete_flag_ptr; }; // __________________________________________________________________________________________________ debian/patches/dont-leak-menu-objects.patch0000644000000000000000000000543712164345337016126 0ustar Menu objects were leaked. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/src/gui/KikiMenu.cpp +++ b/src/gui/KikiMenu.cpp @@ -43,6 +43,16 @@ } // __________________________________________________________________________________________________ +KikiMenu::~KikiMenu () +{ + while (menu_items.empty() == false) + { + delete menu_items.back(); + menu_items.pop_back(); + } +} + +// __________________________________________________________________________________________________ void KikiMenu::setCurrentIndex (int index) { @@ -402,6 +412,14 @@ } // __________________________________________________________________________________________________ +KikiMenuItem::~KikiMenuItem () +{ + delete item_text; + delete value_text; + delete extra_text; +} + +// __________________________________________________________________________________________________ float KikiMenuItem::getWidth () const { float width = 0.0; --- a/src/gui/KikiMenu.h +++ b/src/gui/KikiMenu.h @@ -15,6 +15,7 @@ public: KikiMenuItem (); + ~KikiMenuItem (); bool ignore; bool option; @@ -34,6 +35,7 @@ // ........................................................................ (con|de)struction KikiMenu ( int selectedItem = -1 ); + virtual ~KikiMenu (); // ........................................................................ menu items virtual void addItem ( const std::string & itemText, KikiAction * action = 0, bool option = false); --- a/src/gui/KikiScrollMenu.cpp +++ b/src/gui/KikiScrollMenu.cpp @@ -16,6 +16,17 @@ } // __________________________________________________________________________________________________ +KikiScrollMenu::~KikiScrollMenu () +{ + menu_items.clear(); + while (all_menu_items.empty() == false) + { + delete all_menu_items.back(); + all_menu_items.pop_back(); + } +} + +// __________________________________________________________________________________________________ void KikiScrollMenu::addItem ( const std::string & itemText, KikiAction * itemAction, bool option ) { all_menu_items.push_back (newItem (itemText, itemAction)); --- a/src/gui/KikiScrollMenu.h +++ b/src/gui/KikiScrollMenu.h @@ -15,6 +15,7 @@ // ........................................................................ (con|de)struction KikiScrollMenu ( int rows = 5, int columns = 4, int selectedItem = -1 ); + virtual ~KikiScrollMenu (); // ........................................................................ menu items virtual void addItem ( const std::string & itemText, KikiAction * action = 0, bool option = false ); debian/patches/dont-use-getwd.patch0000644000000000000000000000205512164345337014516 0ustar Nothing in kiki actually uses this method as far as I can see, but gcc still warns about the getwd usage, and I suppose changing this might make the Hurd folks happy. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/kodilib/src/tools/KFileTools.cpp +++ b/kodilib/src/tools/KFileTools.cpp @@ -44,15 +44,21 @@ // -------------------------------------------------------------------------------------------------------- string kFileGetCurrentPath () { -#ifndef WIN32 +#ifdef _GNU_SOURCE + char * buffer = get_current_dir_name(); + string current_path(buffer); + free(buffer); + return current_path; +#else + #ifndef WIN32 char buffer[MAXPATHLEN+1]; getwd(buffer); -#else - char buffer[MAX_PATH+1]; - getcwd(buffer, MAX_PATH+1); -#endif - + #else + char buffer[MAX_PATH+1]; + getcwd(buffer, MAX_PATH+1); + #endif return string(buffer); +#endif } // -------------------------------------------------------------------------------------------------------- debian/patches/freebsd.patch0000644000000000000000000000076712164345337013272 0ustar FTBFS fix for kfreebsd-i386. Thanks to Petr Salinger . Bug #542802. Status: submitted upstream: https://sourceforge.net/tracker/?func=detail&aid=2842727&group_id=78324&atid=552854 --- a/kodilib/src/tools/KFileTools.cpp +++ b/kodilib/src/tools/KFileTools.cpp @@ -307,7 +307,7 @@ int fd = open (dirPath.c_str(), O_RDONLY | O_NONBLOCK); struct stat sb; - long basep; + off_t basep; char * entry; if (fstat(fd, &sb) == -1) debian/patches/kikievent-empty-check.patch0000644000000000000000000000163612164345337016054 0ustar Missing checks for empty vectors. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/src/base/KikiEvent.cpp +++ b/src/base/KikiEvent.cpp @@ -124,7 +124,7 @@ { KikiAction * action = save_actions.back(); action->performWithEvent (*this); - if (save_actions.back() == action) + if (save_actions.empty() == false && save_actions.back() == action) { save_actions.pop_back(); } @@ -150,7 +150,7 @@ KikiAction * action = finished_actions.back(); //KConsole::print(this->getName() + " finishActions " + action->getName()); action->finished(); - if (finished_actions.back() == action) + if (finished_actions.empty() == false && finished_actions.back() == action) { //KConsole::print(this->getName() + " finishActions -- " + action->getName()); finished_actions.pop_back(); debian/patches/fix-dutch-translation.patch0000644000000000000000000000345012164345337016077 0ustar The Dutch translation has an incorrect format string, which breaks the statistics screen. Also added a few missing translations. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/py/lang/dutch.py +++ b/py/lang/dutch.py @@ -1,16 +1,18 @@ -# -*- encoding: utf-8 -*- +# -*- encoding: utf-8 -*- # Dutch (Nederlands) versions of kiki texts # translation by Arthur Langereis - + lang['dutch'] = { # game title - + "kiki the nano bot": "kiki de nano bot", # menu "new game": "nieuw spel", +"continue": "verdergaan", +"statistics": "statistieken", "load level": "laad spel", "next level": "volgend niveau", "restart": "begin opnieuw", @@ -37,10 +39,10 @@ "STORY_PAGE_1": "Er leefden eens\nwat kleine robotjes\nin de nano wereld.\n\nze hadden een gelukkig\nkunstmatig leven en\nverzamelden druk materialen\nvoor de maker,\ndie meer en meer\nkleine robotjes maakte.", "STORY_PAGE_2": "maar op een dag,\nvernietigde een parasiet\nhet controle programma\nvan de maker.\n\nvanaf dat moment werkt\nde maker slecht en\nproduceert hij slechts\nluie domme kleine robotjes\ndie op elkaar schieten\nen de nano wereld stuk maken.", "STORY_PAGE_3": "het is jouw taak om kiki,\nde laatste gezonde bot,\nte helpen om de maker\nte repareren.\n\nveel geluk!", - -# statistics - -"STATISTICS_TEXT": "$scale(1.5)statistics\n\nyou solved %d of %d levels\n\nyour current score is %d\n\n$scale(2.0)%d", + +# statistics + +"STATISTICS_TEXT": "$scale(1.5)statistieken\n\nje loste %d van %d niveaus op\n\nje huidige score is\n\n$scale(2.0)%d", # setup @@ -72,7 +74,7 @@ "press the new key": "druk op de nieuwe toets", "action without key": "geen toets ingesteld", -"back to setup": "terug naar configuratie" +"back to setup": "terug naar configuratie" } debian/patches/look-up-down.patch0000644000000000000000000000076512164345337014211 0ustar As suggested by Philipp Bouillon in SourceForge bug 1405898. This makes the look-up and look-down actions behave smoothly. Status: in upstream CVS --- a/src/bots/KikiPlayer.cpp +++ b/src/bots/KikiPlayer.cpp @@ -606,6 +606,7 @@ if (!look_action) { look_action = getActionWithId ((key.name == look_up_key) ? ACTION_LOOK_UP : ACTION_LOOK_DOWN); + look_action->reset(); Controller.timer_event->addAction (look_action); } debian/patches/directories.patch0000644000000000000000000000111312164345337014156 0ustar Expect to find the data files in /usr/share/games rather than the current directory. Peter De Wachter (pdewacht@gmail.com) placed in the public domain --- a/src/main/KikiController.cpp +++ b/src/main/KikiController.cpp @@ -62,10 +62,7 @@ } else { - KConsole::printf("WARNING :: environment variable KIKI_HOME not set ..."); - KConsole::printf(" ... assuming resources in current directory"); - - kiki_home = kFileGetCurrentPath(); + kiki_home = "/usr/share/games/kiki-the-nano-bot"; } #ifndef WIN32 kiki_home += "/"; debian/patches/SWIG.patch0000644000000000000000000003265012164345337012425 0ustar All Kiki objects are managed by the C++ code, even if they are constructed from Python. The SWIG bindings tried to make this clear by inhibiting the generation of destructors, but this causes run-time warnings with current SWIG. This is an alternative method. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: submitted upstream --- a/SWIG/KikiItems.i +++ b/SWIG/KikiItems.i @@ -1,7 +1,4 @@ - // __________________________________________________________________________________________________ -%nodefault; - class KikiFace { public: // ........................................................................ PUBLIC @@ -10,7 +7,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiWire::KikiWire() %{self.thisown = 0%} class KikiWire : public KikiObject { @@ -33,7 +30,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiGear::KikiGear() %{self.thisown = 0%} class KikiGear : public KikiObject, public KikiFace { @@ -55,7 +52,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiValve::KikiValve() %{self.thisown = 0%} class KikiValve : public KikiObject, public KikiFace { @@ -74,7 +71,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiMotorCylinder::KikiMotorCylinder() %{self.thisown = 0%} class KikiMotorCylinder : public KikiObject { @@ -85,7 +82,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiMotorGear::KikiMotorGear() %{self.thisown = 0%} class KikiMotorGear : public KikiGear { @@ -96,7 +93,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiGenerator::KikiGenerator() %{self.thisown = 0%} class KikiGenerator : public KikiGear { @@ -107,7 +104,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiLight::KikiLight() %{self.thisown = 0%} class KikiLight : public KikiObject { @@ -126,7 +123,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiCellText::KikiCellText(const std::string &) %{self.thisown = 0%} class KikiCellText : public KikiObject, public KikiText { @@ -146,7 +143,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiStone::KikiStone() %{self.thisown = 0%} class KikiStone : public KikiObject { @@ -164,7 +161,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiWireStone::KikiWireStone() %{self.thisown = 0%} class KikiWireStone : public KikiStone { @@ -182,7 +179,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiWall::KikiWall() %{self.thisown = 0%} class KikiWall : public KikiObject { @@ -200,7 +197,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiBomb::KikiBomb() %{self.thisown = 0%} class KikiBomb : public KikiObject { @@ -218,7 +215,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiSwitch::KikiSwitch() %{self.thisown = 0%} class KikiSwitch : public KikiObject { @@ -240,7 +237,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiGate::KikiGate() %{self.thisown = 0%} class KikiGate : public KikiSwitch { @@ -258,7 +255,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%nodefaultctor KikiAtom; class KikiAtom : public KikiObject { @@ -269,7 +266,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiMovesAtom::KikiMovesAtom() %{self.thisown = 0%} class KikiMovesAtom : public KikiAtom { @@ -279,7 +276,7 @@ // __________________________________________________________________________________________________ /* -%nodefault; +%feature("pythonappend") KikiHealthAtom::KikiHealthAtom() %{self.thisown = 0%} class KikiHealthAtom : public KikiAtom { @@ -297,7 +294,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiEnergyAtom::KikiEnergyAtom() %{self.thisown = 0%} class KikiEnergyAtom : public KikiAtom { @@ -315,6 +312,8 @@ %} */ // __________________________________________________________________________________________________ +%feature("pythonappend") KikiValueAtom::KikiValueAtom() %{self.thisown = 0%} + class KikiValueAtom : public KikiAtom { public: // ........................................................................ PUBLIC @@ -325,7 +324,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiSpikes::KikiSpikes() %{self.thisown = 0%} class KikiSpikes : public KikiObject { @@ -343,7 +342,7 @@ %} // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiBullet::KikiBullet() %{self.thisown = 0%} class KikiBullet : public KikiObject { --- a/SWIG/KConsole.i +++ b/SWIG/KConsole.i @@ -1,6 +1,6 @@ // -------------------------------------------------------------------------------------------------------- -%nodefault; +%nodefault KConsole; class KConsole : public KWindow { --- a/SWIG/KEventHandler.i +++ b/SWIG/KEventHandler.i @@ -1,6 +1,6 @@ // -------------------------------------------------------------------------------------------------------- -%nodefault; +%nodefault KEventHandler; class KEventHandler { --- a/SWIG/KWindow.i +++ b/SWIG/KWindow.i @@ -1,6 +1,6 @@ // -------------------------------------------------------------------------------------------------------- -%nodefault; +%nodefault KWindow; class KWindow { --- a/SWIG/KikiAction.i +++ b/SWIG/KikiAction.i @@ -1,5 +1,8 @@ // -------------------------------------------------------------------------------------------------------- +%feature("pythonappend") KikiAction::KikiAction(KikiObject *) %{self.thisown = 0%} +%feature("pythonappend") KikiAction::KikiAction(KikiObject *, int id, const std::string &) %{self.thisown = 0%} + class KikiAction { public: // ........................................................................ PUBLIC --- a/SWIG/KikiBot.i +++ b/SWIG/KikiBot.i @@ -1,6 +1,6 @@ // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiBotStatus; class KikiBotStatus { @@ -26,7 +26,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiBotFume; class KikiBotFume : public KikiObject { @@ -36,7 +36,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiBot; class KikiBot : public KikiObject { @@ -51,4 +51,4 @@ void setMove ( bool ); KikiBotStatus * getStatus (); -}; \ No newline at end of file +}; --- a/SWIG/KikiController.i +++ b/SWIG/KikiController.i @@ -1,6 +1,6 @@ // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiController; class KikiController : public KEventHandler, public KikiActionObject { --- a/SWIG/KikiEvent.i +++ b/SWIG/KikiEvent.i @@ -1,6 +1,6 @@ // -------------------------------------------------------------------------------------------------------- -%nodefault; +%feature("pythonappend") KikiEvent::KikiEvent(KikiObject *, const std::string &) %{self.thisown = 0%} class KikiEvent { --- a/SWIG/KikiGUI.i +++ b/SWIG/KikiGUI.i @@ -1,13 +1,13 @@ // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiGUI; class KikiGUI : public KWindow { }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiScreenText::KikiScreenText() %{self.thisown = 0%} class KikiScreenText : public KikiText, public KikiActionObject { @@ -21,7 +21,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiMenu::KikiMenu() %{self.thisown = 0%} class KikiMenu : public KikiScreenText { @@ -35,7 +35,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiColumnMenu::KikiColumnMenu() %{self.thisown = 0%} class KikiColumnMenu : public KikiMenu { @@ -45,7 +45,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiScrollMenu::KikiScrollMenu() %{self.thisown = 0%} class KikiScrollMenu : public KikiColumnMenu { @@ -58,7 +58,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiPageText::KikiPageText(const std::string &, bool) %{self.thisown = 0%} class KikiPageText : public KikiScreenText { --- a/SWIG/KikiMutant.i +++ b/SWIG/KikiMutant.i @@ -1,6 +1,6 @@ // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiMutant::KikiMutant() %{self.thisown = 0%} class KikiMutant : public KikiBot { --- a/SWIG/KikiObject.i +++ b/SWIG/KikiObject.i @@ -1,6 +1,6 @@ // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiActionObject; class KikiActionObject { @@ -21,7 +21,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiObject; class KikiObject : public KikiActionObject { --- a/SWIG/KikiPlayer.i +++ b/SWIG/KikiPlayer.i @@ -1,6 +1,6 @@ // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiStatusDisplay; class KikiStatusDisplay { @@ -11,7 +11,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiPlayback; class KikiPlayback { @@ -22,7 +22,7 @@ }; // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiPlayer; class KikiPlayer : public KikiBot { --- a/SWIG/KikiPython.i +++ b/SWIG/KikiPython.i @@ -1,6 +1,6 @@ // -------------------------------------------------------------------------------------------------------- -%nodefault; +%nodefault KikiPythonWidget; class KikiPythonWidget { @@ -20,7 +20,7 @@ }; // -------------------------------------------------------------------------------------------------------- -%nodefault; +%nodefault KikiPython; class KikiPython : public KWindow { --- a/SWIG/KikiSound.i +++ b/SWIG/KikiSound.i @@ -1,6 +1,6 @@ // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiSound; class KikiSound { --- a/SWIG/KikiText.i +++ b/SWIG/KikiText.i @@ -1,6 +1,6 @@ // __________________________________________________________________________________________________ -%nodefault; +%feature("pythonappend") KikiText::KikiText() %{self.thisown = 0%} class KikiText { --- a/SWIG/KikiTypes.i +++ b/SWIG/KikiTypes.i @@ -149,7 +149,7 @@ }; // -------------------------------------------------------------------------------------------------------- -%nodefault; +%nodefault KProjection; class KProjection { @@ -163,7 +163,7 @@ }; // -------------------------------------------------------------------------------------------------------- -%nodefault; +%nodefault KKey; struct KKey { --- a/SWIG/KikiWorld.i +++ b/SWIG/KikiWorld.i @@ -1,6 +1,6 @@ // __________________________________________________________________________________________________ -%nodefault; +%nodefault KikiWorld; class KikiWorld { debian/patches/dont-leak-python-results.patch0000644000000000000000000000245312164345337016546 0ustar Some Python objects were leaked. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/src/base/KikiPyAction.cpp +++ b/src/base/KikiPyAction.cpp @@ -64,7 +64,12 @@ { if (PyObject_TypeCheck(python_object, &PyInstance_Type)) { - if (PyObject_CallMethod(python_object, const_cast("finishAction"), const_cast("s"), action_name.c_str()) == NULL) + PyObject * result = PyObject_CallMethod(python_object, const_cast("finishAction"), const_cast("s"), action_name.c_str()); + if (result) + { + Py_DECREF(result); + } + else { KConsole::printError("KikiPyAction::finish failed"); } @@ -76,7 +81,12 @@ { if (PyObject_TypeCheck(python_object, &PyInstance_Type)) { - if (PyObject_CallMethod(python_object, const_cast("actionFinished"), const_cast("s"), action_name.c_str()) == NULL) + PyObject * result = PyObject_CallMethod(python_object, const_cast("actionFinished"), const_cast("s"), action_name.c_str()); + if (result) + { + Py_DECREF(result); + } + else { KConsole::printError("KikiPyAction::finished failed"); } debian/patches/level-selection-with-no-levels-solved.patch0000644000000000000000000000111212164345337021100 0ustar Kiki crashes if the user tries to use the level selection menu before finishing any level. Peter De Wachter (pdewacht@gmail.com) placed in the public domain --- a/py/levelselection.py +++ b/py/levelselection.py @@ -25,6 +25,8 @@ # ............................................................................................................ last_level = highscore.getLastAvailableLevel() + if last_level < 0: + last_level = 0 current_level = (level_index >= 0) and level_index or last_level world.max_level_index = last_level debian/patches/ogg-sound.patch0000644000000000000000000001052712164345337013555 0ustar Description: use OGG instead of WAV files as sounds Author: Peter De Wachter --- a/src/sound/KikiSound.cpp +++ b/src/sound/KikiSound.cpp @@ -30,39 +30,39 @@ // __________________________________________________________________________________________________ static KikiSoundData KikiSounds[] = { - { KikiSound::BOT_MOVE, "bot_move.wav", 0.2 }, - { KikiSound::BOT_JUMP, "bot_jump.wav", 0.7 }, - { KikiSound::BOT_LAND, "bot_land.wav", 0.7 }, - { KikiSound::BOT_SPIKED, "bot_move.wav", 1.0 }, - { KikiSound::BOT_HEALTH_ALERT, "bot_health_alert.wav", 1.0 }, - { KikiSound::BOT_DEATH, "bot_death.wav", 1.0 }, - { KikiSound::BOT_NO_ENERGY, "bot_no_energy.wav", 1.0 }, - { KikiSound::BULLET_SHOT, "bullet_shot.wav", 1.0 }, - { KikiSound::BULLET_HIT_WALL, "bullet_hit_wall.wav", 1.0 }, - { KikiSound::BULLET_HIT_OBJECT, "bullet_hit_object.wav", 1.0 }, - { KikiSound::BULLET_HIT_PLAYER, "bullet_hit_player.wav", 1.0 }, - { KikiSound::BULLET_HIT_MUTANT, "bullet_hit_mutant.wav", 1.0 }, - { KikiSound::STONE_MOVE, "stone_move.wav", 1.0 }, - { KikiSound::STONE_LAND, "stone_land.wav", 1.0 }, - { KikiSound::SWITCH_ON, "switch_on.wav", 1.0 }, - { KikiSound::SWITCH_OFF, "switch_on.wav", 0.5 }, - { KikiSound::ATOM_BIRTH, "atom_digest.wav", 1.0 }, - { KikiSound::ATOM_DIGEST, "atom_digest.wav", 1.0 }, - { KikiSound::SPIKES_START, "bot_move.wav", 1.0 }, - { KikiSound::MENU_FADE, "menu_fade.wav", 1.0 }, - { KikiSound::MENU_ITEM, "menu_item.wav", 1.0 }, - { KikiSound::MENU_SELECT, "menu_select.wav", 1.0 }, - { KikiSound::MENU_ABORT, "menu_abort.wav", 1.0 }, - { KikiSound::GATE_OPEN, "gate_open.wav", 1.0 }, - { KikiSound::GATE_CLOSE, "gate_close.wav", 1.0 }, - { KikiSound::GATE_WARP, "gate_warp.wav", 1.0 }, - { KikiSound::BOMB_EXPLODE, "bomb_explode.wav", 1.0 }, - { KikiSound::BOMB_SPLITTER, "bomb_splitter.wav", 1.0 }, - { KikiSound::GEAR_ON, "gear_on.wav", 1.0 }, - { KikiSound::GEAR_OFF, "gear_off.wav", 1.0 }, - { KikiSound::GENERATOR_ON, "generator_on.wav", 1.0 }, - { KikiSound::GENERATOR_OFF, "generator_off.wav", 1.0 }, - { KikiSound::MOTOR, "bomb_splitter.wav", 1.0 }, + { KikiSound::BOT_MOVE, "bot_move.ogg", 0.2 }, + { KikiSound::BOT_JUMP, "bot_jump.ogg", 0.7 }, + { KikiSound::BOT_LAND, "bot_land.ogg", 0.7 }, + { KikiSound::BOT_SPIKED, "bot_move.ogg", 1.0 }, + { KikiSound::BOT_HEALTH_ALERT, "bot_health_alert.ogg", 1.0 }, + { KikiSound::BOT_DEATH, "bot_death.ogg", 1.0 }, + { KikiSound::BOT_NO_ENERGY, "bot_no_energy.ogg", 1.0 }, + { KikiSound::BULLET_SHOT, "bullet_shot.ogg", 1.0 }, + { KikiSound::BULLET_HIT_WALL, "bullet_hit_wall.ogg", 1.0 }, + { KikiSound::BULLET_HIT_OBJECT, "bullet_hit_object.ogg", 1.0 }, + { KikiSound::BULLET_HIT_PLAYER, "bullet_hit_player.ogg", 1.0 }, + { KikiSound::BULLET_HIT_MUTANT, "bullet_hit_mutant.ogg", 1.0 }, + { KikiSound::STONE_MOVE, "stone_move.ogg", 1.0 }, + { KikiSound::STONE_LAND, "stone_land.ogg", 1.0 }, + { KikiSound::SWITCH_ON, "switch_on.ogg", 1.0 }, + { KikiSound::SWITCH_OFF, "switch_on.ogg", 0.5 }, + { KikiSound::ATOM_BIRTH, "atom_digest.ogg", 1.0 }, + { KikiSound::ATOM_DIGEST, "atom_digest.ogg", 1.0 }, + { KikiSound::SPIKES_START, "bot_move.ogg", 1.0 }, + { KikiSound::MENU_FADE, "menu_fade.ogg", 1.0 }, + { KikiSound::MENU_ITEM, "menu_item.ogg", 1.0 }, + { KikiSound::MENU_SELECT, "menu_select.ogg", 1.0 }, + { KikiSound::MENU_ABORT, "menu_abort.ogg", 1.0 }, + { KikiSound::GATE_OPEN, "gate_open.ogg", 1.0 }, + { KikiSound::GATE_CLOSE, "gate_close.ogg", 1.0 }, + { KikiSound::GATE_WARP, "gate_warp.ogg", 1.0 }, + { KikiSound::BOMB_EXPLODE, "bomb_explode.ogg", 1.0 }, + { KikiSound::BOMB_SPLITTER, "bomb_splitter.ogg", 1.0 }, + { KikiSound::GEAR_ON, "gear_on.ogg", 1.0 }, + { KikiSound::GEAR_OFF, "gear_off.ogg", 1.0 }, + { KikiSound::GENERATOR_ON, "generator_on.ogg", 1.0 }, + { KikiSound::GENERATOR_OFF, "generator_off.ogg", 1.0 }, + { KikiSound::MOTOR, "bomb_splitter.ogg", 1.0 }, }; // __________________________________________________________________________________________________ debian/patches/portability-64bit.patch0000644000000000000000000003261412164345337015144 0ustar Make 64-bit clean (string positions don't fit in an int on 64-bit machines) Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/kodilib/src/tools/KFileTools.cpp +++ b/kodilib/src/tools/KFileTools.cpp @@ -214,8 +214,8 @@ // -------------------------------------------------------------------------------------------------------- string kFileSuffix ( const string & path ) { - unsigned int lastDotPos = path.rfind("."); - unsigned int lastSlashPos = path.rfind(kPathSep); + std::string::size_type lastDotPos = path.rfind("."); + std::string::size_type lastSlashPos = path.rfind(kPathSep); if (lastDotPos < path.size() - 1 && (lastDotPos > lastSlashPos || lastSlashPos == string::npos)) { @@ -228,7 +228,7 @@ string kFileDirName ( const string & path ) { string native = kFileNativePath(path); - unsigned int lastSlashPos = native.rfind(kPathSep); + std::string::size_type lastSlashPos = native.rfind(kPathSep); if (lastSlashPos < native.size()) { return native.substr(0, lastSlashPos+1); @@ -241,7 +241,7 @@ { string native = kFileNativePath(path); string baseName = native; - unsigned int lastSlashPos = native.rfind(kPathSep); + std::string::size_type lastSlashPos = native.rfind(kPathSep); if (lastSlashPos < native.size() - 1) { baseName = native.substr(lastSlashPos+1); --- a/kodilib/src/tools/KKeyTools.cpp +++ b/kodilib/src/tools/KKeyTools.cpp @@ -170,7 +170,7 @@ // -------------------------------------------------------------------------------------------------------- int kKeyGetDisplayWidthForKey ( const std::string & keyName ) { - unsigned int keyPos = keyName.find('_', 0); + std::string::size_type keyPos = keyName.find('_', 0); if (keyPos == std::string::npos) { return kKeyGetDisplayWidthForPureKey(keyName) + KDL_MOD_KEY_SPACING; @@ -313,7 +313,7 @@ int kKeyDisplayKey ( const std::string & keyName, const KPosition & pos ) { KPosition start = pos; - unsigned int keyPos = keyName.find('_', 0); + std::string::size_type keyPos = keyName.find('_', 0); if (keyPos == std::string::npos) { return start.x + kKeyDisplayPureKey(keyName, start) + KDL_MOD_KEY_SPACING; @@ -380,7 +380,7 @@ // -------------------------------------------------------------------------------------------------------- SDL_keysym kKeyGetKeysymForKeyName ( const std::string & keyName ) { - unsigned int pos = keyName.find('_'); + std::string::size_type pos = keyName.find('_'); std::string modString; std::string symString = keyName; --- a/kodilib/src/tools/KStringTools.cpp +++ b/kodilib/src/tools/KStringTools.cpp @@ -13,7 +13,7 @@ void kStringInsertStringBehindTags ( std::string & str, const std::string & insertString, const std::string & tag ) { - unsigned int oldPos = 0; + std::string::size_type oldPos = 0; while ((oldPos = str.find(tag, oldPos)) != std::string::npos) { oldPos += tag.size(); @@ -34,8 +34,8 @@ { std::vector components; - unsigned int dividerLength = divider.size(); - unsigned int oldpos = 0, pos; + std::string::size_type dividerLength = divider.size(); + std::string::size_type oldpos = 0, pos; while ((pos = str.find(divider, oldpos)) != std::string::npos) { @@ -50,7 +50,7 @@ // -------------------------------------------------------------------------------------------------------- void kStringReplace ( std::string & str, const std::string & toReplace, const std::string & replacement ) { - unsigned int pos = 0, chars = toReplace.size(); + std::string::size_type pos = 0, chars = toReplace.size(); while ((pos = str.find(toReplace, pos)) != std::string::npos) { str.replace(pos, chars, replacement); @@ -60,11 +60,11 @@ // -------------------------------------------------------------------------------------------------------- void kStringReplaceTabs ( std::string & str, unsigned int tabWidth ) { - unsigned int tabPos; + std::string::size_type tabPos; while ((tabPos = str.find('\t')) != std::string::npos) { - unsigned int lastNewlinePos = str.rfind('\n', tabPos-1); - unsigned int relPos = (lastNewlinePos == std::string::npos) ? tabPos : tabPos - lastNewlinePos; + std::string::size_type lastNewlinePos = str.rfind('\n', tabPos-1); + std::string::size_type relPos = (lastNewlinePos == std::string::npos) ? tabPos : tabPos - lastNewlinePos; str.replace(tabPos, 1, std::string(tabWidth-(relPos % tabWidth), ' ')); } } @@ -114,7 +114,7 @@ // -------------------------------------------------------------------------------------------------------- unsigned int kStringNthCharPos ( const std::string & str, unsigned int n, char c ) { - unsigned int loc = n, oloc = 0; + std::string::size_type loc = n, oloc = 0; while (n > 0 && (loc = str.find(c, oloc)) != std::string::npos) { n--; @@ -138,7 +138,7 @@ // -------------------------------------------------------------------------------------------------------- void kStringCropCols ( std::string & str, unsigned int columns ) { - unsigned int oloc = 0, nloc = 0; + std::string::size_type oloc = 0, nloc = 0; while ((nloc = str.find('\n', oloc)) != std::string::npos) { if ((nloc - oloc) > columns) @@ -160,10 +160,10 @@ unsigned int kStringCols ( const std::string & str ) { if (str.size() == 0) return 0; - int oloc = 0, nloc; + long oloc = 0, nloc; std::string substring; int maxlength = 0, length; - while ((nloc = str.find('\n', oloc)) != (int)std::string::npos) + while ((nloc = str.find('\n', oloc)) != (long)std::string::npos) { substring = str.substr(oloc, nloc - oloc); length = substring.size(); @@ -181,7 +181,7 @@ unsigned int kStringRows ( const std::string & str ) { if (str.size() == 0) return 1; - unsigned int loc = 0, lines = 0; + std::string::size_type loc = 0, lines = 0; while ((loc = str.find('\n', loc)) != std::string::npos) { lines++; loc++; } if (str[str.size()-1] == '\n') return lines; return lines+1; @@ -204,8 +204,8 @@ { static char str[256]; std::string format(fmt), subformat, text; - unsigned int oloc = 0; - unsigned int nloc = 0; + std::string::size_type oloc = 0; + std::string::size_type nloc = 0; kStringReplaceTabs(format); @@ -260,7 +260,7 @@ // -------------------------------------------------------------------------------------------------------- bool kStringHasSuffix ( const std::string & str, const std::string & suffix ) { - unsigned int result = str.rfind(suffix); + std::string::size_type result = str.rfind(suffix); if (result == std::string::npos) return false; return (result == str.size()-suffix.size()); } --- a/kodilib/src/tools/KXMLTools.cpp +++ b/kodilib/src/tools/KXMLTools.cpp @@ -58,11 +58,11 @@ std::string kXMLParseToTagsInVector ( std::string & xml, const std::vector & tags ) { std::string open("<"); - unsigned int minLoc = std::string::npos; + std::string::size_type minLoc = std::string::npos; std::vector::const_iterator iter = tags.begin(); while (iter != tags.end()) { - unsigned int loc = xml.find(open+(*iter)); + std::string::size_type loc = xml.find(open+(*iter)); if (loc < minLoc) minLoc = loc; iter++; } @@ -77,7 +77,7 @@ std::string value; std::string nameStr(name); nameStr += "='"; - unsigned int loc = xml.find(nameStr); + std::string::size_type loc = xml.find(nameStr); if (loc != std::string::npos) { loc += nameStr.size(); @@ -90,7 +90,7 @@ // -------------------------------------------------------------------------------------------------------- bool kXMLParseNamedCloseTag ( std::string & xml, const std::string & name, bool printError ) { - unsigned int loc = xml.find('<'); + std::string::size_type loc = xml.find('<'); if (loc == std::string::npos) { if (printError) KConsole::printError(kStringPrintf("invalid XML:\nmissing close tag '%s'", @@ -117,7 +117,7 @@ // -------------------------------------------------------------------------------------------------------- bool kXMLReadNamedOpenTag ( const std::string & xml, const std::string & name, std::string * attributes ) { - unsigned int loc = xml.find('<'), endloc; + std::string::size_type loc = xml.find('<'), endloc; if (loc == std::string::npos || xml[loc+1] == '/') return false; @@ -140,7 +140,7 @@ // -------------------------------------------------------------------------------------------------------- std::string kXMLParseNamedOpenTag ( std::string & xml, const std::string & name, std::string * attributes, bool printError ) { - unsigned int loc = xml.find('<'); + std::string::size_type loc = xml.find('<'); if (loc == std::string::npos || xml[loc+1] == '/') { if (printError) KConsole::printError(kStringPrintf("invalid XML:\nmissing tag '%s'", name.c_str())); @@ -191,7 +191,7 @@ // -------------------------------------------------------------------------------------------------------- bool kXMLParseOpenTag ( std::string & xml, std::string & name, std::string * attributes, bool printError ) { - unsigned int loc = xml.find('<'); + std::string::size_type loc = xml.find('<'); if (loc == std::string::npos || xml[loc+1] == '/') { if (printError) KConsole::printError("invalid XML:\nmissing open tag"); @@ -295,7 +295,7 @@ // -------------------------------------------------------------------------------------------------------- bool kXMLParseValue( std::string & xml, const std::string & name, int type, void * value, bool printError ) { - unsigned int loc = xml.find('<'); + std::string::size_type loc = xml.find('<'); if (loc == std::string::npos || xml[loc+1] == '/') { if (printError) KConsole::printError(kStringPrintf("invalid XML:\nmissing value '%s'", name.c_str())); @@ -379,8 +379,8 @@ } else if (typeString == "string") { - unsigned int first = substring.find("\"")+1; - unsigned int last = substring.rfind("\"", std::string::npos); + std::string::size_type first = substring.find("\"")+1; + std::string::size_type last = substring.rfind("\"", std::string::npos); *((std::string*)value) = substring.substr(first, last-first); } --- a/kodilib/src/types/KKey.cpp +++ b/kodilib/src/types/KKey.cpp @@ -31,7 +31,7 @@ // -------------------------------------------------------------------------------------------------------- std::string KKey::getUnmodifiedName () const { - unsigned int keyPos = name.find('_', 0); + std::string::size_type keyPos = name.find('_', 0); if (keyPos == std::string::npos) { return name; @@ -42,7 +42,7 @@ // -------------------------------------------------------------------------------------------------------- std::string KKey::getModifierName () const { - unsigned int keyPos = name.find('_', 0); + std::string::size_type keyPos = name.find('_', 0); if (keyPos == std::string::npos) { return ""; --- a/kodilib/src/widgets/KFileNameField.cpp +++ b/kodilib/src/widgets/KFileNameField.cpp @@ -41,7 +41,7 @@ std::string restPath; // path behind cursor // map cropped path to current directory and rest path to file prefix - unsigned int lastSlashPos = croppedPath.rfind("/"); + std::string::size_type lastSlashPos = croppedPath.rfind("/"); if (lastSlashPos < croppedPath.size()-1) { restPath = croppedPath.substr(lastSlashPos+1); @@ -88,7 +88,7 @@ } // ............................collect list of entries in searchDir that match prefix restPath - unsigned int restLength = restPath.size(); + std::string::size_type restLength = restPath.size(); std::vector matchingEntries; std::vector::iterator iter = dir_entries.begin(); while (iter != dir_entries.end()) @@ -223,7 +223,7 @@ // -------------------------------------------------------------------------------------------------------- void KFileNameField::selectLastPathComponent () { - unsigned int lastSlashPos = text.rfind("/"); + std::string::size_type lastSlashPos = text.rfind("/"); if (lastSlashPos == text.size()-1) lastSlashPos = text.rfind("/", lastSlashPos-1); if (lastSlashPos < text.size()) cursor_pos = lastSlashPos+1; else cursor_pos = 0; --- a/src/gui/KikiMenu.cpp +++ b/src/gui/KikiMenu.cpp @@ -54,7 +54,7 @@ { std::string item_text (itemText); std::string event_name (itemText); - unsigned int pos; + std::string::size_type pos; float scale_factor = 1.0; KikiMenuItem * menu_item = new KikiMenuItem (); --- a/src/gui/KikiTextLine.cpp +++ b/src/gui/KikiTextLine.cpp @@ -46,7 +46,7 @@ void KikiTextLine::setText ( const std::string & str ) { text = str; - unsigned int pos; + std::string::size_type pos; if ((pos = text.find ("$scale(")) != std::string::npos) {