add more stuff to tiledata

This commit is contained in:
qndel 2021-10-20 21:50:30 +02:00 committed by Anders Jenbo
commit 00307c7dad

View file

@ -53,6 +53,11 @@ enum class DebugGridTextItem : uint16_t {
dSpecial,
coords,
cursorcoords,
nBlockTable,
nSolidTable,
nTransTable,
nMissileTable,
nTrapTable,
};
DebugGridTextItem SelectedDebugGridTextItem;
@ -587,12 +592,18 @@ std::string DebugCmdShowTileData(const string_view parameter)
"dSpecial",
"coords",
"cursorcoords",
"nBlockTable",
"nSolidTable",
"nTransTable",
"nMissileTable",
"nTrapTable",
};
if (parameter == "clear") {
SelectedDebugGridTextItem = DebugGridTextItem::None;
return "Tile data cleared!";
} else if (parameter == "") {
}
if (parameter == "") {
std::string list = "clear";
for (const auto &param : paramList) {
list += " / " + param;
@ -832,6 +843,21 @@ bool GetDebugGridText(Point dungeonCoords, char *debugGridTextBuffer)
case DebugGridTextItem::dObject:
info = dObject[dungeonCoords.x][dungeonCoords.y];
break;
case DebugGridTextItem::nBlockTable:
info = nBlockTable[dPiece[dungeonCoords.x][dungeonCoords.y]];
break;
case DebugGridTextItem::nSolidTable:
info = nSolidTable[dPiece[dungeonCoords.x][dungeonCoords.y]];
break;
case DebugGridTextItem::nTransTable:
info = nTransTable[dPiece[dungeonCoords.x][dungeonCoords.y]];
break;
case DebugGridTextItem::nMissileTable:
info = nMissileTable[dPiece[dungeonCoords.x][dungeonCoords.y]];
break;
case DebugGridTextItem::nTrapTable:
info = nTrapTable[dPiece[dungeonCoords.x][dungeonCoords.y]];
break;
case DebugGridTextItem::None:
return false;
}