Heya Speeeder, thanks for the reply.

I downloaded the latest version of unDelphiX a few days ago (1.07), I think surfaces were working in the previous version I had (Possibly 1.0.5). I'll have a look at your code changes and see if they help.

I reproduced the problem in the Prototype project in the main 'Dx' folder of unDelphiX:

I load an image into a TDXImageList:

Code:
Var
    IL1 : TDXImageList;

...

IL1 := TDXImageList.Create(Self);
IL1.DXDraw := DXDraw;
IL1.Items.Add;
IL1.Items[0].Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+'/Tmp/Stars1a.bmp');
I create a surface:

Code:
procedure TForm1.DXDrawInitialize(Sender: TObject);
begin
  Dxtimer.Enabled := true;
  Surface := TDirectDrawSurface.Create(DXDraw.DDraw);
  Surface.SetSize(255,255);
end;
Then render in the main loop:

Code:
Surface.Fill($00FFFFFF);
Surface.Draw(Tmp,100,IL1.Items[0].PatternSurfaces[0]);

DXDraw.Surface.Draw(0,100,Surface);

// Using this doesn't work at all in hardware:
// IL1.Items[0].Draw(Surface,Tmp,100,0);


The Tmp variable is a byte incrementing from 0..255

If you run the project, the surface will render perfectly in software mode, and you'll see an image moving across it. If you press space to switch to hardware mode, the surface stops rendering.

So, it could be the way I'm using surfaces, it could be that the prototype project is wrong, or it could be those changes you mentioned.

At present, I'm implementing checking for mouse overs on game sprites. I'm already using square bounding boxes to limit the number of graphics I need to check against.

I calculate the relative position of the mouse and graphic, then render the graphic to a surface. I then check a single pixel on the surface to determine if there's a collission (I.e. Tip of mouse is on graphic). However, accessing the Pixels property seems to kill performance. I need to have pixel accurate detection though, is there a better way to access the pixels on a surface?

By the way, when you talk about hitboxes, do you mean rotated bounding boxes to check for collissions? (Not sure how to do those, but it would be nice to know...)

P.S. More correctly, cos=sin(x+PI/2), since most math functions work on radians. I suspect degree's were invented by school teachers.