heightmap.h
author glx
Mon, 24 Sep 2007 03:08:47 +0000
branch0.5
changeset 5545 f42dc59a45f5
parent 4300 687a17c9c557
permissions -rw-r--r--
(svn r11153) [0.5] -Fix [FS#1251]: incorrect usage of {G} tag in slovak translation
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
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     3
#ifndef HEIGHTMAP_H
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     4
#define HEIGHTMAP_H
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     5
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     6
/*
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     7
 * 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
     8
 * Otherwise you will get inconsistent behaviour.
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
     9
 */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    10
enum {
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    11
	HM_COUNTER_CLOCKWISE, //! Rotate the map counter clockwise 45 degrees
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    12
	HM_CLOCKWISE,         //! Rotate the map clockwise 45 degrees
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    13
};
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    14
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
 * Get the dimensions of a heightmap.
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    17
 * @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
    18
 */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    19
bool GetHeightmapDimensions(char *filename, uint *x, uint *y);
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    20
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    21
/**
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    22
 * 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
    23
 *  to a landscape representing the heightmap.
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    24
 * It converts pixels to height. The brighter, the higher.
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
void LoadHeightmap(char *filename);
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    27
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    28
/**
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    29
 * Make an empty world where all tiles are of height 'tile_height'.
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    30
 */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    31
void FlatEmptyWorld(byte tile_height);
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    32
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
diff changeset
    33
#endif /* HEIGHTMAP_H */