Pederick [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=17094 layers argument to map() does not work as expected <p><a href="https://www.lexaloffle.com/dl/docs/pico-8_manual.html">The manual</a> describes <code>layers</code>, the optional last argument to <code>map()</code>, like so:</p> <p>&gt; LAYERS is a bitfield. When given, only sprites with matching sprite flags are drawn. For example, when LAYERS is 0x5, only sprites with flag 0 and 2 are drawn.</p> <p>To me, this example indicates that only sprites with <strong>both</strong> flags set should be drawn. However, testing shows that sprites with <em>either</em> flag set will be drawn.</p> <p> <table><tr><td> <a href="/bbs/?pid=111550#p"> <img src="/bbs/thumbs/pico8_pederick_mapflagtest-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=111550#p"> Map Flag Test</a><br><br> by <a href="/bbs/?uid=17094"> Pederick</a> <br><br><br> <a href="/bbs/?pid=111550#p"> [Click to Play]</a> </td></tr></table> </p> <p>If this is as intended, can the manual be updated to say &quot;or&quot; rather than &quot;and&quot;? Something like this:</p> <p>&gt; LAYERS is a bitfield. When given, only sprites with at least one matching sprite flag are drawn. For example, when LAYERS is 0x5, only sprites with flag 0 or 2 are drawn.</p> https://www.lexaloffle.com/bbs/?tid=47736 https://www.lexaloffle.com/bbs/?tid=47736 Mon, 09 May 2022 12:36:33 UTC