Открыть главное меню

Песочница

Версия от 20:29, 13 июня 2012; Fireton (обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
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;