This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: xtconq status


> Remains to be fixed: the terrain, which is still drawn in single color
> instead of using the terrain images.

Well, my goal was to maintain it with its current functionality more
than improve it, but what the heck; I've added terrain images (didn't
do connections or borders, though).

> I did not have much luck with testing the xtconq network game

Don't use the join/host stuff - you might as well use tcltk for that.
Instead have one xtconq open several X displays, for example:

$ xtconq -r one@:0.0 two@:0.0

(from the xtconq.6 manpage).  Or a more real life example, where one
computer is "kingdon" and one is 10.3.5.2:

$ xtconq -r jim@kingdon:0.0 hans@10.3.5.2:0.0

I guess we should just have xtconq give an error on join/host.

> 3. Other stuff. The xtconq setup dialog (invoked by -x) doesn't work any
> more. You can pick and set up a game, but when you hit the "OK" button the
> program just beeps at you.

More indepside troubles.  The following patch gets you past the beep
but it doesn't work (there is one more side than there should be):

2002-02-03  Jim Kingdon  <kingdon@panix.com>

	* x11/xinit.c (type_player): Also allow iplayer or oplayer.
	(valid_gamepop, popup_game, verify_dialog, go_dialog): Don't
	include the indepside.

Index: xinit.c
===================================================================
RCS file: /cvs/xconq/xconq/x11/xinit.c,v
retrieving revision 1.10
diff -u -r1.10 xinit.c
--- xinit.c	2002/02/02 05:53:53	1.10
+++ xinit.c	2002/02/03 19:53:07
@@ -1088,8 +1088,7 @@
 }
 
 static void
-popup_game(g, flag)
-int g, flag;
+popup_game(int g, int flag)
 {
     char *vartypename = NULL;
     GamePop *pop = games[g].pop;
@@ -1262,7 +1261,8 @@
 	    if (flag == 1) {
 		pop->assign = (Assignw *) xmalloc(MAXSIDES*sizeof(Assignw));
 	    }
-	    for (i = 0; i < numsides; ++i) {
+	    /* Skip indepside == 0 */
+	    for (i = 1; i < numsides; ++i) {
 		side   = assignments[i].side;
 		player = assignments[i].player;
 		if (flag == 1) { 
@@ -1547,10 +1547,7 @@
 }
 
 static void
-go_dialog (w, client_data, call_data)
-Widget w;
-XtPointer client_data;
-XtPointer call_data;
+go_dialog (Widget w, XtPointer client_data, XtPointer call_data)
 {
     GamePop *pop = games[chosen_game].pop;
     char *value, *name;
@@ -1570,8 +1567,8 @@
 	if (pop->variants[i].mess)
 	  free(pop->variants[i].mess);
     }
-    /* get side values */
-    for (i = 0; i < numsides; ++i) {
+    /* get side values; skip indepside == 0 */
+    for (i = 1; i < numsides; ++i) {
 	if (pop->assign[i].pname) {
 	    name = NULL;
 	    value = XawDialogGetValueString(pop->assign[i].pname);
@@ -1627,8 +1624,8 @@
 	value = XawDialogGetValueString(pop->variants[i].dialog);
 	res = res && valid_variant(value, &(mainmodule->variants[i]));
     }
-    /* check sides */
-    for (i = 0; i < numsides; ++i) {
+    /* check sides (skip indepside == 0) */
+    for (i = 1; i < numsides; ++i) {
 	if (pop->assign[i].pid) {
 	    value = XawDialogGetValueString(pop->assign[i].pid);
 	    res = res && type_player(value)>0;
@@ -1639,10 +1636,7 @@
 }
 
 static void
-verify_dialog(w, client_data, call_data)
-Widget w;
-XtPointer client_data;
-XtPointer call_data;
+verify_dialog(Widget w, XtPointer client_data, XtPointer call_data)
 {
     GamePop *pop = games[chosen_game].pop;
     char *value;
@@ -1659,8 +1653,8 @@
 	    pop->variants[i].mess = copy_string(errormess);
 	}
     }
-    /* save side values */
-    for (i = 0; i < numsides; ++i) {
+    /* save side values; skip indepside == 0 */
+    for (i = 1; i < numsides; ++i) {
 	if (pop->assign[i].pname) {
 	    value = XawDialogGetValueString(pop->assign[i].pname);
 	    pop->assign[i].vname = copy_string(value);
@@ -1872,8 +1866,7 @@
   -2 = invalid machine player */
 
 static int
-type_player(value)
-char *value;
+type_player(char *value)
 {
     errormess[0] = '\0';
     if (!value[0]) {
@@ -1887,7 +1880,9 @@
 	    return -1;
 	}
     } else {
-	if (strcmp(value,"mplayer")) {
+	if (strcmp(value,"mplayer")
+	    && strcmp(value,"oplayer")
+	    && strcmp(value,"iplayer")) {
 	    sprintf(errormess,
 		    "invalid or unkonwn AI \"%s\", try \"mplayer\"", value);
 	    return -2;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]