$treeview $search $mathjax
Stratagus  2.2.6
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
           Stratagus - A free fantasy real time strategy game engine

CTileset Class Reference

Tileset definition. More...

#include <tileset.h>

List of all members.


Public Member Functions

void Clear ()
bool IsSeenTile (unsigned short type, unsigned short seen) const
 Orc wall placement table.

Public Attributes

std::string Name
std::string ImageFile
 Nice name to display.
int NumTiles
 File containing image data.
PixelSize PixelTileSize
 Number of tiles in the tables.
unsigned short * Table
 Size of a tile in pixel.
unsigned short * FlagsTable
 Pud to Internal conversion table.
TileInfoTiles
 Flag table for editor.
unsigned char * TileTypeTable
 Tile descriptions.
unsigned int NumTerrainTypes
 For fast lookup of tile type.
SolidTerrainInfoSolidTerrainTypes
 Number of different terrain types.
unsigned TopOneTree
 Information about solid terrains.
unsigned MidOneTree
 Tile for one tree top.
unsigned BotOneTree
 Tile for one tree middle.
int RemovedTree
 Tile for one tree bottom.
unsigned GrowingTree [2]
 Tile placed where trees are gone.
int WoodTable [20]
 Growing tree tiles.
int * MixedLookupTable
 Table for tree removable.
unsigned TopOneRock
 Lookup for what part of tile used.
unsigned MidOneRock
 Tile for one rock top.
unsigned BotOneRock
 Tile for one rock middle.
int RemovedRock
 Tile for one rock bottom.
int RockTable [20]
 Tile placed where rocks are gone.
unsigned HumanWallTable [16]
 Removed rock placement table.
unsigned OrcWallTable [16]
 Human wall placement table.

Detailed Description

Tileset definition.

#include "tileset.h"

This structure contains information about the tileset of the map. It defines the look and properties of the tiles. Currently only one tileset per map is supported. In the future it is planned to support multiple tilesets on the same map. Also it is planned to support animated tiles.

The tileset structure members:

CTileset::Name

Long name of the tileset. Can be used by the level editor.

CTileset::ImageFile

Name of the graphic file, containing all tiles.

CTileset::NumTiles

The number of different tiles in the tables.

CTileset::Table

Table to map the abstract level (PUD) tile numbers, to tile numbers in the graphic file (CTileset::File). FE. 16 (solid light water) in pud to 328 in png.

CTileset::FlagsTable

Table of the tile flags used by the editor.

See also:
CMapField::Flags
CTileset::BasicNameTable

Index to name of the basic tile type. FE. "light-water". If the index is 0, the tile is not used.

See also:
CTileset::TileNames
CTileset::MixedNameTable

Index to name of the mixed tile type. FE. "light-water". If this index is 0, the tile is a solid tile.

See also:
CTileset::TileNames
CTileset::TileTypeTable

Lookup table of the tile type. Maps the graphic file tile number back to a tile type (TileTypeWood, TileTypeWater, ...)

Note:
The creation of this table is currently hardcoded in the engine. It should be calculated from the flags in the tileset configuration (CCL). And it is created for the map and not for the tileset.

I'm not sure if this table is needed in the future.

See also:
TileType.
CTileset::NumNames

Number of different tile names.

CTileset::TileNames

The different tile names. FE "light-grass", "dark-water".

CTileset::TopOneTree

The tile number of tile only containing the top part of a tree. Is created on the map by lumber chopping.

CTileset::MidOneTree

The tile number of tile only containing the connection of the top part to the bottom part of tree. Is created on the map by lumber chopping.

CTileset::BotOneTree

The tile number of tile only containing the bottom part of a tree. Is created on the map by lumber chopping.

CTileset::RemovedTree

The tile number of the tile placed where trees are removed. Is created on the map by lumber chopping.

CTileset::GrowingTree[2]

Contains the tile numbers of a growing tree from small to big.

Note:
Not yet used.
CTilset::WoodTable[20]

Table for wood removable. This table contains the tile which is placed after a tree removement, depending on the surrounding.

CTileset::MixedLookupTable[] Table for finding what part of the tile contains wood/rock, and which part is grass or bare ground.

CTileset::TopOneRock

The tile number of tile only containing the top part of a rock. Is created on the map by destroying rocks.

CTileset::MidOneRock

The tile number of tile only containing the connection of the top part to the bottom part of a rock. Is created on the map by destroying rocks.

CTileset::BotOneRock

The tile number of tile only containing the bottom part of a rock. Is created on the map by destroying rocks.

CTileset::RemovedRock

The tile number of the tile placed where rocks are removed. Is created on the map by destroying rocks.

CTileset::RockTable[20]

Table for rock removable. Depending on the surrinding this table contains the new tile to be placed.

Todo:
Johns: I don't think this table or routines look correct. But they work correct.
CTileset::HumanWallTable

Table of human wall tiles, index depends on the surroundings.

CTileset::OrcWallTable

Table of orc wall tiles, index depends on the surroundings.


Member Function Documentation

void CTileset::Clear (  )  [inline]

bool CTileset::IsSeenTile ( unsigned short  type,
unsigned short  seen 
) const [inline]

Orc wall placement table.


Member Data Documentation

std::string CTileset::Name

std::string CTileset::ImageFile

Nice name to display.

File containing image data.

Number of tiles in the tables.

unsigned short* CTileset::Table

Size of a tile in pixel.

unsigned short* CTileset::FlagsTable

Pud to Internal conversion table.

Flag table for editor.

unsigned char* CTileset::TileTypeTable

Tile descriptions.

For fast lookup of tile type.

Number of different terrain types.

Information about solid terrains.

Tile for one tree top.

Tile for one tree middle.

Tile for one tree bottom.

unsigned CTileset::GrowingTree[2]

Tile placed where trees are gone.

Growing tree tiles.

Table for tree removable.

Lookup for what part of tile used.

Tile for one rock top.

Tile for one rock middle.

Tile for one rock bottom.

Tile placed where rocks are gone.

Removed rock placement table.

unsigned CTileset::OrcWallTable[16]

Human wall placement table.


The documentation for this class was generated from the following file:
(C) Copyright 1998-2011 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.