Very Simple Graphic Library
very_simple_gl.h
Vai alla documentazione di questo file.
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 "quickcg.h"
00045 
00046 using namespace QuickCG;
00047 using namespace std;
00048 #include "vsgl_types.h";
00049 #include "oggettografico.h"
00050 #include "rettangolo.h"
00051 #include "cerchio.h"
00052 #include "linea.h"
00053 #include "sprite.h"
00054 #include "disco.h"
00055 
00056 extern int mouseX; 
00057 extern int mouseY; 
00058 extern bool mouseTD; 
00059 extern bool mouseTS; 
00060 //extern Colore COLORE_SFONDO;
00061 //extern vector <OggettoGrafico*> listaOggetti;
00077 void inizializza_grafica(int larghezza, int altezza, int fullscreen, const char* titolo);
00078 
00085 void disegna_punto(int x, int y, const Colore& c);
00086 
00094 Colore crea_colore(int r, int g, int b);
00095 
00104 void scrivi(int x, int y, const char *s, const Colore& c = BIANCO);
00105 
00112 void aggiorna_schermo();
00113 
00118 void pausa();
00119 
00127 void pulisci_schermo(const Colore& c = NESSUN_COLORE);
00128 
00135 void imposta_colore_sfondo(const Colore& c = NERO);
00152 int crea_rettangolo(int x, int y, int larghezza, int altezza, const Colore& c = BIANCO);
00153 
00168 int crea_cerchio(int x, int y, int r, const Colore& c = BIANCO);
00169 
00185 int crea_disco(int x, int y, int r, const Colore& c = BIANCO);
00186 
00201 int crea_linea(int x1, int y1, int x2, int y2, const Colore& c = BIANCO);
00202 
00216 int crea_sprite(int x, int y, const string& filename);
00217 
00227 void disegna_oggetto(int indice_oggetto);
00228 
00235 void disegna_oggetti();
00236 
00248 void muovi_oggetto(int x, int y, int indice_oggetto);
00249 
00255 void ritardo(int millisecondi);
00256 
00262 void leggi_mouse();
00263 
00270 int fatto();
00271 
00286 void leggi_stringa(char* input, const char* messaggio, int cancella, int x, int y, const Colore& c = NERO);
00287 
00288 void inizializza_audio();
00289 
00290 void carica_musica(const char *nomefile);
00291 
00292 void suona_musica();
00293 
00294 void ferma_musica();
00295 
00305 void leggi_tastiera();
00306 
00315 bool tasto_premuto(int tasto);
00316 
00317 #endif // VERY_SIMPLE_GL_H_INCLUDED