mirror of
https://github.com/open-goal/jak-project
synced 2026-08-10 11:14:50 -04:00
d264779173
* d/jak2: finish `glist` and `glist-h` partially done `time-of-day` * d/jak2: finish `camera` and `cam-interface` * d/jak2: partially finish `cam-master` `cam-states`, and `cam-update` finish `cam-states-dbg` `cam-combiner` `cam-debug` and `cam-start` * tests: update ref tests * scripts: add scripts to automatically update gsrc files * d/jak2: update gsrc
126 lines
3.1 KiB
Common Lisp
126 lines
3.1 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: cam-debug-h.gc
|
|
;; name in dgo: cam-debug-h
|
|
;; dgos: ENGINE, GAME
|
|
|
|
;; NOTE - for cylinder
|
|
(define-extern camera-line (function vector vector vector4w none))
|
|
|
|
;; NOTE - for settings
|
|
(define-extern cam-free-floating (state camera-slave))
|
|
|
|
;; NOTE - for camera
|
|
(define-extern camera-line-rel-len (function vector vector float vector4w none))
|
|
(define-extern camera-slave-debug (function camera-slave none))
|
|
|
|
;; NOTE - for cam-states
|
|
(define-extern cam-collision-record-save (function vector vector int symbol camera-slave none))
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(declare-file (debug))
|
|
(when *debug-segment*
|
|
(define *redline-table* (the-as (pointer float) (malloc 'debug 1600)))
|
|
(define *redline-index* 0)
|
|
|
|
(defun float-save-redline ((arg0 float))
|
|
(set! (-> *redline-table* *redline-index*) arg0)
|
|
(set! *redline-index* (+ *redline-index* 1))
|
|
(when (>= *redline-index* 400)
|
|
(set! *redline-index* 0)
|
|
0
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defun float-lookup-redline ((arg0 float))
|
|
(let ((a0-3 (mod (+ (the int arg0) -1 *redline-index*) 400)))
|
|
(-> *redline-table* a0-3)
|
|
)
|
|
)
|
|
|
|
(define *blueline-table* (the-as (pointer float) (malloc 'debug 1600)))
|
|
(define *blueline-index* 0)
|
|
|
|
(defun float-save-blueline ((arg0 float))
|
|
(set! (-> *blueline-table* *blueline-index*) arg0)
|
|
(set! *blueline-index* (+ *blueline-index* 1))
|
|
(when (>= *blueline-index* 400)
|
|
(set! *blueline-index* 0)
|
|
0
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defun float-lookup-blueline ((arg0 float))
|
|
(let ((a0-3 (mod (+ (the int arg0) -1 *blueline-index*) 400)))
|
|
(-> *blueline-table* a0-3)
|
|
)
|
|
)
|
|
|
|
(define *greenline-table* (the-as (pointer float) (malloc 'debug 1600)))
|
|
(define *greenline-index* 0)
|
|
|
|
(defun float-save-greenline ((arg0 float))
|
|
(set! (-> *greenline-table* *greenline-index*) arg0)
|
|
(set! *greenline-index* (+ *greenline-index* 1))
|
|
(when (>= *greenline-index* 400)
|
|
(set! *greenline-index* 0)
|
|
0
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defun float-lookup-greenline ((arg0 float))
|
|
(let ((a0-3 (mod (+ (the int arg0) -1 *greenline-index*) 400)))
|
|
(-> *greenline-table* a0-3)
|
|
)
|
|
)
|
|
|
|
(define *yellowline-table* (the-as (pointer float) (malloc 'debug 1600)))
|
|
(define *yellowline-index* 0)
|
|
|
|
(defun float-save-yellowline ((arg0 float))
|
|
(set! (-> *yellowline-table* *yellowline-index*) arg0)
|
|
(set! *yellowline-index* (+ *yellowline-index* 1))
|
|
(when (>= *yellowline-index* 400)
|
|
(set! *yellowline-index* 0)
|
|
0
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defun float-lookup-yellowline ((arg0 float))
|
|
(let ((a0-3 (mod (+ (the int arg0) -1 *yellowline-index*) 400)))
|
|
(-> *yellowline-table* a0-3)
|
|
)
|
|
)
|
|
|
|
(define *timeplot-table* (the-as (pointer float) (malloc 'debug 1600)))
|
|
(define *timeplot-index* 0)
|
|
|
|
(defun float-save-timeplot ((arg0 float))
|
|
(set! (-> *timeplot-table* *timeplot-index*) arg0)
|
|
(set! *timeplot-index* (+ *timeplot-index* 1))
|
|
(when (>= *timeplot-index* 400)
|
|
(set! *timeplot-index* 0)
|
|
0
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defun float-lookup-timeplot ((arg0 float))
|
|
(let ((a0-3 (mod (+ (the int arg0) -1 *timeplot-index*) 400)))
|
|
(-> *timeplot-table* a0-3)
|
|
)
|
|
)
|
|
|
|
(define-perm *cam-layout* symbol #f)
|
|
|
|
)
|
|
|
|
|
|
|