Follow the Google C++ Style guide's recommendation for formatting, https://google.github.io/styleguide/cppguide.html#Formatting . The exception is that lines may exceed 80 characters.
When transporting code from the decompilation into Ironfist, apply the "Does this look like code I would have written myself?" test. Decompiled code has a lot of features that are hard to read that are seldom seen in human-written code, such as gotos, lots of pointer arithmetic, automatically-generated variable names, etc. It's important to clean this up before merging it into the Ironfist codebase.
For includes: Have your includes from standard libraries, 3rd party libraries, and Ironfist code in three separate sections, separated by whitespace. Within each section, have all includes in alphabetical order.
Functions which are not intended for use outside the file where they are defined should be marked static.
The XML processing codes are generated by CodeSynthesis XSD, version 3.30. To automatically generate the code, run
xsd cxx-tree --generate-serialization filename.xsd
This will generate two files: filename.hxx and filename.cxx.
The filename can be creatures_xml or map_xml.
The game relies exclusively on C-style strings, but std:string, although it has problems, is generally much more pleasant to work with. Here's our compromise:
Except for special exceptions, method that need to return strings will return the actual values (not pointers/references) so as not to worry about memory management, favoring ease of use over efficiency
Ask to be added as a contributor to the Ironfist repository in Github. When adding a new feature to Ironfist, use this workflow in git: