Changeset 362


Ignore:
Timestamp:
Apr 12, 2021, 10:18:18 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
Location:
trunk/LocalPlayer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Rates.pas

    r352 r362  
    206206    SmartUpdateContent;
    207207    MainScreen.UpdateViews(true);
    208   end
     208  end;
    209209end;
    210210
  • trunk/LocalPlayer/UnitStat.pas

    r352 r362  
    150150        dec(ecixShow);
    151151      assert(ecixShow >= 0);
    152     end
     152    end;
    153153  end;
    154154  case Kind of
     
    296296      result := (PPicture.HGr = PTestPicture.HGr) and
    297297        (PPicture.pix = PTestPicture.pix) and
    298         (ModelHash(mox^) = ModelHash(MyRO.EnemyModel[emix]))
     298        (ModelHash(mox^) = ModelHash(MyRO.EnemyModel[emix]));
    299299    end
    300300    else
    301301      result := (MyRO.EnemyModel[emix].owner = mox.owner) and
    302         (MyRO.EnemyModel[emix].mix = mox.mix)
     302        (MyRO.EnemyModel[emix].mix = mox.mix);
    303303  end;
    304304
     
    435435      begin
    436436        case i of
    437           0:
    438             j := imWalls;
    439           1:
    440             j := imCoastalFort;
    441           2:
    442             j := imMissileBat;
    443           3:
    444             j := imBunker
     437          0: j := imWalls;
     438          1: j := imCoastalFort;
     439          2: j := imMissileBat;
     440          3: j := imBunker
    445441        end;
    446442        Frame(offscreen.Canvas, x - 1, yImp - 1, x + xSizeSmall,
     
    450446          SmallImp.Canvas, j mod 7 * xSizeSmall,
    451447          (j + SystemIconLines * 7) div 7 * ySizeSmall);
    452         inc(x, xSizeSmall + 4)
     448        inc(x, xSizeSmall + 4);
    453449      end;
    454450  end;
     
    467463            if IsToCount(MyRO.EnemyUn[MyRO.nEnemyUn + uix].emix) then
    468464              inc(Available);
    469         end
     465        end;
    470466      end
    471467    else // no supervisor -- can only count stack top units
     
    510506    begin
    511507      MakeUnitInfo(me, MyUn[uixShow], ui);
    512       MakeModelInfo(me, MyUn[uixShow].mix, MyModel[MyUn[uixShow].mix], mi)
     508      MakeModelInfo(me, MyUn[uixShow].mix, MyModel[MyUn[uixShow].mix], mi);
    513509    end
    514510    else
     
    516512      mi := mox^;
    517513      if Kind in [dkEnemyUnit, dkEnemyCityDefense] then
    518         ui := MyRO.EnemyUn[euixShow]
     514        ui := MyRO.EnemyUn[euixShow];
    519515    end;
    520516
     
    539535          begin
    540536            x := 1 + 2 * (xxt * 2 + 1);
    541             y := 1 + yyt + 2 * (yyt * 3 + 1)
     537            y := 1 + yyt + 2 * (yyt * 3 + 1);
    542538          end
    543539          else
    544540          begin
    545541            x := integer(MyMap[Loc] and fTerrain) * (xxt * 2 + 1) + 1;
    546             y := 1 + yyt
     542            y := 1 + yyt;
    547543          end;
    548544          for j := -1 to 1 do
     
    592588              (ClientWidth - BiColorTextWidth(offscreen.Canvas, s)) div 2,
    593589              yView + 80, s);
    594           end
     590          end;
    595591        end
    596592      else
     
    673669          ConscriptsBtn.ButtonIndex := 29;
    674670          ConscriptsBtn.Hint := Phrases.Lookup('BTN_ALLOWCONSCRIPTS');
    675         end
     671        end;
    676672      end
    677673      else if Kind = dkEnemyModel then
     
    683679          NumberBar(offscreen, xTotal, yTotal + StatDown,
    684680            Phrases.Lookup('UNITKNOWN'), Available, MainTexture);
    685       end
     681      end;
    686682    end;
    687683  end;
     
    703699procedure TUnitStatDlg.ModelBoxChange(Sender: TObject);
    704700begin
    705   SmartUpdateContent
     701  SmartUpdateContent;
    706702end;
    707703
     
    718714    SwitchBtn.ButtonIndex := 11;
    719715    SwitchBtn.Hint := Phrases.Lookup('BTN_NONOBSOLETE');
    720   end
     716  end;
    721717end;
    722718
     
    733729    ConscriptsBtn.ButtonIndex := 29;
    734730    ConscriptsBtn.Hint := Phrases.Lookup('BTN_ALLOWCONSCRIPTS');
    735   end
     731  end;
    736732end;
    737733
    738734procedure TUnitStatDlg.HelpBtnClick(Sender: TObject);
    739735begin
    740   HelpDlg.ShowNewContent(wmPersistent, hkModel, 0)
     736  HelpDlg.ShowNewContent(wmPersistent, hkModel, 0);
    741737end;
    742738
Note: See TracChangeset for help on using the changeset viewer.