diff options
author | joerg <joerg> | 2013-06-13 21:42:22 +0000 |
---|---|---|
committer | joerg <joerg> | 2013-06-13 21:42:22 +0000 |
commit | af55520757f58a6b5e29b93e827aaf5b199d6a07 (patch) | |
tree | 636de1712170cd34fa8e91c31378682a891556be /games | |
parent | af564979f97335e219d239ef58de610d5e899946 (diff) | |
download | pkgsrc-af55520757f58a6b5e29b93e827aaf5b199d6a07.tar.gz |
Fix redefinition in the same scope. Add missing unistd.h.
Diffstat (limited to 'games')
-rw-r--r-- | games/xye/patches/patch-src_editorsave.cpp | 25 | ||||
-rw-r--r-- | games/xye/patches/patch-src_gen.cpp | 7 |
2 files changed, 29 insertions, 3 deletions
diff --git a/games/xye/patches/patch-src_editorsave.cpp b/games/xye/patches/patch-src_editorsave.cpp new file mode 100644 index 00000000000..d2b9eedad7b --- /dev/null +++ b/games/xye/patches/patch-src_editorsave.cpp @@ -0,0 +1,25 @@ +$NetBSD: patch-src_editorsave.cpp,v 1.1 2013/06/13 21:42:22 joerg Exp $ + +--- src/editorsave.cpp.orig 2013-06-13 19:53:39.000000000 +0000 ++++ src/editorsave.cpp +@@ -636,16 +636,16 @@ bool editor::save(const string &target, + } + saveColorStuff(file, board); + +- int i,j; ++ int j; + file << "\t<ground>\n"; + resetSavedPosition(); +- for (i=0;i<XYE_HORZ;i++) for (j=0;j<XYE_VERT;j++) saveGroundObject(file,editor::board->objects[i][j],i,XYE_VERT-j-1); ++ for (int i2=0;i2<XYE_HORZ;i2++) for (j=0;j<XYE_VERT;j++) saveGroundObject(file,editor::board->objects[i2][j],i2,XYE_VERT-j-1); + file << "\t</ground>\n"; + file << "\t<objects>\n"; + resetSavedPosition(); +- for (i=0;i<XYE_HORZ;i++) for (j=0;j<XYE_VERT;j++) ++ for (int i2=0;i2<XYE_HORZ;i2++) for (j=0;j<XYE_VERT;j++) + { +- saveNormalObject(file,editor::board->objects[i][j],i,XYE_VERT-j-1); ++ saveNormalObject(file,editor::board->objects[i2][j],i2,XYE_VERT-j-1); + } + savePortals( file, editor::board); + diff --git a/games/xye/patches/patch-src_gen.cpp b/games/xye/patches/patch-src_gen.cpp index fa2f3b8188d..bc93f1c9486 100644 --- a/games/xye/patches/patch-src_gen.cpp +++ b/games/xye/patches/patch-src_gen.cpp @@ -1,12 +1,13 @@ -$NetBSD: patch-src_gen.cpp,v 1.2 2013/06/09 06:30:14 ryoon Exp $ +$NetBSD: patch-src_gen.cpp,v 1.3 2013/06/13 21:42:22 joerg Exp $ ---- src/gen.cpp.orig 2013-06-09 06:21:13.000000000 +0000 +--- src/gen.cpp.orig 2013-06-13 19:51:44.000000000 +0000 +++ src/gen.cpp -@@ -21,6 +21,7 @@ Permission is granted to anyone to use t +@@ -21,6 +21,8 @@ Permission is granted to anyone to use t #include<cstdio> #include<iostream> #include<fstream> +#include<ctime> ++#include <unistd.h> const float F_RAND_MAX = (float)(RAND_MAX); |