I actually found my solution to my issue though.
This is the fix for it :
It shouldn't be set to this value because sprites_current_frame_[a] is a double then converted to an integer.
So in my case, i have :
Get_Refresh_rate = 144 (frames per seconds)
seconds = 0.25 (in seconds)
frame_end-frame_start = 9 (the number of images to display one by one)
The function's purpose is to display all 9 frames by 0.25 seconds given a framerate of 144 FPS.
This function is executed every 1/144. When i realized that, it clicked on me : )
I guess i should have explained it.
Solved
This is the fix for it :
Code Select
sprites_current_frame_[a] += 1 / ( (Get_Refresh_rate * seconds) / (double)(frame_end-frame_start));
It shouldn't be set to this value because sprites_current_frame_[a] is a double then converted to an integer.
So in my case, i have :
Get_Refresh_rate = 144 (frames per seconds)
seconds = 0.25 (in seconds)
frame_end-frame_start = 9 (the number of images to display one by one)
The function's purpose is to display all 9 frames by 0.25 seconds given a framerate of 144 FPS.
This function is executed every 1/144. When i realized that, it clicked on me : )
I guess i should have explained it.
Solved