MCPcopy Create free account
hub / github.com/SimHacker/micropolis / generateBus

Method generateBus

MicropolisCore/src/MicropolisEngine/src/sprite.cpp:1844–1849  ·  view source on GitHub ↗

* Try to start a new bus sprite at the given map tile. * @param x X coordinate in map coordinate. * @param y Y coordinate in map coordinate. */

Source from the content-addressed store, hash-verified

1842 * @param y Y coordinate in map coordinate.
1843 */
1844void Micropolis::generateBus(int x, int y)
1845{
1846 if (getSprite(SPRITE_BUS) == NULL && getRandom(25) == 0) {
1847 makeSprite(SPRITE_BUS, (x <<4) + BUS_GROOVE_X, (y <<4) + BUS_GROOVE_Y);
1848 }
1849}
1850
1851
1852/** Try to construct a new ship sprite */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected