mirror of
https://github.com/TwilitRealm/dusklight.git
synced 2026-05-13 12:28:06 -07:00
955 B
955 B
Code conventions for Dusk
Upstream when appropriate
Bug fixes, documentation improvements, code cleanup, etc that also apply to the original decompilation project should preferably be PR'd there.
Properly indicate Dusk-modified code
When modifying original game code (i.e. in decomp) for Dusk's purposes, please clearly delineate such code as being Dusk-specific. Generally, this can be done by using #if TARGET_PC and keeping the original code in place. Use #if AVOID_UB for Undefined Behavior fixes to the original codebase.
Miscellaneous things
- The original codebase makes heavy use of global
operator newand similar overloads to allocate into a strict tree of heaps. This would cause many linkage headaches for us, so effectively all uses ofnewordeletein the original game code have been replaced withJKR_NEW,JKR_DELETE, or similar macros. SeeJKRHeap.hfor the full list.