Changeset 337 for trunk


Ignore:
Timestamp:
Apr 1, 2021, 9:30:25 AM (3 years ago)
Author:
chronos
Message:
  • Fixed: Incorrect drawing of city names under units. MapOptions need to be global variable for all TIsoMap instances.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Direct.pas

    r336 r337  
    6464      Info := Phrases.Lookup('BUSY_MODLH');
    6565      Show;
    66       Application.ProcessMessages; // Repaint after show for Linux
     66      {$IFDEF LINUX}
     67      Application.ProcessMessages;
     68      {$ENDIF}
    6769      Invalidate;
    6870      Update;
     
    152154        State := -1;
    153155        Show;
     156        {$IFDEF LINUX}
     157        Application.ProcessMessages;
     158        {$ENDIF}
    154159        Invalidate;
    155160        Update;
    156         Application.ProcessMessages;
    157161      end;
    158162    ntBackOn: begin
     
    282286  Invalidate;
    283287  Update;
     288  {$IFDEF LINUX}
    284289  Application.ProcessMessages;
     290  {$ENDIF}
    285291end;
    286292
  • trunk/LocalPlayer/IsoEngine.pas

    r331 r337  
    5757    BordersOK: PInteger;
    5858    CitiesPictures: TCitiesPictures;
     59    ShowLoc: Boolean;
     60    ShowCityNames: Boolean;
     61    ShowObjects: Boolean;
     62    ShowBorder: Boolean;
     63    ShowMyBorder: Boolean;
     64    ShowGrWall: Boolean;
     65    ShowDebug: Boolean;
     66    FoW: Boolean;
    5967    function Connection4(Loc, Mask, Value: integer): integer;
    6068    function Connection8(Loc, Mask: integer): integer;
     
    7684    HGrTerrain: TGraphicSet;
    7785    HGrCities: TGraphicSet;
    78     MapOptions: TMapOptions;
    7986    pDebugMap: Integer; // -1 for off
    8087    constructor Create;
     
    122129function IsJungle(y: integer): boolean;
    123130procedure Init(InitEnemyModelHandler: TInitEnemyModelEvent);
     131
     132var
     133  MapOptions: TMapOptions;
    124134
    125135
     
    161171  OnInitEnemyModel: TInitEnemyModelEvent;
    162172  DebugMap: ^TTileList;
    163   FoW: Boolean;
    164   ShowLoc: Boolean;
    165   ShowCityNames: Boolean;
    166   ShowObjects: Boolean;
    167   ShowBorder: Boolean;
    168   ShowMyBorder: Boolean;
    169   ShowGrWall: Boolean;
    170   ShowDebug: Boolean;
    171173  IsoMapCache: array[TTileSize] of TIsoMapCache;
    172174
     
    15501552                begin
    15511553                  Aix := 0;
    1552                   bix := 0
     1554                  bix := 0;
    15531555                end
    15541556                else
    15551557                begin
    15561558                  Aix := 0;
    1557                   bix := 1
     1559                  bix := 1;
    15581560                end
    15591561              else if bix = -1 then
     
    15611563                begin
    15621564                  Aix := 1;
    1563                   bix := 1
     1565                  bix := 1;
    15641566                end
    15651567                else
    15661568                begin
    15671569                  Aix := 1;
    1568                   bix := 0
     1570                  bix := 0;
    15691571                end;
    15701572              BitBltBitmap(OceanPatch, x + dx * xxt, y + dy * yyt, xxt, yyt,
     
    16031605            begin
    16041606              Aix := fDesert;
    1605               bix := fDesert
     1607              bix := fDesert;
    16061608            end
    16071609            else if Aix = -2 then
  • trunk/LocalPlayer/Term.pas

    r335 r337  
    12591259begin
    12601260  MiniMap.MapOptions := MapOptionChecked;
    1261   MainMap.MapOptions := MapOptionChecked;
     1261  MapOptions := MapOptionChecked;
    12621262  if ClientMode = cEditMap then
    1263     MainMap.MapOptions := MainMap.MapOptions + [moEditMode];
     1263    MapOptions := MapOptions + [moEditMode];
    12641264  if mLocCodes.Checked then
    1265     MainMap.MapOptions := MainMap.MapOptions + [moLocCodes];
     1265    MapOptions := MapOptions + [moLocCodes];
    12661266end;
    12671267
     
    35213521  Buffer := TBitmap.Create;
    35223522  Buffer.PixelFormat := pf24bit;
    3523   if 2 * lxmax > 3 * xSizeBig then
    3524     Buffer.width := 2 * lxmax
    3525   else
    3526     Buffer.width := 3 * xSizeBig;
    3527   if lymax > 3 * ySizeBig then
    3528     Buffer.height := lymax
    3529   else
    3530     Buffer.height := 3 * ySizeBig;
     3523  if 2 * lxmax > 3 * xSizeBig then Buffer.width := 2 * lxmax
     3524    else Buffer.width := 3 * xSizeBig;
     3525  if lymax > 3 * ySizeBig then Buffer.height := lymax
     3526    else Buffer.height := 3 * ySizeBig;
    35313527  Buffer.Canvas.Font.Assign(UniFont[ftSmall]);
    35323528  for i := 0 to nPl - 1 do
     
    50715067          // if MoveHintToLoc>=0 then
    50725068          // ShowMoveHint(MoveHintToLoc, true);
    5073         end
     5069        end;
    50745070      end
    50755071      else if TurnComplete and not supervising then
     
    63916387begin
    63926388  MainMap.pDebugMap := p;
    6393   MainMap.MapOptions := MainMap.MapOptions - [moLocCodes];
     6389  MapOptions := MapOptions - [moLocCodes];
    63946390  mLocCodes.Checked := false;
    63956391  MapValid := false;
Note: See TracChangeset for help on using the changeset viewer.