Hello. I'm posting some classes to handle dat file reading. I meant to write standalone application that does dat/spr io, but i don't have time for that. There's also no big point of doing that as it's already implemented in rme, otclient and tfs. It has no license so do whatever you want with the code (rapidxml is MIT, it's included in the xml dir). It will run on every c++11 capable compiler and has no dependencies.
The program is capable of reading flags structure from xml config, and can handle different dat versions without the need of recompiling it. It needs some exception handling improvements and deleting() some pointers in destructors, but overall it works. Codeblocks project in attachment. You can use it like:
The program is capable of reading flags structure from xml config, and can handle different dat versions without the need of recompiling it. It needs some exception handling improvements and deleting() some pointers in destructors, but overall it works. Codeblocks project in attachment. You can use it like:
Code:
#include "datReader.hpp"
using namespace std;
int main(int argc, char *argv[])
{
datReader czytacz;
czytacz.set_xml("configs/854.xml");
czytacz.set_dat_file("Tibia.dat");
datItem* item = czytacz.get_item(10939);
item->print();
return 0;
}
Attachments
-
codeblocks.tar.gz30 KB · Views: 82 · VirusTotal