rubidium
d832626bb9
(svn r14491) -Documentation: updates/additions of doxygen docs (Alberth)
2008-10-19 15:39:12 +00:00
rubidium
272b2ef0e9
(svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus)
2008-10-14 18:38:51 +00:00
smatz
1906aa2bbb
(svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker)
2008-10-07 20:57:41 +00:00
rubidium
b650a86e58
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
2008-09-30 20:51:04 +00:00
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.
2008-09-30 20:39:50 +00:00
frosch
67db5087cd
(svn r14406) -Fix [FS#Eddi]: Autoreplace did not work for vehicles in free wagon chains.
2008-09-27 14:58:46 +00:00
smatz
6987e6015a
(svn r14395) -Fix [FS#2285]: crashes and GUI desyncs when order is deleted/modified while the timetable window is open
...
-Fix: close any dropdown and child windows in the Order and Timetable windows when selected order is deselected, deleted, ...
2008-09-24 16:40:06 +00:00
rubidium
7ef5406946
(svn r14371) -Fix [FS#2313]: loading indicator didn't stay with the front engine when turning a train in a station.
2008-09-21 18:28:35 +00:00
frosch
2bf182fb36
(svn r14369) -Fix: Enforce non-front engines to be stopped.
...
This could be caused by old savegames resp. their conversion, and causes
trouble for e.g. autoreplace.
2008-09-21 14:03:47 +00:00
smatz
192d348f78
(svn r14343) -Fix [FS#2300]: invalid v->u.air.targetairport could cause crashes at several places when the station pool got smaller
2008-09-16 15:15:41 +00:00
smatz
5f4ff33ce3
(svn r14337) -Codechange: use CmdRename* and CMD_RENAME_* for vehicle, president and company renaming commands, too
2008-09-15 22:58:41 +00:00
smatz
1266b1a73f
(svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies)
2008-09-15 19:02:50 +00:00
rubidium
7c8a50d7d8
(svn r14324) -Fix [FS#2241]: free any blocks that a helicopter may have on an oilrig when the helicopter gets forcefully removed (bankruptcy). For other airports this isn't needed as they can't be used by multiple companies.
2008-09-14 16:49:21 +00:00
michi_cc
fa3f2ae035
(svn r14285) -Fix [FS#2263]: A train inside a wormhole could free the reservation of another train inside the wormhole.
2008-09-09 19:02:47 +00:00
rubidium
9474db5cb6
(svn r14258) -Codechange: rework the way to query the vehicle hash to make sure it always results in the same irregardless of the order of the hash-linked-list.
...
-Fix: desync in PBS reservation following, vehicle flooding and road vehicle overtake/follow code.
2008-09-07 11:23:10 +00:00
rubidium
c8e8911ef6
(svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites.
2008-09-02 15:20:38 +00:00
frosch
12f38e56df
(svn r14132) -Fix (r14039): Only reserve a path on leaving a station if the current block really is a PBS block. (michi_cc)
2008-08-22 22:48:12 +00:00
glx
ef0458c739
(svn r14110) -Fix: desyncs due to bubbles in toyland
2008-08-20 16:51:08 +00:00
rubidium
99efe9aaae
(svn r14097) -Fix [FS#2085]: one couldn't get a list of vehicles sharing an order when the number of orders was 0; you could see that the vehicles had a shared order though.
2008-08-17 21:07:09 +00:00
rubidium
abd9f74871
(svn r14096) -Codechange: merge the shared order's vehicle list management to a single location.
2008-08-17 19:56:17 +00:00
frosch
ca3f1f6406
(svn r14095) -Fix (r14076): Trains shall not stop instantly.
2008-08-17 18:48:18 +00:00
rubidium
b6b9cd9d51
(svn r14089) -Fix [FS#2219]: trains not being able to find a route to a depot when the front is already in the depot.
2008-08-17 11:04:37 +00:00
frosch
9751fbe4dc
(svn r14085) -Cleanup (r14083): Remove no longer used functions.
2008-08-16 14:15:32 +00:00
frosch
f7826f8a37
(svn r14083) -Fix [FS#1264, FS#2037, FS#2038, FS#2110]: Rewrite the autoreplace kernel.
2008-08-16 14:02:20 +00:00
frosch
844a83ed58
(svn r14076) -Codechange: Merge the four start/stop commands into a single CMD_START_STOP_VEHICLE.
2008-08-15 13:57:43 +00:00
rubidium
2d94337e1a
(svn r14064) -Fix [FS#1752]: check for the length of strings (in bytes) in the command. Checking for the length in pixels is impossible because that differs per client.
2008-08-13 06:22:04 +00:00
rubidium
8726c2fd99
(svn r14039) -Fix [FS#2217]: reversing an overlength train at a station would try to find a route out and sometimes reset the unload counter making it wait 2.5 years before departing instead of waiting until the train would actually leave the station (michi_cc)
2008-08-10 21:56:47 +00:00
rubidium
e9c33fb288
(svn r13950) -Add [YAPP]: Trains can now also be in a 'stuck' state when waiting on a path reservation. (michi_cc)
2008-08-02 22:53:21 +00:00
rubidium
ad36ea6b29
(svn r13912) -Codechange: remove some casts by returning the proper type instead of void*.
2008-08-01 15:07:31 +00:00
smatz
aae2aa64c4
(svn r13816) -Fix [FS#2150]: check for vehicle length changes outside a depot (callback 0x11) and give a warning about that
2008-07-24 15:19:26 +00:00
rubidium
d06529ef4d
(svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool.
2008-07-17 20:13:01 +00:00
rubidium
d974acac89
(svn r13681) -Revert (r13678, r13677): the fixes didn't work in all cases (assertions on savegame loads).
...
-Fix [FS#2102]: but now in a hopefully beter way.
2008-07-08 15:10:23 +00:00
rubidium
03d32e12fb
(svn r13680) -Fix: NPF crashing when a ship tried to find a nearby depot when on an aqueduct.
2008-07-07 16:04:38 +00:00
rubidium
3a793ceea9
(svn r13678) -Fix (r13677): electric trains from pre elrail savegames would get stopped on load.
2008-07-06 11:08:40 +00:00
smatz
58d63ec726
(svn r13475) -Fix (r13464): crash on destroying aquaduct with ship on in and on company bankrupt
2008-06-11 15:56:55 +00:00
rubidium
2f3b88ef9a
(svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers.
2008-05-30 18:20:26 +00:00
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.
2008-05-29 15:13:28 +00:00
peter1138
f9fc53f98a
(svn r13307) -Codechange: Separate VehicleList and its two functions so only the 3 users include it, reducing dependencies on misc/smallvec.h
2008-05-28 11:56:21 +00:00
peter1138
02b5ffa13f
(svn r13266) -Codechange: Use SmallVector in GUIList
2008-05-26 16:23:23 +00:00
rubidium
8c9cc415e3
(svn r13255) -Codechange: move _opt to _settings.
2008-05-25 22:36:44 +00:00
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.
2008-05-25 19:17:03 +00:00
peter1138
6ea832ec7c
(svn r13250) -Codechange: Use VehicleList in SendAllVehiclesToDepot()
2008-05-25 17:36:49 +00:00
peter1138
56f78e6412
(svn r13248) -Codechange: Use VehicleList for depot GUI.
2008-05-25 17:22:49 +00:00
peter1138
cfc8ed1f5b
(svn r13246) -Fix (r13245): incorrect parameters to memcpy
2008-05-25 16:22:34 +00:00
peter1138
da8bb14cec
(svn r13245) -Codechange: Use SmallVectors for generating vehicle lists, simplifying calling code somewhat.
2008-05-25 16:12:13 +00:00
peter1138
f6ea07e7d8
(svn r13241) -Codechange: Simplify CmdDepotSellAllVehicles() a bit
2008-05-25 11:18:57 +00:00
peter1138
d9805b46b9
(svn r13240) -Codechange: More const-ness for GUI code.
2008-05-25 09:40:44 +00:00
peter1138
c34b458ace
(svn r13232) -Codechange: Simplify BuildDepotVehicleList()
2008-05-24 12:12:02 +00:00
rubidium
9defec7876
(svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData.
2008-05-18 16:51:44 +00:00
rubidium
9717e1ef07
(svn r13146) -Codechange: vehicle_base.h doesn't need to be included in vehicle_gui.h.
2008-05-17 20:54:18 +00:00
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.
2008-05-17 13:01:30 +00:00
bjarni
5469686001
(svn r13125) -Fix [FS#2000](r12913): [autoreplace] failing replacement and restoring a vehicle will no longer decrease the vehicle count in groups
2008-05-16 21:04:49 +00:00
rubidium
76b8970a33
(svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls.
2008-05-15 13:39:36 +00:00
smatz
ec627dedf8
(svn r13090) -Codechange: add functions for direct conversion from DiagDirection to Track and Trackbits
2008-05-14 18:31:21 +00:00
peter1138
6bfd695002
(svn r13087) -Codechange: Constify CalcPercentVehicleFilled() (michi_cc)
2008-05-14 15:34:04 +00:00
glx
c708ab3b48
(svn r13047) -Codechange: remove vp_d
2008-05-11 15:08:44 +00:00
glx
e48a351f8e
(svn r13008) -Fix [FS#1997]: silence some MSVC x64 warnings
2008-05-08 13:20:54 +00:00
bjarni
0cfd2baa3c
(svn r12988) -Fix [FS#1992](r12913): [autoreplace] failing to replace a road vehicle could free it's slot without the vehicle knowing it (leading to assert)
2008-05-07 13:11:33 +00:00
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.
2008-05-06 15:11:33 +00:00
bjarni
dbf6e344a4
(svn r12940) -Fix [FS#1974](r12913): [autoreplace] a vehicle backup should include the cargo packets in the vehicle as well
2008-05-04 10:05:35 +00:00
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.
2008-04-29 21:31:29 +00:00
peter1138
5ca6fd67fc
(svn r12917) -Codechange: standardise variable names called with FOR_ALL_ENGINEIDS_OF_TYPE
2008-04-29 07:11:54 +00:00
bjarni
757de2bdf5
(svn r12913) -Add: ability to backup and restore a player's economic data and data for a vehicle (or chain of vehicles)
...
Autoreplace uses this with the following benefits:
-Mass autoreplace (the button in the depot window) will now estimate costs correctly
-Autoreplace now either replaces correctly or manages to keep the original vehicle (no more broken trains)
Thanks to Ammler for testing this
2008-04-27 20:09:29 +00:00
smatz
805e1db332
(svn r12904) -Fix [FS#1953]: remove trams from savegames saved in OTTD without tram support, it is better than to simply crash
2008-04-25 16:33:40 +00:00
smatz
9fc355fca5
(svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup
2008-04-24 09:55:20 +00:00
peter1138
60eb3c034f
(svn r12860) -Fix [FS#1947]: Train depart animation trigger was not called in some cases.
2008-04-24 07:44:21 +00:00
rubidium
b139756e2b
(svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp
2008-04-20 11:12:07 +00:00
rubidium
f55ffd14bd
(svn r12803) -Cleanup: rename SpecialVehicle to EffectVehicle to have a uniform naming of the thing instead of using both names for the same thing.
2008-04-20 10:13:54 +00:00
rubidium
15680e477a
(svn r12800) -Codechange: move the animated tile related functions out of texteff.cpp (it isn't a text effect after all). Also remove a few more functions from functions.
2008-04-20 08:22:59 +00:00
bjarni
01549e1574
(svn r12792) -Codechange: [autoreplace] added a function to figure out if a replacement is needed and if so, to which EngineID
...
It's designed to save a bit of CPU time, specially if the replacement isn't buildable (think autorenew of old vehicle)
2008-04-19 17:47:56 +00:00
bjarni
ad3ef0fb26
(svn r12791) -Codechange: [autoreplace] Added a flag parameter (listens for DC_EXEC and DC_QUERY_COST) and included more info when returning CommandCost
...
This allowed cleaning up the code in MaybeReplaceVehicle()
2008-04-19 15:14:20 +00:00
rubidium
fb466f4db2
(svn r12772) -Codechange: some vehicle.cpp coding style.
2008-04-18 17:53:06 +00:00
rubidium
acafc26426
(svn r12762) -Fix: tabs after the first non-tab character are generally not okay (or lines starting with a space and then tabs).
2008-04-18 04:54:09 +00:00
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.
2008-04-17 19:10:30 +00:00
smatz
059e94e355
(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
2008-04-17 18:24:45 +00:00
smatz
9488db56d4
(svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile()
2008-04-17 00:44:20 +00:00
glx
3a84a74f4d
(svn r12711) -Codechange: remove unneeded loops
2008-04-14 20:48:17 +00:00
rubidium
e1ab9c2eea
(svn r12684) -Fix [FS#1891]: manually given service at depot order is not forgotten anymore when autoservice 'interferes'.
2008-04-13 11:35:57 +00:00
rubidium
8c89250f58
(svn r12669) -Fix (r12667): crash when a vehicle has never been to a station and the load percentage conditional variable is evaluated.
2008-04-12 12:51:16 +00:00
rubidium
8226c92c8a
(svn r12664) -Codechange: do not force the 'color' pointer to be non-NULL when trying to get the load percentage.
2008-04-12 09:59:58 +00:00
rubidium
00051b2721
(svn r12659) -Cleanup: some style cleanups in vehicle.cpp.
2008-04-11 13:19:44 +00:00
rubidium
570519d79b
(svn r12658) -Codechange: unify a vast portion of the CmdSend<VehicleType>ToDepot commands.
2008-04-11 08:40:10 +00:00
rubidium
5992dad01f
(svn r12648) -Feature: allow four different non-stop types in a single game instead of two. The "TTDP compatible order" setting now only sets the default behaviour of new trains.
...
-Feature: allow three different load type in a single game instead of two. One can choose full load all and full load any instead of full load being governed by the "full load any" patch setting.
2008-04-10 08:30:15 +00:00
frosch
96700d5605
(svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing().
...
-Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders.
2008-04-08 15:48:32 +00:00
rubidium
d74c6ffb62
(svn r12617) -Codechange: add type safety to the Order's load and unload types.
2008-04-07 20:03:46 +00:00
rubidium
f1cd7ef5ee
(svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
2008-04-07 19:18:56 +00:00
rubidium
c57a1d74c3
(svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere.
2008-04-07 08:59:04 +00:00
smatz
6af1fb2bdd
(svn r12599) -Codechange: force AllocateSafeRaw() to be linked to simplify compiler's decisions about inlining
2008-04-06 23:49:45 +00:00
rubidium
fb1c4eccd8
(svn r12593) -Codechange: hide Order's flags in most of the code.
2008-04-06 15:09:45 +00:00
rubidium
d6623cf654
(svn r12588) -Codechange: do not access the destination of an order directly.
2008-04-06 07:48:51 +00:00
rubidium
e68b2088ce
(svn r12586) -Codechange: do not access an order's refit variables directly.
2008-04-06 07:07:21 +00:00
rubidium
630d5ad766
(svn r12585) -Fix (r12584): assumption that assertions were enabled during compilation/testing was flawed.
2008-04-05 23:46:01 +00:00
rubidium
5b47f81b0f
(svn r12584) -Codechange: do not access the order type directly.
2008-04-05 23:36:54 +00:00
frosch
15a9fba867
(svn r12531) -Codechange: Rename some variables for consistency.
2008-04-01 14:03:20 +00:00
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.
2008-03-31 00:17:39 +00:00
rubidium
2edd403656
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
2008-03-31 00:06:17 +00:00
rubidium
4a1035ab95
(svn r12488) -Codechange: split order.h into order_base.h and order_func.h.
2008-03-30 23:24:18 +00:00
rubidium
eeabab4555
(svn r12459) -Codechange: split news.h into news_type.h and news_func.h.
2008-03-28 08:53:36 +00:00
bjarni
06c0e5df5a
(svn r12421) -Feature: [autoreplace] the autoreplace button in train depots will now also replace wagons even if they aren't connected to a locomotive
...
fixed estimated cost in CmdDepotMassAutoReplace() (will still not estimate wagon removal profits)
Made it possible to command CmdDepotMassAutoReplace() to either replace everything or nothing (the button will still happily replace just some of the vehicles if cash premits)
2008-03-25 21:58:13 +00:00
peter1138
bc8ad5c743
(svn r12339) -Fix (r12331): Recalculate cached train data after clearing reversing flag when entering depot.
2008-03-04 21:49:40 +00:00
glx
b64f637c72
(svn r12331) -Feature: [NewGRF] vehicle variable FE bit 8
2008-03-03 20:56:30 +00:00
bjarni
8290a798fc
(svn r12231) -Cleanup (r12230): [autoreplace] moved Vehicle::NeedsAutorenewing() and added comments
2008-02-23 22:23:06 +00:00
smatz
13781ec11b
(svn r12163) -Fix [FS#1705]: if a train is 'stopping' when entering a depot, do not let it leave again
2008-02-16 22:29:30 +00:00
smatz
a0ddc43e92
(svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
...
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
2008-02-13 19:24:40 +00:00
glx
efe831934a
(svn r12097) -Fix (r654, r1525): loading old, pre savegame version 2, savegames.
2008-02-10 05:21:08 +00:00
smatz
6537d13c8a
(svn r12033) -Fix: do not show train speed as zero after loading paused game
2008-02-01 15:09:55 +00:00
smatz
1d59439166
(svn r11916) -Codechange: use enums from VehicleViewWindowWidgets instead of constants
...
-Fix: refit button widget was not correctly updated
2008-01-18 13:02:47 +00:00
smatz
ac7bc24b0e
(svn r11882) -Codechange: introduce MarkSingleVehicleDirty() and simplify the code at some places
2008-01-16 21:17:31 +00:00
rubidium
2817e5425b
(svn r11874) -Fix [FS#1655]: all wagons of maglev/monorail trains would get the livery colour of the engine instead of their wagon type.
2008-01-16 11:25:15 +00:00
rubidium
576f8ad93e
(svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*.
2008-01-15 18:44:22 +00:00
smatz
245f05a7cc
(svn r11864) -Codechange: pass owner whose signals we will update instead of complex detection later
2008-01-15 15:00:01 +00:00
rubidium
dc87b05e8c
(svn r11834) -Codechange: only include settings_type.h if needed.
2008-01-13 14:37:30 +00:00
rubidium
d4e6a6bf57
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
2008-01-13 01:21:35 +00:00
peter1138
ab8382c0db
(svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
...
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
2008-01-12 19:58:06 +00:00
rubidium
ac528411df
(svn r11818) -Codechange: split player.h into smaller pieces.
2008-01-12 14:10:35 +00:00
smatz
a1266da782
(svn r11809) -Fix [FS#1643]: set expenses type when selling all vehicles in depot
2008-01-10 21:54:45 +00:00
smatz
f44a9a5d5b
(svn r11802) -Fix [FS#716]: do not crash trains when leaving depot to a very long track
...
-Codechange: use dedicated pathfinder for signal updating, resulting in better performance and possible future improvements
2008-01-09 23:00:59 +00:00
rubidium
46650c54b6
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
2008-01-09 16:55:48 +00:00
rubidium
0e517fe023
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
2008-01-09 09:45:45 +00:00
rubidium
a3ccdcea36
(svn r11777) -Codechange: split the string header and make do not include it when it's not necessary.
2008-01-07 14:23:25 +00:00
rubidium
a8a3a7e3f2
(svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location.
2008-01-07 09:19:53 +00:00
rubidium
b0ac283aec
(svn r11774) -Change: do not include variables.h in a header when it is not needed.
2008-01-07 00:57:19 +00:00
peter1138
aab495604a
(svn r11735) -Fix [FS#1574]: Don't reset loading indicator IDs when only reloading NewGRFs.
2008-01-01 15:06:37 +00:00
rubidium
e5e75bd8f8
(svn r11719) -Codechange: split sound.h in a header with types and one with functions.
2007-12-29 09:24:26 +00:00
rubidium
384503e7d3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
2007-12-27 13:35:39 +00:00
rubidium
b9046c97fb
(svn r11702) -Codechange: move all date related stuff to date*.
2007-12-26 13:50:40 +00:00
rubidium
2786d789a1
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h).
2007-12-26 11:45:43 +00:00
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'
2007-12-25 11:26:07 +00:00
rubidium
bf98e25e43
(svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed.
2007-12-25 09:48:53 +00:00
rubidium
a773d45885
(svn r11684) -Codechange: split gfx.h in a type and functional header.
2007-12-23 10:56:02 +00:00
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.
2007-12-22 23:30:28 +00:00
rubidium
6a9e77e079
(svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
2007-12-21 22:50:51 +00:00
rubidium
9e9cfe6e59
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
2007-12-21 21:50:46 +00:00
rubidium
433a9f3c09
(svn r11675) -Codechange: split the string types from the string functions.
2007-12-21 19:49:27 +00:00
rubidium
5b49e75453
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
2007-12-19 23:26:02 +00:00
rubidium
7db6c7db38
(svn r11664) -Codechange: use more specific ("rail_type.h" instead of "rail.h" that includes way more than only "rail_type.h") includes at some places.
2007-12-18 20:58:12 +00:00
smatz
acf6e08f78
(svn r11642) -Codechange: VehicleFromPos does check for v->tile == tile, so remove useless checks
2007-12-15 23:11:18 +00:00
smatz
701e9d27fc
(svn r11639) -Codechange: simplify EnsureNoVehicleOnGround
2007-12-15 20:30:43 +00:00
smatz
4b22e57b33
(svn r11637) -Fix: mark viewports dirty when removing visible vehicle chain
2007-12-15 16:11:29 +00:00
smatz
4b7f8f04a3
(svn r11633) -Codechange: merge CheckTunnelEmpty and IsVehicleOnBridge into GetVehicleTunnelBridge
2007-12-14 23:21:20 +00:00
rubidium
dedb15786c
(svn r11632) -Fix [FS#1541]: vehicles were still followed when sold.
2007-12-14 21:11:30 +00:00
smatz
5acc147c1c
(svn r11625) -Codechange: add CO_* enum at some places, add includes of order.h too
2007-12-12 14:37:35 +00:00
skidd13
bdc7fd2d76
(svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
...
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
2007-11-25 15:35:25 +00:00
rubidium
9a70ec1cb2
(svn r11506) -Fix [FS#1471]: selling vehicles could cause the window of others to scroll to that location.
2007-11-24 09:14:58 +00:00
skidd13
eeaa348f8b
(svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style
2007-11-20 13:35:54 +00:00
skidd13
71c4325c50
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
2007-11-19 21:02:30 +00:00
skidd13
50bfe1a19d
(svn r11476) -Codechange: rename the function myabs to abs to get rid of an unneeded define
2007-11-19 18:58:04 +00:00
skidd13
8be526e499
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
2007-11-19 18:38:10 +00:00
belugas
2571f02594
(svn r11417) -Fix[FS#1421]: Let the main viewport stay where the vehicle was last seen while been center-followed
2007-11-12 01:12:32 +00:00
rubidium
3a8cdc37ce
(svn r11400) -Fix [FS#1409]: assign orders during cloning after refitting as it needs the cargo types to be the same.
2007-11-10 22:56:43 +00:00
rubidium
6cc287c669
(svn r11362) -Fix [FS#1380]: cloning vehicles with non-standard sub-cargotypes (i.e. livery refits) failed.
2007-10-30 20:31:35 +00:00
glx
1256cbade3
(svn r11353) -Codechange: add support for newgrf callback 32
2007-10-28 16:00:51 +00:00
glx
4041d8108a
(svn r11352) -Codechange: cache callback 2D result (vehicle color mapping) instead calling it every time the vehicle is drawn
2007-10-28 15:40:18 +00:00
rubidium
79cee7e08f
(svn r11314) -Fix [FS#1356]: stop following a vehicle when you sell/destroyed it.
2007-10-20 17:11:02 +00:00
rubidium
95f2181a1d
(svn r11303) -Fix: EnsureNoVehicle and EnsureNoVehicleOnGround were both used to check whether there was no vehicle on the ground, except that the former didn't take care of aircraft shadows. So now we only use EnsureNoVehicleOnGround.
2007-10-19 22:46:55 +00:00
rubidium
64a6d3daad
(svn r11262) -Fix [FS#1330]: do not check for vehicles that are not on the ground when removing owned land, furthermore do not check for shadows (of aircraft).
2007-10-14 20:12:51 +00:00
rubidium
a71b7226c5
(svn r11236) -Fix [FS#1322]: DeleteVehicleChain can just work as good for all vehicles, instead of not allowing trains to use it (enforced by an assert), but actually using it for trains. Patch by SmatZ.
2007-10-09 20:53:25 +00:00
rubidium
127c7c9b0f
(svn r11173) -Codechange: rename some callback enums so they are more uniform.
2007-09-26 17:33:32 +00:00
rubidium
65f9a0f21a
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
2007-09-09 10:13:17 +00:00
rubidium
ef4d248325
(svn r11064) -Fix [FS#553]: when autorenew is enabled and it cannot renew the vehicle anymore (because the player cannot build the engine), the aging warnings as if autorenew is not enabled are shown.
2007-09-08 22:53:10 +00:00
glx
4a658a562b
(svn r11052) -Fix (r11017)[FS#1210]: vehicles always skip service order
2007-09-07 17:01:35 +00:00
bjarni
7cdf6d1cbe
(svn r11045) -Codechange: added a function to tell if a vehicle is the rear part of a dualheaded train engine
2007-09-05 10:15:23 +00:00
rubidium
57db6a8c20
(svn r11027) -Fix: do not unconditionally assume that a tile has a depot.
2007-08-31 20:52:38 +00:00
rubidium
2c8e50f20c
(svn r11017) -Codechange: unify determining whether a vehicle needs/can be service a little more.
2007-08-31 17:13:39 +00:00
rubidium
98a3b8abfa
(svn r11014) -Fix (r11011) [FS#1170]: crash when selling the first train of a consist.
2007-08-31 12:57:52 +00:00
rubidium
aba867d78d
(svn r11011) -Fix [FS#1129]: GetFirstVehicleInChain did change the game state while being marked const.
...
-Codechange: do not brute force determine the first vehicle in the chain or previous vehicle, but do it by properly accounting the previous and first pointers when updating the next pointer. This gives a performance increase of about 15% when there are a lot of vehicles in the game.
2007-08-30 21:11:12 +00:00
rubidium
9b65bc430c
(svn r11004) -Codechange: some reworks of the saveload mechanism to be able to save and load private and protected variables in the vehicle struct.
2007-08-30 13:09:44 +00:00
rubidium
cb7eaff353
(svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that.
2007-08-30 13:03:56 +00:00
rubidium
a407d53d1b
(svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot.
2007-08-29 21:49:08 +00:00
rubidium
5d628e6135
(svn r10997) -Codechange: unify the vehicle view window. Patch by PhilSophus.
2007-08-29 20:50:58 +00:00
belugas
604924542c
(svn r10971) -Codechange: One less magical number
2007-08-24 00:04:51 +00:00
maedhros
537064d010
(svn r10808) -Fix (r10353): Make sure spectators can't open infrastructure building menus.
2007-08-06 11:58:15 +00:00
rubidium
83e1fdcb01
(svn r10799) -Fix: only calling QuickFree and not the destructor on pool cleanups might cause memory leaks due to the way C++ works.
2007-08-05 21:20:55 +00:00
rubidium
ab5fa3add2
(svn r10798) -Fix [FS#1105]: virtual functions do not work in destructors :(.
2007-08-05 17:43:04 +00:00
rubidium
9741094464
(svn r10772) -Codechange: also make use of the generic clean and destroy pool callback functions for vehicle.
2007-08-03 20:17:26 +00:00
rubidium
836105864c
(svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
...
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
2007-08-03 19:36:00 +00:00
rubidium
b15c0efaa9
(svn r10756) -Codechange: use vehicle->IsValid in favour of IsValidVehicle(vehicle).
2007-08-02 21:19:07 +00:00
rubidium
4e96ce3dfe
(svn r10744) -Codechange: make the pool a little more OO, so it can be easier in other places.
2007-08-01 22:10:54 +00:00
peter1138
92061aba4e
(svn r10734) -Fix [FS#1030]: Revert r10513) and add special cases for collision detection on bridges/tunnels.
2007-07-30 08:49:41 +00:00
peter1138
64ad100db4
(svn r10721) -Fix [FS#1084]: Skip articulated parts of road vehicles during unique name check.
2007-07-29 14:02:27 +00:00
glx
94fa0ec289
(svn r10714) -Fix r10696: MSVC performance warning
2007-07-28 00:19:49 +00:00
rubidium
5bd241eb5b
(svn r10697) -Codechange: give a more sensible names to some of the unkX variables.
2007-07-26 15:37:19 +00:00
rubidium
02ab86631e
(svn r10696) -Codechange: remove duplication of the "make sprite transparent" code.
2007-07-26 14:07:11 +00:00
rubidium
b290268645
(svn r10684) -Codechange: some more coding style related changes. Primarily moving { to a new line.
2007-07-25 00:16:30 +00:00
peter1138
306c21d6c9
(svn r10603) -Codechange: avoid direct access to _engine_info
2007-07-17 06:56:09 +00:00
peter1138
1aaab031b2
(svn r10513) -Fix [FS#1022]: use vehicle subtile position to update cache, not tile, so that collision detection works on bridges and tunnels.
2007-07-11 21:31:34 +00:00
rubidium
26985a0128
(svn r10478) -Fix [FS#999]: remove the loading indicator when a vehicle is removed.
2007-07-08 17:44:46 +00:00
rubidium
90f85c957a
(svn r10409) -Codechange: replace (Aircraft|RoadVeh|Ship|Train)_Tick with a Tick method in the Vehicle class.
2007-07-01 19:24:54 +00:00
rubidium
83a880c882
(svn r10408) -Codechange: make GetImage a class method of Vehicle instead of Get(Aircraft|RoadVeh|Ship|Train)Image.
2007-07-01 19:11:47 +00:00
peter1138
b3c3171c1e
(svn r10380) -Fix (r10364): when checking for unique names, only check vehicles that can have names, and skip inactive players.
2007-06-28 19:14:29 +00:00
peter1138
c692d897cd
(svn r10364) -Fix [FS#706]: checking for duplicate custom names was inconsistent, and tested all 'namespaces'. now only check names of the same type.
2007-06-27 20:53:25 +00:00
peter1138
de357c74c1
(svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf)
2007-06-27 20:40:20 +00:00
rubidium
0c8ca15c18
(svn r10354) -Fix [FS#950]: loading indicator showed "^" when the train would load at the given station.
2007-06-27 14:37:46 +00:00
rubidium
52fbdd62a2
(svn r10353) -Fix/Feature [FS#669]: disallow (in the GUI) the building of infrastructure you do not have available vehicles for. This means that the airport building button is disabled till you can actually build aircraft. The game itself will not disallow you to build the infrastructure and this "new" behaviour can be overriden with a patch setting.
2007-06-27 14:15:48 +00:00
maedhros
821d10f44c
(svn r10341) -Fix (r10236): Only update the timetable when leaving stations if this is a scheduled stop.
2007-06-26 14:43:41 +00:00
maedhros
fb284a9264
(svn r10335) -Fix (r10331): Increment the current order index *after* using it in UpdateVehicleTimetable.
2007-06-25 23:14:13 +00:00
KUDr
a7d5363e65
(svn r10302) -Fix [YAPF, MP]: now (with r10301) it is no longer needed to invalidate the YAPF segment cache every tick in MP. Segment cost now doesn't contain the curves between segments. As a result the cache should be now accurate.
2007-06-24 13:22:41 +00:00
truelight
f80fa33cc5
(svn r10270) -Add: prefixed the loading indicator with an arrow, up meaning vehicle is loading, down meaning vehicle is unloading
2007-06-22 18:28:44 +00:00
rubidium
e5c352818d
(svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it.
2007-06-22 11:58:59 +00:00
truelight
56eb1738ee
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
2007-06-21 16:17:47 +00:00
maedhros
cf0118ee63
(svn r10236) -Feature: Introduce a form of timetabling for vehicles.
2007-06-20 19:17:22 +00:00
rubidium
7d6c255044
(svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder.
2007-06-18 22:49:55 +00:00
rubidium
49220cc6f1
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
2007-06-18 19:53:50 +00:00
rubidium
b09431478d
(svn r10200) -Codechange: add "shortcut" for !CmdFailed (CmdSucceeded).
2007-06-18 16:42:40 +00:00
rubidium
966e2738b9
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
2007-06-18 10:48:15 +00:00
rubidium
3b5203dbc6
(svn r10154) -Fix [FS#870]: some vehicles were not drawn when having a high resolution and a high zoom-out level. Patch by B. N. SmatZ!.
2007-06-13 23:43:00 +00:00
rubidium
991996eb36
(svn r10153) -Fix [FS#869]: vehicles disappear when crossing certain tiles. Fix by B. N. SmatZ!.
2007-06-13 23:14:08 +00:00
peter1138
f477075a0b
(svn r10129) -Fix (r10111): Test for x == INVALID_COORD instead of v->tile == INVALID_TILE to determine if a vehicle should be removed from the has.
2007-06-13 07:14:42 +00:00
glx
da1743e980
(svn r10126) -Fix (r10111, FS#864): old_new_hash cache was not reset when the position hash were
2007-06-13 01:38:00 +00:00
peter1138
78d797a6b7
(svn r10111) -Codechange: Add new vehicle hash table for collision detection and finding vehicles on a tile. The hash area scanned is far smaller than the old hash table, which is now used for viewport updates only. This should give a significant performance improvement for games with many vehicles. (Based on work by 'B. N. SmatZ!' and 'madman2003')
2007-06-12 11:22:32 +00:00
maedhros
3e326085fa
(svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
...
road vehicles for those who prefer the technical explanation.
2007-06-11 14:00:16 +00:00
bjarni
3afea2d673
(svn r10077) -Fix: FS#845 Cloning Trains Longer Than 8 Units Causes Crash
...
The problem was that if adding units to the clone (wagon by wagon) failed, then cloning wouldn't notice it and it made two half trains
Now it detects this case and it will make cloning fail. The string with the explanation for the failed move will be used in the error message so the user will know why it failed.
2007-06-09 18:31:04 +00:00
peter1138
9c66082b07
(svn r10062) -Codechange: Don't redraw all station tiles when cargo is added or removed if the station has no custom graphics.
2007-06-08 09:35:39 +00:00
rubidium
622a4d10b9
(svn r10056) -Revert (r10049): removing SLE_WRITEBYTE didn't work as expected :(. Somehow SlIterateArray and SlObject depend on eachother and adding a some arbitrary data before the SlObject makes it go crazy.
2007-06-07 12:37:48 +00:00
rubidium
eab8ac49ce
(svn r10049) -Codechange: get rid of the SLE_WRITEBYTE obfuscation.
2007-06-06 23:57:21 +00:00
peter1138
07c34b2628
(svn r10048) -Fix (r6455): Don't use override engine type for articulated wagon parts.
2007-06-06 10:51:11 +00:00
maedhros
8f361393dd
(svn r10020) -Fix [FS#824]: GetNextVehicle() is invalid for anything that isn't a train.
2007-06-02 09:11:06 +00:00
maedhros
4acf3e4c3f
(svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type.
2007-06-01 12:03:10 +00:00
maedhros
710cc5a597
(svn r9959) -Fix: Only call GetNextVehicle for trains.
2007-05-27 17:27:07 +00:00
peter1138
974aebcce5
(svn r9956) -Codechange: Add tram livery schemes
2007-05-27 09:33:41 +00:00
maedhros
1b33f19877
(svn r9953) -Fix: Only check whether trains are multiheaded when cloning.
2007-05-27 05:32:37 +00:00
maedhros
3914f3c85c
(svn r9939) -Fix (r3139): EngineHasArticPart(v) is only valid for trains.
2007-05-26 17:06:45 +00:00
rubidium
0819f3a9a0
(svn r9917) -Codechange: prepare some more areas for more road types.
2007-05-25 08:13:01 +00:00
rubidium
440d723d84
(svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile.
2007-05-24 22:41:50 +00:00
glx
0646d307bd
(svn r9896) -Fix (r9874): when selling an entire train, decrease the number of vehicles in the group only once
2007-05-21 17:19:01 +00:00
peter1138
546dfc2758
(svn r9889) -Codechange: Use cargo's freight status for choosing livery scheme.
2007-05-20 10:27:43 +00:00
rubidium
4570a8954a
(svn r9878) -Fix (9874): some vehicle count's were not properly updated on delete or autoreplace of vehicles.
2007-05-19 12:29:09 +00:00
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.
2007-05-19 09:40:18 +00:00
rubidium
5178911345
(svn r9872) -Codechange: more type strictness for vehicle types
2007-05-18 23:38:29 +00:00
rubidium
ba24c34f85
(svn r9869) -Codechange: replace some bytes with VehicleType, i.e. more type strictness.
2007-05-18 17:31:41 +00:00
truelight
765c466b8d
(svn r9846) -Codechange: introduced ZOOM_LVL_MIN and ZOOM_LVL_MAX for the obvious reasons
...
-Codechange: introduced ZOOM_LVL_DETAIL to show/remove details
-Codechange: changed << and >> operator with ZoomLevel to a simple wrapper (that in theory also allows zoom-in besides the current zoom-out)
-Fix r9845: missed some int -> ZoomLevel
2007-05-15 16:08:46 +00:00
rubidium
23492f1f34
(svn r9841) -Codechange: add a little more type strictness to the vehicle types.
2007-05-15 11:28:22 +00:00
rubidium
c7d57379fb
(svn r9836) -Codechange: make non-improved loading happen FIFO-ish; generally loading/unloading will happen fifo, but there are no guarantees on the FIFO-ness. For (better) FIFO guarantees you still need to use improved loading.
2007-05-14 16:07:05 +00:00
rubidium
d78651f7b1
(svn r9831) -Codechange: more refactoring of the loading/unloading.
2007-05-13 21:24:58 +00:00
rubidium
2efecd34c4
(svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions.
2007-05-07 16:21:34 +00:00
rubidium
fe1306ce65
(svn r9799) -Codechange: separate engine class and engine running cost class (mart3p).
2007-05-06 19:44:22 +00:00
rubidium
5c0a52149d
(svn r9795) -Codechange: enumify the EngineClass.
2007-05-06 15:01:44 +00:00
rubidium
abbaa1691e
(svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle.
2007-05-06 14:59:01 +00:00
rubidium
438d55d576
(svn r9789) -Fix (r9770): vehicles didn't get unloaded when 'full load' was specified and the vehicle was already full when it entered.
2007-05-05 09:51:26 +00:00
rubidium
b76cc8c96b
(svn r9784) -Codechange: remove unused variable.
2007-05-04 22:38:36 +00:00
glx
a7c39f7325
(svn r9773) -Fix r9772: MSVC warning
2007-05-03 17:07:51 +00:00
rubidium
9194d5ab9e
(svn r9772) -Fix [r9770,FS#761]: under some circumstances loading/unloading didn't work (correctly).
2007-05-03 11:02:37 +00:00
rubidium
981bf52bdd
(svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station.
2007-05-02 18:29:11 +00:00
rubidium
dce7dcb664
(svn r9764) -Codechange: replace some lookup tables by functions.
2007-05-02 09:29:41 +00:00
rubidium
1bea3b55a6
(svn r9763) -Codechange/Fix (r9760): don't read the variables that are calculated automatically either.
2007-05-01 18:17:52 +00:00
rubidium
a4e045a3fb
(svn r9760) -Codechange: remove the need for saving some vehicle variables.
2007-05-01 16:35:14 +00:00
rubidium
ec9ac99d01
(svn r9755) -Codechange: refactor some more of the begin loading stuff.
2007-04-29 22:33:51 +00:00
rubidium
202009522c
(svn r9754) -Codechange: make classes for all vehicle types, so we can make nicer/better maintainable code, i.e. virtual methods instead of switches.
2007-04-29 21:24:08 +00:00
rubidium
6440440f12
(svn r9752) -Codechange: remove some duplication related to BeginLoading.
2007-04-29 18:21:24 +00:00
maedhros
02e770ff2c
(svn r9742) -Fix (r9689) [FS#739]: Fix cloning with refit costs again, hopefully for good this time.
2007-04-29 08:43:00 +00:00