Commit Graph

88 Commits

Author SHA1 Message Date
Darkvater
80814dbb1d (svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts
DiagDirections, and add TileOffsByDir that handles Directions.
-Codechange: Make the treeloop use TileOffsByDir().
2006-09-05 23:21:41 +00:00
rubidium
480af9c917 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 2006-08-22 14:38:37 +00:00
truelight
10b842bddc (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
2006-08-19 10:00:30 +00:00
tron
3254155930 (svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo 2006-08-06 16:32:49 +00:00
tron
475f276769 (svn r5581) Slightly alter some snow line related calculations to make them a bit clearer 2006-07-22 07:36:01 +00:00
tron
be88e269b9 (svn r5155) - Remove the bridge branch merge (revision r5070) 2006-06-07 19:35:21 +00:00
celestar
25a63ec7af (svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above:
	Any railway track combination (excluding depots and waypoints)
	Any road combination (excluding depots)
	Clear tiles (duh), including fields
	Tunnel entrances
	Bridge heads

Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing

There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
2006-06-02 13:05:41 +00:00
tron
18ad0ae50e (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
2006-04-25 07:32:33 +00:00
tron
0347fb2ab6 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 2006-04-23 13:48:16 +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
tron
99a6b9b8f2 (svn r4279) s/\<CL_/CLEAR_/ 2006-04-04 21:35:13 +00:00
tron
cc0ffe6582 (svn r4271) s/\<TR_/TREE_/ resp. s/\<TR_/TREE_GROUND/ 2006-04-04 06:25:05 +00:00
celestar
cc87f682b9 (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 2006-04-03 09:07:21 +00:00
tron
892a4c587d (svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo 2006-04-02 12:49:18 +00:00
belugas
80570009dd (svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear. 2006-03-30 19:16:44 +00:00
tron
7b21893adb (svn r3983) Use existing functions to access tree and road info 2006-03-19 16:57:48 +00:00
tron
b394f72fa9 (svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable 2006-03-12 12:19:25 +00:00
tron
cc4f5b4e6f (svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme 2006-03-05 10:19:33 +00:00
tron
00a16eedcc (svn r3668) Add a function to turn a tile into a tree tile 2006-02-24 20:38:08 +00:00
tron
f6d48379d8 (svn r3665) Add a function to turn a tile into a clear tile 2006-02-24 19:56:24 +00:00
tron
ea73b46684 (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 2006-02-13 21:15:00 +00:00
tron
4f0ff156e8 (svn r3583) Fix 2 glitches in r3556 2006-02-09 07:34:37 +00:00
tron
208a4b4944 (svn r3556) Add accessors for handling tree tiles
See tree.h for details
2006-02-05 14:47:15 +00:00
tron
b36f89bc51 (svn r3532) Revert r3467, was total nonesense, my fault 2006-02-04 11:53:31 +00:00
tron
b844aa2db3 (svn r3520) Remove unused parameters from some functions 2006-02-02 07:15:46 +00:00
tron
21fb5b5150 (svn r3516) Fix embarrassing bug in r3514 2006-02-01 19:53:17 +00:00
tron
ac4f4e30d5 (svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
See clear.h for details
2006-02-01 15:31:21 +00:00
tron
84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
Darkvater
5fed533ce8 (svn r3467) - CodeChange: Remove an useless assignment (reads a value and just writes it back)" tree_cmd.c 2006-01-29 10:57:23 +00:00
Darkvater
6fb36934a8 (svn r3446) - Fix: incorrect validating of tree-planting command which can allow a buffer-overflow (Tron) 2006-01-26 18:45:04 +00:00
tron
ce9cbb9c47 (svn r3196) Use structs instead of magic offsets into arrays 2005-11-16 12:01:46 +00:00
tron
9f8c5d8fd2 (svn r3186) Unnecessary casts and truncation 2005-11-15 09:05:16 +00:00
tron
f7abff5f96 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
2005-11-14 19:48:04 +00:00
tron
833032adc0 (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT 2005-11-14 08:09:57 +00:00
tron
2cc2154ad2 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
2005-10-22 06:39:32 +00:00
tron
ece9b9b2b6 (svn r3066) Constify the parameter of GetSlopeZ_*() 2005-10-19 14:49:46 +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
tron
50e41dc1d1 (svn r2763) Small cleanup and improve a few comments 2005-07-30 18:30:07 +00:00
tron
9b676d2cd9 (svn r2758) Add the AB() macro to add a value to a bit range and use it in a few places, also make use of GB and SB nearby 2005-07-30 09:29:20 +00:00
tron
f57d263d83 (svn r2750) -Fix: Tree tiles above the snow line got redrawn disproportionately often 2005-07-29 18:22:04 +00:00
tron
64ac1a6414 (svn r2738) Small bit fiddling cleanup 2005-07-28 19:18:27 +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
284d9ed7fb (svn r2663) Include variables.h only in these files which need it, not globally via openttd.h 2005-07-21 18:44:27 +00:00
celestar
85f06d6e7b (svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite 2005-07-20 22:05:13 +00:00
Darkvater
5695330940 (svn r2628) - Fix: Planting trees does not result in a MapSize() assertion anymore; introduced in r2598 2005-07-18 00:17:19 +00:00
tron
2469cedd15 (svn r2598) Small cleanup, especially get rid of a FindLandscapeHeight(), because it was overkill 2005-07-17 11:09:03 +00:00
celestar
9ca761b065 (svn r2595) -Codechange: Introduced "IsSteepTileh" to find whether a tile is steep
(i.e. spans two height levels) and use it throughout the code.
-Codechange: Add CanBuildDepotByTileh to find if a tile is suitable to
build a depot on it. Wraps some bitmagic which seems quite unreadable at
first glance
2005-07-16 23:47:37 +00:00
ludde
6013b327f7 (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.
2005-07-13 19:51:31 +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