[game] fix bad resolutions menu options (#1448)

* Fix bad aspect ratios in resolutions menu

* fix typos

* hide resolutions that are too wide

* Update crates.gc
This commit is contained in:
ManDude 2022-06-12 22:05:46 +01:00 committed by GitHub
parent f43610c5ab
commit dac4f21aba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 21 additions and 18 deletions

View file

@ -10392,7 +10392,7 @@
(can-collect 8) (can-collect 8)
(fade 9) (fade 9)
(large 10) (large 10)
(rqeuire-zoomer 11) ;; iron, but need to be riding zoomer to break it. unused? (require-zoomer 11) ;; iron, but need to be riding zoomer to break it. only used in demo?
(powerup 12) (powerup 12)
;; strengths ;; strengths
(touch 13) (touch 13)

View file

@ -42,7 +42,7 @@
;; - does not support a few of the weirder collision checks ;; - does not support a few of the weirder collision checks
;; There is some duplicate implemenations because both the new and old system collide ;; There is some duplicate implemenations because both the new and old system collide
;; foreground meshes. The new system can just import foreground collision meshses ;; foreground meshes. The new system can just import foreground collision meshes
;; into its collide cache. ;; into its collide cache.
@ -230,7 +230,7 @@
;; Collision Primitive Base ;; Collision Primitive Base
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; These are the settings that can be set per primtive. ;; These are the settings that can be set per primitive.
(defenum collide-kind (defenum collide-kind

View file

@ -490,7 +490,7 @@
(('iron) (('iron)
(case (-> arg3 param 1) (case (-> arg3 param 1)
(('flop 'uppercut 'explode 'darkeco 'eco-yellow 'bonk 'racer 'tube 'flut-bonk 'flut-attack) (('flop 'uppercut 'explode 'darkeco 'eco-yellow 'bonk 'racer 'tube 'flut-bonk 'flut-attack)
(if (and (logtest? (-> self fact options) (fact-options rqeuire-zoomer)) (if (and (logtest? (-> self fact options) (fact-options require-zoomer))
*target* *target*
(zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-9))) (zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-9)))
) )

View file

@ -79,7 +79,7 @@
(can-collect 8) (can-collect 8)
(fade 9) (fade 9)
(large 10) (large 10)
(rqeuire-zoomer 11) ;; iron, but need to be riding zoomer to break it. unused? (require-zoomer 11) ;; iron, but need to be riding zoomer to break it. only used in demo?
(powerup 12) (powerup 12)
;; strengths ;; strengths
(touch 13) (touch 13)

View file

@ -1,9 +1,9 @@
; ;;-*-Lisp-*- ;;-*-Lisp-*-
; (in-package goal) (in-package goal)
; ;; name: game-info-h.gc ;; name: game-info-h.gc
; ;; name in dgo: game-info-h ;; name in dgo: game-info-h
; ;; dgos: GAME, ENGINE ;; dgos: GAME, ENGINE
;; This file contains types for: ;; This file contains types for:
;; - the full game state (game-info) ;; - the full game state (game-info)

View file

@ -1,4 +1,3 @@
;;-*-Lisp-*- ;;-*-Lisp-*-
(in-package goal) (in-package goal)

View file

@ -1,4 +1,3 @@
;;-*-Lisp-*- ;;-*-Lisp-*-
(in-package goal) (in-package goal)

View file

@ -1,4 +1,3 @@
;;-*-Lisp-*- ;;-*-Lisp-*-
(in-package goal) (in-package goal)

View file

@ -520,7 +520,8 @@
) )
) )
(compute-alignment! (-> self align)) (compute-alignment! (-> self align))
(align! (-> self align) (the align-opts 31) 1.0 1.0 1.0) (align! (-> self align) (align-opts adjust-x-vel adjust-y-vel adjust-xz-vel keep-other-velocities adjust-quat)
1.0 1.0 1.0)
) )
(else (else
(if (!= *master-mode* 'menu) (if (!= *master-mode* 'menu)

View file

@ -381,10 +381,15 @@
(until (or done? (= (length *temp-options*) max-options)) (until (or done? (= (length *temp-options*) max-options))
(countdown (i RESOLUTIONS) (countdown (i RESOLUTIONS)
(let ((thisr (the int (* mult (the float (-> *resolutions* i)))))) (let* ((thisr (the int (* mult (the float (-> *resolutions* i)))))
(thisx (the int (* aspect (the float thisr))))
(thisy thisr)
)
(when (and (< (length *temp-options*) max-options) (<= thisr sy) (not skip?)) (when (and (not skip?) (< (length *temp-options*) max-options)
(add-resolution-option (* aspect (the float thisr)) thisr) (<= thisy sy) (<= thisx sx)
(= aspect (/ (the float thisx) (the float thisy))))
(add-resolution-option thisx thisy)
)) ))
(false! skip?) (false! skip?)
) )
@ -1030,7 +1035,7 @@
(set! (-> obj next-display-state) (progress-screen invalid)) (set! (-> obj next-display-state) (progress-screen invalid))
) )
((= (-> options (-> obj option-index) option-type) (game-option-type aspect-new)) ((= (-> options (-> obj option-index) option-type) (game-option-type aspect-new))
;; resolution button. change resolution! ;; aspect ratio button.
(let ((newx (the int (-> options (-> obj option-index) param1))) (let ((newx (the int (-> options (-> obj option-index) param1)))
(newy (the int (-> options (-> obj option-index) param2)))) (newy (the int (-> options (-> obj option-index) param2))))
(if (= (-> options (-> obj option-index) name) (game-text-id fit-to-screen)) (if (= (-> options (-> obj option-index) name) (game-text-id fit-to-screen))