Texel [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=43444 Bug: sset does not respect draw state <p>According to the documentation, all of PICO-8's drawing operations are subject to the draw state, however, the 'sset' called without it's third color parameter differs from 'pset' in that it does not respect the draw state.</p> <h3>Reproduce</h3> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>function validate() -- reset the draw state clip() camera() pal() color(6) -- set the corner pixel of both sprite and screen pset(0,0) sset(0,0) assert(pget(0,0)==6,&quot;screen color does not respect draw state&quot;) assert(sget(0,0)==6,&quot;sprite color does not respect draw state&quot;) end validate()</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p><strong>Observed</strong><br /> Excluding the c param of sset always writes 0 </p> <p><strong>Expected</strong><br /> Excluding the c param of sset should mirror pset and write with color/pal awareness, documentation should reflect this</p> <p><strong>Alternatively</strong><br /> The documentation should be updated that sset completely ignores draw state.</p> <p>An additional concern is pset respects the camera and clip states as well, which would be undesirable to bring in line with sset as it would likely break compatibility and not be intuitive- however currently sset's two parameter version is effectively broken and correcting it to be in line with pset shouldn't break existing carts.</p> https://www.lexaloffle.com/bbs/?tid=37244 https://www.lexaloffle.com/bbs/?tid=37244 Thu, 02 Apr 2020 14:47:50 UTC