New package: pipenightdreams-0.10.0

This commit is contained in:
Jürgen Buchmüller 2015-10-09 13:08:04 +02:00
parent 46513e1742
commit b32a74ab7e
5 changed files with 248 additions and 0 deletions

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=Pipe Night Dreams
Comment=Connect the waterpipes to create a proper pipeline
Comment[de]=Verbinde die Wasserrohre um eine funktionsfähige Pipeline zu bauen
Exec=pipenightdreams
Icon=pipenightdreams.png
Terminal=false
StartupNotify=false
Type=Application
Categories=Game;LogicGame;

View File

@ -0,0 +1,11 @@
--- src/hash.cpp 2015-10-09 12:01:04.628050936 +0200
+++ src/hash.cpp 2015-10-09 12:02:04.248055234 +0200
@@ -58,7 +58,7 @@
Hash::Hash(int bs){
int i;
nbuckets=bs;
- lbuckets=new (List *)[nbuckets];
+ lbuckets=new List* [nbuckets];
for (i=0;i<nbuckets;i++)
lbuckets[i]=new List();

View File

@ -0,0 +1,165 @@
Setting default values in c++ function bodies is wrong.
--- src/str.cpp 2002-01-17 20:56:42.000000000 +0100
+++ src/str.cpp 2015-10-09 11:49:16.152999859 +0200
@@ -11,7 +11,7 @@
const char Str::nul = '\0';
-Str::Str(const char * string=NULL){
+Str::Str(const char * string){
s=NULL;
set(string);
}
@@ -25,7 +25,7 @@
if (s) delete[] s;
}
-void Str::set(const char * string=NULL){
+void Str::set(const char * string){
if (s) delete[] s;
if (string){
s=new char[strlen(string)+1];
@@ -71,7 +71,7 @@
return (strlen(s));
}
-bool Str::isEqual(Str * str, bool case_sensitive = true){
+bool Str::isEqual(Str * str, bool case_sensitive){
if (case_sensitive){
return (!strcmp(s, str->s));
}
--- src/pipe.cpp 2002-01-21 05:08:13.000000000 +0100
+++ src/pipe.cpp 2015-10-09 11:52:00.066011676 +0200
@@ -43,11 +43,11 @@
return !(full_level>0) && !fixed;
}
-void Pipe::setFixed(bool flag=true){
+void Pipe::setFixed(bool flag){
fixed=flag;
}
-void Pipe::setBonus(Bonus bonus=NormalBonus){
+void Pipe::setBonus(Bonus bonus){
this->bonus=bonus;
}
--- src/pointer.cpp 2002-01-17 20:56:41.000000000 +0100
+++ src/pointer.cpp 2015-10-09 11:53:08.399016602 +0200
@@ -17,7 +17,7 @@
#include "pointer.h"
-Pointer::Pointer(int row=0, int column=0){
+Pointer::Pointer(int row, int column){
this->row=row;
this->column=column;
this->moved_flag=true;
--- src/score.cpp 2002-01-17 20:56:42.000000000 +0100
+++ src/score.cpp 2015-10-09 11:54:15.372021431 +0200
@@ -18,7 +18,7 @@
#include "score.h"
#include <math.h>
-Score::Score(int value=0){
+Score::Score(int value){
this->value=value;
delta=0;
changed=true;
--- src/list.cpp 2002-01-17 20:56:35.000000000 +0100
+++ src/list.cpp 2015-10-09 11:57:17.844034586 +0200
@@ -125,7 +125,7 @@
return (insert(indexOf(i), obj));
}
-List::Result List::remove(Index * index, bool del=false){
+List::Result List::remove(Index * index, bool del){
if (isEmpty()) return EmptyList;
if (!index) return NullIndex;
@@ -155,7 +155,7 @@
return Removed;
}
-void List::empty(bool del=true){
+void List::empty(bool del){
while (!isEmpty())
remove(getFirst(), del);
}
--- src/hash.cpp 2002-01-17 20:56:30.000000000 +0100
+++ src/hash.cpp 2015-10-09 11:59:00.879042014 +0200
@@ -55,7 +55,7 @@
return(sum % nbuckets);
}
-Hash::Hash(int bs=256){
+Hash::Hash(int bs){
int i;
nbuckets=bs;
lbuckets=new (List *)[nbuckets];
@@ -99,7 +99,7 @@
return NotAdded;
}
-Hash::Result Hash::remove(Str * str, bool del=false){
+Hash::Result Hash::remove(Str * str, bool del){
if (str){
Index * i;
List * list=lbuckets[function(str)];
@@ -135,7 +135,7 @@
return NULL;
}
-void Hash::empty(bool del=true){
+void Hash::empty(bool del){
int i;
List * list;
for (i=0;i<nbuckets;i++){
--- src/image.cpp 2002-01-17 20:56:32.000000000 +0100
+++ src/image.cpp 2015-10-09 12:00:23.067047939 +0200
@@ -19,7 +19,7 @@
#include "SDL_image.h"
#include <stdio.h>
-Image::Image(Str * filename=NULL):Graphic(){
+Image::Image(Str * filename):Graphic(){
if (filename) load(filename);
}
--- src/eventmanager.cpp 2002-01-17 20:56:26.000000000 +0100
+++ src/eventmanager.cpp 2015-10-09 12:04:50.991067255 +0200
@@ -40,7 +40,7 @@
lista_streams->remove(lista_streams->indexOf(s));
}
-void EventManager::pumpEvents(bool wait=false){
+void EventManager::pumpEvents(bool wait){
SDL_Event event;
Index * stream;
bool got=false;
--- src/graphic.cpp 2002-01-17 20:56:29.000000000 +0100
+++ src/graphic.cpp 2015-10-09 12:06:15.212073327 +0200
@@ -44,11 +44,11 @@
if (pixels) free(pixels);
}
-void Graphic::setAlpha(char value=OPAQUE){
+void Graphic::setAlpha(char value){
SDL_SetAlpha(surface, SDL_SRCALPHA, value);
}
-void Graphic::enableClipping(bool flag=true){
+void Graphic::enableClipping(bool flag){
if (flag){
SDL_Rect rect;
@@ -68,7 +68,7 @@
clip_height=height;
}
-void Graphic::flip(Axis a=HAxis){
+void Graphic::flip(Axis a){
if (surface){
if (SDL_MUSTLOCK(surface))
if (SDL_LockSurface(surface)<0) return;

View File

@ -0,0 +1,32 @@
--- src/pointer.h 2002-01-17 20:56:41.000000000 +0100
+++ src/pointer.h 2015-10-09 12:08:16.918082101 +0200
@@ -43,11 +43,11 @@
friend class Board;
- inline void setRow(int row);
- inline void setColumn(int column);
- inline void setRowColumn(int row, int column);
- inline void setMoved(bool flag);
- inline bool moved();
+ void setRow(int row);
+ void setColumn(int column);
+ void setRowColumn(int row, int column);
+ void setMoved(bool flag);
+ bool moved();
Str * image_name;
Image * ima;
--- src/player.h 2002-01-17 20:56:40.000000000 +0100
+++ src/player.h 2015-10-09 12:14:04.855107185 +0200
@@ -47,8 +47,8 @@
void setStartRowColumn(int row, int column);
void setBoard(Board * bd);
- inline void setRestrictionCoef(unsigned int coef);
- inline void setFixedCoef(unsigned int coef);
+ void setRestrictionCoef(unsigned int coef);
+ void setFixedCoef(unsigned int coef);
void incLives();
void decLives();

View File

@ -0,0 +1,29 @@
# Template file for 'pipenightdreams'
pkgname=pipenightdreams
version=0.10.0
revision=1
build_style=gnu-configure
configure_args=""
hostmakedepends="automake flex libtool pkg-config"
makedepends="SDL_image-devel"
short_desc="Just another pipe trip"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-3"
homepage="https://www.libsdl.org/projects/${pkgname}"
distfiles="${homepage}/packages/${pkgname}-${version}.tar.bz2"
checksum=302f8ce6e0eb32ebd779700527095cf086c2c7132d47095bae9a43c346245541
pre_configure() {
find . -type f -exec sed -i "{}" -e "s;/games/;/;g" \;
autoreconf -if
}
post_configure() {
# Replace non-expanded GAME_DATADIR prefix
sed -i src/config.h -e 's;"${prefix}/;"/usr/;'
}
post_install() {
vmkdir usr/share/applications
vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications
vmkdir usr/share/pixmaps
vinstall images/pipes_space/horizontal.png 644 usr/share/pixmaps ${pkgname}.png
}