diff options
| author | Jared Adams | 2012-04-21 11:26:40 -0600 |
|---|---|---|
| committer | Jared Adams | 2012-04-21 11:26:40 -0600 |
| commit | 567b3e2a52a3be8949c4536cff15e68b55f87fc6 (patch) | |
| tree | 742f25bf8953b60ef2d44e5eadee332339e1d002 /plugins/tiletypes.cpp | |
| parent | 52138d8998e38b6af550749ac7fd226a7bd86edd (diff) | |
| download | dfhack-567b3e2a52a3be8949c4536cff15e68b55f87fc6.tar.gz dfhack-567b3e2a52a3be8949c4536cff15e68b55f87fc6.tar.bz2 dfhack-567b3e2a52a3be8949c4536cff15e68b55f87fc6.tar.xz | |
Fix range on tiletypes and make it saner for both plugins.
Diffstat (limited to 'plugins/tiletypes.cpp')
| -rw-r--r-- | plugins/tiletypes.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/plugins/tiletypes.cpp b/plugins/tiletypes.cpp index 236ac1fa..b7914f25 100644 --- a/plugins/tiletypes.cpp +++ b/plugins/tiletypes.cpp @@ -788,7 +788,6 @@ command_result processCommand(color_ostream &out, std::vector<std::string> &comm return executePaintJob(out); } - std::ostringstream ss_o; int loc = start; std::string command = commands[loc++]; @@ -817,26 +816,17 @@ command_result processCommand(color_ostream &out, std::vector<std::string> &comm } else if (command == "range" || command == "r") { - int width = 0, height = 0, z_levels = 0; + int width = 1, height = 1, zLevels = 1; - if (commands.size() >= loc) - { - width = toint(commands[loc++]); - height = toint(commands[loc++]); - - if (commands.size() >= loc) { - z_levels = toint(commands[loc++]); - } - } - - command_result res = parseRectangle(out, width, height, z_levels, width, height, z_levels, hasConsole); + command_result res = parseRectangle(out, commands, loc, end, + width, height, zLevels, hasConsole); if (res != CR_OK) { return res; } delete brush; - brush = new RectangleBrush(width, height, z_levels, 0, 0, 0); + brush = new RectangleBrush(width, height, zLevels, 0, 0, 0); } else if (command == "block") { |
