diff options
author | equa <equaa@protonmail.com> | 2021-04-22 13:42:54 -0500 |
---|---|---|
committer | equa <equaa@protonmail.com> | 2021-04-22 13:42:54 -0500 |
commit | 3c98f936af7754e9deb4912e54ec12a3df9b5938 (patch) | |
tree | e0d4299665116de3def40bb57e3d3fcb044c0af0 /lib | |
parent | ac0c1a1a6289998ed6f18a1f01772053d0b28d30 (diff) |
bad scaling
Diffstat (limited to 'lib')
-rw-r--r-- | lib/font.fnl | 6 | ||||
-rw-r--r-- | lib/player.fnl | 1 | ||||
-rw-r--r-- | lib/transition.fnl | 21 |
3 files changed, 17 insertions, 11 deletions
diff --git a/lib/font.fnl b/lib/font.fnl index 73a18b8..d7b9db8 100644 --- a/lib/font.fnl +++ b/lib/font.fnl @@ -1,2 +1,4 @@ -{:small (love.graphics.newFont "font/Montserrat-SemiBold.ttf" 12) - :big (love.graphics.newFont "font/Montserrat-SemiBold.ttf" 48)} +{12 (love.graphics.newFont "font/Montserrat-SemiBold.ttf" 12) + 24 (love.graphics.newFont "font/Montserrat-SemiBold.ttf" 24) + 48 (love.graphics.newFont "font/Montserrat-SemiBold.ttf" 48) + 96 (love.graphics.newFont "font/Montserrat-SemiBold.ttf" 96)} diff --git a/lib/player.fnl b/lib/player.fnl index 5fca05a..1b10b51 100644 --- a/lib/player.fnl +++ b/lib/player.fnl @@ -46,7 +46,6 @@ (love.graphics.polygon :fill -0.6 -0.4 0.6 0 -0.6 0.4)) (fn collide [self game id x y] - (print "ow!") (tset game.entities id nil) (tset game.grid x y (cell.init cells.boom))) diff --git a/lib/transition.fnl b/lib/transition.fnl index 376f123..096de9e 100644 --- a/lib/transition.fnl +++ b/lib/transition.fnl @@ -7,22 +7,27 @@ (state.draw self.present-state) ;; TODO: translation (love.graphics.reset) + (love.graphics.translate (/ width 2) (/ height 2)) + ;; TODO: this scaling is pretty limited and should probably get bigger! + (local scale (if (> height 600) + 2 + 1)) (love.graphics.setColor 0.8 0.8 0.8 (/ (math.max 0 (- self.age 30)) 10)) - (love.graphics.setFont font.big) + (love.graphics.setFont (. font (* 48 scale))) (love.graphics.printf (string.format (. translation.text self.type 1) (and self.level (translation.text.number self.level))) - (- (/ width 2) 500) - (- (/ height 2) 64) - 1000 + (* scale -500) + (* scale -64) + (* scale 1000) :center) - (love.graphics.setFont font.small) + (love.graphics.setFont (. font (* 12 scale))) (love.graphics.printf (string.format (. translation.text self.type 2) (and self.level (translation.text.number self.level))) - (- (/ width 2) 500) - (+ (/ height 2)) - 1000 + (* scale -500) + 0 + (* scale 1000) :center)) (fn update [self] |