//------------------------------------------------ //--- 010 Editor v9.0.2 Binary Template // // File: KnyttStoriesWorld.bt // Authors: fe3dback@yandex.ru // Version: 1.0 // Purpose: Parse knytt stories world file (should by extracted from *.bin) // Category: Game // File Mask: Map // ID Bytes: 78 // History: // 1.0 2019-09-22 fe3dback@yandex.ru: Initial release //------------------------------------------------ typedef struct { ubyte tile[250]; } LAYER_SPRITE ; typedef struct { ubyte object[250]; ubyte bank[250]; } LAYER_BANK ; typedef struct { char label; local byte digitsCount = 1; local byte next; // x1000y1000 // ^ while (true) { next = ReadByte( FTell() + digitsCount ); // y || if (digitsCount >= 4 || (next == 121 || next == 0)) { break; } digitsCount++; } byte size[digitsCount]; } POS ; typedef struct { ubyte tileSetAId; ubyte tileSetBId; ubyte atmosAId; ubyte atmosBId; ubyte musicId; ubyte gradientId; } OPTIONS ; typedef struct { ubyte sysPosEnd; ubyte dummy[4]; } DUMMY ; typedef struct { LAYER_SPRITE bg0 ; LAYER_SPRITE bg1 ; LAYER_SPRITE bg2 ; LAYER_SPRITE solid3 ; LAYER_BANK bank4 ; LAYER_BANK bank5 ; LAYER_BANK bank6 ; LAYER_BANK bank7 ; } LAYERS; typedef struct { POS posX ; POS posY ; DUMMY dummy; LAYERS layers; OPTIONS options; } LEVEL ; typedef struct { while( !FEof() ) { LEVEL level; } } WORLD ; // ------------------------------------- string ReadLEVEL( LEVEL &level ) { local string x; local string y; local uint i; for (i=0;i