Adds support for non-1:1 screen ratios (Doesn't add widescreen) (#32950)

* adds support for non-1:1 screen ratios for fullscreen overlays

* prevents future copypasta, adds widescreen support to clickcatchers

* oops, makes it actually compile

* HOPEFULLY makes it actually compile, makes projectiles and mouse_angle_from_client support widescreen

* i need shittier shitcode

* !!!HOPEFULLY!!! fixes the screen fuckery

* Fixes compiling errors. Tested locally, it seems like it works

* fixes runtime in mouse_angle_from_client

* Fixes non-1:1 TGUI runtimes for borgs and ghosts

* adds actual defines for fullscreen overlay resolution

* makes varediting view call change_view to make clickcatcher regenerate proper

* testmerge toggle widescreen verb and fixes vving view

* FUCK - fixes test verb to properly use change_view, so clickcatchers regenerate and such

* fixes parallax runtimes - how'd i miss this

* removes debug verb
This commit is contained in:
deathride58
2017-12-05 19:46:20 -06:00
committed by CitadelStationBot
parent bbfd36aace
commit c56003f6ff
11 changed files with 52 additions and 23 deletions
+2 -2
View File
@@ -16,9 +16,9 @@
if (client && screen.should_show_to(src))
client.screen += screen
if (screen.screen_loc == "CENTER-7,CENTER-7" && screen.view != client.view)
var/scale = (1 + 2 * client.view) / 15
var/list/actualview = getviewsize(client.view)
screen.view = client.view
screen.transform = matrix(scale, 0, 0, 0, scale, 0)
screen.transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
return screen
+6 -4
View File
@@ -255,11 +255,13 @@
/obj/screen/parallax_layer/proc/update_o(view)
if (!view)
view = world.view
var/count = Ceiling(view/(480/world.icon_size))+1
var/list/viewscales = getviewsize(view)
var/countx = Ceiling((viewscales[1]/2)/(480/world.icon_size))+1
var/county = Ceiling((viewscales[2]/2)/(480/world.icon_size))+1
var/list/new_overlays = new
for(var/x in -count to count)
for(var/y in -count to count)
for(var/x in -countx to countx)
for(var/y in -county to county)
if(x == 0 && y == 0)
continue
var/mutable_appearance/texture_overlay = mutable_appearance(icon, icon_state)