added getter for tile type

develop
doomchild 2010-08-13 09:40:19 -05:00
parent cf8c805add
commit f6a777bccd
2 changed files with 13 additions and 0 deletions

@ -32,6 +32,7 @@ using namespace std;
#include "Internal.h"
#include "dfhack/DFTypes.h"
#include "dfhack/DFTileTypes.h"
#include "dfhack-c/DFTypes_C.h"
#include "dfhack/modules/Materials.h"
@ -101,6 +102,16 @@ int DFHack_getVegetationType(int in)
return DFHack::getVegetationType(in);
}
int DFHack_getTileType(int index, TileRow* tPtr)
{
if(index >= TILE_TYPE_ARRAY_LENGTH)
return 0;
*tPtr = tileTypeTable[index];
return 1;
}
#ifdef __cplusplus
}
#endif

@ -112,6 +112,8 @@ DFHACK_EXPORT extern int DFHack_isStairTerrain(int in);
DFHACK_EXPORT extern int DFHack_isOpenTerrain(int in);
DFHACK_EXPORT extern int DFHack_getVegetationType(int in);
DFHACK_EXPORT extern int DFHack_getTileType(int index, TileRow* tPtr);
#ifdef __cplusplus
}
#endif