1 /** 2 * @file right_panel_score.h 3 * @brief The right panel score in the bricks levels 4 * @date 2012-10-07 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: right_panel_score.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 __RIGHT_SCORE_PANEL__ 29 #define __RIGHT_SCORE_PANEL__ 30 31 class right_panel_score; 32 33 #include "../include/bitmap_data.h" 34 #include "../include/display_text_bitmap.h" 35 #include "../include/handler_players.h" 36 #include "../include/handler_keyboard.h" 37 #include "../include/controller_gigablitz.h" 38 #include "../include/controller_balls.h" 39 40 class right_panel_score:public display_text_bitmap 41 { 42 private: 43 static right_panel_score* panel_score_singleton; 44 45 static const Uint32 DELAY_GIGABLITZ_COUNTDOWN = 10; 46 static const Uint32 GAUGE_HEIGHT = 27; 47 static const Uint32 GAUGE_XCOORD = 526 / 2; 48 static const Uint32 GAUGE_YCOORD = 420 / 2; 49 /* static const Uint32 GAUGE_WIDTH = 10 / 2; */ 50 static const Uint32 AREA_NUM_XCOORD = 264; 51 static const Uint32 AREA_NUM_YCOORD = 153; 52 static const Uint32 LEVEL_NUM_XCOORD = 296; 53 static const Uint32 LEVEL_NUM_YCOORD = 153; 54 static const Uint32 PLAYERNAME_XCOORD = 264; 55 static const Uint32 PLAYERNAME_YCOORD = 39; 56 57 static const Uint32 BEST_PLAYER_XCOORD = 528 / 2; 58 static const Uint32 BEST_PLAYER_YCOORD = 344 / 2; 59 60 static const Uint32 BEST_SCORE_XCOORD = 264; 61 static const Uint32 BEST_SCORE_YCOORD = 191; 62 63 static const Uint32 SCORE_XCOORD = 528 / 2; 64 static const Uint32 SCORE_YCOORD = 116 / 2; 65 static const Uint32 LIFES_XCOORD = 528 / 2; 66 static const Uint32 LIFES_YCOORD = 152 / 2; 67 static const Uint32 BRICKS_XCOORD = 592 / 2; 68 static const Uint32 BRICKS_YCOORD = 152 / 2; 69 /** The number of bricks which remain */ 70 Uint32 bricks_counter; 71 Sint32 flip_white; 72 /** Pointer to the pixel data in the game offscreen 73 * of the gigablitz gauge */ 74 char *gauge_pixel; 75 /** Countdown berfore Gigablitz launch */ 76 Uint32 gigablitz_countdown; 77 Uint32 delay_gigablitz_countdown; 78 /** Height of the gigablitz gauge in pixels */ 79 Uint32 gauge_height; 80 /** Width panel scores in pixels */ 81 Uint32 panel_width; 82 static unsigned char temoinCol1[GAUGE_HEIGHT]; 83 static unsigned char temoinCol2[GAUGE_HEIGHT * 2]; 84 85 86 private: 87 right_panel_score (); 88 public: 89 ~right_panel_score (); 90 static right_panel_score *get_instance (); 91 void first_init (); 92 void text_refresh (); 93 void decrease_bricks_counter (Uint32 dec); 94 Uint32 get_bricks_counter (); 95 void set_bricks_counter (Uint32 counter); 96 void draw_gigablizt_gauge (); 97 void reset_gigablitz_countdown (); 98 Uint32 get_width (); 99 private: 100 void draw_background (); 101 102 }; 103 #endif 104