forked from kapuragu/FoxEngineTemplates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmotion.bt
115 lines (93 loc) · 1.71 KB
/
motion.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
//------------------------------------------------
//--- 010 Editor v7.0.2 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
/*
//Old
int32 unk0;
int count;
float length;
int unkn1;
int a, b,c,d;
typedef struct
{
float f[10]<bgcolor=cLtGreen>;
}Entry<optimize=false>;
Entry entry[count];
*/
//Mot head
//Contains camera motion also
/*
BaseRy
short n =(MotionHead[frame] + 12) + 6)
int m = n & 0xfffff000
floay y = m * 0.00001526
MaxFrame
MotHead[i] + 12
MotionInfo
MotHead[i] + 12 +8
*/
int a[2]<hidden=true>;
if(a[1] == 0)
{
FSeek(0);
int64 count;
}
else
{
FSeek(0);
int count;
int unkn;
}
int offset[count]<bgcolor=cLtGreen>;
typedef struct(int size)
{
byte data[size];
}Data<optimize=false>;
//--------------End of Mot header
//Type 1 and 2 human
//type 3 4 camera (Enbu-1 or regular)
//no type 5
local int i = 0;
local int size = 0;
local int id = 0;
local int minID = 0;
local int maxID = 0;
local int minSize = 9999999;
local int maxSize = -9999999;
for(i = 0; i < count; i++)
{
FSeek(offset[i]);
if(i == count-1)
size = FileSize() - offset[i];
else
size = offset[i+1] - offset[i];
if( i%2)
SetBackColor(cLtRed);
else
SetBackColor(cLtBlue);
if(size == 0)
continue;
if(size < minSize)
{
minSize = size;
minID = id;
}
if(size > maxSize)
{
maxSize = size;
maxID = id;
}
Data data(size)<optimize=false>;
id++;
}
SetBackColor(cNone);
Printf("Min: [%d] %d Max: [%d] %d -> Count: %d\n", minID, minSize, maxID, maxSize, id);