Пример #1
0
void CEnvironment::mods_load()
{
    Modifiers.clear_and_free();
    string_path path;
    if (FS.exist(path, "$level$", "level.env_mod"))
    {
        IReader* fs = FS.r_open(path);
        u32 id = 0;
        u32 ver = 0x0015;
        u32 sz;

        while (0 != (sz = fs->find_chunk(id)))
        {
            if (id == 0 && sz == sizeof(u32))
            {
                ver = fs->r_u32();
            }
            else
            {
                CEnvModifier E;
                E.load(fs, ver);
                Modifiers.push_back(E);
            }
            id++;
        }
        FS.r_close(fs);
    }

    load_level_specific_ambients();
}
Пример #2
0
void	CEnvironment::mods_load			()
{
	Modifiers.clear_and_free			();
	string_path							path;
	if (FS.exist(path,"$level$","level.env_mod"))	
	{
		IReader*	fs	= FS.r_open		(path);
		u32			id	= 0;
		while		(fs->find_chunk(id))	
		{
			CEnvModifier		E;
			E.load				(fs);
			Modifiers.push_back	(E);
			id					++;
		}
		FS.r_close	(fs);
	}
}