Is there any way to stop IrrXMLWriter from overwriting a whole file and just adding on to the end rather than rewriting it?
So something like this would work and not overwrite the whole file :
void writePlayerData(stringc name, stringc password) { IXMLWriter* r = p->dvc->getFileSystem()->createXMLWriter((stringc("pz/")+name+".apf").c_str()); r->writeElement(L"usn", false, L"un", stringw(name.c_str()).c_str()); r->writeElement(L"psw", false, L"pw", stringw(password.c_str()).c_str()); r->drop(); } void writeCharacterData(stringc pName, stringc cName) { IXMLWriter* r = p->dvc->getFileSystem()->createXMLWriter((stringc("pz/")+pName+".apf").c_str()); r->writeLineBreak(); r->writeElement(stringw(cName.c_str()).c_str(), false, L"", L""); r->drop(); }
Note : The code is ugly and incomplete so think nothing of it ;) Just need to know if this is possible with Irrlicht 1.3 or any SVN.
|