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

Method getSprite

MicropolisCore/src/MicropolisEngine/src/sprite.cpp:333–341  ·  view source on GitHub ↗

* Return the sprite of the give type, if available. * @param type Type of the sprite. * @return Pointer to the active sprite if avaiable, else \c NULL. */

Source from the content-addressed store, hash-verified

331 * @return Pointer to the active sprite if avaiable, else \c NULL.
332 */
333SimSprite *Micropolis::getSprite(int type)
334{
335 SimSprite *sprite = globalSprites[type];
336 if (sprite == NULL || sprite->frame == 0) {
337 return (SimSprite *)NULL;
338 } else {
339 return sprite;
340 }
341}
342
343
344/**

Callers 1

beforeDrawMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected