OK, so I'm lazy and cant be bothered searching for a tutorial.
I need to know how to set up a clipper to cover the whole of a screen so that sprites leaving the screen dont just disappear but leave the screen bit by bit.
Can anyone post an example or put a link to a decent example or tutorial on the net, please.
I have managed to get a clipper working sort of now, but I have my program in exclusive mode and the clipper needs a hWnd to attach to, giving it the form's hWnd causes the title bar to flicker at the top of the screen - not what I want. I need to get a clipper in exclusive (full screen) mode.
If your not in fullscreen and you dont need multiple of them then they are really quite easy to use:
First declare the clipper:
Code:
Public ddc As DirectDrawClipper
Now set up the clipper and attach it to the surface:
Code:
'Set up the clipper
Set ddc = dd.CreateClipper(0)
ddc.SetHWnd frmMain.hWnd
'Attach the clipper to the surface
DirectDrawSurf.SetClipper ddcScreen
Are you looking for a scrolling background or something. I've got an example, but it's too big to post.
So you have to do this to make it work. Make 3 .jpg pictures (640*480) and name them “surface0.jpg”, “surface1.jpg”, and “surface2.jpg”. Put them in the same directory ass the VB files I have attached.
...:::Circle:::... You will always come back to the start.