town_sl.cpp File Reference

Code handling saving and loading of towns and houses. More...

#include "../stdafx.h"
#include "../newgrf_house.h"
#include "../town.h"
#include "../landscape.h"
#include "saveload.h"
#include "newgrf_sl.h"

Go to the source code of this file.

Functions

void UpdateHousesAndTowns ()
 Check and update town and house values.
static void Save_HIDS ()
static void Load_HIDS ()
const SaveLoadGetTileMatrixDesc ()
void RealSave_TOWN (Town *t)
static void Save_TOWN ()
void Load_TOWN ()
static void Ptrs_TOWN ()

Variables

static const SaveLoad _town_desc []
 Save and load of towns.
const ChunkHandler _town_chunk_handlers []

Detailed Description

Code handling saving and loading of towns and houses.

Definition in file town_sl.cpp.


Function Documentation

void UpdateHousesAndTowns (  ) 

Check and update town and house values.

Checked are the HouseIDs. Updated are the town population the number of houses per town, the town radius and the max passengers of the town.

Definition at line 28 of file town_sl.cpp.

References HouseSpec::building_flags, GetCleanHouseType(), GetHouseNorthPart(), OverrideManagerBase::GetSubstituteID(), IncreaseBuildingCount(), IsHouseCompleted(), IsTileType(), MapSize(), MP_HOUSE, HouseSpec::population, SetHouseType(), TileDiffXY(), and UpdateTownCargos().

Referenced by AfterLoadGame(), and ReloadNewGRFData().


Variable Documentation

const ChunkHandler _town_chunk_handlers[]
Initial value:
 {
  { 'HIDS', Save_HIDS, Load_HIDS, NULL,      NULL, CH_ARRAY },
  { 'CITY', Save_TOWN, Load_TOWN, Ptrs_TOWN, NULL, CH_ARRAY | CH_LAST},
}
const SaveLoad _town_desc[] [static]

Save and load of towns.

Definition at line 105 of file town_sl.cpp.


Generated on Sun May 8 07:30:31 2011 for OpenTTD by  doxygen 1.6.1