Files
@ r9583:b6e25a00b908
Branch filter:
Location: cpp/openttd-patchpack/source/src/landscape.h - annotation
r9583:b6e25a00b908
1.3 KiB
text/x-c
(svn r13621) -Fix: building roadbits in the wrong direction on bridges or building roadbits from underneath the bridge to the bridgehead is impossible, so don't silently ignore that error when building over houses and industries is not ignored.
r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r9111:983de9c5a848 r6343:4d2d12eee7b9 r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r8121:d05602c69734 r8138:f851b4cbdad1 r8138:f851b4cbdad1 r8138:f851b4cbdad1 r8119:8fdb3a371896 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6343:4d2d12eee7b9 r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r7728:ec77c9b03910 r7770:09918df1f6fd r8380:6b3d1e5a10ed r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r7335:93bf5f4b6ce4 r7335:93bf5f4b6ce4 r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a r6453:b0b56773284a | /* $Id$ */
/** @file landscape.h Functions related to OTTD's landscape. */
#ifndef LANDSCAPE_H
#define LANDSCAPE_H
#include "core/geometry_type.hpp"
#include "tile_cmd.h"
#include "slope_type.h"
#include "direction_type.h"
enum {
SNOW_LINE_MONTHS = 12,
SNOW_LINE_DAYS = 32,
};
struct SnowLine {
byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS];
byte highest_value;
};
bool IsSnowLineSet(void);
void SetSnowLine(byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]);
byte GetSnowLine(void);
byte HighestSnowLine(void);
void ClearSnowLine(void);
uint GetPartialZ(int x, int y, Slope corners);
uint GetSlopeZ(int x, int y);
void GetSlopeZOnEdge(Slope tileh, DiagDirection edge, int *z1, int *z2);
int GetSlopeZInCorner(Slope tileh, Corner corner);
Slope GetFoundationSlope(TileIndex tile, uint* z);
static inline Point RemapCoords(int x, int y, int z)
{
Point pt;
pt.x = (y - x) * 2;
pt.y = y + x - z;
return pt;
}
static inline Point RemapCoords2(int x, int y)
{
return RemapCoords(x, y, GetSlopeZ(x, y));
}
uint ApplyFoundationToSlope(Foundation f, Slope *s);
void DrawFoundation(TileInfo *ti, Foundation f);
void DoClearSquare(TileIndex tile);
void RunTileLoop();
void InitializeLandscape();
void GenerateLandscape(byte mode);
TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng);
#endif /* LANDSCAPE_H */
|