(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)
This commit is contained in:
6
window.h
6
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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user