(svn r27628) -Codechange: Prepare for drawing cursors consisting of multiple sprites.

This commit is contained in:
frosch
2016-08-15 18:33:08 +00:00
parent 2337d169e8
commit 0e3e4eeb53
5 changed files with 74 additions and 50 deletions

View File

@@ -127,9 +127,11 @@ struct CursorVars {
int h_wheel;
/* Mouse appearance */
CursorID sprite; ///< current image of cursor
PaletteID pal;
Point size, offs; ///< sprite properties
PalSpriteID sprite_seq[16]; ///< current image of cursor
Point sprite_pos[16]; ///< relative position of individual sprites
uint sprite_count; ///< number of sprites to draw
Point total_offs, total_size; ///< union of sprite properties
Point draw_pos, draw_size; ///< position and size bounding-box for drawing
const AnimCursor *animate_list; ///< in case of animated cursor, list of frames
@@ -141,7 +143,6 @@ struct CursorVars {
bool in_window; ///< mouse inside this window, determines drawing logic
/* Drag data */
int short_vehicle_offset; ///< offset of the X for short vehicles
bool vehchain; ///< vehicle chain is dragged
bool UpdateCursorPosition(int x, int y, bool queued_warp);