Changeset 212 for branches/highdpi/LocalPlayer/Term.pas
- Timestamp:
- May 9, 2020, 9:35:25 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/Term.pas
r210 r212 532 532 SmallScreen, GameOK, MapValid, skipped, idle: boolean; 533 533 534 SaveOption: array [0 ..nSaveOption - 1] of integer;535 MiniColors: array [0 .. 11, 0 ..1] of TColor;534 SaveOption: array [0..nSaveOption - 1] of integer; 535 MiniColors: array [0..fTerrain, 0..1] of TColor; 536 536 MainMap: TIsoMap; 537 537 CurrentMoveInfo: record AfterMovePaintRadius, AfterAttackExpeller: integer; … … 4077 4077 MiniPixel := PixelPointer(Mini); 4078 4078 PrevMiniPixel := PixelPointer(Mini); 4079 for y := 0 to G.ly- 1 do4080 begin 4081 for x := 0 to G.lx- 1 do4082 if MyMap[ x + G.lx * y] and fTerrain <> fUNKNOWN then4083 begin 4084 Loc := x + G.lx * y;4079 for y := 0 to ScaleToVcl(G.ly) - 1 do 4080 begin 4081 for x := 0 to ScaleToVcl(G.lx) - 1 do 4082 if MyMap[ScaleFromVcl(x) + G.lx * ScaleFromVcl(y)] and fTerrain <> fUNKNOWN then 4083 begin 4084 Loc := ScaleFromVcl(x) + G.lx * ScaleFromVcl(y); 4085 4085 for i := 0 to 1 do 4086 4086 begin 4087 xm := ((x - xwMini) * 2 + i + y and 1 - hw + G.lx * 5) mod (G.lx * 2); 4087 xm := ((x - ScaleToVcl(xwMini)) * 2 + i + y and 1 - ScaleToVcl(hw) + 4088 ScaleToVcl(G.lx) * 5) mod (ScaleToVcl(G.lx) * 2); 4088 4089 MiniPixel.SetXY(xm, y); 4089 4090 cm := MiniColors[MyMap[Loc] and fTerrain, i]; … … 5079 5080 dx := 0; 5080 5081 dy := 0; 5081 if Mouse.CursorPos.y < DpiScreen.height - PanelHeight then5082 if Mouse.CursorPos.x = 0 then5082 if DpiMouse.CursorPos.y < DpiScreen.height - PanelHeight then 5083 if DpiMouse.CursorPos.x = 0 then 5083 5084 dx := -speed // scroll left 5084 else if Mouse.CursorPos.x = DpiScreen.width - 1 then5085 else if DpiMouse.CursorPos.x = DpiScreen.width - 1 then 5085 5086 dx := speed; // scroll right 5086 if Mouse.CursorPos.y = 0 then5087 if DpiMouse.CursorPos.y = 0 then 5087 5088 dy := -speed // scroll up 5088 else if ( Mouse.CursorPos.y = DpiScreen.height - 1) and5089 ( Mouse.CursorPos.x >= TerrainBtn.Left + TerrainBtn.width) and5090 ( Mouse.CursorPos.x < xRightPanel + 10 - 8) then5089 else if (DpiMouse.CursorPos.y = DpiScreen.height - 1) and 5090 (DpiMouse.CursorPos.x >= TerrainBtn.Left + TerrainBtn.width) and 5091 (DpiMouse.CursorPos.x < xRightPanel + 10 - 8) then 5091 5092 dy := speed; // scroll down 5092 5093 if (dx <> 0) or (dy <> 0) then
Note:
See TracChangeset
for help on using the changeset viewer.