Howdie fellows
I'm trying to load a bitmap and fading it.
The function looks like this:
{
dbLoadBitmap ( "flannel.jpg", 1 );
dbSetCurrentBitmap ( 1 );
int a = 0;
while ( a <= 100 )
{
dbFadeBitmap ( 1, a );
dbGetImage ( 1, 0, 0, 800, 600 );
dbPasteImage ( 1, 0, 0 );
a = a + 2;
dbSync();
}
dbWaitKey ();
while ( a >= 0 )
{
dbFadeBitmap ( 1, a );
a = a - 2;
dbSync();
}
return;
}
As you see, there are while loops there, the second one is the original code for both loops, the first was the changes I've tried after reading a bit on the forums.
What I'm trying to achieve is a simple fade in fade out for the start of the game, but it simply freezes and I have to bring it down in Task Manager.
This function is called at game start, right after loading some media that is not important. I set no camera before this point, don't know it if matters, but I'll try it in the meantime. I think that I'm missing something here, but I don't know what exactly.
Thank you for your help
V
I'm pretty sure I know everything. Doubts are something rare in me and I am never wrong, as this signature can prove.