Commit Graph

78 Commits (b5fe577523f25765888b2b813107e98e3f8bb069)

Author SHA1 Message Date
Darkvater 7e4d0f112e (svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts
DiagDirections, and add TileOffsByDir that handles Directions.
-Codechange: Make the treeloop use TileOffsByDir().
18 years ago
truelight 7abad2b20e (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
  - Load heightmaps (either BMP or PNG)
  - Progress dialog while generating worlds (no longer a 'hanging' screen)
  - New dialogs for NewGame, Create Scenario and Play Heightmap
    - Easier to configure your landscape
    - More things to configure (tree-placer, ..)
  - Speedup of world generation
  - New console command 'restart': restart the map EXACTLY as it was when you
      first started it (needs a game made after or with this commit)
  - New console command 'getseed': get the seed of your map and share it with
      others (of course only works with generated maps)
  - Many new, world generation related, things
  - Many internal cleanups and rewrites
  Many tnx to those people who helped making this:
     Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
  Many tnx to those who helped testing:
     Arnau, Bjarni, and tokai (alfabetic)
  And to all other people who helped testing and sending comments / bugs
  Stats: 673 lines changed, 3534 new lines, 79 new strings
18 years ago
tron d8b8035f9f (svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo 18 years ago
tron fb251d18e0 (svn r5787) Rename width, height and unk of struct DrawTileSeqStruct to size_{x,y,z} 18 years ago
tron 842b518054 (svn r5398) Rename checkRadioTowerNearby() to IsRadioTowerNearby() and flip its return value to make it a bit less ambiguous 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
tron d083c3cbd7 (svn r5348) -Fix: A HQ could only be flooded at its northern tile, the other 3 were immune to water 18 years ago
tron b57640e28a (svn r4572) Remove vehicle_leave_tile_proc
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing)
It's a bit overkill, so just handle this one case where it can happen
18 years ago
belugas 31c0641bd3 (svn r4568) CodeChange : Bring definitions and uses of DrawTypesStructures toguether. 18 years ago
tron 6dbc9c9ced (svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE} 18 years ago
tron dd180a1e18 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 18 years ago
tron 35e93e451f (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()
18 years ago
celestar e2db84101e (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free 19 years ago
celestar 69e1c716e8 (svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty 19 years ago
tron 7163a64c25 (svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo 19 years ago
celestar b34daea3f2 (svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ 19 years ago
celestar e875be1a44 (svn r4194) -Codechange: Renamed UpdatePlayerHouse to UpdateCompanyHQ because the rest of the code calls it Comapany HQ. Moved it to unmovable_cmd.c because CompanyHQ is an unmovable and has nothing to do with economy. 19 years ago
celestar b47d27932a (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs 19 years ago
tron 747fe64b31 (svn r4073) Add functions to make and test for (most) unmovable tiles 19 years ago
tron 4d3364d811 (svn r3996) -Fix: Slope and height information returned for some tile types is wrong
This leads to graphical glitches when drawing foundations.
This doesn't fix all problems, but at least some of them.
19 years ago
tron 7a0071cc53 (svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable 19 years ago
tron b258c39922 (svn r3791) Replace home grown direction handling for placing lighthouses by standard DiagDir 19 years ago
tron 5352e9fbcb (svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff 19 years ago
tron 9712d6f639 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
Darkvater d956c5d5da (svn r3447) - CodeChange: [ 1360866 ] station_land.h Naming ALL sprites. Also replaced the SPTR_STATUE_GROUND by the more obvious SPR_CONCRETE_GROUND in unmovable_cmd.c. No functional changes except for commenting out PALETTE_RECOLOR_SPRITE in table/sprites.h. (Belugas) 19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
tron 71d293f2a3 (svn r3066) Constify the parameter of GetSlopeZ_*() 19 years ago
tron 53a4a6a0f4 (svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list 19 years ago
tron 7ab7d79190 (svn r3028) s/255/OWNER_SPECTATOR/ 19 years ago
tron 0181327f2d (svn r2999) Do not pass if the HQ gets built for the first time or gets relocated as parameter - the command function has to check this anyway 19 years ago
Darkvater 4a58250cb9 (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
19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron 54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
tron 71140a5768 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
tron 6ad3895306 (svn r2660) Get rid of some more shifting/anding/casting 19 years ago
celestar 1fed0046ac (svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite 19 years ago
ludde 2123deff13 (svn r2560) Fix: various minor code changes.
Added RandomTile/RandomTileSeed functions to generate a random tile.
Changed landscape routines so they don't assume that the Y map side is a power of two. (support for this is not complete, though)
Changed some frequently used map macros to not compute the values each time.
Silence some warnings on MSVC.
19 years ago
tron a4bf608d40 (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. 19 years ago
tron 1307f90b5e (svn r2535) Tabs 19 years ago
tron 9617614b04 (svn r2487) Replace TILE_XY by TileXY/TileDiffXY 19 years ago
tron 2b73dec567 (svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY 19 years ago
tron a733fede9b (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 19 years ago
celestar 354058341b (svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer 19 years ago
tron ff0030936e (svn r2408) Introduce SetTileOwner() and use it 19 years ago
tron a9b95b3cbb (svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner 19 years ago
Darkvater ba8c649fac (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 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 238106257d (svn r2296) - Fix (regression): oops, forgot the MS code-decleration rules :p 19 years ago
Darkvater 24e34f022b (svn r2295) - Fix: you were still able to delete any tile if you were not careful with CmdDestroyCompanyHQ. Fixed this; thanks HackyKid. 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