/[enigma]/enigma/src/levelpack.cc
ViewVC logotype

Diff of /enigma/src/levelpack.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dheck, Thu Jun 12 10:53:19 2003 UTC revision 1.2 by reallysoft, Sun Jun 15 16:47:36 2003 UTC
# Line 5  Line 5 
5   * modify it under the terms of the GNU General Public License   * modify it under the terms of the GNU General Public License
6   * as published by the Free Software Foundation; either version 2   * as published by the Free Software Foundation; either version 2
7   * of the License, or (at your option) any later version.   * of the License, or (at your option) any later version.
8   *     *
9   * This program is distributed in the hope that it will be useful,   * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# Line 84  namespace Line 84  namespace
84          void        reinit();          void        reinit();
85          string      get_name() const { return m_name; }          string      get_name() const { return m_name; }
86          bool        load_level(size_t idx);          bool        load_level(size_t idx);
87          time_t      get_modtime(size_t idx) { return 0; }          time_t      get_modtime(size_t /*idx*/) { return 0; }
88      private:      private:
89          // Variables          // Variables
90          string            m_filename; // Name of .zip file          string            m_filename; // Name of .zip file
# Line 104  LevelPack_Enigma::LevelPack_Enigma (cons Line 104  LevelPack_Enigma::LevelPack_Enigma (cons
104      reinit();      reinit();
105  }  }
106    
107  time_t  time_t
108  LevelPack_Enigma::get_modtime(size_t index)  LevelPack_Enigma::get_modtime(size_t index)
109  { // filedate of level  { // filedate of level
110      const LevelInfo *levelinfo = get_info(index);      const LevelInfo *levelinfo = get_info(index);
111      string           filename  = enigma::FindDataFile(string("levels/")+levelinfo->filename+".lua");      string           filename  = enigma::FindDataFile(string("levels/")+levelinfo->filename+".lua");
# Line 153  readfile (istream &is, vector<char> &des Line 153  readfile (istream &is, vector<char> &des
153      return is;      return is;
154  }  }
155    
156  bool  bool
157  LevelPack_Enigma::load_level (istream &is)  LevelPack_Enigma::load_level (istream &is)
158  {  {
159      world::Reset ();      world::Reset ();
# Line 185  bool LevelPack_Enigma::load_level (size_ Line 185  bool LevelPack_Enigma::load_level (size_
185  // LevelPack_Zipped implementation  // LevelPack_Zipped implementation
186  //----------------------------------------  //----------------------------------------
187    
188  LevelPack_Zipped::LevelPack_Zipped (const string &zipfile)  LevelPack_Zipped::LevelPack_Zipped (const string &zipfile)
189  : m_filename (zipfile), m_zip()  : m_filename (zipfile), m_zip()
190  {  {
191      reinit();      reinit();
192  }  }
193    
194  LevelPack_Zipped::~LevelPack_Zipped()  LevelPack_Zipped::~LevelPack_Zipped()
195  {  {
196  }  }
197    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26