#include "stdafx.h"#include "openttd.h"#include "debug.h"#include "gfxinit.h"#include "spritecache.h"#include "fileio.h"#include "fios.h"#include "newgrf.h"#include "md5.h"#include "variables.h"#include "fontcache.h"#include "gfx_func.h"#include "core/alloc_func.hpp"#include "core/bitmath_func.hpp"#include <string.h>#include "settings_type.h"#include "table/sprites.h"#include "table/files.h"#include "table/landscape_sprite.h"Go to the source code of this file.
Data Structures | |
| struct | MD5File |
| struct | FileList |
Functions | |
| static uint | LoadGrfFile (const char *filename, uint load_index, int file_index) |
| void | LoadSpritesIndexed (int file_index, uint *sprite_id, const SpriteID *index_tbl) |
| static void | LoadGrfIndexed (const char *filename, const SpriteID *index_tbl, int file_index) |
| static bool | FileMD5 (const MD5File file) |
| Calculate and check the MD5 hash of the supplied filename. | |
| static void | DeterminePalette () |
| Determine the palette that has to be used. | |
| void | CheckExternalFiles () |
| Checks whether the MD5 checksums of the files are correct. | |
| static void | LoadSpriteTables () |
| void | GfxLoadSprites () |
Variables | |
| static const SpriteID *const | _landscape_spriteindexes [] |
Definition in file gfxinit.cpp.
| void CheckExternalFiles | ( | ) |
Checks whether the MD5 checksums of the files are correct.
Definition at line 163 of file gfxinit.cpp.
References DeterminePalette(), and FileMD5().
| static void DeterminePalette | ( | ) | [static] |
Determine the palette that has to be used.
Definition at line 135 of file gfxinit.cpp.
References FioCheckFileExists().
Referenced by CheckExternalFiles().
| static bool FileMD5 | ( | const MD5File | file | ) | [static] |
Calculate and check the MD5 hash of the supplied filename.
| file | filename and expected MD5 hash for the given filename. |
Definition at line 102 of file gfxinit.cpp.
References DATA_DIR, FioFCloseFile(), and FioFOpenFile().
Referenced by CheckExternalFiles().
const SpriteID* const _landscape_spriteindexes[] [static] |
Initial value:
{
_landscape_spriteindexes_1,
_landscape_spriteindexes_2,
_landscape_spriteindexes_3,
}
Definition at line 39 of file gfxinit.cpp.
1.5.6