diff --git a/table/sprites.h b/table/sprites.h --- a/table/sprites.h +++ b/table/sprites.h @@ -3,23 +3,25 @@ #ifndef SPRITES_H #define SPRITES_H -/* NOTE: +/** @file sprites.h + This file contails 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. + +@NOTE: ALL SPRITE NUMBERS BELOW 5126 are in the main files SPR_CANALS_BASE is in canalsw.grf SPR_SLOPES_BASE is in trkfoundw.grf SPR_OPENTTD_BASE is in openttd.grf -*/ -/* 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 abbrevations when their meaning is clear or @@ -29,6 +31,8 @@ 30 characters in length. If your editor doen'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. + + @todo Split the "Sprites" enum into smaller chunks and document them */ @@ -869,7 +873,7 @@ enum Sprites { SPR_IMG_REMOVE = 714 }; -/* Cursor sprite numbers */ +/** Cursor sprite numbers */ typedef enum CursorSprites { /* Terraform */ /* Cursors */ @@ -940,85 +944,127 @@ typedef enum CursorSprites { SPR_CURSOR_ROAD_TUNNEL = 2433, } CursorSprite; -// Animation macro in table/animcursors.h (_animcursors[]) +/// Animation macro in table/animcursors.h (_animcursors[]) enum AnimCursors { - ANIMCURSOR_DEMOLISH = -1, // 704 - 707 - demolish dynamite - ANIMCURSOR_LOWERLAND = -2, // 699 - 701 - lower land tool - ANIMCURSOR_RAISELAND = -3, // 696 - 698 - raise land tool - ANIMCURSOR_PICKSTATION = -4, // 716 - 718 - goto-order icon - ANIMCURSOR_BUILDSIGNALS = -5, // 1292 - 1293 - build signal + ANIMCURSOR_DEMOLISH = -1, ///< 704 - 707 - demolish dynamite + ANIMCURSOR_LOWERLAND = -2, ///< 699 - 701 - lower land tool + ANIMCURSOR_RAISELAND = -3, ///< 696 - 698 - raise land tool + ANIMCURSOR_PICKSTATION = -4, ///< 716 - 718 - goto-order icon + ANIMCURSOR_BUILDSIGNALS = -5, ///< 1292 - 1293 - build signal +}; + +/** + * Bitmask setup. For the graphics system, 32 bits are used to define + * the sprite to be displayed. This variable contains various information:

+ *