View unanswered posts | View active topics It is currently Mon Nov 20, 2017 5:12 pm



Reply to topic  [ 1 post ] • Topic rating: Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average. 
 .TRK file format 
Author Message


Joined: Fri Aug 03, 2012 5:36 pm
Posts: 1
Post .TRK file format
Heres .trk file format as 010 editor template. I hope it will help someone.

Code:
//--------------------------------------
//--- 010 Editor v4.0.2 Binary Template
//
// File:
// Author:
// Revision:
// Purpose:
//--------------------------------------

struct Angle {
   UCHAR prc;
   UCHAR ang;
};

struct Point {
   USHORT x;
   USHORT y;
};

struct Pitstop {
   Point pos;
   Angle ang;
};

struct Entity {
   UCHAR id;
   UCHAR unknown;

   Point pos;
   Angle ang;
};

struct Line {
   USHORT x0;
   USHORT y0;
   USHORT x1;
   USHORT y1;
};

struct Texture_Line {
    int col:4;
    int len:12;
};

struct TRKINFO {
    CHAR header[4];
    CHAR unknown0[4];

    UCHAR world_size;
    UCHAR water_level;   
    USHORT view_angle;
   USHORT rotation;
   UCHAR zoom;
   UCHAR sf_line;
};

BitfieldDisablePadding();
TRKINFO info;

if( info.header != " GR" ){
    return -1;
}

UINT texture_line_count;
Texture_Line texture_lines[ texture_line_count ];

USHORT heightmap_size;
UCHAR heightmap[ heightmap_size ];

USHORT entity_count;
Entity entities[ entity_count ];

UCHAR pitstop_count;
Pitstop pitstops[ pitstop_count ];

UCHAR checkpoint_count;
Line checkpoints[ checkpoint_count ];

UCHAR limiter_count;
if( limiter_count > 0 ){
    Line limiters[ limiter_count ];
}

USHORT ai_line_count;
if( ai_line_count > 0 ){
    Point ai_line[ ai_line_count ];
}

UCHAR ai_pitline_count;
if( ai_pitline_count > 0 ){
    Point ai_pitline[ ai_pitline_count ];
}

CHAR unknown1[ 2 ];
CHAR author[ 30 ];
CHAR description[ 500 ];
//CHAR unknown2[ 20 ];
//CHAR reserved[ 9611 ];


Fri Aug 03, 2012 5:50 pm
Profile E-mail
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] • Topic rating: Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average. 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.