DEADSOFTWARE

render: separate animation drawing from game code
[d2df-sdl.git] / src / game / opengl / r_animations.pas
1 (* Copyright (C) Doom 2D: Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, version 3 of the License ONLY.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 *)
15 {$INCLUDE ../../shared/a_modes.inc}
16 unit r_animations;
18 interface
20 uses g_base, g_textures, MAPDEF; // TMirrorType, TAnimation, TDFPoint
22 procedure r_Animation_Draw (t: TAnimation; x, y: Integer; mirror: TMirrorType);
23 procedure r_Animation_DrawEx (t: TAnimation; x, y: Integer; mirror: TMirrorType; rpoint: TDFPoint; angle: SmallInt);
25 implementation
27 uses r_graphics;
29 procedure r_Animation_Draw (t: TAnimation; x, y: Integer; mirror: TMirrorType);
30 begin
31 if t.enabled then
32 e_DrawAdv(framesArray[t.id].TexturesID[t.currentFrame], x, y, t.alpha, true, t.blending, 0, nil, mirror)
33 end;
35 procedure r_Animation_DrawEx (t: TAnimation; x, y: Integer; mirror: TMirrorType; rpoint: TDFPoint; angle: SmallInt);
36 begin
37 if t.enabled then
38 e_DrawAdv(framesArray[t.id].TexturesID[t.currentFrame], x, y, t.alpha, true, t.blending, angle, @rpoint, mirror)
39 end;
41 end.