Prepare 1.0 alpha3 release.
[tagua/yd.git] / src / namedsprite.cpp
blobe5657ff64c7d79903d76d46880770af3b8340953
1 /*
2 Copyright (c) 2006-2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006-2007 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #include "namedsprite.h"
13 NamedSprite::NamedSprite() { }
15 NamedSprite NamedSprite::duplicate() const {
16 if (m_sprite) {
17 return NamedSprite(m_name, SpritePtr(m_sprite->duplicate()));
19 else {
20 return *this;
24 NamedSprite::NamedSprite(const QString& name, const SpritePtr& s)
25 : m_name(name)
26 , m_sprite(s) { }