mirror of
https://github.com/open-goal/jak-project
synced 2026-09-07 19:40:48 -04:00
d/jak2: some work in memory-usage | nav-graph-h and finish pov-camera and aligner (#1901)
This commit is contained in:
+5
-5
@@ -18,11 +18,11 @@
|
||||
:flag-assert #xe00000134
|
||||
(:methods
|
||||
(new (symbol type process) _type_ 0)
|
||||
(align-control-method-9 () none 9)
|
||||
(align-control-method-10 () none 10)
|
||||
(align-control-method-11 () none 11)
|
||||
(align-control-method-12 () none 12)
|
||||
(align-control-method-13 () none 13)
|
||||
(compute-alignment! (_type_) transformq 9)
|
||||
(align! (_type_ align-opts float float float) trsqv 10)
|
||||
(align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv :behavior process 11)
|
||||
(first-transform (_type_) transform 12)
|
||||
(second-transform (_type_) transform 13)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 9 of type align-control
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [lw ra, return-from-thread(s7)]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [jr ra]
|
||||
(defmethod compute-alignment! align-control ((obj align-control))
|
||||
(local-vars (a0-10 symbol) (s7-0 none) (ra-0 int))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(joint-control-method-10 (-> obj process skel))
|
||||
(let ((s5-0 (-> obj process skel active-channels)))
|
||||
(dotimes (s4-0 (the-as int s5-0))
|
||||
(let* ((a0-4 (-> obj process skel channel s4-0))
|
||||
(v1-7 (-> a0-4 frame-group))
|
||||
)
|
||||
(case (-> a0-4 command)
|
||||
(((joint-control-command stack) (joint-control-command stack1))
|
||||
)
|
||||
(else
|
||||
(when (!= (-> v1-7 type) art-joint-anim)
|
||||
(go process-drawable-art-error "align joint-anim")
|
||||
(.lw ra-0 return-from-thread s7-0)
|
||||
(.jr ra-0)
|
||||
(nop!)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((a0-9 (-> obj process skel root-channel 0))
|
||||
(v1-18 (-> a0-9 frame-group))
|
||||
(f0-0 (-> a0-9 frame-num))
|
||||
)
|
||||
(= (-> a0-9 num-func) num-func-loop!)
|
||||
(cond
|
||||
((or (not v1-18) (!= (-> obj frame-group) v1-18))
|
||||
(set! a0-10 #t)
|
||||
)
|
||||
((= (-> a0-9 num-func) num-func-loop!)
|
||||
(set! a0-10 (< (* (-> a0-9 param 0) (- f0-0 (-> obj frame-num))) 0.0))
|
||||
)
|
||||
(else
|
||||
(set! a0-10 (= f0-0 0.0))
|
||||
)
|
||||
)
|
||||
(if a0-10
|
||||
(logior! (-> obj flags) (align-flags disabled))
|
||||
(logclear! (-> obj flags) (align-flags disabled))
|
||||
)
|
||||
(set! (-> obj frame-group) v1-18)
|
||||
(set! (-> obj frame-num) f0-0)
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> obj transform 1)) (the-as pointer (-> obj transform)) 48)
|
||||
(quaternion-copy! (the-as quaternion (-> obj transform 1 rot)) (-> obj align quat))
|
||||
(set! (-> obj transform 1 scale quad) (-> obj align scale quad))
|
||||
(let* ((a2-5 (-> obj matrix 1))
|
||||
(a3-0 (-> obj matrix))
|
||||
(v1-21 (-> a3-0 0 vector 0 quad))
|
||||
(a0-19 (-> a3-0 0 vector 1 quad))
|
||||
(a1-13 (-> a3-0 0 vector 2 quad))
|
||||
(a3-1 (-> a3-0 0 trans quad))
|
||||
)
|
||||
(set! (-> a2-5 vector 0 quad) v1-21)
|
||||
(set! (-> a2-5 vector 1 quad) a0-19)
|
||||
(set! (-> a2-5 vector 2 quad) a1-13)
|
||||
(set! (-> a2-5 trans quad) a3-1)
|
||||
)
|
||||
(let ((s5-1 (-> obj process node-list data 1)))
|
||||
(cspace<-matrix-no-push-joint! s5-1 (-> obj process skel))
|
||||
(let* ((v1-25 (-> obj matrix))
|
||||
(a3-2 (-> s5-1 bone transform))
|
||||
(a0-22 (-> a3-2 vector 0 quad))
|
||||
(a1-15 (-> a3-2 vector 1 quad))
|
||||
(a2-6 (-> a3-2 vector 2 quad))
|
||||
(a3-3 (-> a3-2 trans quad))
|
||||
)
|
||||
(set! (-> v1-25 0 vector 0 quad) a0-22)
|
||||
(set! (-> v1-25 0 vector 1 quad) a1-15)
|
||||
(set! (-> v1-25 0 vector 2 quad) a2-6)
|
||||
(set! (-> v1-25 0 trans quad) a3-3)
|
||||
)
|
||||
(let ((v1-26 (-> obj transform)))
|
||||
(let ((a0-24 (-> s5-1 bone transform trans))
|
||||
(a1-18 (-> obj process root scale))
|
||||
)
|
||||
(.lvf vf4 (&-> a0-24 quad))
|
||||
(.lvf vf5 (&-> a1-18 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.vf vf6 vf4 vf5 :mask #b111)
|
||||
(.svf (&-> v1-26 0 trans quad) vf6)
|
||||
)
|
||||
)
|
||||
(vector-!
|
||||
(the-as vector (-> obj delta))
|
||||
(the-as vector (-> obj transform))
|
||||
(the-as vector (-> obj transform 1))
|
||||
)
|
||||
(set-vector!
|
||||
(-> obj align scale)
|
||||
(vector-length (the-as vector (-> obj matrix)))
|
||||
(vector-length (-> obj matrix 0 vector 1))
|
||||
(vector-length (-> obj matrix 0 vector 2))
|
||||
1.0
|
||||
)
|
||||
(vector-! (-> obj delta scale) (-> obj align scale) (-> obj transform 1 scale))
|
||||
(let ((a2-7 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> obj align scale))))
|
||||
(quaternion-normalize!
|
||||
(matrix->quaternion (-> obj align quat) (matrix*! a2-7 (the-as matrix (-> obj matrix)) a2-7))
|
||||
)
|
||||
)
|
||||
(let ((a1-27 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> obj transform 1 rot)))))
|
||||
(quaternion-normalize! (quaternion*! (-> obj delta quat) a1-27 (-> obj align quat)))
|
||||
)
|
||||
(-> obj delta)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type align-control
|
||||
;; WARN: Return type mismatch (inline-array transform) vs transform.
|
||||
(defmethod first-transform align-control ((obj align-control))
|
||||
"@returns The first of the two [[transforms]] held by the object"
|
||||
(the-as transform (-> obj transform))
|
||||
)
|
||||
|
||||
;; definition for method 13 of type align-control
|
||||
(defmethod second-transform align-control ((obj align-control))
|
||||
"@returns The second of the two [[transforms]] held by the object"
|
||||
(-> obj transform 1)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type align-control
|
||||
(defmethod align! align-control ((obj align-control) (options align-opts) (x float) (y float) (z float))
|
||||
"As long as [[align-flags::0]] is not set call [[process-drawable::16]] on the process being controlled
|
||||
using the arguments passed to construct a [[vector]] - <`x`, `y`, `z`, 1.0>
|
||||
|
||||
@returns the `root` of the [[process-drawable]] after the method returns
|
||||
@see [[process-drawable::16]]"
|
||||
(when (zero? (logand (-> obj flags) (align-flags disabled)))
|
||||
(let* ((process (-> obj process))
|
||||
(method-call (method-of-object process apply-alignment))
|
||||
(transform (-> obj delta))
|
||||
(data (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> data x) x)
|
||||
(set! (-> data y) y)
|
||||
(set! (-> data z) z)
|
||||
(set! (-> data w) 1.0)
|
||||
(method-call process options transform data)
|
||||
)
|
||||
)
|
||||
(-> obj process root)
|
||||
)
|
||||
|
||||
;; definition for method 26 of type trsqv
|
||||
(defmethod set-and-limit-velocity trsqv ((obj trsqv) (unkBitfield int) (limit vector) (arg2 float))
|
||||
"TODO - arg1 is an bitfield of some sort"
|
||||
(let ((transv (-> obj transv)))
|
||||
(when (logtest? unkBitfield 4)
|
||||
(set! (-> transv x) (-> limit x))
|
||||
(set! (-> transv z) (-> limit z))
|
||||
(let* ((v1-2 limit)
|
||||
(f0-8
|
||||
(fmin
|
||||
(* (sqrtf (+ (* (-> v1-2 x) (-> v1-2 x)) (* (-> v1-2 z) (-> v1-2 z)))) (-> self clock frames-per-second))
|
||||
arg2
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-xz-normalize! transv f0-8)
|
||||
)
|
||||
)
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 11 of type align-control
|
||||
(defmethod align-vel-and-quat-only! align-control ((obj align-control) (arg0 align-opts) (arg1 vector) (arg2 int) (arg3 float) (arg4 float))
|
||||
(when (zero? (logand (-> obj flags) (align-flags disabled)))
|
||||
(let ((s5-0 (-> obj delta)))
|
||||
(let ((a0-1 (-> obj process root transv)))
|
||||
(if (logtest? arg0 (align-opts adjust-y-vel))
|
||||
(set! (-> a0-1 y) (* (-> s5-0 trans y) arg3 (-> self clock frames-per-second)))
|
||||
)
|
||||
(when (logtest? arg0 (align-opts adjust-xz-vel))
|
||||
(set! (-> a0-1 x) (-> arg1 x))
|
||||
(set! (-> a0-1 z) (-> arg1 z))
|
||||
(let* ((v1-11 arg1)
|
||||
(f0-9 (sqrtf (+ (* (-> v1-11 x) (-> v1-11 x)) (* (-> v1-11 z) (-> v1-11 z)))))
|
||||
(v1-13 (-> s5-0 trans))
|
||||
(f0-11 (* (fmin f0-9 (* (sqrtf (+ (* (-> v1-13 x) (-> v1-13 x)) (* (-> v1-13 z) (-> v1-13 z)))) arg4))
|
||||
(-> self clock frames-per-second)
|
||||
)
|
||||
)
|
||||
(t9-0 vector-xz-normalize!)
|
||||
)
|
||||
(set! (-> obj last-speed) f0-11)
|
||||
(t9-0 a0-1 f0-11)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (logtest? arg0 (align-opts adjust-quat))
|
||||
(quaternion-normalize! (quaternion*! (-> obj process root quat) (-> obj process root quat) (-> s5-0 quat)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> obj process root)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+9
-13
@@ -5,7 +5,7 @@
|
||||
(deftype pov-camera (process-drawable)
|
||||
((flags pov-camera-flag :offset-assert 200)
|
||||
(debounce-start-time time-frame :offset-assert 208)
|
||||
(notify-handle uint64 :offset-assert 216)
|
||||
(notify-handle handle :offset-assert 216)
|
||||
(anim-name string :offset-assert 224)
|
||||
(command-list pair :offset-assert 228)
|
||||
(mask-to-clear process-mask :offset-assert 232)
|
||||
@@ -17,16 +17,16 @@
|
||||
:size-assert #xf4
|
||||
:flag-assert #x1e008000f4
|
||||
(:methods
|
||||
(pov-camera-method-20 () none 20)
|
||||
(pov-camera-method-21 () none 21)
|
||||
(pov-camera-method-22 () none 22)
|
||||
(pov-camera-method-23 () none 23)
|
||||
(pov-camera-method-24 () none 24)
|
||||
(pov-camera-method-25 () none 25)
|
||||
(pov-camera-method-26 () none 26)
|
||||
(pov-camera-abort () _type_ :state 20)
|
||||
(pov-camera-done-playing () _type_ :state 21)
|
||||
(pov-camera-playing () _type_ :state 22)
|
||||
(pov-camera-start-playing () _type_ :state 23)
|
||||
(pov-camera-startup () _type_ :state 24)
|
||||
(abort? (_type_) symbol :behavior pov-camera 25)
|
||||
(target-grabbed? (_type_) symbol 26)
|
||||
(pov-camera-method-27 () none 27)
|
||||
(pov-camera-method-28 () none 28)
|
||||
(pov-camera-method-29 () none 29)
|
||||
(target-released? (_type_) symbol 29)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -53,7 +53,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1318,7 +1318,7 @@
|
||||
)
|
||||
(t9-32 a0-32 a1-32 (- (-> a2-29 data 0 end-time) (-> a2-29 data 0 start-time)))
|
||||
)
|
||||
(compute-memory-usage (-> *level* level0) #f)
|
||||
(compute-memory-usage! (-> *level* level0) #f)
|
||||
(format #t " (set! *camera-old-tfrag-bytes* ~D)~%" (+ (-> *level* level0 mem-usage-block data 1 total)
|
||||
(-> *level* level0 mem-usage-block data 2 total)
|
||||
(-> *level* level0 mem-usage-block data 3 total)
|
||||
|
||||
+2
-2
@@ -42,8 +42,8 @@
|
||||
:flag-assert #xc00000710
|
||||
(:methods
|
||||
(reset! (_type_) _type_ 9)
|
||||
(memory-usage-block-method-10 () none 10)
|
||||
(print-mem-usage (_type_ level object) none 11)
|
||||
(calculate-total (_type_) int 10)
|
||||
(print-mem-usage (_type_ level object) _type_ 11)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@
|
||||
:heap-size #x10000
|
||||
)
|
||||
(new 'static 'entity-info
|
||||
:ptype (type-ref nav-graph :method-count 47)
|
||||
:ptype (type-ref nav-graph :method-count 45)
|
||||
:package "game"
|
||||
:art-group '()
|
||||
:pool '*16k-dead-pool*
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
(:methods
|
||||
(initialize-skeleton (_type_ skeleton-group pair) none 14)
|
||||
(initialize-skeleton-by-name (_type_ string object) draw-control 15)
|
||||
(process-drawable-method-16 () none 16)
|
||||
(apply-alignment (_type_ align-opts transformq vector) object 16)
|
||||
(process-drawable-method-17 () none 17)
|
||||
(process-drawable-method-18 () none 18)
|
||||
(process-drawable-method-19 () none 19)
|
||||
|
||||
+10
@@ -126,6 +126,9 @@
|
||||
|
||||
;; definition of type gs-display
|
||||
(deftype gs-display (uint64)
|
||||
"the GS's DISPLAY registers make settings for the display position on the screen regarding
|
||||
information on Rectangular Area Read Output Circuit n for the PCRTC.
|
||||
write-only"
|
||||
((dx uint16 :offset 0 :size 12)
|
||||
(dy uint16 :offset 12 :size 11)
|
||||
(magh uint8 :offset 23 :size 4)
|
||||
@@ -140,6 +143,8 @@
|
||||
|
||||
;; definition of type gs-bgcolor
|
||||
(deftype gs-bgcolor (uint64)
|
||||
"the GS's BGCOLOR register sets the background color of the PCRTC with RGB value.
|
||||
write-only"
|
||||
((r uint8 :offset 0 :size 8)
|
||||
(g uint8 :offset 8 :size 8)
|
||||
(b uint8 :offset 16 :size 8)
|
||||
@@ -151,6 +156,11 @@
|
||||
|
||||
;; definition of type gs-csr
|
||||
(deftype gs-csr (uint64)
|
||||
"the GS's CSR register sets and obtains various GS statuses.
|
||||
read-write. the fields have different effects depending on whether they're being read from
|
||||
or written to.
|
||||
|
||||
bits 5 and 6 (0x20 and 0x40) should be zero"
|
||||
((signal uint8 :offset 0 :size 1)
|
||||
(finish uint8 :offset 1 :size 1)
|
||||
(hsint uint8 :offset 2 :size 1)
|
||||
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for function set-video-mode
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-video-mode ((tv-format symbol))
|
||||
"Set related settings to the video mode in the settings, [[*video-params*]] and the [[*video-mode*]]
|
||||
`ntsc` has a [[*video-mode*]] value of `0`, where as `pal` has a value of `1`
|
||||
|
||||
Will also set a bunch of common settings related to profiling and the camera to finalize the switch
|
||||
|
||||
@param tv-format Recognizes `ntsc` and `pal`"
|
||||
(case tv-format
|
||||
(('ntsc)
|
||||
(set! (-> *setting-control* user-default display-dx) 0)
|
||||
(set! (-> *setting-control* user-default display-dy) 8)
|
||||
(set! (-> *video-params* display-fbp) 164)
|
||||
(set! (-> *video-params* display-sy) 224)
|
||||
(set! *video-mode* 0)
|
||||
(sound-set-fps 60)
|
||||
)
|
||||
(('pal)
|
||||
(set! (-> *setting-control* user-default display-dx) 0)
|
||||
(set! (-> *setting-control* user-default display-dy) 24)
|
||||
(set! (-> *video-params* display-fbp) 144)
|
||||
(set! (-> *video-params* display-sy) 256)
|
||||
(set! *video-mode* 1)
|
||||
(sound-set-fps 50)
|
||||
)
|
||||
)
|
||||
(set-time-ratios *display* (-> *display* dog-ratio))
|
||||
(set! (-> *video-params* reset-video-mode) #t)
|
||||
(set! (-> *math-camera* isometric vector 1 y) 0.5)
|
||||
(set! (-> *math-camera* y-clip) 416.0)
|
||||
(set! (-> *math-camera* y-pix) (* 0.5 (-> *math-camera* y-clip)))
|
||||
(set! *profile-y* 1848)
|
||||
(set! (-> *video-params* set-video-mode) #t)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function get-video-mode
|
||||
(defun get-video-mode ()
|
||||
"@returns the current video mode, for example `ntsc` or `pal`"
|
||||
(-> *setting-control* user-current video-mode)
|
||||
)
|
||||
|
||||
;; definition for function set-aspect-ratio
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-aspect-ratio ((aspect symbol))
|
||||
"Set [[*video-params*]] aspect-ratio related settings based on the mode provided.
|
||||
@param aspect Recognizes `aspect4x3` and `aspect16x9`"
|
||||
(case aspect
|
||||
(('aspect4x3)
|
||||
(set! (-> *video-params* relative-x-scale) 1.0)
|
||||
(set! (-> *video-params* relative-x-scale-reciprical) 1.0)
|
||||
)
|
||||
(('aspect16x9)
|
||||
(set! (-> *video-params* relative-x-scale) 0.75)
|
||||
(set! (-> *video-params* relative-x-scale-reciprical) 1.3333334)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function get-aspect-ratio
|
||||
(defun get-aspect-ratio ()
|
||||
"@returns The current aspect ratio mode setting"
|
||||
(-> *setting-control* user-current aspect-ratio)
|
||||
)
|
||||
|
||||
;; definition for function set-progressive-scan
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-progressive-scan ((val symbol))
|
||||
"Flip the progressive scan setting flag depending on the value provided
|
||||
@param val The value to set the progressive scan flag to"
|
||||
(set! (-> *setting-control* user-default use-progressive-scan) val)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function get-progressive-scan
|
||||
(defun get-progressive-scan ()
|
||||
"@returns If using progressive scan is currently set in the settings"
|
||||
(-> *setting-control* user-current use-progressive-scan)
|
||||
)
|
||||
|
||||
;; definition for symbol *smode2*, type int
|
||||
(define *smode2* 0)
|
||||
|
||||
;; definition for function set-graphics-mode
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-graphics-mode ()
|
||||
"TODO"
|
||||
(let ((settings *setting-control*)
|
||||
(gs-bank (the-as gs-bank #x12000000))
|
||||
(video-settings *video-params*)
|
||||
)
|
||||
(let ((display *display*))
|
||||
(cond
|
||||
((-> settings user-current use-progressive-scan)
|
||||
(when (nonzero? *smode2*)
|
||||
(reset-graph 0 0 80 0)
|
||||
(set! *smode2* 0)
|
||||
0
|
||||
)
|
||||
(set! (-> gs-bank display1) (new 'static 'gs-display
|
||||
:magh #x1
|
||||
:dw #x4ff
|
||||
:dy (+ (-> video-settings display-dy) 50)
|
||||
:dx (+ (* (-> video-settings display-dx) 2) 326)
|
||||
:dh (+ (* (-> video-settings display-sy) 2) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (or (!= *smode2* 1) (-> *video-params* set-video-mode))
|
||||
(if (= (-> *setting-control* user-current video-mode) 'ntsc)
|
||||
(reset-graph 0 1 2 0)
|
||||
(reset-graph 0 1 3 0)
|
||||
)
|
||||
(set! *smode2* 1)
|
||||
(set! (-> *video-params* set-video-mode) #f)
|
||||
)
|
||||
(set! (-> gs-bank display1) (new 'static 'gs-display
|
||||
:magh #x3
|
||||
:dw #x9ff
|
||||
:dy (+ (-> video-settings display-dy) 50)
|
||||
:dx (+ (* (-> video-settings display-dx) 4) 652)
|
||||
:dh (+ (* (-> video-settings display-sy) 2) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gs-bank pmode) (-> display pmode))
|
||||
(set! (-> gs-bank bgcolor) (the-as gs-bgcolor (-> display bgcolor)))
|
||||
)
|
||||
(set! (-> gs-bank dspfb1) (new 'static 'gs-display-fb :fbw #xa :fbp (-> video-settings display-fbp)))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -477,7 +477,7 @@
|
||||
(level-method-11 () none 11)
|
||||
(unload! (_type_) _type_ 12)
|
||||
(bsp-name (_type_) symbol 13)
|
||||
(compute-memory-usage (_type_ object) memory-usage-block 14)
|
||||
(compute-memory-usage! (_type_ symbol) memory-usage-block 14)
|
||||
(inside-boxes-check (_type_ vector) symbol 15)
|
||||
(level-method-16 () none 16)
|
||||
(load-continue (_type_) _type_ 17)
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@
|
||||
;; definition for function quaternion-axis-angle!
|
||||
(defun quaternion-axis-angle! ((arg0 quaternion) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(sincos! (the-as (pointer float) s5-0) (* 0.5 arg4))
|
||||
(sincos! s5-0 (* 0.5 arg4))
|
||||
(let ((f0-2 (-> s5-0 x)))
|
||||
(set! (-> arg0 x) (* arg1 f0-2))
|
||||
(set! (-> arg0 y) (* arg2 f0-2))
|
||||
@@ -32,7 +32,7 @@
|
||||
;; definition for function quaternion-vector-angle!
|
||||
(defun quaternion-vector-angle! ((arg0 quaternion) (arg1 vector) (arg2 float))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(sincos! (the-as (pointer float) s5-0) (* 0.5 arg2))
|
||||
(sincos! s5-0 (* 0.5 arg2))
|
||||
(let ((f0-2 (-> s5-0 x)))
|
||||
(set! (-> arg0 x) (* (-> arg1 x) f0-2))
|
||||
(set! (-> arg0 y) (* (-> arg1 y) f0-2))
|
||||
@@ -604,7 +604,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(sincos-rad! (the-as (pointer float) s5-0) f30-0)
|
||||
(sincos-rad! s5-0 f30-0)
|
||||
(let ((f0-6 (/ (-> s5-0 x) f30-0)))
|
||||
(set! (-> arg0 x) (* (-> arg1 x) f0-6))
|
||||
(set! (-> arg0 y) (* (-> arg1 y) f0-6))
|
||||
|
||||
+1
-5
@@ -81,7 +81,7 @@
|
||||
(global-y-angle-to-point (_type_ vector) float 23)
|
||||
(relative-y-angle-to-point (_type_ vector) float 24)
|
||||
(roll-relative-to-gravity (_type_) float 25)
|
||||
(set-and-limit-velocity (_type_ int vector float) trsqv 26)
|
||||
(set-and-limit-velocity (_type_ int vector float) trsqv :behavior process 26)
|
||||
(get-quaternion (_type_) quaternion 27)
|
||||
)
|
||||
)
|
||||
@@ -121,7 +121,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user