Skip to content

Commit ed4116b

Browse files
author
sourcehold
committed
docs: wrote part about contributing
1 parent 7f89dbf commit ed4116b

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

docs/contributing.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
=======================
12
Contributing to OpenSHC
23
=======================
34

@@ -36,3 +37,31 @@ Ready to dive in? Here's how you can start contributing to OpenSHC.
3637
reccmp-reccmp --paths "path\to\Stronghold Crusader.exe" "build\OpenSHC.dll" "build\OpenSHC.pdb" .
3738
3839
40+
Developing contributions
41+
=========================
42+
43+
Contributions are done by contributing either:
44+
45+
* reimplemented source code for functions of the original game.
46+
* data structures.
47+
* other code.
48+
49+
Contributing functions
50+
+++++++++++++++++++++++
51+
52+
The functions of the original game are referenced by address.
53+
54+
The 1.41 Latin version of the Stronghold Crusader.exe is used as the reference version.
55+
56+
For example, the function that checks if X and Y coordinates are valid coordinates lives at address 0x401000.
57+
58+
Since the names of functions and variables may change (improve), you can refer to the function using the address instead.
59+
60+
Compilation
61+
++++++++++++
62+
63+
When compiling OpenSHC, the addresses are resolved for the build target.
64+
For example, if OpenSHC is being compiled for Extreme, the addresses resolve to the address for the Stronghold_Crusader_Extreme.exe
65+
66+
In order to make explicit which version you are referring to, or in case a function does not exist in the reference version, you can use the ``shce::0x401000`` syntax.
67+
Note that the part between `::` is for specifying a specific hash if necessary, e.g. ``shc:92fac0d0:0x401000``

0 commit comments

Comments
 (0)