Commit Graph

36 Commits (b5fe577523f25765888b2b813107e98e3f8bb069)

Author SHA1 Message Date
rubidium 21ac20aeca (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
18 years ago
tron d5e5a78cf4 (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
18 years ago
bjarni c820704f11 (svn r6227) -Codechange: added window type flags to use with PlayerVehWndProc
this makes the list type detection much easier and allowed an if cascade to be turned into a switch case
	this also makes it easier to add more list types
18 years ago
truelight 6e96dec3a8 (svn r6176) -Fix r6052: I assumed an typedefd enum would be an uint8, which is a really stupid thing to assume.
This caused nasty endian bugs. Thank you SO MUCH Osai for all your time in debugging this!! And tnx Rubidium for spotting :)
18 years ago
bjarni 3af65b79e7 (svn r6167) -Code cleanup r6161: replaced some uint16 with OrderID and (1 << 8) with SHARE_FLAG 18 years ago
bjarni f938db6619 (svn r6161) -Feature: List of vehicles with the same shared orders
the list is available in the orders window and looks like the list buttons from the station windows (small vehicle)
   The button is disabled if the vehicle do not have any shared orders or it got shared orders, but an empty order list
   based on a patch by nycom, thought it ended up getting heavily modified
   Thanks to TrueLight for proofreading and suggestions
18 years ago
truelight 43f53ca4fd (svn r6145) -Codechange: added OrderID to indicate Order indexes out of the pool 18 years ago
truelight b17d389667 (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)
18 years ago
truelight 65f5ec13f6 (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)
18 years ago
truelight 44e5e7f0e4 (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
18 years ago
truelight 15aff22c96 (svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
It isn't the best name, but we couldn't find any better.
  This unifies the pool-system even more.
18 years ago
truelight bdc1d681a7 (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
18 years ago
truelight 505566da5c (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.
18 years ago
rubidium 908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
Darkvater d155f182ac (svn r4131) - CodeChange: Add proper semantics for StationID for such variables instead of using the general uint16-type. StationID was added for depots, waypoints and stations where necessary. We probably need to change GetDepot(), IsDepotIndex(), IsStationIndex(), GetWaypoint() and IsWaypointIndex() as well to use StationID. 19 years ago
peter1138 fca5823238 (svn r3805) - [FS#62] Fix doxygen comments to refer to the correct parameter. (sulai) 19 years ago
tron ca0862c3f4 (svn r3758) Remove the news validation callback. It is superseded by r3757. 19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
tron 81e5b16d71 (svn r3172) static, const 19 years ago
Darkvater 95eefa8d8d (svn r2959) - Fix: [ 1266036 ] Fix [ 1236317 ] Vehicles with and TRANSFER order don't have that order restored (i_dachev). Also disallow non-train type vehicles to have non-stop orders. 19 years ago
celestar 1e67dfffe7 (svn r2732) -Codechange: Cleaned the order flags some more. Hit some inconsistencies while trying to locate bug 1244167 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron 71140a5768 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
tron f09638ad3d (svn r2650) Convert many explicit shifts+ands to extract bits to invocations of GB - should be a bit nicer to read 19 years ago
celestar c7de834059 (svn r2441) -Feature: You can now give transfer order to set up feeder systems 19 years ago
hackykid 2f1a224ea9 (svn r2390) - Codechange: Fix some warnings on GCC 4.0.0 19 years ago
Darkvater ddd4958164 (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()
19 years ago
Darkvater b43331c931 (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.
19 years ago
pasky c68e9478fe (svn r2119) - Fix: [ 1172878 ] Trains "Go to depot" button: click twice skip to next order (patch by Loic GUILLOUX). I also added short explanation of OF_/OFB_ difference to order.h. 20 years ago
celestar a9c0a173bf (svn r2034) -Codechange: Replaced the rather meaningless LOAD and UNLOAD flags for depots by something more meaningful 20 years ago
truelight 79d1ed2c66 (svn r1818) -Add: Dynamic orders (up to 64k orders) 20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
celestar 6330806531 (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
20 years ago
truelight 07647737d5 (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
20 years ago
truelight 7cafdf3b0b (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!
20 years ago