Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
WorldHeightMapEdit Class Reference

#include <WHeightMapEdit.h>

Inherits WorldHeightMap.

Public Member Functions

 WorldHeightMapEdit (Int xExtent, Int yExtent, UnsignedByte initialHeight, Int border)
 create.
 
 WorldHeightMapEdit (WorldHeightMapEdit *pThis)
 duplicate.
 
 WorldHeightMapEdit (ChunkInputStream *pStrm)
 read from file.
 
 ~WorldHeightMapEdit (void)
 destroy.
 
void saveToFile (DataChunkOutput &chunkWriter)
 SaveToFile - saves a height map to a file.
 
WorldHeightMapEditduplicate (void)
 
void clearStatus (void)
 Status methods.
 
Bool tooManyTextures (void)
 
Bool tooManyBlends (void)
 
Bool canFitTexture (Int textureClass)
 Returns true if we can fit this texture.
 
void blendTile (Int xIndex, Int yIndex, Int srcXIndex, Int srcYIndex, Int srcClass, Int edgeClass)
 
void autoBlendOut (Int xIndex, Int yIndex, Int edgeIndex=-1)
 
Int getTextureClass (Int xIndex, Int yIndex, Bool baseClass=false)
 
void setHeight (Int xIndex, Int yIndex, UnsignedByte height)
 
void setCliff (Int xIndex, Int yIndex, Bool impassable)
 
Bool setTileNdx (Int xIndex, Int yIndex, Int textureClass, Bool singleTile)
 
Bool floodFill (Int xIndex, Int yIndex, Int textureClass, Bool doReplace)
 
void addObject (MapObject *pMapObj)
 Adds a map object to the front of the list.
 
void removeFirstObject (void)
 Removes the first map object from the list.
 
Bool isTexClassUsed (Int textureClass)
 
Int getFirstTile (Int textureClass)
 
Bool optimizeTiles (void)
 Optimizes tile allocations.
 
void showTileStatusInfo (void)
 pops up a dialog box with tile mem usage.
 
Bool selectDuplicates (void)
 Selects any dupicate map objects.
 
Bool selectSimilar (void)
 Selects any dupicate map objects.
 
Bool selectInvalidTeam (void)
 Selects any objects with invalid teams.
 
Bool resize (Int newXSize, Int newYSize, Int newHeight, Int newBorder, Bool anchorTop, Bool anchorBottom, Bool anchorLeft, Bool anchorRight, Coord3D *pObjOffset)
 
Bool remapTextures (void)
 returns true if the operation had an effect.
 
void reloadTextures (void)
 Reloads textures from disk.
 
void resetResources (void)
 Releases textures in preparation for device reset.
 
void dbgVerifyAfterUndo (void)
 Verifies the structures are still consistent.
 
Bool doCliffAdjustment (Int xIndex, Int yIndex)
 
Bool removeCliffMapping (void)
 
Int getNumBoundaries (void) const
 
void getBoundary (Int ndx, ICoord2D *border) const
 
void addBoundary (ICoord2D *boundaryToAdd)
 
void changeBoundary (Int ndx, ICoord2D *border)
 
void removeLastBoundary (void)
 
void findBoundaryNear (Coord3D *pt, float okDistance, Int *outNdx, Int *outHandle)
 
- Public Member Functions inherited from WorldHeightMap
 WorldHeightMap (ChunkInputStream *pFile, Bool bHMapOnly=false)
 
 ~WorldHeightMap (void)
 
const VecICoord2DgetAllBoundaries (void) const
 
UnsignedBytegetDataPtr (void)
 
Int getXExtent (void)
 number of vertices in x
 
Int getYExtent (void)
 number of vertices in y
 
Int getDrawOrgX (void)
 
Int getDrawOrgY (void)
 
Int getDrawWidth (void)
 
Int getDrawHeight (void)
 
void setDrawWidth (Int width)
 
void setDrawHeight (Int height)
 
virtual Int getBorderSize (void)
 
Int getBorderSizeInline (void) const
 
