summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-04 11:32:26 +0000
committerrubidium <rubidium@openttd.org>2009-01-04 11:32:26 +0000
commit702c372744d1fbcd0ef2dbc10c00634c40ababe0 (patch)
treea15810f96d272ba6dab7e7a438135dea982a6a6e
parent2a47aaf4a8d2dbee8c7c194c33035028583a2c5d (diff)
downloadopenttd-702c372744d1fbcd0ef2dbc10c00634c40ababe0.tar.xz
(svn r14823) -Document: some variables/structs (Alberth)
-rw-r--r--src/date.cpp6
-rw-r--r--src/date_type.h10
-rw-r--r--src/industry_cmd.cpp4
3 files changed, 12 insertions, 8 deletions
diff --git a/src/date.cpp b/src/date.cpp
index 5827cbc05..d20665f86 100644
--- a/src/date.cpp
+++ b/src/date.cpp
@@ -17,9 +17,9 @@
#include "rail_gui.h"
#include "saveload.h"
-Year _cur_year;
-Month _cur_month;
-Date _date;
+Year _cur_year; ///< Current year, starting at 0
+Month _cur_month; ///< Current month (0..11)
+Date _date; ///< Current date in days (day counter)
DateFract _date_fract;
diff --git a/src/date_type.h b/src/date_type.h
index 49b006c60..67122b0b1 100644
--- a/src/date_type.h
+++ b/src/date_type.h
@@ -46,10 +46,14 @@ typedef int32 Year;
typedef uint8 Month;
typedef uint8 Day;
+/**
+ * Data structure to convert between Date and triplet (year, month, and day).
+ * @see ConvertDateToYMD(), ConvertYMDToDate()
+ */
struct YearMonthDay {
- Year year;
- Month month; ///< 0 - 11
- Day day; ///< 1 - 31
+ Year year; ///< Year (0...)
+ Month month; ///< Month (0..11)
+ Day day; ///< Day (1..31)
};
static const Year INVALID_YEAR = -1;
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index d13cf5132..e9e4e68d4 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -52,8 +52,8 @@ void BuildOilRig(TileIndex tile);
static byte _industry_sound_ctr;
static TileIndex _industry_sound_tile;
-int _total_industries; //general counter
-uint16 _industry_counts[NUM_INDUSTRYTYPES]; // Number of industries per type ingame
+int _total_industries; ///< General counter
+uint16 _industry_counts[NUM_INDUSTRYTYPES]; ///< Number of industries per type ingame
IndustrySpec _industry_specs[NUM_INDUSTRYTYPES];
IndustryTileSpec _industry_tile_specs[NUM_INDUSTRYTILES];