Changeset - r13097:c59fc0ed2eeb
[Not reviewed]
master
0 5 0
smatz - 15 years ago 2009-09-21 20:22:56
smatz@openttd.org
(svn r17608) -Codechange: use CmdFoundTown when founding 'Random town' too
5 files changed with 73 insertions and 46 deletions:
0 comments (0 inline, 0 general)
src/callback_table.cpp
Show inline comments
 
@@ -28,48 +28,51 @@ CommandCallback CcBuildBridge;
 

	
 
/* dock_gui.cpp */
 
CommandCallback CcBuildDocks;
 
CommandCallback CcBuildCanal;
 

	
 
/* depot_gui.cpp */
 
CommandCallback CcCloneVehicle;
 

	
 
/* main_gui.cpp */
 
CommandCallback CcPlaySound10;
 
CommandCallback CcPlaceSign;
 
CommandCallback CcTerraform;
 
CommandCallback CcFoundTown;
 
CommandCallback CcGiveMoney;
 

	
 
/* rail_gui.cpp */
 
CommandCallback CcPlaySound1E;
 
CommandCallback CcRailDepot;
 
CommandCallback CcStation;
 
CommandCallback CcBuildRailTunnel;
 

	
 
/* road_gui.cpp */
 
CommandCallback CcPlaySound1D;
 
CommandCallback CcBuildRoadTunnel;
 
CommandCallback CcRoadDepot;
 

	
 
/* roadveh_gui.cpp */
 
CommandCallback CcBuildRoadVeh;
 

	
 
/* ship_gui.cpp */
 
CommandCallback CcBuildShip;
 

	
 
/* train_gui.cpp */
 
CommandCallback CcBuildWagon;
 
CommandCallback CcBuildLoco;
 

	
 
/* town_gui.cpp */
 
CommandCallback CcFoundTown;
 
CommandCallback CcFoundRandomTown;
 

	
 
/* group_gui.cpp */
 
CommandCallback CcCreateGroup;
 

	
 
/* ai/ai_core.cpp */
 
CommandCallback CcAI;
 

	
 
CommandCallback * const _callback_table[] = {
 
	/* 0x00 */ NULL,
 
	/* 0x01 */ CcBuildAircraft,
 
	/* 0x02 */ CcBuildAirport,
 
	/* 0x03 */ CcBuildBridge,
 
	/* 0x04 */ CcBuildCanal,
 
@@ -84,15 +87,16 @@ CommandCallback * const _callback_table[
 
	/* 0x0D */ CcRoadDepot,
 
	/* 0x0E */ CcRailDepot,
 
	/* 0x0F */ CcPlaceSign,
 
	/* 0x10 */ CcPlaySound10,
 
	/* 0x11 */ CcPlaySound1D,
 
	/* 0x12 */ CcPlaySound1E,
 
	/* 0x13 */ CcStation,
 
	/* 0x14 */ CcTerraform,
 
	/* 0x15 */ CcAI,
 
	/* 0x16 */ CcCloneVehicle,
 
	/* 0x17 */ CcGiveMoney,
 
	/* 0x18 */ CcCreateGroup,
 
	/* 0x19 */ CcFoundRandomTown,
 
};
 

	
 
const int _callback_table_count = lengthof(_callback_table);
src/command.cpp
Show inline comments
 
@@ -287,25 +287,25 @@ static const Command _command_proc_table
 
	{CmdBuildRoadVeh,                               0}, // CMD_BUILD_ROAD_VEH
 
	{CmdSellRoadVeh,                                0}, // CMD_SELL_ROAD_VEH
 
	{CmdSendRoadVehToDepot,                         0}, // CMD_SEND_ROADVEH_TO_DEPOT
 
	{CmdTurnRoadVeh,                                0}, // CMD_TURN_ROADVEH
 
	{CmdRefitRoadVeh,                               0}, // CMD_REFIT_ROAD_VEH
 

	
 
	{CmdPause,                             CMD_SERVER}, // CMD_PAUSE
 

	
 
	{CmdBuyShareInCompany,                          0}, // CMD_BUY_SHARE_IN_COMPANY
 
	{CmdSellShareInCompany,                         0}, // CMD_SELL_SHARE_IN_COMPANY
 
	{CmdBuyCompany,                                 0}, // CMD_BUY_COMANY
 

	
 
	{CmdFoundTown,                        CMD_OFFLINE}, // CMD_FOUND_TOWN
 
	{CmdFoundTown,          CMD_NO_TEST | CMD_OFFLINE}, // CMD_FOUND_TOWN
 
	{CmdRenameTown,                        CMD_SERVER}, // CMD_RENAME_TOWN
 
	{CmdDoTownAction,                               0}, // CMD_DO_TOWN_ACTION
 

	
 
	{CmdSellShip,                                   0}, // CMD_SELL_SHIP
 
	{CmdBuildShip,                                  0}, // CMD_BUILD_SHIP
 
	{CmdSendShipToDepot,                            0}, // CMD_SEND_SHIP_TO_DEPOT
 
	{CmdRefitShip,                                  0}, // CMD_REFIT_SHIP
 

	
 
	{CmdOrderRefit,                                 0}, // CMD_ORDER_REFIT
 
	{CmdCloneOrder,                                 0}, // CMD_CLONE_ORDER
 

	
 
	{CmdClearArea,                        CMD_NO_TEST}, // CMD_CLEAR_AREA; destroying multi-tile houses makes town rating differ between test and execution
src/town.h
Show inline comments
 
@@ -154,25 +154,24 @@ struct Town : TownPool::PoolItem<&_town_
 
	}
 

	
 
	static Town *GetRandom();
 
	static void PostDestructor(size_t index);
 
};
 

	
 
