Complete.Org: Mailing Lists: Archives: freeciv-dev: November 1998:
Re: [Freeciv-Dev] Patch for split unit bitmaps (exploded tilesets)
Home

Re: [Freeciv-Dev] Patch for split unit bitmaps (exploded tilesets)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Patch for split unit bitmaps (exploded tilesets)
From: Sverker Wiberg <sverkerw@xxxxxxxxxxxx>
Date: Fri, 20 Nov 1998 01:13:37 +0100

Mitch Davis wrote:
> Please produce your diffs in "unified" format, using either -u
> or --unified.  The extra lines of context in this format mean
> that these patches are much more tolerant when the surrounding
> code changes.

My cvs still won't use GNU diff, but I hope that you will find context
diffs acceptable. So here are my unit-split patch a third (and
hopefully last) time. The exploded bitmaps were in my previous
submission, in a base-64 tarball.

/Sverker


Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.22
diff -c -r1.22 configure.in
*** configure.in        1998/11/18 12:10:32     1.22
--- configure.in        1998/11/19 23:48:04
***************
*** 114,117 ****
  AC_EXPAND_DIR(FREECIV_DATADIR, "$datadir/freeciv")
  AC_DEFINE_UNQUOTED(FREECIV_DATADIR, "$FREECIV_DATADIR")
  
! AC_OUTPUT(Makefile data/Makefile common/Makefile ai/Makefile client/Makefile 
server/Makefile)
--- 122,125 ----
  AC_EXPAND_DIR(FREECIV_DATADIR, "$datadir/freeciv")
  AC_DEFINE_UNQUOTED(FREECIV_DATADIR, "$FREECIV_DATADIR")
  
! AC_OUTPUT(Makefile data/Makefile data/units/Makefile data/tiles/Makefile 
common/Makefile client/Makefile server/Makefile ai/Makefile)
Index: client/graphics.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/graphics.c,v
retrieving revision 1.10
diff -c -r1.10 graphics.c
*** graphics.c  1998/11/15 01:44:03     1.10
--- graphics.c  1998/11/19 23:48:05
***************
*** 94,100 ****
    struct Sprite *big_sprite, *small_sprite, *unit_sprite, *treaty_sprite;
  
    big_sprite  = load_xpmfile(datafilename("tiles.xpm"));
-   unit_sprite = load_xpmfile(datafilename("units.xpm"));
    small_sprite= load_xpmfile(datafilename("small.xpm"));
    treaty_sprite=load_xpmfile(datafilename("treaty.xpm"));
  
--- 94,99 ----
***************
*** 162,177 ****
    }
  
    UNIT_TILES = i;
!   for(y=0; y<unit_sprite->height; y+=NORMAL_TILE_HEIGHT)
!     for(x=0; x<unit_sprite->width; x+=NORMAL_TILE_WIDTH) {
        GC plane_gc;
        Pixmap mypixmap, mask;
        
        mypixmap=XCreatePixmap(display, root_window,
                             NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT, 
                             display_depth);
        XCopyArea(display, unit_sprite->pixmap, mypixmap, civ_gc, 
!               x, y, NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT, 0 ,0);
  
        mask=XCreatePixmap(display, root_window,
                         NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT, 1);
--- 161,181 ----
    }
  
    UNIT_TILES = i;
!   for(i = 0; i < U_LAST; i++)
!   {
        GC plane_gc;
        Pixmap mypixmap, mask;
+ 
+       if(unit_types[i].filename[0] == '\0')
+         strcpy(unit_types[i].filename, "units/unknown.xpm");
        
+       unit_sprite = load_xpmfile(datafilename(unit_types[i].filename));
+ 
        mypixmap=XCreatePixmap(display, root_window,
                             NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT, 
                             display_depth);
        XCopyArea(display, unit_sprite->pixmap, mypixmap, civ_gc, 
!               0, 0, NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT, 0 ,0);
  
        mask=XCreatePixmap(display, root_window,
                         NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT, 1);
***************
*** 179,192 ****
        plane_gc = XCreateGC(display, mask, 0, NULL);
  
        XCopyArea(display, unit_sprite->mask, mask, plane_gc, 
!               x, y, NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT, 0 ,0);
  
!       tile_sprites[i++]=ctor_sprite_mask(mypixmap, mask,
!                                        NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT);
  
        XFreeGC(display, plane_gc);
!     }
!   free_sprite(unit_sprite);
    free_sprite(big_sprite);
    free_sprite(small_sprite);
    free_sprite(treaty_sprite);
