Esempio n. 1
0
 void IResData.Save(ResFileSaver saver)
 {
     if (saver.IsSwitch)
     {
         sampler = new SamplerSwitch();
         sampler.SaveTexSampler(saver, TexSampler);
     }
     else
     {
         saver.Write(TexSampler.Values);
         saver.Write(0); // Handle
         saver.SaveString(Name);
         saver.Write((byte)saver.CurrentIndex);
         saver.Seek(3);
     }
 }
Esempio n. 2
0
 void IResData.Load(ResFileLoader loader)
 {
     if (loader.IsSwitch)
     {
         sampler = new SamplerSwitch();
         ((IResData)sampler).Load(loader);
         TexSampler = sampler.ToTexSampler();
     }
     else
     {
         TexSampler = new TexSampler(loader.ReadUInt32s(3));
         uint handle = loader.ReadUInt32();
         Name = loader.LoadString();
         byte idx = loader.ReadByte();
         loader.Seek(3);
     }
 }