Right on! Thanks, I understand the effect much better now.

However it seems that JEDI-SDL's sdlutils.pas is somewhat ill equiped to do the full effect.

There is a SDL_AddSurface(); function, but it seems that it does not scale, rotate nor allow you to alpha in or out either.

There are functions to rotate, scale and alpha, but they all appear to be seperate save for my own little addition in 'sdlutils.pas' that should show up in the final 1.0 release. But it only does rotation and alpha. :?

Anyone think they could help me add 'ADD' and 'scale' to it?

[pascal]procedure SDL_RotateDeg_Alpha(DstSurface, SrcSurface: PSDL_Surface; SrcRect: PSDL_Rect;
DestX, DestY, OffsetX, OffsetY: Integer; Angle: Integer;
Alpha: UInt;
var
aSin, aCos: Single;
MX, MY, DX, DY, NX, NY, SX, SY, OX, OY, Width, Height, TX, TY, RX, RY, ROX, ROY: Integer;
SrcColor, DstColor: UInt32;
srcRR, srcGG, srcBB, dstRR, dstGG, dstBB: UInt8;
TempTransparentColour: UInt32;
MAXX, MAXY: Integer;
begin
// Rotate the surface to the target surface.
TempTransparentColour := SrcSurface.format.colorkey;

maxx := DstSurface.w;
maxy := DstSurface.h;
aCos := degCOS[Angle];
aSin := degSIN[Angle];

Width := round(abs(srcrect.h * acos) + abs(srcrect.w * asin));
Height := round(abs(srcrect.h * asin) + abs(srcrect.w * acos));

OX := Width shr 1;
OY := Height shr 1;
MX := (srcRect.x + (srcRect.x + srcRect.w)) shr 1;
MY := (srcRect.y + (srcRect.y + srcRect.h)) shr 1;
ROX := (-(srcRect.w shr 1)) + Offsetx;
ROY := (-(srcRect.h shr 1)) + OffsetY;
Tx := ox + round(ROX * aSin - ROY * aCos);
Ty := oy + round(ROY * aSin + ROX * aCos);
SX := 0;
for DX := DestX - TX to DestX - TX + (width) do
begin
inc(SX);
SY := 0;
for DY := DestY - TY to DestY - TY + (Height) do
begin
if ((DX > 0) and (DX < MAXX)) and
((DY > 0) and (DY < MAXY)) then
begin
RX := SX - OX;
RY := SY - OY;
NX := mx + Round(RX * aSin + RY * aCos); //
NY := my + Round(RY * aSin - RX * aCos); //

if (NX >= srcRect.x) and (NX <= srcRect.x + srcRect.w) then
begin
if (NY >= srcRect.y) and (NY <= srcRect.y + srcRect.h) then
begin
SrcColor := SDL_GetPixel(SrcSurface, NX, NY);
if (SrcColor <> TempTransparentColour) then
begin
SDL_GetRGB(SrcColor, SrcSurface.format, @srcRR, @srcGG, @srcBB);

DstColor := SDL_GetPixel(DstSurface, DX, DY);
SDL_GetRGB(DstColor, DstSurface.format, @dstRR, @dstGG, @dstBB);

SDL_PutPixel(DstSurface, DX, DY,
SDL_MapRGB(DstSurface.format,
(Alpha * (srcRR - dstRR)) shr 8 + dstRR,
(Alpha * (srcGG - dstGG)) shr 8 + dstGG,
(Alpha * (srcBB - dstBB)) shr 8 + dstBB));
end;
end;
end;
end;
inc(SY);
end;
end;
end;[/pascal]