clip is absolute screen position, unaffected by camera

This commit is contained in:
Kistaro Windrider 2024-12-24 17:37:31 -08:00
parent 538120e68d
commit 8610215c13
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -0,0 +1,26 @@
pico-8 cartridge // http://www.pico-8.com
version 42
__lua__
function _draw()
cls()
reset()
rectfill(5, 5, 100, 100, 13)
clip(10, 10, 80, 80)
rectfill(15, 5, 120, 120, 8)
clip()
rect(15, 5, 120, 120, 14)
camera(-25, -25)
clip(10, 10, 80, 80)
rectfill(15, 5, 120, 120, 3)
clip()
rect(15, 5, 120, 120, 11)
end
__gfx__
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000