From dac4f21abaa8ac15e62e427e83c28b6e2f12723e Mon Sep 17 00:00:00 2001 From: ManDude <7569514+ManDude@users.noreply.github.com> Date: Sun, 12 Jun 2022 22:05:46 +0100 Subject: [PATCH] [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 --- decompiler/config/all-types.gc | 2 +- goal_src/engine/collide/collide-shape-h.gc | 4 ++-- goal_src/engine/game/crates.gc | 2 +- goal_src/engine/game/fact-h.gc | 2 +- goal_src/engine/game/game-info-h.gc | 10 +++++----- goal_src/levels/beach/seagull.gc | 1 - goal_src/levels/flut_common/target-flut.gc | 1 - goal_src/levels/village1/assistant.gc | 1 - goal_src/pc/anim-tester-x.gc | 3 ++- goal_src/pc/progress-pc.gc | 13 +++++++++---- 10 files changed, 21 insertions(+), 18 deletions(-) diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index 1d45432cbf..7668a603b0 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -10392,7 +10392,7 @@ (can-collect 8) (fade 9) (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) ;; strengths (touch 13) diff --git a/goal_src/engine/collide/collide-shape-h.gc b/goal_src/engine/collide/collide-shape-h.gc index 836a3a1c03..f7b4ff7cba 100644 --- a/goal_src/engine/collide/collide-shape-h.gc +++ b/goal_src/engine/collide/collide-shape-h.gc @@ -42,7 +42,7 @@ ;; - does not support a few of the weirder collision checks ;; 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. @@ -230,7 +230,7 @@ ;; 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 diff --git a/goal_src/engine/game/crates.gc b/goal_src/engine/game/crates.gc index 8dbbaca2a7..1680e910fe 100644 --- a/goal_src/engine/game/crates.gc +++ b/goal_src/engine/game/crates.gc @@ -490,7 +490,7 @@ (('iron) (case (-> arg3 param 1) (('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* (zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-9))) ) diff --git a/goal_src/engine/game/fact-h.gc b/goal_src/engine/game/fact-h.gc index feb666a697..3656a68483 100644 --- a/goal_src/engine/game/fact-h.gc +++ b/goal_src/engine/game/fact-h.gc @@ -79,7 +79,7 @@ (can-collect 8) (fade 9) (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) ;; strengths (touch 13) diff --git a/goal_src/engine/game/game-info-h.gc b/goal_src/engine/game/game-info-h.gc index 52e1c21ba8..964b15b42e 100644 --- a/goal_src/engine/game/game-info-h.gc +++ b/goal_src/engine/game/game-info-h.gc @@ -1,9 +1,9 @@ -; ;;-*-Lisp-*- -; (in-package goal) +;;-*-Lisp-*- +(in-package goal) -; ;; name: game-info-h.gc -; ;; name in dgo: game-info-h -; ;; dgos: GAME, ENGINE +;; name: game-info-h.gc +;; name in dgo: game-info-h +;; dgos: GAME, ENGINE ;; This file contains types for: ;; - the full game state (game-info) diff --git a/goal_src/levels/beach/seagull.gc b/goal_src/levels/beach/seagull.gc index 7ab8db7467..522e882d69 100644 --- a/goal_src/levels/beach/seagull.gc +++ b/goal_src/levels/beach/seagull.gc @@ -1,4 +1,3 @@ - ;;-*-Lisp-*- (in-package goal) diff --git a/goal_src/levels/flut_common/target-flut.gc b/goal_src/levels/flut_common/target-flut.gc index 6a820f8ca4..1f16d7b04f 100644 --- a/goal_src/levels/flut_common/target-flut.gc +++ b/goal_src/levels/flut_common/target-flut.gc @@ -1,4 +1,3 @@ - ;;-*-Lisp-*- (in-package goal) diff --git a/goal_src/levels/village1/assistant.gc b/goal_src/levels/village1/assistant.gc index ce73e014f6..5a720d6b06 100644 --- a/goal_src/levels/village1/assistant.gc +++ b/goal_src/levels/village1/assistant.gc @@ -1,4 +1,3 @@ - ;;-*-Lisp-*- (in-package goal) diff --git a/goal_src/pc/anim-tester-x.gc b/goal_src/pc/anim-tester-x.gc index 489a853071..1f4cec1bac 100644 --- a/goal_src/pc/anim-tester-x.gc +++ b/goal_src/pc/anim-tester-x.gc @@ -520,7 +520,8 @@ ) ) (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 (if (!= *master-mode* 'menu) diff --git a/goal_src/pc/progress-pc.gc b/goal_src/pc/progress-pc.gc index a031990112..83ed463c79 100644 --- a/goal_src/pc/progress-pc.gc +++ b/goal_src/pc/progress-pc.gc @@ -381,10 +381,15 @@ (until (or done? (= (length *temp-options*) max-options)) (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?)) - (add-resolution-option (* aspect (the float thisr)) thisr) + (when (and (not skip?) (< (length *temp-options*) max-options) + (<= thisy sy) (<= thisx sx) + (= aspect (/ (the float thisx) (the float thisy)))) + (add-resolution-option thisx thisy) )) (false! skip?) ) @@ -1030,7 +1035,7 @@ (set! (-> obj next-display-state) (progress-screen invalid)) ) ((= (-> 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))) (newy (the int (-> options (-> obj option-index) param2)))) (if (= (-> options (-> obj option-index) name) (game-text-id fit-to-screen))