-
Ok. I have my directX surfaces, I can write my text and draw my circles and so on, but heres what I need to know: HOW DO I LOAD 10000+ BITMAPS INTO DIRECTDRAW, AND BLIT ONE ON COMMAND? I need to simply be able to load LOTS of bitmaps, regardless of size (though they can be arranged in groups of same-size bitmaps, and are all average 50x50x16), and then be able to just blit any one to a directdraw surface whenever I want.
ANOTHER THING I NEED IS PIXEL GETTING AND SETTING! How can I go through the pixels in my surface and if some of them are a certain color replace them?
So there you go. I've looked, but NOWHERE do they go beyond simple making a surface. And no, I don't have a good enough connection to d/l the sdk. So there. THANK YOU IF YOU CAN FIND THAT!
-
you may want to post this in the Games / Graphics programming area.
The experts on this topic are more likely to look there
-
Yo man
Ok, I know you weren't nice to the other people, but hey, I'm gonna answer anyway:
Go to http://www.planet-source-code.com , then look for the Visual Basic section, and make a search on DX Plug. It's an excellent submission with many stuff for game developers, but somehow didn't get many votes :(
It doesn't have the Get/SetPixel functions for surfaces. If you ever manage to do that, please e-mail, I've been looking for them for ages!
Bye,
-Jotaf98
[email protected] - ICQ#60784495 - http://jotaf98.cjb.net
-
I haven't used DirectX for quite a while, but I think I remember.
To set a pixel's color:
Code:
ddsMySurface.Lock
For Y = 1 To MaxY
For X = 1 To MaxX
lngCurColor = ddsMySurface.GetLockedPixel(X, Y)
If lngCurColor = TheColorYouWantToReplace Then
ddsMySurface.SetLockedPixel X, Y, TheColorYouWantToReplaceWith
End If
Next X
Next Y
ddsMySurface.Unlock
[Edited by Sc0rp on 10-03-2000 at 11:33 AM]
-
Thanks!
I think I'm gonna make a .bas file with a Blt function that uses translucency in two ways: addition (explosions/special effects that ADD ON TO EACH OTHER) and alpha blending (the translucency you're used to).
After all, I've done it before with Set/GetPixel (in Planet Source Code, look for Translucency and Light Effects) :)
-
CRAP I can't beleive I forgot to post in games/graphics prog!
Oh and THANK YOU FOR THE PIXELSETTING!