Ignore:
Timestamp:
Jan 4, 2022, 3:27:03 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Update Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r52 r53  
    5555    procedure TimerEngineTickTimer(Sender: TObject);
    5656  private
    57     OriginalBounds: TRect;
    58     OriginalWindowState: TWindowState;
    59     ScreenBounds: TRect;
    6057    StartTime: TDateTime;
    6158    Drawing: Boolean;
     
    9289    StartTime := NowPrecise;
    9390    //Engine.Draw;
    94     Engine.Lock.Acquire;
    95     try
    96       //StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' +
    97       //  IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' +
    98       //  IntToStr(TPlayer(Engine.Players[0]).Direction);
    99       StatusBar1.Panels[2].Text := FloatToStr(RoundTo(Engine.DrawDuration / OneMillisecond, -2));
    100       StatusBar1.Panels[3].Text := Format(SRound, [IntToStr(Engine.CurrentRound),
    101         IntToStr(Engine.MaxRound)]);
    102     finally
    103       Engine.Lock.Release;
     91    if Assigned(Engine) then begin
     92      Engine.Lock.Acquire;
     93      try
     94        //StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' +
     95        //  IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' +
     96        //  IntToStr(TPlayer(Engine.Players[0]).Direction);
     97        StatusBar1.Panels[2].Text := FloatToStr(RoundTo(Engine.DrawDuration / OneMillisecond, -2));
     98        StatusBar1.Panels[3].Text := Format(SRound, [IntToStr(Engine.CurrentRound),
     99          IntToStr(Engine.MaxRound)]);
     100      finally
     101        Engine.Lock.Release;
     102      end;
    104103    end;
    105104  finally
Note: See TracChangeset for help on using the changeset viewer.