Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: (PR#2741) Removing explicit mentioning of T_OCEAN
Home

[Freeciv-Dev] Re: (PR#2741) Removing explicit mentioning of T_OCEAN

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2741) Removing explicit mentioning of T_OCEAN
From: "Cameron Morland via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 10 Jan 2003 06:28:14 -0800
Reply-to: rt@xxxxxxxxxxxxxx

I realise that I forgot to remove the mention in the files under
client/gui-*. This patch does this, except for one line in
rebuild_coast_tile of gui-sdl/mapview.c, where the value of the
contents of an array is being set to T_OCEAN.

-- 
+-----------------------------------------------------------------
| PGP http://www.eng.uwaterloo.ca/student/cjmorlan/public-key.pgp
| Cameron Morland             ----             Cameron@xxxxxxxxxx
|
| Thought is not a management function.
|     --John Ralston Saul
+-----------------------------------------------------------------

? client/tilespec.c.shelf
Index: client/gui-gtk/cityrep.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/cityrep.c,v
retrieving revision 1.73
diff -u -3 -p -r1.73 cityrep.c
--- client/gui-gtk/cityrep.c    2003/01/05 15:34:05     1.73
+++ client/gui-gtk/cityrep.c    2003/01/10 14:22:38
@@ -771,7 +771,7 @@ city_select_coastal_callback(GtkWidget *
   {
       struct city* pcity = gtk_clist_get_row_data(GTK_CLIST(city_list),i);
 
-      if (is_terrain_near_tile(pcity->x, pcity->y, T_OCEAN))
+      if (is_ocean_near_tile(pcity->x, pcity->y))
        gtk_clist_select_row(GTK_CLIST(city_list),i,0);
   }
 
Index: client/gui-gtk/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/mapview.c,v
retrieving revision 1.147
diff -u -3 -p -r1.147 mapview.c
--- client/gui-gtk/mapview.c    2003/01/05 15:34:05     1.147
+++ client/gui-gtk/mapview.c    2003/01/10 14:22:39
@@ -171,7 +171,7 @@ void pixmap_put_tile(GdkDrawable *pm, in
       if (normalize_map_pos(&x1, &y1)) {
        t2 = map_get_terrain(x1, y1);
        /* left side */
-       if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))
+       if ((is_ocean(t1)) ^ (is_ocean(t2)))
          gdk_draw_line(pm, civ_gc,
                        canvas_x, canvas_y,
                        canvas_x, canvas_y + NORMAL_TILE_HEIGHT);
@@ -180,7 +180,7 @@ void pixmap_put_tile(GdkDrawable *pm, in
       x1 = x; y1 = y-1;
       if (normalize_map_pos(&x1, &y1)) {
        t2 = map_get_terrain(x1, y1);
-       if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))
+       if ((is_ocean(t1)) ^ (is_ocean(t2)))
          gdk_draw_line(pm, civ_gc,
                        canvas_x, canvas_y,
                        canvas_x + NORMAL_TILE_WIDTH, canvas_y);
@@ -1770,7 +1770,7 @@ static void pixmap_put_tile_iso(GdkDrawa
   }
 
   if (draw_terrain) {
-    if (map_get_terrain(x, y) == T_OCEAN) { /* coasts */
+    if (is_ocean(map_get_terrain(x, y))) { /* coasts */
       int dx, dy;
       /* top */
       dx = offset_x-NORMAL_TILE_WIDTH/4;
@@ -1862,7 +1862,7 @@ static void pixmap_put_tile_iso(GdkDrawa
     x1 = x; y1 = y-1;
     if (normalize_map_pos(&x1, &y1)) {
       t2 = map_get_terrain(x1, y1);
-      if (draw & D_M_R && ((t1 == T_OCEAN) ^ (t2 == T_OCEAN)))
+      if (draw & D_M_R && ((is_ocean(t1)) ^ (is_ocean(t2))))
        gdk_draw_line(pm, thin_line_gc,
                      canvas_x+NORMAL_TILE_WIDTH/2, canvas_y,
                      canvas_x+NORMAL_TILE_WIDTH, 
canvas_y+NORMAL_TILE_HEIGHT/2);
@@ -1870,7 +1870,7 @@ static void pixmap_put_tile_iso(GdkDrawa
     x1 = x-1; y1 = y;
     if (normalize_map_pos(&x1, &y1)) {
       t2 = map_get_terrain(x1, y1);
-      if (draw & D_M_L && ((t1 == T_OCEAN) ^ (t2 == T_OCEAN)))
+      if (draw & D_M_L && ((is_ocean(t1)) ^ (is_ocean(t2))))
        gdk_draw_line(pm, thin_line_gc,
                      canvas_x, canvas_y + NORMAL_TILE_HEIGHT/2,
                      canvas_x+NORMAL_TILE_WIDTH/2, canvas_y);
Index: client/gui-gtk-2.0/cityrep.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/cityrep.c,v
retrieving revision 1.30
diff -u -3 -p -r1.30 cityrep.c
--- client/gui-gtk-2.0/cityrep.c        2003/01/05 15:34:05     1.30
+++ client/gui-gtk-2.0/cityrep.c        2003/01/10 14:22:40
@@ -755,7 +755,7 @@ static void city_select_coastal_callback
     itree_get(&it, 0, &res, -1);
     pcity = res;
 
-    if (is_terrain_near_tile(pcity->x, pcity->y, T_OCEAN)) {
+    if (is_ocean_near_tile(pcity->x, pcity->y)) {
       itree_select(city_selection, &it);
     }
   }
Index: client/gui-gtk-2.0/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapview.c,v
retrieving revision 1.35
diff -u -3 -p -r1.35 mapview.c
--- client/gui-gtk-2.0/mapview.c        2003/01/05 15:34:05     1.35
+++ client/gui-gtk-2.0/mapview.c        2003/01/10 14:22:41
@@ -170,7 +170,7 @@ void pixmap_put_tile(GdkDrawable *pm, in
       if (normalize_map_pos(&x1, &y1)) {
        t2 = map_get_terrain(x1, y1);
        /* left side */
-       if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))
+       if ((is_ocean(t1)) ^ (is_ocean(t2)))
          gdk_draw_line(pm, civ_gc,
                        canvas_x, canvas_y,
                        canvas_x, canvas_y + NORMAL_TILE_HEIGHT);
@@ -179,7 +179,7 @@ void pixmap_put_tile(GdkDrawable *pm, in
       x1 = x; y1 = y-1;
       if (normalize_map_pos(&x1, &y1)) {
        t2 = map_get_terrain(x1, y1);
-       if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))
+       if ((is_ocean(t1)) ^ (is_ocean(t2)))
          gdk_draw_line(pm, civ_gc,
                        canvas_x, canvas_y,
                        canvas_x + NORMAL_TILE_WIDTH, canvas_y);
@@ -1843,7 +1843,7 @@ static void pixmap_put_tile_iso(GdkDrawa
   }
 
   if (draw_terrain) {
-    if (map_get_terrain(x, y) == T_OCEAN) { /* coasts */
+    if (is_ocean(map_get_terrain(x, y))) { /* coasts */
       int dx, dy;
       /* top */
       dx = offset_x-NORMAL_TILE_WIDTH/4;
@@ -1935,7 +1935,7 @@ static void pixmap_put_tile_iso(GdkDrawa
     x1 = x; y1 = y-1;
     if (normalize_map_pos(&x1, &y1)) {
       t2 = map_get_terrain(x1, y1);
-      if (draw & D_M_R && ((t1 == T_OCEAN) ^ (t2 == T_OCEAN)))
+      if (draw & D_M_R && ((is_ocean(t1)) ^ (is_ocean(t2))))
        gdk_draw_line(pm, thin_line_gc,
                      canvas_x+NORMAL_TILE_WIDTH/2, canvas_y,
                      canvas_x+NORMAL_TILE_WIDTH, 
canvas_y+NORMAL_TILE_HEIGHT/2);
@@ -1943,7 +1943,7 @@ static void pixmap_put_tile_iso(GdkDrawa
     x1 = x-1; y1 = y;
     if (normalize_map_pos(&x1, &y1)) {
       t2 = map_get_terrain(x1, y1);
-      if (draw & D_M_L && ((t1 == T_OCEAN) ^ (t2 == T_OCEAN)))
+      if (draw & D_M_L && ((is_ocean(t1)) ^ (is_ocean(t2))))
        gdk_draw_line(pm, thin_line_gc,
                      canvas_x, canvas_y + NORMAL_TILE_HEIGHT/2,
                      canvas_x+NORMAL_TILE_WIDTH/2, canvas_y);
Index: client/gui-mui/graphics.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/graphics.c,v
retrieving revision 1.29
diff -u -3 -p -r1.29 graphics.c
--- client/gui-mui/graphics.c   2003/01/05 15:34:05     1.29
+++ client/gui-mui/graphics.c   2003/01/10 14:22:41
@@ -949,7 +949,7 @@ void put_tile(struct RastPort *rp, int x
       if (normalize_map_pos(&x1, &y1)) {
        t2 = map_get_terrain(x1, y1);
        /* left side */
-       if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))
+       if ((is_ocean(t1)) ^ (is_ocean(t2)))
        {
          Move(rp, canvas_x, canvas_y);
          Draw(rp, canvas_x, canvas_y + NORMAL_TILE_HEIGHT-1);
@@ -959,7 +959,7 @@ void put_tile(struct RastPort *rp, int x
       x1 = x; y1 = y-1;
       if (normalize_map_pos(&x1, &y1)) {
        t2 = map_get_terrain(x1, y1);
-       if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))
+       if ((is_ocean(t1)) ^ (is_ocean(t2)))
        {
          Move(rp, canvas_x, canvas_y);
          Draw(rp, canvas_x + NORMAL_TILE_WIDTH-1, canvas_y);
@@ -1270,7 +1270,7 @@ static void put_tile_iso(struct RastPort
   }
 
   if (draw_terrain) {
-    if (map_get_terrain(x, y) == T_OCEAN) { /* coasts */
+    if (is_ocean(map_get_terrain(x, y))) { /* coasts */
       int dx, dy;
 
       /* top */
@@ -1352,7 +1352,7 @@ static void put_tile_iso(struct RastPort
     x1 = x; y1 = y-1;
     if (normalize_map_pos(&x1, &y1)) {
       t2 = map_get_terrain(x1, y1);
-      if (draw & D_M_R && ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))) {
+      if (draw & D_M_R && ((is_ocean(t1)) ^ (is_ocean(t2)))) {
        Move(rp, canvas_x + NORMAL_TILE_WIDTH/2, canvas_y);
        Draw(rp, canvas_x + NORMAL_TILE_WIDTH, canvas_y+NORMAL_TILE_HEIGHT/2);
       }
@@ -1360,7 +1360,7 @@ static void put_tile_iso(struct RastPort
     x1 = x-1; y1 = y;
     if (normalize_map_pos(&x1, &y1)) {
       t2 = map_get_terrain(x1, y1);
-      if (draw & D_M_L && ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))) {
+      if (draw & D_M_L && ((is_ocean(t1)) ^ (is_ocean(t2)))) {
        Move(rp, canvas_x, canvas_y + NORMAL_TILE_HEIGHT/2);
        Draw(rp, canvas_x+NORMAL_TILE_WIDTH/2, canvas_y);
       }
Index: client/gui-mui/overviewclass.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/overviewclass.c,v
retrieving revision 1.17
diff -u -3 -p -r1.17 overviewclass.c
--- client/gui-mui/overviewclass.c      2003/01/01 11:51:33     1.17
+++ client/gui-mui/overviewclass.c      2003/01/10 14:22:41
@@ -180,7 +180,7 @@ static LONG Overview_GetMapPen(struct Ov
       }
       else
       {
-       if (ptile->terrain == T_OCEAN)
+       if (is_ocean(ptile->terrain))
        {
          return data->pen_ocean;
        }
Index: client/gui-sdl/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/mapview.c,v
retrieving revision 1.6
diff -u -3 -p -r1.6 mapview.c
--- client/gui-sdl/mapview.c    2003/01/05 23:19:18     1.6
+++ client/gui-sdl/mapview.c    2003/01/10 14:22:43
@@ -1051,7 +1051,7 @@ void overview_update_tile(int col, int r
     SDL_FillRect(pMMap->theme, &cell_size, 0);
     return;
   } else {
-    if (map_get_terrain(col, row) == T_OCEAN) {
+    if (is_ocean(map_get_terrain(col, row))) {
       color = get_game_color(COLOR_STD_OCEAN);
     } else {
       pCity = map_get_city(col, row);
@@ -1102,7 +1102,7 @@ void refresh_overview_canvas(void)
     if (tile_get_known(col, row) == TILE_UNKNOWN) {
       SDL_FillRect(pMMap->theme, &cell_size, 0);
     } else {
-      if (map_get_terrain(col, row) == T_OCEAN) {
+      if (is_ocean(map_get_terrain(col, row))) {
        SDL_FillRect(pMMap->theme, &cell_size, ocean_color);
       } else {
        pCity = map_get_city(col, row);
@@ -1520,7 +1520,7 @@ static void draw_map_cell(SDL_Surface * 
   
   if (draw_terrain) {
    if (citymode) {       
-    if (map_get_terrain(map_col, map_row) == T_OCEAN) {        /* coasts */
+    if (is_ocean(map_get_terrain(map_col, map_row))) { /* coasts */
       /* top */
       des.x += NORMAL_TILE_WIDTH / 4;
       SDL_BlitSurface(pCoasts[0], NULL, pBufSurface, &des);
@@ -1620,7 +1620,7 @@ static void draw_map_cell(SDL_Surface * 
     y1 = y - 1;
     if (normalize_map_pos(&x1, &y1)) {
       t2 = map_get_terrain(x1, y1);
-      if (draw & D_M_R && ((t1 == T_OCEAN) ^ (t2 == T_OCEAN)))
+      if (draw & D_M_R && ((is_ocean(t1)) ^ (is_ocean(t2))))
        gdk_draw_line(pm, thin_line_gc,
                      canvas_x + NORMAL_TILE_WIDTH / 2, canvas_y,
                      canvas_x + NORMAL_TILE_WIDTH,
@@ -1630,7 +1630,7 @@ static void draw_map_cell(SDL_Surface * 
     y1 = y;
     if (normalize_map_pos(&x1, &y1)) {
       t2 = map_get_terrain(x1, y1);
-      if (draw & D_M_L && ((t1 == T_OCEAN) ^ (t2 == T_OCEAN)))
+      if (draw & D_M_L && ((is_ocean(t1)) ^ (is_ocean(t2))))
        gdk_draw_line(pm, thin_line_gc,
                      canvas_x, canvas_y + NORMAL_TILE_HEIGHT / 2,
                      canvas_x + NORMAL_TILE_WIDTH / 2, canvas_y);
@@ -2800,12 +2800,12 @@ static void rebuild_coast_tile( SDL_Surf
          
     /* put coasts */
     for (i = 0; i < 4; i++) {
-      array_index = ((ttype_near[dir_ccw(dirs[i])] != T_OCEAN ? 1 : 0)
-                        + (ttype_near[dirs[i]] != T_OCEAN ? 2 : 0)
-                        + (ttype_near[dir_cw(dirs[i])] != T_OCEAN ? 4 : 0));
+      array_index = ((!is_ocean(ttype_near[dir_ccw(dirs[i])]) ? 1 : 0)
+                        + (!is_ocean(ttype_near[dirs[i]]) ? 2 : 0)
+                        + (!is_ocean(ttype_near[dir_cw(dirs[i])]) ? 4 : 0));
 
-           
-           
+      
+      
       coasts[i] = (SDL_Surface *)sprites.tx.coast_cape_iso[array_index][i];
     }
     
@@ -2864,16 +2864,16 @@ void init_cells_sprites(void)
        pT2_TERRAIN = (SDL_Surface *)sprites.black_tile;
       if ( t1 <= t2 )
       {
-       if ( t1 != T_OCEAN && t2 != T_OCEAN )
+       if ( !is_ocean(t1) && !is_ocean(t2) )
           rebuild_blending_tile( pDither , pT2_TERRAIN );
        for ( blend = 0; blend < MAX_BLEND; blend++ )
         {
-         if ( t1 == T_OCEAN || t2 == T_OCEAN ) 
+         if ( is_ocean(t1) || is_ocean(t2) )   
            rebuild_coast_tile( pDither , blend );
          for ( corner = 0 ; corner < MAX_CORNER ; corner++ )
          {
            pBuf = create_surf( w , h , SDL_SWSURFACE );
-           if ( t1 != T_OCEAN && t2 != T_OCEAN )
+           if ( !is_ocean(t1) && !is_ocean(t2) )
            {
              t1_src.x = (!corner || corner == 2) ?  0 : w;
              t1_src.y = ( corner > 1 ) ?  h : 0;
@@ -2886,8 +2886,8 @@ void init_cells_sprites(void)
              SDL_BlitSurface( pDither[blend] , &t1_src , pBuf , NULL );
            }
          else
-         { /* t1 == T_OCEAN || t2 == T_OCEAN */
-           if ( t1 == T_OCEAN && t2 == T_UNKNOWN )
+         { /* is_ocean(t1) || is_ocean(t2) */
+           if ( is_ocean(t1) && t2 == T_UNKNOWN )
            {
               t1_src.x = ((corner % 2) == 0) * w - w / 2 ;
              t1_src.y = 0;
@@ -2903,9 +2903,9 @@ void init_cells_sprites(void)
                
               t1_src.w = w;
               t1_src.h = h;                
-           }/* t1 == T_OCEAN && t2 == T_UNKNOWN */
+           }/* is_ocean(t1) && t2 == T_UNKNOWN */
            
-            if ( t1 == T_OCEAN && t2 != T_OCEAN && t2 != T_UNKNOWN )
+            if ( is_ocean(t1) && !is_ocean(t2) && t2 != T_UNKNOWN )
            {     
              t2_src.x = w - ((corner % 2) > 0) * w;
              t2_src.y = h - ( corner > 1 ) * h;
@@ -2932,9 +2932,9 @@ void init_cells_sprites(void)
              t1_src.y = ( corner > 1 ) ?  h : 0;
              SDL_BlitSurface( pDither[corner] , &t1_src , pBuf , NULL );
              
-           } /* t1 == T_OCEAN && t2 != T_OCEAN */
+           } /* is_ocean(t1) && !is_ocean(t2) */
            
-           if ( t1 != T_OCEAN && t2 == T_OCEAN )
+           if ( !is_ocean(t1) && is_ocean(t2) )
            {     
              t1_src.x = ((corner % 2) > 0) * w;
              t1_src.y = ( corner > 1 ) * h;
@@ -2959,9 +2959,9 @@ void init_cells_sprites(void)
              t2_src.y = ( corner > 1 ) ?  0 : h;    
              SDL_BlitSurface( pDither[corner] , &t2_src , pBuf , NULL );
              
-          }/* t1 != T_OCEAN && t2 == T_OCEAN */
+          }/* !is_ocean(t1) && is_ocean(t2) */
          
-           if ( t1 == T_OCEAN && t2 == T_OCEAN )
+           if ( is_ocean(t1) && is_ocean(t2) )
            {     
              if ( !corner )
              {
@@ -2996,9 +2996,9 @@ void init_cells_sprites(void)
                pBuf = cells[t1][t2][blend][0];
              }
              
-            }/* t1 == T_OCEAN && t2 == T_OCEAN */
+            }/* is_ocean(t1) && is_ocean(t2) */
            
-          } /* t1 == T_OCEAN || t2 == T_OCEAN */
+          } /* is_ocean(t1) || is_ocean(t2) */
          
          cells[t1][t2][blend][corner] = pBuf;
        } /* for */
Index: client/gui-win32/cityrep.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/cityrep.c,v
retrieving revision 1.19
diff -u -3 -p -r1.19 cityrep.c
--- client/gui-win32/cityrep.c  2003/01/05 15:34:06     1.19
+++ client/gui-win32/cityrep.c  2003/01/10 14:22:43
@@ -575,7 +575,7 @@ static void list_coastal_select(HWND hLs
   for (i=0;i<num;i++)
     {
       pcity=(struct city *)ListBox_GetItemData(hLst,i);
-      if (is_terrain_near_tile(pcity->x, pcity->y, T_OCEAN)) 
+      if (is_ocean_near_tile(pcity->x, pcity->y)) 
        ListBox_SetSel(hLst,TRUE,i);
     }
 }
Index: client/gui-win32/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/mapview.c,v
retrieving revision 1.49
diff -u -3 -p -r1.49 mapview.c
--- client/gui-win32/mapview.c  2003/01/05 15:34:06     1.49
+++ client/gui-win32/mapview.c  2003/01/10 14:22:44
@@ -336,7 +336,7 @@ void pixmap_put_tile(HDC hdc, int x, int
       if (normalize_map_pos(&x1, &y1)) {
         t2 = map_get_terrain(x1, y1);
         /* left side */
-        if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN)) {
+        if ((is_ocean(t1)) ^ (is_ocean(t2))) {
          MoveToEx(hdc,canvas_x,canvas_y,NULL);
          LineTo(hdc,canvas_x,canvas_y+NORMAL_TILE_HEIGHT);
           
@@ -346,7 +346,7 @@ void pixmap_put_tile(HDC hdc, int x, int
       x1 = x; y1 = y-1;
       if (normalize_map_pos(&x1, &y1)) {
         t2 = map_get_terrain(x1, y1);
-        if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN)) {
+        if ((is_ocean(t1)) ^ (is_ocean(t2))) {
          MoveToEx(hdc,canvas_x,canvas_y,NULL);
          LineTo(hdc,canvas_x+NORMAL_TILE_WIDTH,canvas_y);
        }
@@ -1594,7 +1594,7 @@ static void pixmap_put_tile_iso(HDC hdc,
     SelectObject(hdc,oldbrush);
   }
   if (draw_terrain) {
-    if (map_get_terrain(x, y) == T_OCEAN) { /* coasts */
+    if (is_ocean(map_get_terrain(x, y))) { /* coasts */
       int dx, dy;
       /* top */
       dx = offset_x-NORMAL_TILE_WIDTH/4;
@@ -1685,7 +1685,7 @@ static void pixmap_put_tile_iso(HDC hdc,
     y1=y-1;
     if (normalize_map_pos(&x1,&y1)) { 
       t2=map_get_terrain(x1,y1);
-      if (draw & D_M_R && ((t1==T_OCEAN) ^ (t2==T_OCEAN))) {
+      if (draw & D_M_R && ((is_ocean(t1)) ^ (is_ocean(t2)))) {
        MoveToEx(hdc,canvas_x+NORMAL_TILE_WIDTH/2,canvas_y,NULL);
        LineTo(hdc,canvas_x+NORMAL_TILE_WIDTH,
               canvas_y+NORMAL_TILE_HEIGHT/2);
@@ -1695,7 +1695,7 @@ static void pixmap_put_tile_iso(HDC hdc,
     y1=y;
     if (normalize_map_pos(&x1, &y1)) {
       t2 = map_get_terrain(x1, y1);
-      if (draw & D_M_L && ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))){
+      if (draw & D_M_L && ((is_ocean(t1)) ^ (is_ocean(t2)))){
        MoveToEx(hdc,canvas_x,canvas_y+NORMAL_TILE_HEIGHT/2,NULL);
        LineTo(hdc,canvas_x+NORMAL_TILE_WIDTH/2,canvas_y); 
       }
Index: client/gui-xaw/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/mapview.c,v
retrieving revision 1.116
diff -u -3 -p -r1.116 mapview.c
--- client/gui-xaw/mapview.c    2003/01/05 15:34:06     1.116
+++ client/gui-xaw/mapview.c    2003/01/10 14:22:45
@@ -924,7 +924,7 @@ void pixmap_put_tile(Pixmap pm, int x, i
       if (normalize_map_pos(&x1, &y1)) {
        t2 = map_get_terrain(x1, y1);
        /* left side */
-       if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))
+       if ((is_ocean(t1)) ^ (is_ocean(t2)))
          XDrawLine(display, pm, civ_gc,
                    canvas_x, canvas_y,
                    canvas_x, canvas_y + NORMAL_TILE_HEIGHT);
@@ -933,7 +933,7 @@ void pixmap_put_tile(Pixmap pm, int x, i
       x1 = x; y1 = y-1;
       if (normalize_map_pos(&x1, &y1)) {
        t2 = map_get_terrain(x1, y1);
-       if ((t1 == T_OCEAN) ^ (t2 == T_OCEAN))
+       if ((is_ocean(t1)) ^ (is_ocean(t2)))
          XDrawLine(display, pm, civ_gc,
                    canvas_x, canvas_y,
                    canvas_x + NORMAL_TILE_WIDTH, canvas_y);

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