smatz
345f160978
(svn r12870) -Codechange: remove some magic numbers from u.ship.state handling
17 years ago
rubidium
6939569362
(svn r12855) -Codechange: do not use autoptr's for testing whether certain objects can be build, but check it directly in the pool so we do not have to call destructors in the testing phase. Stations still use the autoptr though.
17 years ago
peter1138
5dcd689f56
(svn r12824) -Codechange: Standardise routines for drawing vehicle images, using correct types and less duplication.
17 years ago
rubidium
22140d82c6
(svn r12818) -Codechange: make callbacks 31 and 37 behave like they do in TTDP according to frosch's survey.
17 years ago
rubidium
b139756e2b
(svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp
17 years ago
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.
17 years ago
rubidium
0e624275ee
(svn r12795) -Fix [FS#1938]: vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefor break downs now do not happen when loading.
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
smatz
059e94e355
(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
17 years ago
smatz
9488db56d4
(svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile()
17 years ago
rubidium
14b307a621
(svn r12698) -Codechange: skip orders to stations that do not have a train part anymore, just like is done for road vehicles and ships.
17 years ago
rubidium
570519d79b
(svn r12658) -Codechange: unify a vast portion of the CmdSend<VehicleType>ToDepot commands.
17 years ago
rubidium
62bdc381e7
(svn r12657) -Codechange: add 'FindClosestDepot' to the vehicle class.
17 years ago
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.
17 years ago
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.
17 years ago
rubidium
fb1c4eccd8
(svn r12593) -Codechange: hide Order's flags in most of the code.
17 years ago
rubidium
d6623cf654
(svn r12588) -Codechange: do not access the destination of an order directly.
17 years ago
rubidium
5b47f81b0f
(svn r12584) -Codechange: do not access the order type directly.
17 years ago
rubidium
5eb5889954
(svn r12578) -Codechange: merge the aircrafts ProcessOrder too into the 'unified' ProcessOrder.
17 years ago
rubidium
bdd64495cd
(svn r12575) -Codechange: unduplicate Process*Orders for trains, ships and road vehicles.
17 years ago
frosch
5e5e074a5d
(svn r12540) -Codechange: Enumify some values in original pathfinder and remove an unused variable.
17 years ago
frosch
15a9fba867
(svn r12531) -Codechange: Rename some variables for consistency.
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
2edd403656
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
17 years ago
rubidium
4a1035ab95
(svn r12488) -Codechange: split order.h into order_base.h and order_func.h.
17 years ago
rubidium
eeabab4555
(svn r12459) -Codechange: split news.h into news_type.h and news_func.h.
17 years ago
frosch
b7993793c8
(svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus().
17 years ago
frosch
f5929d413b
(svn r12193) -Codechange: Rename a magic variable, give it a decent type, and remove a 'goto'.
17 years ago
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
17 years ago
smatz
fd51465c8b
(svn r12132) -Cleanup: convert pathfinder selection from if/else to switch/case at many places
17 years ago
smatz
507728f46b
(svn r12129) -Change [FS#1759]: simplified patch settings for pathfinders (Yorick)
17 years ago
frosch
7b9efcea21
(svn r12085) -Fix(r12058): Road vehicles could get stuck, when NPF told them to reverse on junction tiles. (spotted by SmatZ)
17 years ago
glx
525409b0fc
(svn r12037) -Codechange: replace OnNewDay_(Aircraft|RoadVeh|Ship|Train) with an OnNewDay method in the Vehicle class
17 years ago
smatz
d6eaf1a11a
(svn r11962) -Cleanup: OPF is no longer used to update signals
17 years ago
smatz
1d59439166
(svn r11916) -Codechange: use enums from VehicleViewWindowWidgets instead of constants
...
-Fix: refit button widget was not correctly updated
17 years ago
smatz
ac7bc24b0e
(svn r11882) -Codechange: introduce MarkSingleVehicleDirty() and simplify the code at some places
17 years ago
rubidium
576f8ad93e
(svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*.
17 years ago
rubidium
dc87b05e8c
(svn r11834) -Codechange: only include settings_type.h if needed.
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
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.
17 years ago
rubidium
ac528411df
(svn r11818) -Codechange: split player.h into smaller pieces.
17 years ago
rubidium
998d7644f6
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
17 years ago
rubidium
46650c54b6
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
17 years ago
peter1138
a01fc4c142
(svn r11789) -Codechange: coding style for global variable names
17 years ago
rubidium
0e517fe023
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
17 years ago
rubidium
a8a3a7e3f2
(svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location.
17 years ago
rubidium
b0ac283aec
(svn r11774) -Change: do not include variables.h in a header when it is not needed.
17 years ago
rubidium
e5e75bd8f8
(svn r11719) -Codechange: split sound.h in a header with types and one with functions.
17 years ago
smatz
38f0e422ac
(svn r11707) -Fix: do not allow refitting flooded (destroyed) vehicles
17 years ago
rubidium
384503e7d3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
17 years ago
rubidium
b9046c97fb
(svn r11702) -Codechange: move all date related stuff to date*.
17 years ago
rubidium
2786d789a1
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.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
6a9e77e079
(svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
17 years ago
rubidium
9e9cfe6e59
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
17 years ago
rubidium
433a9f3c09
(svn r11675) -Codechange: split the string types from the string functions.
17 years ago
rubidium
5b49e75453
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
17 years ago
rubidium
5dc0e86d1b
(svn r11605) -Fix [FS#1482, FS#1523]: wrong count of Kirby trains when a ship was build.
17 years ago
skidd13
a91c2a4c39
(svn r11485) -Codechange: Remove the doubled function ToggleBitT and rename the remaining to fit with the naming style
17 years ago
skidd13
eeaa348f8b
(svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style
17 years ago
skidd13
5c31a973a1
(svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining 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
rubidium
f486486dd8
(svn r11365) -Fix [FS#1288]: when stopping a ship or aircraft, set their speed to 0 so they won't continue at the speed where they were stopped at.
17 years ago
rubidium
4bb210614b
(svn r11332) -Fix: vehicles getting a value of 0 on construction.
...
-Fix: assertion when selling vehicles.
17 years ago
rubidium
b6c9bc80cf
(svn r11229) -Fix [FS#1307]: one could sell vehicles that were crashed in a depot, which would still yield money.
17 years ago
rubidium
127c7c9b0f
(svn r11173) -Codechange: rename some callback enums so they are more uniform.
17 years ago
rubidium
38ff181ebf
(svn r11072) -Fix [FS#1045]: when a vehicle had a service order, the goto-depot button did not make it possible to stop the vehicle at that depot.
17 years ago
rubidium
2c8e50f20c
(svn r11017) -Codechange: unify determining whether a vehicle needs/can be service a little more.
17 years ago
rubidium
a407d53d1b
(svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot.
17 years ago
bjarni
a973c893fb
(svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias)
17 years ago
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.
17 years ago
rubidium
5bd241eb5b
(svn r10697) -Codechange: give a more sensible names to some of the unkX variables.
17 years ago
rubidium
efc7fdf2fd
(svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
17 years ago
rubidium
90f85c957a
(svn r10409) -Codechange: replace (Aircraft|RoadVeh|Ship|Train)_Tick with a Tick method in the Vehicle class.
18 years ago
rubidium
83a880c882
(svn r10408) -Codechange: make GetImage a class method of Vehicle instead of Get(Aircraft|RoadVeh|Ship|Train)Image.
18 years ago
peter1138
de357c74c1
(svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf)
18 years ago
maedhros
fb284a9264
(svn r10335) -Fix (r10331): Increment the current order index *after* using it in UpdateVehicleTimetable.
18 years ago
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.
18 years ago
maedhros
cf0118ee63
(svn r10236) -Feature: Introduce a form of timetabling for vehicles.
18 years ago
rubidium
2ee73b50b8
(svn r10208) -Codechange: replace int32 with Money where appropriate.
18 years ago
rubidium
49220cc6f1
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
18 years ago
rubidium
966e2738b9
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
18 years ago
rubidium
97b74fe4f2
(svn r10131) -Fix [FS#810]: when removing a dock, a ship will always try to reach the old location of the dock even when it cannot anymore because it the old location of the dock is now land instead of water.
18 years ago
rubidium
440d723d84
(svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile.
18 years ago
rubidium
42f920964b
(svn r9833) -Fix: also 'leave' the station when leaving for automatic servicing.
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
bc7d762196
(svn r9809) -Codechange: [NewGRF] Add callback 36 properties to purchase lists and add running cost changing for ships.
18 years ago
rubidium
2efecd34c4
(svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions.
18 years ago
rubidium
161786e222
(svn r9807) -Codechange: unify playing of sound when vehicle has been loaded and leaves the station.
18 years ago
peter1138
4591fb5b0d
(svn r9806) -Codechange: [NewGRF] Add callback 36 support for purchase cost, for all vehicle types.
18 years ago
rubidium
abbaa1691e
(svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle.
18 years ago
rubidium
981bf52bdd
(svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station.
18 years ago
rubidium
a4e045a3fb
(svn r9760) -Codechange: remove the need for saving some vehicle variables.
18 years ago
rubidium
ec9ac99d01
(svn r9755) -Codechange: refactor some more of the begin loading stuff.
18 years ago
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.
18 years ago
rubidium
6440440f12
(svn r9752) -Codechange: remove some duplication related to BeginLoading.
18 years ago
maedhros
02e770ff2c
(svn r9742) -Fix (r9689) [FS#739]: Fix cloning with refit costs again, hopefully for good this time.
18 years ago
maedhros
034f3591cf
(svn r9685) -Fix (r9683): Call v->LeaveStation() when a vehicle in a station is sent to a depot.
18 years ago
rubidium
80c259f64f
(svn r9672) -Cleanup: lots of coding style fixes around operands.
18 years ago
peter1138
41cf2fa69b
(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.
18 years ago
maedhros
ccaaa7d33a
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
18 years ago
belugas
dfe5533db6
(svn r9556) -Documentation: doxygen and comment-style changes. 'R', 'S'.. The end of the preliminary work is near
18 years ago
maedhros
eae03e0f72
(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.
18 years ago
belugas
06d3669bb5
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
18 years ago
peter1138
92486ac980
(svn r9259) -Codechange: NUM_CARGO isn't a valid cargo type...
18 years ago
bjarni
c2b7d0192d
(svn r9072) -Codechange: [Orders] added methods to orders to free them and check if they are in use
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
rubidium
24c4d5b06d
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
18 years ago
rubidium
36bb92ae24
(svn r9050) -Codechange: Foo(void) -> Foo()
18 years ago
maedhros
469fbc912c
(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.
18 years ago
maedhros
aadd8a4b44
(svn r8945) -Codechange: Rename v->load_status to v->vehicle_flags so it can be used for more than just the gradual loading status.
18 years ago
tron
1ce43c1a37
(svn r8897) -Fix
...
Change the signature of GetNewVehiclePos():
-void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp);
+GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v);
18 years ago
tron
696b895b77
(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.
18 years ago
rubidium
d1d1d170f3
(svn r8703) -Codechange/cleanup: some magic numbers -> enums and other small coding style changes to the ShipController and TrainController.
18 years ago
rubidium
4ec7eb2201
(svn r8701) -Codechange: replace magic numbers with enums for u.rail.track.
18 years ago
rubidium
a419f4aeda
(svn r8698) -Codechange: enumify the returns of VehicleEnterTile
18 years ago
bjarni
0c8078ae29
(svn r8661) -Fix: [depot windows] Enlarge the blocks in the depot window if a sprite is too big to fit (ships and aircraft only)
...
-Codechange: depot windows default now makes a 1x1 matrix and resize the window by block size*number of blocks
This will make less vehicle type specific code and easier to read resizing based on sprite sizes
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
tron
c326ff3795
(svn r8550) -Fix
...
Building a vehicle does not involve allocating orders, so do not check whether orders could be allocated
18 years ago
peter1138
60ddc05925
(svn r8434) -Fix (r8430): Missing braces caused compilation failure for some (most?) compilers...
18 years ago
tron
430e64c848
(svn r8430) -Fix
...
Replace the rather obscure control flow for handling aircraft/ship/train orders by something remotly comprehensible (see r3584)
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
KUDr
9bfb3f08d9
(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.
18 years ago
KUDr
dbe11fb9c7
(svn r8052) - Codechange: RemoveFirstTrack() and RemoveFirstTrackdir() now accept pointer to TrackBits/TrackdirBits instead of reference.
18 years ago
rubidium
f35ed4bbc2
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
18 years ago
KUDr
e373ea7096
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
18 years ago