errrr, let's begin at the start... From a point on a line and a normal vector to it (a perpendicular vector), you can make an equation that's the line itself. I do not know the exact formula right now, and I'm kindof lazy to dig it up as I'm going in 10, but you can just prolly google it with something like... "line's equation formula" or something... You then get the equation for 2 lines. You can for example count the X (with a Y variable) from one of the equations, put it into the second, where you can then get the Y value. And then the X from using the Y's value you got. The X; Y you have is the intersection point of the two lines. From there, you can guess all.
In UnDelphiX, the hardware mode cannot process the transparent colour setting of an image, so instead it uses the upper-left corner by default, and it does so on ANY surface! Even if you've drawn it, not loaded it as a bitmap. As your Surface is 1 colour only, it's totally transparent. To draw it non-transparently, Draw(0, 0, Surfacename, !!!FALSE!!!); Voila, it's working well!
Lastly... If you wish to organize your pictures as so, I'd recommend you storing images in your own classes in your own structures in TDirectDrawSurface objects. Loading them from files or resources runtime when your program loads. (There, you can optimize memory usage too, by loading the only needed pictures) I'm using this method, and it's working juuuuuust nicely. Also, for a game, I think it's probably best if you do not put your images into the EXE file as resources, just leave them outside the program as whatever format (but prolly one that packs well) and loading them runtime. Phisically you can organize images into directorys, and logically into classes, it's cool ^^. One last thing you can do is put animations into ONE picture file that will contain x frames of the animation, and it'll just draw the picture cutting the correct frame out (this is probably a better solution in storage-space too). If you happen to use this method, note that in hardware, UnDelphiX will somehow fail to draw images longer in width than 2048 pixels when you cut a subpart out of it. Haven't tried on the height tho!
Bookmarks