;;-*-Lisp-*- (in-package goal) ;; this file is debug only (declare-file (debug)) ;; failed to figure out what this is: (when (or (not *camera-old-cpu*) (zero? *camera-old-cpu*)) (set! *camera-old-cpu* 0) 0 ) ;; failed to figure out what this is: (when (or (not *camera-old-vu*) (zero? *camera-old-vu*)) (set! *camera-old-vu* 0) 0 ) ;; failed to figure out what this is: (when (or (not *camera-old-tfrag-bytes*) (zero? *camera-old-tfrag-bytes*)) (set! *camera-old-tfrag-bytes* 0) 0 ) ;; definition (perm) for symbol *camera-old-level*, type string (define-perm *camera-old-level* string (new 'global 'string 128 (the-as string #f))) ;; definition (perm) for symbol *camera-old-stat-string-tfrag*, type string (define-perm *camera-old-stat-string-tfrag* string (new 'global 'string 128 (the-as string #f))) ;; definition (perm) for symbol *camera-old-stat-string-tfrag-near*, type string (define-perm *camera-old-stat-string-tfrag-near* string (new 'global 'string 128 (the-as string #f))) ;; definition (perm) for symbol *camera-old-stat-string-total*, type string (define-perm *camera-old-stat-string-total* string (new 'global 'string 128 (the-as string #f))) ;; definition of type cam-dbg-scratch (deftype cam-dbg-scratch (structure) ((linevec4w vector4w 2 :inline) (color vector4w :inline) (plotvec vector4w 2 :inline) (linevec vector4w 2 :inline) (rel-vec vector :inline) (sphere-v-start vector :inline) (sphere-v-end vector :inline) (sphere-v-down vector :inline) (sphere-vec vector :inline) (crossvec vector 3 :inline) (bboxvec vector 6 :inline) (fov-vv vector 4 :inline) (fov-src vector :inline) (fov-dest vector :inline) (fov-vert vector :inline) (fov-horz vector :inline) ) ) ;; definition for method 3 of type cam-dbg-scratch (defmethod inspect ((this cam-dbg-scratch)) (when (not this) (set! this this) (goto cfg-4) ) (format #t "[~8x] ~A~%" this 'cam-dbg-scratch) (format #t "~1Tlinevec4w: ~`vector`P~%" (-> this linevec4w)) (format #t "~1Tcolor: ~`vector`P~%" (-> this color)) (format #t "~1Tplotvec: ~`vector`P~%" (-> this plotvec)) (format #t "~1Tlinevec: ~`vector`P~%" (-> this linevec)) (format #t "~1Trel-vec: ~`vector`P~%" (-> this rel-vec)) (format #t "~1Tsphere-v-start: ~`vector`P~%" (-> this sphere-v-start)) (format #t "~1Tsphere-v-end: ~`vector`P~%" (-> this sphere-v-end)) (format #t "~1Tsphere-v-down: ~`vector`P~%" (-> this sphere-v-down)) (format #t "~1Tsphere-vec: ~`vector`P~%" (-> this sphere-vec)) (format #t "~1Tcrossvec: ~`vector`P~%" (-> this crossvec)) (format #t "~1Tbboxvec: ~`vector`P~%" (-> this bboxvec)) (format #t "~1Tfov-vv: ~`vector`P~%" (-> this fov-vv)) (format #t "~1Tfov-src: ~`vector`P~%" (-> this fov-src)) (format #t "~1Tfov-dest: ~`vector`P~%" (-> this fov-dest)) (format #t "~1Tfov-vert: ~`vector`P~%" (-> this fov-vert)) (format #t "~1Tfov-horz: ~`vector`P~%" (-> this fov-horz)) (label cfg-4) this ) ;; definition for function cam-slave-options->string ;; WARN: Return type mismatch object vs string. (defun cam-slave-options->string ((arg0 cam-slave-options) (arg1 object)) (if (= (logand arg0 (cam-slave-options SAME_SIDE)) (cam-slave-options SAME_SIDE)) (format arg1 "SAME_SIDE ") ) (if (= (logand (cam-slave-options GUN_CAM) arg0) (cam-slave-options GUN_CAM)) (format arg1 "GUN_CAM ") ) (if (= (logand arg0 (cam-slave-options STICKY_ANGLE)) (cam-slave-options STICKY_ANGLE)) (format arg1 "STICKY_ANGLE ") ) (if (= (logand arg0 (cam-slave-options FIND_HIDDEN_TARGET)) (cam-slave-options FIND_HIDDEN_TARGET)) (format arg1 "FIND_HIDDEN_TARGET ") ) (if (= (logand (cam-slave-options RAPID_TRACKING) arg0) (cam-slave-options RAPID_TRACKING)) (format arg1 "RAPID_TRACKING ") ) (if (= (logand arg0 (cam-slave-options SHRINK_MAX_ANGLE)) (cam-slave-options SHRINK_MAX_ANGLE)) (format arg1 "SHRINK_MAX_ANGLE ") ) (if (= (logand arg0 (cam-slave-options JUMP_PITCHES)) (cam-slave-options JUMP_PITCHES)) (format arg1 "JUMP_PITCHES ") ) (if (= (logand arg0 (cam-slave-options LINE_OF_SIGHT)) (cam-slave-options LINE_OF_SIGHT)) (format arg1 "LINE_OF_SIGHT ") ) (if (= (logand arg0 (cam-slave-options PLAYER_MOVING_CAMERA)) (cam-slave-options PLAYER_MOVING_CAMERA)) (format arg1 "PLAYER_MOVING_CAMERA ") ) (if (= (logand (cam-slave-options ALLOW_SHIFT_BUTTONS) arg0) (cam-slave-options ALLOW_SHIFT_BUTTONS)) (format arg1 "ALLOW_SHIFT_BUTTONS ") ) (if (= (logand arg0 (cam-slave-options NO_ROTATE)) (cam-slave-options NO_ROTATE)) (format arg1 "NO_ROTATE ") ) (if (= (logand (cam-slave-options WIDE_FOV) arg0) (cam-slave-options WIDE_FOV)) (format arg1 "WIDE_FOV ") ) (if (= (logand arg0 (cam-slave-options MOVE_SPHERICAL)) (cam-slave-options MOVE_SPHERICAL)) (format arg1 "MOVE_SPHERICAL ") ) (if (= (logand arg0 (cam-slave-options DRAG)) (cam-slave-options DRAG)) (format arg1 "DRAG ") ) (if (= (logand arg0 (cam-slave-options MOVEMENT_BLOCKED)) (cam-slave-options MOVEMENT_BLOCKED)) (format arg1 "MOVEMENT_BLOCKED ") ) (if (= (logand (cam-slave-options BLOCK_RIGHT_STICK) arg0) (cam-slave-options BLOCK_RIGHT_STICK)) (format arg1 "BLOCK_RIGHT_STICK ") ) (if (= (logand arg0 (cam-slave-options COLLIDE)) (cam-slave-options COLLIDE)) (format arg1 "COLLIDE ") ) (if (= (logand arg0 (cam-slave-options ALLOW_Z_ROT)) (cam-slave-options ALLOW_Z_ROT)) (format arg1 "ALLOW_Z_ROT ") ) (if (= (logand arg0 (cam-slave-options BIKE_MODE)) (cam-slave-options BIKE_MODE)) (format arg1 "BIKE_MODE ") ) (if (= (logand (cam-slave-options EASE_SPLINE_IDX) arg0) (cam-slave-options EASE_SPLINE_IDX)) (format arg1 "EASE_SPLINE_IDX ") ) (if (= (logand arg0 (cam-slave-options GOTO_GOOD_POINT)) (cam-slave-options GOTO_GOOD_POINT)) (format arg1 "GOTO_GOOD_POINT ") ) (if (= (logand arg0 (cam-slave-options BUTT_CAM)) (cam-slave-options BUTT_CAM)) (format arg1 "BUTT_CAM ") ) (if (= (logand (cam-slave-options VERTICAL_FOLLOW_MATCHES_CAMERA) arg0) (cam-slave-options VERTICAL_FOLLOW_MATCHES_CAMERA) ) (format arg1 "VERTICAL_FOLLOW_MATCHES_CAMERA ") ) (if (= (logand (cam-slave-options HAVE_BUTT_HANDLE) arg0) (cam-slave-options HAVE_BUTT_HANDLE)) (format arg1 "HAVE_BUTT_HANDLE ") ) (the-as string arg1) ) ;; definition for function cam-index-options->string ;; WARN: Return type mismatch object vs string. (defun cam-index-options->string ((arg0 cam-index-options) (arg1 object)) (if (= (logand arg0 (cam-index-options SPHERICAL)) (cam-index-options SPHERICAL)) (format arg1 "RADIAL ") ) (if (= (logand arg0 (cam-index-options RADIAL)) (cam-index-options RADIAL)) (format arg1 "SPHERICAL ") ) (the-as string arg1) ) ;; definition for function slave-los-state->string (defun slave-los-state->string ((arg0 slave-los-state)) (case arg0 (((slave-los-state between)) "between" ) (((slave-los-state none)) "none" ) (((slave-los-state cw)) "cw" ) (((slave-los-state ccw)) "ccw" ) (else "*unknown*" ) ) ) ;; definition for function cam-line-dma ;; INFO: Used lq/sq (defun cam-line-dma () (with-dma-buffer-add-bucket ((v1-5 (-> *display* frames (-> *display* on-screen) debug-buf)) (bucket-id debug-no-zbuf1) ) (let ((a0-1 (the-as object (-> v1-5 base)))) (let* ((a1-0 v1-5) (a3-0 (the-as object (-> a1-0 base))) ) (set! (-> (the-as dma-packet a3-0) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) (set! (-> (the-as dma-packet a3-0) vif0) (new 'static 'vif-tag)) (set! (-> (the-as dma-packet a3-0) vif1) (new 'static 'vif-tag :cmd (vif-cmd direct) :msk #x1)) (set! (-> a1-0 base) (&+ (the-as pointer a3-0) 16)) ) (let* ((a1-1 v1-5) (a3-2 (the-as object (-> a1-1 base))) ) (set! (-> (the-as gs-gif-tag a3-2) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :pre #x1 :prim (new 'static 'gs-prim :prim (gs-prim-type line) :iip #x1 :abe #x1) :nreg #x4 ) ) (set! (-> (the-as gs-gif-tag a3-2) regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id rgbaq) :regs1 (gif-reg-id xyzf2) :regs2 (gif-reg-id rgbaq) :regs3 (gif-reg-id xyzf2) ) ) (set! (-> a1-1 base) (&+ (the-as pointer a3-2) 16)) ) (let* ((a1-2 v1-5) (a3-4 (-> a1-2 base)) ) (set! (-> (the-as (pointer uint128) a3-4) 0) (-> (the-as vector (+ 32 #x70000000)) quad)) (set! (-> (the-as (pointer uint128) a3-4) 1) (-> (the-as vector (+ #x70000000 0)) quad)) (set! (-> a1-2 base) (&+ a3-4 32)) ) (let* ((a3-6 v1-5) (a1-3 (-> a3-6 base)) ) (set! (-> (the-as (pointer uint128) a1-3) 0) (-> (the-as vector (+ 32 #x70000000)) quad)) (set! (-> (the-as (pointer uint128) a1-3) 1) (-> (the-as vector (+ 16 #x70000000)) quad)) (set! (-> a3-6 base) (&+ a1-3 32)) ) (let ((a3-10 (/ (the-as int (+ (- -16 (the-as int a0-1)) (the-as int (-> v1-5 base)))) 16))) (cond ((nonzero? a3-10) (logior! (-> (the-as dma-packet a0-1) dma) (shr (shl a3-10 48) 48)) (logior! (-> (the-as (pointer uint64) a0-1) 1) (shl (shr (shl a3-10 48) 48) 32)) ) (else (set! (-> v1-5 base) (the-as (pointer uint64) a0-1)) ) ) ) ) ) ) ;; definition for function camera-line2d (defun camera-line2d ((arg0 vector4w) (arg1 vector4w)) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec4w 0 x) (* (+ (-> arg0 x) 1792) 16)) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec4w 0 y) (* (- 2256 (-> (the-as cam-dbg-scratch arg0) linevec4w 0 y)) 16) ) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec4w 0 z) #x7fffff) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec4w 1 x) (* (+ (-> (the-as cam-dbg-scratch arg1) linevec4w 0 x) 1792) 16) ) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec4w 1 y) (* (- 2256 (-> (the-as cam-dbg-scratch arg1) linevec4w 0 y)) 16) ) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec4w 1 z) #x7fffff) (cam-line-dma) ) ;; definition for function camera-plot-float-func ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun camera-plot-float-func ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 (function float float)) (arg5 vector4w)) (let ((f30-0 (- arg1 arg0)) (f24-0 (- arg3 arg2)) ) 0.0 0.0 (let ((f28-0 (/ 200.0 f24-0)) (f26-0 (/ 400.0 f30-0)) ) (set! (-> (the-as cam-dbg-scratch #x70000000) color x) 128) (set! (-> (the-as cam-dbg-scratch #x70000000) color y) 128) (set! (-> (the-as cam-dbg-scratch #x70000000) color z) 128) (set! (-> (the-as cam-dbg-scratch #x70000000) color w) 128) (when (and (< arg0 0.0) (< 0.0 arg1)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) (+ (the int (* f26-0 f30-0 (/ (- arg0) f30-0))) 20) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 y) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 f24-0)) 20)) (camera-line2d (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) (the-as vector4w (+ 64 #x70000000)) ) ) (when (and (< arg2 0.0) (< 0.0 arg3)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 y) (+ (the int (* f28-0 f24-0 (/ (- arg2) f24-0))) 20) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) (+ (the int (* f26-0 f30-0)) 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 y) ) (camera-line2d (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 y) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) (+ (the int (* f26-0 f30-0)) 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) 20) (camera-line2d (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 y) (+ (the int (* f28-0 f24-0)) 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) (+ (the int (* f26-0 f30-0)) 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 f24-0)) 20)) (camera-line2d (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 y) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 f24-0)) 20)) (camera-line2d (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) (+ (the int (* f26-0 f30-0)) 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 y) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) (+ (the int (* f26-0 f30-0)) 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 f24-0)) 20)) (camera-line2d (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (let ((v1-64 (-> arg5 quad))) (set! (-> (the-as cam-dbg-scratch #x70000000) color quad) v1-64) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 (- (arg4 arg0) arg2))) 20)) (let ((s3-1 1)) (while (>= (the int (* f26-0 f30-0)) s3-1) (let ((v1-69 (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 quad))) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 quad) v1-69) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) (+ s3-1 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 (- (arg4 (+ arg0 (* f30-0 (/ (the float s3-1) (* f26-0 f30-0))))) arg2))) 20) ) (camera-line2d (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (+! s3-1 1) ) ) ) ) 0 (none) ) ;; definition for function camera-line-setup ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun camera-line-setup ((arg0 vector4w)) (let ((v1-0 (-> arg0 quad))) (set! (-> (the-as cam-dbg-scratch #x70000000) color quad) v1-0) ) (init-for-transform *identity-matrix*) 0 (none) ) ;; definition for function camera-line-draw ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. ;; WARN: Function camera-line-draw has a return type of none, but the expression builder found a return statement. (defun camera-line-draw ((arg0 vector) (arg1 vector)) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec 0 quad) (-> arg0 quad)) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec 1 quad) (-> arg1 quad)) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec 0 w) (the-as int 1.0)) (set! (-> (the-as cam-dbg-scratch #x70000000) linevec 1 w) (the-as int 1.0)) (transform-float-point (the-as vector (-> (the-as cam-dbg-scratch #x70000000) linevec)) (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) linevec4w)) ) (transform-float-point (the-as vector (-> (the-as cam-dbg-scratch #x70000000) linevec 1)) (-> (the-as cam-dbg-scratch #x70000000) linevec4w 1) ) (cond ((< (the-as uint #xe00000) (the-as uint (-> (the-as cam-dbg-scratch #x70000000) linevec4w 0 z))) (return #f) ) ((< (the-as uint #xe00000) (the-as uint (-> (the-as cam-dbg-scratch #x70000000) linevec4w 1 z))) (return #f) ) ) (cam-line-dma) 0 (none) ) ;; definition for function camera-line ;; WARN: Return type mismatch int vs none. (defun camera-line ((arg0 vector) (arg1 vector) (arg2 vector4w)) (camera-line-setup arg2) (camera-line-draw arg0 arg1) 0 (none) ) ;; definition for function camera-line-rel (defun camera-line-rel ((arg0 vector) (arg1 vector) (arg2 vector4w)) (vector+! (-> (the-as cam-dbg-scratch #x70000000) rel-vec) arg0 arg1) (camera-line arg0 (-> (the-as cam-dbg-scratch #x70000000) rel-vec) arg2) (none) ) ;; definition for function camera-line-rel-len (defun camera-line-rel-len ((arg0 vector) (arg1 vector) (arg2 float) (arg3 vector4w)) (vector-normalize-copy! (-> (the-as cam-dbg-scratch #x70000000) rel-vec) arg1 arg2) (vector+! (-> (the-as cam-dbg-scratch #x70000000) rel-vec) (-> (the-as cam-dbg-scratch #x70000000) rel-vec) arg0 ) (camera-line arg0 (-> (the-as cam-dbg-scratch #x70000000) rel-vec) arg3) (none) ) ;; definition for function camera-sphere ;; WARN: Return type mismatch int vs none. (defun camera-sphere ((arg0 vector) (arg1 float) (arg2 vector4w)) (camera-line-setup arg2) (dotimes (s4-0 10) (let ((f30-1 (* arg1 (sin (* 3276.8 (the float s4-0))))) (f28-1 (* arg1 (sin (* 3276.8 (the float (+ s4-0 1)))))) ) (set! (-> (the-as cam-dbg-scratch #x70000000) sphere-v-start y) (+ (-> arg0 y) (* (cos (* 3276.8 (the float s4-0))) arg1)) ) (set! (-> (the-as cam-dbg-scratch #x70000000) sphere-v-end y) (-> (the-as cam-dbg-scratch #x70000000) sphere-v-start y) ) (set! (-> (the-as cam-dbg-scratch #x70000000) sphere-v-down y) (+ (-> arg0 y) (* (cos (* 3276.8 (the float (+ s4-0 1)))) arg1)) ) (dotimes (s3-0 10) (set! (-> (the-as cam-dbg-scratch #x70000000) sphere-v-start x) (+ (-> arg0 x) (* (cos (* 6553.6 (the float s3-0))) f30-1)) ) (set! (-> (the-as cam-dbg-scratch #x70000000) sphere-v-start z) (+ (-> arg0 z) (* (sin (* 6553.6 (the float s3-0))) f30-1)) ) (set! (-> (the-as cam-dbg-scratch #x70000000) sphere-v-end x) (+ (-> arg0 x) (* (cos (* 6553.6 (the float (+ s3-0 1)))) f30-1)) ) (set! (-> (the-as cam-dbg-scratch #x70000000) sphere-v-end z) (+ (-> arg0 z) (* (sin (* 6553.6 (the float (+ s3-0 1)))) f30-1)) ) (set! (-> (the-as cam-dbg-scratch #x70000000) sphere-v-down x) (+ (-> arg0 x) (* (cos (* 6553.6 (the float s3-0))) f28-1)) ) (set! (-> (the-as cam-dbg-scratch #x70000000) sphere-v-down z) (+ (-> arg0 z) (* (sin (* 6553.6 (the float s3-0))) f28-1)) ) (camera-line-draw (-> (the-as cam-dbg-scratch #x70000000) sphere-v-start) (-> (the-as cam-dbg-scratch #x70000000) sphere-v-end) ) (camera-line-draw (-> (the-as cam-dbg-scratch #x70000000) sphere-v-start) (-> (the-as cam-dbg-scratch #x70000000) sphere-v-down) ) ) ) ) 0 (none) ) ;; definition for function camera-cross (defun camera-cross ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector4w) (arg4 meters)) (vector-normalize-copy! (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) arg0 arg4) (vector+! (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) arg2 (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) ) (vector-! (-> (the-as cam-dbg-scratch #x70000000) crossvec 2) arg2 (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) ) (camera-line (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) (-> (the-as cam-dbg-scratch #x70000000) crossvec 2) arg3 ) (vector-cross! (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) arg1 ) (vector-normalize! (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) arg4) (vector+! (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) arg2 (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) ) (vector-! (-> (the-as cam-dbg-scratch #x70000000) crossvec 2) arg2 (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) ) (camera-line (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) (-> (the-as cam-dbg-scratch #x70000000) crossvec 2) arg3 ) (vector-cross! (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) arg0 ) (vector-normalize! (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) arg4) (vector+! (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) arg2 (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) ) (vector-! (-> (the-as cam-dbg-scratch #x70000000) crossvec 2) arg2 (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) ) (camera-line (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) (-> (the-as cam-dbg-scratch #x70000000) crossvec 2) arg3 ) (none) ) ;; definition for function camera-bounding-box-draw ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun camera-bounding-box-draw ((arg0 bounding-box) (arg1 basic) (arg2 rgba)) (camera-line-setup (new 'static 'vector4w :x #x7f :y #x7f :z #x7f :w #x80)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 0 quad) (-> arg0 min quad)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 0 x) (-> arg0 max x)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 1 quad) (-> arg0 min quad)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 1 y) (-> arg0 max y)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 2 quad) (-> arg0 min quad)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 2 z) (-> arg0 max z)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 3 quad) (-> arg0 max quad)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 3 x) (-> arg0 min x)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 4 quad) (-> arg0 max quad)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 4 y) (-> arg0 min y)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 5 quad) (-> arg0 max quad)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 5 z) (-> arg0 min z)) (camera-line-draw (-> arg0 min) (the-as vector (-> (the-as cam-dbg-scratch #x70000000) bboxvec))) (camera-line-draw (-> arg0 min) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 1)) (camera-line-draw (-> arg0 min) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 2)) (camera-line-draw (-> arg0 max) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 3)) (camera-line-draw (-> arg0 max) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 4)) (camera-line-draw (-> arg0 max) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 5)) (camera-line-draw (the-as vector (-> (the-as cam-dbg-scratch #x70000000) bboxvec)) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 4) ) (camera-line-draw (-> (the-as cam-dbg-scratch #x70000000) bboxvec 4) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 2) ) (camera-line-draw (-> (the-as cam-dbg-scratch #x70000000) bboxvec 2) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 3) ) (camera-line-draw (-> (the-as cam-dbg-scratch #x70000000) bboxvec 3) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 1) ) (camera-line-draw (-> (the-as cam-dbg-scratch #x70000000) bboxvec 1) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 5) ) (camera-line-draw (-> (the-as cam-dbg-scratch #x70000000) bboxvec 5) (the-as vector (-> (the-as cam-dbg-scratch #x70000000) bboxvec)) ) 0 (none) ) ;; definition of type cam-debug-tri (deftype cam-debug-tri (structure) ((vertex vector 3 :inline) (intersect vector :inline) (color vector4w) ) ) ;; definition for method 3 of type cam-debug-tri (defmethod inspect ((this cam-debug-tri)) (when (not this) (set! this this) (goto cfg-4) ) (format #t "[~8x] ~A~%" this 'cam-debug-tri) (format #t "~1Tvertex[3] @ #x~X~%" (-> this vertex)) (format #t "~1Tintersect: #~%" (-> this intersect)) (format #t "~1Tcolor: #~%" (-> this color)) (label cfg-4) this ) ;; definition for symbol *cam-debug-los-tri-current*, type int (define *cam-debug-los-tri-current* 0) ;; definition for symbol *cam-debug-los-tri*, type (inline-array cam-debug-tri) (define *cam-debug-los-tri* (the-as (inline-array cam-debug-tri) (malloc 'debug #x8fc0))) ;; definition for symbol *cam-debug-coll-tri-current*, type int (define *cam-debug-coll-tri-current* 0) ;; definition for symbol *cam-debug-coll-tri*, type (inline-array cam-debug-tri) (define *cam-debug-coll-tri* (the-as (inline-array cam-debug-tri) (malloc 'debug #x8fc0))) ;; definition for function cam-debug-reset-coll-tri ;; WARN: Return type mismatch int vs none. (defun cam-debug-reset-coll-tri () (set! *cam-debug-los-tri-current* 0) (set! *cam-debug-coll-tri-current* 0) 0 (none) ) ;; definition for function cam-debug-add-los-tri ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun cam-debug-add-los-tri ((arg0 (inline-array collide-cache-tri)) (arg1 vector) (arg2 vector)) (cond ((>= *cam-debug-los-tri-current* 460) ) (else (let ((v1-3 (-> *cam-debug-los-tri* *cam-debug-los-tri-current*))) (set! (-> v1-3 vertex 0 quad) (-> arg0 0 vertex 0 quad)) (set! (-> v1-3 vertex 1 quad) (-> arg0 0 vertex 1 quad)) (set! (-> v1-3 vertex 2 quad) (-> arg0 0 vertex 2 quad)) (set! (-> v1-3 intersect quad) (-> arg1 quad)) (set! (-> v1-3 color) (the-as vector4w arg2)) ) (set! *cam-debug-los-tri-current* (+ *cam-debug-los-tri-current* 1)) (if (= *cam-debug-los-tri-current* 460) (format 0 "ERROR : cam-debug-add-los-tri overflow~%") ) ) ) 0 (none) ) ;; definition for function cam-debug-add-coll-tri ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun cam-debug-add-coll-tri ((arg0 cam-debug-tri) (arg1 vector) (arg2 cam-debug-tri)) (cond ((>= *cam-debug-coll-tri-current* 460) ) (else (let ((v1-3 (-> *cam-debug-coll-tri* *cam-debug-coll-tri-current*))) (set! (-> v1-3 vertex 0 quad) (-> arg0 vertex 0 quad)) (set! (-> v1-3 vertex 1 quad) (-> arg0 vertex 1 quad)) (set! (-> v1-3 vertex 2 quad) (-> arg0 vertex 2 quad)) (set! (-> v1-3 intersect quad) (-> arg1 quad)) (set! (-> v1-3 color) (the-as vector4w arg2)) ) (set! *cam-debug-coll-tri-current* (+ *cam-debug-coll-tri-current* 1)) (if (>= *cam-debug-coll-tri-current* 460) (format 0 "ERROR : cam-debug-add-coll-tri overflow~%") ) ) ) 0 (none) ) ;; definition for function cam-debug-draw-tris ;; INFO: Used lq/sq (defun cam-debug-draw-tris () (camera-line-setup (new 'stack 'vector4w)) (when *display-cam-los-marks* (dotimes (gp-1 *cam-debug-los-tri-current*) (let ((v1-7 (-> *cam-debug-los-tri* gp-1 color quad))) (set! (-> (the-as cam-dbg-scratch #x70000000) color quad) v1-7) ) (camera-line-draw (the-as vector (+ (the-as uint (-> *cam-debug-los-tri* 0)) (* 80 gp-1))) (the-as vector (+ (the-as uint (-> *cam-debug-los-tri* 0 vertex 1)) (* 80 gp-1))) ) (camera-line-draw (the-as vector (+ (the-as uint (-> *cam-debug-los-tri* 0 vertex 1)) (* 80 gp-1))) (the-as vector (+ (the-as uint (-> *cam-debug-los-tri* 0 vertex 2)) (* 80 gp-1))) ) (camera-line-draw (the-as vector (+ (the-as uint (-> *cam-debug-los-tri* 0 vertex 2)) (* 80 gp-1))) (the-as vector (+ (the-as uint (-> *cam-debug-los-tri* 0)) (* 80 gp-1))) ) (camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) (-> *cam-debug-los-tri* gp-1 intersect) (-> *cam-debug-los-tri* gp-1 color) (meters 0.25) ) ) ) (when *display-cam-coll-marks* (dotimes (gp-2 *cam-debug-coll-tri-current*) (let ((v1-34 (-> *cam-debug-coll-tri* gp-2 color quad))) (set! (-> (the-as cam-dbg-scratch #x70000000) color quad) v1-34) ) (camera-line-draw (the-as vector (+ (the-as uint (-> *cam-debug-coll-tri* 0)) (* 80 gp-2))) (the-as vector (+ (the-as uint (-> *cam-debug-coll-tri* 0 vertex 1)) (* 80 gp-2))) ) (camera-line-draw (the-as vector (+ (the-as uint (-> *cam-debug-coll-tri* 0 vertex 1)) (* 80 gp-2))) (the-as vector (+ (the-as uint (-> *cam-debug-coll-tri* 0 vertex 2)) (* 80 gp-2))) ) (camera-line-draw (the-as vector (+ (the-as uint (-> *cam-debug-coll-tri* 0 vertex 2)) (* 80 gp-2))) (the-as vector (+ (the-as uint (-> *cam-debug-coll-tri* 0)) (* 80 gp-2))) ) (camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) (-> *cam-debug-coll-tri* gp-2 intersect) (-> *cam-debug-coll-tri* gp-2 color) (meters 0.25) ) ) #f ) ) ;; definition for function camera-fov-draw (defun camera-fov-draw ((arg0 int) (arg1 int) (arg2 vector) (arg3 float) (arg4 float) (arg5 vector4w)) (vector+float*! (the-as vector (-> (the-as cam-dbg-scratch #x70000000) fov-vv)) arg2 (the-as vector arg1) arg3 ) (vector+float*! (the-as vector (the-as (pointer vector) (+ 352 #x70000000))) arg2 (the-as vector arg0) arg3) (vector+float*! (the-as vector (+ 368 #x70000000)) arg2 (the-as vector arg0) arg4) (vector+float*! (the-as vector (+ 384 #x70000000)) arg2 (the-as vector arg1) arg4) (camera-line-setup arg5) (camera-line-draw (the-as vector (+ 336 #x70000000)) (the-as vector (+ 352 #x70000000))) (camera-line-draw (the-as vector (&+ (the-as (pointer vector) 352) #x70000000)) (the-as vector (+ 368 #x70000000)) ) (camera-line-draw (the-as vector (+ 368 #x70000000)) (the-as vector (+ 384 #x70000000))) (none) ) ;; definition for function camera-fov-frame ;; INFO: Used lq/sq ;; WARN: Return type mismatch none vs symbol. (defun camera-fov-frame ((arg0 matrix) (arg1 vector) (arg2 float) (arg3 float) (arg4 float) (arg5 vector4w)) (vector-float*! (-> (the-as cam-dbg-scratch #x70000000) fov-vert) (-> arg0 vector 1) (* arg3 (tan arg2))) (vector-float*! (-> (the-as cam-dbg-scratch #x70000000) fov-horz) (the-as vector (-> arg0 vector)) (* arg4 (tan arg2)) ) (vector+! (-> (the-as cam-dbg-scratch #x70000000) fov-src) (-> arg0 vector 2) (vector+! (-> (the-as cam-dbg-scratch #x70000000) fov-src) (-> (the-as cam-dbg-scratch #x70000000) fov-vert) (-> (the-as cam-dbg-scratch #x70000000) fov-horz) ) ) (vector-normalize! (-> (the-as cam-dbg-scratch #x70000000) fov-src) 1.0) (vector+! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) (-> arg0 vector 2) (vector-! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) (-> (the-as cam-dbg-scratch #x70000000) fov-vert) (-> (the-as cam-dbg-scratch #x70000000) fov-horz) ) ) (vector-normalize! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) 1.0) (camera-fov-draw (the-as int (-> (the-as cam-dbg-scratch #x70000000) fov-src)) (the-as int (-> (the-as cam-dbg-scratch #x70000000) fov-dest)) arg1 4096.0 20480.0 arg5 ) (set! (-> (the-as cam-dbg-scratch #x70000000) fov-src quad) (-> (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) fov-dest)) quad) ) (vector-! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) (-> arg0 vector 2) (vector+! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) (-> (the-as cam-dbg-scratch #x70000000) fov-vert) (-> (the-as cam-dbg-scratch #x70000000) fov-horz) ) ) (vector-normalize! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) 1.0) (camera-fov-draw (the-as int (-> (the-as cam-dbg-scratch #x70000000) fov-src)) (the-as int (-> (the-as cam-dbg-scratch #x70000000) fov-dest)) arg1 4096.0 20480.0 arg5 ) (set! (-> (the-as cam-dbg-scratch #x70000000) fov-src quad) (-> (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) fov-dest)) quad) ) (vector-! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) (-> arg0 vector 2) (vector-! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) (-> (the-as cam-dbg-scratch #x70000000) fov-vert) (-> (the-as cam-dbg-scratch #x70000000) fov-horz) ) ) (vector-normalize! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) 1.0) (camera-fov-draw (the-as int (-> (the-as cam-dbg-scratch #x70000000) fov-src)) (the-as int (-> (the-as cam-dbg-scratch #x70000000) fov-dest)) arg1 4096.0 20480.0 arg5 ) (set! (-> (the-as cam-dbg-scratch #x70000000) fov-src quad) (-> (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) fov-dest)) quad) ) (vector+! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) (-> arg0 vector 2) (vector+! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) (-> (the-as cam-dbg-scratch #x70000000) fov-vert) (-> (the-as cam-dbg-scratch #x70000000) fov-horz) ) ) (vector-normalize! (-> (the-as cam-dbg-scratch #x70000000) fov-dest) 1.0) (the-as symbol (camera-fov-draw (the-as int (-> (the-as cam-dbg-scratch #x70000000) fov-src)) (the-as int (-> (the-as cam-dbg-scratch #x70000000) fov-dest)) arg1 4096.0 20480.0 arg5 ) ) ) ;; definition for method 11 of type tracking-spline ;; WARN: Return type mismatch int vs none. (defmethod debug-point-info ((this tracking-spline) (arg0 int)) (if (= arg0 (-> this used-point)) (format 0 "u") (format 0 " ") ) (if (= arg0 (-> this next-to-last-point)) (format 0 "n") (format 0 " ") ) (if (= arg0 (-> this end-point)) (format 0 "e") (format 0 " ") ) (if (= arg0 -134250495) (format 0 " ~D~%" arg0) (format 0 " ~D ~M ~M ~M~%" arg0 (-> this point arg0 position x) (-> this point arg0 position y) (-> this point arg0 position z) ) ) 0 (none) ) ;; definition for method 12 of type tracking-spline ;; WARN: Return type mismatch int vs none. (defmethod debug-all-points ((this tracking-spline)) (let ((s5-0 (-> this used-point))) (while (!= s5-0 -134250495) (debug-point-info this s5-0) (set! s5-0 (-> this point s5-0 next)) ) (debug-point-info this s5-0) ) 0 (none) ) ;; definition for method 23 of type tracking-spline ;; WARN: Return type mismatch int vs none. (defmethod debug-draw-spline ((this tracking-spline)) (let ((s5-0 (-> this used-point))) (let ((s4-0 (-> this point (-> this used-point) next))) (let ((s3-0 (new 'stack-no-clear 'vector))) (when (!= s4-0 -134250495) (tracking-spline-method-19 this 0.0 s3-0 (the-as tracking-spline-sampler #f)) (camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) s3-0 (new 'static 'vector4w :x #xff :w #x80) (meters 0.25) ) (tracking-spline-method-19 this (-> this sample-len) s3-0 (the-as tracking-spline-sampler #f)) (camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) s3-0 (new 'static 'vector4w :x #xff :w #x80) (meters 0.25) ) ) ) (while (!= s4-0 -134250495) (camera-line (the-as vector (-> this point s5-0)) (the-as vector (-> this point s4-0)) (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) ) (set! s5-0 s4-0) (set! s4-0 (-> this point s4-0 next)) ) ) (if (!= s5-0 -134250495) (camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) (the-as vector (-> this point s5-0)) (new 'static 'vector4w :x #xff :w #x80) (meters 0.25) ) ) ) (let ((s5-1 (new 'stack-no-clear 'vector))) (camera-line (-> this debug-out-position) (-> this debug-old-position) (new 'static 'vector4w :x #xff :y #xff :w #x80) ) (vector-! s5-1 (-> this debug-out-position) (-> this debug-old-position)) (tracking-spline-method-20 this s5-1 (-> this debug-last-point)) (camera-line-rel (-> this debug-old-position) s5-1 (new 'static 'vector4w :x #xff :z #xff :w #x80)) ) 0 (none) ) ;; definition for function debug-euler (defun debug-euler ((arg0 cam-dbg-scratch)) (let ((s4-0 (new 'stack-no-clear 'euler-angles)) (gp-0 (new 'stack-no-clear 'matrix)) ) (matrix->eul s4-0 (the-as matrix (&-> arg0 crossvec 0 w)) 21) (format *stdcon* "euler angles x ~R y ~R z ~R~%" (-> s4-0 x) (-> s4-0 y) (-> s4-0 z)) (format *stdcon* "~f ~f ~f ~f~%" (-> arg0 crossvec 0 w) (-> arg0 crossvec 1 x) (-> arg0 crossvec 1 y) (-> arg0 crossvec 1 z) ) (format *stdcon* "~f ~f ~f ~f~%" (-> arg0 crossvec 1 w) (-> arg0 crossvec 2 x) (-> arg0 crossvec 2 y) (-> arg0 crossvec 2 z) ) (format *stdcon* "~f ~f ~f ~f~%" (-> arg0 crossvec 2 w) (-> arg0 bboxvec 0 x) (-> arg0 bboxvec 0 y) (-> arg0 bboxvec 0 z) ) (format *stdcon* "~f ~f ~f ~f~%" (-> arg0 bboxvec 0 w) (-> arg0 bboxvec 1 x) (-> arg0 bboxvec 1 y) (-> arg0 bboxvec 1 z) ) (eul->matrix gp-0 s4-0) (format *stdcon* "~f ~f ~f ~f~%" (-> gp-0 vector 0 x) (-> gp-0 vector 0 y) (-> gp-0 vector 0 z) (-> gp-0 vector 0 w) ) (format *stdcon* "~f ~f ~f ~f~%" (-> gp-0 vector 1 x) (-> gp-0 vector 1 y) (-> gp-0 vector 1 z) (-> gp-0 vector 1 w) ) (format *stdcon* "~f ~f ~f ~f~%" (-> gp-0 vector 2 x) (-> gp-0 vector 2 y) (-> gp-0 vector 2 z) (-> gp-0 vector 2 w) ) (format *stdcon* "~f ~f ~f ~f~%" (-> gp-0 trans x) (-> gp-0 trans y) (-> gp-0 trans z) (-> gp-0 trans w)) (if (or (< 0.001 (fabs (- (-> arg0 crossvec 0 w) (-> gp-0 vector 0 x)))) (< 0.001 (fabs (- (-> arg0 crossvec 1 x) (-> gp-0 vector 0 y)))) (< 0.001 (fabs (- (-> arg0 crossvec 1 y) (-> gp-0 vector 0 z)))) (< 0.001 (fabs (- (-> arg0 crossvec 1 z) (-> gp-0 vector 0 w)))) (< 0.001 (fabs (- (-> arg0 crossvec 1 w) (-> gp-0 vector 1 x)))) (< 0.001 (fabs (- (-> arg0 crossvec 2 x) (-> gp-0 vector 1 y)))) (< 0.001 (fabs (- (-> arg0 crossvec 2 y) (-> gp-0 vector 1 z)))) (< 0.001 (fabs (- (-> arg0 crossvec 2 z) (-> gp-0 vector 1 w)))) (< 0.001 (fabs (- (-> arg0 crossvec 2 w) (-> gp-0 vector 2 x)))) (< 0.001 (fabs (- (-> arg0 bboxvec 0 x) (-> gp-0 vector 2 y)))) (< 0.001 (fabs (- (-> arg0 bboxvec 0 y) (-> gp-0 vector 2 z)))) (< 0.001 (fabs (- (-> arg0 bboxvec 0 z) (-> gp-0 vector 2 w)))) (< 0.001 (fabs (- (-> arg0 bboxvec 0 w) (-> gp-0 trans x)))) (< 0.001 (fabs (- (-> arg0 bboxvec 1 x) (-> gp-0 trans y)))) (< 0.001 (fabs (- (-> arg0 bboxvec 1 y) (-> gp-0 trans z)))) (< 0.001 (fabs (- (-> arg0 bboxvec 1 z) (-> gp-0 trans w)))) ) (format *stdcon* "different~%") (format *stdcon* "same~%") ) ) ) ;; definition for function bike-cam-limit (defun bike-cam-limit ((arg0 float)) (let* ((f0-1 (* 10012.444 arg0)) (f30-0 (fmax 0.0 f0-1)) ) (if (< f30-0 8192.0) (* (/ 1.0 (- 1.0 (cos 21845.334))) (+ (- (cos 21845.334)) (cos (* 2.6666667 (- 8192.0 f30-0))))) 1.0 ) ) ) ;; definition for function camera-slave-debug ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun camera-slave-debug ((arg0 camera-slave)) (when *display-camera-marks* (if (-> *setting-control* cam-current use-point-of-interest) (camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) (-> *setting-control* cam-current point-of-interest) (new 'static 'vector4w :x #x80 :z #x80 :w #x80) (meters 0.25) ) ) (let ((f30-0 (* 0.5 (-> *camera-combiner* fov)))) (camera-fov-frame (-> *camera-combiner* inv-camera-rot) (camera-pos) f30-0 0.75 1.0 (new 'static 'vector4w :z #xff :w #x80) ) ) (cond ((= (-> arg0 blend-to-type) (camera-blend-to-type unknown-2)) (let ((f0-2 (* 0.5 (-> arg0 fov)))) (camera-fov-frame (the-as matrix (-> *camera-combiner* tracking)) (-> arg0 trans) f0-2 0.75 1.0 (new 'static 'vector4w :y #xff :w #x80) ) ) ) (else (let ((f0-4 (* 0.5 (-> arg0 fov)))) (camera-fov-frame (the-as matrix (-> arg0 tracking)) (-> arg0 trans) f0-4 0.75 1.0 (new 'static 'vector4w :y #xff :w #x80) ) ) ) ) (debug-draw-spline (-> arg0 position-spline)) (let ((s5-1 (new-stack-vector0))) (let ((s4-1 (new-stack-vector0))) (new-stack-matrix0) (cond ((and (-> arg0 next-state) (let ((v1-23 (-> arg0 next-state name))) (or (= v1-23 'cam-fixed) (= v1-23 'cam-eye) (= v1-23 'cam-point-watch) (= v1-23 'cam-free-floating)) ) ) (vector+float*! s5-1 (-> arg0 trans) (-> *camera* local-down) 4096.0) (camera-line (-> arg0 trans) s5-1 (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80)) ) ((= (-> arg0 blend-to-type) (camera-blend-to-type unknown-2)) (camera-line (-> *camera-combiner* tracking follow-pt) (-> arg0 trans) (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80) ) (vector+float*! s5-1 (-> *camera-combiner* tracking follow-pt) (-> *camera* local-down) 4096.0) (camera-line (-> *camera-combiner* tracking follow-pt) s5-1 (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80) ) ) (else (camera-line (-> arg0 tracking follow-pt) (-> arg0 trans) (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80) ) (vector+float*! s5-1 (-> arg0 tracking follow-pt) (-> *camera* local-down) 4096.0) (camera-line (-> arg0 tracking follow-pt) s5-1 (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80)) ) ) (set! (-> s4-1 quad) (-> arg0 trans quad)) (cond ((= (-> arg0 blend-to-type) (camera-blend-to-type unknown-2)) (vector+float*! s5-1 s4-1 (the-as vector (-> *camera-combiner* tracking)) 2048.0) (camera-line s4-1 s5-1 (new 'static 'vector4w :x #xff :w #x80)) (vector+float*! s5-1 s4-1 (-> *camera-combiner* tracking inv-mat vector 1) 2048.0) (camera-line s4-1 s5-1 (new 'static 'vector4w :y #xff :w #x80)) (vector+float*! s5-1 s4-1 (-> *camera-combiner* tracking inv-mat vector 2) 2048.0) (camera-line s4-1 s5-1 (new 'static 'vector4w :z #xff :w #x80)) ) (else (vector+float*! s5-1 s4-1 (the-as vector (-> arg0 tracking)) 2048.0) (camera-line s4-1 s5-1 (new 'static 'vector4w :x #xff :w #x80)) (vector+float*! s5-1 s4-1 (-> arg0 tracking inv-mat vector 1) 2048.0) (camera-line s4-1 s5-1 (new 'static 'vector4w :y #xff :w #x80)) (vector+float*! s5-1 s4-1 (-> arg0 tracking inv-mat vector 2) 2048.0) (camera-line s4-1 s5-1 (new 'static 'vector4w :z #xff :w #x80)) ) ) ) (vector--float*! s5-1 (-> *camera* tpos-curr) (-> *camera* local-down) (-> *setting-control* cam-current foot-offset) ) (camera-sphere s5-1 512.0 (new 'static 'vector4w :y #xff :w #x80)) (vector--float*! s5-1 (-> *camera* tpos-curr) (-> *camera* local-down) (-> *setting-control* cam-current head-offset) ) (camera-sphere s5-1 512.0 (new 'static 'vector4w :y #xff :w #x80)) ) (cond ((and (-> arg0 next-state) (= (-> arg0 next-state name) 'cam-string)) (camera-sphere (-> arg0 desired-pos) 512.0 (new 'static 'vector4w :z #xff :w #x80)) (camera-line-rel (-> *camera* tpos-curr-adj) (-> arg0 view-flat) (new 'static 'vector4w :z #xff :w #x80)) (camera-line (-> arg0 string-trans) (the-as vector (+ (the-as uint (-> *camera* target-spline)) (* 48 (-> arg0 los-tgt-spline-pt)))) (new 'static 'vector4w :y #xff :w #x80) ) (camera-line (-> arg0 los-last-pos) (the-as vector (+ (the-as uint (-> *camera* target-spline)) (* 48 (-> arg0 los-tgt-spline-pt)))) (new 'static 'vector4w :x #xff :w #x80) ) ) ((and (-> arg0 next-state) (= (-> arg0 next-state name) 'cam-circular)) (let ((a1-45 (new-stack-vector0))) (vector+float*! a1-45 (-> arg0 pivot-pt) (-> *camera* local-down) 4096.0) (camera-line (-> arg0 pivot-pt) a1-45 (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80)) ) (camera-line (-> arg0 pivot-pt) (-> arg0 trans) (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80)) ) ((and (-> arg0 next-state) (= (-> arg0 next-state name) 'cam-spline)) (let ((s5-2 (new 'stack 'curve)) (s4-2 (res-lump-struct (-> arg0 cam-entity) 'spline-offset structure)) ) (if (not s4-2) (set! s4-2 (new-stack-vector0)) ) (when (get-curve-data! (-> arg0 cam-entity) s5-2 'campath 'campath-k -1000000000.0) (let ((s3-0 (new-stack-vector0)) (s2-0 (new-stack-vector0)) (gp-1 (res-lump-data (-> arg0 cam-entity) 'campoints pointer :time 1.0)) ) (curve-get-pos! s2-0 0.0 s5-2) (vector+! s2-0 s2-0 (the-as vector s4-2)) (dotimes (s1-0 8) (set! (-> s3-0 quad) (-> s2-0 quad)) (curve-get-pos! s2-0 (* 0.125 (the float (+ s1-0 1))) s5-2) (vector+! s2-0 s2-0 (the-as vector s4-2)) (camera-line s3-0 s2-0 (new 'static 'vector4w :x #xff :y #xff :w #x80)) ) (dotimes (s1-1 (-> s5-2 num-cverts)) (vector+! s3-0 (-> s5-2 cverts s1-1) (the-as vector s4-2)) (vector+! s2-0 (-> s5-2 cverts (mod (+ s1-1 1) (-> s5-2 num-cverts))) (the-as vector s4-2)) (camera-line s3-0 s2-0 (new 'static 'vector4w :y #xff :z #xff :w #x80)) ) (if gp-1 (camera-line (the-as vector (&+ gp-1 0)) (the-as vector (&+ gp-1 16)) (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80) ) (camera-line (-> s5-2 cverts 0) (-> s5-2 cverts (+ (-> s5-2 num-cverts) -1)) (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80) ) ) ) ) ) ) ) ) 0 (none) ) ;; definition for function master-draw-coordinates ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun master-draw-coordinates ((arg0 vector)) (let ((s5-0 (new-stack-vector0)) (gp-0 (new-stack-vector0)) ) (let ((a0-1 (new-stack-matrix0))) (set-vector! s5-0 0.0 8192.0 0.0 1.0) (matrix-rotate-yxz! a0-1 s5-0) ) (vector+! gp-0 (-> *camera-combiner* trans) (vector-normalize-copy! gp-0 (-> *camera-combiner* inv-camera-rot vector 2) 24576.0) ) (let ((a1-4 s5-0) (v1-4 gp-0) (a0-3 s5-0) ) (set! (-> a0-3 x) 4096.0) (set! (-> a0-3 y) 0.0) (set! (-> a0-3 z) 0.0) (set! (-> a0-3 w) 1.0) (vector+! a1-4 v1-4 a0-3) ) (add-debug-line #t (bucket-id debug-no-zbuf1) gp-0 s5-0 (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1) ) (let ((a1-7 s5-0) (v1-5 gp-0) (a0-5 s5-0) ) (set! (-> a0-5 x) 0.0) (set! (-> a0-5 y) 4096.0) (set! (-> a0-5 z) 0.0) (set! (-> a0-5 w) 1.0) (vector+! a1-7 v1-5 a0-5) ) (add-debug-line #t (bucket-id debug-no-zbuf1) gp-0 s5-0 (new 'static 'rgba :g #xff :a #x80) #f (the-as rgba -1) ) (let ((a1-10 s5-0) (v1-6 gp-0) (a0-7 s5-0) ) (set! (-> a0-7 x) 0.0) (set! (-> a0-7 y) 0.0) (set! (-> a0-7 z) 4096.0) (set! (-> a0-7 w) 1.0) (vector+! a1-10 v1-6 a0-7) ) (add-debug-line #t (bucket-id debug-no-zbuf1) gp-0 s5-0 (new 'static 'rgba :b #xff :a #x80) #f (the-as rgba -1) ) (when arg0 (set! (-> s5-0 quad) (-> arg0 quad)) (vector-normalize! s5-0 4096.0) (vector+! s5-0 gp-0 s5-0) (add-debug-line #t (bucket-id debug-no-zbuf1) gp-0 s5-0 (new 'static 'rgba :r #x7f :g #x7f :a #x80) #f (the-as rgba -1) ) ) ) 0 (none) ) ;; definition of type cam-collision-record (deftype cam-collision-record (structure) ((pos vector :inline) (vel vector :inline) (desired-pos vector :inline) (cam-tpos-cur vector :inline) (cam-tpos-old vector :inline) (view-flat vector :inline) (string-min-val vector :inline) (string-max-val vector :inline) (view-off vector :inline) (min-z-override float) (string-push-z float) (view-off-param float) (frame int32) (iteration int32) (move-type symbol) ) ) ;; definition for method 3 of type cam-collision-record (defmethod inspect ((this cam-collision-record)) (when (not this) (set! this this) (goto cfg-4) ) (format #t "[~8x] ~A~%" this 'cam-collision-record) (format #t "~1Tpos: #~%" (-> this pos)) (format #t "~1Tvel: #~%" (-> this vel)) (format #t "~1Tdesired-pos: #~%" (-> this desired-pos)) (format #t "~1Tcam-tpos-cur: #~%" (-> this cam-tpos-cur)) (format #t "~1Tcam-tpos-old: #~%" (-> this cam-tpos-old)) (format #t "~1Tview-flat: #~%" (-> this view-flat)) (format #t "~1Tstring-min-val: #~%" (-> this string-min-val)) (format #t "~1Tstring-max-val: #~%" (-> this string-max-val)) (format #t "~1Tview-off: #~%" (-> this view-off)) (format #t "~1Tmin-z-override: ~f~%" (-> this min-z-override)) (format #t "~1Tstring-push-z: ~f~%" (-> this string-push-z)) (format #t "~1Tview-off-param: ~f~%" (-> this view-off-param)) (format #t "~1Tframe: ~D~%" (-> this frame)) (format #t "~1Titeration: ~D~%" (-> this iteration)) (format #t "~1Tmove-type: ~A~%" (-> this move-type)) (label cfg-4) this ) ;; definition of type cam-collision-record-array (deftype cam-collision-record-array (inline-array-class) ((data cam-collision-record :dynamic) ) ) ;; definition for method 3 of type cam-collision-record-array (defmethod inspect ((this cam-collision-record-array)) (when (not this) (set! this this) (goto cfg-4) ) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~1Tlength: ~D~%" (-> this length)) (format #t "~1Tallocated-length: ~D~%" (-> this allocated-length)) (format #t "~1Tdata[0] @ #x~X~%" (-> this data)) (label cfg-4) this ) ;; failed to figure out what this is: (set! (-> cam-collision-record-array heap-base) (the-as uint 176)) ;; definition for symbol *cam-collision-record-first*, type int (define *cam-collision-record-first* 0) ;; definition for symbol *cam-collision-record-last*, type int (define *cam-collision-record-last* 0) ;; definition for symbol *cam-collision-record-show*, type int (define *cam-collision-record-show* 0) ;; definition for symbol *cam-collision-record*, type cam-collision-record-array (define *cam-collision-record* (new 'debug 'cam-collision-record-array 600)) ;; definition for function cam-collision-record-save ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun cam-collision-record-save ((arg0 vector) (arg1 vector) (arg2 int) (arg3 symbol) (arg4 camera-slave)) (when *record-cam-collide-history* (let ((v1-5 (the-as cam-collision-record (+ (+ (* 176 *cam-collision-record-last*) 12) (the-as int *cam-collision-record*)) ) ) ) (set! (-> v1-5 pos quad) (-> arg0 quad)) (set! (-> v1-5 vel quad) (-> arg1 quad)) (set! (-> v1-5 view-flat quad) (-> arg4 view-flat quad)) (set! (-> v1-5 desired-pos quad) (-> arg4 desired-pos quad)) (set! (-> v1-5 cam-tpos-cur quad) (-> *camera* tpos-curr-adj quad)) (set! (-> v1-5 cam-tpos-old quad) (-> *camera* tpos-old-adj quad)) (set! (-> v1-5 string-min-val quad) (-> arg4 string-min-val quad)) (set! (-> v1-5 string-max-val quad) (-> arg4 string-max-val quad)) (set! (-> v1-5 view-off quad) (-> arg4 view-off quad)) (set! (-> v1-5 frame) (the-as int (current-time))) (set! (-> v1-5 iteration) arg2) (set! (-> v1-5 move-type) arg3) (set! (-> v1-5 min-z-override) (-> arg4 min-z-override)) (set! (-> v1-5 string-push-z) (-> *camera* string-push-z)) (set! (-> v1-5 view-off-param) (-> arg4 view-off-param)) ) (set! *cam-collision-record-show* *cam-collision-record-last*) (set! *cam-collision-record-last* (+ *cam-collision-record-last* 1)) (set! *cam-collision-record-last* (mod *cam-collision-record-last* 600)) (when (= *cam-collision-record-last* *cam-collision-record-first*) (set! *cam-collision-record-first* (+ *cam-collision-record-first* 1)) (set! *cam-collision-record-first* (mod *cam-collision-record-first* 600)) ) ) 0 (none) ) ;; definition for function cam-collision-record-step ;; WARN: Return type mismatch int vs none. (defun cam-collision-record-step ((arg0 int)) (set! *cam-collision-record-show* (+ *cam-collision-record-show* arg0)) (while (>= *cam-collision-record-show* 600) (set! *cam-collision-record-show* (+ *cam-collision-record-show* -600)) ) (while (< *cam-collision-record-show* 0) (set! *cam-collision-record-show* (+ *cam-collision-record-show* 600)) ) 0 (none) ) ;; definition for function cam-collision-record-draw ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun cam-collision-record-draw () (cond ((cpad-pressed? 0 down) (cam-collision-record-step 1) ) ((cpad-hold? 0 right) (cam-collision-record-step 1) ) ((cpad-pressed? 0 up) (cam-collision-record-step -1) ) ((cpad-hold? 0 left) (cam-collision-record-step -1) ) ) (let ((s5-0 (the-as object (+ (+ (* 176 *cam-collision-record-show*) 12) (the-as int *cam-collision-record*)))) (s4-0 (new 'stack 'vector4w)) (gp-0 (new 'stack 'vector4w)) ) (format *stdcon* "move-type ~A~%" (-> (the-as cam-collision-record s5-0) move-type)) (cond ((= (-> (the-as cam-collision-record s5-0) move-type) 'normal) (set! (-> s4-0 x) 255) (set! (-> s4-0 y) 255) ) ((= (-> (the-as cam-collision-record s5-0) move-type) 'jump) (set! (-> s4-0 x) 255) ) ((= (-> (the-as cam-collision-record s5-0) move-type) 'no-hit) (set! (-> s4-0 y) 255) ) (else (set! (-> s4-0 z) 255) ) ) (set! (-> s4-0 w) 128) (set! (-> gp-0 x) 127) (set! (-> gp-0 y) 127) (set! (-> gp-0 z) 127) (set! (-> gp-0 w) 128) (camera-line-rel-len (-> (the-as cam-collision-record s5-0) pos) (-> (the-as cam-collision-record s5-0) vel) (fmax 81.92 (vector-length (-> (the-as cam-collision-record s5-0) vel))) s4-0 ) (let ((s3-0 (new 'stack-no-clear 'collide-query))) (set! (-> s3-0 start-pos quad) (-> (the-as cam-collision-record s5-0) pos quad)) (set! (-> s3-0 move-dist quad) (-> (the-as cam-collision-record s5-0) vel quad)) (let ((v1-47 s3-0)) (set! (-> v1-47 radius) (-> *CAMERA-bank* collide-move-rad)) (set! (-> v1-47 collide-with) (collide-spec backgnd)) (set! (-> v1-47 ignore-process0) #f) (set! (-> v1-47 ignore-process1) #f) (set! (-> v1-47 ignore-pat) (new 'static 'pat-surface :nocamera #x1 :probe #x1 :noendlessfall #x1)) (set! (-> v1-47 action-mask) (collide-action solid)) ) (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* s3-0)) (s2-0 (new 'stack-no-clear 'vector)) ) (format *stdcon* "frame ~D iteration ~D travel ~f~%" (-> (the-as cam-collision-record s5-0) frame) (-> (the-as cam-collision-record s5-0) iteration) f30-0 ) (format *stdcon* "mzo ~M psz ~M vop ~f~%" (-> (the-as cam-collision-record s5-0) min-z-override) (-> (the-as cam-collision-record s5-0) string-push-z) (-> (the-as cam-collision-record s5-0) view-off-param) ) (format *stdcon* "pos ~M ~M ~M~%" (-> (the-as cam-collision-record s5-0) pos x) (-> (the-as cam-collision-record s5-0) pos y) (-> (the-as cam-collision-record s5-0) pos z) ) (format *stdcon* "vel ~M ~M ~M~%" (-> (the-as cam-collision-record s5-0) vel x) (-> (the-as cam-collision-record s5-0) vel y) (-> (the-as cam-collision-record s5-0) vel z) ) (format *stdcon* "des ~M ~M ~M~%" (-> (the-as cam-collision-record s5-0) desired-pos x) (-> (the-as cam-collision-record s5-0) desired-pos y) (-> (the-as cam-collision-record s5-0) desired-pos z) ) (format *stdcon* "flt ~M ~M ~M~%" (-> (the-as cam-collision-record s5-0) view-flat x) (-> (the-as cam-collision-record s5-0) view-flat y) (-> (the-as cam-collision-record s5-0) view-flat z) ) (format *stdcon* "cur ~M ~M ~M~%" (-> (the-as cam-collision-record s5-0) cam-tpos-cur x) (-> (the-as cam-collision-record s5-0) cam-tpos-cur y) (-> (the-as cam-collision-record s5-0) cam-tpos-cur z) ) (format *stdcon* "old ~M ~M ~M~%" (-> (the-as cam-collision-record s5-0) cam-tpos-old x) (-> (the-as cam-collision-record s5-0) cam-tpos-old y) (-> (the-as cam-collision-record s5-0) cam-tpos-old z) ) (format *stdcon* "smn ~M ~M ~M~%" (-> (the-as cam-collision-record s5-0) string-min-val x) (-> (the-as cam-collision-record s5-0) string-min-val y) (-> (the-as cam-collision-record s5-0) string-min-val z) ) (format *stdcon* "smx ~M ~M ~M~%" (-> (the-as cam-collision-record s5-0) string-max-val x) (-> (the-as cam-collision-record s5-0) string-max-val y) (-> (the-as cam-collision-record s5-0) string-max-val z) ) (format *stdcon* "vof ~M ~M ~M~%" (-> (the-as cam-collision-record s5-0) view-off x) (-> (the-as cam-collision-record s5-0) view-off y) (-> (the-as cam-collision-record s5-0) view-off z) ) (when (>= f30-0 0.0) (camera-line (the-as vector (-> s3-0 best-other-tri)) (-> s3-0 best-other-tri vertex 1) s4-0) (camera-line (-> s3-0 best-other-tri vertex 1) (-> s3-0 best-other-tri vertex 2) s4-0) (camera-line (-> s3-0 best-other-tri vertex 2) (the-as vector (-> s3-0 best-other-tri)) s4-0) (vector-! s2-0 (the-as vector (+ (the-as int s5-0) 0)) (-> s3-0 best-other-tri intersect)) (vector-normalize! s2-0 1.0) (camera-line-rel-len (-> s3-0 best-other-tri intersect) s2-0 (-> *CAMERA-bank* collide-move-rad) gp-0) (camera-line-rel-len (-> s3-0 best-other-tri intersect) (-> s3-0 best-other-tri normal) (-> *CAMERA-bank* collide-move-rad) gp-0 ) ) ) ) ) 0 (none) ) ;; definition for function camera-master-debug ;; WARN: Return type mismatch int vs none. (defun camera-master-debug ((arg0 camera-master)) (when *display-cam-other* (let ((f0-1 (* 0.5 (-> *camera-other-fov* data)))) (camera-fov-frame *camera-other-matrix* *camera-other-trans* f0-1 0.75 1.0 (new 'static 'vector4w :x #xff :w #x80) ) ) (camera-line *camera-other-trans* *camera-other-root* (new 'static 'vector4w :x #xff :y #xff :z #xff :w #x80)) (let ((s4-0 (new 'stack-no-clear 'vector)) (s5-0 *camera-other-trans*) ) (vector+float*! s4-0 s5-0 (the-as vector (-> *camera-other-matrix* vector)) 2048.0) (camera-line s5-0 s4-0 (new 'static 'vector4w :x #xff :w #x80)) (vector+float*! s4-0 s5-0 (-> *camera-other-matrix* vector 1) 2048.0) (camera-line s5-0 s4-0 (new 'static 'vector4w :y #xff :w #x80)) (vector+float*! s4-0 s5-0 (-> *camera-other-matrix* vector 2) 2048.0) (camera-line s5-0 s4-0 (new 'static 'vector4w :z #xff :w #x80)) ) ) (when *display-camera-last-attacker* (format *stdcon* "last attacker '") (let ((v1-16 (handle->process (-> last-try-to-look-at-data who)))) (if v1-16 (format *stdcon* "~S" (-> v1-16 name)) ) ) (format *stdcon* "'~%") ) (when *display-camera-old-stats* (format *stdcon* "old ~S cpu ~D old vu ~D (go to menu before comparing)~%" *camera-old-level* *camera-old-cpu* *camera-old-vu* ) (format *stdcon* "old tfrag-mem ~D~%" (sar *camera-old-tfrag-bytes* 10)) (format *stdcon* "~S~%" *camera-old-stat-string-tfrag-near*) (format *stdcon* "~S~%" *camera-old-stat-string-tfrag*) (format *stdcon* "~S~%" *camera-old-stat-string-total*) ) (if *display-cam-collide-history* (cam-collision-record-draw) ) (if *display-cam-master-marks* (debug-draw-spline (-> arg0 target-spline)) ) (if *display-xyz-axes* (master-draw-coordinates (the-as vector #f)) ) (cam-debug-draw-tris) 0 (none) ) ;; definition for function debug-set-camera-pos-rot! ;; INFO: Used lq/sq (defun debug-set-camera-pos-rot! ((arg0 vector) (arg1 matrix)) (when (and *camera* *camera-combiner*) (set! (-> *camera-combiner* trans quad) (-> arg0 quad)) (let* ((v1-6 (-> *camera-combiner* inv-camera-rot)) (a3-0 arg1) (a0-3 (-> a3-0 quad 0)) (a1-1 (-> a3-0 quad 1)) (a2-0 (-> a3-0 quad 2)) (a3-1 (-> a3-0 trans quad)) ) (set! (-> v1-6 quad 0) a0-3) (set! (-> v1-6 quad 1) a1-1) (set! (-> v1-6 quad 2) a2-0) (set! (-> v1-6 trans quad) a3-1) ) (set-setting-by-param *setting-control* 'mode-name 'cam-fixed 0 0) (cam-master-activate-slave #t) ) arg0 ) ;; definition (debug) for function cam-restore ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defun-debug cam-restore () (let ((a0-0 (new-stack-vector0)) (a1-0 (new-stack-matrix0)) ) (set! (-> a0-0 x) 1538892.5) (set! (-> a0-0 y) -274716.78) (set! (-> a0-0 z) -8318042.5) (set! (-> a0-0 w) 1.0) (set! (-> a1-0 vector 0 x) 0.4915) (set! (-> a1-0 vector 0 y) 0.0) (set! (-> a1-0 vector 0 z) -0.8708) (set! (-> a1-0 vector 0 w) 0.0) (set! (-> a1-0 vector 1 x) 0.7179) (set! (-> a1-0 vector 1 y) 0.5659) (set! (-> a1-0 vector 1 z) 0.4052) (set! (-> a1-0 vector 1 w) 0.0) (set! (-> a1-0 vector 2 x) 0.4928) (set! (-> a1-0 vector 2 y) -0.8244) (set! (-> a1-0 vector 2 z) 0.2782) (set! (-> a1-0 vector 2 w) 0.0) (set! (-> a1-0 trans x) 0.0) (set! (-> a1-0 trans y) 0.0) (set! (-> a1-0 trans z) 0.0) (set! (-> a1-0 trans w) 1.0) (debug-set-camera-pos-rot! a0-0 a1-0) ) (send-event *camera* 'set-fov 11650.845) (clear *camera-old-level*) (format *camera-old-level* "dig3a") (set! *camera-old-cpu* 4815) (set! *camera-old-vu* 6110) (set! *camera-old-tfrag-bytes* #xa0130) (clear *camera-old-stat-string-tfrag*) (clear *camera-old-stat-string-tfrag-near*) (clear *camera-old-stat-string-total*) (set! *display-camera-old-stats* #t) (set! (-> *tfrag-work* min-fragment) (the-as uint 318)) (set! (-> *tfrag-work* max-fragment) (the-as uint 319)) (none) )