Песочница: различия между версиями
Перейти к навигации
Перейти к поиску
Содержимое удалено Содержимое добавлено
Fireton (обсуждение | вклад) Новая: <source lang="php"> procedure Tf2Context.AddAnimationDecorator(const aName: string; const aX, aY, aZ: Single; const aFilename: string; aLeft, a... |
Fireton (обсуждение | вклад) мНет описания правки |
||
| Строка 1: | Строка 1: | ||
<source lang=" |
<source lang="pascal"> |
||
procedure Tf2Context.AddAnimationDecorator(const aName: string; const aX, aY, aZ: Single; |
procedure Tf2Context.AddAnimationDecorator(const aName: string; const aX, aY, aZ: Single; |
||
const aFilename: string; aLeft, aTop, aWidth, aHeight, aFrames: Integer); |
const aFilename: string; aLeft, aTop, aWidth, aHeight, aFrames: Integer); |
||
Текущая версия от 17:29, 13 июня 2012
procedure Tf2Context.AddAnimationDecorator(const aName: string; const aX, aY, aZ: Single;
const aFilename: string; aLeft, aTop, aWidth, aHeight, aFrames: Integer);
var
l_Tex: Id2dTexture;
l_Decor: Tf2AnimationDecorator;
begin
l_Tex := gD2DE.Texture_Load(aFilename);
if l_Tex <> nil then
begin
if (aWidth < 1) or (aHeight < 1) then
Exit;
l_Decor := Tf2AnimationDecorator.Create(aX, aY, aZ, aFilename, aLeft, aTop, aWidth, aHeight, aFrames);
Decorators.AddDecorator(aName, l_Decor);
end
else
raise EFURQRunTimeError.CreateFmt(cNotFoundError, [aFilename]);
end;