[go: up one dir, main page]

Menu

[r25]: / Editor.cpp  Maximize  Restore  History

Download this file

29 lines (22 with data), 602 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "main.h"
Editor::Editor(CLog* logging) {
log = logging;
}
Editor::~Editor() {
}
int Editor::start() {
device = createDevice(EDT_NULL);
//char tit[256];
cout << "Level title: ";
//cin >> tit;
cout << "Finished! Saving the file..." << endl;
IFileSystem* filesystem = device->getFileSystem();
IXMLWriter* file = filesystem->createXMLWriter("saves/editor/level.xml");
file->writeXMLHeader();
file->writeElement(L"info", true, L"title", L"Testowy poziom");
file->writeLineBreak();
file->drop();
cout << "OK!" << endl;
device->drop();
return 0;
}