Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
of GB - should be a bit nicer to read
|
|
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.
|
|
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.
|
|
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
|
|
|
|
|
|
TileVirtXY
|
|
|
|
|
|
|
|
- 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.
|
|
there also add proper comments for the functions and fix up CmdFailed()
|
|
variable, which was only used once
|
|
them as non-sprites resulted in yet another endianess issue. This fixes the problem introduced in r1855
|
|
|
|
use the enum as parameter type for CreateEffectVehicle*()
-Fix: [1116619] Generate the correct smoke type for diesel trains
|
|
(returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
|
|
own and use SpriteID as parameter type where appropriate
|
|
explicit types as parameters
|
|
generation to hang infinitely
|
|
|
|
larger/smaller maps
|
|
- Supports trains, road vehicles and ships.
- Uses A* pathfinding (same codebase as the new ai).
- Currently unlimited search depth, so might perform badly on large maps/networks (especially ships).
- Will always find a route if there is one.
- Allows custom penalties for obstacles to be set in openttd.cfg (npf_ values).
- With NPF enabled, ships can have orders that are very far apart. Be careful, this will break (ships get lost) when the old pathfinder is used again.
- Feature: Disabling 90 degree turns for trains and ships.
- Requires NPF to be enabled.
- Ships and trains can no longer make weird 90 degree turns on tile borders.
- Codechange: Removed table/directions.h.
- table/directions.h contained ugly static tables but was included more than once. The tables, along with a few new ones are in npf.[ch] now. Better suggestions for a location?
- Fix: Binary heap in queue.c did not allocate enough space, resulting in a segfault.
- Codechange: Rewritten FindFirstBit2x64, added KillFirstBit2x64.
- Codechange: Introduced constant INVALID_TILE, to replace the usage of 0 as an invalid tile. Also replaces TILE_WRAPPED.
- Codechange: Moved TileAddWrap() to map.[ch]
- Add TileIndexDiffCByDir(), TileIndexDiffCByDir().
- Codechange: Moved IsTrainStationTile() to station.h
- Add: IsRoadStationTile() and GetRoadStationDir().
|
|
incorrect input where it was placed
|
|
|
|
[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.
|
|
|
|
single tile from map.h and put them into a seperate file tile.h
|
|
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.
|
|
FindLandscapeHeightByTile()
While here clean up some other stuff: uint -> TileIndex, assert() that the TileIndex is valid and remove a line which was already commented out
|
|
|
|
works, but on non-square maps the wrong tiles would get marked as MP_VOID
|
|
adapt the save/load data and some other parts of the code to that change
WARNING: If i made any mistake here it WILL lead to corrupted savegames!
|
|
the real cause has been eleminated in r1413.
Leave an assert() just to be sure...
|
|
|
|
appropriate warning flags in the Makefile
|
|
Replace direct references to _map_type_and_height with these
|
|
Replace some direct references to _map_type_and_height with TileHeight()/IsTileType()
|
|
them into inline functions and add some asserts
|
|
|
|
from map.h into map.c.
Now the whole source except map.c is independent of TILE_[XY]_BITS!
|
|
the latter into inline functions names Tile[XY]
|
|
southern border now have the correct tile type (MP_VOID) again. Please note that older maps might still have incorrect border tiles, thus still causing overflows.
|
|
|