소스 검색

Disable live display feature

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33099 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 17 년 전
부모
커밋
c8ad607cb9
4개의 변경된 파일28개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 2
      raster/wildfire/r.spread/Makefile
  2. 2 0
      raster/wildfire/r.spread/collect_ori.c
  3. 12 1
      raster/wildfire/r.spread/main.c
  4. 6 0
      raster/wildfire/r.spread/spread.c

+ 8 - 2
raster/wildfire/r.spread/Makefile

@@ -2,8 +2,14 @@ MODULE_TOPDIR = ../../..
 
 PGM = r.spread
 
-LIBES = $(DISPLAYLIB) $(RASTERLIB) $(GISLIB)
-DEPENDENCIES = $(DISPLAYDEP) $(RASTERDEP) $(GISDEP)
+include $(MODULE_TOPDIR)/include/Make/Vars.make
+
+MOD_OBJS := $(filter-out display.o,$(AUTO_OBJS))
+
+# LIBES = $(DISPLAYLIB) $(RASTERLIB) $(GISLIB)
+# DEPENDENCIES = $(DISPLAYDEP) $(RASTERDEP) $(GISDEP)
+LIBES = $(GISLIB)
+DEPENDENCIES = $(GISDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 2 - 0
raster/wildfire/r.spread/collect_ori.c

@@ -81,8 +81,10 @@ void collect_ori(int start_fd)
 		if (y_out)
 		    DATA(map_y_out, row, col) = row;
 		/*DEBUG printf("\norigin: row=%d col=%d\n", row, col); */
+#if 0
 		if (display)
 		    draw_a_burning_cell(row, col);
+#endif
 	    }
 	    else {
 		DATA(map_out, row, col) = neg;

+ 12 - 1
raster/wildfire/r.spread/main.c

@@ -238,7 +238,11 @@ int main(int argc, char *argv[])
 
     flag.display = G_define_flag();
     flag.display->key = 'd';
+#if 0
     flag.display->description = _("DISPLAY 'live' spread process on screen");
+#else
+    flag.display->description = _("Live display - currently DISABLED");
+#endif
 
     flag.spotting = G_define_flag();
     flag.spotting->key = 's';
@@ -258,8 +262,11 @@ int main(int argc, char *argv[])
 		    "in future. Please use '--verbose' instead."));
     }
 
-
     display = flag.display->answer;
+#if 1
+    if (display)
+	G_fatal_error(_("The display feature is disabled"));
+#endif
     spotting = flag.spotting->answer;
 
     max_layer = parm.max->answer;
@@ -351,8 +358,10 @@ int main(int argc, char *argv[])
     window.ew_res = 100 * window.ew_res;
 
     /* Initialize display screens */
+#if 0
     if (display)
 	display_init();
+#endif
 
     /*  Check if input layers exists in data base  */
 
@@ -561,8 +570,10 @@ int main(int argc, char *argv[])
     }
 
     /* close graphics */
+#if 0
     if (display)
 	display_close();
+#endif
 
     exit(EXIT_SUCCESS);
 }

+ 6 - 0
raster/wildfire/r.spread/spread.c

@@ -127,9 +127,11 @@ void spread(void)
 
 	/*mark a visited cell */
 	DATA(map_visit, pres_cell->row, pres_cell->col) = YES;
+#if 0
 	if (display)
 	    draw_a_cell(pres_cell->row, pres_cell->col,
 			(int)pres_cell->min_cost);
+#endif
 
 	cell_count++;
 	if ((100 * cell_count / ncells) % 2 == 0 &&
@@ -258,8 +260,10 @@ update(struct costHa *pres_cell, int row, int col, double angle,
 	    DATA(map_y_out, row, col) = pres_cell->row;
 
 	insertHa(min_cost, angle, row, col, heap, &heap_len);
+#if 0
 	if (display && min_cost < init_time + time_lag + 1.0)
 	    draw_a_burning_cell(row, col);
+#endif
     }
     else {
 	if (DATA(map_out, row, col) > min_cost + 0.001) {
@@ -272,8 +276,10 @@ update(struct costHa *pres_cell, int row, int col, double angle,
 		DATA(map_y_out, row, col) = pres_cell->row;
 
 	    replaceHa(min_cost, angle, row, col, heap, &heap_len);
+#if 0
 	    if (display && min_cost < init_time + time_lag + 1.0)
 		draw_a_burning_cell(row, col);
+#endif
 	}
     }
 }