/[adonthell]/adonthell/src/rpg/quest.cc
ViewVC logotype

Diff of /adonthell/src/rpg/quest.cc

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

revision 1.2 by ksterker, Mon Aug 23 06:33:47 2004 UTC revision 1.3 by ksterker, Mon Oct 18 07:40:23 2004 UTC
# Line 28  Line 28 
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    
# Line 268  void quest::set_completed (const std::st Line 269  void quest::set_completed (const std::st
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");
# Line 300  void quest::put_state (base::flat & out) Line 301  void quest::put_state (base::flat & out)
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;

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

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