jak-project/goal_src/engine/game/video.gc
Tyler Wilding 506b5d8ceb
Decompile: prototype | video | vol-h | air-h | nav-enemy-h | rigid-body-h (#575)
* decomp: `prototype` done

* tests/ref: Update all reference tests

* decomp: `video` done

* decomp: Add `video` to src

* decomp: `vol-h` done

* tests/ref: Update reference tests again

* decomp: Add `vol-h` to ref tests, leave `entity` in process as a `basic` for now!

* decomp: `air-h` done, compiler issue though

* decomp: `nav-enemy-h` done, compiler issue though

* decomp: `rigid-body-h` done, compiler issue though

* Address feedback and fix the failing to compile files

* linting

* finish `video` off
2021-06-12 21:52:55 -04:00

107 lines
3.3 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: video.gc
;; name in dgo: video
;; dgos: GAME, ENGINE
;; definition for function set-video-mode
;; INFO: Return type mismatch int vs none.
(defun set-video-mode ((arg0 symbol))
(let ((v1-0 arg0))
(cond
((= v1-0 'ntsc)
(set! (-> *video-parms* screen-sy) 224)
(set! (-> *setting-control* default screenx) 0)
(set! (-> *setting-control* default screeny) 8)
(set! (-> *video-parms* screen-pages-high) 7)
(set! (-> *video-parms* relative-y-scale) 1.0)
(set! *ticks-per-frame* 9765)
(set! (-> *math-camera* isometric vector 1 y) 0.5)
(set! (-> *math-camera* y-pix) 112.0)
(set! (-> *math-camera* y-clip) 448.0)
(set! (-> *shadow-data* texoffset y) 112.5)
)
((= v1-0 'pal)
(set! (-> *video-parms* screen-sy) 256)
(set! (-> *setting-control* default screenx) 0)
(set! (-> *setting-control* default screeny) 24)
(set! (-> *video-parms* screen-pages-high) 8)
(set! (-> *video-parms* relative-y-scale) 1.1428572)
(set! *ticks-per-frame* #x2dc6)
(set! (-> *math-camera* isometric vector 1 y) 0.4375)
(set! (-> *math-camera* y-pix) 128.0)
(set! (-> *math-camera* y-clip) 512.0)
(set! (-> *shadow-data* texoffset y) 128.5)
)
)
)
(set-time-ratios *display* (-> *display* time-ratio))
(set! (-> *video-parms* reset-video-mode) #t)
(set! (-> *video-parms* screen-hy) (/ (-> *video-parms* screen-sy) 2))
(set! (-> *video-parms* screen-miny) (- 2048 (-> *video-parms* screen-hy)))
(set! (-> *video-parms* screen-maxy) (+ (-> *video-parms* screen-hy) 2048))
(set! (-> *video-parms* screen-masky) (+ (-> *video-parms* screen-sy) -1))
(set!
(-> *pause-context* origin y)
(the float (+ (-> *video-parms* screen-sy) -54))
)
(set! (-> *pause-context* height) (the float (-> *video-parms* screen-sy)))
(set!
(-> *font-default-matrix* vector 1 y)
(-> *video-parms* relative-y-scale)
)
(set!
(-> *font-default-matrix* vector 3 y)
(- (the float (-> *video-parms* screen-hy)))
)
(set! (-> *video-parms* relative-y-scale-reciprical) 1.0)
(set! *profile-y* (+ (-> *video-parms* screen-miny) 8))
(set! (-> *video-parms* set-video-mode) #t)
(set-hud-aspect-ratio (get-aspect-ratio) arg0)
(if *progress-process*
(TODO-RENAME-23 (-> *progress-process* 0) (get-aspect-ratio) arg0)
)
(let ((v0-3 0))
)
(none)
)
;; definition for function get-video-mode
(defun get-video-mode ()
(-> *setting-control* current video-mode)
)
;; definition for function set-aspect-ratio
;; INFO: Return type mismatch int vs none.
(defun set-aspect-ratio ((arg0 symbol))
(let ((v1-0 arg0))
(cond
((= v1-0 'aspect4x3)
(set! (-> *video-parms* relative-x-scale) 1.0)
(set! (-> *video-parms* relative-x-scale-reciprical) 1.0)
)
((= v1-0 'aspect16x9)
(set! (-> *video-parms* relative-x-scale) 0.75)
(set! (-> *video-parms* relative-x-scale-reciprical) 1.3333334)
)
)
)
(set!
(-> *font-default-matrix* vector 0 x)
(-> *video-parms* relative-x-scale)
)
(set-hud-aspect-ratio arg0 (get-video-mode))
(if *progress-process*
(TODO-RENAME-23 (-> *progress-process* 0) arg0 (get-video-mode))
)
(let ((v0-2 0))
)
(none)
)
;; definition for function get-aspect-ratio
(defun get-aspect-ratio ()
(-> *setting-control* current aspect-ratio)
)