uint32 GetWorldPopulation();
 

	
 
void UpdateAllTownVirtCoords();
 
void InitializeTown();
 
void ShowTownViewWindow(TownID town);
 
void ExpandTown(Town *t);
 
Town *CreateRandomTown(uint attempts, TownSize size, bool city, TownLayout layout);
 

	
 
enum TownRatingCheckType {
 
	ROAD_REMOVE         = 0,
 
	TUNNELBRIDGE_REMOVE = 1,
 
	TOWN_RATING_CHECK_TYPE_COUNT,
 
};
 

	
 
/** This is the number of ticks between towns being processed for building new
 
 * houses or roads. This value originally came from the size of the town array
 
 * in TTD. */
 
static const byte TOWN_GROWTH_FREQUENCY = 70;
 

	
 
@@ -230,24 +229,25 @@ enum TownActions {
 
	TACT_BRIBE            = 0x80, ///< Try to bribe the counsil.
 

	
 
	TACT_COUNT            = 8,    ///< Number of available town actions.
 

	
 
	TACT_ADVERTISE        = TACT_ADVERTISE_SMALL | TACT_ADVERTISE_MEDIUM | TACT_ADVERTISE_LARGE, ///< All possible advertising actions.
 
	TACT_CONSTRUCTION     = TACT_ROAD_REBUILD | TACT_BUILD_STATUE | TACT_FOUND_BUILDINGS,        ///< All possible construction actions.
 
	TACT_FUNDS            = TACT_BUY_RIGHTS | TACT_BRIBE,                                        ///< All possible funding actions.
 
	TACT_ALL              = TACT_ADVERTISE | TACT_CONSTRUCTION | TACT_FUNDS,                     ///< All possible actions.
 
};
 
DECLARE_ENUM_AS_BIT_SET(TownActions);
 

	
 
extern const byte _town_action_costs[TACT_COUNT];
 
extern TownID _new_town_id;
 

	
 
/**
 
 * Calculate a hash value from a tile position
 
 *
 
 * @param x The X coordinate
 
 * @param y The Y coordinate
 
 * @return The hash of the tile
 
 */
 
static inline uint TileHash(uint x, uint y)
 
