Commit Graph

90 Commits (da428dca703d9c5e8c948bbab9adbb6e7b10d29f)

Author SHA1 Message Date
tron 7a3345f4df (svn r4344) Use tile coordinates or even TileIndices instead of virtual tile coordinates where it suffices. 18 years ago
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()
18 years ago
tron 99a6b9b8f2 (svn r4279) s/\<CL_/CLEAR_/ 19 years ago
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 19 years ago
tron 892a4c587d (svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo 19 years ago
tron 82bfd0520f (svn r4231) Remove ModifyTile(), it's not used anymore, yay! 19 years ago
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. 19 years ago
tron 337cdcc31f (svn r4028) The last external user of FindLandscapeHeightByTile() is gone (r4027).
Move its implementation into its only caller - FindLandscapeHeight() - and remove it
19 years ago
tron cc4f5b4e6f (svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme 19 years ago
tron 819d210acc (svn r3714) Add functions to turn tiles into water and shore tiles 19 years ago
tron 8d983f1bb7 (svn r3667) Fix the cause of an assertion I triggered in r3665 19 years ago
tron f6d48379d8 (svn r3665) Add a function to turn a tile into a clear tile 19 years ago
tron f369dcef51 (svn r3664) Add a function to turn a tile into a void tile 19 years ago
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 19 years ago
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
19 years ago
tron 84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
tron 22dc05faf2 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
tron 5e1e902600 (svn r3490) -Fix: A bunch (10) of off-by-one errors when checking if a TileIndex points to a tile on the map 19 years ago
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
19 years ago
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
19 years ago
tron 758ae7e8f6 (svn r3064) Replace some numbers by sprite names 19 years ago
tron 3397e202c8 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 19 years ago
tron b45aeb5c36 (svn r2886) Rename the "owner" attribute to "m1", because when it stores an owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing. 19 years ago
tron a227065ab7 (svn r2701) Insert Id tags into all source files 19 years ago
tron 559babcdc9 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
tron 0762aa9ec9 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
tron e53c4db866 (svn r2664) Remove depedency on player.h from variables.h 19 years ago
tron d71788c402 (svn r2660) Get rid of some more shifting/anding/casting 19 years ago
tron ac66e3e28f (svn r2650) Convert many explicit shifts+ands to extract bits to invocations of GB - should be a bit nicer to read 19 years ago
ludde 3e62457107 (svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
Added a way to bind a C-string to an openttd string which doesn't modify the game state.
19 years ago
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.
19 years ago
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. 19 years ago
tron 229fbefc03 (svn r2505) Remove some unnecessary #includes 19 years ago
tron bec5e4fb4c (svn r2487) Replace TILE_XY by TileXY/TileDiffXY 19 years ago
tron 61f6f07edd (svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY 19 years ago
tron 0be5b38286 (svn r2464) Move definition of _inclined_tileh out of variables.h 19 years ago
tron 74541c1dcc (svn r2408) Introduce SetTileOwner() and use it 19 years ago
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
Darkvater 921cc4e94a (svn r2297) - CodeChange: server-check the next batch of commands.
- CodeChange: since only the server will be able to modify difficulty settings, leave the checking of correct values besides, and trust users will join legit servers.
- CodeChange: for renaming signs, only check if GetDParam(); eg _decode_parameters is empty ('\0') or not, instead of the extra check of players, etc. That basically does the same thing. Also dirty sign two times when renaming, once before, once after the action. Because if the name becomes shorter and you update only after, garbage remains on the screen.
- CodeChange: made GetMaskOfTownActions() available to the town-cmd to double-check if the action was available to the player. For this purpose the hardcoded _local_player has been removed from the function and is now passed as a parameter.
19 years ago
Darkvater 3ad11e0ad4 (svn r2279) - Fix: Check the parameters of the first 10 Commands. While there also add proper comments for the functions and fix up CmdFailed() 19 years ago
tron 9e53b86dca (svn r2093) uint -> TileIndex, remove commented out code and a local variable, which was only used once 20 years ago
tron b973ad1df9 (svn r1888) The landscape template sprites are ordinary sprites, treating them as non-sprites resulted in yet another endianess issue. This fixes the problem introduced in r1855 20 years ago
tron 204d08140a (svn r1867) Include tables/sprites.h only in files which need it 20 years ago
tron 6b83a05ada (svn r1863) Give the effect vehicle type enums more descriptive names and use the enum as parameter type for CreateEffectVehicle*()
-Fix: [1116619] Generate the correct smoke type for diesel trains
20 years ago
tron 94c75f33bb (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*) 20 years ago
tron 2a151d9354 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate 20 years ago
tron f8d97a5f61 (svn r1839) Move GetTileSlope() and GetTileZ() into tile.[ch] and use more explicit types as parameters 20 years ago
tron 88ebe22d8b (svn r1782) Remove line which should've been removed in r1779 and caused map generation to hang infinitely 20 years ago
tron 5e1364daeb (svn r1779) Make the map generation code slightly more readable 20 years ago
tron 0601293edb (svn r1777) Fix map generation for tropical and arctic landscape on larger/smaller maps 20 years ago