X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fopengl%2Fr_animations.pas;h=8af7830556b35c49ba65b8a9c700357e7c25a0b6;hp=f50ce92b382b21cb5868c22fb12d96f88226205b;hb=17ca3896bbe664f64e6c302023b8010d4ebd02ff;hpb=914d23e91073f293d6b09ce8fe448705975b5f12 diff --git a/src/game/opengl/r_animations.pas b/src/game/opengl/r_animations.pas index f50ce92..8af7830 100644 --- a/src/game/opengl/r_animations.pas +++ b/src/game/opengl/r_animations.pas @@ -30,6 +30,7 @@ interface function g_Frames_Dup (const NewName, OldName: AnsiString): Boolean; function g_Frames_Get (out ID: LongWord; const FramesName: AnsiString): Boolean; function g_Frames_GetTexture (out ID: LongWord; const FramesName: AnsiString; Frame: Word): Boolean; + procedure g_Frames_GetFrameSize (ID: DWORD; out w, h: Integer); function g_Frames_Exists (const FramesName: AnsiString): Boolean; procedure g_Frames_DeleteByName (const FramesName: AnsiString); procedure g_Frames_DeleteByID (ID: LongWord); @@ -56,6 +57,17 @@ implementation g_language, g_game ; + procedure g_Frames_GetFrameSize (ID: DWORD; out w, h: Integer); + begin + w := 0; + h := 0; + if framesArray <> nil then + begin + w := framesArray[ID].frameWidth; + h := framesArray[ID].frameHeight; + end + end; + procedure r_AnimationState_Draw (FID: DWORD; t: TAnimationState; x, y: Integer; alpha: Byte; mirror: TMirrorType; blending: Boolean); begin if t.enabled then