Commit Graph

3504 Commits

Author SHA1 Message Date
peter1138 5f24141cb8 (svn r4354) [Elrail][NewGRF] Codechange: Drawing of custom waypoints with custom ground sprites used the index of the rail type as an offset. With the introduction of elrails this offset is incorrect, so instead there is now a lookup table within the RailTypeInfo struct to explicitly list the offset. 2006-04-11 10:45:06 +00:00
celestar da428dca70 (svn r4353) Codechange: Move global _signal_position into the only function that uses it and convert the bit-hacking into a struct 2006-04-11 10:19:50 +00:00
peter1138 5e345e0e7f (svn r4352) - NewGRF Codechange: dynamically allocate the memory used to store custom station data. This saves us approximately 40KB per GRF file, if there are no stations defined. 2006-04-11 10:05:52 +00:00
tron d38964e49a (svn r4351) Simplify ReverseTrackdir() to use a simple arithmetic operation instead of a table lookup 2006-04-11 04:49:23 +00:00
belugas f1da549c10 (svn r4350) CodeChange : Add and use accessors [G|S]etIndustrype. Define and use IndustryGfx type instead of uint 2006-04-10 21:00:56 +00:00
tron b0ee09fd1d (svn r4349) Remove GetCrossingTransportType(), it's slightly overkill 2006-04-10 20:46:37 +00:00
tron f4a8818dbf (svn r4348) Move IsLevelCrossing() from rail.h to road_map.h 2006-04-10 20:38:59 +00:00
belugas 8166a53179 (svn r4347) CodeChange : Renamed IndustryType to IndustryLifeType. Cleanup step toward bringing accessors [G|S]etIndustrype 2006-04-10 16:20:47 +00:00
belugas a972760294 (svn r4346) CodeChange : Add and Use Accessors to Industry's Stage and Counter construction. Removed last direct map access from Disaster_cmd.c as well. Based on work from Rubidium in tfc_newmap 2006-04-10 15:09:56 +00:00
celestar eae5fcc455 (svn r4345) -Codechange: Similar to airport tiles, rename _industry_map5_ arrays to _industry_sections 2006-04-10 14:27:26 +00:00
tron 7a3345f4df (svn r4344) Use tile coordinates or even TileIndices instead of virtual tile coordinates where it suffices. 2006-04-10 12:36:04 +00:00
peter1138 4fcd2f0643 (svn r4343) [Autoreplace] Fix drawing of train list for outdated engines. Fixes FS#106 2006-04-10 11:14:33 +00:00
tron 81e6d68f95 (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()
2006-04-10 07:15:58 +00:00
celestar 6926bd55fd (svn r4341) -Fix (FS#101) When a player got bankrupt, slots were not cleared, because vehicles got deleted directly by DeleteVehicle 2006-04-09 18:35:24 +00:00
peter1138 a4a891c007 (svn r4340) Add force {FORCE} to the units system. This is currently unused. 2006-04-09 18:25:31 +00:00
peter1138 32622f2c7b (svn r4339) - Comment Change: NewGRF, update comments for units of speed 2006-04-09 18:08:20 +00:00
celestar d8215a1f59 (svn r4338) -Fix (FS#105): Bug introduced in r4290. IsLevelCrossing does NOT check the tile type, it assumes the tile type IS MP_STREET 2006-04-09 18:01:06 +00:00
celestar 7246cab5ee (svn r4337) -Fix: A problem where GetRailType was called instead of GetRailTileType. Thanks to glx for noticing 2006-04-09 17:50:00 +00:00
peter1138 dcde932043 (svn r4336) Fix units conversion of volume for SI 2006-04-09 14:49:45 +00:00
tron 0a509a4c48 (svn r4333) Revert back to a direct map access in one case until the exact conditions for this piece of code are investigated. The IsRoad() function is causing me headaches... 2006-04-09 10:24:57 +00:00
tron 8111eca43e (svn r4332) Turn a table lookup into a ternary operator 2006-04-09 09:29:50 +00:00
tron fade7a5997 (svn r4331) Replace some direction calculation magic with DiagDirection to make a bit more clear what's going on 2006-04-09 08:25:43 +00:00
tron 63e040966e (svn r4326) Only reduce the slot age of a vehicle if it has a slot assigned 2006-04-08 14:18:39 +00:00
tron 4e577f689a (svn r4325) When updating the vehicle count for road stops after load use the slot pointer of the vehicle instead of recalculating the road stop using the destination tile of the vehicle. Apart from being more simple this could prevent a inconsistency of slot information in the edge case when the destination tile isn't the tile of the assigned slot. 2006-04-08 13:58:19 +00:00
tron 90836a461d (svn r4324) Remove the unused road stop type attribute from struct RoadStop 2006-04-08 13:50:01 +00:00
tron da60a82021 (svn r4323) -Regression: Clear the slot assignments of all vehicles heading twoards a road stop if that road stop gets removed
This issue was fixed in r2210 and reintroduced in r4259 when the multistop handling was overhauled.
2006-04-08 13:32:38 +00:00
peter1138 ffadd91ca9 (svn r4322) - Codechange: Remove conversion of kmh to mph from gui code to within the units conversion system, in string.c. This means displaying kmh requires no conversion, instead of being convert from kmh to mph, and then back to kmh again. 2006-04-08 12:04:23 +00:00
tron 5be2aa3e99 (svn r4321) For ships check the ship state, not the road state. This bug was harmless, because both states are at the same byte in the vehicle type specific union. 2006-04-08 06:55:43 +00:00
celestar fd10af66d7 (svn r4320) -Fix/Codechange: rs->num_vehicles is no longer saved or loaded, but computed on the fly. Partly fixes FS#101 2006-04-08 05:44:37 +00:00
celestar 9760d3dccf (svn r4319) -Codechange: Station map accessors 2006-04-08 05:24:29 +00:00
belugas 4fdb25e65b (svn r4318) CodeChange : Remove last direct map access on ai/default/default.c 2006-04-08 01:07:32 +00:00
celestar c0cb020c80 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup 2006-04-07 15:57:03 +00:00
celestar da095bc941 (svn r4316) -Codechange: finished r4257 (forgot one variable there) 2006-04-07 09:37:04 +00:00
tron 1440451a6b (svn r4315) Remove MAX_QUERYSTR_LEN, rather use lengthof() the real thing 2006-04-07 09:15:17 +00:00
tron 10454a6dd1 (svn r4314) -Fix: a buffer overflow of the chat box introduced in r1263. Don't tell the Textbuf an arbitrary number as size of the string buffer, but the real lengthof() it 2006-04-07 09:07:53 +00:00
tron 3ef6afdb4d (svn r4313) The parent window of the chat box is always the main toolbar (?!), therefore don't pass this information as parameter 2006-04-07 09:00:57 +00:00
tron 7a7e7c82cf (svn r4312) Calculate the maximum pixel width of the entered text in the chat box from the "text box"-widget instead of hardcoding an arbitrary - and wrong - number 2006-04-07 08:57:03 +00:00
celestar fd097af20e (svn r4311) -Fix/Codechange: Clear the railtype when removing rail under a bridge. FS#103 exhibited this problem 2006-04-07 08:42:30 +00:00
tron dec2db09ee (svn r4310) The chat box has no visible window title, therefore remove the string 2006-04-07 08:37:39 +00:00
tron fc8d7f18a0 (svn r4309) The initial string of the chat box is always the empty string, so don't jump through hoops to check if nothing was entered and simplify the code 2006-04-07 08:27:43 +00:00
celestar 025584ae26 (svn r4307) -Fix: Coding style in previous commit. Thanks to Tron for instant notice 2006-04-07 07:40:44 +00:00
celestar 48b69f1344 (svn r4306) -Fix (103). Assertion when removing elrails under bridges. Thanks to Rubidium for reporting and fixing 2006-04-07 07:39:03 +00:00
celestar cc51832917 (svn r4305) -Codechange: Minor elrail cleanup (Tron) 2006-04-07 07:19:14 +00:00
tron 04d6788bfd (svn r4304) The chat box' parent window (the main toolbar, wtf?) doesn't care for the WE_ON_EDIT_TEXT_CANCEL event, so don't send one. This code looks like it was mindlessly copy&pasted from the query box 2006-04-07 07:08:20 +00:00
Darkvater 3a1cef5af8 (svn r4302) - Fix: s/maxlength/maxwidth of course, the buffer size is always set. Comment-change only 2006-04-06 19:16:39 +00:00
Darkvater b68b9b149a (svn r4301) - Fix: the maxlength parameter of Textbuf is supposed to be the size of the buffer (so length of string + '\0'), but in the code it was a mix of both. It didn't cause any problems though, only an occasionaly one-less character than allowed. (thanks Tron for noticing) 2006-04-06 19:11:41 +00:00
Darkvater 558ecb1631 (svn r4292) - CodeChange: sprinkle some holy water on l'ugly code (braces, and pos is PacketSize not int) 2006-04-05 20:12:54 +00:00
Darkvater a39f69b9bd (svn r4291) - Fix: validate all received strings for correctness. This fixes potential crashes on invalid clients/servers (thanks test for bringing this to our attention) 2006-04-05 20:11:01 +00:00
celestar 07e4134ebd (svn r4290) -Fix: fixed power computation for mixed consists on level crossings (michi_cc) 2006-04-05 19:08:09 +00:00
celestar fcedc458f1 (svn r4289) -Codechange: Make use of water_map accessors for ships. Make a mental note to clean ship_cmd 2006-04-05 18:46:21 +00:00