This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * writes a tilemap to a buffer | |
| * @param {id.TileMapElement} map the tilemap source | |
| * @return {id.Buffer} | |
| */ | |
| function buffer_get_tilemap(map) { | |
| var width = tilemap_get_width(map); | |
| var height = tilemap_get_height(map); | |
| var buffer = buffer_create(width * height * buffer_sizeof(buffer_u32), buffer_fixed, 1); | |
| for (var i = 0; i < width; i++) { |