28 |
*/ |
*/ |
29 |
|
|
30 |
#include "rpg/quest.h" |
#include "rpg/quest.h" |
31 |
|
#include "base/base.h" |
32 |
#include "base/diskio.h" |
#include "base/diskio.h" |
33 |
#include "python/python.h" |
#include "python/python.h" |
34 |
|
|
269 |
} |
} |
270 |
|
|
271 |
// save quests to file |
// save quests to file |
272 |
void quest::put_state () |
void quest::put_state (const std::string & path) |
273 |
{ |
{ |
274 |
// open file |
// open file |
275 |
base::ogzstream out (QUEST_DATA); |
base::ogzstream out (path + QUEST_DATA); |
276 |
if (!out.is_open ()) |
if (!out.is_open ()) |
277 |
{ |
{ |
278 |
fprintf (stderr, "*** quest::put_state: cannot open '" QUEST_DATA "' for writing!\n"); |
fprintf (stderr, "*** quest::put_state: cannot open '" QUEST_DATA "' for writing!\n"); |
301 |
bool quest::get_state () |
bool quest::get_state () |
302 |
{ |
{ |
303 |
// open file |
// open file |
304 |
base::igzstream in (QUEST_DATA); |
base::igzstream in; |
305 |
if (!in.is_open ()) |
if (!base::Paths.open (in, QUEST_DATA)); |
306 |
{ |
{ |
307 |
fprintf (stderr, "*** quest::put_state: cannot open '" QUEST_DATA "' for reading!\n"); |
fprintf (stderr, "*** quest::put_state: cannot open '" QUEST_DATA "' for reading!\n"); |
308 |
return false; |
return false; |