Hello community,
here is the log from the commit of package fillets-ng
checked in at Wed Jan 30 18:06:57 CET 2008.
--------
--- fillets-ng/fillets-ng.changes 2007-10-25 18:14:53.000000000 +0200
+++ fillets-ng/fillets-ng.changes 2008-01-29 20:02:32.000000000 +0100
@@ -1,0 +2,11 @@
+Tue Jan 29 20:01:50 CET 2008 - lrupp@suse.de
+
+- update to 0.8.0:
+ + Undo (on key '-')
+ + Five extra levels (by Mirek Olsak)
+ + Slovenian translation (by Marko Burjek)
+ + Brazilian Portuguese translation (by Ricardo Faria)
+ + Russian translation
+ (by Leonid Myravjev, Maria Antropova, Gregory Bonik)
+
+-------------------------------------------------------------------
Old:
----
fillets-ng-0.7.4-gcc4.3.diff
fillets-ng-0.7.4.tar.bz2
New:
----
fillets-ng-0.8.0.tar.bz2
fillets-ng-0.8.0-undeclared.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ fillets-ng.spec ++++++
--- /var/tmp/diff_new_pack.e12191/_old 2008-01-30 18:06:07.000000000 +0100
+++ /var/tmp/diff_new_pack.e12191/_new 2008-01-30 18:06:07.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package fillets-ng (Version 0.7.4)
+# spec file for package fillets-ng (Version 0.8.0)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -11,20 +11,25 @@
# norootforbuild
Name: fillets-ng
-BuildRequires: SDL_image-devel SDL_mixer-devel SDL_ttf-devel fribidi-devel gcc-c++ lua-devel pkgconfig update-desktop-files
+BuildRequires: SDL_image-devel SDL_mixer-devel fribidi-devel gcc-c++ lua-devel pkgconfig update-desktop-files
+%if 0%{?suse_version} >= 1020
+BuildRequires: SDL_ttf-devel
+%else
+BuildRequires: SDL_ttf
+%endif
License: GPL v2 or later
Group: Amusements/Games/Action/Arcade
Summary: Fish Fillets--Next Generation
-Version: 0.7.4
-Release: 72
+Version: 0.8.0
+Release: 1
Url: http://fillets.sourceforge.net
Source0: %{name}-%{version}.tar.bz2
Source1: %name.desktop
Source2: %name.png
-Patch: %{name}-%{version}.diff
-Patch1: %{name}-%{version}-gcc4.3.diff
+Patch: %name-0.7.4.diff
+Patch1: fillets-ng-0.8.0-undeclared.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Requires: fillets-ng-data >= 0.7.4
+Requires: fillets-ng-data = %version
%description
Fish Fillets is strictly a puzzle game. The goal in each of the 70
@@ -53,19 +58,13 @@
libtoolize --force
autoconf --force
automake -afc
-CXXFLAGS="$RPM_OPT_FLAGS" \
-CPPFLAGS="$RPM_OPT_FLAGS" \
-LDFLAGS="-ldl" \
-./configure --prefix=%{_prefix} \
- --bindir=%{_prefix}/games \
- --datadir=%{_datadir} \
- --mandir=%{_mandir}
-make
+%configure --bindir=%{_prefix}/games
+make %{?jobs:-j%jobs}
%install
-make DESTDIR=$RPM_BUILD_ROOT install
+%makeinstall
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
-install -m 0644 %{S:2} $RPM_BUILD_ROOT/usr/share/pixmaps/fillets-ng.png
+install -m644 %{S:2} $RPM_BUILD_ROOT/usr/share/pixmaps/fillets-ng.png
%suse_update_desktop_file -i %name Game ArcadeGame
%clean
@@ -80,47 +79,56 @@
%{_prefix}/games/fillets
%{_datadir}/applications/%name.desktop
%{_datadir}/pixmaps/%name.png
+
%changelog
-* Thu Oct 25 2007 - anicka@suse.cz
+* Tue Jan 29 2008 lrupp@suse.de
+- update to 0.8.0:
+ + Undo (on key '-')
+ + Five extra levels (by Mirek Olsak)
+ + Slovenian translation (by Marko Burjek)
+ + Brazilian Portuguese translation (by Ricardo Faria)
+ + Russian translation
+ (by Leonid Myravjev, Maria Antropova, Gregory Bonik)
+* Thu Oct 25 2007 anicka@suse.cz
- fix for gcc 4.3
-* Tue Jul 03 2007 - anicka@suse.cz
+* Tue Jul 03 2007 anicka@suse.cz
- fix dependency on SDL_ttf-devel
-* Mon Feb 19 2007 - anicka@suse.cz
+* Mon Feb 19 2007 anicka@suse.cz
- update to 0.7.4
* fixes for new version of lua
- update fixes #246724
- remove last patch (fixed in upstream)
-* Fri Oct 20 2006 - ro@suse.de
+* Fri Oct 20 2006 ro@suse.de
- fix build with current lua
-* Tue Aug 15 2006 - anicka@suse.cz
+* Tue Aug 15 2006 anicka@suse.cz
- add desktop file and icon (#198287)
-* Thu Mar 16 2006 - anicka@suse.cz
+* Thu Mar 16 2006 anicka@suse.cz
- fix dependencies (#158267)
-* Mon Jan 30 2006 - ro@suse.de
+* Mon Jan 30 2006 ro@suse.de
- added gcc-c++ to BuildRequires
-* Wed Jan 25 2006 - mls@suse.de
+* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
-* Thu Jan 05 2006 - anicka@suse.cz
+* Thu Jan 05 2006 anicka@suse.cz
- update to 0.7.3
- require fribidi
- add -ldl to LDFLAGS
-* Fri Sep 09 2005 - ro@suse.de
+* Fri Sep 09 2005 ro@suse.de
- fix configure to find liblua
-* Wed Jul 20 2005 - anicka@suse.cz
+* Wed Jul 20 2005 anicka@suse.cz
- update to 0.7.1
-* Mon Jun 20 2005 - anicka@suse.cz
+* Mon Jun 20 2005 anicka@suse.cz
- update to 0.7.0
-* Wed Oct 13 2004 - mcihar@suse.cz
+* Wed Oct 13 2004 mcihar@suse.cz
- update to 0.6.0
- versioned dependancy on fillets-ng-data
-* Thu Aug 12 2004 - mcihar@suse.cz
+* Thu Aug 12 2004 mcihar@suse.cz
- version 0.5.0 doesn't require boost
-* Thu Aug 12 2004 - mcihar@suse.cz
+* Thu Aug 12 2004 mcihar@suse.cz
- update to 0.5.0
- split data to noarch package
-* Wed Aug 04 2004 - mcihar@suse.cz
+* Wed Aug 04 2004 mcihar@suse.cz
- update to 0.4.1
-* Mon May 10 2004 - mcihar@suse.cz
+* Mon May 10 2004 mcihar@suse.cz
- updated to 0.3.0:
* game world map
* save/load (F2/F3)
@@ -128,5 +136,5 @@
* two animated videos
* optional controls with spacebar and arrow keys
* How to Play manual
-* Fri Apr 23 2004 - mcihar@suse.cz
+* Fri Apr 23 2004 mcihar@suse.cz
- initial packaging
++++++ fillets-ng-0.7.4.tar.bz2 -> fillets-ng-0.8.0.tar.bz2 ++++++
++++ 2699 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/AUTHORS new/fillets-ng-0.8.0/AUTHORS
--- old/fillets-ng-0.7.4/AUTHORS 2006-12-17 22:24:25.000000000 +0100
+++ new/fillets-ng-0.8.0/AUTHORS 2007-12-22 00:54:39.000000000 +0100
@@ -29,6 +29,15 @@
Olov Gustavsson
- Swedish translation
+Marko Burjek
+- Slovenian translation
+
+Ricardo Faria
+- Brazilian Portuguese translation
+
+Leonid Myravjev
+- Russian translation
+
ALTAR interactive
- developed original game in 1998 (for Win32)
- released code and data under GNU/GPL in 03/2004
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/ChangeLog new/fillets-ng-0.8.0/ChangeLog
--- old/fillets-ng-0.7.4/ChangeLog 2006-12-20 22:16:49.000000000 +0100
+++ new/fillets-ng-0.8.0/ChangeLog 2007-12-22 01:02:25.000000000 +0100
@@ -1,3 +1,118 @@
+2007-12-22 00:55 fidlej
+
+ * AUTHORS: Updated AUTHORS.
+
+2007-12-22 00:53 fidlej
+
+ * README: Updated README.
+
+2007-12-21 23:36 fidlej
+
+ * fillets.6: Updated man page.
+
+2007-12-21 23:26 fidlej
+
+ * NEWS, configure.in: Preparing release 0.8.
+
+2007-12-21 23:25 fidlej
+
+ * src/: level/Controls.cpp, plan/ConsoleInput.cpp: Replaced
+ std::string.push_back() with append() (for BeOS).
+
+2007-12-15 17:25 fidlej
+
+ * NEWS: Fixed NEWS.
+
+2007-12-15 17:20 fidlej
+
+ * NEWS: Updated NEWS.
+
+2007-12-15 17:09 fidlej
+
+ * NEWS, configure.in: Prepared release-0_8_0-pre2.
+
+2007-12-15 14:31 fidlej
+
+ * src/level/: Controls.cpp, Controls.h, Level.cpp, StepCounter.h,
+ Unit.cpp, Unit.h: Undo is saved before every move down.
+
+2007-12-09 19:41 fidlej
+
+ * src/level/: Level.cpp, Level.h: Simplified undo saving.
+
+2007-12-09 18:26 fidlej
+
+ * src/level/Level.cpp: Fixed force undo save.
+
+2007-12-09 17:59 fidlej
+
+ * src/level/Level.cpp: Fixed saving of state to the correct moves.
+
+2007-12-01 17:39 fidlej
+
+ * src/level/: Cube.cpp, game-script.cpp: Optimized undo saving for
+ normal models.
+
+2007-12-01 16:31 fidlej
+
+ * src/level/: Controls.cpp, Controls.h, Level.cpp, Rules.h,
+ StepCounter.h, Unit.cpp: Saved only pushing and every 10th undo.
+
+2007-10-21 13:49 fidlej
+
+ * NEWS, configure.in: Preparing 0.8.0-pre1 release.
+
+2007-09-28 23:29 fidlej
+
+ * src/level/Rules.cpp: Fixed support for nowall moving stars.
+
+2007-09-28 22:55 fidlej
+
+ * src/level/: Cube.cpp, Cube.h, LevelScript.cpp, game-script.cpp,
+ game-script.h: Added support to save extra parameters.
+
+2007-09-28 20:55 fidlej
+
+ * src/level/: Controls.cpp, Controls.h, Level.cpp, Unit.cpp,
+ Unit.h: Last moving fish is activated after undo.
+
+2007-09-28 20:01 fidlej
+
+ * src/level/: Level.cpp, Rules.cpp: Fixed undo when a fish is out.
+
+2007-09-28 18:08 fidlej
+
+ * src/level/: Controls.h, Cube.h, Field.cpp, Field.h, Level.cpp,
+ Level.h, LevelInput.cpp, LevelInput.h, LevelLoading.h,
+ LevelScript.cpp, MarkMask.cpp, MarkMask.h, Room.cpp, Room.h,
+ Rules.cpp, Rules.h, game-script.cpp, game-script.h: Provided undo
+ on key minus.
+
+2007-09-28 18:06 fidlej
+
+ * src/level/LevelCountDown.cpp: Fixed English.
+
+2007-09-28 18:03 fidlej
+
+ * src/effect/EffectMirror.cpp: Fixed English.
+
+2007-06-30 17:31 fidlej
+
+ * src/plan/Title.cpp: Proper UTF-8 length calculation.
+
+2007-06-30 17:04 fidlej
+
+ * src/gengine/: Dialog.cpp, StringTool.cpp, StringTool.h: Fixed
+ dialog duration (thanks to Gregory Bonik and Egmont Koblinger).
+
+2007-06-30 16:50 fidlej
+
+ * NEWS: Used sentences without dots.
+
+2006-12-20 23:18 fidlej
+
+ * configure.in: More informative have_x11.
+
2006-12-17 23:02 fidlej
* NEWS: Updated news by Swedish translation.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/configure.in new/fillets-ng-0.8.0/configure.in
--- old/fillets-ng-0.7.4/configure.in 2006-12-17 23:18:38.000000000 +0100
+++ new/fillets-ng-0.8.0/configure.in 2007-12-21 23:24:58.000000000 +0100
@@ -5,7 +5,7 @@
# The AM_INIT_AUTOMAKE macro tells automake the name and version number
# of the software package so it can generate rules for building a source
# archive.
-AM_INIT_AUTOMAKE(fillets-ng, 0.7.4)
+AM_INIT_AUTOMAKE(fillets-ng, 0.8.0)
# Checks for programs.
AC_PROG_CXX
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/fillets.6 new/fillets-ng-0.8.0/fillets.6
--- old/fillets-ng-0.7.4/fillets.6 2005-04-18 17:04:20.000000000 +0200
+++ new/fillets-ng-0.8.0/fillets.6 2007-12-21 23:36:13.000000000 +0100
@@ -117,6 +117,8 @@
.PP
restart level - Backspace
.br
+undo - -
+.br
help - F1
.br
save game - F2
@@ -170,6 +172,34 @@
.br
- Polish translation
.PP
+César Catrián C.
+.br
+- Spanish translation
+.PP
+Astrid de Wijn
+.br
+- Dutch translation
+.PP
+Damyan Ivanov
+.br
+- Bulgarian translation
+.PP
+Olov Gustavsson
+.br
+- Swedish translation
+.PP
+Marko Burjek
+.br
+- Slovenian translation
+.PP
+Ricardo Faria
+.br
+- Brazilian Portuguese translation
+.PP
+Leonid Myravjev
+.br
+- Russian translation
+.PP
ALTAR interactive
.br
- developed original game in 1998 (for Win32)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/NEWS new/fillets-ng-0.8.0/NEWS
--- old/fillets-ng-0.7.4/NEWS 2006-12-17 23:02:14.000000000 +0100
+++ new/fillets-ng-0.8.0/NEWS 2007-12-21 23:24:30.000000000 +0100
@@ -1,8 +1,16 @@
+Fish Fillets NG - 0.8.0
+* Undo (on key '-')
+* Five extra levels (by Mirek Olsak)
+* Slovenian translation (by Marko Burjek)
+* Brazilian Portuguese translation (by Ricardo Faria)
+* Russian translation (by Leonid Myravjev, Maria Antropova, Gregory Bonik)
+
+
Fish Fillets NG - 0.7.4
-* One extra level (by Mirek Olsak).
-* Bulgarian translation (by Damyan Ivanov).
-* Swedish translation (by Olov Gustavsson).
-* Fixed table iterations for lua5.1.
+* One extra level (by Mirek Olsak)
+* Bulgarian translation (by Damyan Ivanov)
+* Swedish translation (by Olov Gustavsson)
+* Fixed table iterations for lua5.1
Fish Fillets NG - 0.7.3
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/README new/fillets-ng-0.8.0/README
--- old/fillets-ng-0.7.4/README 2005-04-17 14:14:13.000000000 +0200
+++ new/fillets-ng-0.8.0/README 2007-12-22 00:53:04.000000000 +0100
@@ -63,6 +63,7 @@
See also "How to Play" data/doc/html/manual.html
restart level - Backspace
+undo - -
help - F1
save game - F2
load game - F3
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/effect/EffectMirror.cpp new/fillets-ng-0.8.0/src/effect/EffectMirror.cpp
--- old/fillets-ng-0.7.4/src/effect/EffectMirror.cpp 2004-07-26 21:17:53.000000000 +0200
+++ new/fillets-ng-0.8.0/src/effect/EffectMirror.cpp 2007-09-04 23:46:00.000000000 +0200
@@ -15,7 +15,7 @@
/**
* Mirror effect. Draw left side inside.
* The pixel in the middle will be used as a mask.
- * NOTE: mirror object should be draw as the last.
+ * NOTE: mirror object should be drawn as the last.
*/
void
EffectMirror::blit(SDL_Surface *screen, SDL_Surface *surface, int x, int y)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/gengine/Dialog.cpp new/fillets-ng-0.8.0/src/gengine/Dialog.cpp
--- old/fillets-ng-0.7.4/src/gengine/Dialog.cpp 2004-09-25 17:38:58.000000000 +0200
+++ new/fillets-ng-0.8.0/src/gengine/Dialog.cpp 2007-06-30 16:48:05.000000000 +0200
@@ -86,7 +86,7 @@
int
Dialog::getMinTime() const
{
- return min(180, m_subtitle.size());
+ return min(180, StringTool::utf8Length(m_subtitle));
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/gengine/StringTool.cpp new/fillets-ng-0.8.0/src/gengine/StringTool.cpp
--- old/fillets-ng-0.7.4/src/gengine/StringTool.cpp 2004-08-18 23:37:41.000000000 +0200
+++ new/fillets-ng-0.8.0/src/gengine/StringTool.cpp 2007-06-30 16:55:12.000000000 +0200
@@ -98,3 +98,23 @@
return args;
}
+//-----------------------------------------------------------------
+/**
+ * Return number of Unicode entities inside given UTF-8 text.
+ */
+ int
+StringTool::utf8Length(const std::string &str) {
+ int length = 0;
+ const char *p = str.c_str();
+ char c;
+ // How to recognize entity:
+ // Unicode entities start with 0xxxxxxx or 11xxxxxx,
+ // the other bytes start with 10xxxxxx.
+ // (thanks to Egmont Koblinger)
+ while ((c = *p++) != 0) {
+ if ((c & 0xC0) != 0x80) {
+ length++;
+ }
+ }
+ return length;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/gengine/StringTool.h new/fillets-ng-0.8.0/src/gengine/StringTool.h
--- old/fillets-ng-0.7.4/src/gengine/StringTool.h 2004-08-18 23:36:54.000000000 +0200
+++ new/fillets-ng-0.8.0/src/gengine/StringTool.h 2007-06-30 16:46:33.000000000 +0200
@@ -19,6 +19,7 @@
static void replace(std::string &buffer,
const std::string &pattern, const std::string &newstring);
static t_args split(const std::string &str, char separator);
+ static int utf8Length(const std::string &str);
};
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Controls.cpp new/fillets-ng-0.8.0/src/level/Controls.cpp
--- old/fillets-ng-0.7.4/src/level/Controls.cpp 2004-11-19 00:06:48.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/Controls.cpp 2007-12-18 21:15:41.000000000 +0100
@@ -152,7 +152,7 @@
}
if (moved != ControlSym::SYM_NONE) {
- m_moves.push_back(moved);
+ m_moves.append(1, moved);
}
return (moved != ControlSym::SYM_NONE);
}
@@ -281,6 +281,34 @@
return false;
}
//-----------------------------------------------------------------
+ void
+Controls::setMoves(const std::string &moves)
+{
+ m_moves = moves;
+ if (!m_moves.empty()) {
+ activateDriven(m_moves[m_moves.size() - 1]);
+ }
+}
+//-----------------------------------------------------------------
+/**
+ * Activate fish driven by given symbol.
+ * @param symbol one of fish symbols
+ * @return true when fish was selected
+ */
+bool
+Controls::activateDriven(char symbol)
+{
+ t_units::iterator end = m_units.end();
+ for (t_units::iterator i = m_units.begin(); i != end; ++i) {
+ if ((*i)->isDrivenBy(symbol)) {
+ m_active = i;
+ m_switch = true;
+ return true;
+ }
+ }
+ return false;
+}
+//-----------------------------------------------------------------
/**
* Change active unit.
* NOTE: change is without switch animation
@@ -305,7 +333,7 @@
for (t_units::iterator i = m_units.begin(); i != end; ++i) {
if ((*i)->driveOrder(move) == move) {
setActive(i);
- m_moves.push_back(move);
+ m_moves.append(1, move);
return true;
}
}
@@ -339,5 +367,19 @@
}
return result;
}
+//-----------------------------------------------------------------
+/**
+ * Returns true when active fish is doing a dangerous move.
+ */
+bool
+Controls::isDangerousMove() const
+{
+ bool result = false;
+ if (m_active != m_units.end()) {
+ result = (*m_active)->isPushing()
+ || (*m_active)->isMovingDown();
+ }
+ return result;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Controls.h new/fillets-ng-0.8.0/src/level/Controls.h
--- old/fillets-ng-0.7.4/src/level/Controls.h 2004-11-18 23:58:16.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/Controls.h 2007-12-15 14:24:45.000000000 +0100
@@ -36,9 +36,11 @@
bool driveUnit(const InputProvider *input);
void setActive(t_units::iterator active);
int getNeededPhases(int speedup) const;
+ bool activateDriven(char symbol);
public:
Controls(PhaseLocker *locker);
~Controls();
+ void setMoves(const std::string &moves);
void addUnit(Unit *unit);
const Unit *getActive();
@@ -56,6 +58,7 @@
virtual int getStepCount() const { return m_moves.size(); }
virtual std::string getMoves() const { return m_moves; }
virtual bool isPowerful() const;
+ virtual bool isDangerousMove() const;
};
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Cube.cpp new/fillets-ng-0.8.0/src/level/Cube.cpp
--- old/fillets-ng-0.7.4/src/level/Cube.cpp 2004-09-07 13:17:44.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/Cube.cpp 2007-12-01 17:34:43.000000000 +0100
@@ -97,11 +97,16 @@
return m_rules->getDir();
}
//-----------------------------------------------------------------
+/**
+ * Set params for special 'output_DIR' model.
+ * Used just for the 'spuntik' in windoze level.
+ */
void
-Cube::setOutDir(Dir::eDir dir)
+Cube::setOutDir(Dir::eDir dir, int capacity, eWeight weight)
{
- m_outCapacity = 2;
+ m_outCapacity = capacity;
m_outDir = dir;
+ m_weight = weight;
}
//-----------------------------------------------------------------
/**
@@ -116,6 +121,7 @@
if (m_outCapacity == 0) {
m_outDir = Dir::DIR_NO;
m_weight = LIGHT;
+ m_outCapacity = -1;
}
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Cube.h new/fillets-ng-0.8.0/src/level/Cube.h
--- old/fillets-ng-0.7.4/src/level/Cube.h 2004-10-08 21:25:42.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/Cube.h 2007-12-01 17:34:44.000000000 +0100
@@ -63,7 +63,7 @@
void change_goOut();
void change_remove();
void change_turnSide();
- void change_setLocation(V2 loc) { m_loc = loc; }
+ void change_setLocation(const V2 &loc) { m_loc = loc; }
V2 getLocation() const { return m_loc; }
bool isAlive() const { return m_alive; }
@@ -81,7 +81,10 @@
Dir::eDir getLastMoveDir() const;
bool isOutDir(Dir::eDir dir) const { return m_outDir == dir; }
- void setOutDir(Dir::eDir outDir);
+ Dir::eDir getOutDir() { return m_outDir; }
+ int getOutCapacity() { return m_outCapacity; }
+ void setOutDir(Dir::eDir outDir,
+ int capacity=2, eWeight weight=Cube::FIXED);
void decOutCapacity();
bool isTalking() const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Field.cpp new/fillets-ng-0.8.0/src/level/Field.cpp
--- old/fillets-ng-0.7.4/src/level/Field.cpp 2004-09-14 14:35:41.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/Field.cpp 2007-09-28 16:37:58.000000000 +0200
@@ -66,15 +66,20 @@
/**
* Mark this location as occupied by model.
* Locations out of field will not be filled.
+ * @param loc write location
+ * @param model model to put on given location
+ * @param toOverride allowed model to overwrite or NULL
*/
void
-Field::setModel(const V2 &loc, Cube *model)
+Field::setModel(const V2 &loc, Cube *model, Cube *toOverride)
{
int x = loc.getX();
int y = loc.getY();
if ((0 <= x && x < m_w) && (0 <= y && y < m_h)) {
- m_marks[y][x] = model;
+ if (toOverride == NULL || m_marks[y][x] == toOverride) {
+ m_marks[y][x] = model;
+ }
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Field.h new/fillets-ng-0.8.0/src/level/Field.h
--- old/fillets-ng-0.7.4/src/level/Field.h 2004-09-10 14:49:41.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/Field.h 2007-09-28 16:38:08.000000000 +0200
@@ -23,7 +23,7 @@
int getH() const { return m_h; }
Cube *getModel(const V2 &loc);
- void setModel(const V2 &loc, Cube *model);
+ void setModel(const V2 &loc, Cube *model, Cube *toOverride);
};
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/game-script.cpp new/fillets-ng-0.8.0/src/level/game-script.cpp
--- old/fillets-ng-0.7.4/src/level/game-script.cpp 2006-11-30 12:23:51.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/game-script.cpp 2007-12-01 17:35:04.000000000 +0100
@@ -584,6 +584,24 @@
}
//-----------------------------------------------------------------
/**
+ * void model_change_setLocation(model_index, x, y)
+ * Change model position (used to load undo).
+ */
+ int
+script_model_change_setLocation(lua_State *L) throw()
+{
+ BEGIN_NOEXCEPTION;
+ int model_index = luaL_checkint(L, 1);
+ int x = luaL_checkint(L, 2);
+ int y = luaL_checkint(L, 3);
+ Cube *model = getModel(L, model_index);
+ model->rules()->change_setLocation(V2(x, y));
+
+ END_NOEXCEPTION;
+ return 0;
+}
+//-----------------------------------------------------------------
+/**
* void model_setViewShift(model_index, shift_x, shift_y)
* Shift view (used for obsolete animation effects).
*/
@@ -634,6 +652,72 @@
END_NOEXCEPTION;
return 0;
}
+//-----------------------------------------------------------------
+/**
+ * table model_getExtraParams(model_index)
+ *
+ * Returns extra parameters needed to restore after undo.
+ */
+ int
+script_model_getExtraParams(lua_State *L) throw()
+{
+ BEGIN_NOEXCEPTION;
+ int model_index = luaL_checkint(L, 1);
+ Cube *model = getModel(L, model_index);
+
+ if (model->getOutCapacity() != 0) {
+ lua_newtable(L);
+ lua_pushstring(L, "outDir");
+ lua_pushnumber(L, model->getOutDir());
+ lua_settable(L, -3);
+
+ lua_pushstring(L, "outCapacity");
+ lua_pushnumber(L, model->getOutCapacity());
+ lua_settable(L, -3);
+
+ lua_pushstring(L, "weight");
+ lua_pushnumber(L, model->getWeight());
+ lua_settable(L, -3);
+ }
+ else {
+ lua_pushnil(L);
+ }
+
+ END_NOEXCEPTION;
+ return 1;
+}
+//-----------------------------------------------------------------
+/**
+ * void model_change_setExtraParams(model_index, table)
+ *
+ * Restores extra parameters after undo.
+ */
+ int
+script_model_change_setExtraParams(lua_State *L) throw()
+{
+ BEGIN_NOEXCEPTION;
+ int model_index = luaL_checkint(L, 1);
+
+ if (!lua_isnil(L, 2)) {
+ lua_pushstring(L, "outDir");
+ lua_gettable(L, 2);
+ int outDir = luaL_checkint(L, -1);
+
+ lua_pushstring(L, "outCapacity");
+ lua_gettable(L, 2);
+ int outCapacity = luaL_checkint(L, -1);
+
+ lua_pushstring(L, "weight");
+ lua_gettable(L, 2);
+ int weight = luaL_checkint(L, -1);
+
+ Cube *model = getModel(L, model_index);
+ model->setOutDir((Dir::eDir)outDir, outCapacity, (Cube::eWeight)weight);
+ }
+
+ END_NOEXCEPTION;
+ return 0;
+}
//-----------------------------------------------------------------
/**
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/game-script.h new/fillets-ng-0.8.0/src/level/game-script.h
--- old/fillets-ng-0.7.4/src/level/game-script.h 2004-09-24 22:35:15.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/game-script.h 2007-09-28 22:33:40.000000000 +0200
@@ -33,9 +33,12 @@
extern int script_model_getH(lua_State *L) throw();
extern int script_model_setGoal(lua_State *L) throw();
extern int script_model_change_turnSide(lua_State *L) throw();
+extern int script_model_change_setLocation(lua_State *L) throw();
extern int script_model_setViewShift(lua_State *L) throw();
extern int script_model_getViewShift(lua_State *L) throw();
extern int script_model_setBusy(lua_State *L) throw();
+extern int script_model_getExtraParams(lua_State *L) throw();
+extern int script_model_change_setExtraParams(lua_State *L) throw();
extern int script_model_equals(lua_State *L) throw();
extern int script_sound_addSound(lua_State *L) throw();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/LevelCountDown.cpp new/fillets-ng-0.8.0/src/level/LevelCountDown.cpp
--- old/fillets-ng-0.7.4/src/level/LevelCountDown.cpp 2004-11-19 00:08:44.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/LevelCountDown.cpp 2007-09-24 19:50:47.000000000 +0200
@@ -42,7 +42,7 @@
//-----------------------------------------------------------------
/**
* Countdown to zero.
- * @param advisor advisor which known usable coundown values
+ * @param advisor advisor which know usable coundown values
* @return true when counter is at zero
*/
bool
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Level.cpp new/fillets-ng-0.8.0/src/level/Level.cpp
--- old/fillets-ng-0.7.4/src/level/Level.cpp 2006-11-30 12:05:48.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/Level.cpp 2007-12-15 14:19:05.000000000 +0100
@@ -46,6 +46,7 @@
{
m_desc = NULL;
m_restartCounter = 1;
+ m_insideUndo = false;
m_depth = depth;
m_newRound = false;
m_locker = new PhaseLocker();
@@ -211,6 +212,29 @@
}
//-----------------------------------------------------------------
/**
+ * Save state for undo.
+ * Should be called after a player move,
+ * but still before level script update.
+ * @param oldMoves moves before the last move
+ */
+ void
+Level::saveUndo(const std::string &oldMoves)
+{
+ if (oldMoves.empty()) {
+ return;
+ }
+
+ if (m_levelScript->isRoom()) {
+ Room *room = m_levelScript->room();
+ bool forceSave = room->stepCounter()->isDangerousMove();
+
+ std::string forceSaveValue = forceSave ? "true" : "false";
+ m_levelScript->scriptDo("script_saveUndo(\""
+ + oldMoves + "\"," + forceSaveValue + ")");
+ }
+}
+//-----------------------------------------------------------------
+/**
* Finish complete level.
* Save solution.
*/
@@ -240,7 +264,15 @@
Level::nextPlayerAction()
{
if (m_levelScript->isRoom()) {
- m_levelScript->room()->nextRound(getInput());
+ Room *room = m_levelScript->room();
+ bool wasSolvable = room->isSolvable();
+ std::string oldMoves = room->stepCounter()->getMoves();
+ room->nextRound(getInput());
+
+ unsigned int stepsAfter = room->stepCounter()->getStepCount();
+ if (wasSolvable && stepsAfter != oldMoves.size()) {
+ saveUndo(oldMoves);
+ }
}
}
@@ -293,7 +325,14 @@
void
Level::loadGame(const std::string &moves)
{
- m_loading->loadGame(moves);
+ if (m_insideUndo) {
+ if (m_levelScript->isRoom()) {
+ m_levelScript->room()->setMoves(moves);
+ }
+ }
+ else {
+ m_loading->loadGame(moves);
+ }
}
//-----------------------------------------------------------------
/**
@@ -341,8 +380,8 @@
{
own_cleanState();
m_restartCounter++;
- //TODO: is ok to run the script on second time?
- //NOTE: planned show remains after restart
+ //NOTE: The script is just overridden by itself,
+ // so planned shows and undo remain after restart.
own_initState();
return true;
}
@@ -387,6 +426,7 @@
m_restartCounter--;
action_restart();
m_levelScript->scriptInclude(file);
+ m_insideUndo = false;
m_levelScript->scriptDo("script_load()");
}
else {
@@ -395,7 +435,22 @@
}
return true;
}
+//-----------------------------------------------------------------
+/**
+ * Naive undo by reloading the level.
+ */
+ bool
+Level::action_undo()
+{
+ if (m_levelScript->isRoom()) {
+ m_restartCounter--;
+ action_restart();
+ m_insideUndo = true;
+ m_levelScript->scriptDo("script_loadUndo()");
+ }
+ return true;
+}
//-----------------------------------------------------------------
void
Level::switchFish()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Level.h new/fillets-ng-0.8.0/src/level/Level.h
--- old/fillets-ng-0.7.4/src/level/Level.h 2004-09-10 22:17:00.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/Level.h 2007-12-09 19:14:53.000000000 +0100
@@ -42,12 +42,14 @@
LevelCountDown *m_countdown;
CommandQueue *m_show;
int m_restartCounter;
+ bool m_insideUndo;
MultiDrawer *m_background;
StatusDisplay *m_statusDisplay;
private:
void initScreen();
void nextAction();
void updateLevel();
+ void saveUndo(const std::string &oldMoves);
void finishLevel();
void nextLoadAction();
void nextShowAction();
@@ -77,6 +79,7 @@
bool action_move(char symbol);
bool action_save();
bool action_load();
+ bool action_undo();
void switchFish();
void controlEvent(const KeyStroke &stroke);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/LevelInput.cpp new/fillets-ng-0.8.0/src/level/LevelInput.cpp
--- old/fillets-ng-0.7.4/src/level/LevelInput.cpp 2005-04-17 12:23:19.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/LevelInput.cpp 2007-09-04 21:04:46.000000000 +0200
@@ -30,6 +30,10 @@
KeyDesc(KEY_RESTART, "restart"));
m_keymap->registerKey(KeyStroke(SDLK_F5, KMOD_NONE),
KeyDesc(KEY_SHOW_STEPS, "show number of steps"));
+
+ KeyDesc undo = KeyDesc(KEY_UNDO, "undo");
+ m_keymap->registerKey(KeyStroke(SDLK_MINUS, KMOD_NONE), undo);
+ m_keymap->registerKey(KeyStroke(SDLK_KP_MINUS, KMOD_NONE), undo);
}
//-----------------------------------------------------------------
Level *
@@ -60,6 +64,10 @@
getLevel()->interruptShow();
getLevel()->action_restart();
break;
+ case KEY_UNDO:
+ getLevel()->interruptShow();
+ getLevel()->action_undo();
+ break;
case KEY_SHOW_STEPS:
toggleParam("show_steps");
break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/LevelInput.h new/fillets-ng-0.8.0/src/level/LevelInput.h
--- old/fillets-ng-0.7.4/src/level/LevelInput.h 2004-09-27 01:50:06.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/LevelInput.h 2007-09-04 21:02:41.000000000 +0200
@@ -16,7 +16,8 @@
static const int KEY_SAVE = 102;
static const int KEY_LOAD = 103;
static const int KEY_RESTART = 104;
- static const int KEY_SHOW_STEPS = 105;
+ static const int KEY_UNDO = 105;
+ static const int KEY_SHOW_STEPS = 106;
private:
Level *getLevel();
protected:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/LevelLoading.h new/fillets-ng-0.8.0/src/level/LevelLoading.h
--- old/fillets-ng-0.7.4/src/level/LevelLoading.h 2004-08-25 21:21:30.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/LevelLoading.h 2007-09-04 21:56:29.000000000 +0200
@@ -21,6 +21,7 @@
RoomAccess *m_access;
public:
LevelLoading(RoomAccess *access);
+ void setLoadSpeed(int loadSpeed) { m_loadSpeed = loadSpeed; }
void reset();
void loadGame(const std::string &moves);
void loadReplay(const std::string &moves);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/LevelScript.cpp new/fillets-ng-0.8.0/src/level/LevelScript.cpp
--- old/fillets-ng-0.7.4/src/level/LevelScript.cpp 2004-10-08 21:27:56.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/LevelScript.cpp 2007-09-28 22:33:39.000000000 +0200
@@ -145,11 +145,16 @@
m_script->registerFunc("model_setGoal", script_model_setGoal);
m_script->registerFunc("model_change_turnSide",
script_model_change_turnSide);
+ m_script->registerFunc("model_change_setLocation",
+ script_model_change_setLocation);
m_script->registerFunc("model_setViewShift",
script_model_setViewShift);
m_script->registerFunc("model_getViewShift",
script_model_getViewShift);
m_script->registerFunc("model_setBusy", script_model_setBusy);
+ m_script->registerFunc("model_getExtraParams", script_model_getExtraParams);
+ m_script->registerFunc("model_change_setExtraParams",
+ script_model_change_setExtraParams);
m_script->registerFunc("model_equals", script_model_equals);
m_script->registerFunc("sound_addSound", script_sound_addSound);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/MarkMask.cpp new/fillets-ng-0.8.0/src/level/MarkMask.cpp
--- old/fillets-ng-0.7.4/src/level/MarkMask.cpp 2004-09-10 15:49:28.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/MarkMask.cpp 2007-09-28 16:38:54.000000000 +0200
@@ -70,7 +70,7 @@
void
MarkMask::mask()
{
- writeModel(m_model);
+ writeModel(m_model, NULL);
}
//-----------------------------------------------------------------
/**
@@ -79,18 +79,18 @@
void
MarkMask::unmask()
{
- writeModel(NULL);
+ writeModel(NULL, m_model);
}
//-----------------------------------------------------------------
void
-MarkMask::writeModel(Cube *model)
+MarkMask::writeModel(Cube *model, Cube *toOverride)
{
V2 loc = m_model->getLocation();
const Shape *shape = m_model->shape();
Shape::const_iterator end = shape->marksEnd();
for (Shape::const_iterator i = shape->marksBegin(); i != end; ++i) {
V2 mark = loc.plus(*i);
- m_field->setModel(mark, model);
+ m_field->setModel(mark, model, toOverride);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/MarkMask.h new/fillets-ng-0.8.0/src/level/MarkMask.h
--- old/fillets-ng-0.7.4/src/level/MarkMask.h 2004-09-10 15:34:52.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/MarkMask.h 2007-09-28 16:39:00.000000000 +0200
@@ -16,7 +16,7 @@
Cube *m_model;
Field *m_field;
private:
- void writeModel(Cube *model);
+ void writeModel(Cube *model, Cube *toOverride);
bool isBorderDir(Dir::eDir dir) const;
bool isInRoom() const;
public:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Room.cpp new/fillets-ng-0.8.0/src/level/Room.cpp
--- old/fillets-ng-0.7.4/src/level/Room.cpp 2005-03-13 03:11:55.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/Room.cpp 2007-12-09 19:40:17.000000000 +0100
@@ -347,6 +347,12 @@
}
//-----------------------------------------------------------------
void
+Room::setMoves(const std::string &moves)
+{
+ m_controls->setMoves(moves);
+}
+//-----------------------------------------------------------------
+ void
Room::checkActive()
{
return m_controls->checkActive();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Room.h new/fillets-ng-0.8.0/src/level/Room.h
--- old/fillets-ng-0.7.4/src/level/Room.h 2004-11-19 00:07:52.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/Room.h 2007-09-28 20:46:40.000000000 +0200
@@ -75,6 +75,7 @@
void checkActive();
void unBusyUnits();
const StepCounter *stepCounter() const;
+ void setMoves(const std::string &moves);
int getW() const;
int getH() const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Rules.cpp new/fillets-ng-0.8.0/src/level/Rules.cpp
--- old/fillets-ng-0.7.4/src/level/Rules.cpp 2006-11-30 18:31:20.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/Rules.cpp 2007-12-09 19:37:42.000000000 +0100
@@ -95,6 +95,24 @@
}
//-----------------------------------------------------------------
/**
+ * Force model to a new position.
+ * Used just for undo loading.
+ */
+ void
+Rules::change_setLocation(const V2 &loc)
+{
+ m_mask->unmask();
+ //HACK: model.out flag is recognized by its location
+ if (loc.getX() < 0 && loc.getY() < 0) {
+ m_model->change_goOut();
+ }
+ else {
+ m_model->change_setLocation(loc);
+ m_mask->mask();
+ }
+}
+//-----------------------------------------------------------------
+/**
* Check dead fishes.
* Fish is dead:
* - when any model moves in dir != Dir::DIR_UP
@@ -511,7 +529,7 @@
//-----------------------------------------------------------------
/**
* There is one special case.
- * When model touch output_DIR then it goes out.
+ * When model touches output_DIR then it goes out.
* This is used only in level 'windoze'.
*/
bool
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Rules.h new/fillets-ng-0.8.0/src/level/Rules.h
--- old/fillets-ng-0.7.4/src/level/Rules.h 2004-09-14 16:01:00.000000000 +0200
+++ new/fillets-ng-0.8.0/src/level/Rules.h 2007-12-01 16:20:42.000000000 +0100
@@ -52,6 +52,7 @@
Rules(Cube *model);
~Rules();
void takeField(Field *field);
+ void change_setLocation(const V2 &loc);
void occupyNewPos();
bool checkDead(Cube::eAction lastAction);
@@ -73,6 +74,7 @@
bool isAtBorder() const;
bool isFreePlace(const V2 &loc) const;
const Cube::t_models getResist(Dir::eDir dir) const;
+ bool isPushing() const { return m_pushing; };
};
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/StepCounter.h new/fillets-ng-0.8.0/src/level/StepCounter.h
--- old/fillets-ng-0.7.4/src/level/StepCounter.h 2004-11-18 23:54:06.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/StepCounter.h 2007-12-15 14:24:59.000000000 +0100
@@ -12,6 +12,7 @@
virtual int getStepCount() const = 0;
virtual std::string getMoves() const = 0;
virtual bool isPowerful() const = 0;
+ virtual bool isDangerousMove() const = 0;
};
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Unit.cpp new/fillets-ng-0.8.0/src/level/Unit.cpp
--- old/fillets-ng-0.7.4/src/level/Unit.cpp 2004-11-18 23:57:38.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/Unit.cpp 2007-12-15 14:25:22.000000000 +0100
@@ -236,6 +236,12 @@
}
//-----------------------------------------------------------------
bool
+Unit::isMovingDown() const
+{
+ return m_model->rules()->getDir() == Dir::DIR_DOWN;
+}
+//-----------------------------------------------------------------
+bool
Unit::isTurning() const
{
std::string action = m_model->rules()->getAction();
@@ -245,7 +251,16 @@
bool
Unit::isPushing() const
{
- return m_model->rules()->getState() == "pushing";
+ return m_model->rules()->isPushing();
+}
+//-----------------------------------------------------------------
+bool
+Unit::isDrivenBy(char symbol) const
+{
+ return m_symbols.getLeft() == symbol
+ || m_symbols.getRight() == symbol
+ || m_symbols.getUp() == symbol
+ || m_symbols.getDown() == symbol;
}
//-----------------------------------------------------------------
/**
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/level/Unit.h new/fillets-ng-0.8.0/src/level/Unit.h
--- old/fillets-ng-0.7.4/src/level/Unit.h 2004-11-18 23:57:46.000000000 +0100
+++ new/fillets-ng-0.8.0/src/level/Unit.h 2007-12-15 14:24:05.000000000 +0100
@@ -45,8 +45,10 @@
char driveOrder(char move);
bool isMoving() const;
+ bool isMovingDown() const;
bool isTurning() const;
bool isPushing() const;
+ bool isDrivenBy(char symbol) const;
bool equalsModel(const Cube *other) const;
V2 getLoc() const;
int getW() const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/plan/ConsoleInput.cpp new/fillets-ng-0.8.0/src/plan/ConsoleInput.cpp
--- old/fillets-ng-0.7.4/src/plan/ConsoleInput.cpp 2005-04-17 12:23:19.000000000 +0200
+++ new/fillets-ng-0.8.0/src/plan/ConsoleInput.cpp 2007-12-18 21:15:08.000000000 +0100
@@ -95,7 +95,7 @@
char c = stroke.getUnicode() & 0x7F;
if (isprint(c)) {
std::string input = getConsole()->getInput();
- input.push_back(c);
+ input.append(1, c);
getConsole()->setInput(input);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fillets-ng-0.7.4/src/plan/Title.cpp new/fillets-ng-0.8.0/src/plan/Title.cpp
--- old/fillets-ng-0.7.4/src/plan/Title.cpp 2005-08-21 00:33:23.000000000 +0200
+++ new/fillets-ng-0.8.0/src/plan/Title.cpp 2007-06-30 17:23:45.000000000 +0200
@@ -11,6 +11,7 @@
#include "Font.h"
#include "Color.h"
#include "OptionAgent.h"
+#include "StringTool.h"
//-----------------------------------------------------------------
/**
@@ -41,7 +42,7 @@
m_y = m_screenH - baseY;
m_finalY = m_screenH - finalY;
m_limitY = m_screenH - limitY;
- m_mintime = m_content.size() * TIME_PER_CHAR;
+ m_mintime = StringTool::utf8Length(m_content) * TIME_PER_CHAR;
if (m_mintime < TIME_MIN) {
m_mintime = TIME_MIN;
}
++++++ fillets-ng-0.8.0-undeclared.patch ++++++
Index: src/gengine/OptionAgent.cpp
===================================================================
--- src/gengine/OptionAgent.cpp.orig
+++ src/gengine/OptionAgent.cpp
@@ -25,6 +25,7 @@
#include //strlen
#include //setlocale
+#include <cstdlib> //getenv
#ifndef LC_MESSAGES
#define LC_MESSAGES LC_CTYPE
Index: src/gengine/StringTool.cpp
===================================================================
--- src/gengine/StringTool.cpp.orig
+++ src/gengine/StringTool.cpp
@@ -7,7 +7,7 @@
* (at your option) any later version.
*/
#include "StringTool.h"
-
+#include
#include <sstream>
//-----------------------------------------------------------------
Index: src/level/Landslip.cpp
===================================================================
--- src/level/Landslip.cpp.orig
+++ src/level/Landslip.cpp
@@ -6,6 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
+#include
#include "Landslip.h"
#include "Rules.h"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org