summaryrefslogtreecommitdiff
path: root/plugins/deramp.cpp
diff options
context:
space:
mode:
authorQuietust2012-02-13 16:56:33 -0600
committerQuietust2012-02-13 16:56:33 -0600
commitd0a8c2edd8922673d72a18bfd2214ce45126507b (patch)
treeb64220558035888a0cea2f0ee7354f4a20b27ecc /plugins/deramp.cpp
parent9f43d61c2c4f1a9ae760158d3e57601e39ff4a24 (diff)
downloaddfhack-d0a8c2edd8922673d72a18bfd2214ce45126507b.tar.gz
dfhack-d0a8c2edd8922673d72a18bfd2214ce45126507b.tar.bz2
dfhack-d0a8c2edd8922673d72a18bfd2214ce45126507b.tar.xz
Move TileTypes to XML, part 1 - a bunch of stuff is now broken
Diffstat (limited to 'plugins/deramp.cpp')
-rw-r--r--plugins/deramp.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/deramp.cpp b/plugins/deramp.cpp
index bb59238a..ac137b0f 100644
--- a/plugins/deramp.cpp
+++ b/plugins/deramp.cpp
@@ -43,13 +43,13 @@ DFhackCExport command_result df_deramp (Core * c, vector <string> & parameters)
{
for (int y = 0; y < 16; y++)
{
- int16_t oldT = block->tiletype[x][y];
- if ((tileShape(oldT) == RAMP) &&
+ df::tiletype oldT = block->tiletype[x][y];
+ if ((tileShape(oldT) == tiletype_shape::RAMP) &&
(block->designation[x][y].bits.dig == tile_dig_designation::Default))
{
// Current tile is a ramp.
// Set current tile, as accurately as can be expected
- int16_t newT = findSimilarTileType(oldT, FLOOR);
+ df::tiletype newT = findSimilarTileType(oldT, tiletype_shape::FLOOR);
// If no change, skip it (couldn't find a good tile type)
if (oldT == newT)
@@ -59,15 +59,15 @@ DFhackCExport command_result df_deramp (Core * c, vector <string> & parameters)
block->designation[x][y].bits.dig = tile_dig_designation::No;
// Check the tile above this one, in case a downward slope needs to be removed.
- if ((above) && (tileShape(above->tiletype[x][y]) == RAMP_TOP))
- above->tiletype[x][y] = 32; // open space
+ if ((above) && (tileShape(above->tiletype[x][y]) == tiletype_shape::RAMP_TOP))
+ above->tiletype[x][y] = tiletype::OpenSpace; // open space
count++;
}
// ramp fixer
- else if ((tileShape(oldT) != RAMP)
- && (above) && (tileShape(above->tiletype[x][y]) == RAMP_TOP))
+ else if ((tileShape(oldT) != tiletype_shape::RAMP)
+ && (above) && (tileShape(above->tiletype[x][y]) == tiletype_shape::RAMP_TOP))
{
- above->tiletype[x][y] = 32; // open space
+ above->tiletype[x][y] = tiletype::OpenSpace; // open space
countbad++;
}
}