BitBlt Help

Hazard
11-07-2003, 06:22 PM
I have two things which i'm looking for help on. I'm bitblt'ing images of boats (for a battleship game) into a picture box. I have no problem with this, its fairly easy. The thing i'm looking for is a way to rotate the images, because as you may know boats can go either horizontally or vertically in battleship. Secondly I'm looking for a way to piece together a few images into one at run time. I'm looking to have an image for the bow, stern and middle of the boat. If I'm able to piece them together I could have boats anywhere from 2 units to infinity in length, which is what I'm looking for.

If anyone has a link to a tutorial or information on what I'd need to do this it'd be appreciated.

Hazard
11-07-2003, 08:18 PM
err, scrap the second part, I figured out how to do it... just drawing the images peice by peice works nicely. Still, anyone have a clue how to rotate images?

BillSoo
11-07-2003, 08:55 PM
Inverting 180 degrees is easy. Just use negative numbers for height and width when bitblt'ing.

Rotating 90 degrees is a bit harder. I would just use a second set of icons for that....

If you need to create that rotated icon in the first place, I have some rotation code in the code library that will work. I would suggest rotating the image, then save it, then use only the saved images in your game.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum