1 /* -*- Mode: C++; c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil -*- 2 * 3 * Quadra, an action puzzle game 4 * Copyright (C) 1998-2000 Ludus Design 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 21 #ifndef _HEADER_MULTI_PLAYER 22 #define _HEADER_MULTI_PLAYER 23 #include "overmind.h" 24 #include "inter.h" 25 #include "bitmap.h" 26 #include "misc.h" 27 #include "menu_base.h" 28 #include "zone_list.h" 29 #include "zone.h" 30 #include "game.h" 31 32 class Pane; 33 class Pane_info; 34 class Playback; 35 36 class Zone_slow_play: public Zone_text_button2 { 37 public: 38 Zone_slow_play(Inter *in, Bitmap *bit, Font *f, const char *t, int px, int py); 39 virtual void process(); 40 virtual void waiting(); clicked(int quel)41 virtual void clicked(int quel) { } 42 }; 43 44 class Zone_fast_play: public Zone_text_button2 { 45 public: 46 Zone_fast_play(Inter *in, Bitmap *bit, Font *f, const char *t, int px, int py); 47 virtual void process(); 48 virtual void waiting(); clicked(int quel)49 virtual void clicked(int quel) { } 50 }; 51 52 class Multi_player: public Menu_fadein { 53 Zone_list list; 54 int *got_highscore; 55 Zone *b_quit; 56 int last_countdown; 57 Module **menu_stat; 58 public: 59 bool stop; // set to true to quit game 60 Bitmap *bit; 61 Font *font2, *courrier; 62 Executor *pane_exec[3]; 63 Pane *pane[3]; 64 const Pane_info *pane_info[3]; 65 bool pause; 66 Zone_sprite *zone_pause; 67 int time_demo; 68 void check_pause(); 69 Multi_player(int *got_high); 70 virtual ~Multi_player(); 71 virtual void step(); 72 void set_menu_stat(Module **module); 73 }; 74 75 class Demo_multi_player: public Module { 76 void init_playback(); 77 public: 78 Demo_multi_player(Playback *p); 79 Demo_multi_player(Res *r, bool auto_demo=false); 80 virtual ~Demo_multi_player(); 81 virtual void init(); 82 }; 83 84 class Single_player: public Module { 85 int play_again; 86 const Game_preset gp; 87 public: 88 Single_player(Game_preset pgp); 89 virtual void step(); 90 }; 91 92 class Single_player_iterate: public Module { 93 int *play_again, hscore; 94 const Game_preset gp; 95 public: 96 Single_player_iterate(int *play, Game_preset pgp); 97 virtual void init(); 98 virtual void step(); 99 }; 100 101 class Multi_player_launcher: public Module { 102 Module *menu; 103 public: 104 virtual void init(); 105 virtual void step(); 106 }; 107 108 #endif 109