#10342 - RaBBi - Tue Sep 02, 2003 11:23 pm
Hi,
my "today" problem (lol) is about detecting a certain amount of frames as an event to start some operation.
Each VBlank, I ++ my g_Frames variable.
And in a function (which scroll a BG), I would like to detect the Xth frame to scroll++ my BG.
I use the '%' operator in a 'if' sequence like this :
But the smaller the 'iCount' variable is, the slower the scroll is.
And of course, the bigger the 'iCount' variable is, the faster the scroll is.
But in my mind, I thought there would be the inverse.
What's wrong in mine ? lol
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^
my "today" problem (lol) is about detecting a certain amount of frames as an event to start some operation.
Each VBlank, I ++ my g_Frames variable.
And in a function (which scroll a BG), I would like to detect the Xth frame to scroll++ my BG.
I use the '%' operator in a 'if' sequence like this :
Code: |
iCount=2; if(g_NewFrame && g_Frames%iCount) |
But the smaller the 'iCount' variable is, the slower the scroll is.
And of course, the bigger the 'iCount' variable is, the faster the scroll is.
But in my mind, I thought there would be the inverse.
What's wrong in mine ? lol
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^