UnsignedByte getDisplayHeight (Int x, Int y)
 Get height with the offset that HeightMapRenderObjClass uses built in.
 
UnsignedByte getHeight (Int xIndex, Int yIndex)
 Get height in normal coordinates.
 
void getUVForBlend (Int edgeClass, Region2D *range)
 
Bool setDrawOrg (Int xOrg, Int yOrg)
 
Int getTextureClassNoBlend (Int xIndex, Int yIndex, Bool baseClass=false)
 
Int getTextureClass (Int xIndex, Int yIndex, Bool baseClass=false)
 
TXTextureClass getTextureFromIndex (Int textureIndex)
 
void setTextureLOD (Int lod)
 set maximum lod level sent to the hardware.
 
TextureClassgetTerrainTexture (void)
 
TextureClassgetAlphaTerrainTexture (void)
 
TextureClassgetEdgeTerrainTexture (void)
 
Bool getUVData (Int xIndex, Int yIndex, float U[4], float V[4], Bool fullTile)
 UV mapping data for a cell to map into the terrain texture. Returns true if the textures had to be stretched for cliffs.
 
Bool getFlipState (Int xIndex, Int yIndex) const
 
Bool getQuickFlipState (Int xIndex, Int yIndex) const
 Faster version of above function without all the safety checks - For people that do checks externally.
 
void setFlipState (Int xIndex, Int yIndex, Bool value)
 
void clearFlipStates (void)
 
Bool getCliffState (Int xIndex, Int yIndex) const
 
Bool getExtraAlphaUVData (Int xIndex, Int yIndex, float U[4], float V[4], UnsignedByte alpha[4], Bool *flip, Bool *cliff)
 
void getAlphaUVData (Int xIndex, Int yIndex, float U[4], float V[4], UnsignedByte alpha[4], Bool *flip, Bool fullTile)
 UV mapping data for a cell to map into the alpha terrain texture.
 
void getTerrainColorAt (Real x, Real y, RGBColor *pColor)
 
AsciiString getTerrainNameAt (Real x, Real y)
 
Bool isCliffMappedTexture (Int xIndex, Int yIndex)
 Get whether something is cliff indexed with the offset that HeightMapRenderObjClass uses built in.
 
Bool getSeismicUpdateFlag (Int xIndex, Int yIndex) const
 
void setSeismicUpdateFlag (Int xIndex, Int yIndex, Bool value)
 
void clearSeismicUpdateFlags (void)
 
virtual Real getSeismicZVelocity (Int xIndex, Int yIndex) const
 
virtual void setSeismicZVelocity (Int xIndex, Int yIndex, Real value)
 
void fillSeismicZVelocities (Real value)
 
virtual Real getBilinearSampleSeismicZVelocity (Int x, Int y)
 
TerrainTextureClassgetFlatTexture (Int xCell, Int yCell, Int cellWidth, Int pixelsPerCell)
 
UnsignedBytegetPointerToTileData (Int xIndex, Int yIndex, Int width)
 
Bool getRawTileData (Short tileNdx, Int width, UnsignedByte *buffer, Int bufLen)
 
UnsignedBytegetRGBAlphaDataForWidth (Int width, TBlendTileInfo *pBlend)
 
void setRawHeight (Int xIndex, Int yIndex, UnsignedByte height)
 
- Public Member Functions inherited from RefCountClass
 RefCountClass (void)
 
 RefCountClass (const RefCountClass &)
 
void Add_Ref (void) const
 
WWINLINE void Release_Ref (void) const
 
int Num_Refs (void) const
 
virtual void Delete_This (void)
 

Static Public Member Functions

static void init (void)
 
static void shutdown (void)
 
static UnsignedBytegetPointerToClassTileData (Int texClass)
 
static Int getNumTexClasses (void)
 
static AsciiString getTexClassName (int ndx)
 
static AsciiString getTexClassUiName (int ndx)
 
static Int getTexClassNumTiles (int ndx)
 
static Int getTexClassIsBlendEdge (int ndx)
 
- Static Public Member Functions inherited from WorldHeightMap
static Int getMinHeightValue (void)
 
