Defines | Functions | Variables

gfxinit.cpp File Reference

Initializing of the (GRF) graphics. More...

#include "stdafx.h"
#include "fios.h"
#include "newgrf.h"
#include "3rdparty/md5/md5.h"
#include "fontcache.h"
#include "gfx_func.h"
#include "base_media_func.h"
#include "table/sprites.h"
#include "table/landscape_sprite.h"

Go to the source code of this file.

Defines

#define SET_TYPE   "graphics"

Functions

static uint LoadGrfFile (const char *filename, uint load_index, int file_index)
static 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)
void CheckExternalFiles ()
 Checks whether the MD5 checksums of the files are correct.
static void LoadSpriteTables ()
 Actually load the sprite tables.
void GfxLoadSprites ()
 Initialise and load all the sprites.

Variables

bool _palette_remap_grf [MAX_FILE_SLOTS]
 Whether the given NewGRFs must get a palette remap from windows to DOS or not.
static const SpriteID *const _landscape_spriteindexes []
static const char *const _graphics_file_names [] = { "base", "logos", "arctic", "tropical", "toyland", "extra" }
 Names corresponding to the GraphicsFileType.

Detailed Description

Initializing of the (GRF) graphics.

Definition in file gfxinit.cpp.


Function Documentation

void CheckExternalFiles (  ) 
void GfxLoadSprites (  ) 

Initialise and load all the sprites.

Definition at line 212 of file gfxinit.cpp.

References _settings_game, DEBUG, GameSettings::game_creation, GameCreationSettings::landscape, LoadSpriteTables(), and UpdateCursorSize().

Referenced by AfterLoadGame(), GenerateWorld(), and ReloadNewGRFData().

static void LoadSpriteTables (  )  [static]

Variable Documentation

const SpriteID* const _landscape_spriteindexes[] [static]
Initial value:
 {
  _landscape_spriteindexes_1,
  _landscape_spriteindexes_2,
  _landscape_spriteindexes_3,
}

Definition at line 30 of file gfxinit.cpp.

bool _palette_remap_grf[MAX_FILE_SLOTS]

Whether the given NewGRFs must get a palette remap from windows to DOS or not.

Definition at line 26 of file gfxinit.cpp.

Referenced by SpriteLoaderGrf::LoadSprite(), LoadSpriteTables(), and ReadSprite().