Moved code from load.cpp to gamedata.cpp