Ignore:
Timestamp:
Mar 27, 2024, 12:31:14 PM (8 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Term.pas

    r530 r531  
    421421    procedure UpdateKeyShortcuts;
    422422    procedure SetFullScreen(Active: Boolean);
    423     procedure PaintZoomedTile(dst: TBitmap; X, Y, Loc: Integer);
     423    procedure PaintZoomedTile(Dst: TBitmap; X, Y, Loc: Integer);
    424424  public
    425425    UsedOffscreenWidth: Integer;
     
    850850function AttackSound(Code: Integer): string;
    851851begin
    852   Result := 'ATTACK_' + char(48 + Code div 100 mod 10) +
    853     char(48 + Code div 10 mod 10) + char(48 + Code mod 10);
     852  Result := 'ATTACK_' + Char(48 + Code div 100 mod 10) +
     853    Char(48 + Code div 10 mod 10) + Char(48 + Code mod 10);
    854854end;
    855855
     
    931931          else OpenSound:=AttackSound(ModelCode(mi)); }
    932932        if MyModel[MyData.ToldModels].Kind = mkSelfDeveloped then
    933           OpenSound := 'NEWMODEL_' + char(48 + Age);
     933          OpenSound := 'NEWMODEL_' + Char(48 + Age);
    934934        MessgText := Phrases.Lookup('MODELAVAILABLE');
    935935        if GameMode = cMovie then
     
    989989end;
    990990
    991 procedure TMainScreen.PaintZoomedTile(dst: TBitmap; X, Y, Loc: Integer);
     991procedure TMainScreen.PaintZoomedTile(Dst: TBitmap; X, Y, Loc: Integer);
    992992
    993993  procedure TSprite(xDst, yDst, xSrc, ySrc: Integer);
    994994  begin
    995995    with NoMapPanel do
    996       Sprite(dst, HGrTerrain, X + xDst, Y + yDst, xxt * 2, yyt * 3,
     996      Sprite(Dst, HGrTerrain, X + xDst, Y + yDst, xxt * 2, yyt * 3,
    997997        1 + xSrc * (xxt * 2 + 1), 1 + ySrc * (yyt * 3 + 1));
    998998  end;
     
    10011001  begin
    10021002    with NoMapPanel do begin
    1003       Sprite(dst, HGrTerrain, X + xxt, Y + yyt + 2, xxt * 2, yyt * 2 - 2,
     1003      Sprite(Dst, HGrTerrain, X + xxt, Y + yyt + 2, xxt * 2, yyt * 2 - 2,
    10041004        1 + xSrc * (xxt * 2 + 1), 3 + yyt + ySrc * (yyt * 3 + 1));
    1005       Sprite(dst, HGrTerrain, X + 4, Y + 2 * yyt, xxt * 2 - 4, yyt * 2,
     1005      Sprite(Dst, HGrTerrain, X + 4, Y + 2 * yyt, xxt * 2 - 4, yyt * 2,
    10061006        5 + xSrc * (xxt * 2 + 1), 1 + yyt + ySrc * (yyt * 3 + 1));
    1007       Sprite(dst, HGrTerrain, X + xxt * 2, Y + 2 * yyt, xxt * 2 - 4, yyt * 2,
     1007      Sprite(Dst, HGrTerrain, X + xxt * 2, Y + 2 * yyt, xxt * 2 - 4, yyt * 2,
    10081008        1 + xSrc * (xxt * 2 + 1), 1 + yyt + ySrc * (yyt * 3 + 1));
    1009       Sprite(dst, HGrTerrain, X + xxt, Y + yyt * 3, xxt * 2, yyt * 2 - 2,
     1009      Sprite(Dst, HGrTerrain, X + xxt, Y + yyt * 3, xxt * 2, yyt * 2 - 2,
    10101010        1 + xSrc * (xxt * 2 + 1), 1 + yyt + ySrc * (yyt * 3 + 1));
    10111011    end;
     
    15191519  Color: TColor;
    15201520  Name: string;
    1521   ok: Boolean;
     1521  Ok: Boolean;
    15221522begin
    15231523  UnusedTribeFiles.Clear;
    1524   ok := FindFirst(LocalizedFilePath('Tribes') + DirectorySeparator + '*' + CevoTribeExt,
     1524  Ok := FindFirst(LocalizedFilePath('Tribes') + DirectorySeparator + '*' + CevoTribeExt,
    15251525    faArchive + faReadOnly, SearchRec) = 0;
    1526   if not ok then
     1526  if not Ok then
    15271527  begin
    15281528    FindClose(SearchRec);
    1529     ok := FindFirst(LocalizedFilePath('Tribes' + DirectorySeparator + '*' + CevoTribeExt),
     1529    Ok := FindFirst(LocalizedFilePath('Tribes' + DirectorySeparator + '*' + CevoTribeExt),
    15301530      faArchive + faReadOnly, SearchRec) = 0;
    15311531  end;
    1532   if ok then
     1532  if Ok then
    15331533    repeat
    15341534      SearchRec.Name := Copy(SearchRec.Name, 1, Length(SearchRec.Name) - Length(CevoTribeExt));
     
    20782078        else
    20792079        begin
    2080           S := Tribe[Me].TPhrase('AGE' + char(48 + Age));
     2080          S := Tribe[Me].TPhrase('AGE' + Char(48 + Age));
    20812081          MessgText := Format(S, [TurnToString(MyRO.Turn)]);
    20822082        end;
     
    20862086        { else begin Kind:=mkOkHelp; HelpKind:=hkAdv; HelpNo:=AgePreq[age]; end };
    20872087        CenterTo := NewAgeCenterTo;
    2088         OpenSound := 'AGE_' + char(48 + Age);
     2088        OpenSound := 'AGE_' + Char(48 + Age);
    20892089        Application.ProcessMessages;
    20902090        ShowModal;
     
    22502250          Item := 'RESEARCH_GENERAL';
    22512251          if GameMode <> cMovie then
    2252             OpenSound := 'NEWADVANCE_' + char(48 + Age);
     2252            OpenSound := 'NEWADVANCE_' + Char(48 + Age);
    22532253          Item2 := Phrases.Lookup('ADVANCES', ad);
    22542254          if ad in FutureTech then
     
    24442444              begin // !!! Shinkansen
    24452445                MoveResult := eOK;
    2446                 ok := True;
     2446                Ok := True;
    24472447                for I := 0 to MoveAdviceData.nStep - 1 do
    24482448                begin
     
    24542454                  // don't attack during auto move
    24552455                  begin
    2456                     ok := False;
    2457                     Break
     2456                    Ok := False;
     2457                    Break;
    24582458                  end
    24592459                  else
     
    24712471                    then
    24722472                    begin
    2473                       ok := False;
     2473                      Ok := False;
    24742474                      Break;
    24752475                    end;
     
    24782478                Stop := not ok or (Loc = MoveAdviceData.ToLoc) or
    24792479                  (MoveAdviceData.ToLoc = maNextCity) and
    2480                   (MyMap[Loc] and fCity <> 0)
     2480                  (MyMap[Loc] and fCity <> 0);
    24812481              end
    24822482              else
     
    29772977          with MessgExDlg do
    29782978          begin
    2979             OpenSound := 'CONTACT_' + char(48 + MyRO.EnemyReport[Integer(Data)
     2979            OpenSound := 'CONTACT_' + Char(48 + MyRO.EnemyReport[Integer(Data)
    29802980              ].Attitude);
    29812981            MessgText := Tribe[Integer(Data)].TPhrase('FRCONTACT');
     
    30053005        InitTurn(NewPlayer);
    30063006        if Command = scDipStart then
    3007           Play('CONTACT_' + char(48 + MyRO.Attitude[DipMem[NewPlayer]
     3007          Play('CONTACT_' + Char(48 + MyRO.Attitude[DipMem[NewPlayer]
    30083008            .pContact]))
    30093009        else if Command = scDipCancelTreaty then
     
    47184718var
    47194719  ProcessOptions: Integer;
    4720   rec: TRect;
     4720  Rec: TRect;
    47214721  DoInvalidate: Boolean;
    47224722begin
     
    47594759        Exit; { map window not moved }
    47604760      Offscreen.Canvas.Font.Assign(UniFont[ftSmall]);
    4761       rec := Rect(0, 0, MapWidth, MapHeight);
     4761      Rec := Rect(0, 0, MapWidth, MapHeight);
    47624762{$IFDEF WINDOWS}
    47634763      ScrollDC(Offscreen.Canvas.Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt,
     
    47664766{$IFDEF UNIX}
    47674767      ScrollDC(Offscreen.Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt,
    4768         rec, rec, 0, nil);
     4768        Rec, Rec, 0, nil);
    47694769{$ENDIF}
    47704770      for DoInvalidate := False to FastScrolling do begin
    47714771        if DoInvalidate then begin
    4772           rec.Bottom := MapHeight - Overlap;
     4772          Rec.Bottom := MapHeight - Overlap;
    47734773{$IFDEF WINDOWS}
    47744774          ScrollDC(Canvas.Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, rec,
     
    47774777{$IFDEF UNIX}
    47784778          ScrollDC(Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt,
    4779             rec, rec, 0, nil);
     4779            Rec, Rec, 0, nil);
    47804780{$ENDIF}
    47814781          ProcessOptions := prInvalidate;
     
    71537153    else if BHelp.Test(ShortCut) then mHelp.Click;
    71547154    (*if Shift = [ssCtrl] then
    7155       case char(Key) of
     7155      case Char(Key) of
    71567156         'A':
    71577157          begin // auto symmetry
Note: See TracChangeset for help on using the changeset viewer.