diff options
author | Tristan Heaven <nyhm@gentoo.org> | 2007-01-08 13:54:41 +0000 |
---|---|---|
committer | Tristan Heaven <nyhm@gentoo.org> | 2007-01-08 13:54:41 +0000 |
commit | df718ed37aab91201a081fd14bcff96663296656 (patch) | |
tree | a6d9c4c10d4579d2902bee3736eb98ac6c5af9e0 /games-board/qgo/files | |
parent | Removed masking after removing vls, vlms, sampeg3 and libvideogfx. (diff) | |
download | gentoo-2-df718ed37aab91201a081fd14bcff96663296656.tar.gz gentoo-2-df718ed37aab91201a081fd14bcff96663296656.tar.bz2 gentoo-2-df718ed37aab91201a081fd14bcff96663296656.zip |
Patch from Andrei Gerasimenko for displaying boards other than 19x19 correctly, bug #160577
(Portage version: 2.1.2_rc4-r6)
Diffstat (limited to 'games-board/qgo/files')
-rw-r--r-- | games-board/qgo/files/digest-qgo-1.5.2-r1 | 3 | ||||
-rw-r--r-- | games-board/qgo/files/qgo-1.5.2-gatter.patch | 95 |
2 files changed, 98 insertions, 0 deletions
diff --git a/games-board/qgo/files/digest-qgo-1.5.2-r1 b/games-board/qgo/files/digest-qgo-1.5.2-r1 new file mode 100644 index 000000000000..3cef7af548dc --- /dev/null +++ b/games-board/qgo/files/digest-qgo-1.5.2-r1 @@ -0,0 +1,3 @@ +MD5 a9767f2572fc8d8c5653726bbce402e0 qgo-1.5.2.tar.gz 2331728 +RMD160 007f29edb04ab5614baf67d3c4cb49194a187383 qgo-1.5.2.tar.gz 2331728 +SHA256 d8d2cb17a8e6a775357e850c35fd36e97fd85295648101ead7640a46d5135d3f qgo-1.5.2.tar.gz 2331728 diff --git a/games-board/qgo/files/qgo-1.5.2-gatter.patch b/games-board/qgo/files/qgo-1.5.2-gatter.patch new file mode 100644 index 000000000000..92c8a0b1ac6c --- /dev/null +++ b/games-board/qgo/files/qgo-1.5.2-gatter.patch @@ -0,0 +1,95 @@ +--- src/board.h.old 2006-09-20 01:58:15.000000000 +0400 ++++ src/board.h 2007-01-06 19:51:26.000000000 +0300 +@@ -37,6 +37,7 @@ + void show (int x, int y); + void resize(int offsetX, int offsetY, int square_size); + void showAll(); ++ void setBoardSize(int v); + + private: + int board_size; +@@ -134,7 +135,7 @@ + void doCountDone(); + void numberMoves() { boardHandler->numberMoves(); } + void markVariations(bool sons) { boardHandler->markVariations(sons); } +- void setBoardSize(int s) { board_size = s; } ++ void setBoardSize(int s) { board_size = s; gatter->setBoardSize(s); } + int getBoardSize() const { return board_size; } + #ifndef NO_DEBUG + void debug(); +--- src/board.cpp.old 2006-10-01 23:23:39.000000000 +0400 ++++ src/board.cpp 2007-01-06 22:27:50.000000000 +0300 +@@ -1406,7 +1406,7 @@ + CHECK_PTR(d); + + int oldsize = board_size; +- board_size = d->size; ++ setBoardSize(d->size); + + // Clear up everything + clearData(); +@@ -1667,14 +1667,44 @@ + } + + /** +- * Initialises the gatter intersections and hoshis points ++ * Creates a new Gatter instance + **/ + Gatter::Gatter(QCanvas *Canvas, int size) + { + int i,j; + +- board_size = size; + canvas=Canvas; ++ setBoardSize(size); ++} ++ ++ /** ++ * Initialises the gatter intersections and hoshis points ++ **/ ++void Gatter::setBoardSize(int v) ++{ ++ if (board_size == v) ++ return; ++ ++ int i,j; ++ ++ // remove old elements ++ if (board_size > 0) { ++ for (i=0; i<board_size; i++) { ++ for (j=0; j<board_size; j++) ++ { ++ delete VGatter[i][j]; ++ delete HGatter[i][j]; ++ } ++ } ++ VGatter.clear(); ++ HGatter.clear(); ++ QIntDictIterator<QCanvasEllipse> it( hoshisList ); ++ for ( ; it.current(); ++it ) ++ delete it.current(); ++ hoshisList.clear(); ++ } ++ ++ board_size = v; + + VGatter.reserve(board_size); + HGatter.reserve(board_size); +@@ -1740,13 +1770,15 @@ + { + HGatter[i][j]->setPoints(int(offsetX + square_size * ( i - 0.5*(i!=0))), + offsetY + square_size * j, +- int(offsetX + square_size * ( i + 0.5 * (i+1 != board_size))), ++ int(offsetX + square_size * ( i + 0.5 * (i+1 != ++ board_size))), + offsetY + square_size * j ); + + VGatter[i][j]->setPoints(offsetX + square_size * i, + int(offsetY + square_size * ( j - 0.5*(j!=0))), + offsetX + square_size * i, +- int(offsetY + square_size * ( j + 0.5 * (j+1 != board_size)))); ++ int(offsetY + square_size * ( j + 0.5 * (j+1 != ++ board_size)))); + + e=hoshisList.find(board_size*(i+1)+j+1); + if (e) |