Изменения

Перейти к навигации Перейти к поиску

Песочница

649 байт добавлено, 20:28, 13 июня 2012
Новая: <source lang="php"> procedure Tf2Context.AddAnimationDecorator(const aName: string; const aX, aY, aZ: Single; const aFilename: string; aLeft, a...
<source lang="php">
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;
</source>

Навигация