fix: Флип тайлов перенесен в рендер
This commit is contained in:
+16
-10
@@ -43,16 +43,16 @@ Tileset :: struct {
|
||||
}
|
||||
|
||||
Tileset_File :: struct {
|
||||
columns: int `json:"columns"`,
|
||||
columns: int `json:"columns"`,
|
||||
image: string `json:"image"`,
|
||||
image_height: int `json:"imageheight"`,
|
||||
image_width: int `json:"imagewidth"`,
|
||||
margin: int `json:"margin"`,
|
||||
image_height: int `json:"imageheight"`,
|
||||
image_width: int `json:"imagewidth"`,
|
||||
margin: int `json:"margin"`,
|
||||
name: string `json:"name"`,
|
||||
spacing: int `json:"spacing"`,
|
||||
tile_count: int `json:"tilecount"`,
|
||||
tile_height: int `json:"tileheight"`,
|
||||
tile_width: int `json:"tilewidth"`,
|
||||
spacing: int `json:"spacing"`,
|
||||
tile_count: int `json:"tilecount"`,
|
||||
tile_height: int `json:"tileheight"`,
|
||||
tile_width: int `json:"tilewidth"`,
|
||||
}
|
||||
|
||||
Tileset_Info :: struct {
|
||||
@@ -83,8 +83,14 @@ load_tileset :: proc(
|
||||
return {}, Map_Load_Error{type = .Err_Unmarshal, msg = fmt.aprintf("Error unmarshalling tileset: %v (%v)", path, unm_err)}
|
||||
}
|
||||
|
||||
assert(ts.margin == 0 && ts.spacing == 0, "Tilesets with margin/spacing are not supported")
|
||||
assert(ts.tile_width == 16 && ts.tile_height == 16, "Only 16x16 tiles are supported")
|
||||
assert(
|
||||
ts.margin == 0 && ts.spacing == 0,
|
||||
"Tilesets with margin/spacing are not supported",
|
||||
)
|
||||
assert(
|
||||
ts.tile_width == 16 && ts.tile_height == 16,
|
||||
"Only 16x16 tiles are supported",
|
||||
)
|
||||
|
||||
// image path in tiles.json is relative to the tileset file itself
|
||||
elem := [2]string{filepath.dir(path), ts.image}
|
||||
|
||||
Reference in New Issue
Block a user