|
OpenTTD Source 20251116-master-g21329071df
|
Handling of sprites. More...
#include "stdafx.h"#include "sprite.h"#include "viewport_func.h"#include "landscape.h"#include "spritecache.h"#include "zoom_func.h"#include "safeguards.h"Go to the source code of this file.
Functions | |
| void | DrawCommonTileSeq (const TileInfo *ti, const DrawTileSprites *dts, TransparencyOption to, int32_t orig_offset, uint32_t newgrf_offset, PaletteID default_palette, bool child_offset_is_unsigned) |
| Draws a tile sprite sequence. | |
| void | DrawCommonTileSeqInGUI (int x, int y, const DrawTileSprites *dts, int32_t orig_offset, uint32_t newgrf_offset, PaletteID default_palette, bool child_offset_is_unsigned) |
| Draws a tile sprite sequence in the GUI. | |
Handling of sprites.
Definition in file sprite.cpp.
| void DrawCommonTileSeq | ( | const TileInfo * | ti, |
| const DrawTileSprites * | dts, | ||
| TransparencyOption | to, | ||
| int32_t | orig_offset, | ||
| uint32_t | newgrf_offset, | ||
| PaletteID | default_palette, | ||
| bool | child_offset_is_unsigned | ||
| ) |
Draws a tile sprite sequence.
| ti | The tile to draw on |
| dts | Sprite and subsprites to draw |
| to | The transparency bit that toggles drawing of these sprites |
| orig_offset | Sprite-Offset for original sprites |
| newgrf_offset | Sprite-Offset for NewGRF defined sprites |
| default_palette | The default recolour sprite to use (typically company colour) |
| child_offset_is_unsigned | Whether child sprite offsets are interpreted signed or unsigned |
Definition at line 30 of file sprite.cpp.
References AddChildSpriteScreen(), AddSortableSpriteToDraw(), DrawGroundSprite(), GB(), HasBit(), IsInvisibilitySet(), IsTransparencySet(), PALETTE_MODIFIER_TRANSPARENT, PALETTE_TO_TRANSPARENT, SetBit(), SPRITE_MODIFIER_CUSTOM_SPRITE, SPRITE_MODIFIER_OPAQUE, SPRITE_WIDTH, and SpriteLayoutPaletteTransform().
Referenced by DrawNewGRFTileSeq(), DrawOrigTileSeq(), and DrawRailTileSeq().
| void DrawCommonTileSeqInGUI | ( | int | x, |
| int | y, | ||
| const DrawTileSprites * | dts, | ||
| int32_t | orig_offset, | ||
| uint32_t | newgrf_offset, | ||
| PaletteID | default_palette, | ||
| bool | child_offset_is_unsigned | ||
| ) |
Draws a tile sprite sequence in the GUI.
| x | X position to draw to |
| y | Y position to draw to |
| dts | Sprite and subsprites to draw |
| orig_offset | Sprite-Offset for original sprites |
| newgrf_offset | Sprite-Offset for NewGRF defined sprites |
| default_palette | The default recolour sprite to use (typically company colour) |
| child_offset_is_unsigned | Whether child sprite offsets are interpreted signed or unsigned |
Definition at line 86 of file sprite.cpp.
References DrawSprite(), GB(), HasBit(), Normal, RemapCoords(), ScaleSpriteTrad(), SPRITE_MASK, SPRITE_MODIFIER_CUSTOM_SPRITE, SPRITE_WIDTH, SpriteLayoutPaletteTransform(), UnScaleGUI(), Coord2D< T >::x, Sprite::x_offs, Coord2D< T >::y, and Sprite::y_offs.
Referenced by DrawNewGRFTileSeqInGUI(), DrawOrigTileSeqInGUI(), DrawRailTileSeqInGUI(), and DrawRoadStopTile().