Log In  

The graphics section of pico8.txt contains the following function definition

map mx my sx sy [w h [layer]]

    draw section of map (in cels) at screen position sx, sy (pixels)
    if layer is specified, only cels with the same flag number set are drawn
        // Bitfield. So 0x5 means draw sprites with bit 0 and bit 2 set.
        // defaults to all sprites
    exception: sprite 0 is always taken to mean empty.

this is actually the definition for mapdraw. Calling map() opens the map tab of the editor.

P#10032 2015-04-20 08:20 ( Edited 2018-01-26 21:51)

At least, I think it is? I'm not 100%, but calling map() is definitely opening the editor for me and isn't drawing anything to the screen

P#10033 2015-04-20 08:52 ( Edited 2015-04-20 12:52)

What do the demos use to draw the map?

P#10041 2015-04-20 11:19 ( Edited 2015-04-20 15:19)

Old post, but found this via a search engine.
mapdraw() is the legacy function but still supported (the demo jelpi.p8 uses it).
map() is the new name.

map() is the console doesn't seem to open the map editor anymore.

From the log:

v0.1.0
Changed: renamed mapdraw() to map() for consistency

P#48582 2018-01-26 16:51 ( Edited 2018-01-26 21:51)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 09:03:25 | 0.006s | Q:12