Commit Graph

68 Commits

Author SHA1 Message Date
tron 66bf4f863d (svn r3049) Replace byte/int/uint by RailType where appropriate 2005-10-16 09:13:04 +00:00
tron ab657338ec (svn r3048) Replace 0/1/2 by RAILTYPE_RAIL/MONO/MAGLEV where appropriate 2005-10-16 07:58:15 +00:00
tron 0cc45ecd8e (svn r3003) Change int, uint, uin16 and byte to EngineID where appropriate, plus some related changes (mostly casts) 2005-10-01 12:43:34 +00:00
tron ff30404170 (svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1 2005-09-27 18:51:04 +00:00
tron c76f01b6ff (svn r2988) static where static is due 2005-09-26 13:38:12 +00:00
peter1138 9c2700b14c (svn r2974) -Fix: Drag and drop selection on drop down boxes didn't select correct item when some items were hidden.
-Separate disabled and hidden masks in drop downs to support both hidden and disabled items.
2005-09-23 07:44:03 +00:00
Darkvater 8e6a911700 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
2005-09-18 20:56:44 +00:00
Darkvater 74f0c8b55a (svn r2901) Refix 'replace window' with wrong string-etc. coordinates. Also clean up, and make window-title a bit more meaningful (specify vehicle type replaced) 2005-08-29 22:27:22 +00:00
Darkvater 7a184a0ea3 (svn r2880) Fix graphical glitch in replace window (text at wrong coordinates) 2005-08-20 21:16:46 +00:00
bjarni ed8e2bac04 (svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to serverside
-This means that one company can only have one setting for renew and replacing
    more clients will not fight due to different settings anymore
  -This is a needed step in the line to fix autoreplacing dualheaded locomotives
  NOTE: savegame revision bump (peter1138 + me in coop)
2005-08-06 16:07:22 +00:00
tron 747a0f6a55 (svn r2812) Move variables, which only vehicle_gui.c needs to know about, there 2005-08-05 20:22:06 +00:00
bjarni 6f74bbaeec (svn r2724) -Fix: [Autoreplace] made the pulldown menu read GetPlayer(_local_player)->avail_railtypes - this removes the need for updating this code if we add more railtypes and it also allows the menu to show maglev when monorail is not available 2005-07-27 10:11:45 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron 559babcdc9 (svn r2673) Include functions.h directly, not globally via openttd.h 2005-07-22 07:02:20 +00:00
tron 0762aa9ec9 (svn r2669) Shuffle some more stuff around to reduce dependencies 2005-07-21 22:15:02 +00:00
tron e53c4db866 (svn r2664) Remove depedency on player.h from variables.h 2005-07-21 19:36:43 +00:00
tron fa8f46c0b7 (svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[] 2005-06-07 18:13:49 +00:00
hackykid 0d926eee37 (svn r2429) - Fix: Oops, forgot to increase the size of the autoreplace window to fit the extra info from powered wagons. 2005-06-07 01:21:56 +00:00
hackykid 09aadafda1 (svn r2413) - Codechange: Rewrite the displaying of purchase details a bit, make it easyer to add lines later.
- Add: In the purchase details for trains display "(refittable)" after the capacity if the vehicle is refittable.
2005-06-05 23:01:10 +00:00
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 2005-06-02 19:30:21 +00:00
hackykid d90948abb7 (svn r2365) - Change: [refitting] Make refitting capacities for trains newgrf compatible. Train vehicles can now carry twice as much mail/goods as other cargo, and four times as much passengers.
- Fix: [refitting] The refit window now shows the correct refit options for the entire consist. Only if at least one of the vehicles in the train can be refitted to a certain cargo, it is shown in the list.
 - Fix: [refitting] When refitting to a cargo which is already carried by some vehicles in the consist, the capacities of those vehicles are taken into account when calculating the new capacity of the train in the refit window.
2005-05-26 16:31:32 +00:00
Darkvater 5174d3adfe (svn r2306) - CodeChange: Check the last commands; refits. This needed an extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks" 2005-05-14 12:36:16 +00:00
matthijs c85f049f52 (svn r2267) - Codechange: Reverted the typedeffing of VehicleType (r2256), since that interfered with the saveload code. 2005-05-04 22:13:07 +00:00
matthijs 6eb094c726 (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.
2005-05-02 23:59:11 +00:00
Darkvater febae668fe (svn r2192) - Add greater control to the 'message options' window. Now you can turn off the telegraphc ticker sound for summarized messages, or turn off news-messages altogether (you get a red blot to notify you though). The [<][>] set the settings in one way, while clicking on the option itself, cycles it. This commit also 'fixes' bugs [1166973], [1121484] and patch [1169930].
- I also changed an order of strings from On, Off to Off, On, so this can be used ingame with the WWT_4 widget type.
- Since the newssettings now take 2 bits per setting (off/summary/on) _news_display_opt is widened to 32 bits and the settings code changed slightly to accomodate for a maximum of 16 message-types.
2005-04-13 23:03:31 +00:00
Darkvater a571f31c95 (svn r1969) - GUI: Replace vehicle dropdown menu now looks a bit more comform the ones used throughout the game. 2005-03-08 23:20:47 +00:00
Darkvater 83d3f85636 (svn r1966) - Fix: [ 1110437 ] Replace Vehicles GUI gets random clicks. Breaks people! Don't forget the breaks in switch() statements!! 2005-03-08 21:47:22 +00:00
tron 204d08140a (svn r1867) Include tables/sprites.h only in files which need it 2005-02-13 11:18:02 +00:00
tron 0381073e56 (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c) 2005-02-06 08:18:00 +00:00
tron f0f85a7ef3 (svn r1803) Move debugging stuff into files of it's own 2005-02-05 15:58:59 +00:00
tron 4b71f9126e (svn r1798) GetFoo(i)->index is per definition i, so replace the former with the latter 2005-02-04 20:40:04 +00:00
truelight 42f98c7eec (svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles) 2005-02-04 13:23:29 +00:00
darkvater b64c375f2f (svn r1750) - Feature: [ 1093261 ] Saving vehicle sorting criteria for each vehicle type (bociusz) 2005-01-31 11:03:23 +00:00
Celestar 6eec07257a (svn r1695) -Fix: I broke maximum speed sorting for anything but trains with the new acceleration. Sorry 2005-01-27 11:33:14 +00:00
bjarni d580d4e46c (svn r1684) - Fix: [autoreplace] made sure that planes only show planes in replace GUI and helicopters only show helicopters 2005-01-26 18:18:00 +00:00
celestar efcd72a2ef (svn r1681) -Feature: New realistic acceleration.
This will make things more difficult as narrow curves
          and depots impose rather strict speed limits. Feedback welcome
          For those who don't like low-speed curves: Switch it off
2005-01-26 12:51:04 +00:00
bjarni 5665d51bb3 (svn r1680) Feature: Replace train GUI now remembers the railtype selected in the dropdown menu 2005-01-26 12:42:29 +00:00
bjarni 518034d28d (svn r1679) Fix: dropdown menus now returns the index of the string that was clicked even if a previous item is hidden
This bug was not triggered by the current code, but it's easier to code new features if you do not have to think about such limitations 
like you can't hide an item in the middle of the list ;)
2005-01-26 11:23:54 +00:00
bjarni b4c4daf775 (svn r1635) fix: forgot to set SetVScrollCount properly in autoreplace train GUI. It appears ok now 2005-01-24 08:49:14 +00:00
bjarni 6510b12203 (svn r1629) added a counter to tell how many engines you have of each type to the autoreplace vehicle windows and made them show only the vehicles you actually have in the left list.
this also fixes some window updates issues when autoreplacing
2005-01-23 22:01:51 +00:00
tron 189ca73707 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 2005-01-22 20:23:18 +00:00
bjarni 2fd3553d78 (svn r1568) made an enum of train subtypes to make the code more readable 2005-01-19 19:15:03 +00:00
truelight d275109e79 (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!
2005-01-15 19:06:22 +00:00
darkvater f9b5f704b1 (svn r1518) -Fix: server issue where some company names were wrong
-Fix: Highscore troubles; accessing members of deleted window
2005-01-15 01:52:23 +00:00
darkvater 49e7939a10 (svn r1460) -Fix: [1099225] Bug Fix - Vehicle Lists not updated at Acqusition (thx tamlin and mpetrov) This also fixes some bug but can't find i right now. 2005-01-10 12:14:15 +00:00
dominik 4b6a846d9c (svn r1434) Fix: [ 1098553 ] Crash when all vehicles from a vehicles per station list had been removed 2005-01-08 19:34:00 +00:00
truelight 63e97754fb (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 *.
2005-01-06 22:31:58 +00:00
tron 8b7c1e94e1 (svn r1402) Trim trailing whitespace 2005-01-06 18:45:28 +00:00
truelight c06dd27c33 (svn r1399) -Fix: Fixes for compiling with Watcom C/C++ (ie, OS/2 port). (orudge)
Note: If people could watch out for initialising structs with
  *non-constants* in future... it's a bit annoying, I
  know, but Open Watcom isn't the only compiler which
  doesn't support this (yet) - Borland, for example,
  still doesn't like it.
2005-01-06 15:57:26 +00:00
bjarni 1e99155d61 (svn r1393) fix [ 1096026 ]. Autorenew trains should now hopefully work like it did before autoreplace was added
DEREF_ENGINE is now used in autoreplace
2005-01-05 19:28:10 +00:00