Skip to main content
GameDev.net gamedev.net
🔒 Locked

DX Slideshow bug...?

Started by sathenzar Nov 24, 2004 at 2:51 PM 0 replies 250+ views
Original Post
sathenzar
sathenzar
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.