summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/autoreplace_gui.cpp10
-rw-r--r--src/gfx_func.h7
-rw-r--r--src/gfx_type.h4
3 files changed, 14 insertions, 7 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index deadcdd0a..29bf638e8 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -105,11 +105,11 @@ class ReplaceVehicleWindow : public Window {
GroupID sel_group;
static RailType sel_railtype;
- /** Figure out if an engine should be added to a list
- * @param e The EngineID
- * @param draw_left If true, then the left list is drawn (the engines specific to the railtype you selected)
- * @param show_engines if truem then locomotives are drawn, else wagons (never both)
- * @return true if the engine should be in the list (based on this check)
+ /** Figure out if an engine should be added to a list.
+ * @param e The EngineID.
+ * @param draw_left If \c true, the the left list is drawn (the engines specific to the railtype you selected).
+ * @param show_engines If \c true, the locomotives are drawn, else the wagons are drawn (never both).
+ * @return \c true if the engine should be in the list (based on this check), else \c false.
*/
bool GenerateReplaceRailList(EngineID e, bool draw_left, bool show_engines)
{
diff --git a/src/gfx_func.h b/src/gfx_func.h
index dd7693f93..70286ee69 100644
--- a/src/gfx_func.h
+++ b/src/gfx_func.h
@@ -146,7 +146,7 @@ void SortResolutions(int count);
bool ToggleFullScreen(bool fs);
/* gfx.cpp */
-extern FontSize _cur_fontsize;
+extern FontSize _cur_fontsize; ///< Currently selected font.
byte GetCharacterWidth(FontSize size, uint32 key);
@@ -162,8 +162,13 @@ static inline byte GetCharacterHeight(FontSize size)
return _font_height[size];
}
+/** Height of characters in the small (#FS_SMALL) font. */
#define FONT_HEIGHT_SMALL (GetCharacterHeight(FS_SMALL))
+
+/** Height of characters in the normal (#FS_NORMAL) font. */
#define FONT_HEIGHT_NORMAL (GetCharacterHeight(FS_NORMAL))
+
+/** Height of characters in the large (#FS_LARGE) font. */
#define FONT_HEIGHT_LARGE (GetCharacterHeight(FS_LARGE))
extern DrawPixelInfo *_cur_dpi;
diff --git a/src/gfx_type.h b/src/gfx_type.h
index 569c78214..7796d19e0 100644
--- a/src/gfx_type.h
+++ b/src/gfx_type.h
@@ -129,6 +129,7 @@ struct CursorVars {
bool vehchain; ///< vehicle chain is dragged
};
+/** Data about how and where to blit pixels. */
struct DrawPixelInfo {
void *dst_ptr;
int left, top, width, height;
@@ -136,6 +137,7 @@ struct DrawPixelInfo {
ZoomLevel zoom;
};
+/** Structure to access the alpha, red, green, and blue channels from a 32 bit number. */
struct Colour {
#if TTD_ENDIAN == TTD_BIG_ENDIAN
uint8 a, r, g, b; ///< colour channels in BE order
@@ -143,7 +145,7 @@ struct Colour {
uint8 b, g, r, a; ///< colour channels in LE order
#endif /* TTD_ENDIAN == TTD_BIG_ENDIAN */
- operator uint32 () const { return *(uint32 *)this; }
+ operator uint32 () const { return *(uint32 *)this; } ///< Conversion of the channel information to a 32 bit number.
};
/** Available font sizes */