39 #include "table/strings.h" 
   57   if (_game_mode != GM_EDITOR) 
return;
 
   74   if (_game_mode != GM_EDITOR) 
return;
 
  204         ShowBuildTreesToolbar();
 
  216       default: NOT_REACHED();
 
  247       default: NOT_REACHED();
 
  266       switch (select_proc) {
 
  267         default: NOT_REACHED();
 
  299 static Hotkey terraform_hotkeys[] = {
 
  312 static const NWidgetPart _nested_terraform_widgets[] = {
 
  320                 SetFill(0, 1), 
SetDataTip(SPR_IMG_TERRAFORM_DOWN, STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND),
 
  322                 SetFill(0, 1), 
SetDataTip(SPR_IMG_TERRAFORM_UP, STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND),
 
  324                 SetFill(0, 1), 
SetDataTip(SPR_IMG_LEVEL_LAND, STR_LANDSCAPING_LEVEL_LAND_TOOLTIP),
 
  331                 SetFill(0, 1), 
SetDataTip(SPR_IMG_BUY_LAND, STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND),
 
  338                 SetFill(0, 1), 
SetDataTip(SPR_IMG_TRANSMITTER, STR_SCENEDIT_TOOLBAR_PLACE_OBJECT),
 
  347   _nested_terraform_widgets, 
lengthof(_nested_terraform_widgets),
 
  348   &TerraformToolbarWindow::hotkeys
 
  362     w = AllocateWindowDescFront<TerraformToolbarWindow>(&_terraform_desc, 0);
 
  368   w = AllocateWindowDescFront<TerraformToolbarWindow>(&_terraform_desc, 0);
 
  380 static byte _terraform_size = 1;
 
  393   if (_terraform_size == 1) {
 
  395       mode ? STR_ERROR_CAN_T_RAISE_LAND_HERE : STR_ERROR_CAN_T_LOWER_LAND_HERE;
 
  399     assert(_terraform_size != 0);
 
  400     TileArea ta(tile, _terraform_size, _terraform_size);
 
  403     if (ta.
w == 0 || ta.
h == 0) 
return;
 
  430 static const int8 _multi_terraform_coords[][2] = {
 
  432   {  4,  0}, { -4,  0}, {  0,  2},
 
  433   { -8,  2}, { -4,  4}, {  0,  6}, {  4,  4}, {  8,  2},
 
  434   {-12,  0}, { -8, -2}, { -4, -4}, {  0, -6}, {  4, -4}, {  8, -2}, { 12,  0},
 
  435   {-16,  2}, {-12,  4}, { -8,  6}, { -4,  8}, {  0, 10}, {  4,  8}, {  8,  6}, { 12,  4}, { 16,  2},
 
  436   {-20,  0}, {-16, -2}, {-12, -4}, { -8, -6}, { -4, -8}, {  0,-10}, {  4, -8}, {  8, -6}, { 12, -4}, { 16, -2}, { 20,  0},
 
  437   {-24,  2}, {-20,  4}, {-16,  6}, {-12,  8}, { -8, 10}, { -4, 12}, {  0, 14}, {  4, 12}, {  8, 10}, { 12,  8}, { 16,  6}, { 20,  4}, { 24,  2},
 
  438   {-28,  0}, {-24, -2}, {-20, -4}, {-16, -6}, {-12, -8}, { -8,-10}, { -4,-12}, {  0,-14}, {  4,-12}, {  8,-10}, { 12, -8}, { 16, -6}, { 20, -4}, { 24, -2}, { 28,  0},
 
  441 static const NWidgetPart _nested_scen_edit_land_gen_widgets[] = {
 
  454                     SetFill(0, 1), 
SetDataTip(SPR_IMG_TERRAFORM_DOWN, STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND),
 
  456                     SetFill(0, 1), 
SetDataTip(SPR_IMG_TERRAFORM_UP, STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND),
 
  458                     SetFill(0, 1), 
SetDataTip(SPR_IMG_LEVEL_LAND, STR_LANDSCAPING_LEVEL_LAND_TOOLTIP),
 
  460                     SetFill(0, 1), 
SetDataTip(SPR_IMG_ROCKS, STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE),
 
  463                       SetFill(0, 1), 
SetDataTip(SPR_IMG_DESERT, STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA),
 
  466                     SetFill(0, 1), 
SetDataTip(SPR_IMG_TRANSMITTER, STR_SCENEDIT_TOOLBAR_PLACE_OBJECT),
 
  504     FOR_ALL_COMPANIES(c) {
 
  513     FOR_ALL_BASE_STATIONS(st) {
 
  553     size->height = max<uint>(size->height, 
ScaleGUITrad(31));
 
  560     int center_x = 
RoundDivSU(r.left + r.right, 2);
 
  561     int center_y = 
RoundDivSU(r.top + r.bottom, 2);
 
  563     int n = _terraform_size * _terraform_size;
 
  564     const int8 *coords = &_multi_terraform_coords[0][0];
 
  616         size += _terraform_size;
 
  619         _terraform_size = size;
 
  635       default: NOT_REACHED();
 
  677       default: NOT_REACHED();
 
  689       switch (select_proc) {
 
  690         default: NOT_REACHED();
 
  725 static Hotkey terraform_editor_hotkeys[] = {
 
  739   WDP_AUTO, 
"toolbar_landscape_scen", 0, 0,
 
  742   _nested_scen_edit_land_gen_widgets, 
lengthof(_nested_scen_edit_land_gen_widgets),
 
  743   &ScenarioEditorLandscapeGenerationWindow::hotkeys
 
  752   return AllocateWindowDescFront<ScenarioEditorLandscapeGenerationWindow>(&_scen_edit_land_gen_desc, 0);