Update RingRayLib - raylib.c - Add Function : void SetCameraMode(Camera camera, int mode)
@@ -1582,6 +1582,22 @@ RING_FUNC(ring_GetGesturePinchAngle)
RING_API_RETNUMBER(GetGesturePinchAngle());
}
+
+RING_FUNC(ring_SetCameraMode)
+{
+ if ( RING_API_PARACOUNT != 2 ) {
+ RING_API_ERROR(RING_API_MISS2PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ SetCameraMode(* (Camera *) RING_API_GETCPOINTER(1,"Camera"), (int ) RING_API_GETNUMBER(2));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Camera"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -1701,4 +1717,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("getgesturedragangle",ring_GetGestureDragAngle);
ring_vm_funcregister("getgesturepinchvector",ring_GetGesturePinchVector);
ring_vm_funcregister("getgesturepinchangle",ring_GetGesturePinchAngle);
+ ring_vm_funcregister("setcameramode",ring_SetCameraMode);
}
