Skip to content

An OpenMW mod that lets you play the whole Elder Scrolls III: Morrowind as a top-down isometric game — with full online co-op or MMO modes.

C++
960 B
Raw Blame
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_H
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_SERIALIZATION_H

#include <cstddef>
#include <cstdint>
#include <vector>

namespace DetourNavigator
{
    class RecastMesh;
    struct DbRefGeometryObject;
    struct PreparedNavMeshData;
    struct RecastSettings;
    struct AgentBounds;

    constexpr char recastMeshMagic[] = { 'r', 'c', 's', 't' };
    constexpr std::uint32_t recastMeshVersion = 2;

    constexpr char preparedNavMeshDataMagic[] = { 'p', 'n', 'a', 'v' };
    constexpr std::uint32_t preparedNavMeshDataVersion = 1;

    std::vector<std::byte> serialize(const RecastSettings& settings, const AgentBounds& agentBounds,
        const RecastMesh& recastMesh, const std::vector<DbRefGeometryObject>& dbRefGeometryObjects);

    std::vector<std::byte> serialize(const PreparedNavMeshData& value);

    bool deserialize(const std::vector<std::byte>& data, PreparedNavMeshData& value);
}

#endif