Changeset 245 for trunk/LocalPlayer/MessgEx.pas
- Timestamp:
- May 21, 2020, 7:58:42 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/MessgEx.pas
r227 r245 237 237 Screwed: array [0 .. wScrewed - 1, 0 .. hScrewed - 1, 0 .. 3] of single; 238 238 SrcPtr: TPixelPointer; 239 begin 239 Width: Integer; 240 Height: Integer; 241 begin 242 Width := 56; 243 Height := 40; 240 244 if IconIndex >= 0 then begin 241 245 xIcon := IconIndex mod 7 * xSizeBig; 242 246 yIcon := (IconIndex + SystemIconLines * 7) div 7 * ySizeBig; 243 247 // prepare screwed icon 244 fillchar(Screwed, sizeof(Screwed), 0);248 FillChar(Screwed, sizeof(Screwed), 0); 245 249 BigImp.BeginUpdate; 246 for iy := 0 to 39 do begin247 for ix := 0 to 55do begin248 SrcPtr := PixelPointer(BigImp, ix + xIcon, iy + yIcon);249 xR := ix * (37 + iy * 5 / 40) / 56;250 SrcPtr := PixelPointer(BigImp, ScaleToNative(xIcon), ScaleToNative(yIcon)); 251 for iy := 0 to ScaleToNative(Height) - 1 do begin 252 for ix := 0 to ScaleToNative(Width) - 1 do begin 253 xR := ScaleFromNative(ix) * (37 + ScaleFromNative(iy) * 5 / Height) / Width; 250 254 xDst := Trunc(xR); 251 255 xR := Frac(xR); 252 x1 := (120 - ix) * (120 - ix) - 10000;253 yR := iy * 18 / 40+ x1 * x1 / 4000000;256 x1 := (120 - ScaleFromNative(ix)) * (120 - ScaleFromNative(ix)) - 10000; 257 yR := ScaleFromNative(iy) * 18 / Height + x1 * x1 / 4000000; 254 258 yDst := Trunc(yR); 255 259 yR := Frac(yR); … … 272 276 Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy, 273 277 3] + share; 274 end; 275 end; 278 end; 279 SrcPtr.NextPixel; 280 end; 281 SrcPtr.NextLine; 276 282 end; 277 283 BigImp.EndUpdate;
Note:
See TracChangeset
for help on using the changeset viewer.