7 e_graphics
, BinEditor
, ImagingTypes
, Imaging
, ImagingUtility
;
10 TLevelTexture
= record
15 False: (TextureID
: DWORD
;);
16 True: (FramesID
: DWORD
;
21 TLevelTextureArray
= Array of TLevelTexture
;
23 TAnimation
= class(TObject
)
28 FCounter
: Byte; // Ñ÷åò÷èê îæèäàíèÿ ìåæäó êàäðàìè
29 FSpeed
: Byte; // Âðåìÿ îæèäàíèÿ ìåæäó êàäðàìè
30 FCurrentFrame
: Integer; // Òåêóùèé êàäð (íà÷èíàÿ ñ 0)
31 FLoop
: Boolean; // Ïåðåõîäèòü íà ïåðâûé êàäð ïîñëå ïîñëåäíåãî?
32 FEnabled
: Boolean; // Ðàáîòà ðàçðåøåíà?
33 FPlayed
: Boolean; // Ïðîèãðàíà âñÿ õîòÿ áû ðàç?
36 FMinLength
: Byte; // Îæèäàíèå ïîñëå ïðîèãðûâàíèÿ
37 FRevert
: Boolean; // Ñìåíà êàäðîâ îáðàòíàÿ?
40 constructor Create(FramesID
: DWORD
; Loop
: Boolean; Speed
: Byte);
41 destructor Destroy(); override;
42 procedure Draw(X
, Y
: Integer; Mirror
: TMirrorType
);
43 procedure DrawEx(X
, Y
: Integer; Mirror
: TMirrorType
; RPoint
: TPoint
;
49 procedure Revert(r
: Boolean);
50 procedure SaveState(Var Mem
: TBinMemoryWriter
);
51 procedure LoadState(Var Mem
: TBinMemoryReader
);
52 function TotalFrames(): Integer;
54 property Played
: Boolean read FPlayed
;
55 property Enabled
: Boolean read FEnabled
;
56 property IsReverse
: Boolean read FRevert
;
57 property Loop
: Boolean read FLoop write FLoop
;
58 property Speed
: Byte read FSpeed write FSpeed
;
59 property MinLength
: Byte read FMinLength write FMinLength
;
60 property CurrentFrame
: Integer read FCurrentFrame write FCurrentFrame
;
61 property CurrentCounter
: Byte read FCounter write FCounter
;
62 property Counter
: Byte read FCounter
;
63 property Blending
: Boolean read FBlending write FBlending
;
64 property Alpha
: Byte read FAlpha write FAlpha
;
65 property FramesID
: DWORD read ID
;
66 property Width
: Word read FWidth
;
67 property Height
: Word read FHeight
;
70 function g_Texture_CreateWAD(var ID
: DWORD
; Resource
: String): Boolean;
71 function g_Texture_CreateFile(var ID
: DWORD
; FileName
: String): Boolean;
72 function g_Texture_CreateWADEx(TextureName
: ShortString; Resource
: String): Boolean;
73 function g_Texture_CreateFileEx(TextureName
: ShortString; FileName
: String): Boolean;
74 function g_Texture_Get(TextureName
: ShortString; var ID
: DWORD
): Boolean;
75 procedure g_Texture_Delete(TextureName
: ShortString);
76 procedure g_Texture_DeleteAll();
78 function g_CreateFramesImg (ia
: TDynImageDataArray
; ID
: PDWORD
; Name
: ShortString; BackAnimation
: Boolean = False): Boolean;
80 function g_Frames_CreateWAD(ID
: PDWORD
; Name
: ShortString; Resource
: String;
81 FWidth
, FHeight
, FCount
: Word; BackAnimation
: Boolean = False): Boolean;
82 function g_Frames_CreateFile(ID
: PDWORD
; Name
: ShortString; FileName
: String;
83 FWidth
, FHeight
, FCount
: Word; BackAnimation
: Boolean = False): Boolean;
84 function g_Frames_CreateMemory(ID
: PDWORD
; Name
: ShortString; pData
: Pointer; dataSize
: LongInt;
85 FWidth
, FHeight
, FCount
: Word; BackAnimation
: Boolean = False): Boolean;
86 //function g_Frames_CreateRevert(ID: PDWORD; Name: ShortString; Frames: string): Boolean;
87 function g_Frames_Get(var ID
: DWORD
; FramesName
: ShortString): Boolean;
88 function g_Frames_GetTexture(var ID
: DWORD
; FramesName
: ShortString; Frame
: Word): Boolean;
89 function g_Frames_Exists(FramesName
: String): Boolean;
90 procedure g_Frames_DeleteByName(FramesName
: ShortString);
91 procedure g_Frames_DeleteByID(ID
: DWORD
);
92 procedure g_Frames_DeleteAll();
94 procedure DumpTextureNames();
99 g_game
, e_log
, g_basic
, SysUtils
, g_console
, wadreader
,
110 TexturesID
: Array of DWORD
;
117 TexturesArray
: Array of _TTexture
= nil;
118 FramesArray
: Array of TFrames
= nil;
121 ANIM_SIGNATURE
= $4D494E41; // 'ANIM'
123 function FindTexture(): DWORD
;
127 if TexturesArray
<> nil then
128 for i
:= 0 to High(TexturesArray
) do
129 if TexturesArray
[i
].Name
= '' then
135 if TexturesArray
= nil then
137 SetLength(TexturesArray
, 8);
142 Result
:= High(TexturesArray
) + 1;
143 SetLength(TexturesArray
, Length(TexturesArray
) + 8);
147 function g_Texture_CreateWAD(var ID
: DWORD
; Resource
: String): Boolean;
151 TextureData
: Pointer;
152 ResourceLength
: Integer;
155 FileName
:= g_ExtractWadName(Resource
);
157 WAD
:= TWADFile
.Create
;
158 WAD
.ReadFile(FileName
);
160 if WAD
.GetResource(g_ExtractFilePathName(Resource
), TextureData
, ResourceLength
) then
162 if e_CreateTextureMem(TextureData
, ResourceLength
, ID
) then
165 FreeMem(TextureData
);
169 e_WriteLog(Format('Error loading texture %s', [Resource
]), MSG_WARNING
);
170 //e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING);
175 function g_Texture_CreateFile(var ID
: DWORD
; FileName
: String): Boolean;
178 if not e_CreateTexture(FileName
, ID
) then
180 e_WriteLog(Format('Error loading texture %s', [FileName
]), MSG_WARNING
);
185 function g_Texture_CreateWADEx(TextureName
: ShortString; Resource
: String): Boolean;
189 TextureData
: Pointer;
191 ResourceLength
: Integer;
193 FileName
:= g_ExtractWadName(Resource
);
195 find_id
:= FindTexture();
197 WAD
:= TWADFile
.Create
;
198 WAD
.ReadFile(FileName
);
200 if WAD
.GetResource(g_ExtractFilePathName(Resource
), TextureData
, ResourceLength
) then
202 Result
:= e_CreateTextureMem(TextureData
, ResourceLength
, TexturesArray
[find_id
].ID
);
205 e_GetTextureSize(TexturesArray
[find_id
].ID
, @TexturesArray
[find_id
].Width
,
206 @TexturesArray
[find_id
].Height
);
207 TexturesArray
[find_id
].Name
:= LowerCase(TextureName
);
210 FreeMem(TextureData
);
214 e_WriteLog(Format('Error loading texture %s', [Resource
]), MSG_WARNING
);
215 //e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING);
221 function g_Texture_CreateFileEx(TextureName
: ShortString; FileName
: String): Boolean;
225 find_id
:= FindTexture
;
227 Result
:= e_CreateTexture(FileName
, TexturesArray
[find_id
].ID
);
230 TexturesArray
[find_id
].Name
:= LowerCase(TextureName
);
231 e_GetTextureSize(TexturesArray
[find_id
].ID
, @TexturesArray
[find_id
].Width
,
232 @TexturesArray
[find_id
].Height
);
234 else e_WriteLog(Format('Error loading texture %s', [FileName
]), MSG_WARNING
);
237 function g_Texture_Get(TextureName
: ShortString; var ID
: DWORD
): Boolean;
243 if TexturesArray
= nil then Exit
;
245 if TextureName
= '' then Exit
;
247 TextureName
:= LowerCase(TextureName
);
249 for a
:= 0 to High(TexturesArray
) do
250 if TexturesArray
[a
].Name
= TextureName
then
252 ID
:= TexturesArray
[a
].ID
;
257 //if not Result then g_ConsoleAdd('Texture '+TextureName+' not found');
260 procedure g_Texture_Delete(TextureName
: ShortString);
264 if TexturesArray
= nil then Exit
;
266 TextureName
:= LowerCase(TextureName
);
268 for a
:= 0 to High(TexturesArray
) do
269 if TexturesArray
[a
].Name
= TextureName
then
271 e_DeleteTexture(TexturesArray
[a
].ID
);
272 TexturesArray
[a
].Name
:= '';
273 TexturesArray
[a
].ID
:= 0;
274 TexturesArray
[a
].Width
:= 0;
275 TexturesArray
[a
].Height
:= 0;
279 procedure g_Texture_DeleteAll();
283 if TexturesArray
= nil then Exit
;
285 for a
:= 0 to High(TexturesArray
) do
286 if TexturesArray
[a
].Name
<> '' then
287 e_DeleteTexture(TexturesArray
[a
].ID
);
289 TexturesArray
:= nil;
292 function FindFrame(): DWORD
;
296 if FramesArray
<> nil then
297 for i
:= 0 to High(FramesArray
) do
298 if FramesArray
[i
].TexturesID
= nil then
304 if FramesArray
= nil then
306 SetLength(FramesArray
, 64);
311 Result
:= High(FramesArray
) + 1;
312 SetLength(FramesArray
, Length(FramesArray
) + 64);
316 function g_Frames_CreateFile(ID
: PDWORD
; Name
: ShortString; FileName
: String;
317 FWidth
, FHeight
, FCount
: Word; BackAnimation
: Boolean = False): Boolean;
324 find_id
:= FindFrame
;
326 if FCount
<= 2 then BackAnimation
:= False;
328 if BackAnimation
then SetLength(FramesArray
[find_id
].TexturesID
, FCount
+FCount
-2)
329 else SetLength(FramesArray
[find_id
].TexturesID
, FCount
);
331 for a
:= 0 to FCount
-1 do
332 if not e_CreateTextureEx(FileName
, FramesArray
[find_id
].TexturesID
[a
],
333 a
*FWidth
, 0, FWidth
, FHeight
) then Exit
;
335 if BackAnimation
then
336 for a
:= 1 to FCount
-2 do
337 FramesArray
[find_id
].TexturesID
[FCount
+FCount
-2-a
] := FramesArray
[find_id
].TexturesID
[a
];
339 FramesArray
[find_id
].FrameWidth
:= FWidth
;
340 FramesArray
[find_id
].FrameHeight
:= FHeight
;
342 FramesArray
[find_id
].Name
:= LowerCase(Name
)
344 FramesArray
[find_id
].Name
:= '<noname>';
346 if ID
<> nil then ID
^ := find_id
;
351 function CreateFramesMem(pData
: Pointer; dataSize
: LongInt; ID
: PDWORD
; Name
: ShortString;
352 FWidth
, FHeight
, FCount
: Word; BackAnimation
: Boolean = False): Boolean;
359 find_id
:= FindFrame();
361 if FCount
<= 2 then BackAnimation
:= False;
363 if BackAnimation
then SetLength(FramesArray
[find_id
].TexturesID
, FCount
+FCount
-2)
364 else SetLength(FramesArray
[find_id
].TexturesID
, FCount
);
366 for a
:= 0 to FCount
-1 do
367 if not e_CreateTextureMemEx(pData
, dataSize
, FramesArray
[find_id
].TexturesID
[a
],
368 a
*FWidth
, 0, FWidth
, FHeight
) then
374 if BackAnimation
then
375 for a
:= 1 to FCount
-2 do
376 FramesArray
[find_id
].TexturesID
[FCount
+FCount
-2-a
] := FramesArray
[find_id
].TexturesID
[a
];
378 FramesArray
[find_id
].FrameWidth
:= FWidth
;
379 FramesArray
[find_id
].FrameHeight
:= FHeight
;
381 FramesArray
[find_id
].Name
:= LowerCase(Name
)
383 FramesArray
[find_id
].Name
:= '<noname>';
385 if ID
<> nil then ID
^ := find_id
;
390 function g_CreateFramesImg (ia
: TDynImageDataArray
; ID
: PDWORD
; Name
: ShortString; BackAnimation
: Boolean = False): Boolean;
396 find_id
:= FindFrame();
398 FCount
:= length(ia
);
400 //e_WriteLog(Format('+++ creating %d frames [%s]', [FCount, Name]), MSG_NOTIFY);
402 if FCount
< 1 then exit
;
403 if FCount
<= 2 then BackAnimation
:= False;
404 if BackAnimation
then
405 SetLength(FramesArray
[find_id
].TexturesID
, FCount
+FCount
-2)
407 SetLength(FramesArray
[find_id
].TexturesID
, FCount
);
409 //e_WriteLog(Format('+++ creating %d frames, %dx%d', [FCount, ia[0].width, ia[0].height]), MSG_NOTIFY);
411 for a
:= 0 to FCount
-1 do
413 if not e_CreateTextureImg(ia
[a
], FramesArray
[find_id
].TexturesID
[a
]) then exit
;
414 //e_WriteLog(Format('+++ frame %d, %dx%d', [a, ia[a].width, ia[a].height]), MSG_NOTIFY);
417 if BackAnimation
then
419 for a
:= 1 to FCount
-2 do
421 FramesArray
[find_id
].TexturesID
[FCount
+FCount
-2-a
] := FramesArray
[find_id
].TexturesID
[a
];
425 FramesArray
[find_id
].FrameWidth
:= ia
[0].width
;
426 FramesArray
[find_id
].FrameHeight
:= ia
[0].height
;
428 FramesArray
[find_id
].Name
:= LowerCase(Name
)
430 FramesArray
[find_id
].Name
:= '<noname>';
432 if ID
<> nil then ID
^ := find_id
;
437 function g_Frames_CreateWAD(ID
: PDWORD
; Name
: ShortString; Resource
: string;
438 FWidth
, FHeight
, FCount
: Word; BackAnimation
: Boolean = False): Boolean;
442 TextureData
: Pointer;
443 ResourceLength
: Integer;
447 FileName
:= g_ExtractWadName(Resource
);
449 WAD
:= TWADFile
.Create();
450 WAD
.ReadFile(FileName
);
452 if not WAD
.GetResource(g_ExtractFilePathName(Resource
), TextureData
, ResourceLength
) then
455 e_WriteLog(Format('Error loading texture %s', [Resource
]), MSG_WARNING
);
456 //e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING);
460 if not CreateFramesMem(TextureData
, ResourceLength
, ID
, Name
, FWidth
, FHeight
, FCount
, BackAnimation
) then
471 function g_Frames_CreateMemory(ID
: PDWORD
; Name
: ShortString; pData
: Pointer; dataSize
: LongInt;
472 FWidth
, FHeight
, FCount
: Word; BackAnimation
: Boolean = False): Boolean;
474 Result
:= CreateFramesMem(pData
, dataSize
, ID
, Name
, FWidth
, FHeight
, FCount
, BackAnimation
);
477 {function g_Frames_CreateRevert(ID: PDWORD; Name: ShortString; Frames: string): Boolean;
484 if not g_Frames_Get(b, Frames) then Exit;
486 find_id := FindFrame();
488 FramesArray[find_id].Name := Name;
489 FramesArray[find_id].FrameWidth := FramesArray[b].FrameWidth;
490 FramesArray[find_id].FrameHeight := FramesArray[b].FrameHeight;
492 c := High(FramesArray[find_id].TexturesID);
495 FramesArray[find_id].TexturesID[a] := FramesArray[b].TexturesID[c-a];
500 procedure g_Frames_DeleteByName(FramesName
: ShortString);
505 if FramesArray
= nil then Exit
;
507 FramesName
:= LowerCase(FramesName
);
509 for a
:= 0 to High(FramesArray
) do
510 if FramesArray
[a
].Name
= FramesName
then
512 if FramesArray
[a
].TexturesID
<> nil then
513 for b
:= 0 to High(FramesArray
[a
].TexturesID
) do
514 e_DeleteTexture(FramesArray
[a
].TexturesID
[b
]);
515 FramesArray
[a
].TexturesID
:= nil;
516 FramesArray
[a
].Name
:= '';
517 FramesArray
[a
].FrameWidth
:= 0;
518 FramesArray
[a
].FrameHeight
:= 0;
522 procedure g_Frames_DeleteByID(ID
: DWORD
);
526 if FramesArray
= nil then Exit
;
528 if FramesArray
[ID
].TexturesID
<> nil then
529 for b
:= 0 to High(FramesArray
[ID
].TexturesID
) do
530 e_DeleteTexture(FramesArray
[ID
].TexturesID
[b
]);
531 FramesArray
[ID
].TexturesID
:= nil;
532 FramesArray
[ID
].Name
:= '';
533 FramesArray
[ID
].FrameWidth
:= 0;
534 FramesArray
[ID
].FrameHeight
:= 0;
537 procedure g_Frames_DeleteAll
;
542 if FramesArray
= nil then Exit
;
544 for a
:= 0 to High(FramesArray
) do
545 if FramesArray
[a
].TexturesID
<> nil then
547 for b
:= 0 to High(FramesArray
[a
].TexturesID
) do
548 e_DeleteTexture(FramesArray
[a
].TexturesID
[b
]);
549 FramesArray
[a
].TexturesID
:= nil;
550 FramesArray
[a
].Name
:= '';
551 FramesArray
[a
].FrameWidth
:= 0;
552 FramesArray
[a
].FrameHeight
:= 0;
558 function g_Frames_Get(var ID
: DWORD
; FramesName
: ShortString): Boolean;
564 if FramesArray
= nil then
567 FramesName
:= LowerCase(FramesName
);
569 for a
:= 0 to High(FramesArray
) do
570 if FramesArray
[a
].Name
= FramesName
then
578 g_FatalError(Format(_lc
[I_GAME_ERROR_FRAMES
], [FramesName
]));
581 function g_Frames_GetTexture(var ID
: DWORD
; FramesName
: ShortString; Frame
: Word): Boolean;
587 if FramesArray
= nil then
590 FramesName
:= LowerCase(FramesName
);
592 for a
:= 0 to High(FramesArray
) do
593 if FramesArray
[a
].Name
= FramesName
then
594 if Frame
<= High(FramesArray
[a
].TexturesID
) then
596 ID
:= FramesArray
[a
].TexturesID
[Frame
];
602 g_FatalError(Format(_lc
[I_GAME_ERROR_FRAMES
], [FramesName
]));
605 function g_Frames_Exists(FramesName
: string): Boolean;
611 if FramesArray
= nil then Exit
;
613 FramesName
:= LowerCase(FramesName
);
615 for a
:= 0 to High(FramesArray
) do
616 if FramesArray
[a
].Name
= FramesName
then
623 procedure DumpTextureNames();
627 e_WriteLog('BEGIN Textures:', MSG_NOTIFY
);
628 for i
:= 0 to High(TexturesArray
) do
629 e_WriteLog(' '+IntToStr(i
)+'. '+TexturesArray
[i
].Name
, MSG_NOTIFY
);
630 e_WriteLog('END Textures.', MSG_NOTIFY
);
632 e_WriteLog('BEGIN Frames:', MSG_NOTIFY
);
633 for i
:= 0 to High(FramesArray
) do
634 e_WriteLog(' '+IntToStr(i
)+'. '+FramesArray
[i
].Name
, MSG_NOTIFY
);
635 e_WriteLog('END Frames.', MSG_NOTIFY
);
640 constructor TAnimation
.Create(FramesID
: DWORD
; Loop
: Boolean; Speed
: Byte);
651 FWidth
:= FramesArray
[ID
].FrameWidth
;
652 FHeight
:= FramesArray
[ID
].FrameHeight
;
655 destructor TAnimation
.Destroy
;
660 procedure TAnimation
.Draw(X
, Y
: Integer; Mirror
: TMirrorType
);
665 e_DrawAdv(FramesArray
[ID
].TexturesID
[FCurrentFrame
], X
, Y
, FAlpha
,
666 True, FBlending
, 0, nil, Mirror
);
667 //e_DrawQuad(X, Y, X+FramesArray[ID].FrameWidth-1, Y+FramesArray[ID].FrameHeight-1, 0, 255, 0);
670 procedure TAnimation
.Update();
675 FCounter
:= FCounter
+ 1;
677 if FCounter
>= FSpeed
then
678 begin // Îæèäàíèå ìåæäó êàäðàìè çàêîí÷èëîñü
680 begin // Îáðàòíûé ïîðÿäîê êàäðîâ
681 // Äîøëè äî êîíöà àíèìàöèè. Âîçìîæíî, æäåì åùå:
682 if FCurrentFrame
= 0 then
683 if Length(FramesArray
[ID
].TexturesID
) * FSpeed
+
684 FCounter
< FMinLength
then
687 FCurrentFrame
:= FCurrentFrame
- 1;
688 FPlayed
:= FCurrentFrame
< 0;
690 // Ïîâòîðÿòü ëè àíèìàöèþ ïî êðóãó:
693 FCurrentFrame
:= High(FramesArray
[ID
].TexturesID
)
695 FCurrentFrame
:= FCurrentFrame
+ 1;
700 begin // Ïðÿìîé ïîðÿäîê êàäðîâ
701 // Äîøëè äî êîíöà àíèìàöèè. Âîçìîæíî, æäåì åùå:
702 if FCurrentFrame
= High(FramesArray
[ID
].TexturesID
) then
703 if Length(FramesArray
[ID
].TexturesID
) * FSpeed
+
704 FCounter
< FMinLength
then
707 FCurrentFrame
:= FCurrentFrame
+ 1;
708 FPlayed
:= (FCurrentFrame
> High(FramesArray
[ID
].TexturesID
));
710 // Ïîâòîðÿòü ëè àíèìàöèþ ïî êðóãó:
715 FCurrentFrame
:= FCurrentFrame
- 1;
722 procedure TAnimation
.Reset();
725 FCurrentFrame
:= High(FramesArray
[ID
].TexturesID
)
733 procedure TAnimation
.Disable
;
738 procedure TAnimation
.Enable
;
743 procedure TAnimation
.DrawEx(X
, Y
: Integer; Mirror
: TMirrorType
; RPoint
: TPoint
;
749 e_DrawAdv(FramesArray
[ID
].TexturesID
[FCurrentFrame
], X
, Y
, FAlpha
,
750 True, FBlending
, Angle
, @RPoint
, Mirror
);
753 function TAnimation
.TotalFrames(): Integer;
755 Result
:= Length(FramesArray
[ID
].TexturesID
);
758 procedure TAnimation
.Revert(r
: Boolean);
764 procedure TAnimation
.SaveState(Var Mem
: TBinMemoryWriter
);
771 // Ñèãíàòóðà àíèìàöèè:
772 sig
:= ANIM_SIGNATURE
; // 'ANIM'
774 // Ñ÷åò÷èê îæèäàíèÿ ìåæäó êàäðàìè:
775 Mem
.WriteByte(FCounter
);
777 Mem
.WriteInt(FCurrentFrame
);
778 // Ïðîèãðàíà ëè àíèìàöèÿ öåëèêîì:
779 Mem
.WriteBoolean(FPlayed
);
780 // Alpha-êàíàë âñåé òåêñòóðû:
781 Mem
.WriteByte(FAlpha
);
782 // Ðàçìûòèå òåêñòóðû:
783 Mem
.WriteBoolean(FBlending
);
784 // Âðåìÿ îæèäàíèÿ ìåæäó êàäðàìè:
785 Mem
.WriteByte(FSpeed
);
786 // Çàöèêëåíà ëè àíèìàöèÿ:
787 Mem
.WriteBoolean(FLoop
);
789 Mem
.WriteBoolean(FEnabled
);
790 // Îæèäàíèå ïîñëå ïðîèãðûâàíèÿ:
791 Mem
.WriteByte(FMinLength
);
792 // Îáðàòíûé ëè ïîðÿäîê êàäðîâ:
793 Mem
.WriteBoolean(FRevert
);
796 procedure TAnimation
.LoadState(Var Mem
: TBinMemoryReader
);
803 // Ñèãíàòóðà àíèìàöèè:
805 if sig
<> ANIM_SIGNATURE
then // 'ANIM'
807 raise EBinSizeError
.Create('TAnimation.LoadState: Wrong Animation Signature');
809 // Ñ÷åò÷èê îæèäàíèÿ ìåæäó êàäðàìè:
810 Mem
.ReadByte(FCounter
);
812 Mem
.ReadInt(FCurrentFrame
);
813 // Ïðîèãðàíà ëè àíèìàöèÿ öåëèêîì:
814 Mem
.ReadBoolean(FPlayed
);
815 // Alpha-êàíàë âñåé òåêñòóðû:
816 Mem
.ReadByte(FAlpha
);
817 // Ðàçìûòèå òåêñòóðû:
818 Mem
.ReadBoolean(FBlending
);
819 // Âðåìÿ îæèäàíèÿ ìåæäó êàäðàìè:
820 Mem
.ReadByte(FSpeed
);
821 // Çàöèêëåíà ëè àíèìàöèÿ:
822 Mem
.ReadBoolean(FLoop
);
824 Mem
.ReadBoolean(FEnabled
);
825 // Îæèäàíèå ïîñëå ïðîèãðûâàíèÿ:
826 Mem
.ReadByte(FMinLength
);
827 // Îáðàòíûé ëè ïîðÿäîê êàäðîâ:
828 Mem
.ReadBoolean(FRevert
);