Changeset 290 for trunk/LocalPlayer
- Timestamp:
- Feb 26, 2021, 11:56:48 PM (4 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Help.pas
r261 r290 208 208 destructor THyperText.Destroy; 209 209 begin 210 inherited Destroy;210 inherited; 211 211 end; 212 212 … … 1237 1237 until FindNext(sr) <> 0; 1238 1238 FindClose(sr); 1239 Plus.Free;1239 FreeAndNil(Plus); 1240 1240 1241 1241 List.Sort; … … 1254 1254 MainText.AddLine(s); 1255 1255 end; 1256 List.Free;1256 FreeAndNil(List); 1257 1257 end; 1258 1258 … … 1272 1272 MainText.AddLine(s); 1273 1273 end; 1274 List.Free;1274 FreeAndNil(List); 1275 1275 end; 1276 1276 … … 1434 1434 AppendList(List); 1435 1435 end; 1436 List.Free;1436 FreeAndNil(List); 1437 1437 end 1438 1438 else // single advance … … 1533 1533 List.Sort; 1534 1534 AppendList(List); 1535 List.Free;1535 FreeAndNil(List); 1536 1536 end 1537 1537 else if no = 201 then … … 1822 1822 AppendList(List); 1823 1823 end; 1824 List.Free;1824 FreeAndNil(List); 1825 1825 end 1826 1826 else … … 1983 1983 OffscreenPaint; 1984 1984 Invalidate; 1985 HistItem.Free;1985 FreeAndNil(HistItem); 1986 1986 end; 1987 1987 end; -
trunk/LocalPlayer/IsoEngine.pas
r245 r290 133 133 OnInitEnemyModel := InitEnemyModelHandler; 134 134 if NoMap <> nil then 135 NoMap.Free;135 FreeAndNil(NoMap); 136 136 NoMap := TIsoMap.Create; 137 137 end; … … 168 168 { prepare dithered ground tiles } 169 169 if LandPatch <> nil then 170 LandPatch.Free;170 FreeAndNil(LandPatch); 171 171 LandPatch := TBitmap.Create; 172 172 LandPatch.PixelFormat := pf24bit; … … 175 175 LandPatch.Canvas.FillRect(0, 0, LandPatch.Width, LandPatch.Height); 176 176 if OceanPatch <> nil then 177 OceanPatch.Free;177 FreeAndNil(OceanPatch); 178 178 OceanPatch := TBitmap.Create; 179 179 OceanPatch.PixelFormat := pf24bit; … … 363 363 DitherMask.Canvas, 0, 0, SRCAND); 364 364 365 LandMore.Free;366 OceanMore.Free;367 DitherMask.Free;365 FreeAndNil(LandMore); 366 FreeAndNil(OceanMore); 367 FreeAndNil(DitherMask); 368 368 369 369 // reduce size of terrain icons … … 418 418 end; 419 419 Mask24.EndUpdate; 420 Mask24.Free;420 FreeAndNil(Mask24); 421 421 422 422 if Borders <> nil then 423 Borders.Free;423 FreeAndNil(Borders); 424 424 Borders := TBitmap.Create; 425 425 Borders.PixelFormat := pf24bit; -
trunk/LocalPlayer/MessgEx.lfm
r232 r290 1 1 object MessgExDlg: TMessgExDlg 2 2 Left = 463 3 Height = 134 3 4 Top = 164 5 Width = 418 4 6 BorderIcons = [] 5 7 BorderStyle = bsNone … … 8 10 ClientWidth = 418 9 11 Color = clBtnFace 10 Font.Charset = DEFAULT_CHARSET12 DesignTimePPI = 144 11 13 Font.Color = clWindowText 12 14 Font.Height = -13 13 15 Font.Name = 'MS Sans Serif' 14 Font.Style = []15 16 FormStyle = fsStayOnTop 16 17 OnClose = FormClose … … 19 20 OnPaint = FormPaint 20 21 OnShow = FormShow 21 PixelsPerInch = 9622 LCLVersion = '2.0.12.0' 22 23 Scaled = False 23 24 object Button1: TButtonA 24 25 Left = 43 26 Height = 25 25 27 Top = 104 26 28 Width = 100 27 Height = 2528 29 Down = False 29 30 Permanent = False 30 31 OnClick = Button1Click 31 Caption = ''32 32 end 33 33 object Button2: TButtonA 34 34 Left = 159 35 Height = 25 35 36 Top = 104 36 37 Width = 100 37 Height = 2538 38 Down = False 39 39 Permanent = False 40 40 OnClick = Button2Click 41 Caption = ''42 41 end 43 42 object Button3: TButtonA 44 43 Left = 275 44 Height = 25 45 45 Top = 104 46 46 Width = 100 47 Height = 2548 47 Down = False 49 48 Permanent = False 50 49 OnClick = Button3Click 51 Caption = ''52 50 end 53 51 object RemoveBtn: TButtonB 54 52 Left = 384 53 Height = 25 55 54 Top = 104 56 55 Width = 25 57 Height = 2558 56 Down = False 59 57 Permanent = False … … 63 61 object EInput: TEdit 64 62 Left = 125 63 Height = 26 65 64 Top = 64 66 65 Width = 168 67 Height = 1968 TabStop = False69 66 BorderStyle = bsNone 70 67 Color = clBlack 71 Font.Charset = DEFAULT_CHARSET72 68 Font.Color = 4176863 73 69 Font.Height = -15 … … 75 71 Font.Style = [fsBold] 76 72 ParentFont = False 73 TabStop = False 77 74 TabOrder = 0 78 75 end -
trunk/LocalPlayer/MessgEx.pas
r245 r290 218 218 end 219 219 else 220 result := inherited ShowModal;220 result := inherited; 221 221 end; 222 222 -
trunk/LocalPlayer/NatStat.pas
r189 r290 98 98 procedure TNatStatDlg.FormDestroy(Sender: TObject); 99 99 begin 100 ReportText.Free;100 FreeAndNil(ReportText); 101 101 FreeMem(SelfReport); 102 Template.Free;103 Back.Free;102 FreeAndNil(Template); 103 FreeAndNil(Back); 104 104 end; 105 105 -
trunk/LocalPlayer/Term.pas
r288 r290 1243 1243 if AILogo[p] <> nil then 1244 1244 begin 1245 AILogo[p].free; 1246 AILogo[p] := nil 1245 FreeAndNil(AILogo[p]); 1247 1246 end 1248 1247 end … … 1253 1252 if not LoadGraphicFile(AILogo[p], HomeDir + Name + '.png', gfNoError) then 1254 1253 begin 1255 AILogo[p].free; 1256 AILogo[p] := nil 1254 FreeAndNil(AILogo[p]); 1257 1255 end 1258 1256 end … … 2497 2495 cReleaseModule: 2498 2496 begin 2499 SmallImp.free;2500 UnusedTribeFiles.free;2501 TribeNames.free;2502 MainMap.free;2497 FreeAndNil(SmallImp); 2498 FreeAndNil(UnusedTribeFiles); 2499 FreeAndNil(TribeNames); 2500 FreeAndNil(MainMap); 2503 2501 IsoEngine.Done; 2504 2502 // AdvisorDlg.DeInit; … … 2698 2696 for p1 := 0 to nPl - 1 do 2699 2697 if Tribe[p1] <> nil then 2700 Tribe[p1].free;2698 FreeAndNil(Tribe[p1]); 2701 2699 Tribes.Done; 2702 2700 RepaintOnResize := false; -
trunk/LocalPlayer/Tribes.pas
r98 r290 90 90 begin 91 91 ReallocMem(PictureList, 0); 92 StdUnitScript.Free;92 FreeAndNil(StdUnitScript); 93 93 end; 94 94 … … 313 313 destructor TTribe.Destroy; 314 314 begin 315 Script.Free;316 inherited Destroy;315 FreeAndNil(Script); 316 inherited; 317 317 end; 318 318 -
trunk/LocalPlayer/UnitStat.pas
r209 r290 88 88 procedure TUnitStatDlg.FormDestroy(Sender: TObject); 89 89 begin 90 Template.Free;91 Back.Free;90 FreeAndNil(Template); 91 FreeAndNil(Back); 92 92 end; 93 93
Note:
See TracChangeset
for help on using the changeset viewer.