OpenTTD
Functions | Variables
map_sl.cpp File Reference

Code handling saving and loading of map. More...

#include "../stdafx.h"
#include "../map_func.h"
#include "../core/bitmath_func.hpp"
#include "../fios.h"
#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 ()
 

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, NULL, Check_MAPS, CH_RIFF },
{ 'MAPT', Save_MAPT, Load_MAPT, NULL, NULL, CH_RIFF },
{ 'MAPH', Save_MAPH, Load_MAPH, NULL, NULL, CH_RIFF },
{ 'MAPO', Save_MAP1, Load_MAP1, NULL, NULL, CH_RIFF },
{ 'MAP2', Save_MAP2, Load_MAP2, NULL, NULL, CH_RIFF },
{ 'M3LO', Save_MAP3, Load_MAP3, NULL, NULL, CH_RIFF },
{ 'M3HI', Save_MAP4, Load_MAP4, NULL, NULL, CH_RIFF },
{ 'MAP5', Save_MAP5, Load_MAP5, NULL, NULL, CH_RIFF },
{ 'MAPE', Save_MAP6, Load_MAP6, NULL, NULL, CH_RIFF },
{ 'MAP7', Save_MAP7, Load_MAP7, NULL, NULL, CH_RIFF | CH_LAST },
}
Last chunk in this array.
Definition: saveload.h:104

◆ _map_dimensions

const SaveLoadGlobVarList _map_dimensions[]
static
Initial value:
= {
SLEG_CONDVAR(_map_dim_x, SLE_UINT32, 6, SL_MAX_VERSION),
SLEG_CONDVAR(_map_dim_y, SLE_UINT32, 6, SL_MAX_VERSION),
}
#define SL_MAX_VERSION
Highest possible savegame version.
Definition: saveload.h:96
#define SLEG_CONDVAR(variable, type, from, to)
Storage of a global variable in some savegame versions.
Definition: saveload.h:373

Definition at line 24 of file map_sl.cpp.