* Make a sprite either by re-using the old one, or by making a new one. * @param type Sprite type of the new sprite. * @param x X coordinate of the new sprite. * @param y Y coordinate of the new sprite. */
| 348 | * @param y Y coordinate of the new sprite. |
| 349 | */ |
| 350 | SimSprite *Micropolis::makeSprite(int type, int x, int y) |
| 351 | { |
| 352 | SimSprite *sprite; |
| 353 | |
| 354 | sprite = globalSprites[type]; |
| 355 | if (sprite == NULL) { |
| 356 | sprite = newSprite("", type, x, y); |
| 357 | } else { |
| 358 | initSprite(sprite, x, y); |
| 359 | } |
| 360 | return sprite; |
| 361 | } |
| 362 | |
| 363 | |
| 364 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected