Add more assertions.
[tagua/yd.git] / src / namedsprite_utils.cpp
blob63fe073fd7fd90962f0ce2071e1cfa38bdc1cb71
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 */
10 #include "namedsprite_utils.h"
11 #include "sprite.h"
13 NamedSprite duplicate(const NamedSprite& sprite) {
14 if (sprite)
15 return NamedSprite(sprite.name(), SpritePtr(sprite.sprite()->duplicate()));
16 else
17 return sprite;