Mapdev:SMT format: Difference between revisions
From Spring
Jump to navigationJump to search
m fixed copy paste errors. |
m categorise |
||
| (3 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
= SMT(Spring Tile File) Reference = | = SMT(Spring Tile File) Reference = | ||
SMT is a binary format | SMT is a binary format | ||
* [https://github.com/spring/spring/tree/ | * [https://github.com/spring/spring/tree/master/rts/Map/SMF Relevant code] | ||
== File location == | == File location == | ||
maparchive.sd7/maps/ | maparchive.sd7/maps/filename.smt | ||
== Data Map == | == Data Map == | ||
| Line 28: | Line 28: | ||
! style="width: 20%" | Type !! Description | ! style="width: 20%" | Type !! Description | ||
|- | |- | ||
| 680 || <code>char[]</code> || Raw DXT1 compressed 32x32 pixel tiles. | | 680* || <code>char[]</code> || Raw DXT1 compressed 32x32 pixel tiles with 4 mip levels. | ||
|} | |} | ||
* | * | ||
* | * | ||
* | * | ||
: * dxt1 compression is consistent at 8 Bytes per 4x4 block of pixels. so for 4 mip levels (32x32, 16x16, 8x8, 4x4) we get 512 + 128 + 32 + 8 = 680 Bytes. | |||
[[Category:Map Dev]] | |||
Latest revision as of 22:16, 26 October 2013
SMT(Spring Tile File) Reference
SMT is a binary format
File location
maparchive.sd7/maps/filename.smt
Data Map
| Bytes | Type | Description |
|---|---|---|
| 16 | char[] |
Magic number; "spring tilefile\0" |
| 4 | int |
Version; 1 |
| 4 | int |
Number of tiles |
| 4 | int |
Size of the tiles; 32 |
| 4 | int |
Compression Type; 1(DXT1) |
| Bytes | Type | Description |
|---|---|---|
| 680* | char[] |
Raw DXT1 compressed 32x32 pixel tiles with 4 mip levels. |
- * dxt1 compression is consistent at 8 Bytes per 4x4 block of pixels. so for 4 mip levels (32x32, 16x16, 8x8, 4x4) we get 512 + 128 + 32 + 8 = 680 Bytes.