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
@@ -396,10 +396,12 @@
|
||||
var/y = text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32
|
||||
|
||||
//Calculate the "resolution" of screen based on client's view and world's icon size. This will work if the user can view more tiles than average.
|
||||
var/screenview = (user.client.view * 2 + 1) * world.icon_size //Refer to http://www.byond.com/docs/ref/info.html#/client/var/view for mad maths
|
||||
var/list/screenview = getviewsize(user.client.view)
|
||||
var/screenviewX = screenview[1] * world.icon_size
|
||||
var/screenviewY = screenview[2] * world.icon_size
|
||||
|
||||
var/ox = round(screenview/2) - user.client.pixel_x //"origin" x
|
||||
var/oy = round(screenview/2) - user.client.pixel_y //"origin" y
|
||||
var/ox = round(screenviewX/2) - user.client.pixel_x //"origin" x
|
||||
var/oy = round(screenviewY/2) - user.client.pixel_y //"origin" y
|
||||
angle = Atan2(y - oy, x - ox)
|
||||
return list(angle, p_x, p_y)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user