ReceiveAGKPtr(*Ptr) << it receives a pointer to an AppGameKit internal function that gets a pointer to an AppGameKit API function, lets call this "GetAGKFunction" and you use this to get a pointer to a function like so: *Ptr = GetAGKFunction("CREATESTRING_S_L")
I dont know how it would look in delphi but in PureBasic I import the functions as C Prototypes, that looks like this:
; AGK API functions
Global agkCreateString : PrototypeC.i AGKCommand0(size.i)
Global agkDeleteString : PrototypeC AGKCommand1(str.i)
Global agkWorldToScreenX : PrototypeC.f AGKCommand2(x.f)
Global agkWorldToScreenY : PrototypeC.f AGKCommand3(y.f)
Global agkScreenToWorldX : PrototypeC.f AGKCommand4(x.f)
Global agkScreenToWorldY : PrototypeC.f AGKCommand5(y.f)
; function received from AGK
PrototypeC _GetAGKFunction(Function.p-ascii)
; ReceiveAGKPtr
ProcedureCDLL ReceiveAGKPtr(*GetFunction)
; create function alias
GetAGKFunction._GetAGKFunction=*GetFunction
; create API alias
agkCreateString.AGKCommand0=GetAGKFunction("CREATESTRING_S_L")
agkDeleteString.AGKCommand1=GetAGKFunction("DELETESTRING_0_S")
agkWorldToScreenX.AGKCommand2=GetAGKFunction("WORLDTOSCREENX_F_F")
agkWorldToScreenY.AGKCommand3=GetAGKFunction("WORLDTOSCREENY_F_F")
agkScreenToWorldX.AGKCommand4=GetAGKFunction("SCREENTOWORLDX_F_F")
agkScreenToWorldY.AGKCommand5=GetAGKFunction("SCREENTOWORLDY_F_F")
EndProcedure
I'v attached my complete plugin wrapper, maybe you can write a script to convert it