{
 
	uint hash = x >> 4;
 
	hash ^= x >> 6;
src/town_cmd.cpp
Show inline comments
 
@@ -47,24 +47,25 @@
 
#include "animated_tile_func.h"
 
#include "date_func.h"
 
#include "subsidy_func.h"
 
#include "core/smallmap_type.hpp"
 
#include "core/pool_func.hpp"
 
#include "town.h"
 

	
 
#include "table/strings.h"
 
#include "table/town_land.h"
 

	
 
Town *_cleared_town;
 
int _cleared_town_rating;
 
TownID _new_town_id;
 

	
 
uint32 _cur_town_ctr;     ///< iterator through all towns in OnTick_Town
 
uint32 _cur_town_iter;    ///< frequency iterator at the same place
 

	
 
/* Initialize the town-pool */
 
TownPool _town_pool("Town");
 
INSTANTIATE_POOL_METHODS(Town)
 

	
 
Town::~Town()
 
{
 
	free(this->name);
 

	
 
@@ -165,24 +166,25 @@ Money HouseSpec::GetRemovalCost() const
 

	
 
// Local
 
static int _grow_town_result;
 

	
 
/* Describe the possible states */
 
enum TownGrowthResult {
 
	GROWTH_SUCCEED         = -1,
 
	GROWTH_SEARCH_STOPPED  =  0
 
//	GROWTH_SEARCH_RUNNING >=  1
 
};
 

	
 
static bool BuildTownHouse(Town *t, TileIndex tile);
 
static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size, bool city, TownLayout layout);
 

	
 
static void TownDrawHouseLift(const TileInfo *ti)
 
{
 
	AddChildSpriteScreen(SPR_LIFT, PAL_NONE, 14, 60 - GetLiftPosition(ti->tile));
 
}
 

	
 
typedef void TownDrawTileProc(const TileInfo *ti);
 
static TownDrawTileProc * const _town_draw_tile_procs[1] = {
 
	TownDrawHouseLift
 
};
 

	
 
/**
 
@@ -1572,71 +1574,85 @@ static CommandCost TownCanBePlacedHere(T
 
	}
 

	
 
	/* Check distance to all other towns. */
 
	if (IsCloseToTown(tile, 20)) {
 
		return_cmd_error(STR_ERROR_TOO_CLOSE_TO_ANOTHER_TOWN);
 
	}
 

	
 
	/* Can only build on clear flat areas, possibly with trees. */
 
	if ((!IsTileType(tile, MP_CLEAR) && !IsTileType(tile, MP_TREES)) || GetTileSlope(tile, NULL) != SLOPE_FLAT) {
 
		return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
 
	}
 

	
 
	return CommandCost();
 
	return CommandCost(EXPENSES_OTHER);
 
}
 

	
 
/** Create a new town.
 
 * This obviously only works in the scenario editor. Function not removed
 
 * as it might be possible in the future to fund your own town :)
 
 * @param tile coordinates where town is built
 
 * @param flags type of operation
 
 * @param p1  0..1 size of the town (@see TownSize)
 
 *               2 true iff it should be a city
 
 *            3..5 town road layout (@see TownLayout)
 
 *               6 use random location (randomize \c tile )
 
 * @param p2 town name parts
 
 * @param text unused
 
 * @return the cost of this operation or an error
 
 */
 
CommandCost CmdFoundTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	/* Only in the scenario editor */
 
	if (_game_mode != GM_EDITOR) return CMD_ERROR;
 

	
 
	TownSize size = (TownSize)GB(p1, 0, 2);
 
	bool city = HasBit(p1, 2);
 
	TownLayout layout = (TownLayout)GB(p1, 3, 3);
 
	TownNameParams par(_settings_game.game_creation.town_name);
 
	bool random = HasBit(p1, 6);
 
	uint32 townnameparts = p2;
 

	
 
	if (size > TS_RANDOM) return CMD_ERROR;
 
	if (layout > TL_RANDOM) return CMD_ERROR;
 

	
 
	if (!VerifyTownName(townnameparts, &par)) return_cmd_error(STR_ERROR_NAME_MUST_BE_UNIQUE);
 

	
 
	CommandCost cost = TownCanBePlacedHere(tile);
 
	if (CmdFailed(cost)) return cost;
 

	
 
	/* Allocate town struct */
 
	if (!Town::CanAllocateItem()) return_cmd_error(STR_ERROR_TOO_MANY_TOWNS);
 

	
 
	CommandCost cost(EXPENSES_OTHER);
 
	if (!random) {
 
		cost = TownCanBePlacedHere(tile);
 
		if (CmdFailed(cost)) return cost;
 
	}
 

	
 
	/* Create the town */
 
	if (flags & DC_EXEC) {
 
		Town *t = new Town(tile);
 
		_generating_world = true;
 
		UpdateNearestTownForRoadTiles(true);
 
		DoCreateTown(t, tile, townnameparts, size, city, layout);
 
		if (random) {
 
			const Town *t = CreateRandomTown(20, townnameparts, size, city, layout);
 
			if (t == NULL) {
 
				cost = CommandCost(STR_ERROR_NO_SPACE_FOR_TOWN);
 
			} else {
 
				_new_town_id = t->index;
 
			}
 
		} else {
 
			Town *t = new Town(tile);
 
			DoCreateTown(t, tile, townnameparts, size, city, layout);
 
		}
 
		UpdateNearestTownForRoadTiles(false);
 
		_generating_world = false;
 
	}
 
	return CommandCost();
 
	return cost;
 
}
 

	
 
