Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Contributing

IAmTrial edited this page Dec 24, 2017 · 7 revisions

When the first tool, SlashDiablo HD, was in development, it relied heavily on Visual Studio 2013 and its runtime. There is currently an attempt to shift the codebase to utilizing the free alternative MinGW in order to allow editing on a wider variety of IDEs.

A first few set of simple coding rules are put in place for this project:

  • 4 spaces, no tabs
  • K&R indentation
  • Intel x86 syntax (Cheat Engine and OllyDbg use this format)
    • Do NOT use or mix in AT&T syntax.
    • .section .text on the first line of .S files.
    • .intel_syntax noprefix on the second line of .S files.
    • Everything is in lowercase, except where required.
  • Use C as little as possible and use C++ wherever you can. Convert char[] to std::string if the char[] version is not required and conversion isn't unnecessary.
  • Use Windows API types when calling Windows functions. Try to convert the return value to their C/C++ equivalents if there is a return value.
    • Explicitly use the Unicode "W" variants of Windows functions. Do not rely on Unicode define and do not use TCHAR.

Other rules are implied in the code, but I will add more if necessary.

Compiler Settings

In order to ensure that the code can compile on your machine without having dependencies, here are a list of things you will need to do:

  • Add "-std=c++11" (this isn't a legacy project, so start with the newest standard as of writing)
  • Add "__GXX_EXPERIMENTAL_CXX0X__" if needed.
  • Add "-static-libgcc -static-libstdc++" (prevents missing DLL dependency for end user)
  • Add "-l Version" to libraries

You must also compile with "-Wall" to resolve warnings explicitly. Do not expect your code to be accepted if it compiles with warnings.

Clone this wiki locally