1 /** 2 * @file sprite_money.h 3 * @brief The money sprite 4 * @date 2007-04-13 5 * @copyright 1991-2014 TLK Games 6 * @author Bruno Ethvignot 7 * @version $Revision: 24 $ 8 */ 9 /* 10 * copyright (c) 1991-2014 TLK Games all rights reserved 11 * $Id: sprite_money.h 24 2014-09-28 15:30:04Z bruno.ethvignot@gmail.com $ 12 * 13 * TecnoballZ is free software; you can redistribute it and/or modify 14 * it under the terms of the GNU General Public License as published by 15 * the Free Software Foundation; either version 3 of the License, or 16 * (at your option) any later version. 17 * 18 * TecnoballZ is distributed in the hope that it will be useful, but 19 * WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more details. 22 * 23 * You should have received a copy of the GNU General Public License 24 * along with this program; if not, write to the Free Software 25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 26 * MA 02110-1301, USA. 27 */ 28 #ifndef __SPRITE_MONEY__ 29 #define __SPRITE_MONEY__ 30 class sprite_money; 31 32 #include "../include/sprite_object.h" 33 #include "../include/sprite_paddle.h" 34 #include "../include/right_panel_score.h" 35 #include "../include/handler_display.h" 36 #include "../include/controller_bricks.h" 37 #include "../include/sprite_ball.h" 38 #include "../include/sprite_projectile.h" 39 40 class sprite_money:public sprite_object 41 { 42 friend class controller_moneys; 43 44 private: 45 /** Toward bottom, right, top, left */ 46 Uint32 towards; 47 /** Amount of money contained in this capsule */ 48 Uint32 money_amount; 49 /** Moving speed in pixels of the money capsule */ 50 Uint32 speed_of_moving; 51 /** Paddle sprite which goes the money caspule */ 52 sprite_paddle *paddle; 53 /** Multiply the amount of money collected in the capsule 54 * by the paddle */ 55 Uint32 money_multiplier; 56 57 public: 58 sprite_money (); 59 ~sprite_money (); 60 void init_members (); 61 bool enable_if_available (brick_redraw * briPT); 62 bool enable_if_available (sprite_ball * pball); 63 bool enable_if_available (sprite_projectile * pfire); 64 Uint32 move (); 65 Uint32 move_bottom (); 66 private: 67 void init_money (Uint32 xcoord, Uint32 ycoord, sprite_paddle * pad); 68 }; 69 #endif 70