OpenTTD Source: Sprite Struct Reference

OpenTTD Source 15.0-RC2

Data Fields
Sprite Struct Reference

Data structure describing a sprite. More...

`#include <spritecache_type.h>`

## Data Fields
uint16_t | height
| Height of the sprite.
uint16_t | width
| Width of the sprite.
int16_t | x_offs
| Number of pixels to shift the sprite to the right.
int16_t | y_offs
| Number of pixels to shift the sprite downwards.
std::byte | data []
| Sprite data.

## Detailed Description

Data structure describing a sprite.

Definition at line 16 of file spritecache_type.h.

## Field Documentation

## ◆ data

std::byte Sprite::data[]

Sprite data.

Definition at line 21 of file spritecache_type.h.

Referenced by Blitter_32bppSimple::Encode(), Blitter_8bppOptimized::Encode(), Blitter_8bppSimple::Encode(), GfxBlitter(), and ReadSprite().

## ◆ height

uint16_t Sprite::height

Height of the sprite.

Definition at line 17 of file spritecache_type.h.

Referenced by AddCombinedSprite(), AddSortableSpriteToDraw(), SpriteAlignerWindow::DrawWidget(), Blitter_32bppSimple::Encode(), Blitter_8bppOptimized::Encode(), Blitter_8bppSimple::Encode(), Blitter_Null::Encode(), VehicleSpriteSeq::GetBounds(), GetSpriteSize(), GfxBlitter(), ReadSprite(), and UpdateCursorSize().

## ◆ width

uint16_t Sprite::width

Width of the sprite.

Definition at line 18 of file spritecache_type.h.

Referenced by AddCombinedSprite(), AddSortableSpriteToDraw(), DrawLayoutLine(), SpriteAlignerWindow::DrawWidget(), Blitter_32bppSimple::Encode(), Blitter_8bppOptimized::Encode(), Blitter_8bppSimple::Encode(), Blitter_Null::Encode(), VehicleSpriteSeq::GetBounds(), SpriteFontCache::GetGlyphWidth(), GetSpriteSize(), GfxBlitter(), ReadSprite(), and UpdateCursorSize().

## ◆ x_offs

int16_t Sprite::x_offs

Number of pixels to shift the sprite to the right.

Definition at line 19 of file spritecache_type.h.

Referenced by AddCombinedSprite(), AddSortableSpriteToDraw(), DrawCommonTileSeqInGUI(), DrawLayoutLine(), SpriteAlignerWindow::DrawWidget(), Blitter_32bppSimple::Encode(), Blitter_8bppOptimized::Encode(), Blitter_8bppSimple::Encode(), Blitter_Null::Encode(), VehicleSpriteSeq::GetBounds(), GetSpriteSize(), SpriteAlignerWindow::GetWidgetString(), GfxBlitter(), SpriteAlignerWindow::OnClick(), ReadSprite(), and UpdateCursorSize().

## ◆ y_offs

int16_t Sprite::y_offs

Number of pixels to shift the sprite downwards.

Definition at line 20 of file spritecache_type.h.

Referenced by AddCombinedSprite(), AddSortableSpriteToDraw(), DrawCommonTileSeqInGUI(), SpriteAlignerWindow::DrawWidget(), Blitter_32bppSimple::Encode(), Blitter_8bppOptimized::Encode(), Blitter_8bppSimple::Encode(), Blitter_Null::Encode(), VehicleSpriteSeq::GetBounds(), GetSpriteSize(), SpriteAlignerWindow::GetWidgetString(), GfxBlitter(), SpriteAlignerWindow::OnClick(), ReadSprite(), and UpdateCursorSize().

The documentation for this struct was generated from the following file:

- src/spritecache_type.h