new treegen.cpp code

wtf i wondered where those screenshots whent