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 |
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 |
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"); |
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 (); |
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 |
|
|