diff options
author | Boutade <thegoofist@protonmail.com> | 2019-10-18 19:03:39 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2019-10-18 19:03:39 -0500 |
commit | 00d6e8c5f2e85a6c9d8ecf557da81f35c243b32b (patch) | |
tree | da10aa0fa04af99fad7798b0cf8ca8936492a34b /the-price-of-a-cup-of-coffee.lisp | |
parent | d972c27613455e8ca583540603bc00b24ec866eb (diff) |
tweaks
Diffstat (limited to 'the-price-of-a-cup-of-coffee.lisp')
-rw-r--r-- | the-price-of-a-cup-of-coffee.lisp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/the-price-of-a-cup-of-coffee.lisp b/the-price-of-a-cup-of-coffee.lisp index 5e51f17..efabf4e 100644 --- a/the-price-of-a-cup-of-coffee.lisp +++ b/the-price-of-a-cup-of-coffee.lisp @@ -98,8 +98,8 @@ :percent 0.0 :max-width width))) -(defmethod render :after ((cold-meter (eql *cold-meter*)) renderer) - (let ((x (round (* 0.45 (max-width cold-meter))))) +(defmethod render :after ((money-meter (eql *money-meter*)) renderer) + (let ((x (round (* +coffee-cost+ (max-width money-meter))))) (setf (sdl2:rect-x *status-meter-decoration-rect*) x) (sdl2:render-copy renderer *expression-texture* :source-rect (get-expression "coffee") @@ -417,7 +417,7 @@ (cdr vec)))) (push pause *tweens*))) -(defparameter +coffee-cost+ 0.55) +(defparameter +coffee-cost+ 0.45) (defun enough-for-coffee-p () (<= +coffee-cost+ (percent *money-meter*))) @@ -433,8 +433,8 @@ (setf *on-coffee-break* t) (let ((now (sdl2:get-ticks)) (dur 10000)) - (push (animate *cold-meter* 'percent 0.0 :ease #'cubic-in :duration dur :start now :rounding nil) *tweens*) - (push (animate *stress-meter* 'percent 0.1 :ease #'cubic-in :duration dur :start now :rounding nil) *tweens*) + (push (animate *cold-meter* 'percent 0.0 :duration dur :start now :rounding nil) *tweens*) + (push (animate *stress-meter* 'percent 0.1 :duration dur :start now :rounding nil) *tweens*) (pause-then dur (lambda () |