Contributing to the Arcade Machine code
- User-defined types (classes, structs) should use pascal case, e.g.
MyClass - Functions and variables should use camel case, e.g.
myFuction(),myVariable - Constants and #defines should be all uppercase with underscores denoting spaces, e.g.
MY_CONSTANT - Private data should be prefixed with
m_for "member", e.g.m_myPrivateVariable
- Each class should be declared in a header file named exactly after the class, e.g.
MyClassis declared in MyClass.h - Class declaration should stay in the .h file, definitions should be in a .cpp file, e.g.
MyClassis defined in MyClass.cpp - Only #include what is needed
- Use "" for including local files and <> for including library files
Don't use using, e.g. instead of:
using std
using std::vector
vector<Button> buttonsdo this instead
#include <vector>
std::vector<Button> buttonsInvestigate use of clang-format to automate style checks