static Int getMaxHeightValue (void)
 
static void freeListOfMapObjects (void)
 
static void setupAlphaTiles (void)
 
static Bool readTiles (InputStream *pStrm, TileData **tiles, Int numRows)
 
static Int countTiles (InputStream *pStrm, Bool *halfTile=NULL)
 Count how many tiles come in from a targa file.
 
- Static Public Member Functions inherited from RefCountClass
static int Total_Refs (void)
 
static RefCountClassAdd_Active_Ref (RefCountClass *obj)
 
static RefCountClassSet_Ref_Owner (RefCountClass *obj, char *file, int line)
 
static void Remove_Active_Ref (RefCountClass *obj)
 
static bool Validate_Active_Ref (RefCountClass *obj)
 

Protected Member Functions

Int allocateTiles (Int textureClass)
 
Int allocateEdgeTiles (Int textureClass)
 
void blendToThisClass (Int xIndex, Int yIndex, Int textureClass, Int edgeClass)
 
void blendSpecificTiles (Int xIndex, Int yIndex, Int srcXIndex, Int srcYIndex, Int curTileNdx, Int blendTileNdx, Bool longDiagonal, Int edgeClass)
 
Int findOrCreateBlendTile (TBlendTileInfo *pBlendInfo)
 
Int addCliffInfo (TCliffInfo *pCliffInfo)
 
Int getTileIndexFromTerrainType (TerrainType *terrain)
 
Int getTileNdxForClass (Int xIndex, Int yIndex, Int textureClass)
 
Int getBlendTileNdxForClass (Int xIndex, Int yIndex, Int textureClass)
 
Int getTextureClassFromNdx (Int tileNdx)
 
void getTexClassNeighbors (Int xIndex, Int yIndex, Int textureClass, Int *pSideCount, Int *pTotalCount)
 
void updateForAdjacentCliffs (Int xIndex, Int yIndex, UnsignedByte *pProcessed, TCliffInfo &cliffInfo)
 
Bool adjustForTiling (TCliffInfo &cliffInfo, Real textureWidth)
 
void updateFlatCellForAdjacentCliffs (Int xIndex, Int yIndex, Int curTileClass, UnsignedByte *pProcessed=NULL)
 
- Protected Member Functions inherited from WorldHeightMap
TileDatagetSourceTile (UnsignedInt ndx)
 
TileDatagetEdgeTile (UnsignedInt ndx)
 
void getUVForNdx (Int ndx, float *minU, float *minV, float *maxU, float *maxV, Bool fullTile)
 UV mapping data for a cell to map into the terrain texture.
 
Bool getUVForTileIndex (Int ndx, Short tileNdx, float U[4], float V[4], Bool fullTile)
 
Int getTextureClassFromNdx (Int tileNdx)
 
void readTexClass (TXTextureClass *texClass, TileData **tileData)
 
Int updateTileTexturePositions (Int *edgeHeight)
 Places each tile in the texture.
 
void initCliffFlagsFromHeights (void)
 
void setCellCliffFlagFromHeights (Int xIndex, Int yIndex)
 
Bool ParseHeightMapData (DataChunkInput &file, DataChunkInfo *info, void *userData)
 
Bool ParseSizeOnly (DataChunkInput &file, DataChunkInfo *info, void *userData)
 
Bool ParseBlendTileData (DataChunkInput &file, DataChunkInfo *info, void *userData)
 
Bool ParseObjectData (DataChunkInput &file, DataChunkInfo *info, void *userData, Bool readDict)
 
 WorldHeightMap (void)
 Simple constructor for WorldHeightMapEdit class.
 
void setCliffState (Int xIndex, Int yIndex, Bool state)
 
- Protected Member Functions inherited from RefCountClass
virtual ~RefCountClass (void)
 

Static Protected Member Functions

static void loadBitmap (char *path, const char *uiName)
 Load a tga bitmap into a set of tiles.
 
static void loadDirectoryOfImages (char *path)
 Loads all the images in a directory (including subdirectories)
 
