Commit Graph

89 Commits

Author SHA1 Message Date
tron 0fe36a6900 (svn r2932) Give the strings consisting of an up/a down arrow symbolic names 2005-09-10 07:38:03 +00:00
tron e4cad82b00 (svn r2799) Make the only two non-const widget lists const 2005-08-03 13:07:29 +00:00
ludde 29564f9fcf (svn r2781) Fix some of the issues with variables in .h files. 2005-08-01 16:31:19 +00:00
tron 4190e5581d (svn r2772) Simplify the age notice in the vehicle details window 2005-07-31 22:28:49 +00:00
bjarni 546c34f2e5 (svn r2764) -Feature: Clone vehicles
-This allows a player to clone an excisting vehicle of his own
  -[fix]: this uncovered an excisting bug in CmdBuildRailVehicle() where depots could build trains of the wrong track type. This is fixed
  -Thanks to Celestar for drawing the sprites and _luca_ for including them in openttd.grf
2005-07-31 13:08:08 +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
celestar 18a93cca3d (svn r2657) -Codechange: The available railtypes per player are now a bitmask, so
that railtypes do not be in ascending order of appearance. Allows easier
implementation or more railtypes
2005-07-20 22:02:58 +00:00
Darkvater 0550c4a87a (svn r2623) - CodeChange: rework DrawStringCenteredTruncated() a bit. Instead of giving center + width you give the coordinates of the bounding box (left, right) it has to fit in (ludde)
- CodeChange: changed (back) maximum pixel length of truncated strings to a signed integer.
2005-07-17 19:23:18 +00:00
Darkvater f8b7b107d8 (svn r2613) - Truncate savegames, and vehicle-texts in their window.
- Hardcoded width 5 for saves-path...oops :O
2005-07-17 17:15:33 +00:00
ludde 64f6839816 (svn r2594) Fix: [strgen] Misc updates to the string system.
- Renamed the plural command to "P" instead of "PLURAL". Now write something like this to append an s on plural: {P "" s}. (You can optionally still add an argument index to explicitly specifiy which number that's used)
  - Removed the pluralized cargo strings from the string files. The new method is to use the plural specifier {P}
  - Added support for genders. First add "##gender der das die" on top, then use {G=der} on a cargoname/industry to set the gender, and to switch between genders do something like {G neu neu neue} {STRING}
  - Updated the swedish/english translation with P strings.
2005-07-16 20:58:04 +00:00
tron 8c1d74162f (svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes. 2005-07-13 18:04:01 +00:00
celestar b45eee3157 (svn r2541) -Feature: Modified IsCompatibleRail so that an engine can move on more
than one railtype (like Diesel engines on electrified rail).
-Codechange: Use IsCompatibleRail where it should be used
2005-07-10 01:25:17 +00:00
tron ab7b8b50e3 (svn r2492) Remove some pointless casts and fix some nearby indentation 2005-06-27 06:57:24 +00:00
tron 3154e7148d (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 2005-06-24 12:38:35 +00:00
celestar aa7334a3ec (svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer 2005-06-21 16:28:17 +00:00
hackykid 8607bbf06d (svn r2444) - CodeChange: Add an enum for demagicifying the values of the 'flags' parameter of DrawFrameRect(). (_Abraxa_) 2005-06-15 17:27:14 +00:00
tron fa8f46c0b7 (svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[] 2005-06-07 18:13:49 +00:00
hackykid 6d78b70075 (svn r2428) - Feature: [newgrf] Implement shorter train vehicles (Therax), and the callback that goes with it.
- Codechange: Remove some magic numbers (PALETTE_CRASH)
2005-06-06 22:44:11 +00:00
hackykid 1018d3b786 (svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it. 2005-06-06 00:19:24 +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
hackykid ea57dee837 (svn r2412) - Fix: [ 1214948 ] building vehicles without depot crashes game. (Chris Huebsch) 2005-06-05 20:45:04 +00:00
hackykid eb173099e9 (svn r2411) - Codechange: Have trains cache stuff like consist power/weight/max speed instead of recalculating it each time.
- Fix: Station ratings now depends on the max speed of a consist, without being affected by other speed limits from realistic acceleration.
2005-06-05 15:37:00 +00:00
tron 0c4ecbe9ec (svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner 2005-06-04 11:56:32 +00:00
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 2005-06-02 19:30:21 +00:00
tron fea5965679 (svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes. 2005-05-15 18:50:55 +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
Darkvater 729066e407 (svn r2294) - CodeChange: check the service interval settings when changing of all vehicle-types. To simplify things introduce GetServiceIntervalClamped() that returns the same or clamped value of the new service interval. There were some inconsistencies in the gui files so I had to change those, and const correctness kicked in, so it's a bit messy at certain points. 2005-05-11 16:17:03 +00:00
Darkvater 68138d6a31 (svn r2162) - Fix: Tooltips of horizontal scrollbars were wrong; they now say left/right instead of up/down 2005-04-07 01:02:15 +00:00
tron eab8b9a116 (svn r1989) -Feature: Resizable vehicle view windows; this is based on a patch by tmesisbob 2005-03-11 13:17:39 +00:00
Darkvater 0ddbc1304b (svn r1906) - Fix: [ 1117327 ] Assertion error on kick. When a company is cleaned all its windows need to be closed. For global vehicle lists, the no-staiton index of -1 was not taken into account 2005-02-22 20:32:26 +00:00
celestar d06f52a7f0 (svn r1891) -Fix: [ 1143587 ] carriages of newgrfs can be refitted again 2005-02-20 07:47:42 +00:00
matthijs c5c5c9b17c (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
- Add: asserts to find the v->u.rail.track == 0 problem.
- Add: IsValidDepot(), IsValidTown(), IsValidSign(), IsValidVehicle(), IsValidStation()
- Add: GetTileOwner(), IsTileOwner()
- Codechange: Replaced IsShipDepotTile(), IsTrainDepotTile(), IsRoadDepotTile() by IsTileDepotType().
- Codechange: typedeffed the MAP_OWNERS as Owner. Should be used as variable type.
- Codechange: Replaced a few uint by TileIndex.
2005-02-06 22:36:08 +00:00
tron 2fb453a4a5 (svn r1827) Next iteration of the byte -> char transition: some string drawing functions and buffers 2005-02-06 18:30:45 +00:00
truelight e9c93f9c0c (svn r1817) -Codechange: Moved depot-functions to depot.c
-Codechange: Added wrappers around depot-access (GetDepot no exists)
-Codechange: Made depot-functions a bit more logic (no longer 
GetDepotByTile crashes your game when you request it on a non-depot tile)
-Add: made depots dynamic (yes, 64k depots are possible now)
2005-02-06 10:18:47 +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
darkvater b64c375f2f (svn r1750) - Feature: [ 1093261 ] Saving vehicle sorting criteria for each vehicle type (bociusz) 2005-01-31 11:03:23 +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 e006f89aa3 (svn r1652) Fix: train and road vehicle lists are now redrawn when vehicles enters/leaves a depot (Hackykid)
fix: the ship status bar was not updated properly after a breakdown if show_speed was off (Hackykid)
2005-01-24 22:24:47 +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
tron 3279a7c9a2 (svn r1520) Trim 134 (!) lines with trailing whitespace ): 2005-01-15 08:58:31 +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
celestar 314a4245a9 (svn r1505) -Fix: Refit engine button is now disabled when cargo capacity equals zero 2005-01-14 09:36:29 +00:00
celestar 7dddb6cf7a (svn r1500) -Feature: Train window shows now the number of vehicles per row (mpetrov) 2005-01-13 17:23:24 +00:00
darkvater 085563653f (svn r1478) -Fix: [1099195] mouse-wheel in train replace window. Scrollbar1 and Scrollbar2 now work independently. You can only scroll on list and scrollbar itself; scrollbar must be next widget of the list.
-Fix: updated the few gui's that didn't have the scrollbar right after the listbox.
2005-01-11 00:24:27 +00:00
darkvater 1261a44cec (svn r1463) -Fix: [1099451] Game crashes after the click on Rename (see also Bug 10992). There was no check for non-selected engine 2005-01-10 14:24:40 +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
truelight 2c9cd8f68c (svn r1401) -Fix: glitches in train-depot GUI (tnx to Hackykid)
-Fix: glitch in Company Overview GUI (Hackykid)
2005-01-06 17:40:57 +00:00
darkvater c4b682f996 (svn r1380) -Fix: missed widget fixes; thanks Jango and TestMan57 2005-01-04 21:45:38 +00:00