예제 #1
0
void __fastcall TfrmSoundLib::UpdateLib()
{
    RegisterModifiedTHM		();
    SaveUsedTHM				();
    // save game sounds
    if (modif_map.size()){
        AStringVec 			modif;
        LockForm			();
        SndLib->SynchronizeSounds	(true,true,true,&modif_map,0);
//		SndLib->ChangeFileAgeTo		(&modif_map,time(NULL));
        UnlockForm			();
        SndLib->RefreshSounds(false);
		modif_map.clear		();
    }
}
예제 #2
0
void __fastcall TfrmImageLib::UpdateLib()
{
    VERIFY			(!bReadonlyMode);
    RegisterModifiedTHM	        ();
    SaveUsedTHM			();
    if (bImportMode && !texture_map.empty())
    {
    	AStringVec modif;
        LockForm();
        ImageLib.SafeCopyLocalToServer(texture_map);
		// rename with folder
        FS_FileSet files        = texture_map;
        texture_map.clear       ();
        xr_string               fn;
        FS_FileSetIt it         = files.begin();
        FS_FileSetIt _E         = files.end();

        for (;it!=_E; it++)
        {
            fn                  = EFS.ChangeFileExt(it->name.c_str(),"");
            ImageLib.UpdateFileName(fn);
            FS_File		F(*it);
            F.name		= fn;
            texture_map.insert  (F);
        }
        // sync
	ImageLib.SynchronizeTextures(true,true,true,&texture_map,&modif);
        UnlockForm              ();
    	ImageLib.RefreshTextures(&modif);
    }else
    {
    // save game textures
        if (modif_map.size())
        {
            AStringVec modif;
	    LockForm();
            ImageLib.SynchronizeTextures(true,true,true,&modif_map,&modif);
            UnlockForm();
            ImageLib.RefreshTextures(&modif);
        }
    }
}