1 /* Pongix - clone of the "Pong" video game with net support
2  * Copyright (C) 2005 - Hugo Ruscitti (see AUTHORS file)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
17  */
18 
19 #ifndef _mundo_h
20 #define _mundo_h
21 
22 #include "util.h"
23 #include "dirty.h"
24 #include "fuente.h"
25 #include "creditos.h"
26 
27 #include "cliente.h"
28 #include "servidor.h"
29 
30 enum estados {MENU, JUEGO, CREDITOS, SERVIDOR, CLIENTE, JUEGORED_CLIENTE, \
31 	JUEGORED_SERVIDOR};
32 
33 enum tipo_juego {NORED, JUEGO_CLIENTE, JUEGO_SERVIDOR};
34 
35 typedef struct mundo
36 {
37 	SDL_Surface * screen;
38 	SDL_Surface * fondo;
39 	enum estados estado;
40 	int salir;
41 	Dirty * dirty;
42 
43 	struct fuente * fuente;
44 	struct menu * menu;
45 	struct juego * juego;
46 
47 	Cliente * cliente;
48 	Servidor * servidor;
49 	Creditos * creditos;
50 
51 } Mundo;
52 
53 
54 Mundo * mundo_iniciar (void);
55 int mundo_cargar_modulos (Mundo * data);
56 void mundo_actualizar (Mundo * data);
57 void mundo_imprimir (Mundo * data);
58 void mundo_terminar (Mundo * data);
59 void mundo_pantalla_completa (Mundo * data);
60 void mundo_cambiar_estado (Mundo * data, enum estados nuevo_estado);
61 void mundo_salir (Mundo * data);
62 
63 #endif
64