* 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. */
| 331 | * @return Pointer to the active sprite if avaiable, else \c NULL. |
| 332 | */ |
| 333 | SimSprite *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 | /** |