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:
committed by
CitadelStationBot
parent
bbfd36aace
commit
c56003f6ff
@@ -440,20 +440,20 @@
|
||||
mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
screen_loc = "CENTER"
|
||||
|
||||
/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 7, view_size_y = 7)
|
||||
/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
|
||||
var/icon/newicon = icon('icons/mob/screen_gen.dmi', "flash")
|
||||
if(view_size_x > 16 || view_size_y > 16)
|
||||
newicon.Scale((16 * 2 + 1) * world.icon_size,(16 * 2 + 1) * world.icon_size)
|
||||
if(view_size_x > 32 || view_size_y > 32)
|
||||
newicon.Scale(16 * world.icon_size,16 * world.icon_size)
|
||||
icon = newicon
|
||||
var/tx = view_size_x/16
|
||||
var/ty = view_size_y/16
|
||||
var/tx = ((view_size_x - 1)*0.5)/16
|
||||
var/ty = ((view_size_y - 1)*0.5)/16
|
||||
var/matrix/M = new
|
||||
M.Scale(tx, ty)
|
||||
transform = M
|
||||
screen_loc = "CENTER-16,CENTER-16"
|
||||
else
|
||||
screen_loc = "CENTER-[view_size_x],CENTER-[view_size_y]"
|
||||
newicon.Scale((view_size_x * 2 + 1) * world.icon_size,(view_size_y * 2 + 1) * world.icon_size)
|
||||
screen_loc = "CENTER-[(view_size_x-1)*0.5],CENTER-[(view_size_y-1)*0.5]"
|
||||
newicon.Scale(view_size_x * world.icon_size,view_size_y * world.icon_size)
|
||||
icon = newicon
|
||||
|
||||
/obj/screen/click_catcher/Click(location, control, params)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user