mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-03 11:59:15 +00:00
(svn r10343) -Cleanup: Add documentation of functions and code-style fix.
Thanks of 45 degree patch for bringing it up
This commit is contained in:
@@ -649,6 +649,10 @@ static const int _AutorailType[6][2] = {
|
|||||||
|
|
||||||
#include "table/autorail.h"
|
#include "table/autorail.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the specified tile is selected and if so draws selection using correct selectionstyle.
|
||||||
|
* @param *ti TileInfo Tile that is being drawn
|
||||||
|
*/
|
||||||
static void DrawTileSelection(const TileInfo *ti)
|
static void DrawTileSelection(const TileInfo *ti)
|
||||||
{
|
{
|
||||||
SpriteID image;
|
SpriteID image;
|
||||||
@@ -1930,7 +1934,14 @@ static byte GetAutorailHT(int x, int y)
|
|||||||
return HT_RAIL | _AutorailPiece[x & 0xF][y & 0xF];
|
return HT_RAIL | _AutorailPiece[x & 0xF][y & 0xF];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** called regular to update tile highlighting in all cases */
|
/**
|
||||||
|
* Updates tile highlighting for all cases.
|
||||||
|
* Uses _thd.selstart and _thd.selend and _thd.place_mode (set elsewhere) to determine _thd.pos and _thd.size
|
||||||
|
* Also drawstyle is determined. Uses _thd.new.* as a buffer and calls SetSelectionTilesDirty() twice,
|
||||||
|
* Once for the old and once for the new selection.
|
||||||
|
* _thd is TileHighlightData, found in viewport.h
|
||||||
|
* Called by MouseLoop() in windows.cpp
|
||||||
|
*/
|
||||||
void UpdateTileSelection()
|
void UpdateTileSelection()
|
||||||
{
|
{
|
||||||
int x1;
|
int x1;
|
||||||
|
Reference in New Issue
Block a user