[Freeciv-Dev] (PR#7147) cleanup to drawing code for goto_dest
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#7147) cleanup to drawing code for goto_dest |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Wed, 24 Dec 2003 02:30:52 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7147 >
The attached patch improves the code to draw the crossheads for units on
goto. Instead of checking the state of the unit it just checks to see
if it has a goto_dest. If so, the crosshead is drawn.
This cleanup is helpful for the orders patch.
jason
Index: client/gui-gtk/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/mapctrl.c,v
retrieving revision 1.93
diff -u -r1.93 mapctrl.c
--- client/gui-gtk/mapctrl.c 2003/12/16 15:07:52 1.93
+++ client/gui-gtk/mapctrl.c 2003/12/22 03:42:22
@@ -80,7 +80,7 @@
gtk_container_add(GTK_CONTAINER(p), gtk_label_new(popup_info_text(xtile,
ytile)));
punit = find_visible_unit(map_get_tile(xtile, ytile));
- if (punit && (punit->activity == ACTIVITY_GOTO || punit->connecting)) {
+ if (punit && is_goto_dest_set(punit)) {
cross_head->x = goto_dest_x(punit);
cross_head->y = goto_dest_y(punit);
cross_head++;
Index: client/gui-gtk-2.0/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapctrl.c,v
retrieving revision 1.35
diff -u -r1.35 mapctrl.c
--- client/gui-gtk-2.0/mapctrl.c 2003/12/16 15:07:52 1.35
+++ client/gui-gtk-2.0/mapctrl.c 2003/12/22 03:42:22
@@ -79,7 +79,7 @@
gtk_container_add(GTK_CONTAINER(p), gtk_label_new(popup_info_text(xtile,
ytile)));
punit = find_visible_unit(map_get_tile(xtile, ytile));
- if (punit && (punit->activity == ACTIVITY_GOTO || punit->connecting)) {
+ if (punit && is_goto_dest_set(punit)) {
cross_head->x = goto_dest_x(punit);
cross_head->y = goto_dest_y(punit);
cross_head++;
Index: client/gui-mui/mapclass.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/mapclass.c,v
retrieving revision 1.95
diff -u -r1.95 mapclass.c
--- client/gui-mui/mapclass.c 2003/08/06 07:18:25 1.95
+++ client/gui-mui/mapclass.c 2003/12/22 03:42:23
@@ -161,8 +161,7 @@
ptype->defense_strength, ptype->firepower, punit->hp,
ptype->hp, punit->veteran ? " V" : "", uc);
- if(punit->activity==ACTIVITY_GOTO || punit->connecting)
- {
+ if (is_goto_dest_set(punit)) {
cross_head->x = punit->goto_dest_x;
cross_head->y = punit->goto_dest_y;
cross_head++;
Index: client/gui-win32/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/mapctrl.c,v
retrieving revision 1.32
diff -u -r1.32 mapctrl.c
--- client/gui-win32/mapctrl.c 2003/12/16 15:07:52 1.32
+++ client/gui-win32/mapctrl.c 2003/12/22 03:42:23
@@ -179,7 +179,7 @@
ptype->defense_strength, ptype->firepower, punit->hp,
ptype->hp, punit->veteran?_(" V"):"", uc);
- if(punit->activity==ACTIVITY_GOTO || punit->connecting) {
+ if (is_goto_dest_set(punit)) {
cross_head->x = goto_dest_x(punit);
cross_head->y = goto_dest_y(punit);
cross_head++;
Index: client/gui-xaw/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/mapctrl.c,v
retrieving revision 1.80
diff -u -r1.80 mapctrl.c
--- client/gui-xaw/mapctrl.c 2003/12/16 15:07:52 1.80
+++ client/gui-xaw/mapctrl.c 2003/12/22 03:42:23
@@ -128,7 +128,7 @@
}
punit = find_visible_unit(map_get_tile(xtile, ytile));
- if (punit && (punit->activity == ACTIVITY_GOTO || punit->connecting)) {
+ if (punit && is_goto_dest_set(punit)) {
cross_head->x = goto_dest_x(punit);
cross_head->y = goto_dest_y(punit);
cross_head++;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#7147) cleanup to drawing code for goto_dest,
Jason Short <=
|
|