Update to the latest svn snapshots:

numptyphysics -> 2010/09/16

npcomplete -> 2010/01/24

Kudos to sthen@ for mirroring the distfiles
This commit is contained in:
dcoppa 2012-12-12 14:58:00 +00:00
parent 7c10643c0d
commit 3a96856ab4
26 changed files with 349 additions and 287 deletions

View File

@ -1,13 +1,11 @@
# $OpenBSD: Makefile,v 1.21 2012/06/15 08:32:15 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.22 2012/12/12 14:58:00 dcoppa Exp $
COMMENT-main = physics-based drawing puzzle game
COMMENT-npcomplete = extra levels for physics-based drawing puzzle game
DISTNAME = numptyphysics-0.3.r20090104
DISTNAME = numptyphysics-0.3.r20100916
PKGNAME-main = ${DISTNAME}
REVISION-main = 12
PKGNAME-npcomplete = npcomplete-0.0.r20090116
REVISION-npcomplete = 3
PKGNAME-npcomplete = npcomplete-0.0.r20100124
MULTI_PACKAGES = -main -npcomplete
@ -18,10 +16,10 @@ MAINTAINER = David Coppa <dcoppa@openbsd.org>
HOMEPAGE = http://numptyphysics.garage.maemo.org/
MASTER_SITES = http://mirror.amdmi3.ru/distfiles/
MASTER_SITES = http://spacehopper.org/mirrors/
DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \
npcomplete-0.0.r20090116.tar.bz2
npcomplete-0.0.r20100124.tar.bz2
# GPLv3+
PERMIT_PACKAGE_CDROM = Yes
@ -29,12 +27,14 @@ PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB-main = X11 c m pthread stdc++ z SDL SDL_image
WANTLIB-main = SDL SDL_image SDL_ttf X11 c m \
pthread stdc++ z
RUN_DEPENDS-main = devel/desktop-file-utils \
x11/gtk+2,-guic
LIB_DEPENDS-main = devel/sdl \
devel/sdl-image
devel/sdl-image \
devel/sdl-ttf
RUN_DEPENDS-npcomplete =${FULLPKGPATH-main}
@ -54,9 +54,6 @@ CONFIGURE_ARGS =--disable-hildon
WRKDIST = ${WRKDIR}/numptyphysics
pre-patch:
cd ${WRKSRC}/Box2D; perl -i -pe 's/\r$$//' `find . -type f`
post-patch:
@cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} aclocal

View File

