🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Rotate bitmap with directdraw

Started by
13 comments, last by GameDev.net 24 years, 6 months ago
This isn't going to be a precise answer - because I don't have that. But this might provide some direction.

What you want to do, is while loading the bitmap, create the surface to be able to hold the image, and all the rotated images. So if you want a 10x10 bitmap with 8 directions, create an 80x10 surface. Then when you are loading it, do the rotation algorithm at that time, not during run time.

You could probably use the PlgBlt to do it, I'm not sure how effective it is, but I bet you do not want to be using it at runtime. Or you can build your own rotation routines to handle it. Either way, do it during load, and not during the blt.

Advertisement
Ok... so let´s say that I wan´t to use d3d just for rotation.... is that very difficult to learn? I have never used d3d myself so I don´t have a clue. I woud apriciate if someone coud show me.

If your looking for something simple, I think that using the D3DX interface that comes with DirectX 7 is pretty simple to learn. You can easily handle rotation, scaling, alpha channles, textures, video mode and many other things with it. Using the D3D Texture Tool, you can also use the alpha mask to do color keying. So if your looking for a simple way to implement it I think that D3DX is the way to go.

[This message has been edited by Ranok (edited December 07, 1999).]

---Ranok---
Does anyone have an idea about howto rotate a bitmap? Am I supose to make a pixel array and rotate that?? or can I make a parallelogram instead of a rectangle before I blit? or can I rotate the surface?
how???

Please help.

k. thanks for all help. Does anyone know where I can find a good and simple D3DX-tuturial wich is easy to understand.

This topic is closed to new replies.

Advertisement