diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-02-24 21:19:38 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-03-30 08:20:21 +0200 |
| commit | 2649f32cddd85d10783a53f0e13d1679ad193207 (patch) | |
| tree | a1c81e699c8020485eb9051295fb0686bc53c105 | |
| parent | 3507ab949e1ff2a783b83e9cb024f39ea2fb8d16 (diff) | |
| download | jancity-2649f32cddd85d10783a53f0e13d1679ad193207.tar.gz | |
Add CONTRIBUTING.md
| -rw-r--r-- | doc/CONTRIBUTING.md | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md new file mode 100644 index 0000000..ca260d7 --- /dev/null +++ b/doc/CONTRIBUTING.md @@ -0,0 +1,71 @@ +# Contributing +## Overview +`rts` strives to run on a wide variety of platforms, including low-end +and old hardware, such as PSX or even `i486` computers. This is possible +thanks to the use of portable source code and the wide availability of +`sdl-1.2`. However, `rts` should be easy to extend to other platforms. + +## License +As stated on [the project license](../LICENSE), `rts` is licensed by +the GNU General Public License, either version 3 of the license, or +later. Anyone contributing their own source code to this project must +adhere to this license. Also, only source code from other projects +compatible with the project license is allowed. + +## C language revision +Because of C11 not being available for the `i386-mingw32` toolchain, C99 +is the selected language revision for this project. On the other hand, +feel free to use any helpful C99 features. + +## Compiler extensions +Avoid compiler-specific extensions unless absolutely needed. While this +project is currently built using the GNU toolchain, those using other +compilers might appreciate not having to deal with such extensions. + +## Platform-specific code +Separate platform-agnostic code from platform-specific code. The usual +method used by this project is to separate platform-specific code into +its own directory. Please, do not use macros for this purpose, since +they make code more difficult to read and maintain. + +This is the typical tree structure of a module: + +``` +module_name/ +├── CMakeLists.txt +├── inc +│ └── file.h +├── privinc +│ └── file.h +├── ps1 +│ ├── inc +│ │ └── module_name +│ │ └── file.h +│ ├── privinc +│ │ └── ps1 +│ │ └── file.h +│ └── src +│ └── file.c +└── sdl-1.2 + ├── inc + │ └── module_name + │ └── file.h + ├── privinc + │ └── sdl-1.2 + │ └── file.h + └── src + └── file.c +``` + +Where: + +- `src` holds the source files defining the implementation of a given module. +- `inc` holds public header files accessible to other modules. +- `privinc` holds public header files accessible to other modules. +- `ps1` and `sdl-1.2` are two of the platforms supported by this project. + +## C code conventions + +- Use Allman style for brackets. +- Strive for maximum `const`-correctness. +- Keep a hard 80-column limit. |
