void GameConfig::loadConfig()
{
    ReadFile* file = FileSystem::openRead(configfile.c_str());

    // XXX loadin/saving would be nicer in human readable form (XML?)

    int configversion = file->readSLE16();
    if(configversion != CONFIG_VERSION)
        throw Exception("wrong config file version");

    UnitColor = file->read8();
    GameMode = file->read8();
    GameType = file->read8();
    NumberPlayers = file->readSLE16();
    NumberUnits = file->readSLE16();
    NumberInitialUnits = file->readSLE16();

    // TODO lots of other stuff :)
    screen_resolution = file->readSLE32();
    screen_fullscreen = file->read8();
    display_shadows_flag = file->read8();
    display_unit_flags = file->read8();

    // TODO lots of other stuff :)

    delete file;
}