@ -1,10 +1,4 @@
MD5 (npcomplete-0.0.r20090116.tar.bz2) = VIVQajs8caheXAf/hQqO5Q==
MD5 (numptyphysics-0.3.r20090104.tar.bz2) = xyI1+oZg169WZIg6DOxqiA==
RMD160 (npcomplete-0.0.r20090116.tar.bz2) = 6wiTP8ZgS2CA3nOyMnpaPete7i0=
RMD160 (numptyphysics-0.3.r20090104.tar.bz2) = d2OXjbB5whAy9ohPp8Lpbc8wixA=
SHA1 (npcomplete-0.0.r20090116.tar.bz2) = 5pmXlFjuMHCZ7KBu/Yubkv5ggtY=
SHA1 (numptyphysics-0.3.r20090104.tar.bz2) = HmxH9fnAF17OrRcNV1kZgQ8ONsQ=
SHA256 (npcomplete-0.0.r20090116.tar.bz2) = Sz36jjiAHlIorsyAxDqZlXLw6EbjAZq0E6YZJD1uM6k=
SHA256 (numptyphysics-0.3.r20090104.tar.bz2) = qLwwVDb87HMOazFwnjguhPivClohi6zEerBkocOuKNg=
SIZE (npcomplete-0.0.r20090116.tar.bz2) = 306228
SIZE (numptyphysics-0.3.r20090104.tar.bz2) = 374457
SHA256 (npcomplete-0.0.r20100124.tar.bz2) = 5WjvH3IpMRN9JRWG8ClN7YVqAOb8hg2dhyR94d6RkVc=
SHA256 (numptyphysics-0.3.r20100916.tar.bz2) = ZKP/hnf1n4koG6283ZPvPt7knqB+CBSExss4Qc/D0bM=
SIZE (npcomplete-0.0.r20100124.tar.bz2) = 124326
SIZE (numptyphysics-0.3.r20100916.tar.bz2) = 1062222

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-App_cpp,v 1.1 2012/12/12 14:58:00 dcoppa Exp $
--- App.cpp.orig Wed Dec 5 18:00:31 2012
+++ App.cpp Wed Dec 5 18:02:02 2012
@@ -177,12 +177,7 @@ class App : private Container (private)
levels->addPath( files[i] );
}
} else {
- struct stat st;
- if ( stat("Game.cpp",&st)==0 ) {
- levels->addPath( "data" );
- } else {
- levels->addPath( DEFAULT_LEVEL_PATH );
- }
+ levels->addPath( DEFAULT_LEVEL_PATH );
levels->addPath( Config::userDataDir().c_str() );
}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-Array_h,v 1.1 2009/10/22 23:07:54 sthen Exp $
--- Array.h.orig Mon Jun 23 17:34:19 2008
+++ Array.h Thu Oct 15 14:39:45 2009
@@ -31,18 +31,18 @@ class Array
$OpenBSD: patch-Array_h,v 1.2 2012/12/12 14:58:00 dcoppa Exp $
--- Array.h.orig Wed Dec 5 17:20:19 2012
+++ Array.h Wed Dec 5 17:21:33 2012
@@ -32,18 +32,18 @@ class Array
Array( int n, const T* d ) : m_data(NULL), m_size(0), m_capacity(0)
{

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-Box2D_Source_Collision_Shapes_b2Shape_cpp,v 1.1 2009/03/25 11:39:46 sthen Exp $
avoid a crash in one of the npcomplete levels.
--- Box2D/Source/Collision/Shapes/b2Shape.cpp.orig Tue Mar 24 16:09:42 2009
+++ Box2D/Source/Collision/Shapes/b2Shape.cpp Tue Mar 24 16:09:54 2009
@@ -99,7 +99,7 @@ void b2Shape::CreateProxy(b2BroadPhase* broadPhase, co
bool inRange = broadPhase->InRange(aabb);
// You are creating a shape outside the world box.
- b2Assert(inRange);
+ // b2Assert(inRange);
if (inRange)
{

View File

@ -1,11 +1,10 @@
$OpenBSD: patch-Canvas_cpp,v 1.1 2009/10/22 23:07:54 sthen Exp $
--- Canvas.cpp.orig Sun Nov 16 16:50:27 2008
+++ Canvas.cpp Fri Oct 16 13:41:23 2009
@@ -661,23 +661,14 @@ void Window::setSubName( const char *sub )
$OpenBSD: patch-Canvas_cpp,v 1.2 2012/12/12 14:58:00 dcoppa Exp $
--- Canvas.cpp.orig Wed Dec 5 17:24:18 2012
+++ Canvas.cpp Wed Dec 5 17:28:19 2012
@@ -801,12 +801,8 @@ void Window::setSubName( const char *sub )
Image::Image( const char* file, bool alpha )
{
- alpha = false;
//alpha = false;
- std::string f( "data/" );
+ std::string f( DEFAULT_RESOURCE_PATH "/" );
SDL_Surface* img = IMG_Load((f+file).c_str());
@ -15,30 +14,20 @@ $OpenBSD: patch-Canvas_cpp,v 1.1 2009/10/22 23:07:54 sthen Exp $
- }
if ( img ) {
printf("loaded image %s\n",(f+file).c_str());
- if ( alpha ) {
- m_state = SDL_DisplayFormatAlpha( img );
- } else {
m_state = SDL_DisplayFormat( img );
// SDL_SetColorKey( SURFACE(this),
// SDL_SRCCOLORKEY|SDL_RLEACCEL,
// makeColour( 0x00ff00ff ) );
- }
if ( m_state ) {
SDL_FreeSurface( img );
} else {
@@ -723,15 +714,24 @@ int Canvas::writeBMP( const char* filename ) const
if ( alpha ) {
@@ -873,15 +869,24 @@ int Canvas::writeBMP( const char* filename ) const
Uint32 bpp;
bpp = SURFACE(this)->format->BytesPerPixel;
- fwrite( &head, 14, 1, f );
- fwrite( &info, 40, 1, f );
+ if ( fwrite( &head, 14, 1, f ) != 1 ) {
+ fclose( f );
+ return -1;
+ fclose( f );
+ return -1;
+ }
+ if ( fwrite( &info, 40, 1, f ) != 1 ) {
+ fclose( f );
+ return -1;
+ fclose( f );
+ return -1;
+ }
for ( int y=h-1; y>=0; y-- ) {
for ( int x=0; x<w; x++ ) {

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-Canvas_h,v 1.1 2009/10/22 23:07:54 sthen Exp $
--- Canvas.h.orig Thu Oct 15 08:59:08 2009
+++ Canvas.h Thu Oct 15 08:59:56 2009
@@ -68,7 +68,7 @@ class Window : public Canvas
$OpenBSD: patch-Canvas_h,v 1.2 2012/12/12 14:58:00 dcoppa Exp $
--- Canvas.h.orig Wed Dec 5 17:28:40 2012
+++ Canvas.h Wed Dec 5 17:29:05 2012
@@ -70,7 +70,7 @@ class Window : public Canvas
class Image : public Canvas
{
public:

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-Config_cpp,v 1.1 2012/12/12 14:58:00 dcoppa Exp $
--- Config.cpp.orig Thu Dec 6 12:24:31 2012
+++ Config.cpp Thu Dec 6 12:25:42 2012
@@ -44,12 +44,8 @@ const int NUM_BRUSHES = (sizeof(brushColours)/sizeof(b
std::string Config::findFile( const std::string& name )
{
- std::string p( "data/" );
+ std::string p( DEFAULT_RESOURCE_PATH "/" );
FILE *fd = fopen( (p+name).c_str(), "rb" );
- if ( !fd ) {
- p = std::string( DEFAULT_RESOURCE_PATH "/" );
- fd = fopen( (p+name).c_str(), "rb" );
- }
if ( fd ) {
fclose(fd);
return p+name;

View File

@ -1,25 +1,16 @@
$OpenBSD: patch-Config_h,v 1.4 2011/01/17 11:39:20 dcoppa Exp $
--- Config.h.orig Fri Oct 31 18:04:08 2008
+++ Config.h Mon Jan 17 12:14:05 2011
@@ -37,7 +37,7 @@
# define CLICK_TOLERANCE 16 //PIXELs
#else
# define ITERATION_RATE 60 //fps
-# define RENDER_RATE 20 //fps
+# define RENDER_RATE 60 //fps
# define SOLVER_ITERATIONS 10
# define JOINT_TOLERANCE 4.0f //PIXELs
# define SELECT_TOLERANCE 5.0f //PIXELS_PER_METREf)
@@ -51,7 +51,7 @@
#ifndef INSTALL_BASE_PATH
$OpenBSD: patch-Config_h,v 1.5 2012/12/12 14:58:00 dcoppa Exp $
--- Config.h.orig Wed Dec 5 15:53:11 2012
+++ Config.h Thu Dec 6 15:12:55 2012
@@ -59,7 +59,7 @@
# if MAEMO_VERSION >= 5
# define INSTALL_BASE_PATH "/opt/numptyphysics"
# else
-# define INSTALL_BASE_PATH "/usr/share/numptyphysics"
+# define INSTALL_BASE_PATH "${TRUEPREFIX}/share/numptyphysics"
# endif
#endif
#define DEFAULT_LEVEL_PATH INSTALL_BASE_PATH
#define DEFAULT_RESOURCE_PATH DEFAULT_LEVEL_PATH
@@ -68,10 +68,6 @@
@@ -81,10 +81,6 @@
#endif
#define USER_LEVEL_PATH USER_BASE_PATH
@ -27,10 +18,10 @@ $OpenBSD: patch-Config_h,v 1.4 2011/01/17 11:39:20 dcoppa Exp $
-#define HTTP_TEMP_FILE "/tmp/http.nph"
-#define SEND_TEMP_FILE "/tmp/mailto:numptyphysics@gmail.com.nph"
-
#define ICON_SCALE_FACTOR 4
#define ICON_SCALE_FACTOR 6
@@ -92,11 +88,6 @@ class Config
#define VIDEO_FPS 20
@@ -126,11 +122,6 @@ class Config
static const std::string& userDataDir()
{
static const std::string d = std::string(getenv("HOME")) + Os::pathSep + USER_BASE_PATH;
@ -38,7 +29,7 @@ $OpenBSD: patch-Config_h,v 1.4 2011/01/17 11:39:20 dcoppa Exp $
- }
- static const std::string& planetRoot()
- {
- static const std::string d("http://xxx/planet.cgi");
- static const std::string d("http://10.10.10.10:8080");
return d;
}
};
static std::string findFile( const std::string& name );

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-Dialogs_cpp,v 1.1 2012/12/12 14:58:00 dcoppa Exp $
--- Dialogs.cpp.orig Thu Dec 6 11:14:49 2012
+++ Dialogs.cpp Thu Dec 6 11:18:22 2012
@@ -122,9 +122,9 @@ class LevelSelector : public MenuPage
static const int THUMB_COUNT = 32;
GameControl* m_game;
Levels* m_levels;
- int m_collection;
int m_dispbase;
int m_dispcount;
+ int m_collection;
IconButton* m_thumbs[THUMB_COUNT];
ScrollArea* m_scroll;
public:

View File

@ -1,14 +1,15 @@
$OpenBSD: patch-Game_cpp,v 1.2 2011/01/14 12:01:18 dcoppa Exp $
--- Game.cpp.orig Tue Nov 11 17:54:38 2008
+++ Game.cpp Thu Jan 13 10:48:15 2011
@@ -22,18 +22,17 @@
#include "Path.h"
$OpenBSD: patch-Game_cpp,v 1.3 2012/12/12 14:58:00 dcoppa Exp $
--- Game.cpp.orig Wed Dec 5 15:53:11 2012
+++ Game.cpp Thu Dec 6 11:11:27 2012
@@ -22,7 +22,6 @@
#include "Canvas.h"
#include "Font.h"
#include "Levels.h"
-#include "Http.h"
#include "Os.h"
#include <SDL/SDL.h>
#include "Scene.h"
#include "Script.h"
@@ -33,11 +32,11 @@
#include <SDL/SDL_image.h>
#include <cstdio>
@ -21,65 +22,32 @@ $OpenBSD: patch-Game_cpp,v 1.2 2011/01/14 12:01:18 dcoppa Exp $
#include <sys/stat.h>
using namespace std;
@@ -80,7 +79,7 @@ class Transform (public)
}
}
private:
- Transform() {}
+ Transform() : m_bypass(false) {}
bool m_bypass;
b2Mat22 m_rot;
b2Mat22 m_invrot;
@@ -176,6 +175,7 @@ class Stroke (public)
m_attributes = 0;
m_origin = m_rawPath.point(0);
m_rawPath.translate( -m_origin );
+ m_body = NULL;
reset();
}
@@ -185,6 +185,7 @@ class Stroke (public)
m_colour = brushColours[DEFAULT_BRUSH];
m_attributes = 0;
m_origin = Vec2(400,240);
+ m_body = NULL;
reset();
const char *s = str.c_str();
while ( *s && *s!=':' && *s!='\n' ) {
@@ -866,7 +867,7 @@ class DemoLog : public Array<DemoEntry> (public)
void appendFromString( const std::string& str )
{
const char *s = str.c_str();
- int t, o, v1, v2, v3;
+ int t, o = 0, v1, v2, v3;
char c;
SDL_Event ev = {0};
ev.type = 0xff;
@@ -944,6 +945,12 @@ class DemoRecorder (private)
class DemoPlayer
{
@@ -58,9 +57,9 @@ class Game : public GameControl, public Container
Widget *m_pauseLabel;
Widget *m_editLabel;
Widget *m_completedDialog;
+ bool m_isCompleted;
Widget *m_options;
Os *m_os;
- bool m_isCompleted;
Path m_jointCandidates;
Path m_jointInd;
public:
+ DemoPlayer()
+ : m_playing(false),
+ m_log(0),
+ m_index(0),
+ m_lastTick(0),
+ m_lastTickTime(0) {}
void start( const DemoLog* log )
{
@@ -1076,26 +1083,6 @@ class Game : public GameControl (public)
@@ -148,28 +147,6 @@ class Game : public GameControl, public Container
return false;
}
-
- bool send()
- {
- if ( save( SEND_TEMP_FILE ) ) {
- Http h;
- if ( h.post( Config::planetRoot().c_str(), "upload", SEND_TEMP_FILE ) ) {
- if ( h.post( (Config::planetRoot()+"/upload").c_str(),
- "data", SEND_TEMP_FILE, "type=1" ) ) {
- std::string id = h.getHeader("NP-Upload-Id");
- if ( id.length() > 0 ) {
- if ( !m_os->openBrowser((Config::planetRoot()+"?level="+id).c_str()) ) {
- printf("uploaded as id %s\n",id.c_str());
- if ( !m_os->openBrowser((Config::planetRoot()+"/editlevel?id="+id).c_str()) ) {
- showMessage("Unable to launch browser");
- }
- } else {
@ -91,20 +59,6 @@ $OpenBSD: patch-Game_cpp,v 1.2 2011/01/14 12:01:18 dcoppa Exp $
- }
- return false;
- }
-
void setTool( int t )
void saveDemo()
{
m_colour = t;
@@ -1555,11 +1542,7 @@ int npmain(int argc, char** argv)
}
} else {
struct stat st;
- if ( stat("Game.cpp",&st)==0 ) {
- game.levels().addPath( "data" );
- } else {
- game.levels().addPath( DEFAULT_LEVEL_PATH );
- }
+ game.levels().addPath( DEFAULT_LEVEL_PATH );
game.levels().addPath( Config::userDataDir().c_str() );
}
game.gotoLevel(0);

View File

@ -1,11 +1,23 @@
$OpenBSD: patch-Game_h,v 1.1 2011/01/14 12:01:18 dcoppa Exp $
--- Game.h.orig Thu Jan 13 10:49:04 2011
+++ Game.h Thu Jan 13 10:49:15 2011
@@ -36,7 +36,6 @@ struct GameControl
$OpenBSD: patch-Game_h,v 1.2 2012/12/12 14:58:00 dcoppa Exp $
--- Game.h.orig Wed Dec 5 15:53:10 2012
+++ Game.h Thu Dec 6 11:09:46 2012
@@ -47,17 +47,16 @@ struct GameControl
m_refresh( true ),
m_fade(false),
m_colour( 2 ),
+ m_clickMode(0),
m_strokeFixed( false ),
m_strokeSleep( false ),
m_strokeDecor( false ),
m_replaying( false ),
m_paused( false ),
- m_level(0),
- m_clickMode(0)
+ m_level(0)
{}
virtual ~GameControl() {}
virtual bool save( const char *file=NULL ) { return false; }
- virtual bool send() { return false; }
virtual bool load( const char* file ) { return false; }
virtual void gotoLevel( int l, bool replay=false ) {}
Levels& levels() { return m_levels; }
virtual bool save( const char *file=NULL ) =0;
- virtual bool send() =0;
virtual bool load( const char* file ) {};
virtual void gotoLevel( int l, bool replay=false ) =0;
virtual void clickMode(int cm) =0;

View File

@ -1,11 +1,21 @@
$OpenBSD: patch-Levels_cpp,v 1.1 2009/10/22 23:07:54 sthen Exp $
--- Levels.cpp.orig Tue Nov 11 17:54:38 2008
+++ Levels.cpp Thu Oct 15 18:05:58 2009
@@ -84,6 +84,7 @@ bool Levels::addLevel( const string& file, int rank, i
if ( m_levels[i]->file == file
&& m_levels[i]->index == index ) {
printf("addLevel %s already present!\n",file.c_str());
$OpenBSD: patch-Levels_cpp,v 1.2 2012/12/12 14:58:00 dcoppa Exp $
--- Levels.cpp.orig Wed Dec 5 15:53:11 2012
+++ Levels.cpp Thu Dec 6 14:06:04 2012
@@ -88,8 +88,7 @@ bool Levels::addPath( const char* path )
int len = strlen( path );
if ( strcasecmp( path+len-4, ".npz" )==0 ) {
scanCollection( string(path), rankFromPath(path) );
- } else if ( strcasecmp( path+len-4, ".nph" )==0
- || strcasecmp( path+len-4, ".npd" )==0) {
+ } else if ( strcasecmp( path+len-4, ".nph" )==0) {
addLevel( path, rankFromPath(path) );
} else {
DIR *dir = opendir( path );
@@ -125,6 +124,7 @@ bool Levels::addLevel( Collection* collection,
if ( collection->levels[i]->file == file
&& collection->levels[i]->index == index ) {
//printf("addLevel %s already present!\n",file.c_str());
+ delete e;
return false;
} else if ( m_levels[i]->rank > rank ) {
printf("addLevel %s at %d\n",file.c_str(),i);
} else if ( collection->levels[i]->rank > rank ) {
//printf("insert level %s+%d at %d\n",file.c_str(),index,i);

View File

@ -1,14 +1,22 @@
$OpenBSD: patch-Makefile_am,v 1.2 2011/01/17 11:39:20 dcoppa Exp $
--- Makefile.am.orig Tue Nov 11 17:54:38 2008
+++ Makefile.am Mon Jan 17 12:19:48 2011
@@ -19,10 +19,7 @@ numptyphysics_SOURCES = \
Game.cpp \
Overlay.cpp \
$OpenBSD: patch-Makefile_am,v 1.3 2012/12/12 14:58:00 dcoppa Exp $
--- Makefile.am.orig Thu Dec 6 10:30:36 2012
+++ Makefile.am Thu Dec 6 10:31:02 2012
@@ -20,17 +20,13 @@ numptyphysics_SOURCES = \
Script.cpp \
App.cpp \
Config.cpp \
- Http.cpp \
Os.cpp \
Ui.cpp \
Dialogs.cpp \
Event.cpp \
Worker.cpp \
- happyhttp.cpp \
zoomer.cpp \
- OsHildon.cpp \
OsFreeDesktop.cpp \
OsWin32.cpp
- OsFreeDesktop.cpp \
- OsWin32.cpp
+ OsFreeDesktop.cpp
numptyphysics_CPPFLAGS = -IXX $(SDL_CFLAGS) $(HILDON_CFLAGS)
numptyphysics_LDADD = libbox2d.a $(SDL_LIBS) $(HILDON_LIBS)

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-OsFreeDesktop_cpp,v 1.1 2012/12/12 14:58:00 dcoppa Exp $
--- OsFreeDesktop.cpp.orig Thu Dec 6 11:18:40 2012
+++ OsFreeDesktop.cpp Thu Dec 6 11:19:23 2012
@@ -114,8 +114,8 @@ class OsFreeDesktop : public Os
private:
FILE *m_fifo;
char m_cmdBuffer[128];
- int m_cmdPos;
bool m_cmdReady;
+ int m_cmdPos;
};

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-Overlay_cpp,v 1.2 2011/01/14 12:01:18 dcoppa Exp $
--- Overlay.cpp.orig Thu Nov 6 14:44:45 2008
+++ Overlay.cpp Thu Jan 13 10:55:43 2011
@@ -31,6 +31,10 @@ class OverlayBase : public Overlay (public)
$OpenBSD: patch-Overlay_cpp,v 1.3 2012/12/12 14:58:00 dcoppa Exp $
--- Overlay.cpp.orig Wed Dec 5 15:53:11 2012
+++ Overlay.cpp Thu Dec 6 10:33:22 2012
@@ -36,6 +36,10 @@ class OverlayBase : public Overlay (public)
: m_game(game),
m_x(x), m_y(y),
m_canvas(NULL),
@ -9,18 +9,43 @@ $OpenBSD: patch-Overlay_cpp,v 1.2 2011/01/14 12:01:18 dcoppa Exp $
+ m_orgy(0),
+ m_prevx(0),
+ m_prevy(0),
m_isDirty(true),
m_dragging(false),
m_dragging_allowed(dragging_allowed),
@@ -176,6 +180,7 @@ class NextLevelOverlay : public IconOverlay (public)
: IconOverlay(game,"next.png",
FULLSCREEN_RECT.centroid().x-200,
FULLSCREEN_RECT.centroid().y-120),
m_buttonDown(false)
@@ -549,6 +553,7 @@ class NextLevelOverlay : public UiOverlay (public)
FULLSCREEN_RECT.centroid().y-120,
FULLSCREEN_RECT.centroid().x+200,
FULLSCREEN_RECT.centroid().y+80 ) ),
+ m_selectedLevel(0),
m_levelIcon(-2),
m_icon(NULL)
m_worker(NULL)
{
@@ -302,7 +307,6 @@ class EditOverlay : public IconOverlay (public)
@@ -740,11 +745,11 @@ class NextLevelOverlay : public UiOverlay (public)
class EditOverlay : public IconOverlay
{
- int m_saving, m_sending;
+ int m_saving;
public:
EditOverlay( GameControl& game )
: IconOverlay(game,"edit.png"),
- m_saving(0), m_sending(0)
+ m_saving(0)
{
for ( int i=0; i<18; i++ ) {
@@ -780,9 +785,8 @@ class EditOverlay : public IconOverlay (public)
if ( m_game.m_strokeFixed ) outline( screen, 12, 0 );
if ( m_game.m_strokeSleep ) outline( screen, 13, 0 );
if ( m_game.m_strokeDecor ) outline( screen, 14, 0 );
- if ( m_sending ) outline( screen, 16, screen.makeColour((m_sending--)<<9) );
if ( m_saving ) outline( screen, 17, screen.makeColour((m_saving--)<<9) );
- if ( m_saving || m_sending ) dirty();
+ if ( m_saving ) dirty();
}
virtual bool onHotSpot( int i )
{
@@ -790,7 +794,6 @@ class EditOverlay : public IconOverlay (public)
case 12: m_game.m_strokeFixed = ! m_game.m_strokeFixed; break;
case 13: m_game.m_strokeSleep = ! m_game.m_strokeSleep; break;
case 14: m_game.m_strokeDecor = ! m_game.m_strokeDecor; break;

View File

@ -1,17 +1,17 @@
--- Path.cpp.orig Thu Oct 23 09:51:17 2008
+++ Path.cpp Wed Jan 28 14:23:19 2009
@@ -80,8 +80,8 @@ Path& Path::rotate(const b2Mat22& rot)
--- Path.cpp.orig Thu Dec 6 10:37:20 2012
+++ Path.cpp Thu Dec 6 10:39:15 2012
@@ -90,8 +90,8 @@ Path& Path::rotate(const b2Mat22& rot)
for (int i=0;i<size();i++) {
//at(i) = b2Mul( rot, at(i) );
- at(i) = Vec2( j1 * at(i).x + j2 * at(i).y,
- k1 * at(i).x + k2 * at(i).y );
+ at(i) = Vec2( static_cast<int>(j1 * at(i).x + j2 * at(i).y),
+ static_cast<int>(k1 * at(i).x + k2 * at(i).y) );
+ static_cast<int>(k1 * at(i).x + k2 * at(i).y) );
}
return *this;
}
@@ -89,8 +89,8 @@ Path& Path::rotate(const b2Mat22& rot)
@@ -99,8 +99,8 @@ Path& Path::rotate(const b2Mat22& rot)
Path& Path::scale(float32 factor)
{
for (int i=0;i<size();i++) {

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-Scene_cpp,v 1.1 2012/12/12 14:58:00 dcoppa Exp $
--- Scene.cpp.orig Wed Dec 5 17:36:54 2012
+++ Scene.cpp Wed Dec 5 17:40:03 2012
@@ -132,6 +132,7 @@ class Stroke (public)
m_attributes = 0;
m_origin = m_rawPath.point(0);
m_rawPath.translate( -m_origin );
+ m_body = NULL;
reset();
}
@@ -141,6 +142,7 @@ class Stroke (public)
m_colour = brushColours[DEFAULT_BRUSH];
m_attributes = 0;
m_origin = Vec2(400,240);
+ m_body = NULL;
reset();
const char *s = str.c_str();
while ( *s && *s!=':' && *s!='\n' ) {

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Scene_h,v 1.1 2012/12/12 14:58:00 dcoppa Exp $
--- Scene.h.orig Wed Dec 5 17:38:08 2012
+++ Scene.h Wed Dec 5 17:38:32 2012
@@ -138,7 +138,7 @@ class Transform (public)
}
}
private:
- Transform() {}
+ Transform() : m_bypass(false) {}
bool m_bypass;
b2Mat22 m_rot;
b2Mat22 m_invrot;

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-Script_h,v 1.1 2012/12/12 14:58:00 dcoppa Exp $
--- Script.h.orig Wed Dec 5 15:53:11 2012
+++ Script.h Thu Dec 6 11:03:42 2012
@@ -78,9 +78,9 @@ class ScriptRecorder (public)
ScriptLog* getLog() { return m_log; }
private:
+ ScriptLog *m_log;
bool m_running;
bool m_isPaused;
- ScriptLog *m_log;
int m_lastTick;
};
@@ -88,6 +88,13 @@ class ScriptRecorder (public)
class ScriptPlayer
{
public:
+ ScriptPlayer()
+ : m_playing(false),
+ m_isPaused(false),
+ m_log(0),
+ m_scene(0),
+ m_index(0),
+ m_lastTick(0) {}
void start( const ScriptLog* log, Scene* scene );
bool isRunning() const;

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-Ui_h,v 1.1 2012/12/12 14:58:00 dcoppa Exp $
--- Ui.h.orig Thu Dec 6 11:16:57 2012
+++ Ui.h Thu Dec 6 11:17:17 2012
@@ -143,9 +143,9 @@ class IconButton : public Button
void draw( Canvas& screen, const Rect& area );
void align(int dir) { m_vertical=(dir==0); }
protected:
- bool m_vertical;
- bool m_ownIcon;
Canvas *m_icon;
+ bool m_ownIcon;
+ bool m_vertical;
};

View File

@ -1,23 +1,21 @@
$OpenBSD: patch-ZipFile_cpp,v 1.1 2009/10/22 23:07:54 sthen Exp $
--- ZipFile.cpp.orig Tue Nov 11 17:54:38 2008
+++ ZipFile.cpp Thu Oct 15 14:14:50 2009
@@ -110,16 +110,16 @@ int uncompress_int(unsigned char *dest, int *destLen,
$OpenBSD: patch-ZipFile_cpp,v 1.2 2012/12/12 14:58:00 dcoppa Exp $
--- ZipFile.cpp.orig Thu Dec 6 10:39:34 2012
+++ ZipFile.cpp Thu Dec 6 10:40:52 2012
@@ -110,7 +110,7 @@ int uncompress_int(unsigned char *dest, int *destLen,
ZipFile::ZipFile(const std::string& fn)
{
m_temp = NULL;
- m_fd=open(fn.c_str(), O_RDONLY);
+ if ( m_fd=open(fn.c_str(), O_RDONLY) == -1) throw "open failed";
struct stat stat;
- fstat(m_fd, &stat);
+ if ( fstat(m_fd, &stat) != 0 ) throw "fstat failed";
m_dataLen = stat.st_size;
// TODO - win32
m_data = (unsigned char*)mmap(NULL,m_dataLen,PROT_READ,MAP_PRIVATE, m_fd, 0);
if ( !m_data ) throw "mmap failed";
if ( *(int*)&m_data[0] != 0x04034b50 ) throw "bad zip magic";
m_eoc = (zip_eoc*)&m_data[m_dataLen-sizeof(zip_eoc)];
- m_firstcd = (zip_cd*)&m_data[m_eoc->zipeofst];
+ m_firstcd = m_eoc ? (zip_cd*)&m_data[m_eoc->zipeofst] : 0;
if ( m_eoc && m_firstcd ) {
m_entries = m_eoc->zipenum;
} else {
if (fstat(m_fd, &stat)==0 && S_ISREG(stat.st_mode)) {
m_dataLen = stat.st_size;
@@ -119,7 +119,7 @@ ZipFile::ZipFile(const std::string& fn)
if ( !m_data ) throw "mmap failed";
if ( *(int*)&m_data[0] != 0x04034b50 ) throw "bad zip magic";
m_eoc = (zip_eoc*)&m_data[m_dataLen-sizeof(zip_eoc)];
- m_firstcd = (zip_cd*)&m_data[m_eoc->zipeofst];
+ m_firstcd = m_eoc ? (zip_cd*)&m_data[m_eoc->zipeofst] : 0;
if ( m_eoc && m_firstcd ) {
m_entries = m_eoc->zipenum;
} else {

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-configure_in,v 1.1.1.1 2009/01/28 10:12:35 sthen Exp $
--- configure.in.orig Tue Jan 27 21:57:05 2009
+++ configure.in Tue Jan 27 21:57:14 2009
@@ -47,7 +47,7 @@ if test "x${enable_hildon}" = "xyes" ; then
$OpenBSD: patch-configure_in,v 1.2 2012/12/12 14:58:00 dcoppa Exp $
--- configure.in.orig Thu Dec 6 10:41:06 2012
+++ configure.in Thu Dec 6 10:41:27 2012
@@ -53,7 +53,7 @@ if test "x${enable_hildon}" = "xyes" ; then
AC_SUBST(HILDON_CFLAGS)
AC_SUBST(HILDON_LIBS)
else
- desktopentrydir=/usr/share/applications
+ desktopentrydir=$datadir/applications
serviceentrydir=$datadir/numptyphysics
numptyphysicsdir=$datadir/numptyphysics
icon_26x26dir=$datadir/icons/hicolor/26x26/apps
icon_34x34dir=$datadir/icons/hicolor/34x34/apps

View File

@ -1,9 +1,7 @@
$OpenBSD: patch-data_numptyphysics_desktop,v 1.2 2009/10/22 23:07:54 sthen Exp $
--- data/numptyphysics.desktop.orig Wed Nov 26 15:53:08 2008
+++ data/numptyphysics.desktop Thu Oct 15 15:57:45 2009
@@ -1,25 +1,12 @@
[Desktop Entry]
-Encoding=UTF-8
$OpenBSD: patch-data_numptyphysics_desktop,v 1.3 2012/12/12 14:58:00 dcoppa Exp $
--- data/numptyphysics.desktop.orig Wed Dec 5 15:53:11 2012
+++ data/numptyphysics.desktop Thu Dec 6 12:19:21 2012
@@ -3,23 +3,11 @@ Encoding=UTF-8
Version=1.0
Type=Application
Name=Numpty Physics
@ -19,7 +17,7 @@ $OpenBSD: patch-data_numptyphysics_desktop,v 1.2 2009/10/22 23:07:54 sthen Exp $
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
-X-Osso-Service=org.maemo.garage.numptyphysics
-MimeType=application/x-numptyphysics-level;application/x-numptyphysics-collection
-MimeType=application/x-numptyphysics-level;application/x-numptyphysics-collection;application/x-numptyphysics-demo
-
-[X-Osso-URI-Actions]
-http=X-Osso-URI-Action-Open;
@ -29,4 +27,4 @@ $OpenBSD: patch-data_numptyphysics_desktop,v 1.2 2009/10/22 23:07:54 sthen Exp $
-Method=mime_open
-Name=uri_link_play
-TranslationDomain=osso-uri
+MimeType=application/x-numptyphysics-level;application/x-numptyphysics-collection;
+MimeType=application/x-numptyphysics-level;application/x-numptyphysics-collection;application/x-numptyphysics-demo;

View File

@ -1,17 +1,11 @@
@comment $OpenBSD: PLIST-main,v 1.4 2012/06/15 08:32:15 ajacoutot Exp $
@comment $OpenBSD: PLIST-main,v 1.5 2012/12/12 14:58:00 dcoppa Exp $
@pkgpath games/numptyphysics
@bin bin/numptyphysics
share/applications/numptyphysics.desktop
share/icons/
share/icons/hicolor/
share/icons/hicolor/26x26/
share/icons/hicolor/26x26/apps/
share/icons/hicolor/26x26/apps/numptyphysics.png
share/icons/hicolor/64x64/
share/icons/hicolor/64x64/apps/
share/icons/hicolor/64x64/apps/numptyphysics.png
share/icons/hicolor/scalable/
share/icons/hicolor/scalable/apps/
share/icons/hicolor/scalable/apps/numptyphysics.png
share/numptyphysics/
share/numptyphysics/L00_title.nph
@ -25,15 +19,25 @@ share/numptyphysics/L35_pusher.nph
share/numptyphysics/L38_box.nph
share/numptyphysics/L40_tree_of_life.nph
share/numptyphysics/L50_nautilus.nph
share/numptyphysics/blank.png
share/numptyphysics/choose.png
share/numptyphysics/close.png
share/numptyphysics/edit.png
share/numptyphysics/femkeklaver.ttf
share/numptyphysics/forward.png
share/numptyphysics/help.png
share/numptyphysics/next.png
share/numptyphysics/next_win32.png
share/numptyphysics/numptyphysics.service
share/numptyphysics/paper.jpg
share/numptyphysics/pause.png
share/numptyphysics/pen.png
share/numptyphysics/play.png
share/numptyphysics/record.png
share/numptyphysics/reset.png
share/numptyphysics/share.png
share/numptyphysics/theend.png
share/numptyphysics/tick.png
share/numptyphysics/undo.png
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database
@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor

View File

@ -1,67 +1,28 @@
@comment $OpenBSD: PLIST-npcomplete,v 1.1 2009/05/19 21:28:17 sthen Exp $
@comment $OpenBSD: PLIST-npcomplete,v 1.2 2012/12/12 14:58:00 dcoppa Exp $
@conflict numptyphysics-0.3.r20090104p1
share/numptyphysics/AlmostEasy.nph
share/numptyphysics/Bell.nph
share/numptyphysics/Bullseye.nph
share/numptyphysics/CatchMe.nph
share/numptyphysics/FlytoSun.nph
share/numptyphysics/GarbageCleaner.nph
share/numptyphysics/GetOutComeIn.nph
share/numptyphysics/Hanged.nph
share/numptyphysics/Innardio.nph
share/numptyphysics/Inverse.nph
share/numptyphysics/L02_bridge Gaps tut.nph
share/numptyphysics/L02_hammer-tut.nph
share/numptyphysics/L03_kickit-tut.nph
share/numptyphysics/L06_Scribble tut.nph
share/numptyphysics/L100j.nph
share/numptyphysics/L101j.nph
share/numptyphysics/L102j.nph
share/numptyphysics/L103j.nph
share/numptyphysics/L104j.nph
share/numptyphysics/L110ParadiseIsland.nph
share/numptyphysics/L11_Bulldoze.nph
share/numptyphysics/L11_easterbunny.nph
share/numptyphysics/L12_Caves.nph
share/numptyphysics/L12_Fix Car.nph
share/numptyphysics/L13_See Saw.nph
share/numptyphysics/L16_forest.nph
share/numptyphysics/L18_Elevator.nph
share/numptyphysics/L25_Propeller.nph
share/numptyphysics/L26_MouseTrap.nph
share/numptyphysics/L26_Pull_Pins.nph
share/numptyphysics/L32_tarzan.nph
share/numptyphysics/L34_dump truck.nph
share/numptyphysics/L38_Pac_Man.nph
share/numptyphysics/L39_Square_Roll.nph
share/numptyphysics/L52_Dominoes.nph
share/numptyphysics/L54_Funnel.nph
share/numptyphysics/L56_david.nph
share/numptyphysics/L58_Monster.nph
share/numptyphysics/L60_pulleys.nph
share/numptyphysics/L62_Kong.nph
share/numptyphysics/L63_Roped Rocks.nph
share/numptyphysics/L70_Factory.nph
share/numptyphysics/L80_Bottomless_fall.nph
share/numptyphysics/L80_Dark_Caverns.nph
share/numptyphysics/L80_Desert_Bricks.nph
share/numptyphysics/L80_Invisible_Walls.nph
share/numptyphysics/L80_Lullaby.nph
share/numptyphysics/L96.nph
share/numptyphysics/L97.nph
share/numptyphysics/L97_saved.nph
share/numptyphysics/L98.nph
share/numptyphysics/L98_saved.nph
share/numptyphysics/ManintheMoon.nph
share/numptyphysics/Noodle_Grail.nph
share/numptyphysics/Noodle_Pegboard1.nph
share/numptyphysics/Noodle_Pegboard2.nph
share/numptyphysics/Noodle_Pegboard3.nph
share/numptyphysics/Noodle_bungee.nph
share/numptyphysics/Noodle_menhir.nph
share/numptyphysics/Noodle_one.nph
share/numptyphysics/Noodle_rocker.nph
share/numptyphysics/Noodle_sea.nph
share/numptyphysics/Noodle_trapeze.nph
share/numptyphysics/Packman.nph
share/numptyphysics/Pizza.nph
share/numptyphysics/Playground.nph
share/numptyphysics/SqurrelNuts.nph
@ -69,6 +30,10 @@ share/numptyphysics/TowerPower.nph
share/numptyphysics/balloons.nph
share/numptyphysics/basketball.nph
share/numptyphysics/breakdown.nph
share/numptyphysics/christeck_basic_cubes.nph
share/numptyphysics/christeck_block_on_hole.nph
share/numptyphysics/christeck_treasure_chest.nph
share/numptyphysics/christeck_weird_wheel.nph
share/numptyphysics/eyesInTheLake.nph
share/numptyphysics/grassy_knoll.nph
share/numptyphysics/hanging.nph
@ -81,9 +46,6 @@ share/numptyphysics/ioan4.nph
share/numptyphysics/ioan6.nph
share/numptyphysics/ioan7.nph
share/numptyphysics/jungle.nph
share/numptyphysics/melvin1.nph
share/numptyphysics/melvin2.nph
share/numptyphysics/melvin3.nph
share/numptyphysics/papky1.nph
share/numptyphysics/pendulum.nph
share/numptyphysics/pengu2.nph