-
Notifications
You must be signed in to change notification settings - Fork 3
/
unexport.lisp
54 lines (48 loc) · 1.94 KB
/
unexport.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(in-package #:claw-raylib)
(dolist (symbol '(raylib:+lightgray+
raylib:+gray+
raylib:+darkgray+
raylib:+yellow+
raylib:+gold+
raylib:+orange+
raylib:+pink+
raylib:+red+
raylib:+maroon+
raylib:+green+
raylib:+lime+
raylib:+darkgreen+
raylib:+skyblue+
raylib:+blue+
raylib:+darkblue+
raylib:+purple+
raylib:+violet+
raylib:+darkpurple+
raylib:+beige+
raylib:+brown+
raylib:+darkbrown+
raylib:+white+
raylib:+black+
raylib:+blank+
raylib:+magenta+
raylib:+raywhite+))
(unexport symbol :raylib)
(unintern symbol :raylib))
;; As of Raylib 5.0, the behavior of MatrixMultiply is to multiply the
;; columns of the left operand with the rows of the right operand, which
;; is considered mathematically incorrect and counterintuitive.
;;
;; Raylib doesn't seem to be changing this behavior in the foreseeable
;; future, so here we swap these two operands to ensure correctness and
;; improve intuitiveness for the API.
(declaim (ftype (function (raylib:matrix raylib:matrix) (values raylib:matrix)) matrix-multiply)
(inline matrix-multiply))
(defun matrix-multiply (left right)
(raylib:matrix-multiply right left))
(declaim (ftype (function (foreign-pointer foreign-pointer foreign-pointer) (values foreign-pointer)) %matrix-multiply)
(inline %matrix-multiply))
(defun %matrix-multiply (destination left right)
(raylib:%matrix-multiply destination right left))
(let ((symbols '(raylib:matrix-multiply raylib:%matrix-multiply)))
(unexport symbols :raylib)
(dolist (symbol symbols)
(unintern symbol :raylib)))