OpenTTD Source: src/saveload/town_sl.cpp File Reference

OpenTTD Source 12.2

Data Structures | Typedefs | Functions | Variables
town_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "saveload.h"`
`#include "compat/town_sl_compat.h"`
`#include "newgrf_sl.h"`
`#include "../newgrf_house.h"`
`#include "../town.h"`
`#include "../landscape.h"`
`#include "../subsidy_func.h"`
`#include "../strings_func.h"`
`#include "../tilematrix_type.hpp"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
class | SlTownSupplied
class | SlTownReceived
class | SlTownAcceptanceMatrix
struct | HIDSChunkHandler
struct | CITYChunkHandler

## Typedefs
typedef TileMatrix< CargoTypes, 4 > | AcceptanceMatrix

## Functions
void | RebuildTownCaches ()
| Rebuild all the cached variables of towns.
void | UpdateHousesAndTowns ()
| Check and update town and house values. More...

## Variables
static const SaveLoad | _town_desc []
static const HIDSChunkHandler | HIDS
static const CITYChunkHandler | CITY
static const ChunkHandlerRef | town_chunk_handlers []
const ChunkHandlerTable | _town_chunk_handlers (town_chunk_handlers)

## Detailed Description

Code handling saving and loading of towns and houses

Definition in file town_sl.cpp.

## Function Documentation

## ◆ UpdateHousesAndTowns()

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 67 of file town_sl.cpp.

References GetCleanHouseType(), IsTileType(), MapSize(), MP_HOUSE, and NEW_HOUSE_OFFSET.

## Variable Documentation

## ◆ town_chunk_handlers

const ChunkHandlerRef town_chunk_handlers[]
| static

Initial value:
= {
HIDS,
CITY,
}

Definition at line 320 of file town_sl.cpp.