home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "RobotStuff"
- Option Explicit
-
- ' Distances for measuring closeness.
- Global Const NEAR = 2
- Global Const NEAR2 = 2 * NEAR
-
- ' Robot dimensions.
- Global Const UARM_LEN = 40
- Global Const LARM_LEN = 40
- Global Const ULEG_LEN = 40
- Global Const LLEG_LEN = 40
- Global Const NECK_LEN = 10
- Global Const TRUNK_LEN = UARM_LEN * 1.1
- Global Const BODY_LEN = NECK_LEN + TRUNK_LEN
- Global Const HEAD_RAD = (UARM_LEN - NECK_LEN) / 2
-
- ' Robot parts.
- Global Const MIN_PART = 0
- Global Const PART_HEAD = 0
- Global Const PART_LELBOW = 1
- Global Const PART_RELBOW = 2
- Global Const PART_LHAND = 3
- Global Const PART_RHAND = 4
- Global Const PART_LKNEE = 5
- Global Const PART_RKNEE = 6
- Global Const PART_LFOOT = 7
- Global Const PART_RFOOT = 8
- Global Const MAX_CONTROL_PART = 8
- Global Const PART_HIPS = 9
- Global Const PART_NECK = 10
- Global Const PART_SHOULDERS = 11
- Global Const MAX_PART = 11
-
- #If Win32 Then
- Declare Function GetTickCount Lib "kernel32" () As Long
- #Else
- Declare Function GetTickCount Lib "User" () As Long
- #End If
-
- ' ************************************************
- ' Pause until GetTickCount shows the indicated
- ' time. This is accurate to within one clock tick
- ' (55 ms), not counting variability in DoEvents
- ' and Windows itself.
- ' ************************************************
- Sub WaitTill(next_time As Long)
- Do
- DoEvents
- Loop While GetTickCount() < next_time
- End Sub
-
-