1 /** 2 * @file controller_ejectors.h 3 * @brief Ejectors corners controller 4 * @date 2007-09-29 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: controller_ejectors.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 __CONTROLLER_EJECTORS__ 29 #define __CONTROLLER_EJECTORS__ 30 31 class controller_ejectors; 32 33 #include "../include/sprite_object.h" 34 #include "../include/tecnoballz.h" 35 #include "../include/sprite_ball.h" 36 37 class controller_ejectors:public objects_list < sprite_object, 38 controller_ejectors > 39 { 40 public: 41 typedef enum 42 { 43 TOP_LEFT_EJECTOR, 44 BOTTOM_LEFT_EJECTOR, 45 BOTTOM_RIGHT_EJECTOR, 46 TOP_RIGHT_EJECTOR, 47 MAX_OF_EJECTORS 48 } 49 EJECTORS_ENUM; 50 51 private: 52 static const Uint32 COORD_EJECTOR_1 = 16; 53 static const Uint32 COORD_EJECTOR_2 = 224; 54 static bool is_pos_ball_initialized; 55 56 public: 57 controller_ejectors (); 58 ~controller_ejectors (); 59 void create_ejectors_sprites (); 60 void draw_shadow (); 61 void draw (); 62 sprite_object *get_ejector (Uint32 eject); 63 void initialize_ball_positions (ball_ejector_coords * table); 64 }; 65 #endif 66