Oh, btw, the most interesting code is in bsp.pas and PlayingGameState.pas. The rest is just a copy-and-paste framework I use when converting stuff over from C++ to Delphi (some of it probably isn't even used there).