|
Darkvater
|
r5380:f5fecf6b34ff
|
18 years ago
|
|
(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to use in debug.h. grfmsg() is now used as a specific debug-function for grf.
|
|
bjarni
|
r5259:879d5ddf2469
|
18 years ago
|
|
|
|
bjarni
|
r5256:f114a289aae7
|
18 years ago
|
|
(svn r7386) -Codechange r7385: moved deletion of the vehicle highlight from DeleteVehicle to the sell commands as they are not called as often Also added a return to the window loop prevent looking at the rest of the windows once the right depot window is found
|
|
peter1138
|
r5215:5975e06c9f82
|
18 years ago
|
|
(svn r7330) -Fix (r7304): Data invalidation doesn't always happen as the local player, resulting in an empty vehicle purchase list. Specify the player as an argument to IsEngineBuildable()
|
|
peter1138
|
r5211:4adf6d7ce809
|
18 years ago
|
|
|
|
Darkvater
|
r5198:a9d28c18fa51
|
18 years ago
|
|
(svn r7313) -Codechange: Calling invalidate data on a window will surely warrant a redraw, so call that after the WE_INVALIDATE_DATA event and remove (some of) the superflouous calls.
|
|
Darkvater
|
r4845:2200ed004c20
|
18 years ago
|
|
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and IS_INTERACTIVE_PLAYER
|
|
bjarni
|
r4739:596230f43fa6
|
18 years ago
|
|
(svn r6651) -Coding feature: added the windowevent WE_INVALIDATE_DATA This gives the ability to invalidate some window data and recalculate as needed instead of doing it for each WE_PAINT
This event is called right away when using InvalidateWindowData(), so it may be a good idea to set a bool or similar in the window or similar and then act on that bool in WE_PAINT instead of doing a lot of stuff in WE_INVALIDATE_DATA as it might be called more than once before WE_PAINT is called
InvalidateWindowData() will not automatically repaint the window, so if you want to repaint it as well, you need to mark it dirty as well.
Made the depot windows use WE_INVALIDATE_DATA to set when to generate the engine and wagon lists instead of at each redraw It makes no sense to regenerate the list when say using the scrollbar if we know that no vehicle have entered or left the list
NOTE: currently there is a piece of code to generate the list when it's not needed and compare it to the stored list and assert if they mismatch This check is somewhat slow and kills the whole idea of WE_INVALIDATE_DATA, so it's a short lived one to verify that InvalidateWindowData() is used everywhere where it's needed
|
|
bjarni
|
r4725:3a289e38fda7
|
18 years ago
|
|
(svn r6637) -Codechange: merged all (vehicle type)EnterDepot into VehicleEnterDepot() This revealed duplicated code like aircraft lists got invalidated twice Moved invalidation of the vehicle detail window to VehicleServiceInDepot() as it should always be updated when serviced
|
|
bjarni
|
r4712:ace1fd623579
|
18 years ago
|
|
(svn r6624) -Feature: added ability to add refit commands to vehicle orders (can only be done in goto depot orders) Example: make a train transport iron ore from A to B, then it visits a depot and refits to steel It then transport steel back to A or near A if there is a factory and then it visits another depot to refit to iron ore again
This is controlled in the orders. If a goto depot order is lightlighted, then "Unload" changes to "Refit" Control click "Refit" removes the refit part of the order (as the tooltip says) The player will still pay the normal refit costs
Known issues: If a vehicle is not in a depot, then the refit window will fail to tell refitted cargo capacity Refit costs in the refit window can sometimes print 0 when it should not because the refit calculation is unaware that the vehicle will be refitted in between
Warning: autoreplace got a protection against replacing something so you get a new cargo type, but it can fail here. In the iron ore/steel example, it can see that the vehicle carries iron ore and the new one can be refitted to iron ore, then it will replace. It will not check to see that it's valid for steel as well. This is something to look into in the future
|
|
peter1138
|
r4656:515f0929a2ed
|
18 years ago
|
|
|
|
bjarni
|
r4574:26f71b3f860b
|
18 years ago
|
|
(svn r6424) -Codechange: [autoreplace] removed a loop though all vehicles from each time the window is redrawn To do this, the player struct contains an array, that contains the count of each engine type that the player owns Those arrays are updated each time a vehicle is build or deleted and is calculated on load (it's not saved) It's possible to access the arrays outside of the autoreplace GUI, so feel free to read from them in other patches as well
|
|
Darkvater
|
r4559:2222e3ea9700
|
18 years ago
|
|
(svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts DiagDirections, and add TileOffsByDir that handles Directions. -Codechange: Make the treeloop use TileOffsByDir().
|
|
Darkvater
|
r4546:198accac2b54
|
18 years ago
|
|
|
|
bjarni
|
r4544:bbf9de0440c4
|
18 years ago
|
|
(svn r6376) -Codechange: [vehicle refit] moved all refit cost calculations into GetRefitCost() Now it's possible to tell refit costs for an EngineID without actually having build a vehicle
|
|
bjarni
|
r4529:84a5b56d0fde
|
18 years ago
|
|
(svn r6356) -Fix: FS #263 planes come out of hangar and drive back into hangar Now all vehicles are serviced when it's time for service and they are in a depot This will avoid the goto depot order from ever showing up when in a depot
|
|
tron
|
r4527:4b01e6756ce8
|
18 years ago
|
|
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
|
|
bjarni
|
r4526:8edbf5fcc720
|
18 years ago
|
|
(svn r6352) -Fix: FS #322 Send to depot bug now vehicles can't be sent to a depot when they are already inside a depot before they would remember the order and try to turn around when leaving the depot
|
|
bjarni
|
r4519:941e422364b6
|
18 years ago
|
|
|
|
bjarni
|
r4510:1f7088f2548e
|
18 years ago
|
|
|
|
bjarni
|
r4506:98668beebd0e
|
18 years ago
|
|
(svn r6291) -Feature: Vehicle lists from the station window now also got the goto depot button -Codechange: unified the code for mass goto depot to avoid duplicated code -Fix: Vehicles already on the way to depots will not be cancelled by mass goto depot (made it really hard to send all vehicles at once)
|
|
bjarni
|
r4463:83cb78b50982
|
18 years ago
|
|
(svn r6246) -Feature: added the many times requested "send all vehicle to depot" button it's located in the vehicle list screen and does the same as in the shared orders window (send all vehicles in list to a depot) it will still not inform the player if a vehicle failed to find a depot, so don't take for granted that all of them go
|
|
bjarni
|
r4451:73bac51a088c
|
18 years ago
|
|
(svn r6229) -Feature: Shared order lists now got a "goto depot" button this will try to send all vehicles in the list to depots/hangars currently if one fails to find a depot, it will not tell the player
|
|
bjarni
|
r4412:141c517ed974
|
18 years ago
|
|
(svn r6165) -Feature: control click Goto Depot will now make the vehicle service at the depot and leave right away. To tell the difference the status of stopping vehicles will be in red, while servicing vehicles will be green. -Codechange: remove some dead code in CmdSendAircraftToHangar() since it is conflicting with new functionality. Now p2 means the same for all types
|
|
truelight
|
r4389:7f4a6b884ac1
|
18 years ago
|
|
(svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore) -Codechange: introduced DestinationID, which is in fact an union of several types Used in Order struct, so no longer StationID is abused for all targets. Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
|
|
truelight
|
r4352:460a517b040f
|
18 years ago
|
|
(svn r6053) -Codechange: renamed all IsXXXIndex to IsValidXXXID -Codechange: IsValidXXXID now also checks if XXX is really valid, not if the number is within range Both changes again in preperation of the new mem-pool system, which requires this. IsValidXXXID is not a bit less pretty, but that will be cleaned up after the new mem-pool system
|
|
truelight
|
r4351:04a502e12263
|
18 years ago
|
|
(svn r6052) -Codechange: change OrderType (order->type) in a typedef -Codechange: renamed DeleteDestinationFromVehicleOrder to RemoveOrderFromAllVehicles to reflect his function better -Codechange: changed the params of RemoveOrderFromAllVehicles, to avoid unneeded variable-creation
|
|
truelight
|
r4346:fa4ac6b6f852
|
18 years ago
|
|
(svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones -Codechange: use IsValidXXX where ever possible Note: both changes to prepare for new pool system, which needs those changes. For every pool there are 2 ugly lines, which will be removed when done implementing new pool system. Based on FS #13 by blathijs, partly implemented.
|
|
rubidium
|
r4344:bff007ae1fd1
|
18 years ago
|
|
|
|
rubidium
|
r4329:7372b441f7d8
|
18 years ago
|
|
|
|
rubidium
|
r4293:cbb984a32af5
|
18 years ago
|
|
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920 -Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
|
|
rubidium
|
r4261:8c2d0c75e37a
|
18 years ago
|
|
(svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch] -Cleanup: fix whitespace related coding style issues in date.[ch] -Cleanup: make original comments doxygen compatible and remove/change outdated comments
|
|
peter1138
|
r4244:0db718156ac2
|
18 years ago
|
|
|
|
peter1138
|
r4242:29617c3b8aef
|
18 years ago
|
|
|
|
peter1138
|
r4095:750395d74930
|
18 years ago
|
|
|
|
peter1138
|
r3989:f8c90199c7c6
|
18 years ago
|
|
|
|
tron
|
r3961:9417a3ee0930
|
18 years ago
|
|
|
|
peter1138
|
r3955:a2e268f7b669
|
18 years ago
|
|
|
|
peter1138
|
r3954:667f1e8cf285
|
18 years ago
|
|
|
|
tron
|
r3948:4c986a48e294
|
18 years ago
|
|
|
|
KUDr
|
r3947:0548e1680240
|
18 years ago
|
|
|
|
KUDr
|
r3900:1c2675abec23
|
18 years ago
|
|
|
|
peter1138
|
r3870:7faba1c65129
|
18 years ago
|
|
|
|
bjarni
|
r3816:1e2588e55d0e
|
18 years ago
|
|
(svn r4826) -Fix: [autoreplace] fixed possible problem when autoreplacing and was number of vehicles (of a type, not total) was reached now the new vehicle gets the same number as the old one, completely removing the problem where we could run out of numbers since we don't have to find free numbers for the new vehicles, autoreplace should be somewhat faster, specially in late games NOTE: in CmdBuildRailVehicle(), bit 0 and 1 in p2 have been switched to make the meaning of bit 0 consistent with the other build commands. CmdCloneVehicle() is modified to follow this as well
|
|
tron
|
r3645:de3cfb719308
|
18 years ago
|
|
|
|
celestar
|
r3610:66358bc032ee
|
18 years ago
|
|
|
|
tron
|
r3491:10ed78e15d31
|
18 years ago
|
|
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex Remove DoCommandByTile(), because now it does the same as DoCommand()
|
|
tron
|
r3476:32ff3cb7b59c
|
18 years ago
|
|
|
|
celestar
|
r3472:13437b90c3b9
|
19 years ago
|
|
|
|
celestar
|
r3454:602e60e8ee9a
|
19 years ago
|
|
|
|
celestar
|
r3442:ef1664c75473
|
19 years ago
|
|
|
|
celestar
|
r3421:37cf03a40408
|
19 years ago
|
|
|
|
tron
|
r3186:1fd95105062c
|
19 years ago
|
|
|
|
tron
|
r3157:d2dcc469a38b
|
19 years ago
|
|
|
|
tron
|
r3147:5edf25fbd66a
|
19 years ago
|
|
|
|
tron
|
r3140:72affb391e90
|
19 years ago
|
|
|
|
tron
|
r3139:fc4ce181eaee
|
19 years ago
|
|
(svn r3757) -Feature: Delete news items about vehicles, when they get stale This is used to delete - all news about a vehicle, when it gets deleted - "vehicle has stopped in depot" news, when it gets started - "vehicle has invalid orders" news, when the orders get changed
|
|
tron
|
r3005:f513fb8e8842
|
19 years ago
|
|
|
|
peter1138
|
r2962:16f2ef02fde1
|
19 years ago
|
|
|
|
Darkvater
|
r2916:04b29c805eb5
|
19 years ago
|
|
(svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron)
(svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron) - The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
|
|
bjarni
|
r2854:cad4401b950e
|
19 years ago
|
|
|
|
tron
|
r2819:50c046aedc63
|
19 years ago
|
|
(svn r3367) Unify the 4 distinct CMD_CHANGE_{AIRCRAFT,ROADVEH,SHIP,TRAIN}_SERVICE_INT commands into one CMD_CHANGE_SERVICE_INT command. As side effect this is a -Fix: The default AI tried to change the service intervals of vehicles via the CMD_CHANGE_TRAIN_SERVICE_INT command - regardless of the type of the vehicle - which of course failed for non-trains
|
|
tron
|
r2817:7ad46034031f
|
19 years ago
|
|
|
|
peter1138
|
r2804:3b67e793a55f
|
19 years ago
|
|
|
|
tron
|
r2791:24fbb20c581c
|
19 years ago
|
|
|
|
peter1138
|
r2704:d6b47e3c8810
|
19 years ago
|
|
|
|
tron
|
r2662:0bfdca18c20e
|
19 years ago
|
|
|
|
tron
|
r2639:e298192a7c03
|
19 years ago
|
|
(svn r3181) -Bracing -Indentation -Whitespace -DeMorgan's Law -Test with NULL or 0 for non-booleans -'\0' instead of 0 for chars -Remove redundantly redundant comments (like DoFoo(); // Do foo) -Join multiple short lines with a single statement -Split single lines with multiple statements -Avoid assignments in if
|
|
tron
|
r2635:2b74892d089b
|
19 years ago
|
|
|
|
tron
|
r2630:73464cd368d6
|
19 years ago
|
|
|
|
bjarni
|
r2618:5ad1905378d9
|
19 years ago
|
|
(svn r3156) -Fix: removed some cases where autoreplace windows were redrawn when nothing was changed due to the FOR_ALL_VEHICLES(), redrawing those windows are slow
|
|
bjarni
|
r2574:7236c646b1d7
|
19 years ago
|
|
(svn r3111) -Fix: [autoreplace] [ 1341783 ] Assertion failure in vehicle.c line 378 running MaybeReplaceVehicle() is now delayed until after the loop in CallVehicleTicks() This avoids selling the vehicle the loop currently works with (and continues to work with afterwards)
|
|
bjarni
|
r2568:2fc6d6725d53
|
19 years ago
|
|
|
|
bjarni
|
r2567:a475d65e5a9c
|
19 years ago
|
|
|
|
bjarni
|
r2564:f7dd789275f9
|
19 years ago
|
|
(svn r3101) -Codechange: added _new_vehicle_id this var works like _new_train_id and the rest of that kind of vars, except it is set each time a vehicle is build, nomatter what type this is a nice tool to code vehicle independent code, which in turn can reduce code duplication Right now it's used in ReplaceVehicle() and CmdCloneVehicle()
|
|
tron
|
r2557:b3e50cfde797
|
19 years ago
|
|
|
|
bjarni
|
r2552:89bd3d50b470
|
19 years ago
|
|
(svn r3081) -Codechange: [autoreplace] complete rewrite of autoreplace this is a complete rewrite, that makes use of existing commands like build and sell this means that multiheaded train engines are replaced correctly
|
|
tron
|
r2477:1fce8206d479
|
19 years ago
|
|
|
|
peter1138
|
r2464:a76823f2fdc5
|
19 years ago
|
|
|
|
celestar
|
r2214:59bf23688ead
|
19 years ago
|
|
|
|
tron
|
r2186:5ee653b1b5e1
|
19 years ago
|
|
|
|
tron
|
r2163:ae001e2aa5b0
|
19 years ago
|
|
|
|
tron
|
r2159:2c706fe6b0a7
|
19 years ago
|
|
|
|
tron
|
r2150:8d17c2dcd791
|
19 years ago
|
|
|
|
tron
|
r2049:7e26d55f0f4c
|
19 years ago
|
|
|
|
hackykid
|
r2008:5e435ad4c8e4
|
19 years ago
|
|
(svn r2516) - Feature: [pbs] Implement path-based-signalling. This allows multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal. - Feature: [pbs] Implement autoplacement of pbs blocks, when a block has an entry and an exit pbs signal, covert the entire block to pbs. Can be turned off in the patch settings. - Feature: [pbs] Allow showing of reserved status by making the tracks darker, when the pbs debug level is at least 1.
|
|
matthijs
|
r2006:bc0d47d1f3f0
|
19 years ago
|
|
(svn r2514) - Codechange: [NPF] Move the checking of railtype into a funciton IsCompatibleRail(). - Codechange: [NPF] Check the railtype along a route against the engine type instead of against the previouse tile. This clears the way for electriefied rails. - Add: [NPF] [ 1209644 ] A penalty for crossings (peter1138)
|
|
tron
|
r1998:57add07880e8
|
19 years ago
|
|
|
|
tron
|
r1980:3622a0cd06c2
|
19 years ago
|
|
|
|
tron
|
r1977:1f8b99c96041
|
19 years ago
|
|
|
|
matthijs
|
r1942:ea8e39498c72
|
19 years ago
|
|
(svn r2448) General cleanup of rail related code, more to follow. * Add: rail.[ch] for rail-related enums and wrapper functions. * Codechange: Removed dozens of magic numbers with below enums. * Codechange: Rewrote CheckTrackCombination(). * Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants. * Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays. * Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones). * Add: enums Direction and DiagDirection * Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch]. * Codechange: move RailType enum from tile.h to rail.h. * Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack. * Add: Wrapper functions to access rail tiles, using above enums * Add: Wrapper functions to modify tracks, trackdirs, directions, etc. * Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code) * Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.). * Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead. * Codechange: [NPF] Removed some unused globals and code from npf.c.
|
|
tron
|
r1926:ff7c3132a421
|
19 years ago
|
|
|
|
tron
|
r1901:e806afa50723
|
19 years ago
|
|
|
|
Darkvater
|
r1891:c5c5466afa35
|
19 years ago
|
|
|
|
Darkvater
|
r1802:acc0f0bda113
|
19 years ago
|
|
|
|
Darkvater
|
r1793:7bff71353e69
|
19 years ago
|
|
(svn r2297) - CodeChange: server-check the next batch of commands. - CodeChange: since only the server will be able to modify difficulty settings, leave the checking of correct values besides, and trust users will join legit servers. - CodeChange: for renaming signs, only check if GetDParam(); eg _decode_parameters is empty ('\0') or not, instead of the extra check of players, etc. That basically does the same thing. Also dirty sign two times when renaming, once before, once after the action. Because if the name becomes shorter and you update only after, garbage remains on the screen. - CodeChange: made GetMaskOfTownActions() available to the town-cmd to double-check if the action was available to the player. For this purpose the hardcoded _local_player has been removed from the function and is now passed as a parameter.
|
|
Darkvater
|
r1790:aafbb2ff1ae7
|
19 years ago
|
|
|
|
matthijs
|
r1757:b34f78174975
|
19 years ago
|
|
(svn r2261) - Fix: When crashed vehicles try to find a depot for servicing, openttd asserts. Crashed vehicles shouldn't find depots anyway...
|
|
matthijs
|
r1752:e339152fbe8d
|
19 years ago
|
|
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx) - Add: GetVehicleTrackdir() helper function. - Codechange: Moved SortStruct from vehicle_gui.h to ttd.h, so the dependency from vehicle.h on vehicle_gui.h could be removed. - Codechange: Typedeffed the VehicleTypes struct so it can be used as the type for Vehicle.type instead of "byte". - Codechange: Removed prototype for VehicleSorter(), which had no implementation anymore and was never called.
|
|
matthijs
|
r1751:242d46045f3b
|
19 years ago
|
|
(svn r2255) - Fix: [ 9680363 ] [NPF] Broken buoy handling for ships Buoys will now try to get within 3 tiles of a buoy instead of a the actual buoy tile. This gets ships to got past buoys in a realistic (IMO) way instead of barging right through them. - Fix: [NPF] Trains get curves penalties sometimes even when the track is straight. - Add: [NPF] Ships get a penalty for going over buoys now, so they will try to go around. - Add: [NPF] Ships get a penalty for curves too, yay for straight lines. - Add: TrackdirToTrack(), TrackToTrackdir(), IsDiagonalTrack() and IsDiagonalTrackdir() helper functions. - Add: IsBuoy() and IsBuoyTile() helper functions. - Codechange: Rearranged part of the control flow of ShipController(), removing a goto.
|