DEADSOFTWARE

render: remove graphics data from TAnimationState
[d2df-sdl.git] / src / game / g_panel.pas
index b1c8994b9b13ab561788151c8437565de4ad3c6b..87bbb476ea2ed2be218abb30f6988877e58cba39 100644 (file)
@@ -346,8 +346,6 @@ begin
     if FTextureIDs[i].Anim then
     begin // Àíèìèðîâàííàÿ òåêñòóðà
       FTextureIDs[i].AnTex := TAnimationState.Create(True, Textures[AddTextures[i].Texture].Speed, Textures[AddTextures[i].Texture].FramesCount);
-      FTextureIDs[i].AnTex.Blending := ByteBool(PanelRec.Flags and PANEL_FLAG_BLENDING);
-      FTextureIDs[i].AnTex.Alpha := PanelRec.Alpha;
     end
   end;
 
@@ -949,7 +947,7 @@ begin
   end;
   utils.writeBool(st, anim);
   // Åñëè äà - ñîõðàíÿåì àíèìàöèþ
-  if anim then FTextureIDs[FCurTexture].AnTex.SaveState(st);
+  if anim then FTextureIDs[FCurTexture].AnTex.SaveState(st, FAlpha, FBlending);
 
   // moving platform state
   utils.writeInt(st, Integer(mMovingSpeed.X));
@@ -998,7 +996,7 @@ begin
            (FTextureIDs[FCurTexture].Anim) and
            (FTextureIDs[FCurTexture].AnTex <> nil),
            'TPanel.LoadState: No animation object');
-    FTextureIDs[FCurTexture].AnTex.LoadState(st);
+    FTextureIDs[FCurTexture].AnTex.LoadState(st, FAlpha, FBlending);
   end;
 
   // moving platform state