-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcollision.txt
More file actions
203 lines (183 loc) · 4.41 KB
/
collision.txt
File metadata and controls
203 lines (183 loc) · 4.41 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
801C8CA0 collision context ?
80361028 col_vtx
8035AD78 col_poly
8035AB90 col_type
typedef struct
{
int16_t x;
int16_t y;
int16_t z;
} z64_xyz_t;
typedef struct
{
int16_t poly; /* index of z64_col_poly in scene file */
uint16_t next; /* index of next entry to process */
} z64_col_chunk_entry_t;
typedef struct
{
/* index of z64_col_type in scene file */
uint16_t type;
/* vertex indices, a and b are bitmasked for some reason */
struct
{
uint16_t unk_00_ : 3;
uint16_t va : 13;
};
struct
{
uint16_t unk_01_ : 3;
uint16_t vb : 13;
};
uint16_t vc;
/* normal vector */
z64_xyz_t norm;
/* plane distance from origin */
int16_t dist;
} z64_col_poly_t;
typedef struct
{
struct
{
uint32_t unk_00_ : 1;
uint32_t drop : 1; /* link drops one unit into the floor */
uint32_t special : 4;
uint32_t interaction : 5;
uint32_t unk_01_ : 3;
uint32_t behavior : 5;
uint32_t exit : 5;
uint32_t camera : 8;
} flags_1; /* 0x0000 */
struct
{
uint32_t pad_00_ : 4;
uint32_t wall_damage : 1;
uint32_t unk_00_ : 6;
uint32_t unk_01_ : 3;
uint32_t hookshot : 1;
uint32_t echo : 6;
uint32_t unk_02_ : 5;
uint32_t terrain : 2;
uint32_t material : 4;
} flags_2; /* 0x0004 */
} z64_col_type_t;
flags_1 0xFFFFFFFF
unk_00_ = ((flags_1 >> 31) & 0x00000001) (flags_1 & 0x80000000)
drop = ((flags_1 >> 30) & 0x00000001) (flags_1 & 0x40000000)
special = ((flags_1 >> 26) & 0x0000000F) (flags_1 & 0x3C000000)
interaction = ((flags_1 >> 21) & 0x0000001F) (flags_1 & 0x03E00000)
unk_01_ = ((flags_1 >> 18) & 0x00000007) (flags_1 & 0x001C0000)
behavior = ((flags_1 >> 13) & 0x0000001F) (flags_1 & 0x0003E000)
exit = ((flags_1 >> 8) & 0x0000001F) (flags_1 & 0x00001F00)
camera = ((flags_1 >> 0) & 0x000000FF) (flags_1 & 0x000000FF)
flags_2 0x0FFFFFFF
wall_damage = ((flags_2 >> 27) & 0x00000001) (flags_2 & 0x08000000)
unk_00_ = ((flags_2 >> 21) & 0x0000003F) (flags_2 & 0x07E00000)
unk_00_ = ((flags_2 >> 18) & 0x00000007) (flags_2 & 0x001C0000)
hookshot = ((flags_2 >> 17) & 0x00000001) (flags_2 & 0x00020000)
echo = ((flags_2 >> 11) & 0x0000003F) (flags_2 & 0x0001F800)
unk_01_ = ((flags_2 >> 6) & 0x0000001F) (flags_2 & 0x000007C0)
terrain = ((flags_2 >> 4) & 0x00000003) (flags_2 & 0x00000030)
material = ((flags_2 >> 0) & 0x0000000F) (flags_2 & 0x0000000F)
/* special */
0x0C: transition (void)
0x0B: link dives
0x0A: ??
0x09: link falls
0x08: edge stops link's speed
0x07: edge stops link's speed and pushes link back a bit
0x06: vine top (link grabs egde)
0x05: transition (load)
0x04: ??
0x03: ??
0x02: ??
0x01: ??
0x00: normal
/* interaction */
0x07 grab
0x06 crawl 2 (?)
0x05 crawl
0x04 vine
0x03 ladder top
0x02 ladder
0x01 not climbable
0x00 normal
/* behavior */
0x0C quicksand
0x0B link looks up ??
0x0A ??
0x09 void
0x08 jabu
0x07 quicksand
0x06 no recoil
0x05 ice
0x04 sand
0x03 lava
0x02 lava
0x01 ??
0x00 normal
/* exit */
0x01+ index in scene's exit list
0x00 nothing (last entrance for special 0x05 and 0x0C)
/* camera */
/* echo */
0x01+ echo level override
0x00 scene default
/* terrain */
0x01 slippery
0x00 normal
/* material */
0x0D carpet
0x0C ice
0x0B dirt
0x0A wood
0x09 plank
0x08 dirt
0x07 lava
0x06 grass
0x05 water
0x04 shallow water
0x03 wet stone
0x02 stone
0x01 sand
0x00 path
typedef struct
{
z64_xyz_t pos;
z64_xyz_t rot;
int16_t fov;
int16_t unk_00_;
} z64_camera_params_t;
typedef struct
{
uint16_t mode;
uint16_t unk_01_;
uint32_t seg_params;
} z64_camera_t;
typedef struct
{
z64_xyz_t pos;
int16_t width;
int16_t depth;
struct
{
uint32_t unk_00_ : 12;
uint32_t active : 1;
uint32_t group : 6; /* ? */
uint32_t unk_01_ : 5;
uint32_t camera : 8;
} flags;
} z64_col_water_t;
typedef struct
{
z64_xyz_t min;
z64_xyz_t max;
uint16_t n_vtx;
z64_xyz_t *vtx;
uint16_t n_poly;
z64_col_poly_t *poly;
z64_col_type_t *type;
z64_camera_t *camera;
uint16_t n_water;
z64_col_water_t *water;
} z64_col_hdr_t;
ctxt + 0x07C0 (801C8C60) z64_col_hdr_t *col_hdr;