Changeset 465 for branches/highdpi/MiniMap.pas
- Timestamp:
- Nov 30, 2023, 10:16:14 PM (12 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/MiniMap.pas
r464 r465 1 1 {$INCLUDE Switches.inc} 2 unit UMiniMap;2 unit MiniMap; 3 3 4 4 interface … … 37 37 38 38 uses 39 ScreenTools, UPixelPointer, Global, GameServer, IsoEngine, Tribes;39 ScreenTools, PixelPointer, Global, GameServer, IsoEngine, Tribes; 40 40 41 41 const … … 162 162 procedure TMiniMap.PaintRandom(Brightness, StartLandMass: Integer; WorldSize: TPoint); 163 163 var 164 i, x, y, xm, cm: Integer; 164 i, x, y, xm: Integer; 165 cm: Int64; 165 166 MiniPixel: TPixelPointer; 166 167 Map: ^TTileList; … … 172 173 Bitmap.SetSize(Size.X * 2, Size.Y); 173 174 Bitmap.BeginUpdate; 174 MiniPixel := PixelPointer(Bitmap);175 MiniPixel := TPixelPointer.Create(Bitmap); 175 176 for y := 0 to ScaleToNative(Size.Y) - 1 do begin 176 177 for x := 0 to ScaleToNative(Size.X) - 1 do begin … … 193 194 procedure TMiniMap.PaintFile(SaveMap: TMapArray); 194 195 var 195 i, x, y, xm, cm, Tile, OwnColor, EnemyColor: integer; 196 cm: Int64; 197 i, x, y, xm, Tile, OwnColor, EnemyColor: integer; 196 198 MiniPixel: TPixelPointer; 197 199 PrevMiniPixel: TPixelPointer; … … 203 205 if Mode = mmPicture then begin 204 206 Bitmap.BeginUpdate; 205 MiniPixel := PixelPointer(Bitmap);206 PrevMiniPixel := PixelPointer(Bitmap, 0, -1);207 MiniPixel := TPixelPointer.Create(Bitmap); 208 PrevMiniPixel := TPixelPointer.Create(Bitmap, 0, -1); 207 209 for y := 0 to ScaleToNative(Size.Y) - 1 do begin 208 210 for x := 0 to ScaleToNative(Size.X) - 1 do begin … … 211 213 MiniPixel.SetX(xm); 212 214 Tile := SaveMap[ScaleFromNative(x) + Size.X * ScaleFromNative(y)]; 215 if Tile > 11 then Tile := fUnknown; 213 216 if Tile and fTerrain = fUNKNOWN then 214 217 cm := $000000 … … 264 267 Bitmap.SetSize(Size.X * 2, Size.Y); 265 268 Bitmap.BeginUpdate; 266 MiniPixel := PixelPointer(Bitmap);267 PrevMiniPixel := PixelPointer(Bitmap, 0, -1);269 MiniPixel := TPixelPointer.Create(Bitmap); 270 PrevMiniPixel := TPixelPointer.Create(Bitmap, 0, -1); 268 271 for y := 0 to ScaleToNative(Size.Y) - 1 do begin 269 272 for x := 0 to ScaleToNative(Size.X) - 1 do begin … … 328 331 end; 329 332 330 331 333 end. 332 334 335 336
Note:
See TracChangeset
for help on using the changeset viewer.