summaryrefslogtreecommitdiff
path: root/window.h
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-09-24 15:01:02 +0000
committerbjarni <bjarni@openttd.org>2006-09-24 15:01:02 +0000
commitb0101164e403947b3c676df45921413a69685df3 (patch)
tree680aa98cd17642b6eb9f646e79fac71932347f3c /window.h
parent98ba395277708f1e1fbddacee1f909fac366e96c (diff)
downloadopenttd-b0101164e403947b3c676df45921413a69685df3.tar.xz
(svn r6503) -Codechange: added a function to tell what vehicles a depot contains
This will ensure that you can always get the same list when checking for vehicles in a depot (no need to duplicate code for each place, that needs such a list) Since the vehicles are only looped once for each redraw, drawing speed is around twice as fast (measured to be 114%-121% faster depending on the number of vehicles in the game)
Diffstat (limited to 'window.h')
-rw-r--r--window.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/window.h b/window.h
index 5bb36158d..0ac18b70a 100644
--- a/window.h
+++ b/window.h
@@ -394,6 +394,12 @@ assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(replaceveh_d));
typedef struct {
VehicleID sel;
+ uint16 engine_list_length;
+ uint16 wagon_list_length;
+ uint16 engine_count;
+ uint16 wagon_count;
+ Vehicle **vehicle_list;
+ Vehicle **wagon_list;
} traindepot_d;
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(traindepot_d));