debian/0000755000000000000000000000000012261060361007163 5ustar debian/patches/0000755000000000000000000000000012261057463010623 5ustar debian/patches/series0000644000000000000000000000010412261057463012033 0ustar lookup-widget.patch warnings.patch human-ai.patch fix-desktop.patch debian/patches/human-ai.patch0000644000000000000000000000113712261057463013345 0ustar From: Bart Martens Date: Thu, 26 Dec 2013 11:01:00 +0000 Subject: human-ai =================================================================== --- src/moves.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/moves.c b/src/moves.c index e2b8e4e..90f5ac4 100644 --- a/src/moves.c +++ b/src/moves.c @@ -1743,7 +1743,7 @@ void init_engine() options.engine.maxwidth=3000; options.engine.timeout=1; options.white_player=HUMAN; - options.black_player=HUMAN; + options.black_player=AI; options.print_statistics=FALSE; home_env = getenv("HOME"); debian/patches/warnings.patch0000644000000000000000000001613412261057463013501 0ustar From: Bart Martens Date: Thu, 26 Dec 2013 11:01:00 +0000 Subject: warnings =================================================================== --- src/board.c | 56 +++++++++++--------------------------------------------- src/callbacks.c | 22 +++++++++------------- 2 files changed, 20 insertions(+), 58 deletions(-) diff --git a/src/board.c b/src/board.c index 6a02f7d..ac3c00d 100644 --- a/src/board.c +++ b/src/board.c @@ -1,3 +1,5 @@ +#define _GNU_SOURCE +#include #include #include #include @@ -11,9 +13,6 @@ /* local Prototypes */ -static void fill_a_square(GnomeCanvasGroup *group, - double x1, double y1, double x2, double y2, char *color); -static void get_square_color(int square, char *color); static void draw_a_line(GnomeCanvasGroup *group, int x1, int y1, int x2, int y2, char *color); static void draw_grid(); @@ -33,7 +32,6 @@ int state_hash; void init_game_board(GtkWidget *GamazonsMain) { int i,j; - char color[256]; GtkWidget *w = (GtkWidget *) lookup_widget(GamazonsMain, BOARD_NAME); GtkWidget *force_button, *undo_button; GtkTextView *view; @@ -115,32 +113,6 @@ void init_game_board(GtkWidget *GamazonsMain) } -void fill_a_square(GnomeCanvasGroup *group, - double x1, double y1, double x2, double y2, char *color) -{ - /* draw a box*/ - gnome_canvas_item_new(group, - gnome_canvas_rect_get_type(), - "x1", x1, - "y1", y1, - "x2", x2, - "y2", y2, - "outline_color", "black", - "fill_color", color, - "width_pixels", (double)THICKNESS, - NULL, NULL); - -} - -static void get_square_color(int square, char *color) -{ - if ((square % 2) == 0) - strcpy(color, SQUARE_COLOR_1); - else - strcpy(color, SQUARE_COLOR_2); -} - - static void draw_grid() { int x,y; @@ -190,14 +162,12 @@ static void draw_a_line(GnomeCanvasGroup *group, void draw_board() { int i,j,k; - int black_i = 0; GdkPixbuf *white_pb, *black_pb; GdkPixbuf *white_sq, *grey_sq, *arrow_sq; - char color[256]; GnomeCanvasItem *image; - GnomeCanvasGroup *root = GNOME_CANVAS_GROUP(gnome_canvas_root (GNOME_CANVAS (board->canvas))); - static int first_game = 1; + GnomeCanvasGroup *root = NULL; + root = GNOME_CANVAS_GROUP(gnome_canvas_root (GNOME_CANVAS (board->canvas))); /* Find images */ @@ -426,12 +396,10 @@ void move_piece_to(Square to, GnomeCanvasItem *item) { double Lx, Uy, Rx, By; double to_Lx, to_Uy; - int x, y; - int i,j; + int x = 0, y = 0; int game_life; GtkWidget *speed = (GtkWidget *)lookup_widget(main_window, "MovementSpeedSpinner"); int inc = gtk_spin_button_get_value_as_int((GtkSpinButton *)speed); - int count = 0; game_life = bstate_get_game_life(); to_Lx = get_x_from_square(to); @@ -601,7 +569,9 @@ void fire_arrow(Square sq) int x,y; GdkPixbuf *arrow_sq; GnomeCanvasItem *image; - GnomeCanvasGroup *root = GNOME_CANVAS_GROUP(gnome_canvas_root (GNOME_CANVAS (board->canvas))); + GnomeCanvasGroup *root = NULL; + + root = GNOME_CANVAS_GROUP(gnome_canvas_root (GNOME_CANVAS (board->canvas))); x = sq % 10; y = sq / 10; @@ -809,7 +779,6 @@ void register_move_with_engine(Square arrow_sq) move movelist[3000]; int move_count; int i; - int tocol, torow; int found = FALSE; char move_str[32]; char err_msg[256]; @@ -890,9 +859,7 @@ int is_queen_square(Square sq) void gen_legal_moves(Square sq) { int arr_i = 0; - int i; int row, col, sq_row, sq_col; - int scanning; sq_col = get_x_int_from_square(sq); sq_row = get_y_int_from_square(sq); @@ -1141,7 +1108,7 @@ int game_over() * * Updates the status bar based on the current value of what_next */ -update_status_bar() +int update_status_bar() { GtkStatusbar *status = (GtkStatusbar *) lookup_widget(main_window, "statusbar1"); guint context_id = bstate_get_what_next(); @@ -1175,6 +1142,7 @@ update_status_bar() } + return 0; } /*============================================================================== @@ -1213,8 +1181,6 @@ void print_board() */ void destroy_board() { - int i; - GtkWidget *CNVS_GAMEBOARD, *w, *scrolledwindow4, *table1; #ifdef DEBUG @@ -1412,7 +1378,7 @@ int read_in_moves(FILE *history_fd) int replay_mode = bstate_get_replay_mode(); int replay_delay = 0; int game_life = bstate_get_game_life(); - GtkWidget *delay; + GtkWidget *delay = NULL; if (replay_mode) { diff --git a/src/callbacks.c b/src/callbacks.c index df046b1..b2bae83 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -18,7 +18,7 @@ extern struct game_states states; extern Square legal_moves[100]; extern int ok; extern GtkWidget *main_window; -extern state_hash; +extern int state_hash; int grabbed_queen; GtkWidget *PlayerSettingsWindow; extern int moving_ai; @@ -218,8 +218,6 @@ void on_BT_UNDO_clicked (GtkButton *button, gpointer user_data) { - int temp; - GtkWidget *undo_button; int i; if (bstate_get_moving_piece()) @@ -351,25 +349,24 @@ int board_press_cb (GnomeCanvasItem *item, GdkEvent *event, gpointer data) double new_x, new_y; int from_row, from_col, to_row, to_col; // int from; - int i,j,k; - GtkWidget *auto_button, *undo_button; + int k; static Square to; static Square from; if (bstate_get_moving_piece()) { //printf("Can't do that while a piece is moving\n"); - return; + return 0; } if (bstate_get_open_dialog()) { //printf("Can't do that while another window is open\n"); - return; + return 0; } if (bstate_get_what_next() == NEW_GAME) { //printf("Can't do that while I'm expecting a new game to start\n"); - return; + return 0; } if (bstate_get_replay_mode()) return 0; @@ -543,7 +540,8 @@ int board_press_cb (GnomeCanvasItem *item, GdkEvent *event, gpointer data) printf("what_next = %d\n", bstate_get_what_next()); #endif break; - //default: + default: + break; } return 1; @@ -615,7 +613,8 @@ int arrow_fire_cb(GnomeCanvasItem *item, GdkEvent *event, gpointer data) dup_state(s, states.s[++(states.current_state)]); if (bstate_get_what_next() == WAIT_FOR_AI) move_ai(); - //default: + default: + break; } return 0; @@ -767,7 +766,6 @@ on_save_as1_activate (GtkMenuItem *menuitem, gpointer user_data) { //char home[256]; - char *home_env; if (bstate_get_open_dialog()) return; @@ -860,7 +858,6 @@ on_open_activate (GtkMenuItem *menuitem, gpointer user_data) { //char home[256]; - char *home_env; if (bstate_get_open_dialog()) return; @@ -960,7 +957,6 @@ on_BT_REPLAY_clicked (GtkButton *button, gpointer user_data) { //char home[256]; - char *home_env; if (bstate_get_open_dialog()) return; debian/patches/lookup-widget.patch0000644000000000000000000000213312261057463014435 0ustar From: Dann Frazier Date: Thu, 26 Dec 2013 11:01:00 +0000 Subject: lookup-widget Bug: http://bugs.debian.org/402636 =================================================================== --- src/board.c | 1 + src/bstate.c | 1 + src/moves.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/board.c b/src/board.c index 365aa20..6a02f7d 100644 --- a/src/board.c +++ b/src/board.c @@ -6,6 +6,7 @@ #include "board.h" #include "bstate.h" #include "callbacks.h" +#include "support.h" /* local Prototypes */ diff --git a/src/bstate.c b/src/bstate.c index 4450e41..a1eede8 100644 --- a/src/bstate.c +++ b/src/bstate.c @@ -2,6 +2,7 @@ #include "amazons.h" #include "board.h" #include "bstate.h" +#include "support.h" static Board_State bstate; extern struct game_states states; diff --git a/src/moves.c b/src/moves.c index eab7766..e2b8e4e 100644 --- a/src/moves.c +++ b/src/moves.c @@ -28,6 +28,7 @@ Project URL: http://www.yorgalily.org/amazons/ #include "amazons.h" #include "unit-test.h" +#include "support.h" #define HEVAL heval // for testing differant hevals debian/patches/fix-desktop.patch0000644000000000000000000000154112261057463014102 0ustar From: Bart Martens Date: Thu, 26 Dec 2013 11:01:00 +0000 Subject: fix-desktop =================================================================== --- pixmaps/gamazons.desktop | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pixmaps/gamazons.desktop b/pixmaps/gamazons.desktop index 694fb88..80d6c04 100644 --- a/pixmaps/gamazons.desktop +++ b/pixmaps/gamazons.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=Gamazons Name[ca]=Gamazons Name[cs]=Gamazons @@ -29,9 +28,8 @@ Name[wa]=Gamazons Name[zh_TW]=Gamazons Comment=Gamazons game Exec=gamazons -Icon=gnome-gamazons.png +Icon=gnome-gamazons Terminal=false Type=Application -Categories=GNOME;Application;Game;BoardGame; -X-Desktop-File-Install-Version=0.3 -OnlyShowIn=GNOME; +Categories=Game;BoardGame; +Keywords=board;game;amazons;turns;gnome; debian/compat0000644000000000000000000000000212261057463010372 0ustar 9 debian/menu0000644000000000000000000000030212261057463010056 0ustar ?package(gamazons):needs="X11" \ section="Games/Board" \ icon="/usr/share/pixmaps/gnome-gamazons.xpm" \ longtitle="Amazons boardgame for Gnome" \ title="gamazons" \ command="gamazons" debian/rules0000755000000000000000000000051312261057463010253 0ustar #!/usr/bin/make -f export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed %: dh $@ --parallel --with autotools_dev override_dh_auto_configure: dh_auto_configure -- \ --prefix=/usr \ --bindir=/usr/games override_dh_auto_build: dh_auto_build convert -monitor -resize 32x32 pixmaps/gnome-gamazons.png pixmaps/gnome-gamazons.xpm debian/watch0000644000000000000000000000015512261057463010226 0ustar version=3 http://www.yorgalily.org/gamazons/src/gamazons-(.*)\.(?:zip|tgz|tbz2|txz|tar\.gz|tar\.bz2|tar\.xz) debian/gamazons.60000644000000000000000000000130312261057463011077 0ustar .TH "GAMAZONS" "6" .SH "NAME" gamazons \(em Amazons Boardgame for GNOME .SH "SYNOPSIS" .PP \fBgamazons\fR .SH "FILES" .IP "\fB$(HOME)/.gamazons\fP" 10 Configuration file. .SH "AUTHOR" .PP This manual page was written by Christoph Egger for the \fBDebian\fP system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. .PP On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2. .\" created by instant / docbook-to-man, Thu 26 Dec 2013, 10:23 debian/clean0000644000000000000000000000006412261057463010201 0ustar pixmaps/gnome-gamazons.xpm config.log config.status debian/install0000644000000000000000000000005612261057463010566 0ustar pixmaps/gnome-gamazons.xpm usr/share/pixmaps/ debian/copyright0000644000000000000000000000364212261057463011134 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: gamazons Source: http://www.yorgalily.org/gamazons/src Files: * Copyright: Ronald Yorgason License: GPL-2+ Files: debian/* Copyright: 2006-2008, Bart Martens 2009, Christoph Egger 2013, Markus Koschany License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. Files: install-sh Copyright: 1991, Massachusetts Institute of Technology License: MIT Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. debian/source/0000755000000000000000000000000012261057463010474 5ustar debian/source/lintian-overrides0000644000000000000000000000020112261057463014046 0ustar gamazons source: configure-generated-file-in-source config.log gamazons source: configure-generated-file-in-source config.status debian/source/format0000644000000000000000000000001412261057463011702 0ustar 3.0 (quilt) debian/control0000644000000000000000000000253012261057463010577 0ustar Source: gamazons Section: games Priority: optional Maintainer: Debian Games Team Uploaders: Markus Koschany Build-Depends: autotools-dev, debhelper (>= 9), imagemagick, libgnomeui-dev Standards-Version: 3.9.5 Homepage: http://www.yorgalily.org/gamazons/ Vcs-Git: git://anonscm.debian.org/pkg-games/gamazons.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/gamazons.git Package: gamazons Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Amazons boardgame for GNOME Amazons is a game played on a 10x10 chess board. Each side has four pieces (amazons) that move like chess queens (in a straight line in any direction). Instead of capturing pieces like in chess, the game is determined based on who moves last. . Each move consists of two parts. First an amazon moves to a new square and then fires an arrow to another square (the arrow is fired in a straight line in any direction from the square the amazon landed on). The square the arrow lands on becomes a permenant block for the rest of the game. No one can move over it, or fire an arrow over it. Every turn an amazon must move and fire an arrow, so every turn there is one less square available on the board. Try and block in your opponent or section off a good chunk of the board for yourself. debian/changelog0000644000000000000000000000423612261057463011053 0ustar gamazons (0.83-5) unstable; urgency=medium [ Christoph Egger ] * remove myself from uploaders [ Markus Koschany ] * Add myself to Uploaders. * Switch to source format 3.0 (quilt). * Convert gamazons.sgml to gamazons.6 manually. Drop docbook-to-man build-dependency. * Add config.log and config.status to clean file. Move source.lintian-overrides to the preferred source/lintian-overrides path. * Bump compat level to 9 and require debhelper >= 9. * debian/control: - Use canonical Vcs-* fields. - Update Standards-Version to 3.9.5, no changes. - Drop quilt from Build-Depends. Source format 3.0 uses quilt by default. * Update debian/copyright to copyright format 1.0. * Use absolute icon path for menu icon. * Add keywords to desktop file. Update fix-desktop patch and do not limit the visibility of the desktop file to GNOME only. * Add DEP-3 headers to all patches. * Update debian/rules. Build --with parallel and --with autotools_dev. * Export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed. * debian/watch: Make the extension regex more flexible. -- Markus Koschany Sun, 29 Dec 2013 12:03:06 +0100 gamazons (0.83-4) unstable; urgency=low * Adopting gamazons for the Games Team * Setting VCS-* Fields * Write a manpage -- Christoph Egger Tue, 24 Feb 2009 22:02:26 +0100 gamazons (0.83-3) unstable; urgency=low * QA upload, orphaning this package. -- Bart Martens Wed, 24 Dec 2008 20:27:05 +0100 gamazons (0.83-2) unstable; urgency=low * debian/patches/01_lookup_widget.diff: Fixes segfault on ia64. Patch by Dann Frazier , thanks. Closes: #402636. * debian/patches/02_warnings.diff: Less warnings. * debian/patches/03_human_ai.diff: Default play against AI. * debian/control, debian/menu, debian/install, debian/rules: Build-Depends on imagemagick, use it to convert a png to xpm, add icon to menu entry. -- Bart Martens Sat, 30 Dec 2006 13:31:19 +0100 gamazons (0.83-1) unstable; urgency=low * Initial release. Closes: #400231. -- Bart Martens Fri, 24 Nov 2006 16:49:38 +0100 debian/manpages0000644000000000000000000000002212261057463010704 0ustar debian/gamazons.6