OpenTTD Source 20241224-master-gee860a5c8e
|
This file contains all sprite-related enums and defines. More...
#include "../gfx_type.h"
Go to the source code of this file.
This file contains all sprite-related enums and defines.
These consist mainly of the sprite numbers and a bunch of masks and macros to handle sprites and to get rid of all the magic numbers in the code.
All elements which consist of two elements should have the same name and then suffixes _GROUND and _BUILD for building-type sprites _REAR and _FRONT for transport-type sprites (tiles where vehicles are on) These sprites are split because of the Z order of the elements (like some parts of a bridge are behind the vehicle, while others are before)
All sprites which are described here are referenced only one to a handful of times throughout the code. When introducing new sprite enums, use meaningful names. Don't be lazy and typing, and only use abbreviations when their meaning is clear or the length of the enum would get out of hand. In that case EXPLAIN THE ABBREVIATION IN THIS FILE, and perhaps add some comments in the code where it is used. Now, don't whine about this being too much typing work if the enums are like 30 characters in length. If your editor doesn't help you simplifying your work, get a proper editor. If your Operating Systems don't have any decent editors, get a proper Operating System.
Definition in file sprites.h.
|
static |
1292 - 1293 - build signal
Definition at line 1512 of file sprites.h.
Referenced by BuildRailToolbarWindow::OnClick().
|
static |
704 - 707 - demolish dynamite
Definition at line 1508 of file sprites.h.
Referenced by BuildAirToolbarWindow::OnClick(), BuildDocksToolbarWindow::OnClick(), BuildRailToolbarWindow::OnClick(), BuildRoadToolbarWindow::OnClick(), TerraformToolbarWindow::OnClick(), and ScenarioEditorLandscapeGenerationWindow::OnClick().
|
static |
Flag for saying a cursor sprite is an animated cursor.
Definition at line 1507 of file sprites.h.
Referenced by SetObjectToPlace().
|
static |
699 - 701 - lower land tool
Definition at line 1509 of file sprites.h.
Referenced by TerraformToolbarWindow::OnClick(), and ScenarioEditorLandscapeGenerationWindow::OnClick().
|
static |
716 - 718 - goto-order icon
Definition at line 1511 of file sprites.h.
Referenced by OrdersWindow::OrderClick_Goto().
|
static |
696 - 698 - raise land tool
Definition at line 1510 of file sprites.h.
Referenced by TerraformToolbarWindow::OnClick(), and ScenarioEditorLandscapeGenerationWindow::OnClick().
|
staticconstexpr |
|
staticconstexpr |
Masks needed for sprite operations.
Definition at line 1555 of file sprites.h.
Referenced by AddChildSpriteScreen(), AddSortableSpriteToDraw(), AddTileSpriteToDraw(), LoadGrfFile(), and LoadNextSprite().
|
static |
|
static |
Exchange any color by black, needed for painting fictive tiles outside map.
Definition at line 1611 of file sprites.h.
Referenced by DrawCargoIconOverlay(), and GetBlitterMode().
|
static |
|
static |
|
static |
Recolour sprite greying of crashed vehicles.
Definition at line 1605 of file sprites.h.
Referenced by DoDrawVehicle(), DrawAircraftImage(), DrawBridgeMiddle(), DrawEngineList(), VehicleGroupWindow::DrawGroupInfo(), DrawRoadVehEngine(), DrawRoadVehImage(), DrawTile_Road(), DrawTile_TunnelBridge(), DrawTrackBits(), DrawTrainDetails(), DrawTrainImage(), GetBlitterMode(), HighlightTownLocalAuthorityTiles(), OpenGLBackend::RenderOglSprite(), and SetMouseCursorVehicle().
|
staticconstexpr |
|
staticconstexpr |
this bit is set when a recolouring process is in action
Definition at line 1548 of file sprites.h.
Referenced by GroundSpritePaletteTransform(), MapSpriteMappingRecolour(), and SpriteLayoutPaletteTransform().
|
staticconstexpr |
when a sprite is to be displayed transparently, this bit needs to be set.
Definition at line 1547 of file sprites.h.
Referenced by AddChildSpriteScreen(), AddSortableSpriteToDraw(), DrawCommonTileSeq(), DrawSprite(), DrawSpriteViewport(), MapSpriteMappingRecolour(), and SpriteLayoutPaletteTransform().
|
static |
Recolour sprite for newspaper-greying.
Definition at line 1604 of file sprites.h.
Referenced by NWidgetViewport::Draw(), Blitter_32bppAnim::DrawColourMappingRect(), Blitter_32bppSimple::DrawColourMappingRect(), Blitter_40bppAnim::DrawColourMappingRect(), and NewsWindow::DrawWidget().
|
static |
First recolour sprite for company colours.
Definition at line 1574 of file sprites.h.
Referenced by DrawNewObjectTileInGUI(), and DrawTileLayout().
|
static |
This draws a blueish square (catchment areas for example)
Definition at line 1571 of file sprites.h.
Referenced by DrawTileHighlightType(), and DrawTileSelection().
|
static |
makes a square red. is used when removing rails or other stuff
Definition at line 1570 of file sprites.h.
Referenced by DrawAutorailSelection(), DrawTileHighlightType(), and DrawTileSelection().
|
staticconstexpr |
Set if palette is actually a magic text recolour.
Definition at line 1532 of file sprites.h.
Referenced by DrawCloseBox(), DrawSprite(), and DrawSpriteViewport().
|
static |
pulsating red tile drawn if you try to build a wrong tunnel or raise/lower land where it is not possible
Definition at line 1569 of file sprites.h.
Referenced by DrawTileSelection().
|
static |
sets colour to bare land stuff for rail, road and crossings
Definition at line 1593 of file sprites.h.
Referenced by DrawTile_Road(), DrawTrackBits(), and GetRoadGroundSprite().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
This sets the sprite to transparent.
Definition at line 1602 of file sprites.h.
Referenced by AddChildSpriteScreen(), AddSortableSpriteToDraw(), NWidgetViewport::Draw(), Blitter_32bppAnim::DrawColourMappingRect(), Blitter_32bppSimple::DrawColourMappingRect(), Blitter_40bppAnim::DrawColourMappingRect(), DrawCommonTileSeq(), DrawFrameRect(), DrawSprite(), DrawSpriteViewport(), and NetworkDrawChatMessage().
|
staticconstexpr |
number of bits of the sprite containing the recolour palette
Definition at line 1534 of file sprites.h.
Referenced by DrawSprite(), DrawSpriteViewport(), GfxFillPolygon(), GfxFillRect(), and OpenGLBackend::RenderOglSprite().
|
static |
|
static |
|
staticconstexpr |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Animation macro in table/animcursors.h (_animcursors[])
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Cursor sprite numbers.
Definition at line 1390 of file sprites.h.
Referenced by DepotWindow::DepotClick(), GfxBlitter(), VehicleGroupWindow::OnClick(), NewGRFWindow::OnClick(), OrdersWindow::OnClick(), RefitWindow::OnClick(), ResetObjectToPlace(), and SetMouseCursorBusy().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Extra graphic spritenumbers.
Definition at line 56 of file sprites.h.
Referenced by SpriteAlignerWindow::SetStringParameters().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Tunnel sprites with grass only for custom railtype tunnel.
Definition at line 299 of file sprites.h.
Referenced by DrawTile_TunnelBridge().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
shore tiles - action 05-0D
Definition at line 224 of file sprites.h.
Referenced by ActivateOldShore().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Tramway sprites.
Definition at line 272 of file sprites.h.
Referenced by DrawRoadTypeCatenary(), and GetBridgeRoadCatenary().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticconstexpr |
The mask to for the main sprite.
Definition at line 1556 of file sprites.h.
Referenced by AddChildSpriteScreen(), AddCombinedSprite(), AddSortableSpriteToDraw(), AddTileSpriteToDraw(), DrawBridgeMiddle(), and DrawCommonTileSeqInGUI().
|
staticconstexpr |
these masks change the colours of the palette for a sprite.
Apart from this bit, a sprite number is needed to define the palette used for recolouring. This palette is stored in the bits marked by PALETTE_SPRITE_MASK.
Definition at line 1545 of file sprites.h.
Referenced by DrawCommonTileSeq(), DrawCommonTileSeqInGUI(), DrawNewHouseTileInGUI(), DrawStationTile(), NewGRFSpriteLayout::PrepareLayout(), NewGRFSpriteLayout::ProcessRegisters(), and ReadSpriteLayoutSprite().
|
staticconstexpr |
Set when a sprite must not ever be displayed transparently.
Definition at line 1546 of file sprites.h.
Referenced by DrawCommonTileSeq(), and MapSpriteMappingRecolour().
|
staticconstexpr |
number of bits for the sprite number
Definition at line 1535 of file sprites.h.
Referenced by DrawCommonTileSeq(), DrawCommonTileSeqInGUI(), DrawNewHouseTileInGUI(), DrawNewObjectTileInGUI(), DrawRoadStopTile(), DrawSprite(), DrawSpriteToRgbaBuffer(), DrawSpriteViewport(), DrawTileLayout(), ReadSpriteLayoutSprite(), and UpdateCursorSize().
|
staticconstexpr |
Bitmask setup.
For the graphics system, 32 bits are used to define the sprite to be displayed. This variable contains various information:
toggles transparency in the sprite