diff options
author | neoraider <devnull@localhost> | 2007-12-15 11:47:00 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-12-15 11:47:00 +0100 |
commit | 9b5296b04eef553dba951fa13936184b0f30cded (patch) | |
tree | 978dcdd72bf24eb0f222b825dcacb1008b6d2da7 | |
parent | d25becbaceab79809cb57fafaece151cecee3f69 (diff) | |
download | zoomedit-9b5296b04eef553dba951fa13936184b0f30cded.tar zoomedit-9b5296b04eef553dba951fa13936184b0f30cded.zip |
zoomedit: Fixed FileManager to include the new PlayerStart.
-rw-r--r-- | FileManager.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/FileManager.cpp b/FileManager.cpp index 89c6d41..90ef12b 100644 --- a/FileManager.cpp +++ b/FileManager.cpp @@ -282,10 +282,21 @@ bool FileManager::write() { return false; } - /*if(!writeStart(writer, window->getLevel().getPlayerStart())) { - xmlFreeTextWriter(writer); - return false; - }*/ + for(Level::iterator object = window->getLevel().begin(); ; object++) { + if(object == window->getLevel().end()) { + xmlFreeTextWriter(writer); + return false; + } + + if(!(*object)->isOfType("PlayerStart")) + continue; + + if(!writeStart(writer, *(PlayerStart*)&**object)) { + xmlFreeTextWriter(writer); + return false; + } + break; + } // </info> if(xmlTextWriterEndElement(writer) < 0) { |