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

Method makeTornado

MicropolisCore/src/MicropolisEngine/src/sprite.cpp:1991–2007  ·  view source on GitHub ↗

Ensure a tornado sprite exists. */

Source from the content-addressed store, hash-verified

1989
1990/** Ensure a tornado sprite exists. */
1991void Micropolis::makeTornado()
1992{
1993 short x, y;
1994 SimSprite *sprite;
1995
1996 sprite = getSprite(SPRITE_TORNADO);
1997 if (sprite != NULL) {
1998 sprite->count = 200;
1999 return;
2000 }
2001
2002 x = getRandom((WORLD_W <<4) - 800) + 400;
2003 y = getRandom((WORLD_H <<4) - 200) + 100;
2004
2005 makeSprite(SPRITE_TORNADO, x, y);
2006 sendMessage(MESSAGE_TORNADO_SIGHTED, (x >>4) + 3, (y >>4) + 2, true, true);
2007}
2008
2009
2010/**

Callers 3

buttonTornado_ClickMethod · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected