src/terraform_gui.cpp
branchnoai
changeset 10513 33cb70ff2f5d
parent 10455 22c441f5adf9
child 10645 8cbdb511a674
equal deleted inserted replaced
10455:22c441f5adf9 10513:33cb70ff2f5d
   157 	'U',
   157 	'U',
   158 	'I',
   158 	'I',
   159 	'O',
   159 	'O',
   160 };
   160 };
   161 
   161 
       
   162 void CcPlaySound1E(bool success, TileIndex tile, uint32 p1, uint32 p2);
       
   163 
       
   164 static void PlaceProc_BuyLand(TileIndex tile)
       
   165 {
       
   166 	DoCommandP(tile, 0, 0, CcPlaySound1E, CMD_PURCHASE_LAND_AREA | CMD_NO_WATER | CMD_MSG(STR_5806_CAN_T_PURCHASE_THIS_LAND));
       
   167 }
       
   168 
   162 void PlaceProc_DemolishArea(TileIndex tile)
   169 void PlaceProc_DemolishArea(TileIndex tile)
   163 {
   170 {
   164 	VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_DEMOLISH_AREA);
   171 	VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_DEMOLISH_AREA);
   165 }
   172 }
   166 
   173 
   172 static void PlaceProc_LowerLand(TileIndex tile)
   179 static void PlaceProc_LowerLand(TileIndex tile)
   173 {
   180 {
   174 	VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_LOWER_AND_LEVEL_AREA);
   181 	VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_LOWER_AND_LEVEL_AREA);
   175 }
   182 }
   176 
   183 
   177 void PlaceProc_LevelLand(TileIndex tile)
   184 static void PlaceProc_LevelLand(TileIndex tile)
   178 {
   185 {
   179 	VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_LEVEL_AREA);
   186 	VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_LEVEL_AREA);
   180 }
   187 }
   181 
   188 
   182 static void TerraformClick_Lower(Window *w)
   189 static void TerraformClick_Lower(Window *w)
   302 };
   309 };
   303 
   310 
   304 void ShowTerraformToolbar(Window *link)
   311 void ShowTerraformToolbar(Window *link)
   305 {
   312 {
   306 	if (!IsValidPlayer(_current_player)) return;
   313 	if (!IsValidPlayer(_current_player)) return;
   307 	Window *w = AllocateWindowDescFront(&_terraform_desc, 0);
   314 	Window *w = AllocateWindowDescFront<Window>(&_terraform_desc, 0);
   308 	if (w != NULL && link != NULL) {
   315 	if (w != NULL && link != NULL) {
   309 		/* Align the terraform toolbar under the main toolbar and put the linked
   316 		/* Align the terraform toolbar under the main toolbar and put the linked
   310 		 * toolbar to left of it
   317 		 * toolbar to left of it
   311 		 */
   318 		 */
   312 		w->top = 22;
   319 		w->top = 22;
   677 	ScenEditLandGenWndProc,
   684 	ScenEditLandGenWndProc,
   678 };
   685 };
   679 
   686 
   680 void ShowEditorTerraformToolbar()
   687 void ShowEditorTerraformToolbar()
   681 {
   688 {
   682 	AllocateWindowDescFront(&_scen_edit_land_gen_desc, 0);
   689 	AllocateWindowDescFront<Window>(&_scen_edit_land_gen_desc, 0);
   683 }
   690 }