Sign in to follow this  
sathenzar

DX Slideshow bug...?

Recommended Posts

sathenzar    100
Hey, I was just trying to create a simple slide show with DirectX 9 but it's not turning out the way I want it to. I want it so every 2 seconds it changes the picture. Well it's just sitting on the first picture and not loading the next set of pictures. Here's my set of code:
int time = GetTickCount();
if(time <= 2000)
	{
		bkgrd = LoadImg("background2.bmp");
	}
	if(time >= 4000)
	{
		ZeroMemory(&bkgrd, sizeof(bkgrd));
		if(time <= 8000)
		{
			bkgrd = LoadImg("rays7.jpg");
		}
	}
	if(time >= 8001)
	{
		bkgrd = LoadImg("background2.bmp");
	}
Why is it not switching over to rays7.jpg? I've test loaded them all before I tried timing them to load and they worked fine. So I'm assuming it's with my timing code. But is the problem? Thanks in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this