Changeset 60 for trunk/LocalPlayer


Ignore:
Timestamp:
Jan 13, 2017, 6:51:27 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: City mini map was drawn incorrectly.
Location:
trunk/LocalPlayer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/BaseWin.pas

    r40 r60  
    191191    SmartInvalidate;
    192192    if ImmUpdate then
    193       Update
    194   end
     193      Update;
     194  end;
    195195end;
    196196
  • trunk/LocalPlayer/CityScreen.pas

    r52 r60  
    66uses
    77  Protocol, ClientTools, Term, ScreenTools, IsoEngine, BaseWin,
    8 
    9   LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls,
    10   ButtonA,
    11   ButtonB, ButtonBase, ButtonC, Area;
     8  LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls,
     9  ButtonA, ButtonC, Area;
    1210
    1311const
     
    237235procedure TCityDlg.FormDestroy(Sender: TObject);
    238236begin
    239   AreaMap.Free;
    240   SmallCityMap.Free;
    241   ZoomCityMap.Free;
    242   SmallCityMapTemplate.Free;
    243   CityMapTemplate.Free;
    244   Template.Free;
    245   Back.Free;
     237  FreeAndNil(AreaMap);
     238  FreeAndNil(SmallCityMap);
     239  FreeAndNil(ZoomCityMap);
     240  FreeAndNil(SmallCityMapTemplate);
     241  FreeAndNil(CityMapTemplate);
     242  FreeAndNil(Template);
     243  FreeAndNil(Back);
    246244end;
    247245
     
    352350procedure TCityDlg.InitZoomCityMap;
    353351begin
     352  // TODO: FillRect should not be needed as BitBlt is with SRCCOPY
     353  ZoomCityMap.Canvas.FillRect(0, 0, ZoomCityMap.Width, ZoomCityMap.Height);
     354
    354355  bitblt(ZoomCityMap.Canvas.Handle, 0, 0, wZoomMap, hZoomMap,
    355356    Back.Canvas.Handle, xZoomMap, yZoomMap, SRCCOPY);
    356   if Mode = mImp then
    357   begin
    358     if ZoomArea < 3 then
     357  if Mode = mImp then begin
     358    if ZoomArea < 3 then begin
    359359      ImageOp_B(ZoomCityMap, CityMapTemplate, 0, 0, 376 * SizeClass,
    360         112 * ZoomArea, wZoomMap, hZoomMap)
    361     else
    362     begin
     360        112 * ZoomArea, wZoomMap, hZoomMap);
     361    end else begin
    363362      ImageOp_B(ZoomCityMap, CityMapTemplate, 0, 0, 376 * SizeClass + 216,
    364363        112 * (ZoomArea - 3), wZoomMap - wZoomEnvironment, hZoomMap);
Note: See TracChangeset for help on using the changeset viewer.