Log In  

Erroneous-looking interaction between draw y offset and character height in PICO-8 0.2.2c:

poke(0x5f5b, 0x62)  -- draw y=6, x=2
print("shifted\n\n")
-- prints 6 down, 2 over, full text visible

poke(0x5f5b, 0x72)  -- draw y=7, x=2
print("shifted\n\n")
-- prints 7 down, 2 over; text cut off vertically after first row of pixels
-- expected full text visible

poke(0x5f5b, 0x62)  -- draw y=6, x=2
print("shifted\n\n")
-- prints 6 down, 2 over; text cut off vertically after first two rows
-- expected full text visible

poke(0x5f59, 0xa4)  -- char size y=10, x=4
print("shifted\n\n")
-- prints 6 down, 2 over, full text visible

Setting draw y offset to 6 works as expected. Setting draw y offset to 7 appears to change some kind of state that cuts off characters vertically at a fixed height. Setting it back to 6 shows this state persists. Changing character height appears to clear this state.

I also experimented with different character height settings and noticed a character height of 6 prints no pixels, but 7 prints all pixels, and only after I had messed with the draw y offset as above. (The following have the expected effect from a clean reboot.)

poke(0x5f59, 0x64)
print("shifted\n\n")

poke(0x5f59, 0x74)
print("shifted\n\n")
P#96741 2021-08-31 21:23


[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 09:50:41 | 0.006s | Q:10