Changeset 330 for trunk/LocalPlayer/Enhance.pas
- Timestamp:
- Mar 26, 2021, 2:16:04 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Enhance.pas
r313 r330 7 7 ScreenTools, BaseWin, Protocol, ClientTools, Term, LCLIntf, LCLType, 8 8 9 SysUtils, Classes, Graphics, Controls, Forms, 9 SysUtils, Classes, Graphics, Controls, Forms, IsoEngine, 10 10 ButtonB, ButtonC, Menus; 11 11 … … 28 28 Popup: TPopupMenu; 29 29 procedure FormCreate(Sender: TObject); 30 procedure FormDestroy(Sender: TObject); 30 31 procedure FormPaint(Sender: TObject); 31 32 procedure FormShow(Sender: TObject); … … 35 36 procedure JobClick(Sender: TObject); 36 37 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 38 private 39 NoMap: TIsoMap; 37 40 public 38 41 procedure ShowNewContent(NewMode: integer; TerrType: integer = -1); … … 47 50 implementation 48 51 49 uses Help; 52 uses 53 Help; 50 54 51 55 {$R *.lfm} … … 57 61 begin 58 62 inherited; 63 NoMap := TIsoMap.Create; 59 64 CaptionRight := CloseBtn.Left; 60 65 CaptionLeft := ToggleBtn.Left + ToggleBtn.Width; … … 85 90 end; 86 91 92 procedure TEnhanceDlg.FormDestroy(Sender: TObject); 93 begin 94 FreeAndNil(NoMap); 95 end; 96 87 97 procedure TEnhanceDlg.FormPaint(Sender: TObject); 88 98 var … … 129 139 while (EndStage < 5) and (MyData.EnhancementJobs[Page, EndStage] <> jNone) do 130 140 inc(EndStage); 131 x := InnerWidth div 2 - xxt - (xxt + 3) * EndStage; 141 with NoMap do 142 x := InnerWidth div 2 - xxt - (xxt + 3) * EndStage; 132 143 133 144 TerrType := Page; … … 185 196 end; 186 197 187 if TerrType < fForest then 188 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 189 1 + TerrType * (xxt * 2 + 1), 1 + yyt) 190 else 191 begin 192 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 193 1 + 2 * (xxt * 2 + 1), 1 + yyt + 2 * (yyt * 3 + 1)); 194 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 195 1 + 7 * (xxt * 2 + 1), 1 + yyt + 2 * (2 + TerrType - fForest) * 196 (yyt * 3 + 1)); 197 end; 198 if TileImp and fTerImp = tiFarm then 199 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 200 1 + (xxt * 2 + 1), 1 + yyt + 12 * (yyt * 3 + 1)) 201 else if TileImp and fTerImp = tiIrrigation then 202 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 1, 203 1 + yyt + 12 * (yyt * 3 + 1)); 204 if TileImp and fRR <> 0 then 205 begin 206 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 207 1 + 6 * (xxt * 2 + 1), 1 + yyt + 10 * (yyt * 3 + 1)); 208 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 209 1 + 2 * (xxt * 2 + 1), 1 + yyt + 10 * (yyt * 3 + 1)); 210 end 211 else if TileImp and fRoad <> 0 then 212 begin 213 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 214 1 + 6 * (xxt * 2 + 1), 1 + yyt + 9 * (yyt * 3 + 1)); 215 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 216 1 + 2 * (xxt * 2 + 1), 1 + yyt + 9 * (yyt * 3 + 1)); 217 end; 218 if TileImp and fTerImp = tiMine then 219 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 220 1 + 2 * (xxt * 2 + 1), 1 + yyt + 12 * (yyt * 3 + 1)); 221 inc(x, xxt * 2 + 6) 198 with NoMap do begin 199 if TerrType < fForest then 200 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 201 1 + TerrType * (xxt * 2 + 1), 1 + yyt) 202 else 203 begin 204 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 205 1 + 2 * (xxt * 2 + 1), 1 + yyt + 2 * (yyt * 3 + 1)); 206 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 207 1 + 7 * (xxt * 2 + 1), 1 + yyt + 2 * (2 + TerrType - fForest) * 208 (yyt * 3 + 1)); 209 end; 210 if TileImp and fTerImp = tiFarm then 211 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 212 1 + (xxt * 2 + 1), 1 + yyt + 12 * (yyt * 3 + 1)) 213 else if TileImp and fTerImp = tiIrrigation then 214 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 1, 215 1 + yyt + 12 * (yyt * 3 + 1)); 216 if TileImp and fRR <> 0 then 217 begin 218 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 219 1 + 6 * (xxt * 2 + 1), 1 + yyt + 10 * (yyt * 3 + 1)); 220 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 221 1 + 2 * (xxt * 2 + 1), 1 + yyt + 10 * (yyt * 3 + 1)); 222 end 223 else if TileImp and fRoad <> 0 then 224 begin 225 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 226 1 + 6 * (xxt * 2 + 1), 1 + yyt + 9 * (yyt * 3 + 1)); 227 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 228 1 + 2 * (xxt * 2 + 1), 1 + yyt + 9 * (yyt * 3 + 1)); 229 end; 230 if TileImp and fTerImp = tiMine then 231 Sprite(offscreen, HGrTerrain, x, 64 - yyt, xxt * 2, yyt * 2, 232 1 + 2 * (xxt * 2 + 1), 1 + yyt + 12 * (yyt * 3 + 1)); 233 inc(x, xxt * 2 + 6) 234 end; 222 235 end; 223 236
Note:
See TracChangeset
for help on using the changeset viewer.