[IDB Ignore] Refactor icon smoothing to use 8-bit bitmasking (#16620)

This commit is contained in:
S34N
2021-12-15 16:04:24 +00:00
committed by GitHub
parent 5445b71cd5
commit ac6f9b4725
162 changed files with 1271 additions and 870 deletions
+2 -2
View File
@@ -57,8 +57,8 @@
// After docking //
/atom/proc/postDock(obj/docking_port/S1)
if(smooth)
queue_smooth(src)
if(smoothing_flags)
QUEUE_SMOOTH(src)
/mob/postDock()
update_parallax_contents()
+5 -3
View File
@@ -4,10 +4,12 @@
visual disturbances. It's probably best not to be on top of these \
when whatever is tunneling comes through."
icon = 'icons/turf/floors/ripple.dmi'
icon_state = "ripple"
icon_state = "ripple-0"
base_icon_state = "ripple"
anchored = TRUE
density = FALSE
smooth = SMOOTH_TRUE
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_RIPPLE)
layer = RIPPLE_LAYER
alpha = 0
duration = 3 * SHUTTLE_RIPPLE_TIME
@@ -15,5 +17,5 @@
/obj/effect/temp_visual/ripple/New()
. = ..()
queue_smooth(src)
QUEUE_SMOOTH(src)
animate(src, alpha=255, time=SHUTTLE_RIPPLE_TIME)
+2 -2
View File
@@ -11,8 +11,8 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate
setDir(angle2dir(rotation+dir2angle(dir)))
//resmooth if need be.
if(smooth && (params & ROTATE_SMOOTH))
queue_smooth(src)
if(params & ROTATE_SMOOTH && smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
QUEUE_SMOOTH(src)
//rotate the pixel offsets too.
if((pixel_x || pixel_y) && (params & ROTATE_OFFSET))