X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fopengl%2Fr_gfx.pas;h=79b3c2b62adf1cb753eb97af83b948eecc104ec8;hp=5ec00178c0d905258d602e97c2889366cf6f24a9;hb=d581025b391fdf3b429d362f4b1a94e1f6e53413;hpb=f9982f4e6fd7f5d7cd3b09ee1ebb01d5f06e6e8a diff --git a/src/game/opengl/r_gfx.pas b/src/game/opengl/r_gfx.pas index 5ec0017..79b3c2b 100644 --- a/src/game/opengl/r_gfx.pas +++ b/src/game/opengl/r_gfx.pas @@ -46,6 +46,7 @@ implementation type TOnceAnim = record AnimType: Byte; + Alpha: Byte; x, y: Integer; oldX, oldY: Integer; Animation: TAnimationState; @@ -109,10 +110,11 @@ implementation end; procedure r_GFX_OnceAnim (AnimType, x, y: Integer); - var find_id: DWORD; a: TAnimationState; + var find_id: DWORD; a: TAnimationState; alpha: Byte; begin if not gpart_dbg_enabled then exit; find_id := FindOnceAnim(); + alpha := 0; case AnimType of R_GFX_NONE: a := nil; R_GFX_TELEPORT: a := TAnimationState.Create(false, 6, 10); // !!! speed can be 3 @@ -137,7 +139,7 @@ implementation begin AnimType := R_GFX_SMOKE; a := TAnimationState.Create(false, 3, 10); - a.alpha := 150; + alpha := 150; end; R_GFX_EXPLODE_SKELFIRE: a := TAnimationState.Create(false, 8, 3); R_GFX_EXPLODE_PLASMA: a := TAnimationState.Create(false, 3, 4); @@ -150,9 +152,8 @@ implementation assert(false) end; OnceAnims[find_id].AnimType := AnimType; + OnceAnims[find_id].Alpha := alpha; OnceAnims[find_id].Animation := a; -// OnceAnims[find_id].Animation.Blending := Anim.Blending; -// OnceAnims[find_id].Animation.alpha := Anim.alpha; OnceAnims[find_id].x := x; OnceAnims[find_id].y := y; end; @@ -240,7 +241,7 @@ begin begin fx := nlerp(oldx, x, gLerpFactor); fy := nlerp(oldy, y, gLerpFactor); - r_AnimationState_Draw(gfxFrames[AnimType], Animation, x, y, TMirrorType.None); + r_AnimationState_Draw(gfxFrames[AnimType], Animation, x, y, Alpha, TMirrorType.None, False); end; end; end;