src/object/bonus_box.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *  Wormux is a convivial mass murder game.
00003  *  Copyright (C) 2001-2004 Lawrence Azzoug.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
00018  ******************************************************************************
00019  * Bonus Box
00020  *****************************************************************************/
00021 
00022 #ifndef BONUS_BOX_H
00023 #define BONUS_BOX_H
00024 //-----------------------------------------------------------------------------
00025 #include <SDL.h>
00026 #include "../include/base.h"
00027 #include "../object/physical_obj.h"
00028 #include "../team/team.h"
00029 #include "../weapon/weapons_list.h"
00030 //-----------------------------------------------------------------------------
00031 
00032 class BonusBox : public PhysicalObj
00033 {
00034   private:
00035     static bool enable;
00036     uint nbr_ammo;
00037 
00038     bool parachute; 
00039     Sprite *anim;
00040 
00041     Weapon::Weapon_type contents;
00042 
00043   private:
00044     static bool PlaceBonusBox (BonusBox& bonus_box);
00045     void ApplyBonus (Team &team, Character &character);
00046     void PickRandomWeapon();
00047   public:
00048     BonusBox();
00049     ~BonusBox();
00050 
00051     // Activate bonus box ?
00052     static void Enable (bool _enable);
00053     static uint CountTeams();
00054     static bool NewBonusBox();
00055     //bool LoadXml(xmlpp::Element * object); //the next update will include this
00056 
00057     void Draw();
00058     void Refresh();
00059 
00060   protected:
00061     // Signal Fall ending
00062     virtual void SignalCollision();
00063     void SignalGhostState(bool was_already_dead);
00064 };
00065 
00066 //-----------------------------------------------------------------------------
00067 #endif /* BONUS_BOX_H */

Generated on Mon Jan 1 13:10:59 2007 for Wormux by  doxygen 1.4.7