-
Notifications
You must be signed in to change notification settings - Fork 1
/
road.bin.bt
69 lines (62 loc) · 1.3 KB
/
road.bin.bt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//------------------------------------------------
//--- 010 Editor v8.0.1 Binary Template
//
// File:
// Authors: RoadTrain
// Version: 0.1
// Purpose: For parsing road.bin files from Mafia: The City of Lost Heaven.
// Category:
// File Mask: road.bin
// ID Bytes:
// History:
//------------------------------------------------
typedef struct
{
uint16 mUnk1;
byte mType;
byte mUnk2; // 0xCC
float mDistance;
} Lane;
typedef struct
{
uint16 mFarActiveCrossPoint;
uint16 mUnk1;
float mFarCrosspointDistance;
float mAngle; // radians
byte mUnk3[2];
uint32 mPriority; // right of way
byte mUnk5[2];
Lane mLanes[4];
} DirectionLink;
typedef struct
{
byte mDirectionLink;
byte mUnk1;
} WaypointLink;
typedef struct
{
float mPos[3];
byte mSemaphore;
byte mUnk1[3];
float mSpeed;
WaypointLink mWaypointLinks[4];
DirectionLink mDirectionLink[4];
} Crossroad;
typedef struct
{
float mPos[3];
float mSpeed;
byte mPrevPoint;
byte mPrevPointType;
byte mNextPoint;
byte mNextPointType;
byte mFarPrevCrosspoint;
byte mUnk1;
byte mFarNextCrosspoint;
byte mUnk2;
} Waypoint;
uint32 Magic;
uint32 numCrossroads;
Crossroad crossroads[numCrossroads];
uint32 numWaypoints;
Waypoint waypoints[numWaypoints];