rubidium
b04ba7dcea
(svn r16922) -Codechange: unduplicate some vehicle CMD_*s and move the setting of the error message to a single place
15 years ago
rubidium
01eabc5f4c
(svn r16921) -Codechange: make it more clear what strings are related to road vehicles; only ROAD isn't always enough. Also unify the way of writing it.
15 years ago
rubidium
9980af2898
(svn r16921) -Codechange: make it more clear what strings are related to road vehicles; only ROAD isn't always enough. Also unify the way of writing it.
15 years ago
rubidium
04ee98df52
(svn r16920) -Codechange: shuffle some strings around to simplify looking up vehicle type specific strings for a specific message
15 years ago
rubidium
2962d8f0fc
(svn r16920) -Codechange: shuffle some strings around to simplify looking up vehicle type specific strings for a specific message
15 years ago
rubidium
49fcb20a91
(svn r16919) -Codechange: unify some more StringID w.r.t. their naming
15 years ago
rubidium
c17c31b5b6
(svn r16919) -Codechange: unify some more StringID w.r.t. their naming
15 years ago
smatz
cb13cf2543
(svn r16852) -Codechange: use FOR_ALL_CARGOSPECS for iterating over all valid CargoSpecs
15 years ago
smatz
77d13eae61
(svn r16852) -Codechange: use FOR_ALL_CARGOSPECS for iterating over all valid CargoSpecs
15 years ago
smatz
8718babe90
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
15 years ago
smatz
1f29e38b83
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
15 years ago
alberth
fe9f5cbc46
(svn r16845) -Codechange: Introduction of constants for describing the bits in a WWT_MATRIX data field.
15 years ago
alberth
d0a47fc1b4
(svn r16845) -Codechange: Introduction of constants for describing the bits in a WWT_MATRIX data field.
15 years ago
frosch
ce55eda3e1
(svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a CargoArray instead of a pointer to a static array.
15 years ago
frosch
1e09854cb7
(svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a CargoArray instead of a pointer to a static array.
15 years ago
yexo
a52f5c45e6
(svn r16648) -Codechange: move some more includes around
16 years ago
yexo
8bc9adde19
(svn r16648) -Codechange: move some more includes around
16 years ago
yexo
b00726a5d2
(svn r16647) -Codechange: remove newgrf.h include from newgrf_engine.h to prevent unnecessary inclusion newgrf.h anyway
16 years ago
yexo
44c15e4196
(svn r16647) -Codechange: remove newgrf.h include from newgrf_engine.h to prevent unnecessary inclusion newgrf.h anyway
16 years ago
smatz
f6a4d61cca
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
16 years ago
smatz
8343340acb
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
16 years ago
rubidium
8ca2ccc456
(svn r16581) -Codechange: unify the access to Engine::lifelength.
16 years ago
rubidium
512b021e26
(svn r16581) -Codechange: unify the access to Engine::lifelength.
16 years ago
frosch
6478025c7d
(svn r16386) -Codechange: Move ShowAdditionalText() to build_vehicle_gui and make it static.
16 years ago
frosch
09d64ff79d
(svn r16386) -Codechange: Move ShowAdditionalText() to build_vehicle_gui and make it static.
16 years ago
smatz
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
smatz
6221d74644
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
rubidium
650cb3694e
(svn r16160) -Codechange: remove the need for explicit TC_FROMSTRING for DrawString.
16 years ago
rubidium
53887e07bb
(svn r16160) -Codechange: remove the need for explicit TC_FROMSTRING for DrawString.
16 years ago
rubidium
5c5b357043
(svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible.
16 years ago
rubidium
59d45a04d6
(svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible.
16 years ago
frosch
4a2d2ccdc6
(svn r16110) -Codechange: use {CARGO} instead hardcoded cargo name (there is always something duplicated :p)
16 years ago
frosch
d338fff1b9
(svn r16110) -Codechange: use {CARGO} instead hardcoded cargo name (there is always something duplicated :p)
16 years ago
frosch
4c5ebce0bb
(svn r16044) -Fix (r16042): Win compilation. (Swallow)
16 years ago
frosch
f46f8bd427
(svn r16044) -Fix (r16042): Win compilation. (Swallow)
16 years ago
frosch
0d2d51f708
(svn r16042) -Feature [FS#1941]: Allow filtering of vehicle purchase lists by cargo. Based on patch by sbr.
16 years ago
frosch
6ebe8d7fc6
(svn r16042) -Feature [FS#1941]: Allow filtering of vehicle purchase lists by cargo. Based on patch by sbr.
16 years ago
frosch
d511a82d09
(svn r16038) -Codechange: Remove BuildVehicleWindow::regenerate_list in favor of the GUIList flag.
16 years ago
frosch
07a5f529bf
(svn r16038) -Codechange: Remove BuildVehicleWindow::regenerate_list in favor of the GUIList flag.
16 years ago
alberth
bbd546b792
(svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback
16 years ago
alberth
9d2738b9c4
(svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback
16 years ago
rubidium
003024cc21
(svn r15850) -Codechange: replace some magic constants with the less magic line height constant
16 years ago
rubidium
89ceed55bf
(svn r15850) -Codechange: replace some magic constants with the less magic line height constant
16 years ago
alberth
8f5f39cf09
(svn r15820) -Codechange: Some windows using nested widgets
16 years ago
alberth
6567a29e18
(svn r15820) -Codechange: Some windows using nested widgets
16 years ago
alberth
a079bf0a1f
(svn r15809) -Codechange: Add name comments to build vehicle widgets
16 years ago
alberth
3b2f47c470
(svn r15809) -Codechange: Add name comments to build vehicle widgets
16 years ago
rubidium
64e7ab4025
(svn r15807) -Codechange: let the build vehicle gui helper function pass around left and right instead of only left and assuming infinite width.
16 years ago
rubidium
dfe5dad5f6
(svn r15807) -Codechange: let the build vehicle gui helper function pass around left and right instead of only left and assuming infinite width.
16 years ago
rubidium
c1aabd9842
(svn r15785) -Codechange: remove the *Truncated part of the old text drawing API.
16 years ago
rubidium
45f189fdca
(svn r15785) -Codechange: remove the *Truncated part of the old text drawing API.
16 years ago
rubidium
34eb5364bb
(svn r15778) -Fix [FS#2749] (r15666): when sorting on cost don't sort on the running cost (sbr)
16 years ago
rubidium
529dd0867f
(svn r15778) -Fix [FS#2749] (r15666): when sorting on cost don't sort on the running cost (sbr)
16 years ago
frosch
c297a99eff
(svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere.
16 years ago
frosch
6dd04a9a78
(svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere.
16 years ago
rubidium
7f468dc142
(svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth)
16 years ago
rubidium
f9def73be6
(svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth)
16 years ago
rubidium
f3e0fd7416
(svn r15711) -Codechange: lots of whitespace cleanup/fixes
16 years ago
rubidium
9d018723b7
(svn r15711) -Codechange: lots of whitespace cleanup/fixes
16 years ago
frosch
f35e00844c
(svn r15705) -Fix: Do not show passenger-/mail-capacity if the aircraft carries only cargo.
16 years ago
frosch
fa35dc10e5
(svn r15705) -Fix: Do not show passenger-/mail-capacity if the aircraft carries only cargo.
16 years ago
rubidium
0aeed2b96a
(svn r15666) -Fix [FS#2689]: sorting of engines in the purchase list didn't use the same numbers as the GUI showed, e.g. articulated parts weren't taken into accound when ordering by capacity.
16 years ago
rubidium
fa78027ffd
(svn r15666) -Fix [FS#2689]: sorting of engines in the purchase list didn't use the same numbers as the GUI showed, e.g. articulated parts weren't taken into accound when ordering by capacity.
16 years ago
frosch
da78726e0c
(svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part.
16 years ago
frosch
e01106f66b
(svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part.
16 years ago
frosch
abe4692da2
(svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, which cannot accept CT_INVALID.
...
-Codechange: Add Engine::GetDefaultCargoType() and Engine::CanCarryCargo() and use them.
-Fix [FS#2617]: When articulated parts have no available default cargo, use the cargo type of the first part for livery selection.
-Change: To decide whether a vehicle is refittable do not test its current capacity for being zero, but always use the 'capacity property'.
Note: The property is used unmodifed without calling CB 15/36. By setting it to a non-zero value and returning zero in the callback vehicles can be refitted to/from zero capacity for e.g. livery effects.
Note: It is intentional that you cannot control refittability by CB 36.
16 years ago
frosch
d3850e101c
(svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, which cannot accept CT_INVALID.
...
-Codechange: Add Engine::GetDefaultCargoType() and Engine::CanCarryCargo() and use them.
-Fix [FS#2617]: When articulated parts have no available default cargo, use the cargo type of the first part for livery selection.
-Change: To decide whether a vehicle is refittable do not test its current capacity for being zero, but always use the 'capacity property'.
Note: The property is used unmodifed without calling CB 15/36. By setting it to a non-zero value and returning zero in the callback vehicles can be refitted to/from zero capacity for e.g. livery effects.
Note: It is intentional that you cannot control refittability by CB 36.
16 years ago
rubidium
02c52430c8
(svn r15521) -Codechange: add helper function to get the display tractive effort of a vehicle.
16 years ago
rubidium
a5f30dd553
(svn r15521) -Codechange: add helper function to get the display tractive effort of a vehicle.
16 years ago
rubidium
c7f3daacbf
(svn r15427) -Codechange: give w->caption_color a more sensible name as it holds the owner of whatever is shown in the window
16 years ago
rubidium
90e2465d7d
(svn r15427) -Codechange: give w->caption_color a more sensible name as it holds the owner of whatever is shown in the window
16 years ago
rubidium
42fe0b65d2
(svn r15338) -Fix [FS#2598]: close all construction related windows whenever changing company.
16 years ago
rubidium
ac7757324e
(svn r15338) -Fix [FS#2598]: close all construction related windows whenever changing company.
16 years ago
frosch
9c2ba4f96a
(svn r15306) -Codechange: Deduplicate code by adding Engine::GetDisplayMaxSpeed(), GetPower() and GetDisplayWeight(). (and using them)
16 years ago
frosch
c28c4c1986
(svn r15306) -Codechange: Deduplicate code by adding Engine::GetDisplayMaxSpeed(), GetPower() and GetDisplayWeight(). (and using them)
16 years ago
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
smatz
0d3f5e6e74
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
glx
470da22ac3
(svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication.
16 years ago
glx
c1cf3934fa
(svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication.
16 years ago
glx
9b73303b4d
(svn r15261) -Add: added Engine::GetRunningCost() to remove some code duplication. Also stops AIs decrementing vehicle counter of first company
16 years ago
glx
e8b5f49861
(svn r15261) -Add: added Engine::GetRunningCost() to remove some code duplication. Also stops AIs decrementing vehicle counter of first company
16 years ago
peter1138
598fdab47e
(svn r15236) -Codechange: Rename realistic_acceleration patch option to train_acceleration_model, and change from boolean to value. Don't forget to update your settings.
16 years ago
peter1138
3d404c2927
(svn r15236) -Codechange: Rename realistic_acceleration patch option to train_acceleration_model, and change from boolean to value. Don't forget to update your settings.
16 years ago
rubidium
de9b394557
(svn r14953) -Fix (r14952): the "available aircraft" list caused a crash
16 years ago
rubidium
c8f3630e64
(svn r14953) -Fix (r14952): the "available aircraft" list caused a crash
16 years ago
rubidium
0543f50181
(svn r14952) -Codechange: unify the "can vehicle go to station" tests
16 years ago
rubidium
3d6c09b38d
(svn r14952) -Codechange: unify the "can vehicle go to station" tests
16 years ago
smatz
b00e510140
(svn r14807) -Codechange: use INVALID_TILE instead of 0 to mark invalid depots, industries, towns and waypoints
16 years ago
smatz
254e19da91
(svn r14807) -Codechange: use INVALID_TILE instead of 0 to mark invalid depots, industries, towns and waypoints
16 years ago
rubidium
e83cca7d13
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
16 years ago
rubidium
87e5a8b52b
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
16 years ago
rubidium
2e916a154f
(svn r14683) -Change: only say a engine/vehicle is refittable when it can be refitted to at least two cargo type or when it has subcargos.
...
NOTE: it is still possible that a vehicle is marked refittable when there is nothing to refit to, e.g. when only one subcargo is available but that cannot be determined without a vehicle chain.
16 years ago
rubidium
c7c65cf5bc
(svn r14683) -Change: only say a engine/vehicle is refittable when it can be refitted to at least two cargo type or when it has subcargos.
...
NOTE: it is still possible that a vehicle is marked refittable when there is nothing to refit to, e.g. when only one subcargo is available but that cannot be determined without a vehicle chain.
16 years ago
rubidium
e589c7e580
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
16 years ago
rubidium
b650a86e58
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
16 years ago
rubidium
f56e630e5c
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
16 years ago
rubidium
3b798599b6
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
16 years ago
smatz
e543181b12
(svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies)
16 years ago
smatz
1266b1a73f
(svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies)
16 years ago
smatz
ffa39caf3d
(svn r14331) -Codechange: use an enum as additional parameter for ShowQueryString()
16 years ago
smatz
606f4defdc
(svn r14331) -Codechange: use an enum as additional parameter for ShowQueryString()
16 years ago
frosch
bce424a4aa
(svn r14239) -Fix [FS#2267]: The engine-purchase-list-sorter doubled running-cost and halfed capacity of double-headed engines.
16 years ago
frosch
e6688ab190
(svn r14239) -Fix [FS#2267]: The engine-purchase-list-sorter doubled running-cost and halfed capacity of double-headed engines.
16 years ago
peter1138
6261063689
(svn r14157) -Codechange: Add and use string properties for rail types instead of relying on consecutive string IDs.
16 years ago
peter1138
ff07598ce2
(svn r14157) -Codechange: Add and use string properties for rail types instead of relying on consecutive string IDs.
16 years ago
peter1138
550fc3a3f5
(svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is.
16 years ago
peter1138
9d0e1b635a
(svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is.
16 years ago
rubidium
c816cc37fd
(svn r14063) -Codechange: replace some "magic" constants with enumified constants.
16 years ago
rubidium
97c184f8f8
(svn r14063) -Codechange: replace some "magic" constants with enumified constants.
16 years ago
belugas
2767042705
(svn r13887) -Codechange: Replace numbers with Colours enum on autoreplace, build_vehicle, cheat, depot and dock guis.
...
The fact that it goes alphabetically is pure coincidence.
16 years ago
belugas
1737ce45e3
(svn r13887) -Codechange: Replace numbers with Colours enum on autoreplace, build_vehicle, cheat, depot and dock guis.
...
The fact that it goes alphabetically is pure coincidence.
16 years ago
peter1138
759739db3f
(svn r13784) -Codechange: Truncate vehicle names in purchase list to width of window.
16 years ago
peter1138
49769dffba
(svn r13784) -Codechange: Truncate vehicle names in purchase list to width of window.
16 years ago
peter1138
47ba8389b5
(svn r13760) -Codechange: With multiple NewGRF engine sets, engine IDs may not be allocated in the order expected by GRF authors, so sort by 'list position' instead of engine ID for all vehicle types.
16 years ago
peter1138
00e052ad39
(svn r13760) -Codechange: With multiple NewGRF engine sets, engine IDs may not be allocated in the order expected by GRF authors, so sort by 'list position' instead of engine ID for all vehicle types.
16 years ago
belugas
dfeb80fb9b
(svn r13696) -Fix[GUI]: The Build button of the vehicle list is now hidden, instead of just disabled. It will be only visible when called from the Depot Building Window.
...
Less confusion, hopefully. Suggested by Eddi.
16 years ago
belugas
f666fd5a9b
(svn r13696) -Fix[GUI]: The Build button of the vehicle list is now hidden, instead of just disabled. It will be only visible when called from the Depot Building Window.
...
Less confusion, hopefully. Suggested by Eddi.
16 years ago
rubidium
4b3395fbd4
(svn r13694) -Change: make it more explicit that you've opened the available train/ship/etc. list instead of the one where you can actually build vehicles by setting the appropriate title for the window.
16 years ago
rubidium
e74743227b
(svn r13694) -Change: make it more explicit that you've opened the available train/ship/etc. list instead of the one where you can actually build vehicles by setting the appropriate title for the window.
16 years ago
rubidium
e7a501100a
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
17 years ago
rubidium
923e21129c
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
17 years ago
peter1138
c61baba819
(svn r13314) -Codechange: Switch EngineList from std::vector to GUIList
17 years ago
peter1138
f954a93ee0
(svn r13314) -Codechange: Switch EngineList from std::vector to GUIList
17 years ago
peter1138
f97403803b
(svn r13306) -Fix (r8362): Pass engine list by pointer instead of making a copy of it.
17 years ago
peter1138
bb00206736
(svn r13306) -Fix (r8362): Pass engine list by pointer instead of making a copy of it.
17 years ago
peter1138
1272c55991
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
17 years ago
peter1138
f7a9c4f522
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
17 years ago
rubidium
dc77647ea4
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
...
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
17 years ago
rubidium
4625695653
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
...
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
17 years ago
smatz
ebe6a8b0df
(svn r13190) -Cleanup: remove unused variable
17 years ago
smatz
5cedf77a9a
(svn r13190) -Cleanup: remove unused variable
17 years ago
rubidium
162e2e074b
(svn r13185) -Codechange: remove everything related to the WindowProc callbacks.
17 years ago
rubidium
27c38052b7
(svn r13185) -Codechange: remove everything related to the WindowProc callbacks.
17 years ago
rubidium
ad6e52080c
(svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp.
17 years ago
rubidium
87015f5b63
(svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp.
17 years ago
rubidium
a89b5721a8
(svn r13139) -Codechange: move DrawWindowWidgets and DrawWindowViewport to the Window class and remove Window from their naming.
17 years ago
rubidium
8b54212900
(svn r13139) -Codechange: move DrawWindowWidgets and DrawWindowViewport to the Window class and remove Window from their naming.
17 years ago
peter1138
839070028e
(svn r13074) -Fix: For multiheaded engines, halve power and running cost when used instead of when loading, to allow callback values to work properly.
17 years ago
peter1138
eb112946a7
(svn r13074) -Fix: For multiheaded engines, halve power and running cost when used instead of when loading, to allow callback values to work properly.
17 years ago
rubidium
a7db265bb6
(svn r13069) -Codechange: it is no longer needed to pass a void *data pointer with the WE_CREATE message because nothing uses it anymore.
17 years ago
rubidium
dddfaaac7d
(svn r13069) -Codechange: it is no longer needed to pass a void *data pointer with the WE_CREATE message because nothing uses it anymore.
17 years ago
rubidium
c6c908aba5
(svn r13068) -Codechange: make a class of the BuildVehicleWindow.
17 years ago
rubidium
db69f81fe7
(svn r13068) -Codechange: make a class of the BuildVehicleWindow.
17 years ago
rubidium
2c96ce4506
(svn r13027) -Codechange: use StrEmpty instead of arr[0] == '\0' and remove the need for WE_ON_EDIT_TEXT_CANCEL.
17 years ago
rubidium
f23026cce8
(svn r13027) -Codechange: use StrEmpty instead of arr[0] == '\0' and remove the need for WE_ON_EDIT_TEXT_CANCEL.
17 years ago
glx
a8e8329d41
(svn r13019) -Fix [FS#1997]: silence some more MSVC x64 warnings (michi_cc)
17 years ago
glx
0b37b81956
(svn r13019) -Fix [FS#1997]: silence some more MSVC x64 warnings (michi_cc)
17 years ago
rubidium
92aac531c2
(svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window.
17 years ago
rubidium
23fc96c3e8
(svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window.
17 years ago
smatz
8a422e34df
(svn r12995) -Codechange: use std::vector for EngineList instead of C/C++ wrapper for CBlobT
17 years ago
smatz
3445b8054c
(svn r12995) -Codechange: use std::vector for EngineList instead of C/C++ wrapper for CBlobT
17 years ago
rubidium
9db77e3808
(svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL.
17 years ago
rubidium
9bf519f26b
(svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL.
17 years ago
rubidium
1ce0b03bf0
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
17 years ago
rubidium
d03994098b
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
17 years ago
peter1138
45034bc522
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
17 years ago
peter1138
a00371c8db
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
17 years ago
bjarni
80a0435ba8
(svn r12843) -Feature [FS#1945]: The autoreplace window is now resizable in both directions
...
The code to open this window is also unified for all vehicle types
17 years ago
bjarni
501b89b8de
(svn r12843) -Feature [FS#1945]: The autoreplace window is now resizable in both directions
...
The code to open this window is also unified for all vehicle types
17 years ago
rubidium
6d063c3ad6
(svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h.
17 years ago
rubidium
02cdf01507
(svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h.
17 years ago
rubidium
df1d9bd880
(svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h.
17 years ago
rubidium
ef2be7d0fc
(svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h.
17 years ago
rubidium
c51b81c247
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
17 years ago
rubidium
2edd403656
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
17 years ago
peter1138
f6e4dc4d8c
(svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.
17 years ago
peter1138
dda6cab17a
(svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.
17 years ago
peter1138
0e997be11e
(svn r12205) -Codechange: rename RailVehicleInfo::running_cost_base to running_cost, inline with other vehicle types (It is the factor, not the base)
17 years ago
peter1138
79b6b9cb66
(svn r12205) -Codechange: rename RailVehicleInfo::running_cost_base to running_cost, inline with other vehicle types (It is the factor, not the base)
17 years ago
peter1138
89e0b522e2
(svn r12164) -Fix (r12137, FS#1775]: Variable scope bug crept in
17 years ago
peter1138
7394b9d030
(svn r12164) -Fix (r12137, FS#1775]: Variable scope bug crept in
17 years ago
peter1138
6d333e5d3e
(svn r12137) -Fix [FS#1769]: Show cargo capacity for articulated vehicles correctly in the purchase list. Multiple cargo types can also now been shown.
17 years ago
peter1138
3371d02449
(svn r12137) -Fix [FS#1769]: Show cargo capacity for articulated vehicles correctly in the purchase list. Multiple cargo types can also now been shown.
17 years ago
peter1138
71b0d5f091
(svn r12054) -Cleanup: Use VehicleType instead of byte for vehicle types...
17 years ago
peter1138
a528dc89c7
(svn r12054) -Cleanup: Use VehicleType instead of byte for vehicle types...
17 years ago
peter1138
c5b749f983
(svn r11988) -Codechange: Add a generic way of changing a widget's size and adjust the widgets around it to suit.
17 years ago
peter1138
c99eb9e456
(svn r11988) -Codechange: Add a generic way of changing a widget's size and adjust the widgets around it to suit.
17 years ago
peter1138
622f251197
(svn r11959) -Codechange: Use macro to loop for specific engine types instead of using specific indexes each time.
...
-Codechange: Minor scope changes in said loops.
17 years ago
peter1138
9515328962
(svn r11959) -Codechange: Use macro to loop for specific engine types instead of using specific indexes each time.
...
-Codechange: Minor scope changes in said loops.
17 years ago
peter1138
aa556f123d
(svn r11918) -Codechange: Draw engine lists at widget positions instead of fixed pixel positions
17 years ago
peter1138
70025a149d
(svn r11918) -Codechange: Draw engine lists at widget positions instead of fixed pixel positions
17 years ago
peter1138
04da1e1d45
(svn r11915) -Codechange: Add a function to draw a sort button's up/down arrow. Arrows are now drawn in a consistent position based on the widget, instead of randomly positioned by pixel.
17 years ago
peter1138
68707808c0
(svn r11915) -Codechange: Add a function to draw a sort button's up/down arrow. Arrows are now drawn in a consistent position based on the widget, instead of randomly positioned by pixel.
17 years ago
peter1138
727d07c67e
(svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list.
17 years ago
peter1138
d80e04d6f6
(svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list.
17 years ago
peter1138
1fa2285327
(svn r11848) -Codechange: New class-based drop down list functionality. Lists are now dynamically generated, and can include parameters, or be extended however needed.
17 years ago
peter1138
e4c05f8d78
(svn r11848) -Codechange: New class-based drop down list functionality. Lists are now dynamically generated, and can include parameters, or be extended however needed.
17 years ago
rubidium
90acd52f22
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
17 years ago
rubidium
d4e6a6bf57
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
17 years ago
rubidium
2fc62eab05
(svn r11818) -Codechange: split player.h into smaller pieces.
17 years ago
rubidium
ac528411df
(svn r11818) -Codechange: split player.h into smaller pieces.
17 years ago
rubidium
64d691bacc
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
17 years ago
rubidium
0e517fe023
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
17 years ago
rubidium
c08bff8931
(svn r11785) -Codechange: remove some unneeded includes.
17 years ago
rubidium
cd92981e9f
(svn r11785) -Codechange: remove some unneeded includes.
17 years ago
peter1138
8c7bd8fef4
(svn r11781) -Codechange: variable scope and initialization
17 years ago
peter1138
4479c06e2d
(svn r11781) -Codechange: variable scope and initialization
17 years ago
rubidium
444e77d8bc
(svn r11774) -Change: do not include variables.h in a header when it is not needed.
17 years ago
rubidium
b0ac283aec
(svn r11774) -Change: do not include variables.h in a header when it is not needed.
17 years ago
bjarni
2c62136ace
(svn r11710) -Feature: [build vehicles windows] added sorting for cost, running costs and speed to road vehicles and ships build windows
17 years ago
bjarni
6196fa01ab
(svn r11710) -Feature: [build vehicles windows] added sorting for cost, running costs and speed to road vehicles and ships build windows
17 years ago
rubidium
722613f7f3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
17 years ago
rubidium
384503e7d3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
17 years ago
rubidium
db73addb43
(svn r11702) -Codechange: move all date related stuff to date*.
17 years ago
rubidium
b9046c97fb
(svn r11702) -Codechange: move all date related stuff to date*.
17 years ago
rubidium
81bf9f8503
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
17 years ago
rubidium
429521a7d1
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
17 years ago
rubidium
1f6043458c
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
17 years ago
rubidium
8f0e68285b
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
17 years ago
rubidium
766551b0bc
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
17 years ago
rubidium
9e9cfe6e59
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
17 years ago
rubidium
8427b8bad2
(svn r11675) -Codechange: split the string types from the string functions.
17 years ago
rubidium
433a9f3c09
(svn r11675) -Codechange: split the string types from the string functions.
17 years ago
rubidium
2cf7d5b2cb
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
17 years ago
rubidium
d582aea639
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
17 years ago
rubidium
8bfbfd0031
(svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps.
17 years ago
rubidium
8896bea306
(svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps.
17 years ago
rubidium
92cb0e45ca
(svn r11555) -Codechange: use the new members introduced in r11551.
17 years ago
rubidium
527b72749d
(svn r11555) -Codechange: use the new members introduced in r11551.
17 years ago
skidd13
c0a2c0c23e
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
17 years ago
skidd13
71c4325c50
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
17 years ago
belugas
e2c0f1faf7
(svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
...
Patch heavily based on BiBB's work (FS#1383)
17 years ago
belugas
56e6282f2f
(svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
...
Patch heavily based on BiBB's work (FS#1383)
17 years ago
rubidium
eadd6765e1
(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.
17 years ago
rubidium
8212088c03
(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.
17 years ago
glx
342025d0e1
(svn r11214) -Fix [FS#1296]: planes can't use heliports so refuse these orders
17 years ago
glx
8e5480aa16
(svn r11214) -Fix [FS#1296]: planes can't use heliports so refuse these orders
17 years ago
rubidium
f41c8ab3aa
(svn r11122) -Fix [FS#1234]: crash when building a NewGRF vehicle when the articulated build vehicle callback returneed a different value for the purchase window than the normal build. Thanks for Dalestan and _minime_ for pointers to possible causes.
17 years ago
rubidium
257fdb38e6
(svn r11122) -Fix [FS#1234]: crash when building a NewGRF vehicle when the articulated build vehicle callback returneed a different value for the purchase window than the normal build. Thanks for Dalestan and _minime_ for pointers to possible causes.
17 years ago
rubidium
45900925c3
(svn r10992) -Fix [FS#1132]: huge amount of vehicles in the "ungrouped" group. Patch by frosch.
17 years ago
rubidium
ac838de385
(svn r10992) -Fix [FS#1132]: huge amount of vehicles in the "ungrouped" group. Patch by frosch.
17 years ago
rubidium
d1590e8f07
(svn r10731) -Codechange: allow smaller initial "build <vehicle type>" windows.
17 years ago
rubidium
c4613280d1
(svn r10731) -Codechange: allow smaller initial "build <vehicle type>" windows.
17 years ago
rubidium
13ab17bca8
(svn r10704) -Codechange: provide an infrastructure to have resizable windows that are smaller than the default window size.
17 years ago
rubidium
c03cb2c8db
(svn r10704) -Codechange: provide an infrastructure to have resizable windows that are smaller than the default window size.
17 years ago
peter1138
61e41b24b4
(svn r10603) -Codechange: avoid direct access to _engine_info
17 years ago
peter1138
306c21d6c9
(svn r10603) -Codechange: avoid direct access to _engine_info
17 years ago
rubidium
13692798e6
(svn r10567) -Add [FS#915]: a "group" with ungrouped vehicles. Patch by Matthias Wolf.
17 years ago
rubidium
7aec26887c
(svn r10567) -Add [FS#915]: a "group" with ungrouped vehicles. Patch by Matthias Wolf.
17 years ago
truelight
988d9b8da8
(svn r10552) -Fix [FS#1034, r10546]: opening Available Aircrafts segfaulted
17 years ago
truelight
a757ed52fd
(svn r10552) -Fix [FS#1034, r10546]: opening Available Aircrafts segfaulted
17 years ago
truelight
1845b5633d
(svn r10546) -Fix [FS#1026]: you can now have both Available Train as Available Ship window open
17 years ago
truelight
a84dcf7682
(svn r10546) -Fix [FS#1026]: you can now have both Available Train as Available Ship window open
17 years ago
peter1138
76874f34bf
(svn r10324) -Codechange: reference engine names by index
18 years ago
peter1138
d69589b3c2
(svn r10324) -Codechange: reference engine names by index
18 years ago
truelight
dc82eeb2ae
(svn r10265) -Feature: allow double-clicking on certain places: build-vehicle and town-action
18 years ago
truelight
6159f58948
(svn r10265) -Feature: allow double-clicking on certain places: build-vehicle and town-action
18 years ago
rubidium
d0fa4eb9de
(svn r10258) -Codechange: as we are now using int64 all over the place, it's better to use int64 variables in the string generating too instead of packing them into two int32s.
...
-Fix: some displays of money were wrong.
18 years ago
rubidium
9c0944aa09
(svn r10258) -Codechange: as we are now using int64 all over the place, it's better to use int64 variables in the string generating too instead of packing them into two int32s.
...
-Fix: some displays of money were wrong.
18 years ago
rubidium
1b27095c83
(svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string.
18 years ago
rubidium
eb1472a82d
(svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string.
18 years ago
rubidium
0d8e82b7d7
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
18 years ago
rubidium
f806b46cc9
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
18 years ago
bjarni
07e7a80a05
(svn r10025) -Fix: [build windows] sorting planes for capacity didn't check mail capacity. Now mail capacity is used if passenger capacity is the same
...
The sort will still resort to EngineID if both mail and passenger capacities are the same
18 years ago
bjarni
532391db12
(svn r10025) -Fix: [build windows] sorting planes for capacity didn't check mail capacity. Now mail capacity is used if passenger capacity is the same
...
The sort will still resort to EngineID if both mail and passenger capacities are the same
18 years ago
bjarni
65ff472991
(svn r10024) -Feature: [build windows] trains, road vehicles and ships can now be sorted by cargo capacity (planes already had this option)
18 years ago
bjarni
81698422a2
(svn r10024) -Feature: [build windows] trains, road vehicles and ships can now be sorted by cargo capacity (planes already had this option)
18 years ago
maedhros
2181e11c18
(svn r10008) -Codechange: Move a couple of functions related to articulated vehicles to a file of their own.
18 years ago
maedhros
ab8503f5a5
(svn r10008) -Codechange: Move a couple of functions related to articulated vehicles to a file of their own.
18 years ago
rubidium
21546a66f3
(svn r9917) -Codechange: prepare some more areas for more road types.
18 years ago
rubidium
0819f3a9a0
(svn r9917) -Codechange: prepare some more areas for more road types.
18 years ago
rubidium
8f0f090c51
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
18 years ago
rubidium
7d4be11516
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
18 years ago
rubidium
c8d05162c2
(svn r9869) -Codechange: replace some bytes with VehicleType, i.e. more type strictness.
18 years ago
rubidium
ba24c34f85
(svn r9869) -Codechange: replace some bytes with VehicleType, i.e. more type strictness.
18 years ago
peter1138
e16ea9b758
(svn r9828) -Codechange: [NewGRF] Add support for changing cargo capacity with callback 36. This is set on construction for ships and roadvehicles, and whenever carriages are attached for trains.
18 years ago
peter1138
1d5135830a
(svn r9828) -Codechange: [NewGRF] Add support for changing cargo capacity with callback 36. This is set on construction for ships and roadvehicles, and whenever carriages are attached for trains.
18 years ago
peter1138
4cfef9b7f5
(svn r9809) -Codechange: [NewGRF] Add callback 36 properties to purchase lists and add running cost changing for ships.
18 years ago
peter1138
bc7d762196
(svn r9809) -Codechange: [NewGRF] Add callback 36 properties to purchase lists and add running cost changing for ships.
18 years ago
peter1138
ebe81b98ce
(svn r9806) -Codechange: [NewGRF] Add callback 36 support for purchase cost, for all vehicle types.
18 years ago
peter1138
4591fb5b0d
(svn r9806) -Codechange: [NewGRF] Add callback 36 support for purchase cost, for all vehicle types.
18 years ago
peter1138
9763b5bf8b
(svn r9703) -Codechange: support callback 36 in vehicle purchase lists
18 years ago
peter1138
1052b0e8f1
(svn r9703) -Codechange: support callback 36 in vehicle purchase lists
18 years ago
rubidium
7577954ced
(svn r9672) -Cleanup: lots of coding style fixes around operands.
18 years ago
rubidium
80c259f64f
(svn r9672) -Cleanup: lots of coding style fixes around operands.
18 years ago
maedhros
2eed59028f
(svn r9476) -Codechange: Make build windows for all vehicle types the same width.
18 years ago
maedhros
c25d539543
(svn r9476) -Codechange: Make build windows for all vehicle types the same width.
18 years ago
maedhros
822ce5661d
(svn r9475) -Codechange: Allow the purchase details widget to expand dynamically if there's still not enough room for the text.
18 years ago
maedhros
cdf74ca0c9
(svn r9475) -Codechange: Allow the purchase details widget to expand dynamically if there's still not enough room for the text.
18 years ago
maedhros
9339c954e1
(svn r9474) -Fix (r8378): Expand the details widget in the vehicle build windows again to make room for all the text.
18 years ago
maedhros
d2bd12d52e
(svn r9474) -Fix (r8378): Expand the details widget in the vehicle build windows again to make room for all the text.
18 years ago
rubidium
36cea84b11
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
18 years ago
rubidium
ce919e8c71
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
18 years ago
bjarni
13c72c07d6
(svn r9040) -Codechange: the build window and CmdBuildAircraft() now shares the code to figure out if an aircraft is buildable in the hangar in question
...
This should help ensuring that the build command and the list are consistent in what aircraft are buildable
18 years ago
bjarni
f61f1962c5
(svn r9040) -Codechange: the build window and CmdBuildAircraft() now shares the code to figure out if an aircraft is buildable in the hangar in question
...
This should help ensuring that the build command and the list are consistent in what aircraft are buildable
18 years ago
celestar
5828617a07
(svn r8973) -Feature/Codechange: Changed the internal unit for aircraft velocities to from 8mph to 1km/h (peter1138), also give aircraft realsitic velocities (so that 1km/h is 1km/h independent of vehicle type) (peter1138). Introduce a flag to reduce aircraft speed in holding patterns to some realistic velocity. Use this flag for the city airport for the time being and make use of the different entry points for this airport type.
18 years ago
celestar
f621608f7d
(svn r8973) -Feature/Codechange: Changed the internal unit for aircraft velocities to from 8mph to 1km/h (peter1138), also give aircraft realsitic velocities (so that 1km/h is 1km/h independent of vehicle type) (peter1138). Introduce a flag to reduce aircraft speed in holding patterns to some realistic velocity. Use this flag for the city airport for the time being and make use of the different entry points for this airport type.
18 years ago
belugas
4160d85cd2
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
18 years ago
belugas
6d199fcdb7
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
18 years ago
peter1138
3d581f4f89
(svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels.
18 years ago
peter1138
ef2daa5060
(svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels.
18 years ago
tron
27f48c5dda
(svn r8822) -Fix
...
Variable scope, const
18 years ago
tron
41d526415c
(svn r8822) -Fix
...
Variable scope, const
18 years ago
bjarni
da422574ad
(svn r8787) -Change r8771: allow fast aircraft in small airports
...
We should keep the list in sync with the build command as hacked clients can avoid a block in the GUI only
18 years ago
bjarni
853cc54ec6
(svn r8787) -Change r8771: allow fast aircraft in small airports
...
We should keep the list in sync with the build command as hacked clients can avoid a block in the GUI only
18 years ago
bjarni
8175371eee
(svn r8783) -Fix r8771: aircraft vehicle subtype and aircraft engine subtype aren't the same (even though they both tell if it's a plane or helicopter)
18 years ago
bjarni
f731d7ffc4
(svn r8783) -Fix r8771: aircraft vehicle subtype and aircraft engine subtype aren't the same (even though they both tell if it's a plane or helicopter)
18 years ago
bjarni
6bbe135446
(svn r8771) -Fix r8343: build aircraft windows will no longer show aircraft that can't use the airport in question
...
Now it's even better than ever because unless the no jetcrash cheat is enabled, the small airports will not show fast aircraft
18 years ago
bjarni
222aebc5dd
(svn r8771) -Fix r8343: build aircraft windows will no longer show aircraft that can't use the airport in question
...
Now it's even better than ever because unless the no jetcrash cheat is enabled, the small airports will not show fast aircraft
18 years ago
tron
128caa5050
(svn r8755) -Fix
...
Abbreviate GetAirport(st->airport_type) to st->Airport()
18 years ago
tron
87e03c7aa8
(svn r8755) -Fix
...
Abbreviate GetAirport(st->airport_type) to st->Airport()
18 years ago
bjarni
a7c92492df
(svn r8749) -Regression r8331: fixed signed/unsigned issue that could create too many lines in build vehicle windows and crash the game
18 years ago
bjarni
6460d5b441
(svn r8749) -Regression r8331: fixed signed/unsigned issue that could create too many lines in build vehicle windows and crash the game
18 years ago
tron
16df378623
(svn r8747) -Fix
...
-Codechange: Make the encoding of accepted aircraft types of airports a bit more sensible and move the enum into struct AirportFTAClass
18 years ago
tron
5231f5669d
(svn r8747) -Fix
...
-Codechange: Make the encoding of accepted aircraft types of airports a bit more sensible and move the enum into struct AirportFTAClass
18 years ago
bjarni
ab08096aab
(svn r8746) -Regression r8331: build train window could sort incorrectly by EngineID with certain newGRF sets
18 years ago
bjarni
8675b8ec7d
(svn r8746) -Regression r8331: build train window could sort incorrectly by EngineID with certain newGRF sets
18 years ago
bjarni
d40886903d
(svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
...
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places)
Surprisingly this can be done without changing the savegame format
18 years ago
bjarni
037d636734
(svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
...
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places)
Surprisingly this can be done without changing the savegame format
18 years ago
bjarni
f626458af7
(svn r8610) -Codechange/Feature: rewrote the list handling in the autoreplace window
...
-The user will notice the following changes:
All vehicle types behaves in the same way
Adding/removing an engine (new design and so on) can no longer result in the window selecting a new engine
All valid replacements will be displayed since it looks at refitting options as well (this solves the missing ships with the newships GRF)
Since you can't replace an engine into itself, the engine selected in the left list will no longer appear in the right list
-The code changes:
Instead of looping all engines all the time, each list generates a list like the build windows
This ensures consistent list generation since only one function can loop all engines
Unified code for all vehicle types
It now use the lists to call the drawing code in the build vehicle window
Works on selected EngineIDs instead of selected index in the list
18 years ago
bjarni
80125fd934
(svn r8610) -Codechange/Feature: rewrote the list handling in the autoreplace window
...
-The user will notice the following changes:
All vehicle types behaves in the same way
Adding/removing an engine (new design and so on) can no longer result in the window selecting a new engine
All valid replacements will be displayed since it looks at refitting options as well (this solves the missing ships with the newships GRF)
Since you can't replace an engine into itself, the engine selected in the left list will no longer appear in the right list
-The code changes:
Instead of looping all engines all the time, each list generates a list like the build windows
This ensures consistent list generation since only one function can loop all engines
Unified code for all vehicle types
It now use the lists to call the drawing code in the build vehicle window
Works on selected EngineIDs instead of selected index in the list
18 years ago
rubidium
2a9851a3ad
(svn r8511) -Codechange: make WindowClass an enumerated value.
18 years ago
rubidium
c8882bd3d2
(svn r8511) -Codechange: make WindowClass an enumerated value.
18 years ago
peter1138
4438b99ae4
(svn r8464) -Revert (r4322): Change back to converting to mph in the GUI code, as 1 mph == 1.6 km/h is too far out for some people.
18 years ago
peter1138
8933ffd9ac
(svn r8464) -Revert (r4322): Change back to converting to mph in the GUI code, as 1 mph == 1.6 km/h is too far out for some people.
18 years ago
bjarni
a97d87be9a
(svn r8460) -Fix (r8455): the build train window put locomotives and wagons in appeantly random order
18 years ago
bjarni
be19961f1e
(svn r8460) -Fix (r8455): the build train window put locomotives and wagons in appeantly random order
18 years ago
belugas
e8af755d7f
(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
...
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before.
-Cleanup: Remove some extraneous parenthesis.
18 years ago
belugas
0c45071bb0
(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
...
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before.
-Cleanup: Remove some extraneous parenthesis.
18 years ago
bjarni
058df1b99f
(svn r8390) -Codechange (r8384): Rewrote ResizeButtons()
...
Now it only works on first and last widget to resize
It now works with offsets correctly (no longer assumes the left is 0)
It's no longer needed to have a widget right of the ones you resize
Can handle any number of widgets
18 years ago
bjarni
8c098db7a8
(svn r8390) -Codechange (r8384): Rewrote ResizeButtons()
...
Now it only works on first and last widget to resize
It now works with offsets correctly (no longer assumes the left is 0)
It's no longer needed to have a widget right of the ones you resize
Can handle any number of widgets
18 years ago
tron
7fffe8b3d4
(svn r8385) -Fix
...
-Regression (r8314): I only did half the necessary changes to move railtype from Engine to RailVehicleInfo. Now do the rest.
18 years ago
tron
0996de79df
(svn r8385) -Fix
...
-Regression (r8314): I only did half the necessary changes to move railtype from Engine to RailVehicleInfo. Now do the rest.
18 years ago
bjarni
4dd0d007b1
(svn r8384) -Codechange: [GUI] instead of writing a resize button function for each window, a global ResizeButtons() is added
18 years ago
bjarni
e2f72cbf1f
(svn r8384) -Codechange: [GUI] instead of writing a resize button function for each window, a global ResizeButtons() is added
18 years ago
bjarni
e40723568a
(svn r8381) -Fix (r8377): [build vehicle window] cleaned up the train refitable detection. It had two variables doing the same thing, but not always set to the same (oops)
18 years ago
bjarni
a73f67af40
(svn r8381) -Fix (r8377): [build vehicle window] cleaned up the train refitable detection. It had two variables doing the same thing, but not always set to the same (oops)
18 years ago
bjarni
ff2ce417a3
(svn r8379) -Cleanup: [build vehicle window] removed overloading with DrawVehiclePurchaseInfo() and renamed them into type specific names
18 years ago
bjarni
9f31b897b6
(svn r8379) -Cleanup: [build vehicle window] removed overloading with DrawVehiclePurchaseInfo() and renamed them into type specific names
18 years ago
bjarni
116cbcedb1
(svn r8378) -Fix (r8331): [build vehicle window] extended the widget with the details with one line since some newgrf trains needs it
18 years ago
bjarni
9c6317a203
(svn r8378) -Fix (r8331): [build vehicle window] extended the widget with the details with one line since some newgrf trains needs it
18 years ago
bjarni
5a47d11689
(svn r8377) -Fix (r8331): [build vehicle window] train cargo capacity now only add "(refitable)" if the engine in question is refitable
18 years ago
bjarni
8d89ca48e1
(svn r8377) -Fix (r8331): [build vehicle window] train cargo capacity now only add "(refitable)" if the engine in question is refitable
18 years ago
bjarni
aa2b69262b
(svn r8364) -Codechange (r8362): added an assert to catch conditions where a request wants to draw more vehicles than the list contains
18 years ago
bjarni
8c3e4ead65
(svn r8364) -Codechange (r8362): added an assert to catch conditions where a request wants to draw more vehicles than the list contains
18 years ago
bjarni
a6a65f6c3e
(svn r8362) -Codechange: [vehicle build window] moved the engine drawing loop to a function of it's own
...
-Fix (r8335): [vehicle build window] ship sprites were moved two pixels to the left
18 years ago
bjarni
a9a1fd8c20
(svn r8362) -Codechange: [vehicle build window] moved the engine drawing loop to a function of it's own
...
-Fix (r8335): [vehicle build window] ship sprites were moved two pixels to the left
18 years ago
bjarni
f19c84dc25
(svn r8343) -Cleanup: [build vehicle windows] added a few comments and removed two switch-cases, that we can do without
18 years ago
bjarni
29a89e0a2f
(svn r8343) -Cleanup: [build vehicle windows] added a few comments and removed two switch-cases, that we can do without
18 years ago
belugas
bfa5822bd8
(svn r8339) -Fix(r8331): MSVC seems to be a little more strict (or less intelligent) then other compilers when it comes to operator precedence.
...
A copy of code from train_gui.cpp to build_vehicle_gui.cpp was not exactly the same.
The earlier version did not require parenthesis to specify correct operator precedence.
18 years ago
belugas
ac9d926606
(svn r8339) -Fix(r8331): MSVC seems to be a little more strict (or less intelligent) then other compilers when it comes to operator precedence.
...
A copy of code from train_gui.cpp to build_vehicle_gui.cpp was not exactly the same.
The earlier version did not require parenthesis to specify correct operator precedence.
18 years ago
bjarni
71d22b2f5e
(svn r8338) -Codechange: merged road vehicle build window into the other ones
...
Note: now all build vehicle windows are merged into build_vehicle_gui.cpp
18 years ago
bjarni
6ccbfffbea
(svn r8338) -Codechange: merged road vehicle build window into the other ones
...
Note: now all build vehicle windows are merged into build_vehicle_gui.cpp
18 years ago
bjarni
09c9fe501f
(svn r8337) -Cleanup: removed some more switch-cases in build_vehicle_gui.cpp and added arrays + VehTypeToIndex() instead
18 years ago
bjarni
cf0e5816d6
(svn r8337) -Cleanup: removed some more switch-cases in build_vehicle_gui.cpp and added arrays + VehTypeToIndex() instead
18 years ago
bjarni
be5f289275
(svn r8336) -Codechange: added function to translate vehicle types to 0,1,2... for use for index to arrays
...
Used this function to get rid of some switch-cases in build_vehicle_gui.cpp
-Fix (r8335): ship build window didn't remember assending/decending sort setting
18 years ago
bjarni
8f4e2e8040
(svn r8336) -Codechange: added function to translate vehicle types to 0,1,2... for use for index to arrays
...
Used this function to get rid of some switch-cases in build_vehicle_gui.cpp
-Fix (r8335): ship build window didn't remember assending/decending sort setting
18 years ago
bjarni
c39e513076
(svn r8335) -Feature: the build ship window is now also resizable horizontally and contains sorting options
...
-Codechange: the build ship window is merged into build_vehicle_gui.cpp
18 years ago
bjarni
14b2998023
(svn r8335) -Feature: the build ship window is now also resizable horizontally and contains sorting options
...
-Codechange: the build ship window is merged into build_vehicle_gui.cpp
18 years ago
bjarni
e6e1334eb3
(svn r8334) -Fix (r8331): build window buttons now both resize as intended
18 years ago
bjarni
1f32ce7e89
(svn r8334) -Fix (r8331): build window buttons now both resize as intended
18 years ago
bjarni
ade2af8ac6
(svn r8333) -Codechange: when invalidating a build window list, set a flag instead of rebuilding the list and then rebuild it the next time it's redrawn
...
This should save CPU time in the (maybe unlikely) event that the list is invalidated more than once between two redraws
18 years ago
bjarni
4bb18a450c
(svn r8333) -Codechange: when invalidating a build window list, set a flag instead of rebuilding the list and then rebuild it the next time it's redrawn
...
This should save CPU time in the (maybe unlikely) event that the list is invalidated more than once between two redraws
18 years ago
bjarni
f87494587e
(svn r8332) -Codechange: moved DrawAircraftImage() and CcBuildAircraft() from build_vehicle_gui.cpp to aircraft_gui.cpp
18 years ago
bjarni
d82ae7427d
(svn r8332) -Codechange: moved DrawAircraftImage() and CcBuildAircraft() from build_vehicle_gui.cpp to aircraft_gui.cpp
18 years ago
bjarni
884af9d856
(svn r8331) -Feature: the train and aircraft build windows are now resizable in horizontal direction as well
...
-Codechange: merged train and aircraft build window code
18 years ago
bjarni
b60e5c17cd
(svn r8331) -Feature: the train and aircraft build windows are now resizable in horizontal direction as well
...
-Codechange: merged train and aircraft build window code
18 years ago
peter1138
ca9843424b
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
...
This lets us increase the sprite width from 14 to up to 29 bits,
effectively nulling the old sprite limit. Table changes in next commit.
18 years ago
peter1138
92d418b031
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
...
This lets us increase the sprite width from 14 to up to 29 bits,
effectively nulling the old sprite limit. Table changes in next commit.
18 years ago
rubidium
a7d0cdf95f
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
18 years ago
rubidium
f35ed4bbc2
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
18 years ago
KUDr
07c30785ab
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
18 years ago
KUDr
e373ea7096
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
18 years ago