OpenTTD Source: src/spriteloader/sprite_file.cpp File Reference

OpenTTD Source 13.2.1

Functions | Variables
sprite_file.cpp File Reference
`#include "../stdafx.h"`
`#include "sprite_file_type.hpp"`

Go to the source code of this file.

## Functions
static byte | GetGRFContainerVersion (SpriteFile &file)
| Get the container version of the currently opened GRF file. More...

## Variables
const byte | _grf_cont_v2_sig [8] = {'G', 'R', 'F', 0x82, 0x0D, 0x0A, 0x1A, 0x0A}
| Signature of a container version 2 GRF.

## Detailed Description

Implementation of logic specific to the SpriteFile class.

Definition in file sprite_file.cpp.

## Function Documentation

## ◆ GetGRFContainerVersion()

static byte GetGRFContainerVersion | ( | SpriteFile & | file | ) |
| static

Get the container version of the currently opened GRF file.

Returns
  Container version of the GRF file or 0 if the file is corrupt/no GRF file.

Definition at line 20 of file sprite_file.cpp.

References _grf_cont_v2_sig, RandomAccessFile::GetPos(), lengthof, RandomAccessFile::ReadByte(), RandomAccessFile::ReadWord(), and RandomAccessFile::SeekTo().

Referenced by SpriteFile::SpriteFile().