KUDr
308f27a3de
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
19 years ago
peter1138
c6d48f9235
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
19 years ago
tron
6dbc9c9ced
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
19 years ago
belugas
43101bd2d1
(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
19 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()
19 years ago
celestar
6443c14ebd
(svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE
19 years ago
tron
c40740e058
(svn r4120) Use the new station functions where appropriate
19 years ago
tron
f6285a659c
(svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
19 years ago
tron
8ce4bdfad9
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
19 years ago
tron
a90e46bf03
(svn r3981) More work for the rail accessing functions and enums
19 years ago
tron
ab9af3b05d
(svn r3787) Use DirToDiagDir() instead of >> 1
19 years ago
tron
fa6632ec32
(svn r3786) More work for DirDiff
19 years ago
tron
8cfcdaa733
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
19 years ago
tron
087fe86ed2
(svn r3564) Several smaller changes:
...
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements
19 years ago
tron
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
tron
9712d6f639
(svn r3510) Fiddle with whitespace and parentheses
19 years ago
Darkvater
e562fad039
(svn r3216) - Fix (regression): endless loop introduced in revision 3190
19 years ago
truelight
cd1ad24723
(svn r3210) -Codechange: use IsRailWaypoint where possible (instead of magicnumbers)
...
-Codechange: IsRailWaypoint should take 'tile', not 'm5'
19 years ago
tron
d09db07ca1
(svn r3204) Make handling of clicking on vehicles a bit less ugly by avoiding function declarations in .c files and unnecessary indirection
19 years ago
tron
67dcf1ffd8
(svn r3197) Use a better bias so you can directly see the date range a disaster can happen in
19 years ago
tron
7289cc7c07
(svn r3190) Turn some loops into canonical for loop form
19 years ago
tron
84a16a0b30
(svn r3184) GB/SB
19 years ago
tron
9d0e7b6458
(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
6509e42db3
(svn r3179) - RandomRange() and RandomTile() instead of home brewed versions
...
- CHANCE*() instead of mumbling strange numbers
19 years ago
tron
524fd25cbd
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
19 years ago
tron
0b936c3222
(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
b17b87469c
(svn r3064) Replace some numbers by sprite names
19 years ago
tron
6d7c7e67b2
(svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them
19 years ago
Darkvater
3536bbdad0
(svn r2961) - Fix: [ 1219123 ] Fix for [ 1216203 ] UFO-broken waypoint (lucaspiller)
19 years ago
tron
8b74a95d36
(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
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
f09638ad3d
(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
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.
20 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.
20 years ago
tron
1307f90b5e
(svn r2535) Tabs
20 years ago
tron
6923badbba
(svn r2505) Remove some unnecessary #includes
20 years ago
tron
9617614b04
(svn r2487) Replace TILE_XY by TileXY/TileDiffXY
20 years ago
tron
2b73dec567
(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY
20 years ago
tron
a733fede9b
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
20 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
20 years ago
Darkvater
ba8c649fac
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
tron
6d2b9d2c3a
(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
38587b60f7
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
...
This makes it necessary to rename TileType() to GetTileType() because a type and a function may not share the same name.
20 years ago
tron
5a6ec81e7f
(svn r1716) Prevent zeppelins from accessing non-existent tiles when leaving the map
20 years ago
tron
39858e696b
(svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h
20 years ago
tron
94d5aeabb2
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
20 years ago
tron
7ff921855a
(svn r1549) Clean up some functions:
...
uint tile -> TileIndex tile
if () cascade -> switch ()
20 years ago
tron
27057ae4b0
(svn r1545) Add TileHeight() which returns the height (not multiplied by 8)
...
Replace some direct references to _map_type_and_height with TileHeight()/IsTileType()
20 years ago