Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#10714) loaded units need a special graphic
Home

[Freeciv-Dev] (PR#10714) loaded units need a special graphic

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: brett.albertson@xxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#10714) loaded units need a special graphic
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Nov 2004 09:33:52 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10714 >

> [jdorje - Sun Nov 07 06:20:14 2004]:

> In any case we should have a new "loaded" graphic.  But someone needs to
> draw it first!

Well, I drew a crappy graphic and wrote code to use it.

This does expose some bugs however.  The citydlg isn't updated when
units are loaded/unloaded.  I had thought this was fixed...

jason

? data/1.xpm
? data/2.xpm
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.204.2.6
diff -u -r1.204.2.6 tilespec.c
--- client/tilespec.c   10 Nov 2004 17:02:02 -0000      1.204.2.6
+++ client/tilespec.c   17 Nov 2004 17:31:20 -0000
@@ -1371,6 +1371,7 @@
   SET_SPRITE(unit.road,                "unit.road");
   SET_SPRITE(unit.sentry,      "unit.sentry");      
   SET_SPRITE(unit.stack,       "unit.stack");
+  sprites.unit.loaded = load_sprite("unit.loaded");
   SET_SPRITE(unit.transform,    "unit.transform");
   SET_SPRITE(unit.connect,      "unit.connect");
   SET_SPRITE(unit.patrol,       "unit.patrol");
@@ -2061,6 +2062,10 @@
     ADD_SPRITE_FULL(sprites.unit.stack);
   }
 
+  if (sprites.unit.loaded && punit->transported_by != -1) {
+    ADD_SPRITE_FULL(sprites.unit.loaded);
+  }
+
   if (sprites.unit.vet_lev[punit->veteran]) {
     ADD_SPRITE_FULL(sprites.unit.vet_lev[punit->veteran]);
   }
Index: client/tilespec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.h,v
retrieving revision 1.89.2.1
diff -u -r1.89.2.1 tilespec.h
--- client/tilespec.h   7 Oct 2004 19:15:21 -0000       1.89.2.1
+++ client/tilespec.h   17 Nov 2004 17:31:20 -0000
@@ -212,6 +212,7 @@
       *road,
       *sentry,
       *stack,
+      *loaded,
       *transform,
       *connect,
       *patrol,
Index: data/isophex/tiles.png
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isophex/tiles.png,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 tiles.png
Binary files /tmp/cvsu2AuzA and tiles.png differ
Index: data/isophex/tiles.spec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isophex/tiles.spec,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 tiles.spec
--- data/isophex/tiles.spec     20 Oct 2004 03:45:21 -0000      1.1.2.1
+++ data/isophex/tiles.spec     17 Nov 2004 17:31:21 -0000
@@ -27,6 +27,7 @@
   0, 18, "unit.auto_attack",
          "unit.auto_settler"
   0, 19, "unit.stack"
+  1, 17, "unit.loaded"
   1, 18, "unit.connect"
   1, 19, "unit.auto_explore"
   2, 12, "unit.transform"
Index: data/isotrident/tiles.png
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isotrident/tiles.png,v
retrieving revision 1.2
diff -u -r1.2 tiles.png
Binary files /tmp/cvsnJYqfO and tiles.png differ
Index: data/isotrident/tiles.spec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isotrident/tiles.spec,v
retrieving revision 1.3
diff -u -r1.3 tiles.spec
--- data/isotrident/tiles.spec  4 Oct 2004 19:39:20 -0000       1.3
+++ data/isotrident/tiles.spec  17 Nov 2004 17:31:21 -0000
@@ -27,6 +27,7 @@
   0, 18, "unit.auto_attack",
          "unit.auto_settler"
   0, 19, "unit.stack"
+  1, 17, "unit.loaded"
   1, 18, "unit.connect"
   1, 19, "unit.auto_explore"
   2, 12, "unit.transform"
Index: data/trident/tiles.png
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/trident/tiles.png,v
retrieving revision 1.5
diff -u -r1.5 tiles.png
Binary files /tmp/cvs5k03Y1 and tiles.png differ
Index: data/trident/tiles.spec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/trident/tiles.spec,v
retrieving revision 1.22
diff -u -r1.22 tiles.spec
--- data/trident/tiles.spec     4 Oct 2004 19:39:20 -0000       1.22
+++ data/trident/tiles.spec     17 Nov 2004 17:31:22 -0000
@@ -387,6 +387,7 @@
  13, 19, "unit.patrol"
  18, 16, "unit.lowfuel"
  18, 16, "unit.tired"
+ 18, 17, "unit.loaded"
 
 ; Unit hit-point bars: approx percent of hp remaining
 

Attachment: tiles.tar.gz
Description: Unix tar archive


[Prev in Thread] Current Thread [Next in Thread]