#include <CSTileSet.h>
Public Member Functions | |
CSTileSet (const CSTileSet &tileSet) | |
virtual | ~CSTileSet () |
virtual std::string | getType () |
CSTile * | getTile (unsigned char c) |
void | setSolid (bool b) |
void | setSecPerFrame (float secPerFrame) |
int | getTileCount () |
void | scaleToFit (int width, int tilesX, int height, int tilesY) |
int | getFreeTile () |
int | getMaxTileSize () |
void | setTile (CSTile *tile, unsigned char c) |
bool | isOneSize () |
int | getTileXSize () |
int | getTileYSize () |
Static Public Attributes | |
const char * | CLASS = "CSTileSet" |
|
Definition at line 25 of file CSTileSet.cpp. References LOG_ENTER, LOG_EXIT, mId, mIsOneSize, mIsSolid, mXSize, and mYSize.
|
|
Definition at line 78 of file CSTileSet.cpp. References LOG_ENTER, LOG_EXIT, and MAX_TILE.
00079 { 00080 static char *functionName="~CSTileSet"; 00081 LOG_ENTER 00082 if (mId != 0) 00083 { 00084 free(mId); 00085 mId = 0; 00086 } 00087 00088 for (int i=0; i< MAX_TILE; i++) 00089 { 00090 if (mTiles[i] != 0) 00091 { 00092 delete (mTiles[i]); 00093 mTiles[i] = 0; 00094 mTileCount--; 00095 } 00096 } 00097 00098 LOG_EXIT 00099 } |
|
Definition at line 78 of file CSTileSet.h. References CLASS.
00078 {return (std::string) CLASS;} |
|
Definition at line 80 of file CSTileSet.h. References SDLMain::shutdown(). Referenced by CSTileMap::setTile().
00081 { 00082 if (mTiles[c] == 0) 00083 { 00084 SDLMain::shutdown((std::string)"TileSet characters not found in TileSet!", 1); 00085 } 00086 return new CSTile(*mTiles[c]); 00087 } // return a new Tile -> must be freed by outside! |
Here is the call graph for this function:
|
Definition at line 143 of file CSTileSet.cpp. References LOG_ENTER, LOG_EXIT, MAX_TILE, and CSTile::setSolid(). Referenced by CSTileMap::setSolid().
|
Here is the call graph for this function:
|
Definition at line 158 of file CSTileSet.cpp. References LOG_ENTER, LOG_EXIT, MAX_TILE, and CSTile::setSecPerFrame(). Referenced by CSTileMap::setSecPerFrame().
00159 { 00160 static char *functionName="setSecPerFrame"; 00161 LOG_ENTER 00162 mSecPerFrame = secPerFrame; 00163 for (int i = 0; i< MAX_TILE; i++) 00164 { 00165 if (mTiles[i] != 0) 00166 { 00167 mTiles[i]->setSecPerFrame(secPerFrame); 00168 } 00169 } 00170 LOG_EXIT 00171 } |
Here is the call graph for this function:
|
Definition at line 90 of file CSTileSet.h.
00090 {return mTileCount;}
|
|
Definition at line 218 of file CSTileSet.cpp. References LOG_ENTER, LOG_EXIT, MAX_TILE, and CSTile::scale(). Referenced by CSTileMap::scaleMapToFit().
00219 { 00220 static char *functionName="scaleToFit"; 00221 LOG_ENTER 00222 // scaling is experimental!!! 00223 // only for single tile background usage! 00224 if (mTileCount != 1) 00225 { 00226 LOG_EXIT 00227 return; 00228 } 00229 for (int i=0; i< MAX_TILE; i++) 00230 { 00231 if (mTiles[i] != 0) 00232 { 00233 mTiles[i]->scale(width, tilesX, height, tilesY); 00234 } 00235 } 00236 LOG_EXIT 00237 } |
Here is the call graph for this function:
|
Definition at line 102 of file CSTileSet.cpp. References MAX_TILE.
|
|
Definition at line 93 of file CSTileSet.h. References MAX_TILE.
00093 {return MAX_TILE;} |
|
Definition at line 115 of file CSTileSet.cpp. References CSTile::setSecPerFrame(), and CSTile::setSolid().
00116 { 00117 if (mTiles[c] == 0) 00118 { 00119 if (tile == 0) 00120 { 00121 return; 00122 } 00123 mTiles[c] = tile; 00124 mTileCount++; 00125 } 00126 else 00127 { 00128 mTiles[c] = tile; 00129 if (tile == 0) 00130 { 00131 mTileCount--; 00132 } 00133 } 00134 if (tile != 0) 00135 { 00136 mTiles[c]->setSecPerFrame(mSecPerFrame); 00137 mTiles[c]->setSolid(mIsSolid); 00138 // experimental only for single tile, therefore shouldn't be changed... 00139 // mTiles[c]->scale(mWidth, mTilesX, mHeight, mTilesY); 00140 } 00141 } |
Here is the call graph for this function:
|
Definition at line 95 of file CSTileSet.h. Referenced by CSTileMap::setTile().
00095 {return mIsOneSize;}
|
|
Definition at line 96 of file CSTileSet.h. Referenced by CSTileMap::setTile().
00096 {return mXSize;}
|
|
Definition at line 97 of file CSTileSet.h. Referenced by CSTileMap::setTile().
00097 {return mYSize;}
|
|
Definition at line 12 of file CSTileSet.cpp. Referenced by getType(). |