mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-04-25 07:43:38 +03:00
45 lines
1000 B
Plaintext
45 lines
1000 B
Plaintext
//------------------------------------------------
|
|
//--- 010 Editor v10.0.2 Binary Template
|
|
//
|
|
// File: W2_LandDAT.bt
|
|
// Authors: Syroot
|
|
// Version: 0.1.0
|
|
// Purpose: Parse Worms 2 land generator data files.
|
|
// Category: Worms
|
|
// File Mask: land.dat
|
|
// ID Bytes:
|
|
// History:
|
|
// 0.1.0 2020-06-30 Initial version.
|
|
//------------------------------------------------
|
|
|
|
#include "Image.bt"
|
|
|
|
LittleEndian();
|
|
|
|
uint signature <format=hex>;
|
|
if (signature != 0x1A444E4C) // "LND\x1A"
|
|
{
|
|
Warning("Invalid LND signature.");
|
|
Exit(-1);
|
|
}
|
|
|
|
int fileSize;
|
|
int mapWidth;
|
|
int mapHeight;
|
|
int hasCavernBorder;
|
|
int numObjectLocations;
|
|
struct ObjectLocation
|
|
{
|
|
int x;
|
|
int y;
|
|
} objectLocations[numObjectLocations];
|
|
int unknown;
|
|
Image foregroundImage(true, false);
|
|
Image collisionImage(true, false);
|
|
Image backgroundImage(true, false);
|
|
Image unknownImage(true, false);
|
|
ubyte landTexPathLength;
|
|
char landTexPath[landTexPathLength];
|
|
ubyte waterDirPathLength;
|
|
char waterDirPath[waterDirPathLength];
|