Skip to content

Contribution Guideline

hendrikp edited this page Oct 29, 2012 · 6 revisions

I'm always searching for help, so if you find this or one of the other plugins interesting and you have time on your hand then don't hesitate to contact me ;)

Process

  • Fork it
  • Create a branch (git checkout -b my_PluginSDK)
  • Put your name into authors.txt
  • Commit your changes (git commit -am "Added ....")
  • Push to the branch (git push origin my_PluginSDK)
  • Open a Pull Request

Things to remember

  • Change as little as possible to have the effect you want
  • Discuss major/version changes beforehand
  • Update the doxygen documentation

Code Style

In general look how its done in the CryEngine FreeSDK. Exceptions prove the rule.

  • For variables (e.g. sTestMe or m_sTestMe)
    • lower camel casing
    • hungarian notation
    • m_ prefix for member variables
    • g prefix for global variables (in general dont use globals and when still needed then static)
  • For functions (e.g. DoSomething)
    • upper camel casing
  • Naming conventions
    • class declarations begin with C
    • structur declarations begin with S
    • interface declarations begin with I
    • char*/all string definitions with s
    • pointer defintions begin with p
    • integers defintions begin with n/i
    • floats begin with f
    • doubles begin with d
    • rest can be looked up e.g. here http://www.yolinux.com/TUTORIALS/LinuxTutorialC++CodingStyle.html
  • Macros in capitals and words seperated by _
  • Dont use RTTI
  • Everything should be in a namespace
  • Use tools/stylecode.bat before committing changes
  • The rest will be fixed when your pull gets merged