!******************************************************************************
!*       This is a part of the Compaq Visual Fortran Source Code Samples.
!******************************************************************************
subroutine Key_SPACE()
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_Key_SPACE@0' :: Key_SPACE
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS : 'Key_SPACE' :: Key_SPACE
!DEC$ ENDIF
use twaveinc
use dfopngl

interface
subroutine Animate()
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_Animate@0' :: Animate
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS : 'Animate' :: Animate
!DEC$ ENDIF
end subroutine Animate
end interface

    stepMode = NOT(stepMode)

    if (stepMode) then
        call fauxIdleFunc(0)

    else
        call fauxIdleFunc(LOC(Animate))

    end if
end

subroutine Key_n()
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_Key_n@0' :: Key_n
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS : 'Key_n' :: Key_n
!DEC$ ENDIF
use twaveinc
    if (stepMode) then
        nextFrame = 1
    end if
end

subroutine Key_a()
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_Key_a@0' :: Key_a
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS : 'Key_a' :: Key_a
!DEC$ ENDIF
use twaveinc

   spinMode = NOT(spinMode)
end

