void Maps::cargarMapa (SDL_Surface *Pantalla, SDL_Surface *Tiles, int x, int y) {
static int mapa [FILAS_MAPA][COLUMNAS_MAPA] = {
0,0,12,12,12,12,12,12,12,12,0,0,
0,0,24,24,24,24,24,24,24,24,0,0,
0,0,12,12,12,12,12,12,12,12,0,0,
0,0,24,24,24,24,24,24,24,24,0,0,
0,25,25,25,25,25,25,25,25,25,25,0,
0,36,48,48,48,48,48,48,48,48,36,0,
0,0,36,48,48,48,48,48,48,36,0,0,
0,0,0,36,48,48,48,48,36,0,0,0,
0,0,0,0,36,48,48,36,0,0,0,0,
0,0,0,0,0,37,37,0,0,0,0,0
};
int i;
int j;
int fila = y / ALTO_TILE;
int columna = x / ANCHO_TILE;
for (i = 0; i < FILAS_MAPA; i++) { // Largo
for (j = 0; j < COLUMNAS_MAPA; j++) { // Ancho
imprimirMapa (
Pantalla, Tiles,
mapa [fila + i] [columna + j],
j*ANCHO_TILE, i*ALTO_TILE
);
}
}
}