static void loadImagesFromTerrainType (TerrainType *terrain)
 
static void loadBaseImages (void)
 Load the available bitmap images.
 
- Static Protected Member Functions inherited from WorldHeightMap
static Bool ParseHeightMapDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData)
 
static Bool ParseSizeOnlyInChunk (DataChunkInput &file, DataChunkInfo *info, void *userData)
 
static Bool ParseBlendTileDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData)
 
static Bool ParseWorldDictDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData)
 
static Bool ParseObjectsDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData)
 
static Bool ParseObjectDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData)
 
static Bool ParseLightingDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData)
 

Protected Attributes

Bool m_warnTooManyTex
 warning message flag.
 
Bool m_warnTooManyBlend
 warning message flag.
 
- Protected Attributes inherited from WorldHeightMap
Int m_width
 Height map width.
 
Int m_height
 Height map height (y size of array).
 
Int m_borderSize
 Non-playable border area.
 
VecICoord2D m_boundaries
 the in-game boundaries
 
Int m_dataSize
 size of m_data.
 
UnsignedBytem_data
 array of z(height) values in the height map.
 
UnsignedBytem_seismicUpdateFlag
 array of bits to prevent ovelapping physics-update regions from doubling effects on shared cells
 
UnsignedInt m_seismicUpdateWidth
 width of the array holding SeismicUpdateFlags
 
Realm_seismicZVelocities
 how fast is the dirt rising/falling at this location
 
UnsignedBytem_cellFlipState
 array of bits to indicate the flip state of each cell.
 
Int m_flipStateWidth
 with of the array holding cellFlipState
 
UnsignedBytem_cellCliffState
 array of bits to indicate the cliff state of each cell.
 
Shortm_tileNdxes
 Texture indices.
 
Shortm_blendTileNdxes
 matches m_Data, indexes into m_blendedTiles. 0 means no blend info.
 
Shortm_cliffInfoNdxes
 matches m_Data, indexes into m_cliffInfo. 0 means no cliff info.
 
Shortm_extraBlendTileNdxes
 matches m_Data, indexes into m_extraBlendedTiles. 0 means no blend info.
 
Int m_numBitmapTiles
 
Int m_numEdgeTiles
 
Int m_numBlendedTiles
 
TileDatam_sourceTiles [NUM_SOURCE_TILES]
 Tiles for m_textureClasses.
 
TileDatam_edgeTiles [NUM_SOURCE_TILES]
 Tiles for m_textureClasses.
 
TBlendTileInfo m_blendedTiles [NUM_BLEND_TILES]
 
TBlendTileInfo m_extraBlendedTiles [NUM_BLEND_TILES]
 
TCliffInfo m_cliffInfo [NUM_CLIFF_INFO]
 
Int m_numCliffInfo
 Number of cliffInfo's used in m_cliffInfo.
 
int m_numTextureClasses
 
TXTextureClass m_textureClasses [NUM_TEXTURE_CLASSES]
 
int m_numEdgeTextureClasses
 
TXTextureClass m_edgeTextureClasses [NUM_TEXTURE_CLASSES]
 
TerrainTextureClassm_terrainTex
 
Int m_terrainTexHeight
 
AlphaTerrainTextureClassm_alphaTerrainTex
 Height of m_terrainTex allocated.
 
Int m_alphaTexHeight
 
AlphaEdgeTextureClassm_alphaEdgeTex
 Height of m_alphaTerrainTex allocated.
 
Int m_alphaEdgeHeight
 
Int m_drawOriginX
 Height of m_alphaEdgeTex allocated.
 
Int m_drawOriginY
 
Int m_drawWidthX
 
Int m_drawHeightY
 

Static Protected Attributes

static int m_numGlobalTextureClasses =0
 
static TGlobalTextureClass m_globalTextureClasses [NUM_TEXTURE_CLASSES]
 
- Static Protected Attributes inherited from WorldHeightMap
static TileDatam_alphaTiles [NUM_ALPHA_TILES] ={0,0,0,0,0,0,0,0,0,0,0,0}
 Tiles that hold the alpha channel info.
 

