Formats/SSXTricky:PBD Level File: Difference between revisions

From SSX Modding Wiki
No edit summary
No edit summary
Line 47: Line 47:
uint32 MeshDataOffset
uint32 MeshDataOffset
};
};
</syntaxhighlight>

=== Patch Data ===
<syntaxhighlight lang="c++">
public struct Patch
{
Vector4 LightMapPoint;

Vector4 UVPoint1;
Vector4 UVPoint2;
Vector4 UVPoint3;
Vector4 UVPoint4;

Vector4 R4C4;
Vector4 R4C3;
Vector4 R4C2;
Vector4 R4C1;
Vector4 R3C4;
Vector4 R3C3;
Vector4 R3C2;
Vector4 R3C1;
Vector4 R2C4;
Vector4 R2C3;
Vector4 R2C2;
Vector4 R2C1;
Vector4 R1C4;
Vector4 R1C3;
Vector4 R1C2;
Vector4 R1C1;

Vector3 LowestXYZ;
Vector3 HighestXYZ;

Vector4 Point1;
Vector4 Point2;
Vector4 Point3;
Vector4 Point4;

uint32 PatchStyle;
uint32 Unknown1;
uint16 TextureAssigment;
uint16 LightmapID;
uint32 Unknown2;
uint32 Unknown3;
uint32 Unknown4;
}
</syntaxhighlight>

=== Spline And Spline Segment Data ===
<syntaxhighlight lang="c++" line="1">
public struct Spline
{
Vector3 LowestXYZ;
Vector3 HighestXYZ;
uint32 Unknown1;
uint32 SplineSegmentCount;
uint32 SplineSegmentPosition;
uint32 Unknown2;
}

public struct SplinesSegments
{
Vector4 Point4;
Vector4 Point3;
Vector4 Point2;
Vector4 ControlPoint;
Vector4 ScalingPoint; //Not really sure about that
uint32 PreviousSegment;
uint32 NextSegment;
uint32 SplineParent;
Vector3 LowestXYZ;
Vector3 HighestXYZ;
float SegmentDisatnce;
float PreviousSegmentsDistance;
uint32 Unknown1;
}
</syntaxhighlight>
</syntaxhighlight>

Revision as of 23:07, 24 October 2022

PBD Header

enum class eDataFormatType : byte {
    GenericFormat,
    Ps2Format,
    XboxFormat,
    NgcFormat
};

struct tPbdHeader {
    byte version[3];
    eDataFormatType format;

    uint32 NumPlayerStarts;
    uint32 NumPatches;
    uint32 NumInstances;
    uint32 NumParticleInstances;
    uint32 NumMaterials;
    uint32 NumMaterialBlocks;
    uint32 NumLights;
    uint32 NumSplines;
    uint32 NumSplineSegments;
    uint32 NumTextureFlips;
    uint32 NumModels;
    uint32 NumParticleModels;
    uint32 NumTextures;
    uint32 NumCameras;
    uint32 LightMapSize;

    uint32 PlayerStartOffset;
    uint32 PatchOffset;
    uint32 InstanceOffset;
    uint32 ParticleInstancesOffset;
    uint32 MaterialOffset;
    uint32 MaterialBlocksOffset;
    uint32 LightsOffset;
    uint32 SplineOffset;
    uint32 SplineSegmentOffset;
    uint32 TextureFlipOffset;
    uint32 ModelPointerOffset;
    uint32 ModelsOffset;
    uint32 ParticleModelPointerOffset;
    uint32 ParticleModelsOffset;
    uint32 CameraPointerOffset;
    uint32 CamerasOffset;
    uint32 HashOffset;
    uint32 MeshDataOffset
};

Patch Data

public struct Patch
{
Vector4 LightMapPoint;

Vector4 UVPoint1;
Vector4 UVPoint2;
Vector4 UVPoint3;
Vector4 UVPoint4;

Vector4 R4C4;
Vector4 R4C3;
Vector4 R4C2;
Vector4 R4C1;
Vector4 R3C4;
Vector4 R3C3;
Vector4 R3C2;
Vector4 R3C1;
Vector4 R2C4;
Vector4 R2C3;
Vector4 R2C2;
Vector4 R2C1;
Vector4 R1C4;
Vector4 R1C3;
Vector4 R1C2;
Vector4 R1C1;

Vector3 LowestXYZ;
Vector3 HighestXYZ;

Vector4 Point1;
Vector4 Point2;
Vector4 Point3;
Vector4 Point4;

uint32 PatchStyle;
uint32 Unknown1;
uint16 TextureAssigment;
uint16 LightmapID;
uint32 Unknown2;
uint32 Unknown3; 
uint32 Unknown4; 
}

Spline And Spline Segment Data

    public struct Spline
    {
        Vector3 LowestXYZ;
        Vector3 HighestXYZ;
        uint32 Unknown1;
        uint32 SplineSegmentCount;
        uint32 SplineSegmentPosition;
        uint32 Unknown2;
    }

    public struct SplinesSegments
    {
        Vector4 Point4;
        Vector4 Point3;
        Vector4 Point2;
        Vector4 ControlPoint;
        Vector4 ScalingPoint; //Not really sure about that
        uint32 PreviousSegment;
        uint32 NextSegment;
        uint32 SplineParent;
        Vector3 LowestXYZ;
        Vector3 HighestXYZ;
        float SegmentDisatnce;
        float PreviousSegmentsDistance;
        uint32 Unknown1;
    }