industry_gui.c
changeset 1287 adb8820d4600
parent 1267 ba42a505ab8a
child 1299 39c06aba09aa
equal deleted inserted replaced
1286:10b9fe28effc 1287:adb8820d4600
   379 			break;
   379 			break;
   380 		case 6:
   380 		case 6:
   381 			i = GetIndustry(w->window_number);
   381 			i = GetIndustry(w->window_number);
   382 			ScrollMainWindowToTile(i->xy + TILE_XY(1,1));
   382 			ScrollMainWindowToTile(i->xy + TILE_XY(1,1));
   383 			break;
   383 			break;
   384 		case 7:
       
   385 			// Destroy Industry button costing money removed per request of dominik
       
   386 			//i = GetIndustry(w->window_number);
       
   387 			/*	passing only i->xy is not safe if industry has a weird shape like:
       
   388 					_ X X
       
   389 					X X X
       
   390 					_ <--- grass, no industry, but i->xy points there (first top-left tile)!,
       
   391 					so passing i->xy to destroy industry will fail in called procedure
       
   392 			*/
       
   393 			//DoCommandP(i->xy, w->window_number, 0, CcPlaySound10,  CMD_DESTROY_INDUSTRY | CMD_MSG(STR_00B5_CAN_T_CLEAR_THIS_AREA));
       
   394 			break;
       
   395 		}
   384 		}
   396 		}
   385 		}
   397 		break;
   386 		break;
   398 	case WE_TIMEOUT:
   387 	case WE_TIMEOUT:
   399 		WP(w,vp2_d).data_2 = 0;
   388 		WP(w,vp2_d).data_2 = 0;