src/heightmap.h
author rubidium
Sun, 01 Jun 2008 16:45:32 +0000
branch0.6
changeset 10801 3ad9dfb5430d
parent 6505 abcb0580d976
child 10429 1b99254f9607
permissions -rw-r--r--
(svn r13352) [0.6] -Backport from trunk (r13348, r13222, r13221, r13217):
- Fix: Industry tiles would sometimes tell they need a 'level' slope when they do not want the slope (r13348)
- Fix: Attempts to make the old AI perform better (r13217, r13221, r13222)
4300
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     1
/* $Id$ */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     2
6505
abcb0580d976 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5726
diff changeset
     3
/** @file heightmap.h */
abcb0580d976 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5726
diff changeset
     4
4300
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     5
#ifndef HEIGHTMAP_H
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     6
#define HEIGHTMAP_H
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     7
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     8
/*
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     9
 * Order of these enums has to be the same as in lang/english.txt
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    10
 * Otherwise you will get inconsistent behaviour.
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    11
 */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    12
enum {
6505
abcb0580d976 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5726
diff changeset
    13
	HM_COUNTER_CLOCKWISE, ///< Rotate the map counter clockwise 45 degrees
abcb0580d976 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5726
diff changeset
    14
	HM_CLOCKWISE,         ///< Rotate the map clockwise 45 degrees
4300
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    15
};
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    16
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    17
/**
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    18
 * Get the dimensions of a heightmap.
6505
abcb0580d976 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5726
diff changeset
    19
 * @param filename to query
abcb0580d976 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5726
diff changeset
    20
 * @param x dimension x
abcb0580d976 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5726
diff changeset
    21
 * @param y dimension y
4300
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    22
 * @return Returns false if loading of the image failed.
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    23
 */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    24
bool GetHeightmapDimensions(char *filename, uint *x, uint *y);
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    25
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    26
/**
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    27
 * Load a heightmap from file and change the map in his current dimensions
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    28
 *  to a landscape representing the heightmap.
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    29
 * It converts pixels to height. The brighter, the higher.
6505
abcb0580d976 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5726
diff changeset
    30
 * @param filename of the heighmap file to be imported
4300
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    31
 */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    32
void LoadHeightmap(char *filename);
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    33
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    34
/**
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    35
 * Make an empty world where all tiles are of height 'tile_height'.
6505
abcb0580d976 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5726
diff changeset
    36
 * @param tile_height of the desired new empty world
4300
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    37
 */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    38
void FlatEmptyWorld(byte tile_height);
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    39
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    40
#endif /* HEIGHTMAP_H */