dfhack/Contributing.rst

60 lines
2.3 KiB
ReStructuredText

######################
Contributing to DFHACK
######################
.. contents::
Contributing to DFHack
======================
Several things should be kept in mind when contributing to DFHack.
2015-01-27 13:12:46 -07:00
-----------
Code Format
-----------
2015-01-31 20:50:37 -07:00
* Four space indents for C++. Never use tabs for indentation in any language.
* LF (Unix style) line terminators
2015-01-31 19:38:42 -07:00
* Avoid trailing whitespace
* UTF-8 encoding
2015-01-27 13:12:46 -07:00
* For C++:
2015-01-31 19:38:42 -07:00
* Opening and closing braces on their own lines or opening brace at the end of the previous line
2015-01-31 21:04:35 -07:00
* Braces placed at original indent level if on their own lines
2015-01-31 21:06:23 -07:00
* #includes should be sorted. C++ libraries first, then dfhack modules, then df structures, then local includes. Within each category they should be sorted alphabetically. This policy is currently broken by most C++ files but try to follow it if you can.
-------------------------------
How to get new code into DFHack
-------------------------------
2015-03-08 09:47:23 -06:00
* Submit pull requests to the ``develop`` branch, not the master branch. The master branch always points at the most recent release.
* Use new branches for each feature/fix so that your changes can be merged independently (i.e. not the master or develop branch of your fork).
* If possible, compile on multiple platforms
2015-03-08 09:47:23 -06:00
* Update NEWS and Contributors.rst when applicable
2015-03-30 10:44:57 -06:00
* Do **NOT** run fixTexts.sh or update .html files (except to locally test changes to .rst files)
* Create a Github Pull Request once finished
* Work done against `issues <http://github.com/DFHack/dfhack/issues>`_ that are tagged "bug report" gets priority
2015-03-08 09:47:23 -06:00
* Submit ideas and bug reports as issues on Github. Posts in the forum thread are also acceptable but can get missed or forgotten more easily.
---------------
Memory research
---------------
If you want to do memory research, you'll need some tools and some knowledge.
In general, you'll need a good memory viewer and optionally something
to look at machine code without getting crazy :)
Good windows tools include:
* Cheat Engine
* IDA Pro 5.0 (freely available for non-commercial use)
Good linux tools:
* angavrilov's df-structures gui (visit us on IRC for details).
* edb (Evan's Debugger)
* IDA Pro 5.0 running under Wine
* Some of the tools residing in the ``legacy`` dfhack branch.
2015-01-31 19:38:42 -07:00
Using publicly known information and analyzing the game's data is preferred.