--- 183,197 ----
        plane_gc = XCreateGC(display, mask, 0, NULL);
  
        XCopyArea(display, unit_sprite->mask, mask, plane_gc, 
!               0, 0, NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT, 0 ,0);
  
!       unit_types[i].graphics
!         = ctor_sprite_mask(mypixmap, mask,
!                            NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT);
  
        XFreeGC(display, plane_gc);
!   }
! 
    free_sprite(big_sprite);
    free_sprite(small_sprite);
    free_sprite(treaty_sprite);
***************
*** 314,320 ****
    };
  
    if(i<U_LAST) {
!     struct Sprite *s=get_tile_sprite(get_unit_type(i)->graphics+UNIT_TILES);
  
      XSetClipOrigin(display,civ_gc,0,0);
      XSetClipMask(display,civ_gc,s->mask);
--- 319,325 ----
    };
  
    if(i<U_LAST) {
!     struct Sprite *s = get_unit_type(i)->graphics;
  
      XSetClipOrigin(display,civ_gc,0,0);
      XSetClipMask(display,civ_gc,s->mask);
Index: client/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview.c,v
retrieving revision 1.18
diff -c -r1.18 mapview.c
*** mapview.c   1998/09/23 19:24:39     1.18
--- mapview.c   1998/11/19 23:48:07
***************
*** 164,169 ****
--- 164,170 ----
  
  extern int goto_state;
  
+ void pixmap_put_overlay_sprite(Pixmap pixmap, int x, int y, struct Sprite 
*sprite);
  void pixmap_put_overlay_tile(Pixmap pixmap, int x, int y, int tileno);
  void show_city_names(void);
  
***************
*** 982,988 ****
      };
    }
      
!   pixmap_put_overlay_tile(pm, xtile, ytile, 
get_unit_type(punit->type)->graphics+UNIT_TILES);
  
    if(punit->activity!=ACTIVITY_IDLE) {
      int tileno=0;
--- 983,990 ----
      };
    }
      
