If you want to re-create the physics of GameDev sprites in C++ code, rather than re-using GameDev at runtime, you could look at Sprite.cls. The main function that handles sprite movement is called Sub Advance(). Inside there, you will see that one of the first things it does is:
DY = DY + CSng(.Template.GravPow - 10) / 10
That increases the Y velocity of the sprite (DY) based on the gravity on the sprite's template. The gravity is a number between 0 and 20, so after subtracting 10, then it is a number between -10 and +10. This function does a lot of tests and calculations. It's too many to describe here, but almost everything that a sprite does starts here. One of the main functions that this function depends on is ReactToSolid. You will see that function in the same file. It controls how a sprite reacts to solid areas of the map.
Even though there is a lot of code, you may be interested only in a very small part of it. For example, if you only want to handle 8-state sprites controlled by the player, without supporting platforms, you would only need to be concerned with these lines from Sub Advance:
With rDef
DY = DY + CSng(.Template.GravPow - 10) / 10
If .Template.StateType = CONTROL_INPUT Then
bAccel = ProcessAction(Prj.GamePlayer.CtlActions)
ReactToSolid
End If
Dis = X
CurVel = Y
X = X + DX
Y = Y + DY
CurState = CurState Mod 8
If Abs(DX) < Abs(DY / 2) Then ' Vertical movement only
If DY < 0 Then
CurState = 0 ' Up
ElseIf DY > 0 Then
CurState = 4 ' Down
End If
ElseIf Abs(DY) < Abs(DX / 2) Then ' Horizontal movement only
If DX < 0 Then
CurState = 6 ' Left
ElseIf DX > 0 Then
CurState = 2 ' Right
End If
Else ' Horizontal and vertical movement
If DX < 0 Then
If DY < 0 Then
CurState = 7 ' Up left
ElseIf DY > 0 Then
CurState = 5 ' Down left
End If
ElseIf DX > 0 Then
If DY < 0 Then
CurState = 1 ' Up right
ElseIf DY > 0 Then
CurState = 3 ' Down right
End If
End If
End If
If bAccel And .Template.Flags And FLAG_ACCELSTATES Then CurState = CurState + 8
If Abs(Int(X) - Int(Dis)) >= Abs(Int(Y) - Int(CurVel)) Then
Dis = Abs(Int(X) - Int(Dis))
Else
Dis = Abs(Int(Y) - Int(CurVel))
End If
AdvanceFrame Dis
If (.Template.Inertia < 100) Then
If (byAccelDir And 1) = 0 Then
DX = DX * .Template.Inertia / 100
End If
If .Template.GravPow = 10 Then
If (byAccelDir And 2) = 0 Then
DY = DY * .Template.Inertia / 100
End If
If Abs(DY) < 0.05 Then DY = 0
End If
If Abs(DX) < 0.05 Then DX = 0
End If
End With