mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
656489e942
* temp * temp2 * basic case support * working for or without else * support more cases * clean up to drawable headers * ocean * format json
111 lines
3.4 KiB
Common Lisp
111 lines
3.4 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))
|
|
(case arg0
|
|
(('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)
|
|
)
|
|
(('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)
|
|
|
|
;; NOTE: added nonzero check
|
|
(if (nonzero? set-hud-aspect-ratio)
|
|
(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))
|
|
(case arg0
|
|
(('aspect4x3)
|
|
(set! (-> *video-parms* relative-x-scale) 1.0)
|
|
(set! (-> *video-parms* relative-x-scale-reciprical) 1.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)
|
|
)
|
|
|
|
;; NOTE: added.
|
|
(if (nonzero? set-hud-aspect-ratio)
|
|
(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)
|
|
)
|