Doom port to C#