pancelor / p8x8

convert PICO-8 carts into picotron carts (some assembly required)
Other
20 stars 0 forks source link

basic tline support #8

Open pancelor opened 5 months ago

pancelor commented 5 months ago

If you're using tline() I suspect you'll have other compatibility issues with p8x8, but we should support basic tline usage if it's simple to do.

It probably isn't too bad, but I haven't looked into it at all. see baked/polyfill/map.lua for the stub

pancelor commented 2 months ago

I looked into it a bit. #mode7_demo is nice and understandable

https://www.lexaloffle.com/dl/docs/picotron_manual.html

tline3d(src, x0, y0, x1, y1, u0, v0, u1, v1, w0, w1, [flags])

Draw a textured line from (x0,y0) to (x1,y1), sampling colour values from userdata src. When src is type u8, it is considered to be a single texture image, and the coordinates are in pixels. When src is type i16 it is considered to be a map, and coordinates are in tiles.

the main blocker is a picotron bug where tline3d(mapud,...) only works if the map tiles are exactly 16x16