Check this topic: http://www.pascalgamedevelopment.com...highlight=bero

In it you will find several different libraries. One of them has been writen by our comunity member BeRo. It is compleetly written in pascal so you probably shouldn't have much problem using it and if you do you can always ask BeRo for help.