Ignore:
Timestamp:
Mar 26, 2021, 2:16:04 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Reworker IsoEngine unit to support multiple iso maps with different tile sizes.
  • Modified: Changing tile size in main windows map doesn't affect other tile drawing on panel and in other windows like help window.
  • Modified: Optimized tile size switching. Graphic assets needed for given tile size is prepared only once. Then switching between them is just about changing references to objects and redrawing.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/CityScreen.pas

    r328 r330  
    407407    rare: boolean;
    408408  begin
     409    with AreaMap do begin
    409410    if Server(sGetCityTileInfo, me, Loc, TileInfo) <> eOk then
    410411    begin
     
    442443      Sprite(offscreen, HGrSystem, x + xxt - 5 + d * (2 * i + 1 - Total),
    443444        y + yyt - 5, 10, 10, xGr, yGr);
     445    end;
    444446    end;
    445447  end;
     
    593595  end;
    594596
     597  with AreaMap do begin
    595598  rx := (192 + xxt * 2 - 1) div (xxt * 2);
    596599  ry := (96 + yyt * 2 - 1) div (yyt * 2);
     
    619622              Loc1, (dx = 0) and (dy = 0));
    620623        end;
     624  end;
    621625
    622626  if Report.Working > 1 then
     
    930934            y := ((Cnt - 6 * Page) div 3) * 52 + yZoomMap + 20;
    931935            MakeUnitInfo(me, MyUn[i], UnitInfo);
    932             NoMap.SetOutput(offscreen);
    933             NoMap.PaintUnit(x, y, UnitInfo, MyUn[i].Status);
     936            AreaMap.SetOutput(offscreen);
     937            AreaMap.PaintUnit(x, y, UnitInfo, MyUn[i].Status);
    934938
    935939            for j := 0 to UnitReport.FoodSupport - 1 do
     
    13171321    else if (x >= xmArea - 192) and (x < xmArea + 192) and (y >= ymArea - 96)
    13181322      and (y < ymArea + 96) then
     1323    with AreaMap do
    13191324    begin
    13201325      qx := ((4000 * xxt * yyt) + (x - xmArea) * (yyt * 2) + (y - ymArea + yyt)
Note: See TracChangeset for help on using the changeset viewer.