|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CTileSet Class ReferenceThis class is a tile set.
More...
#include <tile_bank.h>
Collaboration diagram for NL3D::CTileSet:
[legend]List of all members.
Public Types |
enum | TError {
ok = 0,
topInterfaceProblem,
bottomInterfaceProblem,
leftInterfaceProblem,
rightInterfaceProblem,
addFirstA128128,
topBottomNotTheSame,
rightLeftNotTheSame,
sizeInvalide,
errorCount
} |
enum | TTransition {
first = 0,
last = 47,
count = 48,
notfound = -1
} |
enum | TDisplacement {
FirstDisplace = 0,
LastDisplace = 15,
CountDisplace = 16
} |
enum | TBorder {
top = 0,
bottom,
left,
right,
borderCount
} |
enum | TFlagBorder {
_1111 = 0,
_0111,
_1110,
_0001,
_1000,
_0000,
dontcare = -1
} |
Public Methods |
void | addTile128 (int& indexInTileSet, CTileBank& bank) |
void | addTile256 (int& indexInTileSet, CTileBank& bank) |
void | removeTile128 (int indexInTileSet, CTileBank& bank) |
void | removeTile256 (int indexInTileSet, CTileBank& bank) |
void | clearTile128 (int indexInTileSet, CTile::TBitmap type, CTileBank& bank) |
void | clearTile256 (int indexInTileSet, CTile::TBitmap type, CTileBank& bank) |
void | clearTransition (TTransition transition, CTile::TBitmap type, CTileBank& bank) |
void | clearDisplacement (TDisplacement displacement) |
void | setName (const std::string& name) |
void | setTile128 (int indexInTileSet, const std::string& name, CTile::TBitmap type, CTileBank& bank) |
void | setTile256 (int indexInTileSet, const std::string& name, CTile::TBitmap type, CTileBank& bank) |
void | setTileTransition (TTransition transition, const std::string& name, CTile::TBitmap type, CTileBank& bank, const CTileBorder& border) |
void | setTileTransitionAlpha (TTransition transition, const std::string& name, CTileBank& bank, const CTileBorder& border, uint8 rotAlpha) |
void | setBorder (CTile::TBitmap type, const CTileBorder& border) |
void | setDisplacement (TDisplacement displacement, const std::string& fileName) |
TError | checkTile128 (CTile::TBitmap type, const CTileBorder& border, int& pixel, int& composante) |
TError | checkTile256 (CTile::TBitmap type, const CTileBorder& border, int& pixel, int& composante) |
TError | checkTileTransition (TTransition transition, CTile::TBitmap type, const CTileBorder& border, int& indexError, int& pixel, int& composante) |
bool | isDisplacement (TDisplacement displacement) |
const std::string& | getName () const |
sint | getNumTile128 () const |
sint | getNumTile256 () const |
sint32 | getTile128 (sint index) const |
sint32 | getTile256 (sint index) const |
CTileSetTransition* | getTransition (sint index) |
const CTileSetTransition* | getTransition (sint index) const |
const std::string& | getDisplacementFileName (TDisplacement displacement) |
| Return the file name of the displacement map for the map n° displacement. More...
|
TTransition | getExistingTransitionTile (TFlagBorder _top, TFlagBorder _bottom, TFlagBorder _left, TFlagBorder _right, int reject, CTile::TBitmap type) |
void | addChild (const std::string& name) |
void | removeChild (const std::string& name) |
bool | isChild (const std::string& name) |
void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
Static Public Methods |
const char* | getErrorMessage (TError error) |
TTransition | getTransitionTile (TFlagBorder top, TFlagBorder bottom, TFlagBorder left, TFlagBorder right) |
TTransition | getComplementaryTransition (TTransition transition) |
TFlagBorder | getInvertBorder (TFlagBorder border) |
TFlagBorder | getOrientedBorder (TBorder where, TFlagBorder border) |
TFlagBorder | getEdgeType (TTransition _what, TBorder _where) |
TTransition | rotateTransition (TTransition transition) |
Private Methods |
void | deleteBordersIfLast (const CTileBank& bank, CTile::TBitmap type) |
Private Attributes |
std::string | _Name |
std::vector<sint32> | _Tile128 |
std::vector<sint32> | _Tile256 |
CTileSetTransition | _TileTransition [count] |
std::set<std::string> | _ChildName |
CTileBorder | _Border128 [2] |
CTileBorder | _Border256 [2] |
CTileBorder | _BorderTransition [count][CTile::bitmapCount] |
std::string | _DisplacementFileName [CTileSet::CountDisplace] |
Static Private Methods |
TFlagBorder | getComplementaryBorder (TFlagBorder border) |
Static Private Attributes |
const sint | _Version = 1 |
const char* | _ErrorMessage [CTileSet::errorCount] |
const TFlagBorder | _TransitionFlags [count][4] |
Friends |
class | CTileBank |
Detailed Description
This class is a tile set.
It handles all the tile of the same material. -
Author(s):
-
Cyril Corvazier , Nevrax France
-
Date:
-
2000
Definition at line 272 of file tile_bank.h.
Member Enumeration Documentation
enum NL3D::CTileSet::TBorder
|
|
|
-
Enumeration values:
-
top
|
|
bottom
|
|
left
|
|
right
|
|
borderCount
|
|
Definition at line 281 of file tile_bank.h. |
enum NL3D::CTileSet::TDisplacement
|
|
|
-
Enumeration values:
-
FirstDisplace
|
|
LastDisplace
|
|
CountDisplace
|
|
Definition at line 280 of file tile_bank.h. |
enum NL3D::CTileSet::TError
|
|
|
-
Enumeration values:
-
ok
|
|
topInterfaceProblem
|
|
bottomInterfaceProblem
|
|
leftInterfaceProblem
|
|
rightInterfaceProblem
|
|
addFirstA128128
|
|
topBottomNotTheSame
|
|
rightLeftNotTheSame
|
|
sizeInvalide
|
|
errorCount
|
|
Definition at line 276 of file tile_bank.h. |
enum NL3D::CTileSet::TFlagBorder
|
|
|
-
Enumeration values:
-
_1111
|
|
_0111
|
|
_1110
|
|
_0001
|
|
_1000
|
|
_0000
|
|
dontcare
|
|
Definition at line 282 of file tile_bank.h. |
enum NL3D::CTileSet::TTransition
|
|
|
-
Enumeration values:
-
first
|
|
last
|
|
count
|
|
notfound
|
|
Definition at line 279 of file tile_bank.h. |
Member Function Documentation
void NL3D::CTileSet::addChild (
|
const std::string & name )
|
|
void NL3D::CTileSet::addTile128 (
|
int & indexInTileSet,
|
|
CTileBank & bank )
|
|
void NL3D::CTileSet::addTile256 (
|
int & indexInTileSet,
|
|
CTileBank & bank )
|
|
void NL3D::CTileSet::clearDisplacement (
|
TDisplacement displacement )
|
|
const std::string & NL3D::CTileSet::getDisplacementFileName (
|
TDisplacement displacement ) [inline]
|
|
|
Return the file name of the displacement map for the map n° displacement.
This file name is relative at the absolute path.
Definition at line 355 of file tile_bank.h. |
const char * NL3D::CTileSet::getErrorMessage (
|
TError error ) [inline, static]
|
|
const std::string & NL3D::CTileSet::getName (
|
) const
|
|
sint NL3D::CTileSet::getNumTile128 (
|
) const [inline]
|
|
sint NL3D::CTileSet::getNumTile256 (
|
) const [inline]
|
|
sint32 NL3D::CTileSet::getTile128 (
|
sint index ) const [inline]
|
|
sint32 NL3D::CTileSet::getTile256 (
|
sint index ) const [inline]
|
|
bool NL3D::CTileSet::isChild (
|
const std::string & name ) [inline]
|
|
bool NL3D::CTileSet::isDisplacement (
|
TDisplacement displacement ) [inline]
|
|
void NL3D::CTileSet::removeChild (
|
const std::string & name )
|
|
void NL3D::CTileSet::removeTile128 (
|
int indexInTileSet,
|
|
CTileBank & bank )
|
|
void NL3D::CTileSet::removeTile256 (
|
int indexInTileSet,
|
|
CTileBank & bank )
|
|
void NL3D::CTileSet::setDisplacement (
|
TDisplacement displacement,
|
|
const std::string & fileName )
|
|
void NL3D::CTileSet::setName (
|
const std::string & name )
|
|
void NL3D::CTileSet::setTile128 (
|
int indexInTileSet,
|
|
const std::string & name,
|
|
CTile::TBitmap type,
|
|
CTileBank & bank )
|
|
void NL3D::CTileSet::setTile256 (
|
int indexInTileSet,
|
|
const std::string & name,
|
|
CTile::TBitmap type,
|
|
CTileBank & bank )
|
|
Friends And Related Function Documentation
Member Data Documentation
CTileBorder NL3D::CTileSet::_BorderTransition[count][CTile::bitmapCount] [private]
|
|
std::set< std::string > NL3D::CTileSet::_ChildName [private]
|
|
std::string NL3D::CTileSet::_DisplacementFileName[CTileSet::CountDisplace] [private]
|
|
const char * NL3D::CTileSet::_ErrorMessage[CTileSet::errorCount] [static, private]
|
|
|
Initializer: {
"No error.",
"Top interface is incompatible.",
"Bottom interface is incompatible.",
"Left interface is incompatible.",
"Right interface is incompatible.",
"Add first a 128x128 tile.",
"Top and bottom interface not the same.",
"Right and left interface not the same.",
"Invalide bitmap size.",
}
Definition at line 476 of file tile_bank.cpp. |
std::string NL3D::CTileSet::_Name [private]
|
|
std::vector< sint32 > NL3D::CTileSet::_Tile128 [private]
|
|
std::vector< sint32 > NL3D::CTileSet::_Tile256 [private]
|
|
const sint NL3D::CTileSet::_Version = 1 [static, private]
|
|
The documentation for this class was generated from the following files:
|
|