/**
 
 * Towns must all be placed on the same grid or when they eventually
 
 * interpenetrate their road networks will not mesh nicely; this
 
 * function adjusts a tile so that it aligns properly.
 
 *
 
 * @param tile the tile to start at
 
 * @param layout which town layout algo is in effect
 
 * @return the adjusted tile
 
 */
 
static TileIndex AlignTileToGrid(TileIndex tile, TownLayout layout)
 
@@ -1735,46 +1751,42 @@ static TileIndex FindNearestGoodCoastalT
 
	SpotData sp = { INVALID_TILE, 0, layout };
 

	
 
	TileIndex coast = tile;
 
	if (CircularTileSearch(&coast, 40, FindNearestEmptyLand, NULL)) {
 
		CircularTileSearch(&coast, 10, FindFurthestFromWater, &sp);
 
		return sp.tile;
 
	}
 

	
 
	/* if we get here just give up */
 
	return INVALID_TILE;
 
}
 

	
 
Town *CreateRandomTown(uint attempts, TownSize size, bool city, TownLayout layout)
 
static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size, bool city, TownLayout layout)
 
{
 
	if (!Town::CanAllocateItem()) return NULL;
 

	
 
	do {
 
		/* Generate a tile index not too close from the edge */
 
		TileIndex tile = AlignTileToGrid(RandomTile(), layout);
 

	
 
		/* if we tried to place the town on water, slide it over onto
 
		 * the nearest likely-looking spot */
 
		if (IsTileType(tile, MP_WATER)) {
 
			tile = FindNearestGoodCoastalTownSpot(tile, layout);
 
			if (tile == INVALID_TILE) continue;
 
		}
 

	
 
		/* Make sure town can be placed here */
 
		if (CmdFailed(TownCanBePlacedHere(tile))) continue;
 

	
 
		uint32 townnameparts;
 
		/* Get a unique name for the town. */
 
		if (!GenerateTownName(&townnameparts)) break;
 

	
 
		/* Allocate a town struct */
 
		Town *t = new Town(tile);
 

	
 
		DoCreateTown(t, tile, townnameparts, size, city, layout);
 

	
 
		/* if the population is still 0 at the point, then the
 
		 * placement is so bad it couldn't grow at all */
 
		if (t->population > 0) return t;
 
		delete t;
 
	} while (--attempts != 0);
 

	
 
	return NULL;
 
@@ -1784,49 +1796,56 @@ static const byte _num_initial_towns[4] 
 

	
 
/** This function will generate a certain amount of towns, with a certain layout
 
 * It can be called from the scenario editor (i.e.: generate Random Towns)
 
 * as well as from world creation.
 
 * @param layout which towns will be set to, when created
 
 * @return true if towns have been successfully created
 
 */
 
bool GenerateTowns(TownLayout layout)
 
{
 
	uint num = 0;
 
	uint difficulty = _settings_game.difficulty.number_towns;
 
	uint n = (difficulty == (uint)CUSTOM_TOWN_NUMBER_DIFFICULTY) ? _settings_game.game_creation.custom_town_number : ScaleByMapSize(_num_initial_towns[difficulty] + (Random() & 7));
 
	uint32 townnameparts;
 

	
 
	SetGeneratingWorldProgress(GWP_TOWN, n);
 

	
 
	/* First attempt will be made at creating the suggested number of towns.
 
	 * Note that this is really a suggested value, not a required one.
 
	 * We would not like the system to lock up just because the user wanted 100 cities on a 64*64 map, would we? */
 
	do {
 
		bool city = (_settings_game.economy.larger_towns != 0 && Chance16(1, _settings_game.economy.larger_towns));
 
		IncreaseGeneratingWorldProgress(GWP_TOWN);
 
		/* Get a unique name for the town. */
 
		if (!GenerateTownName(&townnameparts)) continue;
 
		/* try 20 times to create a random-sized town for the first loop. */
 
		if (CreateRandomTown(20, TS_RANDOM, city, layout) != NULL) num++; // if creation successfull, raise a flag
 
		if (CreateRandomTown(20, townnameparts, TS_RANDOM, city, layout) != NULL) num++; // if creation successfull, raise a flag
 
	} while (--n);
 

	
 
	if (num != 0) return true;
 

	
 
	/* If num is still zero at this point, it means that not a single town has been created.
 
	 * So give it a last try, but now more aggressive */
 
	if (num == 0 && CreateRandomTown(10000, TS_RANDOM, _settings_game.economy.larger_towns != 0, layout) == NULL) {
 
		if (Town::GetNumItems() == 0) {
 
			if (_game_mode != GM_EDITOR) {
 
				extern StringID _switch_mode_errorstr;
 
				_switch_mode_errorstr = STR_ERROR_COULD_NOT_CREATE_TOWN;
 
			}
 
		}
 
		return false;  // we are still without a town? we failed, simply
 
	if (GenerateTownName(&townnameparts) &&
 
			CreateRandomTown(10000, townnameparts, TS_RANDOM, _settings_game.economy.larger_towns != 0, layout) != NULL) {
 
		return true;
 
	}
 
	return true;
 

	
 
	/* If there are no towns at all and we are generating new game, bail out */
 
	if (Town::GetNumItems() == 0 && _game_mode != GM_EDITOR) {
 
		extern StringID _switch_mode_errorstr;
 
		_switch_mode_errorstr = STR_ERROR_COULD_NOT_CREATE_TOWN;
 
	}
 

	
 
	return false;  // we are still without a town? we failed, simply
 
}
 

	
 

	
 
/** Returns the bit corresponding to the town zone of the specified tile
 
 * @param t Town on which town zone is to be found
 
 * @param tile TileIndex where town zone needs to be found
 
 * @return the bit position of the given zone, as defined in HouseZones
 
 */
 
HouseZonesBits GetTownRadiusGroup(const Town *t, TileIndex tile)
 
{
 
	uint dist = DistanceSquare(tile, t->xy);
 

	
src/town_gui.cpp
Show inline comments
 
@@ -839,24 +839,33 @@ void ShowTownDirectory()
 
	if (BringWindowToFrontById(WC_TOWN_DIRECTORY, 0)) return;
 
	new TownDirectoryWindow(&_town_directory_desc);
 
}
 

	
 
void CcFoundTown(bool success, TileIndex tile, uint32 p1, uint32 p2)
 
{
 
	if (success) {
 
		SndPlayTileFx(SND_1F_SPLAT, tile);
 
		if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 
	}
 
}
 

	
 
void CcFoundRandomTown(bool success, TileIndex tile, uint32 p1, uint32 p2)
 
{
 
	if (success) {
 
		tile = Town::Get(_new_town_id)->xy;
 
		SndPlayTileFx(SND_1F_SPLAT, tile);
 
		ScrollMainWindowToTile(tile);
 
	}
 
}
 

	
 
/** Widget numbers of town scenario editor window. */
 
enum TownScenarioEditorWidgets {
 
	TSEW_CLOSEBOX,
 
	TSEW_CAPTION,
 
	TSEW_STICKYBOX,
 
	TSEW_BACKGROUND,
 
	TSEW_NEWTOWN,
 
	TSEW_RANDOMTOWN,
 
	TSEW_MANYRANDOMTOWNS,
 
	TSEW_TOWNSIZE,
 
	TSEW_SIZE_SMALL,
 
	TSEW_SIZE_MEDIUM,
 
@@ -954,50 +963,52 @@ public:
 
			this->SetWidgetLoweredState(i, i == TSEW_SIZE_SMALL + this->town_size);
 
		}
 

	
 
		this->SetWidgetLoweredState(TSEW_CITY, this->city);
 

	
 
		for (int i = TSEW_LAYOUT_ORIGINAL; i <= TSEW_LAYOUT_RANDOM; i++) {
 
			this->SetWidgetLoweredState(i, i == TSEW_LAYOUT_ORIGINAL + this->town_layout);
 
		}
 

	
 
		this->SetDirty();
 
	}
 

	
 
	void ExecuteFoundTownCommand(TileIndex tile, bool random, StringID errstr, CommandCallback cc)
 
	{
 
		uint32 townnameparts;
 
		if (!GenerateTownName(&townnameparts)) {
 
			ShowErrorMessage(STR_ERROR_TOO_MANY_TOWNS, errstr, 0, 0);
 
			return;
 
		}
 

	
 
		DoCommandP(tile, this->town_size | this->city << 2 | this->town_layout << 3 | random << 6,
 
				townnameparts, CMD_FOUND_TOWN | CMD_MSG(errstr), cc);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	{
 
		switch (widget) {
 
			case TSEW_NEWTOWN:
 
				HandlePlacePushButton(this, TSEW_NEWTOWN, SPR_CURSOR_TOWN, HT_RECT, NULL);
 
				break;
 

	
 
			case TSEW_RANDOMTOWN: {
 
			case TSEW_RANDOMTOWN:
 
				this->HandleButtonClick(TSEW_RANDOMTOWN);
 
				_generating_world = true;
 
				UpdateNearestTownForRoadTiles(true);
 
				const Town *t = CreateRandomTown(20, this->town_size, this->city, this->town_layout);
 
				UpdateNearestTownForRoadTiles(false);
 
				_generating_world = false;
 

	
 
				if (t == NULL) {
 
					ShowErrorMessage(STR_ERROR_NO_SPACE_FOR_TOWN, STR_ERROR_CAN_T_GENERATE_TOWN, 0, 0);
 
				} else {
 
					ScrollMainWindowToTile(t->xy);
 
				}
 
			} break;
 
				this->ExecuteFoundTownCommand(0, true, STR_ERROR_CAN_T_GENERATE_TOWN, CcFoundRandomTown);
 
				break;
 

	
 
			case TSEW_MANYRANDOMTOWNS:
 
				this->HandleButtonClick(TSEW_MANYRANDOMTOWNS);
 

	
 
				_generating_world = true;
 
				UpdateNearestTownForRoadTiles(true);
 
				if (!GenerateTowns(this->town_layout)) {
 
					ShowErrorMessage(STR_ERROR_NO_SPACE_FOR_TOWN, STR_ERROR_CAN_T_GENERATE_TOWN, 0, 0);
 
				}
 
				UpdateNearestTownForRoadTiles(false);
 
				_generating_world = false;
 
				break;
 
@@ -1021,32 +1032,25 @@ public:
 
		}
 
	}
 

	
 
	virtual void OnTimeout()
 
	{
 
		this->RaiseWidget(TSEW_RANDOMTOWN);
 
		this->RaiseWidget(TSEW_MANYRANDOMTOWNS);
 
		this->SetDirty();
 
	}
 

	
 
	virtual void OnPlaceObject(Point pt, TileIndex tile)
 
	{
 
		uint32 townnameparts;
 
		if (!GenerateTownName(&townnameparts)) {
 
			ShowErrorMessage(STR_ERROR_TOO_MANY_TOWNS, STR_ERROR_CAN_T_FOUND_TOWN_HERE, 0, 0);
 
			return;
 
		}
 

	
 
		DoCommandP(tile, this->town_size | this->city << 2 | this->town_layout << 3, townnameparts,
 
				CMD_FOUND_TOWN | CMD_MSG(STR_ERROR_CAN_T_FOUND_TOWN_HERE), CcFoundTown);
 
		this->ExecuteFoundTownCommand(tile, false, STR_ERROR_CAN_T_FOUND_TOWN_HERE, CcFoundTown);
 
	}
 

	
 
	virtual void OnPlaceObjectAbort()
 
	{
 
		this->RaiseButtons();
 
		this->UpdateButtons();
 
	}
 
};
 

	
 
static const WindowDesc _found_town_desc(
 
	WDP_AUTO, WDP_AUTO, 160, 162, 160, 162,
 
	WC_FOUND_TOWN, WC_NONE,
0 comments (0 inline, 0 general)