[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2783 - branches/pingus_sdl/src/editor
From: |
jave27 |
Subject: |
[Pingus-CVS] r2783 - branches/pingus_sdl/src/editor |
Date: |
Sat, 4 Aug 2007 02:05:57 +0200 |
Author: jave27
Date: 2007-08-04 02:05:53 +0200 (Sat, 04 Aug 2007)
New Revision: 2783
Modified:
branches/pingus_sdl/src/editor/editor_level.cpp
Log:
Enable the save feature in the level editor.
InputBoxes don't currently work, so you can't actually type a filename yet to
save, though.
Modified: branches/pingus_sdl/src/editor/editor_level.cpp
===================================================================
--- branches/pingus_sdl/src/editor/editor_level.cpp 2007-08-03 23:49:47 UTC
(rev 2782)
+++ branches/pingus_sdl/src/editor/editor_level.cpp 2007-08-04 00:05:53 UTC
(rev 2783)
@@ -24,6 +24,7 @@
#include "level_impl.hpp"
#include "level_objs.hpp"
#include "../pingus_level.hpp"
+#include "../sexpr_file_writer.hpp"
namespace Editor {
@@ -66,14 +67,13 @@
// Save the level to a file. Returns true if successful
bool EditorLevel::save_level(const std::string& filename)
{
-#if 0
// Make sure level is valid
if (!is_valid())
return false;
// Create new file (overwrite existing file)
std::ofstream out_file(filename.c_str());
- FileWriter fw(out_file);
+ SExprFileWriter fw(out_file);
// Write header
fw.begin_section("pingus-level");
@@ -116,7 +116,7 @@
// Clean up
out_file.close();
-#endif
+
return true;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2783 - branches/pingus_sdl/src/editor,
jave27 <=