C:/DevKitPro/!MDuel/source/singleFireSprite.cpp

Go to the documentation of this file.
00001 /*
00002  * Marshmallow Duel DS v2
00003  * Copyright © 2007 Sam Pospischil http://pospi.spadgos.com
00004  * 
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00018  */
00019 
00020 #include "singleFireSprite.h"
00021 
00039 singleFireSprite::singleFireSprite(spriteManager* newsm, u8 palID, const unsigned char* spriteData, vector<u8> frames, u8 ticksPerFrame, u8 sizex, u8 sizey, u8 cx, u8 cy, s16 nx, s16 ny, u8 minIndex, u8 colorMode) : spriteObject(newsm)
00040 {
00041         #ifdef __MDDEBUG
00042         className = "singleFireSprite";
00043         macros::debugMessage(className, "cs-giveSprite");
00044         #endif
00045         setPallete(palID);
00046         giveSprite(spriteData, sizex, sizey, cx, cy, minIndex, nx, ny, colorMode);
00047         setFrame(frames[0]);
00048         setLayer(0);
00049         setArbitraryAnim(frames, false, ticksPerFrame);
00050 }
00051 
00069 singleFireSprite::singleFireSprite(spriteManager* newsm, u8 palID, u16 gfxID, vector<u8> frames, u8 ticksPerFrame, u8 sizex, u8 sizey, u8 cx, u8 cy, s16 nx, s16 ny, u8 minIndex, u8 colorMode) : spriteObject(newsm)
00070 {
00071         #ifdef __MDDEBUG
00072         className = "singleFireSprite";
00073         macros::debugMessage(className, "cs-giveGFX");
00074         #endif
00075         setPallete(palID);
00076         giveGFX(gfxID, sizex, sizey, cx, cy, minIndex, nx, ny, colorMode);
00077         setFrame(frames[0]);
00078         setLayer(0);
00079         setArbitraryAnim(frames, false, ticksPerFrame);
00080 }
00081 
00085 void singleFireSprite::updateSprite()
00086 {
00087         spriteObject::updateSprite();
00088         if (arbitraryAnim == 0)
00089         {
00090                 destroy();
00091                 return;
00092         }
00093 }
00094 
00095 singleFireSprite::~singleFireSprite()
00096 {
00097         
00098 }

Generated on Tue Mar 13 23:27:53 2007 for MDuel DS by  doxygen 1.5.1-p1