MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ConsoleSpawnBalloon

Function ConsoleSpawnBalloon

src/openrct2/interface/InteractiveConsole.cpp:1758–1772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1756}
1757
1758static 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
1774using console_command_func = void (*)(InteractiveConsole& console, const arguments_t& argv);
1775struct ConsoleCommand

Callers

nothing calls this directly

Calls 3

WriteLineErrorMethod · 0.80
CreateFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected