Files
jak-project/goal_src/engine/camera/cam-debug.gc
T
Tyler Wilding 44c43610ce game: Get camera code working (#965)
* cmake: disable edit&continue flags

* goos: make the build system work for alternate file paths nicely

* vs: update vs config

* vscode: extend terminal buffer!

* vs: fix presets

* debugger: fix exception handler

* game: add logo to application

* decomp: get `cam-master` to "work" -- manually changed return type

* debugger: fix printing issue

* game: get the camera actually working

* game: neutralize the analog sticks

* game: support analog sticks

* tests: update ref tests

* temp commit - inprogress stuff

* fix `send-macro`

* turn camera stuff back on, seems to work.  Still kernel-dispatch problem though

* address feedback

* formatting
2021-11-13 22:41:15 -05:00

33 lines
827 B
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: cam-debug.gc
;; name in dgo: cam-debug
;; dgos: GAME, ENGINE
(when *debug-segment*
(defun external-cam-reset! ()
(vector-reset! (-> *math-camera* trans))
(matrix-identity! (-> *math-camera* inv-camera-rot))
(when *camera-combiner*
(let* ((v1-6 (-> *math-camera* inv-camera-rot))
(a3-0 (-> *camera-combiner* inv-camera-rot))
(a0-2 (-> a3-0 vector 0 quad))
(a1-0 (-> a3-0 vector 1 quad))
(a2-0 (-> a3-0 vector 2 quad))
(a3-1 (-> a3-0 vector 3 quad))
)
(set! (-> v1-6 vector 0 quad) a0-2)
(set! (-> v1-6 vector 1 quad) a1-0)
(set! (-> v1-6 vector 2 quad) a2-0)
(set! (-> v1-6 vector 3 quad) a3-1)
)
(set! (-> *math-camera* trans quad) (-> *camera-combiner* trans quad))
)
0
(none)
)
)