Very Simple Graphic Library
|
00001 /* 00002 Copyright (C) 2011 Alessandro Bugatti (alessandro.bugatti@istruzione.it) 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public License 00006 as published by the Free Software Foundation; either version 2 00007 of the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef VERY_SIMPLE_GL_H_INCLUDED 00020 #define VERY_SIMPLE_GL_H_INCLUDED 00021 00042 #include <vector> 00043 #include <SDL/SDL_mixer.h> 00044 #include "version.h" 00045 #include "quickcg.h" 00046 00047 using namespace AutoVersion; 00048 using namespace QuickCG; 00049 using namespace std; 00050 #include "vsgl_types.h" 00051 #include "oggettografico.h" 00052 #include "rettangolo.h" 00053 #include "cerchio.h" 00054 #include "linea.h" 00055 #include "sprite.h" 00056 #include "disco.h" 00057 00058 extern int mouseX; 00059 extern int mouseY; 00060 extern bool mouseTD; 00061 extern bool mouseTS; 00062 //extern Colore COLORE_SFONDO; 00063 //extern vector <OggettoGrafico*> listaOggetti; 00079 void inizializza_grafica(int larghezza, int altezza, int fullscreen, const char* titolo); 00080 00087 void disegna_punto(int x, int y, const Colore& c); 00088 00096 Colore crea_colore(int r, int g, int b); 00097 00106 void scrivi(int x, int y, const char *s, const Colore& c = BIANCO); 00107 00114 void aggiorna_schermo(); 00115 00120 void pausa(); 00121 00129 void pulisci_schermo(const Colore& c = NESSUN_COLORE); 00130 00137 void imposta_colore_sfondo(const Colore& c = NERO); 00154 int crea_rettangolo(int x, int y, int larghezza, int altezza, const Colore& c = BIANCO); 00155 00170 int crea_cerchio(int x, int y, int r, const Colore& c = BIANCO); 00171 00187 int crea_disco(int x, int y, int r, const Colore& c = BIANCO); 00188 00203 int crea_linea(int x1, int y1, int x2, int y2, const Colore& c = BIANCO); 00204 00218 int crea_sprite(int x, int y, const string& filename); 00219 00229 void disegna_oggetto(int indice_oggetto); 00230 00237 void disegna_oggetti(); 00238 00250 void muovi_oggetto(int x, int y, int indice_oggetto); 00251 00257 void ritardo(int millisecondi); 00258 00264 void leggi_mouse(); 00265 00272 int fatto(); 00273 00288 void leggi_stringa(char* input, const char* messaggio, int cancella, int x, int y, const Colore& c = NERO); 00289 00290 void inizializza_audio(); 00291 00292 void carica_musica(const char *nomefile); 00293 00294 void suona_musica(); 00295 00296 void ferma_musica(); 00297 00307 void leggi_tastiera(); 00308 00317 bool tasto_premuto(int tasto); 00318 00325 void versione(char *s); 00326 00327 #endif // VERY_SIMPLE_GL_H_INCLUDED