This is something that I've been meaning to look into myself. If you drop a link to the code you're looking at then I'll see if I can make it more readable/with comments - it doesn't matter whether it's Delphi or C++.

However, my computer is royally fux0red at the moment, so I won't be able to look at it until it gets back to full health.