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()
19 years ago
celestar
e924ff84eb
(svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
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
celestar
20c29f10df
(svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
19 years ago
celestar
3f7eb666ba
(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
c4a4bb2ffb
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
19 years ago
tron
541703a2f6
(svn r4073) Add functions to make and test for (most) unmovable tiles
19 years ago
tron
820b8ca230
(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
b394f72fa9
(svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable
19 years ago
tron
9b53fb9e03
(svn r3791) Replace home grown direction handling for placing lighthouses by standard DiagDir
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
22dc05faf2
(svn r3510) Fiddle with whitespace and parentheses
19 years ago
Darkvater
1a2fac805c
(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
e272b03fee
(svn r3365) Staticise 36 functions
19 years ago
tron
ece9b9b2b6
(svn r3066) Constify the parameter of GetSlopeZ_*()
19 years ago
tron
d5042d4ab2
(svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list
19 years ago
tron
76db75d81a
(svn r3028) s/255/OWNER_SPECTATOR/
19 years ago
tron
f6bda82806
(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
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
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
d71788c402
(svn r2660) Get rid of some more shifting/anding/casting
19 years ago
celestar
85f06d6e7b
(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite
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
1b4a0897b6
(svn r2535) Tabs
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
3154e7148d
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
19 years ago
celestar
aa7334a3ec
(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer
19 years ago
tron
74541c1dcc
(svn r2408) Introduce SetTileOwner() and use it
20 years ago
tron
0c4ecbe9ec
(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
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
Darkvater
033995ec6e
(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()
20 years ago
darkvater
f3b217db9d
(svn r2296) - Fix (regression): oops, forgot the MS code-decleration rules :p
20 years ago
Darkvater
a72c06d845
(svn r2295) - Fix: you were still able to delete any tile if you were not careful with CmdDestroyCompanyHQ. Fixed this; thanks HackyKid.
20 years ago
Darkvater
5e6923e936
(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.
20 years ago
pasky
2d9611f948
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
20 years ago
pasky
f820aa3f60
(svn r1993) Fixed some devious [lack of] tabs usage.
20 years ago
tron
f8d97a5f61
(svn r1839) Move GetTileSlope() and GetTileZ() into tile.[ch] and use more explicit types as parameters
20 years ago
darkvater
961ba55e85
(svn r1729) - Fix: [ 1112469 ] Clearing land for free by reallocating HQ
20 years ago
tron
5885b31bb4
(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
3617d24318
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
...
These scale a number relative to the map size/circumference.
Use them to scale the amount of map objects.
Of course at the moment they return just the input, because there are no bigger/smaller maps yet.
20 years ago
tron
189ca73707
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
20 years ago
tron
31d6f87d80
(svn r1560) Introduce SetTileType() and SetTileHeight()
...
Replace direct references to _map_type_and_height with these
20 years ago
tron
ae796740aa
(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts
20 years ago
tron
7ca6b2b8b0
(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
20 years ago
tron
f8c95a1dbe
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
20 years ago