if((animstate == SPRITE_ANIM_STATE_RUNNING) && (type == SPRITE_MULTI_FRAME))
{
if( multiframes[framepointer].isLoaded )
{
Graphics::GPDrawBitmap(multiframes[framepointer],x,y,multiframes[framepointer].width,multiframes[framepointer].heigth);
//Sleep(1000);
framepointer++;
}
else
if( runtype > 0 )
{
framepointer = 0;
runtype--;
return(true);
}
else
if( runtype == 0 )
{
framepointer = 0;
animstate = SPRITE_ANIM_STATE_DONE;
return(true);
}
else
if( runtype < 0 )
{
framepointer = 0;
return(true);
}
else
{
framepointer = 0;
return(true);
}
HOW CAN THE CODE EXECUTE AT THIS POINT ???????
THE SLEEP COMMAND SHOULDNT BE EXECUTED !!!!!!!
SO WHY ???!?!?!
Sleep(1000);
//
}
If / else Question
Hi,
I've got a little question to you guys out there... :
thanks for any suggestions
_amigo
[edited by - Amigo on June 11, 2002 8:34:47 PM]
Please, in the future use the code-tag. Read the faq if you have questions about it. It makes reading the code SOOOOOOOO much easier and you'll probably get more replies
A year spent in artificial intelligence is enough to make one believe in God.
[edited by - rohde on June 11, 2002 8:27:28 PM]
A year spent in artificial intelligence is enough to make one believe in God.
[edited by - rohde on June 11, 2002 8:27:28 PM]
"We confess our little faults to persuade people that we have no large ones." -Francois de La Rochefoucauld (1613 - 1680). | My blog
quote: if( multiframes[framepointer].isLoaded )
I'm not exactly sure what's going on, but if it hits this it will skip all of the else statements and reach the sleep at the bottom.
In fact, that function couldn't work at all. You don't have a return statement at the end in case the above happens.
EDIT: (bloody source tag screwing up the formatting.
Perhaps you want to take out the first else you use after that if statements.
------------
aud.vze.com - The Audacious Engine <-- It's not much, yet. But it's mine... my own... my preciousssss...
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
[edited by - LockePick on June 11, 2002 8:37:00 PM]
[edited by - LockePick on June 11, 2002 8:37:38 PM]
[edited by - LockePick on June 11, 2002 8:38:38 PM]
_______________________________________Pixelante Game Studios - Fowl Language
Thank you,
I now see the problem ... ive put a additional return(true) in the first if statement and then the sleep() cannot be executed anymore. Unfortunately my problem isnt solved trough this ... :-( but i''ll better post it later again in the directX forum.
Going to bet now ... its 2:30 am now.. cant stand seeing any more code 8-)
bye
_amigo
I now see the problem ... ive put a additional return(true) in the first if statement and then the sleep() cannot be executed anymore. Unfortunately my problem isnt solved trough this ... :-( but i''ll better post it later again in the directX forum.
Going to bet now ... its 2:30 am now.. cant stand seeing any more code 8-)
bye
_amigo
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement