Conversation
|
You're going C++11 mode now, with that range-based for? :P Our Travis CI config is not yet adapted for that. But yes, I did say that I'm opening xoreos-tools up for C++11, so I guess it's time I put my money where my mouth is. I'll see if I find time to change that during the week. :) |
|
Yeah, i was not sure, if i should correct this, since travis failed. |
src/xml/gffcreator.cpp
Outdated
| * Creates GFFs out of XML files. | ||
| */ | ||
|
|
||
| #include <src/common/error.h> |
There was a problem hiding this comment.
#include "" for our own files, please
src/xml/gffcreator.cpp
Outdated
| #include <src/common/error.h> | ||
| #include "src/xml/xmlparser.h" | ||
|
|
||
| #include "gffcreator.h" |
src/xml/gffcreator.cpp
Outdated
| reinterpret_cast<char*>(&typeId)[3 - i] = *type.getPosition(i); | ||
| else | ||
| reinterpret_cast<char*>(&typeId)[3 - i] = ' '; | ||
| } |
There was a problem hiding this comment.
That's...pretty icky. Can you use MKTAG() instead?
You don't even need the loop, you can just pad the string with 4 spaces beforehand.
Like
const Common::UString type = xmlRoot.getProperty("type") + " ";
const uint32 typeID = MKTAG(*type.getPosition(0), ...
(Theoretically, you could even use Common::UString::at() from a6f1c2b)
src/xml/gff3creator.h
Outdated
| void readStructContents(const XMLNode::Children &strctNodes, Aurora::GFF3WriterStructPtr strctPtr); | ||
| void readListContents(const XMLNode::Children &listNodes, Aurora::GFF3WriterListPtr listPtr); | ||
|
|
||
| Common::ScopedPtr<Aurora::GFF3Writer> _gff3; |
There was a problem hiding this comment.
Hmm, can you push the state into the method parameters, and make create() static?
src/xml/gff3creator.cpp
Outdated
| uint32 language; | ||
| Common::parseString(child->getProperty("language"), language); | ||
|
|
||
| // TODO: Add gender if available. |
There was a problem hiding this comment.
Can you fulfill this TODO first? I'd rather not have a tool available that accidentally removes information when doing a round-trip
| src/version/libversion.la \ | ||
| $(LDADD) \ | ||
| $(EMPTY) | ||
|
|
There was a problem hiding this comment.
Can you add the binary (both Unix and Windows) to the .gitignore file too, please?
(Also, a manpage would be great as well)
src/xml2gff.cpp
Outdated
| Parser parser(argv[0], "XML to BioWare GFF converter", | ||
| "If no input file is given, the input is read from stdin.\n\n" | ||
| "Since different games use different SSF file version, specifying the\n" | ||
| "game for which to create the SSF file is necessary.", |
There was a problem hiding this comment.
That's obviously wrong for a GFF tool :P
src/xml2gff.cpp
Outdated
| } | ||
|
|
||
| void createGFF(const Common::UString &inFile, const Common::UString &outFile) { | ||
| Common::WriteFile ssf(outFile); |
There was a problem hiding this comment.
Also not the right variable name here :P
b0b53a2 to
a1bc804
Compare
|
The issues should now be fixed and I added a man page |
|
Merged as 367563e...41aaf31, thanks! :) |
This adds an initial xml2gff tool. I modified the gff3 writer, taken from xoreos, slightly, so it won't require glm