It was to have served as a museum of natural history , but after some eventful delays ( Napoleon 's invasion badly damaged the building ) , its mission was diverted to art , and the royal museum of painting was inaugurated in 1819 .
It was to have served as a museum of natural history , but after some eventful delays plans were changed due to the spoils of war .