Additional Inherited Members

- Public Types inherited from WorldHeightMap
enum  { NORMAL_DRAW_WIDTH = 129 , NORMAL_DRAW_HEIGHT = 129 , STRETCH_DRAW_WIDTH = 65 , STRETCH_DRAW_HEIGHT = 65 }
 
- Public Attributes inherited from RefCountClass
RefCountNodeClass ActiveRefNode
 
ActiveRefStruct ActiveRefInfo
 
- Static Public Attributes inherited from RefCountClass
static RefCountListClass ActiveRefList
 

Detailed Description

Definition at line 63 of file WHeightMapEdit.h.

Constructor & Destructor Documentation

◆ WorldHeightMapEdit() [1/3]

WorldHeightMapEdit::WorldHeightMapEdit ( Int xExtent,
Int yExtent,
UnsignedByte initialHeight,
Int border )

create.

WorldHeightMapEdit - create a new height map .

Definition at line 92 of file WHeightMapEdit.cpp.

◆ WorldHeightMapEdit() [2/3]

WorldHeightMapEdit::WorldHeightMapEdit ( WorldHeightMapEdit * pThis)

duplicate.

WorldHeightMapEdit - create a new height map from another map.

Definition at line 173 of file WHeightMapEdit.cpp.

◆ WorldHeightMapEdit() [3/3]

WorldHeightMapEdit::WorldHeightMapEdit ( ChunkInputStream * pStrm)

read from file.

WorldHeightMapEdit - read a height map from a file. Just calls WorldHeightMap::WorldHeightMap(FILE *pStrm), then loads the texture classes.

Definition at line 264 of file WHeightMapEdit.cpp.

◆ ~WorldHeightMapEdit()

WorldHeightMapEdit::~WorldHeightMapEdit ( void )

destroy.

Destructor -.

Definition at line 56 of file WHeightMapEdit.cpp.

Member Function Documentation

◆ addBoundary()

void WorldHeightMapEdit::addBoundary ( ICoord2D * boundaryToAdd)

Definition at line 3338 of file WHeightMapEdit.cpp.

◆ addCliffInfo()

Int WorldHeightMapEdit::addCliffInfo ( TCliffInfo * pCliffInfo)
protected

Definition at line 3309 of file WHeightMapEdit.cpp.

◆ addObject()

void WorldHeightMapEdit::addObject ( MapObject * pMapObj)

Adds a map object to the front of the list.

Definition at line 1981 of file WHeightMapEdit.cpp.

◆ adjustForTiling()

Bool WorldHeightMapEdit::adjustForTiling ( TCliffInfo & cliffInfo,
Real textureWidth )
protected

Definition at line 2562 of file WHeightMapEdit.cpp.

◆ allocateEdgeTiles()

Int WorldHeightMapEdit::allocateEdgeTiles ( Int textureClass)
protected

Definition at line 922 of file WHeightMapEdit.cpp.

◆ allocateTiles()

Int WorldHeightMapEdit::allocateTiles ( Int textureClass)
protected

Definition at line 881 of file WHeightMapEdit.cpp.

◆ autoBlendOut()

void WorldHeightMapEdit::autoBlendOut ( Int xIndex,
Int yIndex,
Int edgeIndex = -1 )

Definition at line 1198 of file WHeightMapEdit.cpp.

◆ blendSpecificTiles()

void WorldHeightMapEdit::blendSpecificTiles ( Int xIndex,
Int yIndex,
Int srcXIndex,
Int srcYIndex,
Int curTileNdx,
Int blendTileNdx,
Bool longDiagonal,
Int edgeClass )
protected

Definition at line 1093 of file WHeightMapEdit.cpp.

◆ blendTile()

void WorldHeightMapEdit::blendTile ( Int xIndex,
Int yIndex,
Int srcXIndex,
Int srcYIndex,
Int srcClass,
Int edgeClass )

Definition at line 1031 of file WHeightMapEdit.cpp.

◆ blendToThisClass()

