Added Glitch Room Source code to Gitty

This commit is contained in:
Jeff Luke committed 2026-10-04 11:31:17 -07:00
commit 1ac9eb5644
505 files changed
+28504

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
@tool
extends Node2D
## Draw above actors in the same native-pixel coordinate system.
const FRAME := Rect2(0, 0, 224, 288)
func _process(_delta: float) -> void:
queue_redraw()
func _draw() -> void:
var outer := (get_global_transform_with_canvas().affine_inverse() * get_viewport_rect()).merge(FRAME)
draw_rect(Rect2(outer.position, Vector2(FRAME.position.x-outer.position.x, outer.size.y)), Color.BLACK)
draw_rect(Rect2(Vector2(FRAME.end.x,outer.position.y),Vector2(outer.end.x-FRAME.end.x,outer.size.y)), Color.BLACK)
draw_rect(Rect2(Vector2(0,outer.position.y),Vector2(FRAME.size.x,-outer.position.y)), Color.BLACK)
draw_rect(Rect2(Vector2(0,FRAME.end.y),Vector2(FRAME.size.x,outer.end.y-FRAME.end.y)), Color.BLACK)