Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Game Programming > BitBlt Help


Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2003, 06:22 PM
Hazard Hazard is offline
Freshman
 
Join Date: Jan 2003
Posts: 25
Default BitBlt Help


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.
Reply With Quote
  #2  
Old 11-07-2003, 08:18 PM
Hazard Hazard is offline
Freshman
 
Join Date: Jan 2003
Posts: 25
Default

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?
Reply With Quote
  #3  
Old 11-07-2003, 08:55 PM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

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.
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SetPixel, GetPixel, and BltBit Overflow Dildan2004 API 1 03-28-2003 04:21 AM
BltBit Mask & another question Kaluriel General 0 10-26-2002 07:27 PM
few bltbit questions andreww Game Programming 2 04-29-2002 11:07 AM
how much faster would bltbit be then paint picture? andreww Game Programming 3 04-29-2002 11:02 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->