|
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.
|
|
rubidium
|
r5374:b44d18526dee
|
18 years ago
|
|
|
|
matthijs
|
r5216:bdd3aa57475e
|
18 years ago
|
|
(svn r7331) - Codechange: Rename all memory pool macro's and types to "old pool", so the new pool implementation can be committed alongside it. - Codechange: Rename pool.[ch] to oldpool.[ch].
|
|
tron
|
r4987:5fa9645883e7
|
18 years ago
|
|
|
|
tron
|
r4977:7eee4b937913
|
18 years ago
|
|
|
|
Darkvater
|
r4912:d420151de4c6
|
18 years ago
|
|
(svn r6884) -Codechange: Add strict bounds checking in string formatting system. The last parameter should point to the end of the buffer (eg lastof(buf)) Courtesy of Tron.
|
|
peter1138
|
r4862:d628b8a0219f
|
18 years ago
|
|
|
|
Darkvater
|
r4845:2200ed004c20
|
18 years ago
|
|
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and IS_INTERACTIVE_PLAYER
|
|
bjarni
|
r4780:0ef30790502a
|
18 years ago
|
|
(svn r6694) -Fix: FS #361 Refit-to Order bug (only one of the two bugs mentioned there) -Now refit orders are copied when copying orders -Fixed an initilation issue where CT_INVALID was used instead of CT_NO_REFIT (resulted in crashes in the order window) -Fixed a compiler warning in the function to load TTD savegames
|
|
bjarni
|
r4735:2d797b218c5d
|
18 years ago
|
|
(svn r6647) -Fix: [vehicle list windows] Lists of shared orders are now no longer closed by a window event if the list is empty The window is now closed when the order is deleted. This is because removing windows from a window event is asking for problems
|
|
bjarni
|
r4715:52fbd16444f0
|
18 years ago
|
|
(svn r6627) -Fix r6624: fixed some warnings Now it happened again. Somebody got warnings, that I didn't get... I will look into this issue
|
|
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
|
|
rubidium
|
r4549:76b9213799ac
|
18 years ago
|
|
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform. -Cleanup: whitespace alignment of a few tables.
|
|
tron
|
r4534:e53a3d31c3a2
|
18 years ago
|
|
|
|
tron
|
r4533:cee891946037
|
18 years ago
|
|
|
|
tron
|
r4528:f8bacc36dd6b
|
18 years ago
|
|
(svn r6355) -Fix: Go to hangar orders for aircraft could get spuriously removed when a road or rail depot got deleted (Darkvater and me) This bug is probably ages old
|
|
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
|
|
truelight
|
r4392:143d079f55b6
|
18 years ago
|
|
|
|
truelight
|
r4391:418e95a851ff
|
18 years ago
|
|
(svn r6144) -Codechange: renamed OrderID to VehicleOrderID, because it had nothing to do with the Order-pool, but with the place of the order within the vehicle-order (hence its name) (part of FS #13, blathijs)
|
|
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
|
r4384:792750cf5e5e
|
18 years ago
|
|
(svn r6137) -Codechange: some very minor cleanups: - Start using DeleteXXX for every pool item, not manually doing it - Use some wrapper to improve logic - Rewrote some pieces to improve logic
|
|
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
|
r4350:2e384d520265
|
18 years ago
|
|
|
|
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
|
|
|
|
tron
|
r4177:5198a3a01c8a
|
18 years ago
|
|
|
|
tron
|
r4077:259c4c4aacad
|
18 years ago
|
|
|
|
tron
|
r4000:702cb45b8eab
|
18 years ago
|
|
|
|
peter1138
|
r3585:4dae9cd69c90
|
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()
|
|
Darkvater
|
r3222:303ed792a936
|
18 years ago
|
|
(svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space reservation in savegames and update where used - Also add this capability to settings
|
|
tron
|
r3140:72affb391e90
|
18 years ago
|
|
|
|
tron
|
r3139:fc4ce181eaee
|
18 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
|
|
celestar
|
r3123:3f0d39f0a427
|
18 years ago
|
|
(svn r3730) Multistop modifications: -Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory -Codechange: Increased maximum number of roadstops to 16. -Fix: Several conditions where a slot becomes unliked from a vehicle -Codechange: ClearSlot now only takes one parameter, the vehicle -Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only -Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around -Codechange: Adjusted debug levels TODO: Make the slot finder compatible with (a) pathfinder(s).
|
|
Darkvater
|
r3047:7f6140318561
|
18 years ago
|
|
|
|
tron
|
r2989:c7c58e254010
|
18 years ago
|
|
(svn r3564) Several smaller changes: - Don't treat non-booleans as booleans - Reduce variable scope - Bracing - Use DeMorgan's law to make conditionals easier to read - if cascade -> switch - Replace some magic numbers by symbolic names - Avoid assignments within other statements
|
|
tron
|
r2951:a52cbb930051
|
19 years ago
|
|
|
|
tron
|
r2817:7ad46034031f
|
19 years ago
|
|
|
|
tron
|
r2805:8bd12a3c66c1
|
19 years ago
|
|
|
|
tron
|
r2767:8b2ae5bad046
|
19 years ago
|
|
(svn r3313) Remove GPMI related changes from trunk Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
|
|
truelight
|
r2760:b021dc87dfb7
|
19 years ago
|
|
|
|
truelight
|
r2690:0922bb7912f6
|
19 years ago
|
|
(svn r3232) -Add: implemented the event-system for AIs -Add: added several hooks (event-callbacks) for road-related-stuff
|
|
truelight
|
r2685:a6ff7cfc7f7f
|
19 years ago
|
|
|
|
tron
|
r2645:1d4b7d6bde1a
|
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
|
r2617:c039ce1e1eeb
|
19 years ago
|
|
(svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too long trains -Trains will now remember the length of stations it visits and sell cars when being autoreplaced if they became too long -If it needs to remove cars, then it starts from the front and sells all it can find until the train is short enough -This only works for trains, that knows the station length of the route so a full uninterrupted run is needed -a train needs 1-2 runs to detect if the shortest station is expanded -This feature can be turned on and off in the train replace window and each company can have it's own setting -NOTE: minor savegame version bump
|
|
tron
|
r2549:1549d4b2ba28
|
19 years ago
|
|
(svn r3078) Some more stuff, which piled up: - const, whitespace, indentation, bracing, GB/SB, pointless casts - use the trinary operator where appropriate - data types (uint[] -> AcceptedCargo, ...) - if cascade -> switch - if (ptr) -> if (ptr != NULL) - DeMorgan's Law - Fix some comments - 0 -> '\0', change magic numbers to symbolic constants
|
|
Darkvater
|
r2433:404fea06bb41
|
19 years ago
|
|
|
|
tron
|
r2295:c68f860335d6
|
19 years ago
|
|
|
|
tron
|
r2186:5ee653b1b5e1
|
19 years ago
|
|
|
|
tron
|
r2163:ae001e2aa5b0
|
19 years ago
|
|
|
|
tron
|
r2140:efb49af98a17
|
19 years ago
|
|
|
|
ludde
|
r2089:dbbfefd5c61e
|
19 years ago
|
|
(svn r2599) Fix: Road vehicle multistop handling used NPF even if NPF was off???? - Also simplified/optimized the code. - Now it uses manhattan distance as an approximation instead of actual distance to find the distance. Much faster.
|
|
celestar
|
r1935:14189c6d6c9d
|
19 years ago
|
|
|
|
Darkvater
|
r1891:c5c5466afa35
|
19 years ago
|
|
|
|
hackykid
|
r1884:a82518e64689
|
19 years ago
|
|
|
|
Darkvater
|
r1881:ce1fe6a2816a
|
19 years ago
|
|
(svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big. - Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
|
|
tron
|
r1820:335b057adac7
|
19 years ago
|
|
|
|
Darkvater
|
r1796:4bbf4ea0805e
|
19 years ago
|
|
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands. - CodeChange: remove cmd-misuses CmdStartScenario() and CmdDestroyCompanyHQ() - Fix (invisible): when parameter checking CmdRestoreOrderIndex() the vehicle did not have its orders yet, so it would fail. So move doing this until AFTER the orders have been added back in RestoreVehicleOrders()
|
|
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
|
r1789:2b22ae28c0a9
|
19 years ago
|
|
|
|
Darkvater
|
r1786:f4dff9cc496a
|
19 years ago
|
|
(svn r2290) - CodeChange: protect the next batch of commands. This brings us to a total of 61, which is 53% :) - CodeChange: To correctly accept engine-prototypes, the best-player checking has been moved to its own function, I hope it functions the same as before. - CodeChange: Added symbolic types of PlayerID, OrderID and EngineID. For engines also added GetEngine() and IsEngineIndex(), similar to the other such functions. - CodeChange: To correctly build industries, some tables have been moved to build_industry.h. The only way to find out currently if an industry is valid in a climate is by looping all industries and checking if it matches. Also to comply with the patch setting build_rawmaterial_industries, it is assumed that these industries do not accept any cargo of any type. This can and probably should changed in the future to some flag in their struct. Also use _opt_ptr instead of _opt. - CodeChange: implemented the HQ checking code inspired by MarkR2 in "[ 1190944 ] Many commands not checked for security". Unfortunately it is impossible to prevent only deleting a HQ by a modified client atm. - CodeChange: For insert order and modify order their parameters are implicitely truncated to 8 bits, instead of the 16 bits said in the comments.
|
|
matthijs
|
r1760:a0f9705577ab
|
19 years ago
|
|
|
|
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.
|
|
Darkvater
|
r1733:d15ff13c6f6f
|
19 years ago
|
|
|
|
tron
|
r1718:0c13f342c6f1
|
19 years ago
|
|
(svn r2222) Check the parameters of Cmd{Insert,Delete,Modify,Skip}Order() and CmdRestoreOrderIndex(): - Check if the vehicle exists - Check if the vehicle belongs to the correct player - Check if the new order is valid (type, destination, flags) (CmdInsertOrder)
|
|
Darkvater
|
r1680:2e8a04c060c8
|
19 years ago
|
|
|
|
Darkvater
|
r1674:ed9934dcc719
|
19 years ago
|
|
|
|
Darkvater
|
r1673:27b1072cc091
|
19 years ago
|
|
|
|
truelight
|
r1314:8a8968a910c2
|
19 years ago
|
|
|
|
celestar
|
r1297:1fcdaa706a1e
|
19 years ago
|
|
|
|
truelight
|
r1266:eab492937b2b
|
19 years ago
|
|
(svn r1770) -Fix: Hopefully last pieces of code that are containing a station-id (and should be an uint16, not uint8)
|
|
matthijs
|
r1247:d01094dbcdcc
|
20 years ago
|
|
(svn r1751) - Feature: New PathFinder (NPF). - Supports trains, road vehicles and ships. - Uses A* pathfinding (same codebase as the new ai). - Currently unlimited search depth, so might perform badly on large maps/networks (especially ships). - Will always find a route if there is one. - Allows custom penalties for obstacles to be set in openttd.cfg (npf_ values). - With NPF enabled, ships can have orders that are very far apart. Be careful, this will break (ships get lost) when the old pathfinder is used again. - Feature: Disabling 90 degree turns for trains and ships. - Requires NPF to be enabled. - Ships and trains can no longer make weird 90 degree turns on tile borders. - Codechange: Removed table/directions.h. - table/directions.h contained ugly static tables but was included more than once. The tables, along with a few new ones are in npf.[ch] now. Better suggestions for a location? - Fix: Binary heap in queue.c did not allocate enough space, resulting in a segfault. - Codechange: Rewritten FindFirstBit2x64, added KillFirstBit2x64. - Codechange: Introduced constant INVALID_TILE, to replace the usage of 0 as an invalid tile. Also replaces TILE_WRAPPED. - Codechange: Moved TileAddWrap() to map.[ch] - Add TileIndexDiffCByDir(), TileIndexDiffCByDir(). - Codechange: Moved IsTrainStationTile() to station.h - Add: IsRoadStationTile() and GetRoadStationDir().
|
|
tron
|
r1245:eb9b943bd917
|
20 years ago
|
|
|
|
celestar
|
r1217:1f9b7fc00eb8
|
20 years ago
|
|
(svn r1721) -Feature: It is now possible to build multiple road stations (up to 8) on a single station. Thanks to: Truelight for the saveload code, Darkvater and Hackykid for network testing and Tron for proof-reading 1500 lines of diff.
|
|
truelight
|
r1111:39ac8836ceda
|
20 years ago
|
|
|
|
truelight
|
r1106:1a5719b58086
|
20 years ago
|
|
(svn r1607) -Fix: When deleting an order, the next pointer was not cleared, resulting in some unusual behavoir from time to time
|
|
tron
|
r1093:18f56ef2d029
|
20 years ago
|
|
|
|
Celestar
|
r1055:d8dd84883c6f
|
20 years ago
|
|
|
|
celestar
|
r1053:58d626056498
|
20 years ago
|
|
(svn r1554) -Fix: [ 1103187 ] Order Check messages are now validated before displayed, so that there are no stray error messages any more. -Feature/Fix: Order Checking is only execute for ONE vehicle in an order-share system
|
|
truelight
|
r1043:4bce03f32f7e
|
20 years ago
|
|
(svn r1544) -Fix: SwapOrder did not use AssignOrder, which caused the saveroutine to crash from time to time -Codechange: added const before 'Order *' where possible
|
|
truelight
|
r1024:c7c4672d839e
|
20 years ago
|
|
(svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic. -Codechange: renamed all 'schedule' stuff to 'order(list)' -Codechange: moved all order-stuff to order_cmd.c / order.h -Codechange: vehicles that share orders are now linked to eachother with next_shared/prev_shared in Vehicle
Developers: please use AssignOrder to assign data to an order. If not, you _WILL_ make the save-routine to assert!
|
|
celestar
|
r1020:1bd74d43db9b
|
20 years ago
|
|
(svn r1521) -Fix: Ship Vehicle Lists are now redrawn correctly -Codechange: added some const to last commit -Codechange: Ship and Aircraft lists are now update on order change, not on new day
|
|
truelight
|
r919:57ef81f1ba8e
|
20 years ago
|
|
(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries (in prepare of dynamic arrays): - DEREF_XXX is changed into GetXXX - All direct call are directed via GetXXX - struct Industry has now an index-field - ENUM'd some stuff - Replaced home built loops with FOR_ALL_XXX - Added _stations_size, _vehicles_size, ... which gives the length of the array (which will be dynamic in the near future) - Changed lengtof(XXX) to _XXX_size (e.g. _stations_size) - Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX) - Made the sort-functions of all 4 dynamic - Made all 4 Initialize functions more of the same - Some minor tab-fixing and stuff (tnx to Tron for proof-reading my 100kb patch ;))
Note for all: please do NOT directly call _stations, _vehicles, _towns and _industries, but use the right wrapper to access them. Thank you. Ps: please also do not use 'v++', where v is of type Vehicle *.
|
|
miham
|
r826:aad8f888bce1
|
20 years ago
|
|
|
|
truelight
|
r824:c450b6e01537
|
20 years ago
|
|
(svn r1295) -Fix: [ 1092499 ] Copy order was fucked up, because memcpy said: sizeof(uint16), instead of sizeof(Order).
|
|
tron
|
r725:ac378a900e28
|
20 years ago
|
|
|
|
truelight
|
r723:1dd2bc613c1c
|
20 years ago
|
|
(svn r1175) -Fix: [ 1086375 ] Backup-order-list was not closed with an OT_NOTHING, resulting in order-lists mixing together (maybe tnx to Darkvater, not sure though..)
|
|
dominik
|
r712:d1bae62b20c3
|
20 years ago
|
|
|
|
dominik
|
r711:e4c247b0e85b
|
20 years ago
|
|
|
|
tron
|
r588:c0748f0d2104
|
20 years ago
|
|
(svn r1009) -Feature: per-station vehicle lists This adds a little button per vehicle class to the station window which opens a list of all vehicles that have this station on their schedule. As side effect this gets rid of some global variables.
|
|
tron
|
r555:cefc6ad212ed
|
20 years ago
|
|
(svn r955) Replace uint16 for orders with struct Order This adds no functionality, but is a stepping stone for future improvement (like 16bit order indices) and is easier to read. This changes preserves binary compatibility wrt savegames.
|
|
truelight
|
r543:efdb197f91ad
|
20 years ago
|
|
|
|
tron
|
r534:46e9db8de483
|
20 years ago
|
|
(svn r901) Small step in the process to clean up the DPARAM mess: - reduce to 2 sizes (*DParam64 for 64bit values, *DParam for the rest) - use inline functions instead of macros - add assert()s to check for buffer overruns
|
|
tron
|
r507:b1b0a0a3c313
|
20 years ago
|
|
(svn r815) Include strings.h only in the files which need it. This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
|
|
celestar
|
r340:ee9642432426
|
20 years ago
|
|
|