From 484322ee107a0d5e5182a69699c4262ca6b1176c Mon Sep 17 00:00:00 2001 From: a327ex Date: Mon, 17 May 2021 14:27:01 -0300 Subject: [PATCH] DPI hacks --- arena.lua | 6 ++++-- buy_screen.lua | 7 +++++++ main.lua | 14 ++++++++++++++ shared.lua | 1 + 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/arena.lua b/arena.lua index 245f248..aa3cca8 100644 --- a/arena.lua +++ b/arena.lua @@ -221,12 +221,14 @@ function Arena:on_enter(from, level, units, passives) if self.level == 1 then local t1 = Text2{group = self.floor, x = gw/2, y = gh/2 + 2, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]<- or a -> or d', font = fat_font, alignment = 'center'}}} local t2 = Text2{group = self.floor, x = gw/2, y = gh/2 + 18, lines = {{text = '[light_bg]turn left turn right', font = pixul_font, alignment = 'center'}}} - local t3 = Text2{group = self.floor, x = gw/2, y = gh/2 + 46, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]n - mute sfx', font = fat_font, alignment = 'center'}}} - local t4 = Text2{group = self.floor, x = gw/2, y = gh/2 + 68, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]m - mute music', font = fat_font, alignment = 'center'}}} + local t3 = Text2{group = self.floor, x = gw/2, y = gh/2 + 46, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]esc - options', font = fat_font, alignment = 'center'}}} + local t4 = Text2{group = self.floor, x = gw/2, y = gh/2 + 68, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]n - mute sfx', font = fat_font, alignment = 'center'}}} + local t5 = Text2{group = self.floor, x = gw/2, y = gh/2 + 90, sx = 0.6, sy = 0.6, lines = {{text = '[light_bg]m - mute music', font = fat_font, alignment = 'center'}}} t1.t:after(8, function() t1.t:tween(0.2, t1, {sy = 0}, math.linear, function() t1.sy = 0 end) end) t2.t:after(8, function() t2.t:tween(0.2, t2, {sy = 0}, math.linear, function() t2.sy = 0 end) end) t3.t:after(8, function() t3.t:tween(0.2, t3, {sy = 0}, math.linear, function() t3.sy = 0 end) end) t4.t:after(8, function() t4.t:tween(0.2, t4, {sy = 0}, math.linear, function() t4.sy = 0 end) end) + t5.t:after(8, function() t4.t:tween(0.2, t5, {sy = 0}, math.linear, function() t5.sy = 0 end) end) end -- Calculate class levels diff --git a/buy_screen.lua b/buy_screen.lua index 0e50676..cff90de 100644 --- a/buy_screen.lua +++ b/buy_screen.lua @@ -104,6 +104,13 @@ function BuyScreen:on_enter(from, level, units, passives) end} trigger:tween(1, main_song_instance, {volume = 0.2}, math.linear) + + if self.level == 1 then + self.screen_text = Text2{group = self.ui, x = gw/2, y = gh/2, lines = {{text = '[bg3]press K if screen is too large', font = pixul_font, alignment = 'center'}}} + self.t:after(8, function() + self.t:tween(0.2, self.screen_text, {sy = 0}, math.linear, function() self.screen_text.sy = 0 end) + end) + end end diff --git a/main.lua b/main.lua index 7974e68..215cb05 100644 --- a/main.lua +++ b/main.lua @@ -1240,6 +1240,20 @@ function update(dt) end end + if input.k.pressed then + sx, sy = sx - 1, sy - 1 + love.window.setMode(480*sx, 270*sy) + state.sx, state.sy = sx, sy + state.fullscreen = false + end + + if input.l.pressed then + sx, sy = sx + 1, sy + 1 + love.window.setMode(480*sx, 270*sy) + state.sx, state.sy = sx, sy + state.fullscreen = false + end + if input.f12.pressed then steam.userStats.resetAllStats(true) steam.userStats.storeStats() diff --git a/shared.lua b/shared.lua index 2428409..ba5cea8 100644 --- a/shared.lua +++ b/shared.lua @@ -497,6 +497,7 @@ global_text_tags = { purple = TextTag{draw = function(c, i, text) graphics.set_color(purple[0]) end}, blue = TextTag{draw = function(c, i, text) graphics.set_color(blue[0]) end}, bg = TextTag{draw = function(c, i, text) graphics.set_color(bg[0]) end}, + bg3 = TextTag{draw = function(c, i, text) graphics.set_color(bg[3]) end}, bg10 = TextTag{draw = function(c, i, text) graphics.set_color(bg[10]) end}, light_bg = TextTag{draw = function(c, i, text) graphics.set_color(bg[5]) end}, fg = TextTag{draw = function(c, i, text) graphics.set_color(fg[0]) end},