2020-10-26 21:08:24 -04:00
|
|
|
;;-*-Lisp-*-
|
2020-09-04 14:44:23 -04:00
|
|
|
(in-package goal)
|
|
|
|
|
|
|
|
;; name: video.gc
|
|
|
|
;; name in dgo: video
|
|
|
|
;; dgos: GAME, ENGINE
|
|
|
|
|
2021-12-30 18:48:37 -05:00
|
|
|
;; DECOMP BEGINS
|
|
|
|
|
2021-06-12 21:52:55 -04:00
|
|
|
(defun set-video-mode ((arg0 symbol))
|
2021-12-30 18:48:37 -05:00
|
|
|
(case arg0
|
2021-07-11 16:35:25 -04:00
|
|
|
(('ntsc)
|
2021-06-12 21:52:55 -04:00
|
|
|
(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)
|
2021-12-30 18:48:37 -05:00
|
|
|
(set! *ticks-per-frame* 9765) ;; 585900 total?
|
2021-06-12 21:52:55 -04:00
|
|
|
(set! (-> *math-camera* isometric vector 1 y) 0.5)
|
2022-01-08 13:39:17 -05:00
|
|
|
(set! (-> *math-camera* y-pix) 112.0)
|
|
|
|
(set! (-> *math-camera* y-clip) 448.0)
|
2021-06-12 21:52:55 -04:00
|
|
|
(set! (-> *shadow-data* texoffset y) 112.5)
|
|
|
|
)
|
2021-07-11 16:35:25 -04:00
|
|
|
(('pal)
|
2021-06-12 21:52:55 -04:00
|
|
|
(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)
|
2021-12-30 18:48:37 -05:00
|
|
|
(set! *ticks-per-frame* 11718)
|
2021-06-12 21:52:55 -04:00
|
|
|
(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))
|
2021-12-30 18:48:37 -05:00
|
|
|
(set! (-> *pause-context* origin y) (the float (+ (-> *video-parms* screen-sy) -54)))
|
2021-06-12 21:52:55 -04:00
|
|
|
(set! (-> *pause-context* height) (the float (-> *video-parms* screen-sy)))
|
2021-12-30 18:48:37 -05:00
|
|
|
(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))))
|
2021-06-12 21:52:55 -04:00
|
|
|
(set! (-> *video-parms* relative-y-scale-reciprical) 1.0)
|
|
|
|
(set! *profile-y* (+ (-> *video-parms* screen-miny) 8))
|
|
|
|
(set! (-> *video-parms* set-video-mode) #t)
|
2021-12-30 18:48:37 -05:00
|
|
|
(set-hud-aspect-ratio (get-aspect-ratio) arg0)
|
2021-06-12 21:52:55 -04:00
|
|
|
(if *progress-process*
|
2021-09-06 20:35:03 -04:00
|
|
|
(adjust-ratios (-> *progress-process* 0) (get-aspect-ratio) arg0)
|
2021-07-11 16:35:25 -04:00
|
|
|
)
|
2021-12-30 18:48:37 -05:00
|
|
|
0
|
2021-06-12 21:52:55 -04:00
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defun get-video-mode ()
|
|
|
|
(-> *setting-control* current video-mode)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defun set-aspect-ratio ((arg0 symbol))
|
2021-12-30 18:48:37 -05:00
|
|
|
(case arg0
|
2021-07-11 16:35:25 -04:00
|
|
|
(('aspect4x3)
|
2021-06-12 21:52:55 -04:00
|
|
|
(set! (-> *video-parms* relative-x-scale) 1.0)
|
|
|
|
(set! (-> *video-parms* relative-x-scale-reciprical) 1.0)
|
|
|
|
)
|
2021-07-11 16:35:25 -04:00
|
|
|
(('aspect16x9)
|
2021-06-12 21:52:55 -04:00
|
|
|
(set! (-> *video-parms* relative-x-scale) 0.75)
|
|
|
|
(set! (-> *video-parms* relative-x-scale-reciprical) 1.3333334)
|
|
|
|
)
|
|
|
|
)
|
2021-12-30 18:48:37 -05:00
|
|
|
(set! (-> *font-default-matrix* vector 0 x) (-> *video-parms* relative-x-scale))
|
|
|
|
(set-hud-aspect-ratio arg0 (get-video-mode))
|
2021-06-12 21:52:55 -04:00
|
|
|
(if *progress-process*
|
2021-09-06 20:35:03 -04:00
|
|
|
(adjust-ratios (-> *progress-process* 0) arg0 (get-video-mode))
|
2021-07-11 16:35:25 -04:00
|
|
|
)
|
2021-12-30 18:48:37 -05:00
|
|
|
0
|
2021-06-12 21:52:55 -04:00
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defun get-aspect-ratio ()
|
|
|
|
(-> *setting-control* current aspect-ratio)
|
|
|
|
)
|
2021-12-30 18:48:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|