stdlib/tiledView source ↗
tiled
20 items · generated by scribe fromstdlib/tiled.fd· synced 2026-11-15
Contents
- TILED_FLIP_H: (const)
- TiledMap (struct)
- TiledObj (struct)
- tiled_open (function)
- tiled_gid (function)
- tiled_hflip (function)
- tiled_vflip (function)
- tiled_dflip (function)
- tiled_layer_count (function)
- tiled_layer_name (function)
- tiled_layer_type (function)
- tiled_layer_visible (function)
- tiled_tile_raw (function)
- tiled_tile (function)
- tiled_to_tilemap (function)
- tiled_object_count (function)
- tiled_object (function)
- tiled_obj_prop (function)
- tiled_map_prop (function)
TILED_FLIP_H:
pub const TILED_FLIP_H: i64 = 0x80000000; pub const TILED_FLIP_V: i64 = 0x40000000; pub const TILED_FLIP_D: i64 = 0x20000000; const FLIP_MASK: i64 = 0x1FFFFFFF;Defined at line 15
TiledMap
A parsed TMJ document (canonicalized JSON kept for property access).
pub struct TiledMap {Fields:
| Name | Type |
|---|---|
ok | bool |
json | str |
width | i64 |
height | i64 |
tile_w | i64 |
tile_h | i64 |
Defined at line 17
TiledObj
A Tiled object from an objectgroup layer.
pub struct TiledObj {Fields:
| Name | Type |
|---|---|
id | i64 |
name | str |
kind | str |
x | f64 |
y | f64 |
w | f64 |
h | f64 |
gid | i64 |
point | bool |
Defined at line 29
tiled_open
Parse a TMJ string. ok=false when the required top-level fields are absent or the map isn’t finite.
Example (native only): var m = tiled_open(”{“width”:2,“height”:1,“tilewidth”:16,“tileheight”:16,“layers”:[{“type”:“tilelayer”,“data”:[1,2]}]}”); println(int_to_str(tiled_tile(m, 0, 1, 0))); // 2
pub fn tiled_open(j: str) -> TiledMap {Parameters:
j:str
Returns: TiledMap
Defined at line 50
tiled_gid
Strip the flip flags from a raw gid.
pub fn tiled_gid(raw: i64) -> i64 {Parameters:
raw:i64
Returns: i64
Defined at line 71
tiled_hflip
pub fn tiled_hflip(raw: i64) -> bool {Parameters:
raw:i64
Returns: bool
Defined at line 74
tiled_vflip
pub fn tiled_vflip(raw: i64) -> bool {Parameters:
raw:i64
Returns: bool
Defined at line 77
tiled_dflip
pub fn tiled_dflip(raw: i64) -> bool {Parameters:
raw:i64
Returns: bool
Defined at line 80
tiled_layer_count
pub fn tiled_layer_count(m: TiledMap) -> i64 {Parameters:
m:TiledMap
Returns: i64
Defined at line 92
tiled_layer_name
Layer name/type/visibility/opacity for UI decisions.
pub fn tiled_layer_name(m: TiledMap, li: i64) -> str {Parameters:
m:TiledMapli:i64
Returns: str
Defined at line 101
tiled_layer_type
pub fn tiled_layer_type(m: TiledMap, li: i64) -> str {Parameters:
m:TiledMapli:i64
Returns: str
Defined at line 104
tiled_layer_visible
pub fn tiled_layer_visible(m: TiledMap, li: i64) -> bool {Parameters:
m:TiledMapli:i64
Returns: bool
Defined at line 107
tiled_tile_raw
Raw gid at (x,y) of tile layer li — flip bits included, 0 outside bounds or for non-tile layers. Tiled stores data row-major.
pub fn tiled_tile_raw(m: TiledMap, li: i64, x: i64, y: i64) -> i64 {Parameters:
m:TiledMapli:i64x:i64y:i64
Returns: i64
Defined at line 113
tiled_tile
gid with flip flags stripped.
pub fn tiled_tile(m: TiledMap, li: i64, x: i64, y: i64) -> i64 {Parameters:
m:TiledMapli:i64x:i64y:i64
Returns: i64
Defined at line 132
tiled_to_tilemap
Feed a tile layer into tilemap.fd — tiles > 0 become set cells. solid_layer: when >= 0, cells occupied in that layer mark the tile solid in the returned Tilemap. Both data arrays are fetched once; per-cell work is a single array index.
pub fn tiled_to_tilemap(m: TiledMap, li: i64, solid_layer: i64) -> Tilemap {Parameters:
m:TiledMapli:i64solid_layer:i64
Returns: Tilemap
Defined at line 140
tiled_object_count
pub fn tiled_object_count(m: TiledMap, li: i64) -> i64 {Parameters:
m:TiledMapli:i64
Returns: i64
Defined at line 174
tiled_object
Object oi of objectgroup layer li; id=0 when out of range.
pub fn tiled_object(m: TiledMap, li: i64, oi: i64) -> TiledObj {Parameters:
m:TiledMapli:i64oi:i64
Returns: TiledObj
Defined at line 190
tiled_obj_prop
First custom property name on an object as str ("" when absent). Properties are an array of {name, type, value} objects.
pub fn tiled_obj_prop(m: TiledMap, li: i64, oi: i64, name: str) -> str {Parameters:
m:TiledMapli:i64oi:i64name:str
Returns: str
Defined at line 220
tiled_map_prop
Map-level custom property (same {name,type,value} array).
pub fn tiled_map_prop(m: TiledMap, name: str) -> str {Parameters:
m:TiledMapname:str
Returns: str
Defined at line 253
Generated by scribe, the Fides documentation generator