summaryrefslogtreecommitdiff
path: root/ttd.h
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-09-06 18:15:13 +0000
committerdarkvater <darkvater@openttd.org>2004-09-06 18:15:13 +0000
commitbf0652d3fce57024fe56f75d43898a261fea7570 (patch)
treeff59ad94248c5c270741fe954c139e1f953b197c /ttd.h
parentdf1397a47e68cf07d0a0d4fe02758f4b4f8c469f (diff)
downloadopenttd-bf0652d3fce57024fe56f75d43898a261fea7570.tar.xz
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
-Fix: Sorter icon pointing down 'v' sorts in every window lowest value first, '^' highest value first -CodeChange: move Dropdownlist from settings_gui.c to widget.c. More in place there.
Diffstat (limited to 'ttd.h')
-rw-r--r--ttd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ttd.h b/ttd.h
index 1f0dd3752..ab4ffa391 100644
--- a/ttd.h
+++ b/ttd.h
@@ -32,6 +32,16 @@ typedef struct YearMonthDay {
int year, month, day;
} YearMonthDay;
+/* --- 1 Day is 74 ticks ---
+* The game's internal structure is dictated by ticks. The date counter (date_fract) is an integer of
+* uint16 type, so it can have a max value of 65536. Every tick this variable (date_fract) is
+* increased by 885. When it overflows, the new day loop is called.
+* * this that means 1 day is : 65536 / 885 = 74 ticks
+* * 1 tick is approximately 27ms.
+* * 1 day is thus about 2 seconds (74*27 = 1998) on a machine that can run OpenTTD normally
+*/
+#define DAY_TICKS 74
+
#include "macros.h"
// Forward declarations of structs.