Skip to content
aspadm edited this page Aug 12, 2018 · 3 revisions

На русском

Format: MP

Description

Map header file

Structure

File contain one header:

struct header
{
    uint magic; // 72 F6 4A CE

    float max_altitude;
    uint x_chunks_count;
    uint y_chunks_count;
    
    uint textures_count;
    uint texture_size;

    uint tiles_count;
    uint tile_size;

    uint objects_count;
    uint animated_tiles_count;
};

Next to it struct object object_array[header.objects_count];:

enum terrain_type
{
    TOT_UNDEF,              // Unidentified
    TOT_TERRAIN,            // Base terrain type
    TOT_WATER_NOTEXTURE,    // Water without texture
    TOT_WATER,              // Textured water
    TOT_GRASS               // Textured grass
};

struct object
{
    uint type; // use enum terrain_type
    
    float r, g, b; // color
    float opacity;
    float self_illumination;

    float wave_multiplier;
    float warp_speed;

    uint reserved[3];
};

After that placed uint id_array[tiles_count]; - step sounds?

At the end placed struct animated animated_tiles[animated_tiles_count];:

struct animated
{
    ushort animated_tile_index;
    ushort animation_phases;
};

Clone this wiki locally