- added more info related to ultifds error message to see what triggers the issue

This commit is contained in:
Mark Vejvoda 2010-11-03 21:43:37 +00:00
parent ea27375b6f
commit d91bd593e8

View File

@ -120,7 +120,7 @@ int Map::getSurfaceCellArraySize() const {
SurfaceCell *Map::getSurfaceCell(int sx, int sy) const {
int arrayIndex = sy * surfaceW + sx;
if(arrayIndex >= getSurfaceCellArraySize()) {
throw runtime_error("arrayIndex >= getSurfaceCellArraySize()");
throw runtime_error("arrayIndex >= getSurfaceCellArraySize(), arrayIndex = " + intToStr(arrayIndex) + " surfaceW = " + surfaceW + " surfaceH = " + surfaceH);
}
else if(surfaceCells == NULL) {
throw runtime_error("surfaceCells == NULL");
@ -136,6 +136,7 @@ Cell *Map::getCell(int x, int y) const {
int arrayIndex = y * w + x;
if(arrayIndex >= getCellArraySize()) {
throw runtime_error("arrayIndex >= getCellArraySize()");
throw runtime_error("arrayIndex >= getCellArraySize(), arrayIndex = " + intToStr(arrayIndex) + " w = " + w + " h = " + h);
}
else if(cells == NULL) {
throw runtime_error("cells == NULL");