void WorldHeightMapEdit::blendToThisClass ( Int xIndex,
Int yIndex,
Int textureClass,
Int edgeClass )
protected

Definition at line 1335 of file WHeightMapEdit.cpp.

◆ canFitTexture()

Bool WorldHeightMapEdit::canFitTexture ( Int textureClass)

Returns true if we can fit this texture.

Returns true if this texture class is already present, or can be added to the map.

Definition at line 1000 of file WHeightMapEdit.cpp.

◆ changeBoundary()

void WorldHeightMapEdit::changeBoundary ( Int ndx,
ICoord2D * border )

Definition at line 3348 of file WHeightMapEdit.cpp.

◆ clearStatus()

void WorldHeightMapEdit::clearStatus ( void )
inline

Status methods.

Definition at line 111 of file WHeightMapEdit.h.

◆ dbgVerifyAfterUndo()

void WorldHeightMapEdit::dbgVerifyAfterUndo ( void )

Verifies the structures are still consistent.

dbgVerifyAfterUndo - Verifies that the structure is consistent.

Definition at line 1926 of file WHeightMapEdit.cpp.

◆ doCliffAdjustment()

Bool WorldHeightMapEdit::doCliffAdjustment ( Int xIndex,
Int yIndex )

Definition at line 2217 of file WHeightMapEdit.cpp.

◆ duplicate()

WorldHeightMapEdit * WorldHeightMapEdit::duplicate ( void )

Definition at line 799 of file WHeightMapEdit.cpp.

◆ findBoundaryNear()

void WorldHeightMapEdit::findBoundaryNear ( Coord3D * pt,
float okDistance,
Int * outNdx,
Int * outHandle )

Definition at line 3368 of file WHeightMapEdit.cpp.

◆ findOrCreateBlendTile()

Int WorldHeightMapEdit::findOrCreateBlendTile ( TBlendTileInfo * pBlendInfo)
protected

Definition at line 1058 of file WHeightMapEdit.cpp.

◆ floodFill()

Bool WorldHeightMapEdit::floodFill ( Int xIndex,
Int yIndex,
Int textureClass,
Bool doReplace )

Definition at line 1436 of file WHeightMapEdit.cpp.

◆ getBlendTileNdxForClass()

Int WorldHeightMapEdit::getBlendTileNdxForClass ( Int xIndex,
Int yIndex,
Int textureClass )
protected

Definition at line 858 of file WHeightMapEdit.cpp.

◆ getBoundary()

void WorldHeightMapEdit::getBoundary ( Int ndx,
ICoord2D * border ) const

Definition at line 3328 of file WHeightMapEdit.cpp.

◆ getFirstTile()

Int WorldHeightMapEdit::getFirstTile ( Int textureClass)

Returns the first tile for a texture class. If the class is not used, returns -1.

Definition at line 1910 of file WHeightMapEdit.cpp.

◆ getNumBoundaries()

Int WorldHeightMapEdit::getNumBoundaries ( void ) const

Definition at line 3323 of file WHeightMapEdit.cpp.

◆ getNumTexClasses()

static Int WorldHeightMapEdit::getNumTexClasses ( void )
inlinestatic

Definition at line 126 of file WHeightMapEdit.h.

◆ getPointerToClassTileData()

UnsignedByte * WorldHeightMapEdit::getPointerToClassTileData ( Int texClass)
static

Definition at line 517 of file WHeightMapEdit.cpp.

◆ getTexClassIsBlendEdge()

static Int WorldHeightMapEdit::getTexClassIsBlendEdge ( int ndx)
inlinestatic

Definition at line 130 of file WHeightMapEdit.h.

◆ getTexClassName()

static AsciiString WorldHeightMapEdit::getTexClassName ( int ndx)
inlinestatic

Definition at line 127 of file WHeightMapEdit.h.

◆ getTexClassNeighbors()

void WorldHeightMapEdit::getTexClassNeighbors ( Int xIndex,
Int yIndex,
Int textureClass,
Int * pSideCount,
Int * pTotalCount )
protected

