36 Followers
89 Following
46 Posts
rodents, #pico8 tinkerer, software researcher
I can stop staring at this piece of paper now.

@zep playing around with `ud:take`, there seems to be a bug when using spans longer than 1: the last row will only have the first column populated.

repro:

function chunk(ud, x, y, w, h)
local s = ud:width()
local rows = userdata("i32", h)
h -= 1
rows:set(0, y*s+x)
rows:set(h, (y+h)*s+x)
return ud:take(rows:lerp(), nil, 0, 0, w)
end

function iota(n)
if (n > 0) return n, iota(n-1)
end

local data = vec(iota(8*8))
data:mutate("f64", 8, 8)
?pod(data)
?pod(chunk(data, 1, 2, 4, 3))

@zep, I unfortunately keep running into this bug that @pancelor found last year: https://www.lexaloffle.com/bbs/?tid=142550

it shows up in really unfortunate places: in the attached snippet, if the size of `data` is over 256, `slice` has one too many characters. uncommenting the `stat(1)` check fixes the issue.

@zep, I'm trying to `cstore` into a `.p8.rom`, but for some reason, that produces a png image (even though the extension is .p8.rom). is this expected behavior?
this is really underwhelming for the amount of work that went into it (rom filesystem, gui toolkit, actual gui, all from scratch), but I'm still happy with what I have so far.

@zep try importing the following sheet with this hardware palette: `pal({[0]=-16,-11,2,-8,8,-9,-4,13,12,-1,15,6,7,13,14,15},1)`

one of the dark reds gets confused for a darker shade, and peach becomes pink.