[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.32,1.33 editor_ev
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.32,1.33 editor_event.cxx,1.33,1.34 |
Date: |
15 Sep 2002 00:19:21 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv18971/editor
Modified Files:
editor.cxx editor_event.cxx
Log Message:
- some unfinished stuff to fix up the backup file saving...
Index: editor.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- editor.cxx 14 Sep 2002 19:06:34 -0000 1.32
+++ editor.cxx 15 Sep 2002 00:19:19 -0000 1.33
@@ -301,12 +301,17 @@
std::string
Editor::save_tmp_level ()
{
- std::string filename = std::string(tmpnam(0)) + ".pingus.xml";
-
- std::cout << "Saving level to: " << filename << std::endl;
-
- object_manager->save_level_xml(filename.c_str());
+ /*
+ char buffer[32];
+ struct tm current_time;
+ time_t t = time ();
+ localtime_r (&t, ¤t_time);
+ strftime (buffer, 32, "%s", ¤t_time);
+*/
+ std::string filename = System::get_backupdir () + "pingus-backup" + ".xml";
+ std::cout << "Editor: saving backup level to: " << filename << std::endl;
+ object_manager->save_level_xml(filename.c_str());
return filename;
}
Index: editor_event.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_event.cxx,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- editor_event.cxx 14 Sep 2002 23:31:12 -0000 1.33
+++ editor_event.cxx 15 Sep 2002 00:19:19 -0000 1.34
@@ -163,6 +163,7 @@
// Restore a previously created checkpoint.
case CL_KEY_F8:
+ /*
editor->save_tmp_level();
if (!editor->checkpoint.empty())
{
@@ -173,7 +174,7 @@
else
{
if (verbose) std::cout << "No checkpoint set, no restoring done.
" << std::endl;
- }
+ }*/
break;
// Insert a new object, present the ObjectsSelector to select
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.32,1.33 editor_event.cxx,1.33,1.34,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src system.cxx,1.5,1.6 system.hxx,1.4,1.5
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/backgrounds Makefile.am,1.5,1.6
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src system.cxx,1.5,1.6 system.hxx,1.4,1.5
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/backgrounds Makefile.am,1.5,1.6
- Index(es):