Tags: patch Atteched there is the debdiff that incorporate the new upstream commit. I also addressed some lintian warning about the copyright file and bumped the Standard-Version (no changes was required).
--
regards,
Mattia Rizzolo
GPG Key: 4096R/B9444540 http://goo.gl/I8TMB
more about me: http://mapreri.org
Launchpad User: https://launchpad.net/~mapreri
Ubuntu Wiki page: https://wiki.ubuntu.com/MattiaRizzolo
diff -Nru numptyphysics-0.2+svn156/Canvas.cpp
numptyphysics-0.2+svn157/Canvas.cpp
--- numptyphysics-0.2+svn156/Canvas.cpp 2010-04-08 11:42:24.000000000 +0200
+++ numptyphysics-0.2+svn157/Canvas.cpp 2013-12-26 18:09:15.000000000 +0100
@@ -347,6 +347,22 @@
SDL_UnlockSurface(SURFACE(this));
}
+#if 0
+inline uint32 avg2Pixels565(uint32 a, uint32 b)
+{
+ return (((a^b)&0xf7def7de)>>1) + (a&b);
+}
+
+inline uint16 avgPixels565(uint32 ab)
+{
+ uint16 a = ab >> 16;
+ uint16 v = ab & 0xffff;
+
+ return (((a^b)&0xf7def7de)>>1) + (a&b);
+}
+#endif
+
+
Canvas* Canvas::scale( int factor ) const
{
Canvas *c = new Canvas( width()/factor, height()/factor );
diff -Nru numptyphysics-0.2+svn156/debian/changelog
numptyphysics-0.2+svn157/debian/changelog
--- numptyphysics-0.2+svn156/debian/changelog 2013-12-17 10:45:41.000000000
+0100
+++ numptyphysics-0.2+svn157/debian/changelog 2013-12-28 11:43:23.000000000
+0100
@@ -1,3 +1,16 @@
+numptyphysics (0.2+svn157-0.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * New upstream svn commit. (Closes: #732336)
+ * debian/changelog:
+ + Fix unversioned-copyright-format-uri lintian pedantic warning;
+ + Fix obsolete-field-in-dep5-copyright format-specification lintian warning;
+ + Fix ambiguous-paragraph-in-dep5-copyright lintian warning;
+ + Fix comma-separated-files-in-dep5-copyright lintian warning.
+ * debian/control: Bump Standard-Version to 3.9.5, no changes required.
+
+ -- Mattia Rizzolo <[email protected]> Sat, 28 Dec 2013 11:41:37 +0100
+
numptyphysics (0.2+svn156-1.2) unstable; urgency=low
* Non-maintainer upload.
diff -Nru numptyphysics-0.2+svn156/debian/control
numptyphysics-0.2+svn157/debian/control
--- numptyphysics-0.2+svn156/debian/control 2010-06-20 17:12:32.000000000
+0200
+++ numptyphysics-0.2+svn157/debian/control 2013-12-26 19:13:58.000000000
+0100
@@ -8,7 +8,7 @@
# libhildon-1-dev,
# libosso-dev, libdbus-1-dev, mce-dev, osso-af-settings
Build-Conflicts: autoconf2.13, automake1.4
-Standards-Version: 3.8.4
+Standards-Version: 3.9.5
Homepage: http://numptyphysics.garage.maemo.org/
Package: numptyphysics
diff -Nru numptyphysics-0.2+svn156/debian/copyright
numptyphysics-0.2+svn157/debian/copyright
--- numptyphysics-0.2+svn156/debian/copyright 2010-02-12 20:12:16.000000000
+0100
+++ numptyphysics-0.2+svn157/debian/copyright 2013-12-26 19:14:02.000000000
+0100
@@ -1,14 +1,15 @@
-Format-Specification: http://dep.debian.net/deps/dep5/
-Name: numptyphysics
-Maintainer: Tim Edmonds <[email protected]>
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: numptyphysics
+Upstream-Contact: Tim Edmonds <[email protected]>
Source: http://numptyphysics.garage.maemo.org/
+Files: *
Copyright: 2008-2010, Tim Edmonds <[email protected]>
License: GPL-3+
On Debian systems the full text of the GNU General Public License
can be found in the `/usr/share/common-licenses/GPL-3' file.
-Files: happyhttp.{cpp,h}
+Files: happyhttp.cpp happyhttp.h
Copyright: 2006, Ben Campbell <[email protected]>
License: ZLIB
diff -Nru numptyphysics-0.2+svn156/Dialogs.cpp
numptyphysics-0.2+svn157/Dialogs.cpp
--- numptyphysics-0.2+svn156/Dialogs.cpp 2010-04-08 11:45:23.000000000
+0200
+++ numptyphysics-0.2+svn157/Dialogs.cpp 2013-12-26 18:09:15.000000000
+0100
@@ -60,8 +60,8 @@
"<H2>Game Options</H2>"
"<LI>Menu -- access the Main Menu.<P>"
"<LI>Reset -- reset the level to its original state.<P>"
- "<LI>Share -- share your modified level (unimplemented).<P>"
- "<LI>Save -- save your modified level (unimplemented). <P>"
+ "<LI>Skip -- skip to the next level.<P>"
+ "<LI>Edit -- edit this level or create a new level.<P>"
;
diff -Nru numptyphysics-0.2+svn156/Game.cpp numptyphysics-0.2+svn157/Game.cpp
--- numptyphysics-0.2+svn156/Game.cpp 2010-04-08 11:45:23.000000000 +0200
+++ numptyphysics-0.2+svn157/Game.cpp 2013-12-26 18:09:16.000000000 +0100
@@ -173,26 +173,12 @@
void saveDemo()
{
- std::string demoname = m_levels->levelName(m_level,false);
- size_t sep = demoname.rfind(Os::pathSep);
- if (sep != std::string::npos) {
- demoname = demoname.substr(sep);
- }
- if (demoname.substr(demoname.length()-4) == ".nph") {
- demoname.resize(demoname.length()-4);
- }
- int c = m_levels->collectionFromLevel(m_level);
- std::string path = Config::userDataDir() + Os::pathSep
- + "Recordings" + Os::pathSep
- + m_levels->collectionName(c,false);
- if (path.substr(path.length()-4) == ".npz") {
- path.resize(path.length()-4);
- }
+ std::string path = m_levels->demoPath(m_level);
OS->ensurePath(path);
- demoname = path + Os::pathSep + demoname + ".npd";
+ path = m_levels->demoName(m_level);
fprintf(stderr,"saving demo of level %d to %s\n",
- m_level, demoname.c_str());
- m_scene.save(demoname, true);
+ m_level, path.c_str());
+ m_scene.save(path, true);
}
void clickMode(int cm)
@@ -487,7 +473,16 @@
gotoLevel( m_level );
break;
case Event::NEXT:
- gotoLevel( m_level+1 );
+ if (m_level==0 && m_isCompleted) {
+ // from title try to find the first uncompleted level
+ while (m_level < m_levels->numLevels()
+ && m_os->exists(m_levels->demoName(m_level))) {
+ m_level++;
+ }
+ gotoLevel( m_level );
+ } else {
+ gotoLevel( m_level+1 );
+ }
break;
case Event::PREVIOUS:
gotoLevel( m_level-1 );
diff -Nru numptyphysics-0.2+svn156/Levels.cpp
numptyphysics-0.2+svn157/Levels.cpp
--- numptyphysics-0.2+svn156/Levels.cpp 2010-04-08 11:45:23.000000000 +0200
+++ numptyphysics-0.2+svn157/Levels.cpp 2013-12-26 18:09:15.000000000 +0100
@@ -20,6 +20,7 @@
#include "Levels.h"
#include "ZipFile.h"
+#include "Config.h"
#include "Os.h"
using namespace std;
@@ -285,6 +286,37 @@
}
+std::string Levels::demoPath(int l)
+{
+ int c = collectionFromLevel(l);
+ std::string path = Config::userDataDir() + Os::pathSep
+ + "Recordings" + Os::pathSep
+ + collectionName(c,false);
+ if (path.substr(path.length()-4) == ".npz") {
+ path.resize(path.length()-4);
+ }
+ return path;
+}
+
+std::string Levels::demoName(int l)
+{
+ std::string name = levelName(l,false);
+ size_t sep = name.rfind(Os::pathSep);
+ if (sep != std::string::npos) {
+ name = name.substr(sep);
+ }
+ if (name.substr(name.length()-4) == ".nph") {
+ name.resize(name.length()-4);
+ }
+ return demoPath(l) + Os::pathSep + name + ".npd";
+}
+
+bool Levels::hasDemo(int l)
+{
+ return OS->exists(demoName(l));
+}
+
+
Levels::LevelDesc* Levels::findLevel( int i )
{
if (i < m_numLevels) {
diff -Nru numptyphysics-0.2+svn156/Levels.h numptyphysics-0.2+svn157/Levels.h
--- numptyphysics-0.2+svn156/Levels.h 2010-02-22 22:51:55.000000000 +0100
+++ numptyphysics-0.2+svn157/Levels.h 2013-12-26 18:09:13.000000000 +0100
@@ -38,6 +38,10 @@
int collectionSize(int c);
int collectionLevel(int c, int i);
+ std::string demoPath(int l);
+ std::string demoName(int l);
+ bool hasDemo(int l);
+
private:
struct LevelDesc
diff -Nru numptyphysics-0.2+svn156/Os.cpp numptyphysics-0.2+svn157/Os.cpp
--- numptyphysics-0.2+svn156/Os.cpp 2010-02-22 22:51:55.000000000 +0100
+++ numptyphysics-0.2+svn157/Os.cpp 2013-12-26 18:09:15.000000000 +0100
@@ -163,5 +163,12 @@
return true;
}
}
+ return true;
}
+
+bool Os::exists(const std::string& file)
+{
+ struct stat st;
+ return stat(file.c_str(),&st)==0;
+}
diff -Nru numptyphysics-0.2+svn156/Os.h numptyphysics-0.2+svn157/Os.h
--- numptyphysics-0.2+svn156/Os.h 2010-02-22 22:51:55.000000000 +0100
+++ numptyphysics-0.2+svn157/Os.h 2013-12-26 18:09:13.000000000 +0100
@@ -36,6 +36,7 @@
virtual EventMap* getEventMap( EventMapType type );
virtual void decorateGame( WidgetParent* game ) {}
bool ensurePath(const std::string& path);
+ bool exists(const std::string& file);
static Os* get();
static const char pathSep;
};
diff -Nru numptyphysics-0.2+svn156/OsHildon.cpp
numptyphysics-0.2+svn157/OsHildon.cpp
--- numptyphysics-0.2+svn156/OsHildon.cpp 2010-02-22 22:51:55.000000000
+0100
+++ numptyphysics-0.2+svn157/OsHildon.cpp 2013-12-26 18:09:15.000000000
+0100
@@ -326,7 +326,7 @@
*/
void enable_runfast()
{
-#if __ARM
+#ifdef __arm__
static const unsigned int x = 0x04086060;
static const unsigned int y = 0x03000000;
int r;
diff -Nru numptyphysics-0.2+svn156/Scene.cpp numptyphysics-0.2+svn157/Scene.cpp
--- numptyphysics-0.2+svn156/Scene.cpp 2010-02-22 22:51:55.000000000 +0100
+++ numptyphysics-0.2+svn157/Scene.cpp 2013-12-26 18:09:15.000000000 +0100
@@ -527,19 +527,13 @@
: m_world( NULL ),
m_bgImage( NULL ),
m_protect( 0 ),
- m_gravity(0.0f, GRAVITY_ACCELf*PIXELS_PER_METREf/GRAVITY_FUDGEf),
+ m_gravity(0.0f, 0.0f),
m_dynamicGravity(false),
m_accelerometer(Os::get()->getAccelerometer()),
m_dirtyArea(false)
{
if ( !noWorld ) {
- b2AABB worldAABB;
- worldAABB.lowerBound.Set(-100.0f, -100.0f);
- worldAABB.upperBound.Set(100.0f, 100.0f);
-
- bool doSleep = true;
- m_world = new b2World(worldAABB, m_gravity, doSleep);
- m_world->SetContactListener( this );
+ resetWorld();
}
}
@@ -552,6 +546,20 @@
}
}
+void Scene::resetWorld()
+{
+ const b2Vec2 gravity(0.0f, GRAVITY_ACCELf*PIXELS_PER_METREf/GRAVITY_FUDGEf);
+ delete m_world;
+
+ b2AABB worldAABB;
+ worldAABB.lowerBound.Set(-100.0f, -100.0f);
+ worldAABB.upperBound.Set(100.0f, 100.0f);
+
+ bool doSleep = true;
+ m_world = new b2World(worldAABB, gravity, doSleep);
+ m_world->SetContactListener( this );
+}
+
Stroke* Scene::newStroke( const Path& p, int colour, int attribs ) {
Stroke *s = new Stroke(p);
s->setAttribute( (Attribute)attribs );
@@ -722,7 +730,7 @@
if ( s1->hasAttribute(ATTRIB_TOKEN)
&& s2->hasAttribute(ATTRIB_GOAL) ) {
s2->setAttribute(ATTRIB_DELETED);
- m_recorder.mark(1);
+ m_recorder.goal(1);
}
}
}
@@ -880,8 +888,8 @@
bool Scene::load( std::istream& in )
{
clear();
+ resetWorld();
m_dynamicGravity = false;
- setGravity( b2Vec2(0.0f, GRAVITY_ACCELf*PIXELS_PER_METREf/GRAVITY_FUDGEf) );
if ( g_bgImage==NULL ) {
g_bgImage = new Image("paper.jpg");
g_bgImage->scale( SCREEN_WIDTH, SCREEN_HEIGHT );
diff -Nru numptyphysics-0.2+svn156/Scene.h numptyphysics-0.2+svn157/Scene.h
--- numptyphysics-0.2+svn156/Scene.h 2009-11-09 18:16:23.000000000 +0100
+++ numptyphysics-0.2+svn157/Scene.h 2013-12-26 18:09:15.000000000 +0100
@@ -84,6 +84,7 @@
ScriptLog* getLog() { return &m_log; }
const ScriptPlayer* replay() { return &m_player; }
private:
+ void resetWorld();
bool activate( Stroke *s );
void activateAll();
void createJoints( Stroke *s );
diff -Nru numptyphysics-0.2+svn156/Script.cpp
numptyphysics-0.2+svn157/Script.cpp
--- numptyphysics-0.2+svn156/Script.cpp 2010-02-22 22:51:55.000000000 +0100
+++ numptyphysics-0.2+svn157/Script.cpp 2013-12-26 18:09:15.000000000 +0100
@@ -33,7 +33,7 @@
case 'm': op = OP_MOVE; break;
case 'a': op = OP_ACTIVATE; break;
case 'p': op = OP_PAUSE; break;
- case 'g': op = OP_MARKER; break;
+ case 'g': op = OP_GOAL; break;
default:
fprintf(stderr,"bad script op\n");
}
@@ -45,7 +45,7 @@
std::string ScriptEntry::asString()
{
- static const char opcodes[] = "ndemap";
+ static const char opcodes[] = "ndemapg";
std::stringstream s;
s << t << "," << opcodes[op] << ","
<< stroke << "," << arg1 << "," << arg2 << ","
@@ -144,10 +144,10 @@
m_log->append( m_lastTick, ScriptEntry::OP_ACTIVATE, index );
}
-void ScriptRecorder::mark( int goal )
+void ScriptRecorder::goal( int goalNum )
{
if ( m_running )
- m_log->append( m_lastTick, ScriptEntry::OP_MARKER, goal );
+ m_log->append( m_lastTick, ScriptEntry::OP_GOAL, goalNum );
}
diff -Nru numptyphysics-0.2+svn156/Script.h numptyphysics-0.2+svn157/Script.h
--- numptyphysics-0.2+svn156/Script.h 2010-02-22 22:51:55.000000000 +0100
+++ numptyphysics-0.2+svn157/Script.h 2013-12-26 18:09:16.000000000 +0100
@@ -29,7 +29,7 @@
OP_MOVE,
OP_ACTIVATE,
OP_PAUSE,
- OP_MARKER
+ OP_GOAL
};
int t;
@@ -73,7 +73,7 @@
void extendStroke( int index, const Vec2& pt );
void moveStroke( int index, const Vec2& pt );
void activateStroke( int index );
- void mark( int goal );
+ void goal( int goalNum );
ScriptLog* getLog() { return m_log; }
diff -Nru numptyphysics-0.2+svn156/Ui.cpp numptyphysics-0.2+svn157/Ui.cpp
--- numptyphysics-0.2+svn156/Ui.cpp 2010-03-26 23:38:22.000000000 +0100
+++ numptyphysics-0.2+svn157/Ui.cpp 2013-12-26 18:09:15.000000000 +0100
@@ -356,7 +356,7 @@
pos.x += m_pos.width()-20-m_snippets[l].font->metrics(sniptext).x;
break;
}
- m_snippets[l].font->drawLeft( &screen, pos, sniptext, m_fg);
+ m_snippets[l].font->drawLeft( &screen, pos, sniptext, m_fg);
}
}
}
signature.asc
Description: Digital signature

