Inspired by Sparen's personal guidelines, though I have followed this style guide for quite a long time.
- Use the extension
.dnh
for any Danmakufu files. - Encode sources in Shift-JIS only if there are no characters in the source outside ASCII. Otherwise, use UTF-16LE (the only other encoding supported by Danmakufu, unfortunately).
- In single-line comments, leave one space before and after the
//
. - Start and end multi-line comments on lines that do not contain any code. Leave a space after
/*
and before*/
. - Leave a space between the
#include
directive and the file you wish to include. - Paths to files to
#include
should start with either.
or..
. - Use tabs for indentation.
- Leave one space after a comma.