Definition at line 531 of file WHeightMapEdit.cpp.

◆ getTexClassNumTiles()

static Int WorldHeightMapEdit::getTexClassNumTiles ( int ndx)
inlinestatic

Definition at line 129 of file WHeightMapEdit.h.

◆ getTexClassUiName()

AsciiString WorldHeightMapEdit::getTexClassUiName ( int ndx)
static

Definition at line 2198 of file WHeightMapEdit.cpp.

◆ getTextureClass()

Int WorldHeightMapEdit::getTextureClass ( Int xIndex,
Int yIndex,
Bool baseClass = false )

Definition at line 846 of file WHeightMapEdit.cpp.

◆ getTextureClassFromNdx()

Int WorldHeightMapEdit::getTextureClassFromNdx ( Int tileNdx)
protected

Definition at line 829 of file WHeightMapEdit.cpp.

◆ getTileIndexFromTerrainType()

Int WorldHeightMapEdit::getTileIndexFromTerrainType ( TerrainType * terrain)
protected

Definition at line 864 of file WHeightMapEdit.cpp.

◆ getTileNdxForClass()

Int WorldHeightMapEdit::getTileNdxForClass ( Int xIndex,
Int yIndex,
Int textureClass )
protected

Definition at line 972 of file WHeightMapEdit.cpp.

◆ init()

void WorldHeightMapEdit::init ( void )
static

Definition at line 76 of file WHeightMapEdit.cpp.

◆ isTexClassUsed()

Bool WorldHeightMapEdit::isTexClassUsed ( Int textureClass)

Returns true if the texture class is used in the current map. If false, the texture is not used or loaded in the current map.

Definition at line 1896 of file WHeightMapEdit.cpp.

◆ loadBaseImages()

void WorldHeightMapEdit::loadBaseImages ( void )
staticprotected

Load the available bitmap images.

Todo
  • take this out when we are done evaluating terrain textures.

Definition at line 393 of file WHeightMapEdit.cpp.

◆ loadBitmap()

void WorldHeightMapEdit::loadBitmap ( char * path,
const char * uiName )
staticprotected

Load a tga bitmap into a set of tiles.

Definition at line 349 of file WHeightMapEdit.cpp.

◆ loadDirectoryOfImages()

void WorldHeightMapEdit::loadDirectoryOfImages ( char * path)
staticprotected

Loads all the images in a directory (including subdirectories)

Definition at line 420 of file WHeightMapEdit.cpp.

◆ loadImagesFromTerrainType()

void WorldHeightMapEdit::loadImagesFromTerrainType ( TerrainType * terrain)
staticprotected

Loads all the all terrain information for the WorldBuilder given the logical TerrainType entity (i.e. tga file)

Definition at line 455 of file WHeightMapEdit.cpp.

◆ optimizeTiles()

Bool WorldHeightMapEdit::optimizeTiles ( void )

Optimizes tile allocations.

Definition at line 1652 of file WHeightMapEdit.cpp.

◆ reloadTextures()

void WorldHeightMapEdit::reloadTextures ( void )

Reloads textures from disk.

Definition at line 1585 of file WHeightMapEdit.cpp.

◆ remapTextures()

Bool WorldHeightMapEdit::remapTextures ( void )

returns true if the operation had an effect.

Definition at line 329 of file WHeightMapEdit.cpp.

◆ removeCliffMapping()

Bool WorldHeightMapEdit::removeCliffMapping ( void )

Definition at line 2550 of file WHeightMapEdit.cpp.

◆ removeFirstObject()

void WorldHeightMapEdit::removeFirstObject ( void )

Removes the first map object from the list.

Definition at line 1988 of file WHeightMapEdit.cpp.

◆ removeLastBoundary()

void WorldHeightMapEdit::removeLastBoundary ( void )

Definition at line 3358 of file WHeightMapEdit.cpp.

◆ resetResources()

void WorldHeightMapEdit::resetResources ( void )

Releases textures in preparation for device reset.

Definition at line 1575 of file WHeightMapEdit.cpp.

◆ resize()

