C:/DevKitPro/!MDuel/source/wp_net_proj.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 "wp_net_proj.h"
00021 #include "player.h"
00022 #include "floorTile.h"
00023 #include "gameManager.h"
00024 
00025 wp_net_proj::wp_net_proj(spriteManager* newsm, Player* p) : spriteObject(newsm), owner(p)
00026 {
00027         #ifdef __MDDEBUG
00028         className = "wp_net_proj";
00029         macros::debugMessage(className, "constructor");
00030         #endif
00031         gameManager *gm = dynamic_cast<gameManager*>(sm);
00032         setPallete(gm->FXSprite.palleteID);
00033         //GFX warning!
00034         giveSprite(gm->FXSprite.spriteData, OBJ_SIZE_32X32, 16, 16, 60);
00035         setBounds(-8, 8, 6, -8);
00036         setFrame(32);
00037         setCollision(COL_SOLID);
00038         setLayer(2);
00039         owner->setIgnored(this);
00040 }
00041 
00042 wp_net_proj::~wp_net_proj()
00043 {
00044         
00045 }
00046 
00047 void wp_net_proj::updateSprite()
00048 {
00049         if (getx() < -16 || getx() > 271)       //out of the screen now, dont wanna see the death FX either
00050         {
00051                 destroy();
00052                 return;
00053         }
00054         spriteObject::updateSprite();
00055 }

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