|
-
Dec 2nd, 2002, 12:06 PM
#1
Pls explain this procedure * solved
Im debugging my friend's program and I can't understand the use of this piece of code:
Code:
Public Sub FPS()
Do While mlngFrameTime + (1000 \ MAX_FPS) > gdx.TickCount
DoEvents
Loop
mlngFrameTime = gdx.TickCount
If mlngTimer + 1000 <= gdx.TickCount Then
mlngTimer = gdx.TickCount
mintFPS = mintFPSCounter + 1
mintFPSCounter = 0
Else
mintFPSCounter = mintFPSCounter + 1
End If
End Sub
mintFPS and mintFPSCounter are used only in this procedure . My first thought was a logical error, but I don't know what the procedure is for, hence, how it should have been coded.
FPS is used only in the FadeIn procedure (called) and in the main loop (DDraw.FPS). I think it's used to run DoEvents, since the main loop doesn't have one, but I can't figure out the purpose of the If statement. Neither could she, so she left it in the program after building up on a template she downloaded.
If you could give me a better code for whatever purpose this code was meant for, I'd really appreciate it.
Last edited by leinad31; Dec 2nd, 2002 at 03:07 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|