X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fopengl%2Fr_animations.pas;h=156869b82640047a1f888265e1c36887b932736a;hb=39b0746406e3df71ac598f7c0d9e96e9210df381;hp=1b634051753716d481178091eaf2134a6bbe88bb;hpb=3baa32dc5c87bbf5d47c5446eeb1d5a7b44365a5;p=d2df-sdl.git diff --git a/src/game/opengl/r_animations.pas b/src/game/opengl/r_animations.pas index 1b63405..156869b 100644 --- a/src/game/opengl/r_animations.pas +++ b/src/game/opengl/r_animations.pas @@ -22,6 +22,9 @@ interface procedure r_Animation_Draw (t: TAnimation; x, y: Integer; mirror: TMirrorType); procedure r_Animation_DrawEx (t: TAnimation; x, y: Integer; mirror: TMirrorType; rpoint: TDFPoint; angle: SmallInt); + procedure r_AnimationState_Draw (TID: DWORD; t: TAnimationState; x, y: Integer; mirror: TMirrorType); + procedure r_AnimationState_DrawEx (FID: DWORD; t: TAnimationState; x, y: Integer; mirror: TMirrorType; rpoint: TDFPoint; angle: SmallInt); + function g_CreateFramesImg (ia: TDynImageDataArray; ID: PDWORD; const Name: AnsiString; BackAnimation: Boolean = false): Boolean; function g_Frames_CreateWAD (ID: PDWORD; const Name, Resource: AnsiString; mWidth, mHeight, mCount: Word; BackAnimation: Boolean=false): Boolean; @@ -68,6 +71,18 @@ implementation e_DrawAdv(framesArray[t.id].TexturesID[t.currentFrame], x, y, t.alpha, true, t.blending, angle, @rpoint, mirror) end; + procedure r_AnimationState_Draw (TID: DWORD; t: TAnimationState; x, y: Integer; mirror: TMirrorType); + begin + if t.enabled then + e_DrawAdv(framesArray[TID].TexturesID[t.currentFrame], x, y, t.alpha, true, t.blending, 0, nil, mirror) + end; + + procedure r_AnimationState_DrawEx (FID: DWORD; t: TAnimationState; x, y: Integer; mirror: TMirrorType; rpoint: TDFPoint; angle: SmallInt); + begin + if t.enabled then + e_DrawAdv(framesArray[FID].TexturesID[t.currentFrame], x, y, t.alpha, true, t.blending, angle, @rpoint, mirror) + end; + function allocFrameSlot (): LongWord; var f: integer;