Changeset 506 for trunk/LocalPlayer
- Timestamp:
- Dec 25, 2023, 11:35:51 AM (12 months ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Help.pas
r503 r506 462 462 ySrc := (iix div 7 + 1) * ySizeBig; 463 463 PaintPtr := TPixelPointer.Create(OffScreen, ScaleToNative(x0), ScaleToNative(y0)); 464 CoalPtr := TPixelPointer.Create(Templates.Data, ScaleToNative(xCoal), ScaleToNative(yCoal)); 464 CoalPtr := TPixelPointer.Create(Templates.Data, ScaleToNative(xCoal), 465 ScaleToNative(yCoal)); 465 466 for dy := -1 to 1 do 466 467 ImpPtr[dy] := TPixelPointer.Create(BigImp, ScaleToNative(xSrc), ScaleToNative(ySrc)); … … 476 477 for dy := -1 to 1 do begin 477 478 ImpPtr[dy].SetX(xx); 478 if ((Y + ScaleToNative(dy)) shr 1 < 0) or ((Y + ScaleToNative(dy)) shr 1 >= ScaleToNative(ySizeBig)) or 479 ((X + ScaleToNative(dx)) shr 1 < 0) or ((X + ScaleToNative(dx)) shr 1 >= ScaleToNative(xSizeBig)) or 479 if ((Y + ScaleToNative(dy)) shr 1 < 0) or 480 ((Y + ScaleToNative(dy)) shr 1 >= ScaleToNative(ySizeBig)) or 481 ((X + ScaleToNative(dx)) shr 1 < 0) or 482 ((X + ScaleToNative(dx)) shr 1 >= ScaleToNative(xSizeBig)) or 480 483 ((Y + ScaleToNative(dy)) shr 1 < ScaleToNative(nHeaven)) and 481 (ImpPtr[dy].Pixel ^.B shl 16 + ImpPtr[dy].Pixel^.G shl 8 +482 ImpPtr[dy].Pixel ^.R = Heaven[(ScaleFromNative(Y + ScaleToNative(dy))) shr 1]) then484 (ImpPtr[dy].PixelB shl 16 + ImpPtr[dy].PixelG shl 8 + 485 ImpPtr[dy].PixelR = Heaven[(ScaleFromNative(Y + ScaleToNative(dy))) shr 1]) then 483 486 Sum := Sum + 9 * 255 484 487 else 485 Sum := Sum + ImpPtr[dy].Pixel ^.B + 5 * ImpPtr[dy].Pixel^.G + 3 *486 ImpPtr[dy].Pixel ^.R;488 Sum := Sum + ImpPtr[dy].PixelB + 5 * ImpPtr[dy].PixelG + 3 * 489 ImpPtr[dy].PixelR; 487 490 end; 488 491 end; 489 492 if Sum < MaxSum then begin // No saturation 490 Sum := 1 shl 22 - (MaxSum - Sum) * (256 - CoalPtr.Pixel ^.B * 2);491 PaintPtr.Pixel ^.B := Min(PaintPtr.Pixel^.B * Sum shr 22, 255);492 PaintPtr.Pixel ^.G := Min(PaintPtr.Pixel^.G * Sum shr 22, 255);493 PaintPtr.Pixel ^.R := Min(PaintPtr.Pixel^.R * Sum shr 22, 255);493 Sum := 1 shl 22 - (MaxSum - Sum) * (256 - CoalPtr.PixelB * 2); 494 PaintPtr.PixelB := Min(PaintPtr.PixelB * Sum shr 22, 255); 495 PaintPtr.PixelG := Min(PaintPtr.PixelG * Sum shr 22, 255); 496 PaintPtr.PixelR := Min(PaintPtr.PixelR * Sum shr 22, 255); 494 497 end; 495 498 PaintPtr.NextPixel; -
trunk/LocalPlayer/IsoEngine.pas
r486 r506 266 266 for Y := 0 to yyt * 3 - 1 do begin 267 267 MaskLine[Y].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + TSpriteSize[I].Left)); 268 if MaskLine[Y].Pixel ^.B = 0 then Border := False;268 if MaskLine[Y].PixelB = 0 then Border := False; 269 269 end; 270 270 if Border then Inc(TSpriteSize[I].Left); … … 275 275 for X := 0 to xxt * 2 - 1 do begin 276 276 MaskLine[TSpriteSize[I].Top].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + X)); 277 if MaskLine[TSpriteSize[I].Top].Pixel ^.B = 0 then Border := False;277 if MaskLine[TSpriteSize[I].Top].PixelB = 0 then Border := False; 278 278 end; 279 279 if Border then Inc(TSpriteSize[I].Top); … … 284 284 for Y := 0 to yyt * 3 - 1 do begin 285 285 MaskLine[Y].SetX(ScaleToNative(xSrc * (xxt * 2 + 1) + TSpriteSize[I].Right)); 286 if MaskLine[Y].Pixel ^.B = 0 then Border := False;286 if MaskLine[Y].PixelB = 0 then Border := False; 287 287 end; 288 288 if Border then Dec(TSpriteSize[I].Right); … … 293 293 for X := 0 to xxt * 2 - 1 do begin 294 294 MaskLine[TSpriteSize[I].Bottom - 1].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + X)); 295 if MaskLine[TSpriteSize[I].Bottom - 1].Pixel ^.B = 0 then Border := False;295 if MaskLine[TSpriteSize[I].Bottom - 1].PixelB = 0 then Border := False; 296 296 end; 297 297 if Border then Dec(TSpriteSize[I].Bottom); … … 1404 1404 begin 1405 1405 for I := 0 to Length - 1 do begin 1406 Line^.Pixel ^.B := (Line^.Pixel^.B shr 1) and $7F;1407 Line^.Pixel ^.G := (Line^.Pixel^.G shr 1) and $7F;1408 Line^.Pixel ^.R := (Line^.Pixel^.R shr 1) and $7F;1406 Line^.PixelB := (Line^.PixelB shr 1) and $7F; 1407 Line^.PixelG := (Line^.PixelG shr 1) and $7F; 1408 Line^.PixelR := (Line^.PixelR shr 1) and $7F; 1409 1409 Line^.NextPixel; 1410 1410 end; -
trunk/LocalPlayer/MessgEx.pas
r505 r506 267 267 (yDst + dy < hScrewed) then begin 268 268 Screwed[xDst + dx, yDst + dy, 0] := Screwed[xDst + dx, yDst + dy, 0] 269 + Share * SrcPtr.Pixel ^.B;269 + Share * SrcPtr.PixelB; 270 270 Screwed[xDst + dx, yDst + dy, 1] := Screwed[xDst + dx, yDst + dy, 1] 271 + Share * SrcPtr.Pixel ^.G;271 + Share * SrcPtr.PixelG; 272 272 Screwed[xDst + dx, yDst + dy, 2] := Screwed[xDst + dx, yDst + dy, 2] 273 + Share * SrcPtr.Pixel ^.R;273 + Share * SrcPtr.PixelR; 274 274 Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy, 275 275 3] + Share; -
trunk/LocalPlayer/PVSB.pas
r504 r506 189 189 ScrollBar.OnChange := ScrollBarChanged; 190 190 ScrollBar.Parent := Parent; 191 ScrollBar.Width := 24;191 ScrollBar.Width := 16; 192 192 end; 193 193 -
trunk/LocalPlayer/Wonders.pas
r490 r506 122 122 ((ax < amax1 * X) or (ax > amin3 * X))) then begin 123 123 for ch := 0 to 2 do begin 124 C := Line[0].Pixel ^.Planes[ch] - Darken;125 if C < 0 then Line[0].Pixel ^.Planes[ch] := 0126 else Line[0].Pixel ^.Planes[ch] := C;127 C := Line[1].Pixel ^.Planes[ch] - Darken;128 if C < 0 then Line[1].Pixel ^.Planes[ch] := 0129 else Line[1].Pixel ^.Planes[ch] := C;130 C := Line[2].Pixel ^.Planes[ch] - Darken;131 if C < 0 then Line[2].Pixel ^.Planes[ch] := 0132 else Line[2].Pixel ^.Planes[ch] := C;133 C := Line[3].Pixel ^.Planes[ch] - Darken;134 if C < 0 then Line[3].Pixel ^.Planes[ch] := 0135 else Line[3].Pixel ^.Planes[ch] := C;124 C := Line[0].PixelPlane[ch] - Darken; 125 if C < 0 then Line[0].PixelPlane[ch] := 0 126 else Line[0].PixelPlane[ch] := C; 127 C := Line[1].PixelPlane[ch] - Darken; 128 if C < 0 then Line[1].PixelPlane[ch] := 0 129 else Line[1].PixelPlane[ch] := C; 130 C := Line[2].PixelPlane[ch] - Darken; 131 if C < 0 then Line[2].PixelPlane[ch] := 0 132 else Line[2].PixelPlane[ch] := C; 133 C := Line[3].PixelPlane[ch] - Darken; 134 if C < 0 then Line[3].PixelPlane[ch] := 0 135 else Line[3].PixelPlane[ch] := C; 136 136 end; 137 137 end; … … 163 163 for Y := 0 to ScaleToNative(ySizeBig) - 1 do begin 164 164 for X := 0 to ScaleToNative(xSizeBig) - 1 do begin 165 Darken := ((255 - Src.Pixel ^.B) * 3 + (255 - Src.Pixel^.G) *166 15 + (255 - Src.Pixel ^.R) * 9) div 128;165 Darken := ((255 - Src.PixelB) * 3 + (255 - Src.PixelG) * 166 15 + (255 - Src.PixelR) * 9) div 128; 167 167 for ch := 0 to 2 do begin 168 C := Dst.Pixel ^.Planes[ch] - Darken;169 if C < 0 then Dst.Pixel ^.Planes[ch] := 0170 else Dst.Pixel ^.Planes[ch] := C;168 C := Dst.PixelPlane[ch] - Darken; 169 if C < 0 then Dst.PixelPlane[ch] := 0 170 else Dst.PixelPlane[ch] := C; 171 171 end; 172 172 Src.NextPixel;
Note:
See TracChangeset
for help on using the changeset viewer.