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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Torch: Vertex Resource</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Torch
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(function(){initNavTree('otr_vertex.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div><div class="header">
<div class="headertitle"><div class="title">Vertex Resource </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1 class="doxsection"><a class="anchor" id="autotoc_md49"></a>
Vertex Resource (OVTX)</h1>
<p>If the Resource Type is <span class="tt">OVTX</span> (<span class="tt">0x4F565458</span>), the header is immediately followed by the vertex array definition.</p>
<h2 class="doxsection"><a class="anchor" id="autotoc_md50"></a>
Vertex Header</h2>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Offset </th><th class="markdownTableHeadLeft">Size </th><th class="markdownTableHeadLeft">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">0x40 </td><td class="markdownTableBodyLeft">4 </td><td class="markdownTableBodyLeft">u32 </td><td class="markdownTableBodyLeft">Count </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">0x44 </td><td class="markdownTableBodyLeft">... </td><td class="markdownTableBodyLeft">[Vtx] </td><td class="markdownTableBodyLeft">Array of Vtx structures </td></tr>
</table>
<h3 class="doxsection"><a class="anchor" id="autotoc_md51"></a>
Vtx Structure</h3>
<p>Each <span class="tt">Vtx</span> structure (16 bytes) represents a vertex for the N64 RCP:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Offset </th><th class="markdownTableHeadLeft">Size </th><th class="markdownTableHeadLeft">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">0x00 </td><td class="markdownTableBodyLeft">2 </td><td class="markdownTableBodyLeft">s16 </td><td class="markdownTableBodyLeft">X Position </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">0x02 </td><td class="markdownTableBodyLeft">2 </td><td class="markdownTableBodyLeft">s16 </td><td class="markdownTableBodyLeft">Y Position </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">0x04 </td><td class="markdownTableBodyLeft">2 </td><td class="markdownTableBodyLeft">s16 </td><td class="markdownTableBodyLeft">Z Position </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">0x06 </td><td class="markdownTableBodyLeft">2 </td><td class="markdownTableBodyLeft">u16 </td><td class="markdownTableBodyLeft">Flag </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">0x08 </td><td class="markdownTableBodyLeft">2 </td><td class="markdownTableBodyLeft">s16 </td><td class="markdownTableBodyLeft">Texture Coordinate S (10.5 fixed point) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">0x0A </td><td class="markdownTableBodyLeft">2 </td><td class="markdownTableBodyLeft">s16 </td><td class="markdownTableBodyLeft">Texture Coordinate T (10.5 fixed point) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">0x0C </td><td class="markdownTableBodyLeft">1 </td><td class="markdownTableBodyLeft">u8 </td><td class="markdownTableBodyLeft">Color Red / Normal X </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">0x0D </td><td class="markdownTableBodyLeft">1 </td><td class="markdownTableBodyLeft">u8 </td><td class="markdownTableBodyLeft">Color Green / Normal Y </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">0x0E </td><td class="markdownTableBodyLeft">1 </td><td class="markdownTableBodyLeft">u8 </td><td class="markdownTableBodyLeft">Color Blue / Normal Z </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">0x0F </td><td class="markdownTableBodyLeft">1 </td><td class="markdownTableBodyLeft">u8 </td><td class="markdownTableBodyLeft">Color Alpha </td></tr>
</table>
<h2 class="doxsection"><a class="anchor" id="autotoc_md52"></a>
YAML Configuration</h2>
<p>To define a vertex array asset in the configuration, use the <span class="tt">VTX</span> type.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Field </th><th class="markdownTableHeadLeft">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><span class="tt">type</span> </td><td class="markdownTableBodyLeft">String </td><td class="markdownTableBodyLeft">Must be <span class="tt">VTX</span>. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><span class="tt">offset</span> </td><td class="markdownTableBodyLeft">Integer </td><td class="markdownTableBodyLeft">The offset of the vertex array in the ROM/binary. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><span class="tt">count</span> </td><td class="markdownTableBodyLeft">Integer </td><td class="markdownTableBodyLeft">The number of Vtx structures to parse. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><span class="tt">symbol</span> </td><td class="markdownTableBodyLeft">String </td><td class="markdownTableBodyLeft">(Optional) The symbol name for the asset. </td></tr>
</table>
<p>Example: </p><div class="fragment"><div class="line">- type: VTX</div>
<div class="line"> offset: 0x8000</div>
<div class="line"> count: 32</div>
<div class="line"> symbol: my_vertex_buffer</div>
</div><!-- fragment --> </div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<div id="page-nav" class="page-nav-panel">
<div id="page-nav-resize-handle"></div>
<div id="page-nav-tree">
<div id="page-nav-contents">
</div><!-- page-nav-contents -->
</div><!-- page-nav-tree -->
</div><!-- page-nav -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a href="index.html">Torch Documentation</a></li><li class="navelem"><a href="otr_format.html">OTR File Format Specification</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li>
</ul>
</div>
</body>
</html>
|