M
Michael Sgier
Hi
I get:
.../src/cit_x.cpp: In function 'int FadeIN()':
.../src/cit_x.cpp:476: warning: control reaches end of non-void function
Why this warning in the function below?
Thanks Michael
int FadeIN()
{
int start = SDL_GetTicks();
// Only call this when 100 ms have elapsed
while (AlphaV > 0.0f)
{
if( SDL_GetTicks() - start > 100 )
{
// Reassign the time elapsed
start = SDL_GetTicks();
// Decrease the alpha value by this much
AlphaV -= 0.005;
return AlphaV;
}
}
}
I get:
.../src/cit_x.cpp: In function 'int FadeIN()':
.../src/cit_x.cpp:476: warning: control reaches end of non-void function
Why this warning in the function below?
Thanks Michael
int FadeIN()
{
int start = SDL_GetTicks();
// Only call this when 100 ms have elapsed
while (AlphaV > 0.0f)
{
if( SDL_GetTicks() - start > 100 )
{
// Reassign the time elapsed
start = SDL_GetTicks();
// Decrease the alpha value by this much
AlphaV -= 0.005;
return AlphaV;
}
}
}