Bool WorldHeightMapEdit::resize ( Int newXSize,
Int newYSize,
Int newHeight,
Int newBorder,
Bool anchorTop,
Bool anchorBottom,
Bool anchorLeft,
Bool anchorRight,
Coord3D * pObjOffset )

resize Changes the size of the height map.

Definition at line 1767 of file WHeightMapEdit.cpp.

◆ saveToFile()

void WorldHeightMapEdit::saveToFile ( DataChunkOutput & chunkWriter)

SaveToFile - saves a height map to a file.

Definition at line 581 of file WHeightMapEdit.cpp.

◆ selectDuplicates()

Bool WorldHeightMapEdit::selectDuplicates ( void )

Selects any dupicate map objects.

Selects any duplicate objects.

Definition at line 2001 of file WHeightMapEdit.cpp.

◆ selectInvalidTeam()

Bool WorldHeightMapEdit::selectInvalidTeam ( void )

Selects any objects with invalid teams.

Selects any objects with invalid teams.

Definition at line 2115 of file WHeightMapEdit.cpp.

◆ selectSimilar()

Bool WorldHeightMapEdit::selectSimilar ( void )

Selects any dupicate map objects.

Selects any similar objects.

Definition at line 2070 of file WHeightMapEdit.cpp.

◆ setCliff()

void WorldHeightMapEdit::setCliff ( Int xIndex,
Int yIndex,
Bool impassable )
inline

Definition at line 123 of file WHeightMapEdit.h.

◆ setHeight()

void WorldHeightMapEdit::setHeight ( Int xIndex,
Int yIndex,
UnsignedByte height )

Definition at line 1637 of file WHeightMapEdit.cpp.

◆ setTileNdx()

Bool WorldHeightMapEdit::setTileNdx ( Int xIndex,
Int yIndex,
Int textureClass,
Bool singleTile )

Definition at line 811 of file WHeightMapEdit.cpp.

◆ showTileStatusInfo()

void WorldHeightMapEdit::showTileStatusInfo ( void )

pops up a dialog box with tile mem usage.

Definition at line 1615 of file WHeightMapEdit.cpp.

◆ shutdown()

void WorldHeightMapEdit::shutdown ( void )
static

Definition at line 60 of file WHeightMapEdit.cpp.

◆ tooManyBlends()

Bool WorldHeightMapEdit::tooManyBlends ( void )
inline

Definition at line 113 of file WHeightMapEdit.h.

◆ tooManyTextures()

Bool WorldHeightMapEdit::tooManyTextures ( void )
inline

Definition at line 112 of file WHeightMapEdit.h.

◆ updateFlatCellForAdjacentCliffs()

void WorldHeightMapEdit::updateFlatCellForAdjacentCliffs ( Int xIndex,
Int yIndex,
Int curTileClass,
UnsignedByte * pProcessed = NULL )
protected

Definition at line 3093 of file WHeightMapEdit.cpp.

◆ updateForAdjacentCliffs()

void WorldHeightMapEdit::updateForAdjacentCliffs ( Int xIndex,
Int yIndex,
UnsignedByte * pProcessed,
TCliffInfo & cliffInfo )
protected

Definition at line 2732 of file WHeightMapEdit.cpp.

Member Data Documentation

◆ m_globalTextureClasses

TGlobalTextureClass WorldHeightMapEdit::m_globalTextureClasses
staticprotected

Definition at line 73 of file WHeightMapEdit.h.

◆ m_numGlobalTextureClasses

int WorldHeightMapEdit::m_numGlobalTextureClasses =0
staticprotected

Definition at line 72 of file WHeightMapEdit.h.

◆ m_warnTooManyBlend

Bool WorldHeightMapEdit::m_warnTooManyBlend
protected

warning message flag.

Definition at line 67 of file WHeightMapEdit.h.

◆ m_warnTooManyTex

Bool WorldHeightMapEdit::m_warnTooManyTex
protected

warning message flag.

Definition at line 66 of file WHeightMapEdit.h.


The documentation for this class was generated from the following files: