# gfxinit.h File Reference

Functions related to the graphics initialization. More...

`#include "gfx_type.h"`

Go to the source code of this file.

## Functions

void | CheckExternalFiles ()
| Checks whether the MD5 checksums of the files are correct.
void | GfxLoadSprites ()
void | LoadSpritesIndexed (int file_index, uint *sprite_id, const SpriteID *index_tbl)
void | FindGraphicsSets ()
| Scan for all Grahpics sets.
bool | SetGraphicsSet (const char *name)
| Set the graphics set to be used.
char * | GetGraphicsSetsList (char *p, const char *last)
| Returns a list with the graphics sets.
int | GetNumGraphicsSets ()
| Count the number of available graphics sets.
int | GetIndexOfCurrentGraphicsSet ()
| Get the index of the currently active graphics set.
const char * | GetGraphicsSetName (int index)
| Get the name of the graphics set at the specified index.

## Variables

char * | _ini_graphics_set

## Detailed Description

Functions related to the graphics initialization.

Definition in file gfxinit.h.

## Function Documentation

void CheckExternalFiles | ( |  | ) |

Checks whether the MD5 checksums of the files are correct.

Note:
  Also checks sample.cat and other required non-NewGRF GRFs for corruption.

Definition at line 226 of file gfxinit.cpp.

References _use_palette, DeterminePalette(), FileMD5(), MD5File::filename, GraphicsSet::files, lastof, lengthof, MAX_GFT, MD5File::missing_warning, GraphicsSet::name, PAL_DOS, seprintf(), and ShowInfoF().

Referenced by SetGraphicsSet().

char* GetGraphicsSetsList | ( | char * | p,
|  | const char * | last |
| ) |  |  |

Returns a list with the graphics sets.

Parameters:

  | p | where to print to
  | last | the last character to print to

Returns:
  the last printed character

Definition at line 523 of file gfxinit.cpp.

References MAX_GFT, GraphicsSet::next, and seprintf().

Referenced by ShowHelp().

bool SetGraphicsSet | ( | const char * | name | ) |

Set the graphics set to be used.

Parameters:

  | name | of the graphics set to use

Returns:
  true if it could be loaded

Definition at line 499 of file gfxinit.cpp.

References CheckExternalFiles(), DetermineGraphicsPack(), GraphicsSet::next, and StrEmpty().