!   pixmap_put_overlay_sprite(pm, xtile, ytile, 
!                           get_unit_type(punit->type)->graphics);
  
    if(punit->activity!=ACTIVITY_IDLE) {
      int tileno=0;
***************
*** 1346,1363 ****
  /**************************************************************************
  ...
  **************************************************************************/
! void pixmap_put_overlay_tile(Pixmap pixmap, int x, int y, int tileno)
  {
-   struct Sprite *ssprite=get_tile_sprite(tileno);
-       
    XSetClipOrigin(display, civ_gc, x*NORMAL_TILE_WIDTH, y*NORMAL_TILE_HEIGHT);
!   XSetClipMask(display, civ_gc, ssprite->mask);
        
!   XCopyArea(display, ssprite->pixmap, pixmap, 
            civ_gc, 0, 0,
!           ssprite->width, ssprite->height, 
            x*NORMAL_TILE_WIDTH, y*NORMAL_TILE_HEIGHT);
    XSetClipMask(display, civ_gc, None); 
  }
  
  /**************************************************************************
--- 1348,1372 ----
  /**************************************************************************
  ...
  **************************************************************************/
! void
! pixmap_put_overlay_sprite(Pixmap pixmap, int x, int y, struct Sprite *sprite)
  {
    XSetClipOrigin(display, civ_gc, x*NORMAL_TILE_WIDTH, y*NORMAL_TILE_HEIGHT);
!   XSetClipMask(display, civ_gc, sprite->mask);
        
!   XCopyArea(display, sprite->pixmap, pixmap, 
            civ_gc, 0, 0,
!           sprite->width, sprite->height, 
            x*NORMAL_TILE_WIDTH, y*NORMAL_TILE_HEIGHT);
    XSetClipMask(display, civ_gc, None); 
+ }
+ 
+ /**************************************************************************
+ ...
+ **************************************************************************/
+ void pixmap_put_overlay_tile(Pixmap pixmap, int x, int y, int tileno)
+ {
+   pixmap_put_overlay_sprite(pixmap, x, y, get_tile_sprite(tileno));
  }
  
  /**************************************************************************
Index: common/unit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v
retrieving revision 1.27
diff -c -r1.27 unit.c
*** unit.c      1998/11/09 11:14:58     1.27
--- unit.c      1998/11/19 23:48:08
***************
*** 20,82 ****
  #include <player.h>
  #include <log.h>
  
! /* cost ,flags, attack, defense, move, tech_req, vision, transport?, HP, FP, 
Obsolete, FUEL */
  
  struct unit_type unit_types[U_LAST]={
!   {"Settlers",      24, LAND_MOVING, 40,   0,  1,  1*3, A_NONE,        1,  0, 
20, 1, U_ENGINEERS, 0, F_SETTLERS | F_NONMIL },
!   {"Engineers",     42, LAND_MOVING, 40,   0,  2,  2*3, A_EXPLOSIVES,  1,  0, 
20, 1, -1, 0, F_SETTLERS | F_NONMIL },
!   {"Warriors",      18, LAND_MOVING, 10,   1,  1,  1*3, A_NONE,        1,  0, 
10, 1, U_PIKEMEN, 0, 0},
!   {"Phalanx",       21, LAND_MOVING, 20,   1,  2,  1*3, A_BRONZE,      1,  0, 
10, 1, U_PIKEMEN, 0, 0},
!   {"Archers",       28, LAND_MOVING, 30,   3,  2,  1*3, A_WARRIORCODE, 1,  0, 
10, 1, U_MUSKETEERS, 0, 0},
!   {"Legion",        16, LAND_MOVING, 40,   4,  2,  1*3, A_IRON,        1,  0, 
10, 1, U_MUSKETEERS, 0, 0},
!   {"Pikemen",       37, LAND_MOVING, 20,   1,  2,  1*3, A_FEUDALISM,   1,  0, 
10, 1, U_MUSKETEERS, 0, F_PIKEMEN},
!   {"Musketeers",    19, LAND_MOVING, 30,   3,  3,  1*3, A_GUNPOWDER,   1,  0, 
20, 1, U_RIFLEMEN, 0,0 },
!   {"Fanatics",      49, LAND_MOVING, 20,   4,  4,  1*3, A_LAST,        1,  0, 
20, 1, -1, 0,0},
!   {"Partisan",      36, LAND_MOVING, 50,   4,  4,  1*3, A_GUERILLA,    1,  0, 
20, 1, -1, 0,F_IGTER | F_IGZOC},
!   {"Alpine Troops", 45, LAND_MOVING, 50,   5,  5,  1*3, A_TACTICS,     1,  0, 
20, 1, -1, 0,F_IGTER},  
!   {"Riflemen",      22, LAND_MOVING, 40,   5,  4,  1*3, A_CONSCRIPTION,1,  0, 
20, 1, -1, 0,0},
!   {"Marines",       40, LAND_MOVING, 60,   8,  5,  1*3, A_AMPHIBIOUS,  1,  0, 
20, 1, -1, 0,F_MARINES},
!   {"Paratroopers",   0, LAND_MOVING, 60,   6,  4,  1*3, A_COMBINED,    1,  0, 
20, 1, -1, 0,0},
!   {"Mech. Inf.",    17, LAND_MOVING, 50,   6,  6,  3*3, A_LABOR,       1,  0, 
30, 1, -1, 0,0},
!   {"Horsemen",       8, LAND_MOVING, 20,   2,  1,  2*3, A_HORSEBACK,   1,  0, 
10, 1, U_KNIGHTS, 0,F_HORSE},
!   {"Chariot",        9, LAND_MOVING, 30,   3,  1,  2*3, A_WHEEL,       1,  0, 
10, 1, U_KNIGHTS, 0,F_HORSE},
!   {"Elephants",     39, LAND_MOVING, 40,   4,  1,  2*3, A_POLYTHEISM,  1,  0, 
10, 1, U_CRUSADERS, 0,0}, 
!   {"Crusaders",     38, LAND_MOVING, 40,   5,  1,  2*3, A_MONOTHEISM,  1,  0, 
10, 1, U_DRAGOONS, 0,F_HORSE},   
!   {"Knights",       15, LAND_MOVING, 40,   4,  2,  2*3, A_CHIVALRY,    1,  0, 
10, 1, U_DRAGOONS, 0,F_HORSE},
!   {"Dragoons",      32, LAND_MOVING, 50,   5,  2,  2*3, A_LEADERSHIP,  1,  0, 
20, 1, U_CAVALRY, 0,F_HORSE},
!   {"Cavalry",       29, LAND_MOVING, 60,   8,  3,  2*3, A_TACTICS,     1,  0, 
20, 1, U_ARMOR, 0,0},           /* IS NOT a normal horse attack */
!   {"Armor",          0, LAND_MOVING, 80,  10,  5,  3*3, A_MOBILE,      1,  0, 
30, 1, -1, 0,0},
!   {"Catapult",       7, LAND_MOVING, 40,   6,  1,  1*3, A_MATHEMATICS, 1,  0, 
10, 1, U_CANNON, 0,0},
!   {"Cannon",         4, LAND_MOVING, 40,   8,  1,  1*3, A_METALLURGY,  1,  0, 
20, 1, U_ARTILLERY, 0,0},
!   {"Artillery",     43, LAND_MOVING, 50,  10,  1,  1*3, A_MACHINE,     1,  0, 
20, 2, U_HOWITZER, 0,0},
!   {"Howitzer",       1, LAND_MOVING, 70,  12,  2,  2*3, A_ROBOTICS,    1,  0, 
30, 2, -1, 0,F_IGWALL},
!   {"Fighter",       12, AIR_MOVING,  60,   4,  3, 10*3, A_FLIGHT,      2,  0, 
20, 2, U_SFIGHTER, 1,F_FIGHTER  | F_FIELDUNIT},
!   {"Bomber",         3, AIR_MOVING, 120,  12,  1,  8*3, A_ADVANCED,    2,  0, 
20, 2, U_SBOMBER, 2,F_FIELDUNIT|F_ONEATTACK},
!   {"Helicopter",    44, HELI_MOVING,100,  10,  3,  6*3, A_COMBINED,    2,  0, 
20, 2, -1, 0,F_ONEATTACK |F_FIELDUNIT},
!   {"Stealth Fighter",47,AIR_MOVING,  80,   8,  4, 14*3, A_STEALTH,     2,  0, 
20, 2, -1, 1,F_FIELDUNIT| F_FIGHTER},
!   {"Stealth Bomber",46, AIR_MOVING, 160,  14,  5, 12*3, A_STEALTH,     2,  0, 
20, 2, -1, 2,F_FIELDUNIT|F_ONEATTACK},
!   {"Trireme",       27, SEA_MOVING,  40,   1,  1,  3*3, A_MAPMAKING,   1,  2, 
10, 1, U_CARAVEL, 0,F_FIELDUNIT | F_TRIREME},
!   {"Caravel",       23, SEA_MOVING,  40,   2,  1,  3*3, A_NAVIGATION,  1,  3, 
10, 1, U_GALLEON, 0,0},
!   {"Galleon",       35, SEA_MOVING,  40,   0,  2,  4*3, A_MAGNETISM,   1,  4, 
20, 1, U_TRANSPORT, 0,0},
!   {"Frigate",       13, SEA_MOVING,  50,   4,  2,  4*3, A_MAGNETISM,   1,  2, 
20, 1, U_IRONCLAD, 0,F_FIELDUNIT},
!   {"Ironclad",      14, SEA_MOVING,  60,   4,  4,  4*3, A_STEAM,       1,  0, 
30, 1, U_DESTROYER, 0,F_FIELDUNIT},
!   {"Destroyer",     31, SEA_MOVING,  60,   4,  4,  6*3, A_ELECTRICITY, 2,  0, 
30, 1, -1, 0,F_FIELDUNIT},
!   {"Cruiser",       10, SEA_MOVING,  80,   6,  6,  5*3, A_STEEL,       2,  0, 
30, 2, U_AEGIS, 0,F_FIELDUNIT},
!   {"AEGIS Cruiser", 48, SEA_MOVING, 100,   8,  8,  5*3, A_ROCKETRY,    2,  0, 
30, 2, -1, 0,F_AEGIS | F_FIELDUNIT},
!   {"Battleship",     2, SEA_MOVING, 160,  12, 12,  4*3, A_AUTOMOBILE,  2,  0, 
40, 2, -1, 0,F_FIELDUNIT},
!   {"Submarine",     25, SEA_MOVING,  60,  10,  2,  3*3, A_COMBUSTION,  2,  8, 
30, 2, -1, 0,F_FIELDUNIT|F_SUBMARINE},
!   {"Carrier",        6, SEA_MOVING, 160,   1,  9,  5*3, A_ADVANCED,    2,  8, 
40, 2, -1, 0,F_FIELDUNIT|F_CARRIER},
!   {"Transport",     26, SEA_MOVING,  50,   0,  3,  5*3, 
A_INDUSTRIALIZATION,2, 8, 30, 1, -1, 0,0},
!   {"Cruise Missile",30, AIR_MOVING,  60,  18,  0, 12*3, A_ROCKETRY,    1,  0, 
10, 3, -1, 1,F_FIELDUNIT | F_MISSILE | F_ONEATTACK},
!   {"Nuclear",       20, AIR_MOVING, 160,  99,  0, 16*3, A_ROCKETRY,    1,  0, 
10, 1, -1, 1,F_FIELDUNIT | F_ONEATTACK | F_MISSILE | F_NUCLEAR},
!   {"Diplomat",      11, LAND_MOVING, 30,   0,  0,  2*3, A_WRITING,     1,  0, 
10, 1, U_SPY, 0,F_DIPLOMAT | F_IGZOC | F_NONMIL},
!   {"Spy",           41, LAND_MOVING, 30,   0,  0,  3*3, A_ESPIONAGE,   2,  0, 
10, 1, -1, 0,F_DIPLOMAT | F_SPY | F_IGZOC | F_NONMIL},
!   {"Caravan",        5, LAND_MOVING, 50,   0,  1,  1*3, A_TRADE,       1,  0, 
10, 1, U_FREIGHT, 0,F_CARAVAN | F_IGZOC | F_NONMIL},
!   {"Freight",       34, LAND_MOVING, 50,   0,  1,  2*3, A_CORPORATION, 1,  0, 
10, 1, -1, 0,F_CARAVAN | F_IGZOC | F_NONMIL},
!   {"Explorer",      33, LAND_MOVING, 30,   0,  1,  1*3, A_SEAFARING,   1,  0, 
10, 1, U_PARTISAN, 0,F_NONMIL | F_IGTER | F_IGZOC}
  
  };
  
  
  /***************************************************************
  ...
--- 20,147 ----
  #include <player.h>
  #include <log.h>
  
! /* name, filename, moveflags, cost, attack, defense, move, 
!    tech_req, vision, transport?, HP, FP, obsolete, fuel, flags */
  
  struct unit_type unit_types[U_LAST]={
!    {"Settlers", "units/settler.xpm", LAND_MOVING, 40,   0,  1,  1*3,
!     A_NONE, 1,  0, 20, 1, U_ENGINEERS, 0, F_SETTLERS | F_NONMIL },
!    {"Engineers", "units/engineer.xpm", LAND_MOVING, 40,   0,  2,  2*3, 
!     A_EXPLOSIVES,  1,  0, 20, 1, -1, 0, F_SETTLERS | F_NONMIL },
!  
!    {"Warriors", "units/warrior.xpm", LAND_MOVING, 10,   1,  1,  1*3, 
!     A_NONE,        1,  0, 10, 1, U_PIKEMEN, 0, 0},
!    {"Phalanx", "units/phalanx.xpm", LAND_MOVING, 20,   1,  2,  1*3,
!     A_BRONZE,      1,  0, 10, 1, U_PIKEMEN, 0, 0},
!    {"Archers", "units/archer.xpm", LAND_MOVING, 30,   3,  2,  1*3,
!     A_WARRIORCODE, 1,  0, 10, 1, U_MUSKETEERS, 0, 0},
!    {"Legion", "units/legion.xpm", LAND_MOVING, 40,   4,  2,  1*3, 
!     A_IRON,        1,  0, 10, 1, U_MUSKETEERS, 0, 0},
!    {"Pikemen", "units/pike.xpm", LAND_MOVING, 20,   1,  2,  1*3, 
!     A_FEUDALISM,   1,  0, 10, 1, U_MUSKETEERS, 0, F_PIKEMEN},
!    {"Musketeers", "units/musket.xpm", LAND_MOVING, 30,   3,  3,  1*3, 
!     A_GUNPOWDER,   1,  0, 20, 1, U_RIFLEMEN, 0,0 },
  
+    {"Fanatics", "", LAND_MOVING, 20,   4,  4,  1*3, 
+     A_LAST,        1,  0, 20, 1, -1, 0,0},
+    {"Partisan", "units/partisan.xpm", LAND_MOVING, 50,   4,  4,  1*3, 
+     A_GUERILLA,    1,  0, 20, 1, -1, 0,F_IGTER | F_IGZOC},
+    {"Alpine Troops", "units/alpine.xpm", LAND_MOVING, 50,   5,  5,  1*3, 
+     A_TACTICS,     1,  0, 20, 1, -1, 0,F_IGTER},  
+    {"Riflemen", "units/rifle.xpm", LAND_MOVING, 40,   5,  4,  1*3, 
+     A_CONSCRIPTION,1,  0, 20, 1, -1, 0,0},
+    {"Marines", "units/marine.xpm", LAND_MOVING, 60,   8,  5,  1*3, 
+     A_AMPHIBIOUS,  1,  0, 20, 1, -1, 0,F_MARINES},
+    {"Paratroopers", "", LAND_MOVING, 60,   6,  4,  1*3, 
+     A_COMBINED,    1,  0, 20, 1, -1, 0,0},
+    {"Mech. Inf.", "units/mech.xpm", LAND_MOVING, 50,   6,  6,  3*3, 
+     A_LABOR,       1,  0, 30, 1, -1, 0,0},
+ 
+    {"Horsemen", "units/horse.xpm", LAND_MOVING, 20,   2,  1,  2*3, 
+     A_HORSEBACK,   1,  0, 10, 1, U_KNIGHTS, 0,F_HORSE},
+    {"Chariot", "units/chariot.xpm", LAND_MOVING, 30,   3,  1,  2*3, 
+     A_WHEEL,       1,  0, 10, 1, U_KNIGHTS, 0,F_HORSE},
+    {"Elephants", "", LAND_MOVING, 40,   4,  1,  2*3, 
+     A_POLYTHEISM,  1,  0, 10, 1, U_CRUSADERS, 0,0}, 
+    {"Crusaders", "", LAND_MOVING, 40,   5,  1,  2*3, 
+     A_MONOTHEISM,  1,  0, 10, 1, U_DRAGOONS, 0,F_HORSE},   
+    {"Knights", "units/knight.xpm", LAND_MOVING, 40,   4,  2,  2*3, 
+     A_CHIVALRY,    1,  0, 10, 1, U_DRAGOONS, 0,F_HORSE},
+    {"Dragoons", "units/dragoon.xpm", LAND_MOVING, 50,   5,  2,  2*3, 
+     A_LEADERSHIP,  1,  0, 20, 1, U_CAVALRY, 0,F_HORSE},
+    {"Cavalry", "units/cavalry.xpm", LAND_MOVING, 60,   8,  3,  2*3, /* [1] */
+     A_TACTICS,     1,  0, 20, 1, U_ARMOR, 0,0}, 
+    {"Armor", "units/armour.xpm", LAND_MOVING, 80,  10,  5,  3*3, 
+     A_MOBILE,      1,  0, 30, 1, -1, 0,0},
+ 
+    {"Catapult", "units/catapult.xpm", LAND_MOVING, 40,   6,  1,  1*3, 
+     A_MATHEMATICS, 1,  0, 10, 1, U_CANNON, 0,0},
+    {"Cannon", "units/cannon.xpm", LAND_MOVING, 40,   8,  1,  1*3, 
+     A_METALLURGY,  1,  0, 20, 1, U_ARTILLERY, 0,0},
+    {"Artillery", "units/artillery.xpm", LAND_MOVING, 50,  10,  1,  1*3, 
+     A_MACHINE,     1,  0, 20, 2, U_HOWITZER, 0,0},
+    {"Howitzer", "units/howitzer.xpm", LAND_MOVING, 70,  12,  2,  2*3, 
+     A_ROBOTICS,    1,  0, 30, 2, -1, 0,F_IGWALL},
+ 
+    {"Fighter", "units/fighter.xpm", AIR_MOVING,  60,   4,  3, 10*3, 
+     A_FLIGHT,      2,  0, 20, 2, U_SFIGHTER, 1,F_FIGHTER  | F_FIELDUNIT},
+    {"Bomber", "units/bomber.xpm", AIR_MOVING, 120,  12,  1,  8*3, 
+     A_ADVANCED,    2,  0, 20, 2, U_SBOMBER, 2,F_FIELDUNIT|F_ONEATTACK},
+    {"Helicopter", "units/helicopter.xpm", HELI_MOVING,100,  10,  3,  6*3, 
+     A_COMBINED,    2,  0, 20, 2, -1, 0,F_ONEATTACK |F_FIELDUNIT},
+    {"Stealth Fighter", "units/s-fighter.xpm", AIR_MOVING,  80,   8,  4, 14*3,
+     A_STEALTH,     2,  0, 20, 2, -1, 1,F_FIELDUNIT| F_FIGHTER},
+    {"Stealth Bomber", "units/s-bomber.xpm", AIR_MOVING, 160,  14,  5, 12*3, 
+     A_STEALTH,     2,  0, 20, 2, -1, 2,F_FIELDUNIT|F_ONEATTACK},
+ 
+    {"Trireme", "units/trireme.xpm", SEA_MOVING,  40,   1,  1,  3*3, 
+     A_MAPMAKING,   1,  2, 10, 1, U_CARAVEL, 0,F_FIELDUNIT},
+    {"Caravel", "units/caravel.xpm", SEA_MOVING,  40,   2,  1,  3*3, 
+     A_NAVIGATION,  1,  3, 10, 1, U_GALLEON, 0,0},
+    {"Galleon", "units/galleon.xpm", SEA_MOVING,  40,   0,  2,  4*3, 
+     A_MAGNETISM,   1,  4, 20, 1, U_TRANSPORT, 0,0},
+    {"Frigate", "units/frigate.xpm", SEA_MOVING,  50,   4,  2,  4*3, 
+     A_MAGNETISM,   1,  2, 20, 1, U_IRONCLAD, 0,F_FIELDUNIT},
+    {"Ironclad", "units/ironclad.xpm", SEA_MOVING,  60,   4,  4,  4*3, 
+     A_STEAM,       1,  0, 30, 1, U_DESTROYER, 0,F_FIELDUNIT},
+    {"Destroyer", "units/destroyer.xpm", SEA_MOVING,  60,   4,  4,  6*3, 
+     A_ELECTRICITY, 2,  0, 30, 1, -1, 0,F_FIELDUNIT},
+    {"Cruiser", "units/cruiser.xpm", SEA_MOVING,  80,   6,  6,  5*3, 
+     A_STEEL,       2,  0, 30, 2, U_AEGIS, 0,F_FIELDUNIT},
+    {"AEGIS Cruiser", "units/aegis.xpm", SEA_MOVING, 100,   8,  8,  5*3, 
+     A_ROCKETRY,    2,  0, 30, 2, -1, 0,F_AEGIS | F_FIELDUNIT},
+    {"Battleship", "units/battleship.xpm", SEA_MOVING, 160,  12, 12,  4*3, 
+     A_AUTOMOBILE,  2,  0, 40, 2, -1, 0,F_FIELDUNIT},
+    {"Submarine", "units/submarine.xpm", SEA_MOVING,  60,  10,  2,  3*3, 
+     A_COMBUSTION,  2,  8, 30, 2, -1, 0,F_FIELDUNIT|F_SUBMARINE},
+    {"Carrier", "units/carrier.xpm", SEA_MOVING, 160,   1,  9,  5*3, 
+     A_ADVANCED,    2,  8, 40, 2, -1, 0,F_FIELDUNIT|F_CARRIER},
+    {"Transport", "units/transport.xpm", SEA_MOVING,  50,   0,  3,  5*3, 
+     A_INDUSTRIALIZATION,2, 8, 30, 1, -1, 0,0},
+ 
+    {"Cruise Missile", "units/cruise-msl.xpm", AIR_MOVING,  60,  18,  0, 12*3,
+     A_ROCKETRY,    1,  0, 10, 3, -1, 1,F_FIELDUNIT | F_MISSILE | F_ONEATTACK},
+ 
+    {"Nuclear", "units/nuke.xpm", AIR_MOVING, 160,  99,  0, 16*3, 
+     A_ROCKETRY,    1,  0, 10, 1, -1, 1,F_FIELDUNIT | F_ONEATTACK | F_MISSILE},
+ 
+    {"Diplomat", "units/diplomat.xpm", LAND_MOVING, 30,   0,  0,  2*3, 
+     A_WRITING,     1,  0, 10, 1, U_SPY, 0,F_DIPLOMAT | F_IGZOC | F_NONMIL},
+    {"Spy", "units/spy.xpm", LAND_MOVING, 30,   0,  0,  3*3, 
+     A_ESPIONAGE,   2,  0, 10, 1, -1, 0,F_DIPLOMAT | F_IGZOC | F_NONMIL},
+ 
+    {"Caravan", "units/caravan.xpm", LAND_MOVING, 50,   0,  1,  1*3, 
+     A_TRADE,       1,  0, 10, 1, U_FREIGHT, 0,F_CARAVAN | F_IGZOC | F_NONMIL},
+    {"Freight", "units/freight.xpm", LAND_MOVING, 50,   0,  1,  2*3, 
+     A_CORPORATION, 1,  0, 10, 1, -1, 0,F_CARAVAN | F_IGZOC | F_NONMIL},
+ 
+    {"Explorer", "units/explorer.xpm", LAND_MOVING, 30,   0,  1,  1*3, 
+     A_SEAFARING,   1,  0, 10, 1, U_PARTISAN, 0,F_NONMIL | F_IGTER | F_IGZOC}
  };
  
+ /* 
+  * [1] Cavalry attack *is* *not* a normal horse attack.
+  */
  
  /***************************************************************
  ...
Index: common/unit.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unit.h,v
retrieving revision 1.12
diff -c -r1.12 unit.h
*** unit.h      1998/11/05 07:28:58     1.12
--- unit.h      1998/11/19 23:48:08
***************
*** 150,156 ****
  #define F_SPY          (1<<19)     /* Enhanced spy abilities */
  struct unit_type {
    char name[MAX_LENGTH_NAME];
!   int graphics;
    enum unit_move_type move_type;
    int build_cost;
    int attack_strength;
--- 150,156 ----
  #define F_SPY          (1<<19)     /* Enhanced spy abilities */
  struct unit_type {
    char name[MAX_LENGTH_NAME];
!     char filename[MAX_LENGTH_NAME];
    enum unit_move_type move_type;
    int build_cost;
    int attack_strength;
***************
*** 164,169 ****
--- 164,171 ----
    int obsoleted_by;
    int fuel;
    int flags;
+ 
+     struct Sprite* graphics;
  };
  
  
Index: data/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/Makefile.am,v
retrieving revision 1.2
diff -c -r1.2 Makefile.am
*** Makefile.am 1998/11/14 00:52:50     1.2
--- Makefile.am 1998/11/19 23:48:08
***************
*** 10,15 ****
        radar.xpm       \
        small.xpm       \
        tiles.xpm       \
!       treaty.xpm      \
!       units.xpm
  EXTRA_DIST = $(pkgdata_DATA)
--- 10,17 ----
        radar.xpm       \
        small.xpm       \
        tiles.xpm       \
!       treaty.xpm
! 
! SUBDIRS = units
! 
  EXTRA_DIST = $(pkgdata_DATA)


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