/src/TileSet.h
C Header | 55 lines | 23 code | 10 blank | 22 comment | 0 complexity | 147cc4d99743e61d40b76778bec43939 MD5 | raw file
Possible License(s): GPL-3.0
1/* 2Copyright 2011 Clint Bellanger 3 4This file is part of FLARE. 5 6FLARE is free software: you can redistribute it and/or modify it under the terms 7of the GNU General Public License as published by the Free Software Foundation, 8either version 3 of the License, or (at your option) any later version. 9 10FLARE is distributed in the hope that it will be useful, but WITHOUT ANY 11WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12PARTICULAR PURPOSE. See the GNU General Public License for more details. 13 14You should have received a copy of the GNU General Public License along with 15FLARE. If not, see http://www.gnu.org/licenses/ 16*/ 17 18/** 19 * class TileSet 20 * 21 * TileSet storage and file loading 22 */ 23 24#ifndef TILE_SET_H 25#define TILE_SET_H 26 27#include "Utils.h" 28 29#include <SDL.h> 30#include <SDL_image.h> 31 32#include <string> 33 34struct Tile_Def { 35 SDL_Rect src; 36 Point offset; 37}; 38 39class TileSet { 40private: 41 void loadGraphics(const std::string& filename); 42 int alpha_background; 43 std::string current_map; 44 45public: 46 // functions 47 TileSet(); 48 ~TileSet(); 49 void load(const std::string& filename); 50 51 Tile_Def tiles[1024]; 52 SDL_Surface *sprites; 53}; 54 55#endif