Tried to create a wrapper, but I end up just calling myself instead of the claylib/ll function :shrug:
Added the following to claylib/src/pt-functions, and exposed the check-collision-circle-rec function in claylib/ll:
(defun check-collision-circle-rec (circle rec)
"Check if CIRCLE is inside REC."
(check-type circle circle)
(check-type rec rl-rectangle)
(= 0 (claylib/ll:check-collision-circle-rec (c-struct (pos circle))
(float (radius circle))
(c-struct rec))))
But it recurses on itself. I have no idea how... (eq #'claylib:check-collision-circle-rec #'claylib/ll:check-collision-circle-rec) is T, but I don't know enough about lisp to see the next step in resolving why.
invalid number of arguments: 3
[Condition of type SB-INT:SIMPLE-PROGRAM-ERROR]
Backtrace:
0: (CHECK-COLLISION-CIRCLE-REC #<CLAYLIB/WRAP:VECTOR2 {#X7F524402D640}> 24.0 #<CLAYLIB/WRAP:RECTANGLE {#X7F5240000BA0}>) [external]
1: (CHECK-COLLISION-CIRCLE-REC #<CIRCLE :RADIUS 24.0 :COLOR2 #<unbound-slot> :COLOR #<RL-COLOR :R 0 :G 0 :B 0 :A 255 #<RL-COLOR {10018DDD63}> {10018DDD63}> :FILLED T :POS #<VECTOR2 :X 80.0 :Y 209.0 #<VEC..
Tried to create a wrapper, but I end up just calling myself instead of the claylib/ll function :shrug:
Added the following to claylib/src/pt-functions, and exposed the
check-collision-circle-rec
function in claylib/ll:But it recurses on itself. I have no idea how...
(eq #'claylib:check-collision-circle-rec #'claylib/ll:check-collision-circle-rec)
isT
, but I don't know enough about lisp to see the next step in resolving why.