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

OpenTTD Source 1.11.0-RC1

Functions | Variables
map_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "../map_func.h"`
`#include "../core/bitmath_func.hpp"`
`#include "../fios.h"`
`#include <array>`
`#include "saveload.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Functions
static void | Save_MAPS ()
static void | Load_MAPS ()
static void | Check_MAPS ()
static void | Load_MAPT ()
static void | Save_MAPT ()
static void | Load_MAPH ()
static void | Save_MAPH ()
static void | Load_MAP1 ()
static void | Save_MAP1 ()
static void | Load_MAP2 ()
static void | Save_MAP2 ()
static void | Load_MAP3 ()
static void | Save_MAP3 ()
static void | Load_MAP4 ()
static void | Save_MAP4 ()
static void | Load_MAP5 ()
static void | Save_MAP5 ()
static void | Load_MAP6 ()
static void | Save_MAP6 ()
static void | Load_MAP7 ()
static void | Save_MAP7 ()
static void | Load_MAP8 ()
static void | Save_MAP8 ()

## Variables
static uint32 | _map_dim_x
static uint32 | _map_dim_y
static const SaveLoadGlobVarList | _map_dimensions []
static const uint | MAP_SL_BUF_SIZE = 4096
const ChunkHandler | _map_chunk_handlers []

## Detailed Description

Code handling saving and loading of map

Definition in file map_sl.cpp.

## Variable Documentation

## ◆ _map_chunk_handlers

const ChunkHandler _map_chunk_handlers[]

Initial value:
= {
{ 'MAPS', Save_MAPS, Load_MAPS, nullptr, Check_MAPS, CH_RIFF },
{ 'MAPT', Save_MAPT, Load_MAPT, nullptr, nullptr, CH_RIFF },
{ 'MAPH', Save_MAPH, Load_MAPH, nullptr, nullptr, CH_RIFF },
{ 'MAPO', Save_MAP1, Load_MAP1, nullptr, nullptr, CH_RIFF },
{ 'MAP2', Save_MAP2, Load_MAP2, nullptr, nullptr, CH_RIFF },
{ 'M3LO', Save_MAP3, Load_MAP3, nullptr, nullptr, CH_RIFF },
{ 'M3HI', Save_MAP4, Load_MAP4, nullptr, nullptr, CH_RIFF },
{ 'MAP5', Save_MAP5, Load_MAP5, nullptr, nullptr, CH_RIFF },
{ 'MAPE', Save_MAP6, Load_MAP6, nullptr, nullptr, CH_RIFF },
{ 'MAP7', Save_MAP7, Load_MAP7, nullptr, nullptr, CH_RIFF },
{ 'MAP8', Save_MAP8, Load_MAP8, nullptr, nullptr, CH_RIFF | CH_LAST },
}

## ◆ _map_dimensions

const SaveLoadGlobVarList _map_dimensions[]
| static

Initial value:
= {
SLEG_CONDVAR(_map_dim_x, SLE_UINT32, SLV_6, SL_MAX_VERSION),
SLEG_CONDVAR(_map_dim_y, SLE_UINT32, SLV_6, SL_MAX_VERSION),
}

Definition at line 23 of file map_sl.cpp.

CH_LAST
@ CH_LAST
Last chunk in this array.
Definition: saveload.h:410
SLEG_CONDVAR
#define SLEG_CONDVAR(variable, type, from, to)
Storage of a global variable in some savegame versions.
Definition: saveload.h:707
SL_MAX_VERSION
@ SL_MAX_VERSION
Highest possible saveload version.
Definition: saveload.h:328
SLV_6
@ SLV_6
6.0 1721 6.1 1768
Definition: saveload.h:46