Ignore:
Timestamp:
Mar 19, 2021, 3:31:53 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Optimized drawing of Wonders window.
  • Modified: Used named constants for Wonders CitiID special cases.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Term.pas

    r318 r319  
    13621362    need := false;
    13631363    for i := 0 to 27 do
    1364       if MyRO.Wonder[i].CityID <> -1 then
     1364      if MyRO.Wonder[i].CityID <> WonderNotBuiltYet then
    13651365        need := true;
    13661366    if need then
     
    20242024      if MyRO.Wonder[i].CityID <> MyData.ToldWonders[i].CityID then
    20252025      begin
    2026         if MyRO.Wonder[i].CityID = -2 then
     2026        if MyRO.Wonder[i].CityID = WonderDestroyed then
    20272027          with MessgExDlg do
    20282028          begin { tell about destroyed wonders }
     
    20762076      end
    20772077      else if (MyRO.Wonder[i].EffectiveOwner <> MyData.ToldWonders[i]
    2078         .EffectiveOwner) and (MyRO.Wonder[i].CityID > -2) then
     2078        .EffectiveOwner) and (MyRO.Wonder[i].CityID > WonderDestroyed) then
    20792079        if MyRO.Wonder[i].EffectiveOwner < 0 then
    20802080        begin
     
    59075907    begin // city destroyed
    59085908      for i := 0 to 27 do { tell about destroyed wonders }
    5909         if (MyRO.Wonder[i].CityID = -2) and (MyData.ToldWonders[i].CityID <> -2)
     5909        if (MyRO.Wonder[i].CityID = WonderDestroyed) and (MyData.ToldWonders[i].CityID <> WonderDestroyed)
    59105910        then
    59115911          with MessgExDlg do
     
    73167316    mEUnitStat.Enabled := MyRO.nEnemyModel > 0;
    73177317    { mWonders.Enabled:= false;
    7318       for i:=0 to 27 do if MyRO.Wonder[i].CityID<>-1 then
     7318      for i:=0 to 27 do if MyRO.Wonder[i].CityID <> WonderNotBuiltYet then
    73197319      mWonders.Enabled:=true; }
    73207320    mDiagram.Enabled := MyRO.Turn >= 2;
Note: See TracChangeset for help on using the changeset viewer.