00001 // 00002 // TileSetEditor.h 00003 // ------------------- 00004 // begin : Fri Mar 22 2002 00005 // copyright : (C) 2002 by Rob Renaud 00006 // email : rrenaud@eden.rutgers.edu 00007 // 00008 // This program is free software; you can redistribute it and/or modify 00009 // it under the terms of the GNU General Public License as published by 00010 // the Free Software Foundation; either version 2 of the License, or 00011 // (at your option) any later version. 00012 // 00013 00014 #ifndef TILE_SET_EDITOR_H_ 00015 #define TILE_SET_EDITOR_H_ 00016 00017 #include "../Config.h" 00018 00019 #include "../Game/MapLocation.h" 00020 #include "../Game/Tile.h" 00021 #include "../Graphics/draw.h" 00022 #include "../Parse/ListParser.h" 00023 #include "../Util/StringUtil.h" 00024 00025 #include <fstream> 00026 #include <iostream> 00027 00028 namespace Editor { 00029 00030 class TileSetEditor; 00031 00032 std::ostream& operator << (std::ostream& out, const TileSetEditor& ts); 00033 std::istream& operator >> (std::istream& in, TileSetEditor& ts); 00034 00035 00039 class TileSetEditor { 00040 public: 00041 TileSetEditor(); 00042 ~TileSetEditor(); 00043 00044 Game::AbstractTile* copyTile(int index) const; 00045 int numTiles() const; 00046 00047 friend std::ostream& Editor::operator << (std::ostream& out, const TileSetEditor& ts); 00048 friend std::istream& Editor::operator >> (std::istream& in, TileSetEditor& ts); 00049 00050 void drawAt(SDL_Surface* screen, SDL_Rect* r); 00051 // leave modification of the tiles for later 00052 private: 00053 Game::TileSetReader tileSet; 00054 std::string dataFromFile; 00055 }; 00056 }; // namespace Editor 00057 00058 // std::ostream& operator << (std::ostream& out, const Editor::TileSetEditor& ts); 00059 //std::istream& operator >> (std::istream& in, Editor::TileSetEditor& ts); 00060 00061 #endif // ifndef TILE_SET_EDITOR_H_ 00062
1.2.12 written by Dimitri van Heesch,
© 1997-2001