Public Member Functions | Private Attributes

# SpriteLoaderGrf Class Reference

Sprite loader for graphics coming from a (New)GRF. More...

`#include <grf.hpp>`

Inheritance diagram for SpriteLoaderGrf:

## Public Member Functions
| SpriteLoaderGrf (byte container_ver)
uint8 | LoadSprite (SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos, SpriteType sprite_type, bool load_32bpp)
| Load a sprite from the disk and return a sprite struct which is the same for all loaders.
## Private Attributes
byte | container_ver

## Detailed Description

Sprite loader for graphics coming from a (New)GRF.

Definition at line 18 of file grf.hpp.

## Member Function Documentation

uint8 SpriteLoaderGrf::LoadSprite | ( | SpriteLoader::Sprite * | sprite,
|  | uint8 | file_slot,
|  | size_t | file_pos,
|  | SpriteType | sprite_type,
|  | bool | load_32bpp |
| ) |  |  | `[virtual]`

Load a sprite from the disk and return a sprite struct which is the same for all loaders.

Parameters:

  `[out]` | sprite | The sprites to fill with data.
  | file_slot | The file "descriptor" of the file we read from.
  | file_pos | The position within the file the image begins.
  | sprite_type | The type of sprite we're trying to load.
  | load_32bpp | True if 32bpp sprites should be loaded, false for a 8bpp sprite.

Returns:
  Bit mask of the zoom levels successfully loaded or 0 if no sprite could be loaded.

Implements SpriteLoader.

Definition at line 316 of file grf.cpp.

Referenced by ReadSprite().

The documentation for this class was generated from the following files:

- src/spriteloader/grf.hpp
- src/spriteloader/grf.cpp