Reverted mapgen.cpp because of unfixable errors.