# misc_sl.cpp File Reference

Saving and loading of things that didn't fit anywhere else. More...

`#include "../stdafx.h"`
`#include "../date_func.h"`
`#include "../variables.h"`
`#include "../core/random_func.hpp"`
`#include "../openttd.h"`
`#include "../zoom_func.h"`
`#include "../vehicle_func.h"`
`#include "../window_gui.h"`
`#include "../window_func.h"`
`#include "../viewport_func.h"`
`#include "../gfx_func.h"`
`#include "../company_base.h"`
`#include "../town.h"`
`#include "saveload.h"`

Go to the source code of this file.

## Functions

void | SaveViewportBeforeSaveGame ()
void | ResetViewportAfterLoadGame ()
static void | SaveLoad_DATE ()
static void | SaveLoad_VIEW ()

## Variables

TileIndex | _cur_tileloop_tile
int | _saved_scrollpos_x
int | _saved_scrollpos_y
static const SaveLoadGlobVarList | _date_desc []
static const SaveLoadGlobVarList | _view_desc []
const ChunkHandler | _misc_chunk_handlers []

## Detailed Description

Saving and loading of things that didn't fit anywhere else.

Definition in file misc_sl.cpp.

## Variable Documentation

const SaveLoadGlobVarList _date_desc[]`[static]`

Initial value:

     {
      SLEG_CONDVAR(_date,                   SLE_FILE_U16 | SLE_VAR_I32,  0,  30),
      SLEG_CONDVAR(_date,                   SLE_INT32,                  31, SL_MAX_VERSION),
          SLEG_VAR(_date_fract,             SLE_UINT16),
          SLEG_VAR(_tick_counter,           SLE_UINT16),
          SLEG_VAR(_vehicle_id_ctr_day,     SLE_UINT16),
          SLEG_VAR(_age_cargo_skip_counter, SLE_UINT8),
      SLE_CONDNULL(1, 0, 45),
      SLEG_CONDVAR(_cur_tileloop_tile,      SLE_FILE_U16 | SLE_VAR_U32,  0, 5),
      SLEG_CONDVAR(_cur_tileloop_tile,      SLE_UINT32,                  6, SL_MAX_VERSION),
          SLEG_VAR(_disaster_delay,         SLE_UINT16),
      SLE_CONDNULL(2, 0, 119),
          SLEG_VAR(_random.state[0],        SLE_UINT32),
          SLEG_VAR(_random.state[1],        SLE_UINT32),
      SLE_CONDNULL(1,  0,   9),
      SLE_CONDNULL(4, 10, 119),
          SLEG_VAR(_cur_company_tick_index, SLE_FILE_U8  | SLE_VAR_U32),
      SLEG_CONDVAR(_next_competitor_start,  SLE_FILE_U16 | SLE_VAR_U32,  0, 108),
      SLEG_CONDVAR(_next_competitor_start,  SLE_UINT32,                109, SL_MAX_VERSION),
          SLEG_VAR(_trees_tick_ctr,         SLE_UINT8),
      SLEG_CONDVAR(_pause_game,             SLE_UINT8,                   4, SL_MAX_VERSION),
      SLE_CONDNULL(4, 11, 119),

    }

Definition at line 57 of file misc_sl.cpp.

const ChunkHandler _misc_chunk_handlers[]

Initial value:

     {
      { 'DATE', SaveLoad_DATE, SaveLoad_DATE, CH_RIFF},
      { 'VIEW', SaveLoad_VIEW, SaveLoad_VIEW, CH_RIFF | CH_LAST},
    }

const SaveLoadGlobVarList _view_desc[]`[static]`

Initial value:

     {
      SLEG_CONDVAR(_saved_scrollpos_x,    SLE_FILE_I16 | SLE_VAR_I32, 0, 5),
      SLEG_CONDVAR(_saved_scrollpos_x,    SLE_INT32,                  6, SL_MAX_VERSION),
      SLEG_CONDVAR(_saved_scrollpos_y,    SLE_FILE_I16 | SLE_VAR_I32, 0, 5),
      SLEG_CONDVAR(_saved_scrollpos_y,    SLE_INT32,                  6, SL_MAX_VERSION),
          SLEG_VAR(_saved_scrollpos_zoom, SLE_UINT8),

    }

Definition at line 90 of file misc_sl.cpp.