cleaned up roomedit/source/dibutil.cpp