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.
2007-06-21 17:25:17 +00:00
rubidium
1b27095c83
(svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string.
2007-06-21 14:54:51 +00:00
rubidium
0d8e82b7d7
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
2007-06-21 14:32:27 +00:00
maedhros
7fb6e8f11d
(svn r10236) -Feature: Introduce a form of timetabling for vehicles.
2007-06-20 19:17:22 +00:00
peter1138
195ef32835
(svn r10222) -Fix [FS#892]: Only 2 trains could crash at one time as collision checking stopped on the first hit. This could cause desyncs in network games as the collision hash order is not guaranteed. (patch by B. N. Smatz)
2007-06-19 16:40:59 +00:00
rubidium
23727da96f
(svn r10208) -Codechange: replace int32 with Money where appropriate.
2007-06-18 21:44:47 +00:00
rubidium
773a7c9cb6
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
2007-06-18 19:53:50 +00:00
rubidium
3ccc83e640
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
2007-06-18 10:48:15 +00:00
peter1138
70b6716b98
(svn r10177) -Fix: Passengers has one A and two Es (ln)
2007-06-17 10:47:30 +00:00
peter1138
ce590b59f3
(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
c186f91cbd
(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
peter1138
2900732931
(svn r10028) -Fix (r2270/r2951): When deleting the first engine of a train with multiple engines, only reopen the train window if the player had the original train window open. This fixes 'random' windows opening for multiple players of the same company.
2007-06-02 20:08:23 +00:00
bjarni
9f13fc2cf5
(svn r10026) -Fix: unlinking a rail vehicle didn't clear the first pointer
...
After r9973, this could cause some asserts as some vehicles could end up with first pointers to chains they didn't belong to
2007-06-02 17:23:31 +00:00
maedhros
6777662286
(svn r10023) -Fix (r3218): When selling trains, if there were no wagons between multiheaded
...
engines the rear part could be checked despite having already been deleted,
triggering an assert.
2007-06-02 14:42:25 +00:00
maedhros
19250f91b0
(svn r10022) -Fix (r10007): Set the type of multiheaded trains before the subtype.
2007-06-02 11:15:38 +00:00
maedhros
2181e11c18
(svn r10008) -Codechange: Move a couple of functions related to articulated vehicles to a file of their own.
2007-06-01 11:41:02 +00:00
maedhros
abdffa410d
(svn r10007) -Codechange: Add some asserts to IsFrontEngine and friends to ensure that only trains use them.
2007-06-01 11:17:30 +00:00
rubidium
fc9df2c336
(svn r9987) -Fix [FS#818]: a train under a bridge could collide with a train on the bridge.
2007-05-30 13:27:56 +00:00
bjarni
8aaa258122
(svn r9973) -Cleanup: removed some code that kept both ends of a dualheaded engine in the same train (when moving wagons in a depot)
...
NormaliseTrainConsist() is called later in the same command and it will take care of this issue
2007-05-29 10:35:52 +00:00
bjarni
bcb668c2ff
(svn r9967) -Fix (r9938): autoreplace would in certain conditions move dualheaded engines in a train (usually to the rear)
...
-Change: moving an engine in between the two ends of a dualheaded engine will now move the rear dualheaded engine to the front of the newly added engine (instead of moving the new engine to the rear of the rear dualheaded engine)
This can make a difference if there are wagons in the train
2007-05-28 21:40:40 +00:00
rubidium
821e58ac95
(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
peter1138
da204ca17f
(svn r9875) -Fix (r9828): Only set carriage capacity if the wagon has not been refitted.
2007-05-19 10:29:51 +00:00
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.
2007-05-19 09:40:18 +00:00
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.
2007-05-12 07:05:34 +00:00
peter1138
fe5830c4b7
(svn r9818) -Codechange: Cache wagon override sprite set whenever consist is changed, instead of 'recalculating' it every time it is used or just tested.
2007-05-10 06:42:43 +00:00
rubidium
a84ca16dc4
(svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions.
2007-05-07 16:21:34 +00:00
rubidium
2813b4440b
(svn r9807) -Codechange: unify playing of sound when vehicle has been loaded and leaves the station.
2007-05-07 15:58:05 +00:00
peter1138
ebe81b98ce
(svn r9806) -Codechange: [NewGRF] Add callback 36 support for purchase cost, for all vehicle types.
2007-05-07 13:26:10 +00:00
rubidium
eecf806cfc
(svn r9802) -Fix: a vehicle without visual effects isn't per definition unpowered (mart3p).
2007-05-06 20:00:36 +00:00
rubidium
6c967ddbfd
(svn r9801) -Fix: do not assume that trains running on monorail/maglev cannot smoke/spark (mart3p).
2007-05-06 19:58:34 +00:00
rubidium
969366354d
(svn r9800) -Codechange: play sound effects based on the engine class, not the rail type (mart3p).
2007-05-06 19:51:25 +00:00
rubidium
9a893ebe20
(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
bc1901a6e4
(svn r9784) -Codechange: remove unused variable.
2007-05-04 22:38:36 +00:00
peter1138
93793eb89a
(svn r9780) -Codechange: [NewGRF] Add support for variable vehicle weight for trains (callback 36, property 16)
2007-05-04 19:24:01 +00:00
rubidium
cc9d811f53
(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
5a46c763f0
(svn r9760) -Codechange: remove the need for saving some vehicle variables.
2007-05-01 16:35:14 +00:00
rubidium
84c27fc773
(svn r9756) -Fix [FS#755]: LeaveStation wasn't always called when a station was left.
2007-04-29 22:51:12 +00:00
rubidium
df59f5cd15
(svn r9755) -Codechange: refactor some more of the begin loading stuff.
2007-04-29 22:33:51 +00:00
rubidium
0def47a3b0
(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
dba21ab802
(svn r9752) -Codechange: remove some duplication related to BeginLoading.
2007-04-29 18:21:24 +00:00
maedhros
8acc58b731
(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
maedhros
aaa917d56d
(svn r9685) -Fix (r9683): Call v->LeaveStation() when a vehicle in a station is sent to a depot.
2007-04-20 11:39:01 +00:00
rubidium
7577954ced
(svn r9672) -Cleanup: lots of coding style fixes around operands.
2007-04-18 22:10:36 +00:00
peter1138
0d32783f87
(svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.
2007-04-18 18:37:40 +00:00
belugas
0eaa72e324
(svn r9665) -Documentation: Doxygen corrections,errors, corrections of corrections...
2007-04-18 00:41:09 +00:00
maedhros
3d81de8d7e
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
2007-04-12 13:07:15 +00:00
belugas
4c4f2a34ef
(svn r9558) -Documentation: doxygen and comment changes: 'T' now. Almost done
2007-04-04 03:21:14 +00:00
maedhros
00d828e738
(svn r9543) -Fix [FS#691]: Split up STR_ENGINE_NOT_BUILDABLE into four strings so it can be
...
translated properly and remove "buildable", since it isn't actually a word.
2007-04-02 11:35:08 +00:00
belugas
691f8578fd
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
2007-03-22 03:42:43 +00:00
peter1138
5a2236dd84
(svn r9322) -Codechange: Use cargo class to count crash/flood victims
2007-03-19 12:40:51 +00:00
rubidium
b63634f095
(svn r9277) -Fix [FS#685]: shared orders got messed up when the 'first' trains got removed in the depot.
2007-03-18 15:32:42 +00:00
peter1138
70e32d663a
(svn r9259) -Codechange: NUM_CARGO isn't a valid cargo type...
2007-03-16 21:42:11 +00:00
KUDr
8a58bb5108
(svn r9146) -Fix [NTP][FS#676](r6800): "Train is lost" message is generated incorrectly. Forgot to set the best bird distance to zero in case we found the destination to indicate success. (de_zeurkous)
2007-03-13 21:04:22 +00:00
bjarni
0ad237611e
(svn r9072) -Codechange: [Orders] added methods to orders to free them and check if they are in use
2007-03-08 21:39:34 +00:00
rubidium
36cea84b11
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
2007-03-08 16:27:54 +00:00
rubidium
979ccd45ba
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
2007-03-07 12:11:48 +00:00
rubidium
4169bfba06
(svn r9050) -Codechange: Foo(void) -> Foo()
2007-03-07 11:47:46 +00:00
maedhros
78c3edcbb1
(svn r8946) -Feature: [NewGRF] Add support for vehicle variables 0xFE and 0xFF bit 10,
...
which is set when a vehicle was built during the exclusive testing phase.
2007-02-28 17:59:05 +00:00
maedhros
2f557f7dc0
(svn r8945) -Codechange: Rename v->load_status to v->vehicle_flags so it can be used for more than just the gradual loading status.
2007-02-28 17:18:36 +00:00
rubidium
b5a997a446
(svn r8935) -Codechange: unification of track type between road and rail tiles, unification of ground type between normal rail tiles and depots/waypoints and removing the need for RailTileSubType.
2007-02-27 23:36:28 +00:00
tron
742f5d80b5
(svn r8900) -Fix
...
Get rid of DECLARE_ENUM_AS_BIT_INDEX(Track, TrackBits)
2007-02-25 11:49:43 +00:00
tron
c0ec367e9b
(svn r8899) -Fix
...
Remove the unused second parameter from GetTileRailType()
2007-02-25 11:36:19 +00:00
tron
05c6e8f883
(svn r8897) -Fix
...
Change the signature of GetNewVehiclePos():
-void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp);
+GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v);
2007-02-25 10:49:13 +00:00
tron
270e366772
(svn r8896) -Fix
...
Most (i.e. 13 of 15) callers of GetNewVehiclePos() do not care for the return and the others can figure it out by inspecting the information returned in struct GetNewVehiclePosResult.
Therefore remove the return value.
2007-02-25 10:25:25 +00:00
tron
5d081ed350
(svn r8894) -Fix
...
Slightly simplify the control flow of TrainController()
2007-02-25 09:47:46 +00:00
tron
c8e85a3a78
(svn r8893) -Fix
...
variable scope, const, misc.
2007-02-25 09:27:03 +00:00
tron
5c91ec0587
(svn r8884) -Fix
...
Replace SetSpeedLimitOnBridge() by something simpler
2007-02-24 18:44:30 +00:00
tron
a64ffc1e31
(svn r8878) -Fix
...
-Fix: Do a better job when checking the parameters of CmdMoveRailVehicle()
NOTE: 0.5 candidate
2007-02-24 14:36:14 +00:00
peter1138
59cb258578
(svn r8850) -Codechange: Use the cargo type's is_freight flag instead of checking the cargo type to determine if the cargo type is freight cargo type cargo type.
2007-02-22 22:53:49 +00:00
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.
2007-02-20 22:09:21 +00:00
celestar
72e74c29d4
(svn r8709) -Fix/Codechange: Rename the function GetStationPlatforms into GetPlatformLength because that is what it really does. Overload it because there is already a GetPlatformLength (one gives the length of the whole platform, the other gives the remaining length in a given direction). Turned both functions into methods of Station. While messing around with it, fix a problem where loading times for overhanging trains are miscomputed.
2007-02-13 16:36:38 +00:00
rubidium
4d0f8bac27
(svn r8703) -Codechange/cleanup: some magic numbers -> enums and other small coding style changes to the ShipController and TrainController.
2007-02-13 11:29:20 +00:00
rubidium
0ba18a677c
(svn r8701) -Codechange: replace magic numbers with enums for u.rail.track.
2007-02-13 10:46:45 +00:00
rubidium
dba93c7038
(svn r8700) -Fix (8698): replaced a magic number with the wrong enum :(
2007-02-13 10:43:50 +00:00
rubidium
eb5648f382
(svn r8698) -Codechange: enumify the returns of VehicleEnterTile
2007-02-13 10:26:53 +00:00
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
2007-02-06 11:11:12 +00:00
tron
cf5514ce8d
(svn r8550) -Fix
...
Building a vehicle does not involve allocating orders, so do not check whether orders could be allocated
2007-02-03 09:05:43 +00:00
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.
2007-01-30 11:53:35 +00:00
peter1138
45654f8be0
(svn r8434) -Fix (r8430): Missing braces caused compilation failure for some (most?) compilers...
2007-01-27 22:28:28 +00:00
tron
9ccb6ddd71
(svn r8430) -Fix
...
Replace the rather obscure control flow for handling aircraft/ship/train orders by something remotly comprehensible (see r3584)
2007-01-27 16:45:16 +00:00
tron
fdee057baf
(svn r8393) -Fix
...
-Codechange: CheckCompatibleRail() is only called for tiles which are known to contain a piece of rail. Simplify the function accordingly by eliminating unnecessary checks.
-Fix (?): Also fix an inconsistency in deciding what a compatible rail type is between level crossings and other rail tiles. It is unknown if this caused any problems.
2007-01-24 18:03:36 +00:00
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.
2007-01-24 07:14:09 +00:00
tron
5438336102
(svn r8320) -Fix
...
Simplify TrainPowerChanged() somewhat by eleminating code duplication
2007-01-21 18:46:19 +00:00
tron
81e88a2a7c
(svn r8276) -Fix
...
Change the signature of Swap() to be less error prone, i.e. pass the variables to be swapped by reference instead of passing pointers to the variables.
Just do Swap(x, y) instead of Swap(&x, &y). This prevents accidents when the variables are pointers.
2007-01-19 11:47:48 +00:00
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.
2007-01-14 19:57:49 +00:00
KUDr
92e42d621d
(svn r8110) -Codechange: direct Vehicle::current_order.type changes (to OT_LOADING and OT_LEAVESTATION) replaced by v->BeginLoading() and v->LeaveStation() calls. This should allow easy hooking of those state transitions in order to maintain vehicle loading queue.
2007-01-13 18:55:54 +00:00
celestar
c56ee62ade
(svn r8056) -Codechange: Remove swap_byte, swap_byte, and siblings (some were not used anyway) and replace them by our SwapT implementation
2007-01-11 12:32:10 +00:00
celestar
08de6b082a
(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().
2007-01-11 11:05:01 +00:00
rubidium
a7d0cdf95f
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
2007-01-10 18:56:51 +00:00
KUDr
07c30785ab
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
2007-01-10 18:12:09 +00:00