Commit Graph

169 Commits

Author SHA1 Message Date
tron
90cafa9b15 (svn r1560) Introduce SetTileType() and SetTileHeight()
Replace direct references to _map_type_and_height with these
2005-01-18 18:41:56 +00:00
tron
61a6bc544d (svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts 2005-01-16 11:24:58 +00:00
tron
58484ce6ee (svn r1533) Turn an if cascade into a switch and move a const array to the only location where it is used 2005-01-16 09:51:56 +00:00
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!
2005-01-15 19:06:22 +00:00
tron
412cf98eb4 (svn r1512) Replace probably incorrect test of loading_count with probably correct test of loaded_count 2005-01-14 21:58:48 +00:00
darkvater
4734a0e690 (svn r1472) -Fix: correct error message for when trying to build a railroad station over a bus/truck/etc-station. 2005-01-10 21:52:35 +00:00
Celestar
91a75191a2 (svn r1467) Fixed a nasty bug where one could build one station OVER the other 2005-01-10 16:35:20 +00:00
celestar
e0a8b21404 (svn r1441) Fixed a couple of warnings, and removed a pointless assert 2005-01-09 10:04:30 +00:00
tron
414ac3286b (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY] 2005-01-07 17:02:43 +00:00
truelight
b450603437 (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
d3c6855320 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff 2005-01-06 11:39:00 +00:00
tron
e4cf2ba1b3 (svn r1386) Move TileIndexDiff to map.h
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
2005-01-05 13:32:03 +00:00
darkvater
fc52b512aa (svn r1375) -Fix: [1050990] Buying trains sometimes accounted for incorrectly. Was the result of the cost getting reset in a recursive call of docommand. That is fixed. In addition all cost-commands are typed explicitely. Please do not forget to do so or your costs will be credited to construction if you are unlucky. 2005-01-04 17:11:03 +00:00
tron
bcff0ab932 (svn r1344) Use MapSize[XY]() (or MapSize()/MapMax[XY]() where appropriate) instead of TILES_[XY] 2005-01-03 18:59:58 +00:00
tron
181e9b6cf9 (svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY]
While here replace one erroneous TILE_MAX_X with MapMaxY()
2005-01-03 12:56:22 +00:00
tron
df1f0010f9 (svn r1328) Turn loop with explicit terminator element into loop using endof() 2005-01-03 08:33:04 +00:00
truelight
2f9e0b8e0c (svn r1288) -Codechange: changed _map2 to an uint16. It is still saved and loaded as
an uint8 till the savegame version is bumped to version 5. Then it works 
automaticly as a fully uint16. So _stations[] can not be increased till 
after the bump!!
2004-12-28 11:51:31 +00:00
darkvater
452db59121 (svn r1211) -Feature: Introduce sticky windows to all vehicle windows...Just make sure you do not sticky more than 23 at a time. Also a lot of places in the code invalidated the 'status bar' of the vehicle, referring to it as widget 4. This is now widget 5 and has been #definitized 2004-12-21 23:27:58 +00:00
tron
e33a63ee8d (svn r1161) Don't make redundant GetAirport() calls, use the cached value 2004-12-18 18:19:49 +00:00
truelight
c2fd88b9b6 (svn r1153) -Fix: FindCatchmentRadius is now a function that uses the enums instead
of magic numbers (tnx to Stumo)
2004-12-18 13:38:27 +00:00
tron
0cdcb1d6c7 (svn r1151) Fix last commit |: 2004-12-18 12:46:29 +00:00
tron
11d477044c (svn r1150) Fixes:
- Don't crash when building or destroying airport without depots (bugs were latent before r1149)
- Delete all hangar windows when destroying an airport, not just the first one (before r1149 none where deleted)
2004-12-18 12:40:34 +00:00
tron
a148ff4e0d (svn r1117) Move map arrays and some related macros into their own files map.c and map.h 2004-12-15 22:18:54 +00:00
Celestar
969d07925a (svn r1017) Solved a Segfault if a station was built too close to the northern corner 2004-12-11 12:12:51 +00:00
Celestar
945ceb06fc (svn r979) Allow more realistically sized catchment areas 2004-12-08 15:46:13 +00:00
tron
b8e83ca03f (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.
2004-12-05 12:43:04 +00:00
truelight
d6a1f3e412 (svn r942) -Merged branch/network back into the trunk 2004-12-04 17:54:56 +00:00
tron
ecf1c35849 (svn r907) Sprinkle holy ANSI water:
- "inline" must before the return type (and after "static")
- Initialise all struct members, not just some of them
- Remove (one) spurious semicolon
2004-12-03 07:43:00 +00:00
tron
265ac67183 (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
2004-12-02 22:53:07 +00:00
tron
acbd1801c7 (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.
2004-11-25 10:47:30 +00:00
tron
fca55e3741 (svn r793) Merge INLINE -> inline replacement (revision 376) 2004-11-24 13:19:48 +00:00
tron
e8537f5512 (svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent with its own name and all other DO_* flags.
Now it is active-true.
2004-11-23 22:36:11 +00:00
tron
c5b0ecac4f (svn r780) Always report a bus/lorry station as unpassable.
The current behavior just causes bugs and the pathfinder does the necessary magic to handle stations as destinations and enter them anyway.
This fixes [ 1058809 ]
2004-11-23 18:04:04 +00:00
tron
57adc97733 (svn r724) Remove restriction that a tile can only accept 3 cargo types.
This especially enables houses to accept passengers, mail, goods AND food.
Add string templates for up to 5 cargo types for the tile info window. If more are needed just add them.
Simplify (de-uglify) the logic for cargo acceptence for houses and split the goods/food table into two. The acceptance is unmodified, but accepting goods AND food is now trivially possible. The exact amounts have to be decided.
This is based on Celestar's changes in the map branch plus some further bits that will be merged there soon.
2004-11-21 10:49:40 +00:00
tron
83ffb9c7fa (svn r667) Fix bug in rendering stations from savegames
Also don't pitch custom station sprites by railtype
(pasky)
2004-11-17 21:11:16 +00:00
dominik
4612dcdb48 (svn r662) [newgrf] Moved grfspecial.c to newgrf.c/newgrf.h 2004-11-17 18:49:55 +00:00
tron
3a7abc2a35 (svn r659) Support for cutomized TTDPatch-style new stations (no selector GUI yet) (pasky) 2004-11-17 18:03:33 +00:00
tron
13f0b6c0cf (svn r654) Hopefully complete support for randomized variational spritegroups (i.e. the cars transporter in DBSetXL gets different cars each time) (pasky) 2004-11-17 08:52:47 +00:00
miham
86d19cb577 (svn r647) Cleanup custom station classes handling. (pasky) 2004-11-17 00:52:54 +00:00
tron
b65bda506c (svn r635) Fix choosing a spritegroup from deterministic variational spritegroups if there is no structure to search (i.e. in purchase lists) (pasky) 2004-11-15 20:52:11 +00:00
tron
2f35fea097 (svn r625) Almost complete support for deterministic variational vehicle spritegroups. (pasky) 2004-11-15 11:54:35 +00:00
darkvater
ec434b208e (svn r610) -newgrf: Support for some basic deterministical spritegroups regarding stations. Waypoints look changes based on year now :^) (pasky). 2004-11-14 20:50:38 +00:00
darkvater
183c33931d (svn r605) -newgrf: Framework for supporting variational spritegroups . Deterministic only at the moment, but random ones support shouldn't be that difficult now It doesn't do anything, but makes these actions actually possible (pasky). 2004-11-14 18:18:28 +00:00
darkvater
e656a91736 (svn r602) -newgrf: Move DrawTileSeqStruct & co and struct SpriteGroup to sprite.h (pasky) 2004-11-14 16:42:08 +00:00
darkvater
5fcd71cf28 (svn r600) -newgrf: Relocation offset for custom station sprites is now stored separately, making it possible to show different sprites in waypoint selection dialog (pasky). 2004-11-14 16:11:48 +00:00
darkvater
5847317526 (svn r592) -newgrf: Dynamically allocate global custom station IDs (pasky). 2004-11-14 14:53:15 +00:00
darkvater
ccc496ba2c (svn r591) -newgrf: Store whole struct StationSpec in SetCustomStation(), not just the rendering data. This will be needed for variational stationspecs (pasky). 2004-11-14 14:10:03 +00:00
celestar
eb50427670 (svn r581) -newgrf: Basic support for new stations - only waypoints supported now and only
the first custom one can be placed (no selector GUI, coming soon). This
also moves some global variables to {struct GRFFile} and reorders which
actions are processed in what stage, to get it all working together --
(pasky)
2004-11-14 09:07:15 +00:00
darkvater
7930faace9 (svn r576) -newgrf: Cleanup horrible table/(station|unmovable)_land.h DrawTileSeqStruct hacks needed for custom station supports (pasky) 2004-11-14 01:25:05 +00:00
tron
65058d0d57 (svn r542) -Fix: Display correct rail type in "build railway station" window
Thanks, ln--
2004-11-11 23:10:22 +00:00
truelight
75a54521e8 (svn r319) -Fix: [ 1029064 ] Building a station acted weird in some rare situations 2004-09-25 13:58:27 +00:00
darkvater
c79e8ad626 (svn r244) -Fix: Stations were not sorted for non-player-0 players
-Fix: Correctly resorting vehicle list of player when the list of another player is open.
2004-09-14 14:19:53 +00:00
darkvater
e295e46e3e (svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
-CodeLayout: Remove trailing spaces and Windows linebreaks
2004-09-12 21:49:38 +00:00
truelight
eb49a19460 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way! 2004-09-10 19:02:27 +00:00
truelight
10d54ac604 (svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
-Fix: some minor fixes around GetTileTrackStatus (blathijs)
2004-09-05 16:15:22 +00:00
darkvater
7b02cd3248 (svn r150) -Fix: [1010833] Turning on the magic bulldozer removes oil rigs
-Fix: [993493] Buildings on water
-Feature: Water floods everything, including vehicles.
2004-09-03 17:57:27 +00:00
dominik
74852c4652 (svn r124) Prepared code for removal of block_months variable in next major savegame version 2004-08-23 21:29:25 +00:00
dominik
770f86bbbe (svn r122) Change: exclusive transport rights are now stored per town instead of per station
Exclusive rights from old savegames will be reset.
2004-08-23 21:04:39 +00:00
truelight
788ace088d (svn r85) -Add: initial commit of new AI (enable in Patch menu)
-Add: generalised A* Algorithm
-Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap)
2004-08-20 09:32:32 +00:00
truelight
a21fa40127 (svn r72) -Add: build_date of station (viewable with Query tool) 2004-08-17 08:40:09 +00:00
darkvater
68c9b7c3ad (svn r66) -Fix Station list updated on station deletion/station rename
-Changed debug messages to comply with DEBUG(name, level) heuristics
2004-08-16 14:48:35 +00:00
darkvater
27f6fcae4c (svn r60) -Fix: signal_density is given as a parameter to autosignal. This means all players can define it for themselves.
-Fix a few warnings
2004-08-15 21:10:08 +00:00
dominik
43d691df17 (svn r56) Improved order checker + patch setting for it (celestar) 2004-08-15 13:21:18 +00:00
dominik
7af3360c5a (svn r44) Fix: Coast line near edge of map and near oilrigs (Dribbel) 2004-08-13 19:52:45 +00:00
dominik
ca120eedad (svn r40) Final slope graphics fix 2004-08-13 18:27:33 +00:00
darkvater
52f8e963c1 (svn r29) -Fix You cannot take ownership of an oilrig by building right next to it
-Fix when adding parts to a statin max size is not 15x15 anymore, but _patches.station_spread
2004-08-12 21:11:23 +00:00
darkvater
cbec93d9b6 (svn r28) -Fix removing station merged with oilrig, will reset oilrigs ownership 2004-08-12 20:24:28 +00:00
darkvater
f422014960 (svn r23) -Some omments on the code (blathijs) 2004-08-11 22:07:08 +00:00
truelight
efaeb275f7 (svn r1) Import of revision 975 of old (crashed) SVN 2004-08-09 17:04:08 +00:00