summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 483304f)
raw | patch | inline | side by side (parent: 483304f)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 13 Apr 2022 17:47:33 +0000 (20:47 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 08:23:59 +0000 (11:23 +0300) |
src/game/opengl/r_map.pas | patch | blob | history | |
src/game/opengl/r_playermodel.pas | patch | blob | history |
index 2ec57d478ebc1fd7821c2741315fff2615889037..a2f3d18e39ead7935bc9b8b8ecb23582c8089c82 100644 (file)
Anim: Boolean;
end;
FlagFrames: array [FLAG_RED..FLAG_BLUE] of DWORD;
- FlagAnim: TAnimationState;
+ FlagAnim: TAnimState;
procedure r_Map_Initialize;
begin
- FlagAnim := TAnimationState.Create(True, 8, 5);
+ FlagAnim := TAnimState.Create(True, 8, 5);
end;
procedure r_Map_Finalize;
begin
- FlagAnim.Free;
- FlagAnim := nil;
+ FlagAnim.Invalidate;
end;
procedure r_Map_Load;
else
Mirror := TMirrorType.None;
dx := IfThen(f.Direction = TDirection.D_LEFT, -1, +1);
- r_AnimationState_Draw(FlagFrames[i], FlagAnim, tx + dx, ty + 1, 0, Mirror, False);
+ r_AnimState_Draw(FlagFrames[i], FlagAnim, tx + dx, ty + 1, 0, Mirror, False);
if g_debug_Frames then
e_DrawQuad(tx + f.Obj.Rect.X, ty + f.Obj.Rect.Y, tx + f.Obj.Rect.X + f.Obj.Rect.Width - 1, ty + f.Obj.Rect.Y + f.Obj.Rect.Height - 1, 0, 255, 0)
end
index cc10d127d89fb67e0a73a1e191771e8328b3e842..b62e321ca8c66f740b3b5e7755fe21d6fe4b4a3a 100644 (file)
end;
RedFlagFrames: DWORD;
BlueFlagFrames: DWORD;
- FlagAnimState: TAnimationState;
+ FlagAnimState: TAnimState;
{$IFDEF ENABLE_GIBS}
function r_PlayerModel_GetGibRect (m, id: Integer): TRectWH;
procedure r_PlayerModel_Initialize;
begin
- FlagAnimState := TAnimationState.Create(True, 8, 5);
+ FlagAnimState := TAnimState.Create(True, 8, 5);
end;
procedure r_PlayerModel_Finalize;
begin
- FlagAnimState.Free;
- FlagAnimState := nil;
+ FlagAnimState.Invalidate;
end;
procedure ExtAnimFromBaseAnim(MName: String; AIdx: Integer);
fa := PlayerModelsArray[pm.id].FlagAngle;
p.X := IfThen(pm.Direction = TDirection.D_LEFT, FLAG_BASEPOINT.X, 64 - FLAG_BASEPOINT.X);
p.Y := FLAG_BASEPOINT.Y;
- r_AnimationState_DrawEx(
+ r_AnimState_DrawEx(
FramesID,
FlagAnimState,
X + IfThen(pm.Direction = TDirection.D_LEFT, fp.X - 1, 2 * FLAG_BASEPOINT.X - fp.X + 1) - FLAG_BASEPOINT.X,