| 1756 | } |
| 1757 | |
| 1758 | static void ConsoleSpawnBalloon(InteractiveConsole& console, const arguments_t& argv) |
| 1759 | { |
| 1760 | if (argv.size() < 3) |
| 1761 | { |
| 1762 | console.WriteLineError("Need arguments: <x> <y> <z> <colour>"); |
| 1763 | return; |
| 1764 | } |
| 1765 | int32_t x = kCoordsXYStep * atof(argv[0].c_str()); |
| 1766 | int32_t y = kCoordsXYStep * atof(argv[1].c_str()); |
| 1767 | int32_t z = kCoordsZStep * atof(argv[2].c_str()); |
| 1768 | Drawing::Colour colour = Drawing::Colour::brightRed; |
| 1769 | if (argv.size() > 3) |
| 1770 | colour = static_cast<Drawing::Colour>(atoi(argv[3].c_str()) % Drawing::kColourNumNormal); |
| 1771 | Balloon::Create({ x, y, z }, colour, false); |
| 1772 | } |
| 1773 | |
| 1774 | using console_command_func = void (*)(InteractiveConsole& console, const arguments_t& argv); |
| 1775 | struct ConsoleCommand |
nothing calls this directly
no test coverage detected