|
|
|
|
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>
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 |
| CTileSet () |
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, CTileBank &bank) |
void | setName (const std::string &name) |
void | setOriented (bool oriented) |
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, CTileBank &bank) |
void | setTileVegetableDescFileName (const std::string &fileName) |
void | setTileVegetableDesc (const CTileVegetableDesc &tvd) |
void | loadTileVegetableDesc () |
| try to load the vegetable tile desc associated with the fileName (nlinfo() if can't) lookup into CPath. More...
|
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) |
const std::string & | getName () const |
bool | getOriented () 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 CTileBorder * | getBorder128 (CTile::TBitmap bitmapType) const |
const CTileBorder * | getBorder256 (CTile::TBitmap bitmapType) const |
const std::string & | getTileVegetableDescFileName () const |
uint | getDisplacementTile (TDisplacement displacement) const |
| Return the file name of the displacement map for the map n° displacement. More...
|
CTileVegetableDesc & | getTileVegetableDesc () |
| return the TileVegetable. More...
|
const CTileVegetableDesc & | getTileVegetableDesc () const |
TTransition | getExistingTransitionTile (TFlagBorder _top, TFlagBorder _bottom, TFlagBorder _left, TFlagBorder _right, int reject, CTile::TBitmap type) |
void | cleanUnusedData () |
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) |
Public Attributes |
uint32 | SurfaceData |
Private Methods |
void | deleteBordersIfLast (const CTileBank &bank, CTile::TBitmap type) |
Static Private Methods |
TFlagBorder | getComplementaryBorder (TFlagBorder border) |
Private Attributes |
std::string | _Name |
bool | _Oriented |
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] |
uint32 | _DisplacementBitmap [CTileSet::CountDisplace] |
CTileVegetableDesc | _TileVegetableDesc |
std::string | _TileVegetableDescFileName |
Static Private Attributes |
const sint | _Version = 5 |
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:
-
Cyril Corvazier , Nevrax France
-
Date:
-
2000
Definition at line 277 of file tile_bank.h.
Member Enumeration Documentation
enum NL3D::CTileSet::TBorder
|
|
enum NL3D::CTileSet::TDisplacement
|
|
enum NL3D::CTileSet::TError
|
|
|
-
Enumeration values:
-
ok |
|
topInterfaceProblem |
|
bottomInterfaceProblem |
|
leftInterfaceProblem |
|
rightInterfaceProblem |
|
addFirstA128128 |
|
topBottomNotTheSame |
|
rightLeftNotTheSame |
|
sizeInvalide |
|
errorCount |
|
Definition at line 282 of file tile_bank.h.
Referenced by getErrorMessage. |
enum NL3D::CTileSet::TFlagBorder
|
|
enum NL3D::CTileSet::TTransition
|
|
Constructor & Destructor Documentation
NL3D::CTileSet::CTileSet |
( |
|
) |
|
|
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 |
|
) |
|
|
|
Definition at line 962 of file tile_bank.cpp.
References _Border128, addFirstA128128, border, bottomInterfaceProblem, leftInterfaceProblem, ok, rightInterfaceProblem, rightLeftNotTheSame, sizeInvalide, topBottomNotTheSame, topInterfaceProblem, and type. |
|
Definition at line 1005 of file tile_bank.cpp.
References _Border128, _Border256, addFirstA128128, border, bottomInterfaceProblem, leftInterfaceProblem, ok, rightInterfaceProblem, rightLeftNotTheSame, sizeInvalide, topBottomNotTheSame, topInterfaceProblem, and type. |
|
Definition at line 1081 of file tile_bank.cpp.
References _1111, _BorderTransition, _TransitionFlags, border, bottom, bottomInterfaceProblem, count, dontcare, getExistingTransitionTile, left, leftInterfaceProblem, nlassert, ok, right, rightInterfaceProblem, TFlagBorder, top, topInterfaceProblem, and type. |
void NL3D::CTileSet::cleanUnusedData |
( |
|
) |
|
|
|
Definition at line 1365 of file tile_bank.cpp.
References _Border128, _Border256, _Tile128, _Tile256, _TileTransition, count, and type.
Referenced by clearTile128, clearTile256, clearTransition, removeTile128, and removeTile256. |
|
Definition at line 1252 of file tile_bank.cpp.
References _TransitionFlags, bottom, first, getComplementaryBorder, getTransitionTile, last, left, nlassert, notfound, right, top, and TTransition. |
uint NL3D::CTileSet::getDisplacementTile |
( |
TDisplacement |
displacement |
) |
const [inline] |
|
const char* NL3D::CTileSet::getErrorMessage |
( |
TError |
error |
) |
[inline, static] |
|
|
Definition at line 1225 of file tile_bank.cpp.
References _BorderTransition, _TransitionFlags, bottom, count, dontcare, first, left, notfound, right, top, and type.
Referenced by checkTileTransition. |
const std::string & NL3D::CTileSet::getName |
( |
|
) |
const |
|
sint NL3D::CTileSet::getNumTile128 |
( |
|
) |
const [inline] |
|
sint NL3D::CTileSet::getNumTile256 |
( |
|
) |
const [inline] |
|
bool NL3D::CTileSet::getOriented |
( |
|
) |
const [inline] |
|
sint32 NL3D::CTileSet::getTile128 |
( |
sint |
index |
) |
const [inline] |
|
sint32 NL3D::CTileSet::getTile256 |
( |
sint |
index |
) |
const [inline] |
|
const std::string & NL3D::CTileSet::getTileVegetableDescFileName |
( |
|
) |
const |
|
bool NL3D::CTileSet::isChild |
( |
const std::string & |
name |
) |
[inline] |
|
void NL3D::CTileSet::loadTileVegetableDesc |
( |
|
) |
|
|
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, |
|
|
CTileBank & |
bank |
|
) |
|
|
void NL3D::CTileSet::setName |
( |
const std::string & |
name |
) |
|
|
void NL3D::CTileSet::setOriented |
( |
bool |
oriented |
) |
[inline] |
|
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 |
|
) |
|
|
void NL3D::CTileSet::setTileVegetableDescFileName |
( |
const std::string & |
fileName |
) |
|
|
Friends And Related Function Documentation
friend class CTileBank [friend]
|
|
Member Data Documentation
CTileBorder NL3D::CTileSet::_BorderTransition[count][CTile::bitmapCount] [private]
|
|
std::set<std::string> NL3D::CTileSet::_ChildName [private]
|
|
uint32 NL3D::CTileSet::_DisplacementBitmap[CTileSet::CountDisplace] [private]
|
|
const char * NL3D::CTileSet::_ErrorMessage [static, private]
|
|
|
Initial value:
{
"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 762 of file tile_bank.cpp.
Referenced by getErrorMessage. |
std::string NL3D::CTileSet::_Name [private]
|
|
bool NL3D::CTileSet::_Oriented [private]
|
|
std::vector<sint32> NL3D::CTileSet::_Tile128 [private]
|
|
std::vector<sint32> NL3D::CTileSet::_Tile256 [private]
|
|
std::string NL3D::CTileSet::_TileVegetableDescFileName [private]
|
|
const sint NL3D::CTileSet::_Version = 5 [static, private]
|
|
uint32 NL3D::CTileSet::SurfaceData
|
|
The documentation for this class was generated from the following files:
|
|