cargodest_sl.cpp File Reference

Code handling saving and loading of cargo destinations. More...

#include "../stdafx.h"
#include "../cargodest_base.h"
#include "../town.h"
#include "../industry.h"
#include "saveload.h"

Go to the source code of this file.

Functions

const SaveLoadGetRouteLinkDescription ()
 Wrapper function to get the RouteLinks's internal structure while some of the variables itself are private.
static void Save_RTLN ()
 Save the RouteLink chunk.
static void Load_RTLN ()
 Load the RouteLink chunk.
static void Ptrs_RTLN ()
 Resolve references after loading the RouteLink chunk.

Variables

static uint32 _cargolink_uint
static const SaveLoadGlobVarList _cargolink_uint_desc []
static const SaveLoad _cargolink_desc []
const ChunkHandler _routelink_chunk_handlers []

Detailed Description

Code handling saving and loading of cargo destinations.

Definition in file cargodest_sl.cpp.


Function Documentation

const SaveLoad* GetRouteLinkDescription (  ) 

Wrapper function to get the RouteLinks's internal structure while some of the variables itself are private.

Saving and loading of route links.

Returns:
The SaveLoad description for RouteLinks.

Definition at line 131 of file cargodest_sl.cpp.

References SLE_END, and SLE_VAR.

Referenced by Load_RTLN(), Ptrs_RTLN(), and Save_RTLN().

static void Load_RTLN (  )  [static]

Load the RouteLink chunk.

Definition at line 159 of file cargodest_sl.cpp.

References GetRouteLinkDescription(), SlIterateArray(), and SlObject().

static void Ptrs_RTLN (  )  [static]

Resolve references after loading the RouteLink chunk.

Definition at line 170 of file cargodest_sl.cpp.

References FOR_ALL_ROUTELINKS, GetRouteLinkDescription(), and SlObject().

static void Save_RTLN (  )  [static]

Variable Documentation

const SaveLoad _cargolink_desc[] [static]
Initial value:
 {
  SLE_VAR(CargoLink, amount.old_max, SLE_UINT32),
  SLE_VAR(CargoLink, amount.new_max, SLE_UINT32),
  SLE_VAR(CargoLink, amount.old_act, SLE_UINT32),
  SLE_VAR(CargoLink, amount.new_act, SLE_UINT32),
  SLE_VAR(CargoLink, weight,         SLE_UINT32),
  SLE_VAR(CargoLink, weight_mod,     SLE_UINT8),

}

Definition at line 24 of file cargodest_sl.cpp.

const SaveLoadGlobVarList _cargolink_uint_desc[] [static]
Initial value:
 {
  SLEG_VAR(_cargolink_uint, SLE_UINT32),

}

Definition at line 19 of file cargodest_sl.cpp.

const ChunkHandler _routelink_chunk_handlers[]
Initial value:
 {
  { 'RTLN', Save_RTLN, Load_RTLN, Ptrs_RTLN, NULL, CH_ARRAY | CH_LAST},
}

Generated on Fri Jun 3 05:19:10 2011 for OpenTTD by  doxygen 1.6.1