OpenTTD Source 20241224-master-gee860a5c8e
map_sl.cpp File Reference

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

#include "../stdafx.h"
#include "saveload.h"
#include "compat/map_sl_compat.h"
#include "../map_func.h"
#include "../core/bitmath_func.hpp"
#include "../fios.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  MAPSChunkHandler
 
struct  MAPTChunkHandler
 
struct  MAPHChunkHandler
 
struct  MAPOChunkHandler
 
struct  MAP2ChunkHandler
 
struct  M3LOChunkHandler
 
struct  M3HIChunkHandler
 
struct  MAP5ChunkHandler
 
struct  MAPEChunkHandler
 
struct  MAP7ChunkHandler
 
struct  MAP8ChunkHandler
 

Functions

const ChunkHandlerTable _map_chunk_handlers (map_chunk_handlers)
 

Variables

static uint32_t _map_dim_x
 
static uint32_t _map_dim_y
 
static const SaveLoad _map_desc []
 
static const uint MAP_SL_BUF_SIZE = 4096
 
static const MAPSChunkHandler MAPS
 
static const MAPTChunkHandler MAPT
 
static const MAPHChunkHandler MAPH
 
static const MAPOChunkHandler MAPO
 
static const MAP2ChunkHandler MAP2
 
static const M3LOChunkHandler M3LO
 
static const M3HIChunkHandler M3HI
 
static const MAP5ChunkHandler MAP5
 
static const MAPEChunkHandler MAPE
 
static const MAP7ChunkHandler MAP7
 
static const MAP8ChunkHandler MAP8
 
static const ChunkHandlerRef map_chunk_handlers []
 

Detailed Description

Code handling saving and loading of map.

Definition in file map_sl.cpp.

Variable Documentation

◆ _map_desc

const SaveLoad _map_desc[]
static
Initial value:
= {
SLEG_CONDVAR("dim_x", _map_dim_x, SLE_UINT32, SLV_6, SL_MAX_VERSION),
SLEG_CONDVAR("dim_y", _map_dim_y, SLE_UINT32, SLV_6, SL_MAX_VERSION),
}
#define SLEG_CONDVAR(name, variable, type, from, to)
Storage of a global variable in some savegame versions.
Definition saveload.h:1109
@ SLV_6
6.0 1721 6.1 1768
Definition saveload.h:46
@ SL_MAX_VERSION
Highest possible saveload version.
Definition saveload.h:399

Definition at line 24 of file map_sl.cpp.

◆ _map_dim_x

uint32_t _map_dim_x
static

Definition at line 21 of file map_sl.cpp.

◆ _map_dim_y

uint32_t _map_dim_y
static

Definition at line 22 of file map_sl.cpp.

◆ M3HI

const M3HIChunkHandler M3HI
static

Definition at line 361 of file map_sl.cpp.

◆ M3LO

const M3LOChunkHandler M3LO
static

Definition at line 360 of file map_sl.cpp.

◆ MAP2

const MAP2ChunkHandler MAP2
static

Definition at line 359 of file map_sl.cpp.

◆ MAP5

const MAP5ChunkHandler MAP5
static

Definition at line 362 of file map_sl.cpp.

◆ MAP7

const MAP7ChunkHandler MAP7
static

Definition at line 364 of file map_sl.cpp.

◆ MAP8

const MAP8ChunkHandler MAP8
static

Definition at line 365 of file map_sl.cpp.

◆ map_chunk_handlers

const ChunkHandlerRef map_chunk_handlers[]
static
Initial value:
= {
MAPS,
MAPT,
MAPH,
MAPO,
MAP2,
M3LO,
M3HI,
MAP5,
MAPE,
MAP7,
MAP8,
}

Definition at line 366 of file map_sl.cpp.

◆ MAP_SL_BUF_SIZE

const uint MAP_SL_BUF_SIZE = 4096
static

Definition at line 67 of file map_sl.cpp.

◆ MAPE

const MAPEChunkHandler MAPE
static

Definition at line 363 of file map_sl.cpp.

◆ MAPH

const MAPHChunkHandler MAPH
static

Definition at line 357 of file map_sl.cpp.

◆ MAPO

const MAPOChunkHandler MAPO
static

Definition at line 358 of file map_sl.cpp.

◆ MAPS

const MAPSChunkHandler MAPS
static

Definition at line 355 of file map_sl.cpp.

◆ MAPT

const MAPTChunkHandler MAPT
static

Definition at line 356 of file map_sl.cpp.