Added research data, testing blender mesh generation
This commit is contained in:
554
src_research_readme/mesh-info-pages/css/subpage-style.css
Normal file
554
src_research_readme/mesh-info-pages/css/subpage-style.css
Normal file
@@ -0,0 +1,554 @@
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.heading-1,
|
||||
.heading-2,
|
||||
.heading-3,
|
||||
.heading-4,
|
||||
.heading-5,
|
||||
.heading-6 {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
color: #222;
|
||||
margin-top: 0;
|
||||
font-weight: 400;
|
||||
text-rendering: optimizeLegibility;
|
||||
line-height: 1; }
|
||||
|
||||
h1,
|
||||
.heading-1 {
|
||||
font-size: 3rem;
|
||||
margin-bottom: 2.25rem; }
|
||||
|
||||
h2,
|
||||
.heading-2 {
|
||||
font-size: 2.25rem;
|
||||
margin-bottom: 1.5rem; }
|
||||
|
||||
h3,
|
||||
.heading-3 {
|
||||
font-size: 1.75rem;
|
||||
margin-bottom: 1.25rem; }
|
||||
|
||||
h4,
|
||||
.heading-4 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1rem; }
|
||||
|
||||
h5,
|
||||
.heading-5 {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 0.75rem; }
|
||||
|
||||
h6,
|
||||
.heading-6 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.5rem; }
|
||||
|
||||
h2,
|
||||
h5,
|
||||
h6 {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.15); }
|
||||
|
||||
h2 {
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 0.5rem; }
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
margin-bottom: 1rem;
|
||||
margin-top: 0; }
|
||||
|
||||
small {
|
||||
font-size: 65%; }
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p {
|
||||
hyphens: auto; }
|
||||
|
||||
.anchor {
|
||||
font-size: 50%;
|
||||
padding-right: 0.3em;
|
||||
padding-left: 0.3em;
|
||||
display: none; }
|
||||
|
||||
h1:hover .anchor,
|
||||
h2:hover .anchor,
|
||||
h3:hover .anchor,
|
||||
h4:hover .anchor,
|
||||
h5:hover .anchor,
|
||||
h6:hover .anchor {
|
||||
display: inline; }
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin: 0 0 1rem; }
|
||||
ul li,
|
||||
ol li {
|
||||
text-align: justify; }
|
||||
ul li p,
|
||||
ol li p {
|
||||
margin-bottom: 0; }
|
||||
|
||||
ul {
|
||||
padding-left: 1.6rem; }
|
||||
|
||||
dl {
|
||||
margin: 0; }
|
||||
dl dt {
|
||||
font-weight: bold; }
|
||||
dl dd {
|
||||
margin-left: 1.6rem; }
|
||||
|
||||
ol {
|
||||
counter-reset: item;
|
||||
padding: 0; }
|
||||
ol > li {
|
||||
counter-increment: item;
|
||||
list-style-type: none;
|
||||
text-indent: -1.6rem;
|
||||
padding-left: 1.6rem; }
|
||||
ol > li:before {
|
||||
content: counter(item) ".";
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
width: 1.3rem;
|
||||
padding-right: 0.3rem;
|
||||
font-weight: bold; }
|
||||
ol > li.fancy-block:before {
|
||||
background: black;
|
||||
color: white; }
|
||||
|
||||
ul.collapsed {
|
||||
list-style: none;
|
||||
padding: 0; }
|
||||
ul.collapsed li {
|
||||
display: inline-block; }
|
||||
|
||||
ul.blocks,
|
||||
ol.blocks {
|
||||
list-style: none;
|
||||
padding: 0; }
|
||||
|
||||
pre,
|
||||
code {
|
||||
font-family: Monaco, Consolas, monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
tab-size: 4; }
|
||||
|
||||
pre,
|
||||
:not(pre) > code {
|
||||
background: rgba(0, 0, 0, 0.066); }
|
||||
|
||||
pre {
|
||||
border-radius: 0.199em;
|
||||
margin: 0.5em 0;
|
||||
padding: 1em; }
|
||||
|
||||
:not(pre) > code {
|
||||
padding: 0.15em 0.2em 0.05em;
|
||||
border-radius: 0.333em; }
|
||||
|
||||
h1 > code,
|
||||
h2 > code,
|
||||
h3 > code,
|
||||
h4 > code,
|
||||
h5 > code,
|
||||
h6 > code {
|
||||
background: none; }
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin-bottom: 1rem;
|
||||
border-collapse: collapse; }
|
||||
table thead {
|
||||
border-bottom: 2px solid rgba(0, 0, 0, 0.15); }
|
||||
table thead .title {
|
||||
text-transform: uppercase; }
|
||||
table tbody tr:nth-child(odd) {
|
||||
background: rgba(0, 0, 0, 0.033); }
|
||||
table td,
|
||||
table th {
|
||||
padding: 0.1rem 0.666rem;
|
||||
text-align: left;
|
||||
vertical-align: top; }
|
||||
table td p,
|
||||
table th p {
|
||||
margin: 0; }
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: row-reverse;
|
||||
flex-wrap: wrap; }
|
||||
.tags .tag {
|
||||
padding: 0.33em 0.66em;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 0.3333em;
|
||||
font-size: 65%; }
|
||||
|
||||
.page-title {
|
||||
margin: 0; }
|
||||
|
||||
.container {
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
flex-direction: row; }
|
||||
.container.padded {
|
||||
margin: 3vh auto 2rem; }
|
||||
@media screen and (min-width: 1200px) {
|
||||
.container {
|
||||
width: 1160px; } }
|
||||
@media screen and (max-width: 1199px) {
|
||||
.container {
|
||||
width: 952px; } }
|
||||
@media screen and (max-width: 991px) {
|
||||
.container {
|
||||
width: 85%;
|
||||
flex-direction: column; } }
|
||||
@media screen and (max-width: 767px) {
|
||||
.container {
|
||||
width: 90%;
|
||||
flex-direction: column; } }
|
||||
@media screen and (max-width: 991px) {
|
||||
.container {
|
||||
flex-direction: column;
|
||||
margin-top: 2rem; } }
|
||||
.container .menu {
|
||||
flex: 0 0 280px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: stretch; }
|
||||
@media screen and (min-width: 768px) {
|
||||
.container .menu {
|
||||
padding: 0 0.66rem 0 0; } }
|
||||
@media screen and (max-width: 991px) {
|
||||
.container .menu {
|
||||
flex: 1 1 auto; } }
|
||||
.container .menu a.home {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch; }
|
||||
.container .menu .logo {
|
||||
max-width: 100px;
|
||||
height: auto;
|
||||
align-self: center; }
|
||||
.container .menu .hr {
|
||||
text-align: center; }
|
||||
.container .menu .navigation {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap; }
|
||||
.container .menu .navigation .link {
|
||||
margin-left: 1rem; }
|
||||
.container .menu .navigation .category:not(:first-child) {
|
||||
margin-top: 1.25rem; }
|
||||
.container .menu .navigation .category .category-title {
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px; }
|
||||
.container .content {
|
||||
flex: 5;
|
||||
padding-top: 8px; }
|
||||
@media screen and (min-width: 768px) {
|
||||
.container .content {
|
||||
padding-left: 1rem; } }
|
||||
.container .content .content-header {
|
||||
height: 92px; }
|
||||
.container .content .content-header .content-title {
|
||||
margin-bottom: 0; }
|
||||
.container .content .block {
|
||||
margin-bottom: 3rem; }
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select,
|
||||
option {
|
||||
color: #444; }
|
||||
|
||||
input,
|
||||
select {
|
||||
padding: 0.15rem 0.93rem 0.15rem 0.333rem;
|
||||
font-size: 1rem;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 0.25rem; }
|
||||
input:hover,
|
||||
select:hover {
|
||||
border-color: rgba(0, 0, 0, 0.3); }
|
||||
input:focus,
|
||||
select:focus {
|
||||
border-color: #0070d4; }
|
||||
input[type="checkbox"],
|
||||
select[type="checkbox"] {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 0.15em;
|
||||
padding: 0.333em; }
|
||||
input[type="checkbox"]:checked:before,
|
||||
select[type="checkbox"]:checked:before {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: -0.333rem;
|
||||
left: -0.063rem;
|
||||
content: "\002714";
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem; }
|
||||
input[type="number"],
|
||||
select[type="number"] {
|
||||
padding-right: 0; }
|
||||
|
||||
select option {
|
||||
border: none; }
|
||||
select option:hover {
|
||||
background: rgba(0, 0, 0, 0.3); }
|
||||
|
||||
label {
|
||||
padding: 0;
|
||||
color: black;
|
||||
cursor: pointer; }
|
||||
label > input {
|
||||
margin: 0 0.5rem; }
|
||||
|
||||
button {
|
||||
font-size: 1rem;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
padding: 0.333rem 0.666rem;
|
||||
margin: 0.1rem 0.15rem;
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
cursor: pointer; }
|
||||
button:hover {
|
||||
border-color: #0070d4; }
|
||||
button:active {
|
||||
background: #0070d4;
|
||||
color: white; }
|
||||
button:first-child {
|
||||
margin-left: 0; }
|
||||
|
||||
.calculator input,
|
||||
.calculator select {
|
||||
font-family: Monaco, Consolas, monospace;
|
||||
text-align: right; }
|
||||
|
||||
.calculator > * {
|
||||
margin-bottom: 1rem; }
|
||||
|
||||
.calculator .flags {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 1rem; }
|
||||
.calculator .flags .flag {
|
||||
flex: 0 0 50%; }
|
||||
@media screen and (max-width: 767px) {
|
||||
.calculator .flags .flag {
|
||||
flex: 100%; } }
|
||||
|
||||
.calculator .flag-values {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 1rem; }
|
||||
.calculator .flag-values input {
|
||||
max-width: 4em; }
|
||||
|
||||
.calculator .render-type label {
|
||||
flex: 1;
|
||||
display: inline-block; }
|
||||
@media screen and (max-width: 767px) {
|
||||
.calculator .render-type label {
|
||||
flex: 100%; } }
|
||||
|
||||
.calculator .render-type input {
|
||||
flex: 0 0 4em;
|
||||
align-self: flex-end;
|
||||
margin-right: 0.666rem; }
|
||||
|
||||
.calculator .render-type select {
|
||||
flex: 1;
|
||||
align-self: flex-end;
|
||||
margin-right: 0.666rem; }
|
||||
|
||||
.calculator .data-values label {
|
||||
flex: 1;
|
||||
display: inline-block; }
|
||||
@media screen and (max-width: 767px) {
|
||||
.calculator .data-values label {
|
||||
flex: 100%; } }
|
||||
|
||||
.calculator .data-values input,
|
||||
.calculator .data-values select {
|
||||
flex: 0 0 4em;
|
||||
align-self: flex-end;
|
||||
margin-right: 0.666rem; }
|
||||
|
||||
.calculator .inputs {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
width: 100%; }
|
||||
.calculator .inputs > * {
|
||||
flex: 0 0 50%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 0.1rem; }
|
||||
@media screen and (max-width: 767px) {
|
||||
.calculator .inputs > * {
|
||||
flex: 100%; } }
|
||||
|
||||
.calculator .chunk {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
align-items: stretch; }
|
||||
.calculator .chunk > * {
|
||||
display: flex;
|
||||
align-items: center; }
|
||||
.calculator .chunk #chunk {
|
||||
text-align: center; }
|
||||
|
||||
* {
|
||||
box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
color: #444;
|
||||
font-size: 16px;
|
||||
line-height: 1.65;
|
||||
margin: 0;
|
||||
overflow-y: scroll;
|
||||
background: white; }
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto; }
|
||||
|
||||
hr {
|
||||
width: 100%;
|
||||
border-color: rgba(0, 0, 0, 0.15);
|
||||
border-style: dashed;
|
||||
margin: 0.399em 0 0.6em; }
|
||||
|
||||
a:not(.button) {
|
||||
color: #0070d4;
|
||||
padding-bottom: 0.1em;
|
||||
text-decoration: none; }
|
||||
a:not(.button):hover {
|
||||
text-decoration: underline; }
|
||||
|
||||
a.chunk {
|
||||
font-family: Monaco, Consolas, monospace;
|
||||
padding: 0.066rem 0.3rem;
|
||||
background: rgba(0, 0, 0, 0.05); }
|
||||
a.chunk:hover {
|
||||
background: rgba(0, 0, 0, 0.075); }
|
||||
|
||||
span.chunk {
|
||||
font-family: Monaco, Consolas, monospace;
|
||||
border-bottom: 0;
|
||||
padding: 0.066rem 0.3rem;
|
||||
background: rgba(0, 0, 0, 0.05); }
|
||||
|
||||
.no-select {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
cursor: default; }
|
||||
|
||||
.long,
|
||||
.float,
|
||||
.short,
|
||||
.byte,
|
||||
.string,
|
||||
.crc {
|
||||
font-family: Monaco, Consolas, monospace; }
|
||||
|
||||
.long,
|
||||
.short,
|
||||
.float {
|
||||
color: red; }
|
||||
|
||||
.string {
|
||||
color: lightgreen; }
|
||||
|
||||
.byte {
|
||||
color: orange; }
|
||||
|
||||
.crc {
|
||||
color: orange; }
|
||||
|
||||
table.structure tr td:nth-child(1) {
|
||||
white-space: nowrap; }
|
||||
|
||||
table.structure tr td:nth-child(1),
|
||||
table.structure tr th:nth-child(1) {
|
||||
width: 16%; }
|
||||
|
||||
table.structure tr td:nth-child(2) {
|
||||
font-family: Monaco, Consolas, monospace;
|
||||
white-space: nowrap; }
|
||||
|
||||
table.structure tr td:nth-child(2),
|
||||
table.structure tr th:nth-child(2) {
|
||||
text-align: right;
|
||||
width: 8%; }
|
||||
|
||||
table.hierarchy tr td:nth-child(1),
|
||||
table.hierarchy tr th:nth-child(1) {
|
||||
width: 15%; }
|
||||
|
||||
table.hierarchy tr td:nth-child(2),
|
||||
table.hierarchy tr th:nth-child(2) {
|
||||
width: 50%; }
|
||||
|
||||
table.hierarchy tr td:nth-child(3),
|
||||
table.hierarchy tr th:nth-child(3) {
|
||||
width: 35%; }
|
||||
|
||||
table.render-type tr td:first-child,
|
||||
table.render-type tr td:nth-child(2) {
|
||||
font-family: Monaco, Consolas, monospace; }
|
||||
|
||||
table.render-type tr td:first-child,
|
||||
table.render-type tr th:first-child,
|
||||
table.render-type tr td:nth-child(2),
|
||||
table.render-type tr th:nth-child(2) {
|
||||
text-align: right;
|
||||
width: 5%; }
|
||||
|
||||
table.render-type tr td:nth-child(3),
|
||||
table.render-type tr th:nth-child(3) {
|
||||
width: 45%; }
|
||||
|
||||
table.render-type tr td:nth-child(4),
|
||||
table.render-type tr th:nth-child(4) {
|
||||
width: 45%; }
|
||||
|
||||
.hierarchy .children {
|
||||
padding-left: 3rem;
|
||||
border-left: 1px dotted rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.hierarchy header:not(.has-children) {
|
||||
display: inline-block; }
|
129
src_research_readme/mesh-info-pages/js/calc.js
Normal file
129
src_research_readme/mesh-info-pages/js/calc.js
Normal file
@@ -0,0 +1,129 @@
|
||||
(function($) {
|
||||
|
||||
var $flags = null
|
||||
var $flagInt = null
|
||||
var $flagHex = null
|
||||
|
||||
var $renderTypeInt = null
|
||||
var $renderTypeHex = null
|
||||
|
||||
var $data0Int = null
|
||||
var $data0Hex = null
|
||||
var $data1Int = null
|
||||
var $data1Hex = null
|
||||
|
||||
var $chunk = null
|
||||
var $buildWithSpaces = null
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$flags = $('.flags')
|
||||
$flagInt = $('.flag-values #flag')
|
||||
$flagHex = $('.flag-values #flag-hex')
|
||||
|
||||
$renderTypeInt = $('.render-type #render-type')
|
||||
$renderTypeHex = $('.render-type #render-type-hex')
|
||||
|
||||
$data0Int = $('.data-values #data0')
|
||||
$data0Hex = $('.data-values #data0-hex')
|
||||
$data1Int = $('.data-values #data1')
|
||||
$data1Hex = $('.data-values #data1-hex')
|
||||
|
||||
$chunk = $('.chunk #chunk')
|
||||
$buildWithSpaces = $('.chunk #build-with-spaces')
|
||||
|
||||
bind($flagInt, $flagHex)
|
||||
bind($data0Int, $data0Hex)
|
||||
bind($data1Int, $data1Hex)
|
||||
|
||||
$renderTypeInt.on('change', function() {
|
||||
var hex = parseInt($(this).val()).toString(16)
|
||||
$renderTypeHex.val(pad('00', hex, true))
|
||||
})
|
||||
|
||||
$renderTypeHex.on('input change', function() {
|
||||
var int = parseInt($(this).val(), 16)
|
||||
$renderTypeInt.val(int)
|
||||
})
|
||||
|
||||
$('#flags-to-values').on('click', function() {
|
||||
var val = 0
|
||||
$flags.find('input:checked').each(function() {
|
||||
val += parseInt($(this).data('val'))
|
||||
})
|
||||
$flagInt.val(val)
|
||||
$flagHex.val(pad('00', val.toString(16), true))
|
||||
})
|
||||
|
||||
$('#values-to-flags').on('click', function() {
|
||||
var val = parseInt($flagInt.val())
|
||||
$flags.find('input').each(function() {
|
||||
if (val & parseInt($(this).data('val'))) {
|
||||
$(this).prop('checked', true)
|
||||
} else {
|
||||
$(this).prop('checked', false)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$('#build').on('click', function() {
|
||||
var chunk = '41 54 52 42 04 00 00 00 '
|
||||
+ $flagHex.val() + ' '
|
||||
+ $renderTypeHex.val() + ' '
|
||||
+ $data0Hex.val() + ' '
|
||||
+ $data1Hex.val()
|
||||
|
||||
if (!$buildWithSpaces.prop('checked')) {
|
||||
chunk = chunk.replace(/ /g, '')
|
||||
}
|
||||
$chunk.val(chunk)
|
||||
})
|
||||
|
||||
$('#from-chunk').on('click', function() {
|
||||
var chunk = $chunk.val()
|
||||
if (chunk.length > 24) {
|
||||
chunk = chunk.replace(/ /g, '')
|
||||
}
|
||||
|
||||
var flag = chunk.substring(16, 18);
|
||||
var renderType = chunk.substring(18, 20);
|
||||
var data0 = chunk.substring(20, 22);
|
||||
var data1 = chunk.substring(22, 24);
|
||||
|
||||
$flagHex.val(flag).change()
|
||||
$renderTypeHex.val(renderType).change()
|
||||
$data0Hex.val(data0).change()
|
||||
$data1Hex.val(data1).change()
|
||||
$('#values-to-flags').click()
|
||||
})
|
||||
|
||||
$buildWithSpaces.on('change', function() {
|
||||
$('#build').click();
|
||||
})
|
||||
})
|
||||
|
||||
function bind($intProvider, $hexProvider) {
|
||||
$intProvider.on('input change', function() {
|
||||
var hex = parseInt($(this).val()).toString(16)
|
||||
$hexProvider.val(pad('00', hex, true))
|
||||
})
|
||||
|
||||
$hexProvider.on('input change', function() {
|
||||
var int = parseInt($(this).val(), 16)
|
||||
if (!isNaN(int)) {
|
||||
$intProvider.val(int)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function pad(pad, str, padLeft) {
|
||||
if (typeof str === 'undefined')
|
||||
return pad;
|
||||
if (padLeft) {
|
||||
return (pad + str).slice(-pad.length);
|
||||
} else {
|
||||
return (str + pad).substring(0, pad.length);
|
||||
}
|
||||
}
|
||||
|
||||
})($)
|
342
src_research_readme/mesh-info-pages/ze_filetypes/index.html
Normal file
342
src_research_readme/mesh-info-pages/ze_filetypes/index.html
Normal file
@@ -0,0 +1,342 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
|
||||
<title>ZeroEngine File Formats</title>
|
||||
|
||||
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="programming, code">
|
||||
|
||||
<link rel="shortcut icon" type="image/png" href="http://schlechtwetterfront.github.io/images/personal_logo_small.png"/>
|
||||
<link rel="stylesheet" href="../css/subpage-style.css" type="text/css" />
|
||||
</head>
|
||||
<body class="page-fileformats">
|
||||
|
||||
<div class="container padded">
|
||||
<h1 class="page-title">ZeroEngine File Formats</h1>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<aside class="menu">
|
||||
<ul class="navigation blocks">
|
||||
|
||||
|
||||
|
||||
<li class="category"><span class="category-title">Navigation</span></li>
|
||||
|
||||
<li class="link"><a href="index.html#overview">Overview</a></li>
|
||||
|
||||
<li class="link"><a href="index.html#zero-crc">Zero CRC</a></li>
|
||||
|
||||
<li class="link"><a href="index.html#atrb-calculator">ATRB Calculator</a></li>
|
||||
|
||||
|
||||
<li class="category"><span class="category-title">File Formats</span></li>
|
||||
|
||||
<li class="link"><a href="msh.html">.MSH (Models & Animation)</a></li>
|
||||
|
||||
<li class="link"><a href="ter.html">.TER (Terrain)</a></li>
|
||||
|
||||
<li class="link"><a href="xxw.html">.XXW (Terrain)</a></li>
|
||||
|
||||
<li class="link"><a href="render-types.html">.MSH Render Types</a></li>
|
||||
|
||||
|
||||
<li class="category"><span class="category-title">Other Resources</span></li>
|
||||
|
||||
<li class="link"><a href="https://github.com/Schlechtwetterfront/xsizetools">View on Github</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="overview">Overview</h2>
|
||||
|
||||
<p>File format information for some ZeroEngine formats.</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="zero-crc">Zero CRC</h2>
|
||||
|
||||
<p>The CRC used in .msh files is 4 bytes long and is stored in pure hex.
|
||||
The algorithm is proprietary (<em>Zero</em> because it's used in Pandemic's <em>Zero Engine</em>).
|
||||
An example implementation of the <em>Zero</em> CRC can be found <a href="https://github.com/Schlechtwetterfront/xsizetools/blob/master/Application/Modules/msh2_crc.py">here (python)</a>.</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="atrb-calculator">ATRB Calculator</h2>
|
||||
|
||||
<p>Use this to calculate flag values, convert render type and data values to hex and convert from and to the .msh ATRB hex chunk.</p>
|
||||
<p>Note that Single-sided and Double-sided Transparency are exclusive, so selecting both might not have the desired/any effect.
|
||||
Check out the <a class="chunk" href="msh.html#ATRB">ATRB</a> chunk for more information on each flag.</p>
|
||||
<h3>Calculator</h3>
|
||||
|
||||
<div class="calculator">
|
||||
<h5>Flags</h5>
|
||||
<div class="flags">
|
||||
<label class="flag"><input type="checkbox" id="emissive" data-val="1">Emissive</label>
|
||||
<label class="flag"><input type="checkbox" id="glow" data-val="2">Glow</label>
|
||||
<label class="flag"><input type="checkbox" id="single" data-val="4">Single-sided Transparency</label>
|
||||
<label class="flag"><input type="checkbox" id="double" data-val="8">Double-sided Transparency</label>
|
||||
<label class="flag"><input type="checkbox" id="hard" data-val="16">Hard-edged Transparency</label>
|
||||
<label class="flag"><input type="checkbox" id="ppl" data-val="32">Per-Pixel Lighting</label>
|
||||
<label class="flag"><input type="checkbox" id="additive" data-val="64">Additive</label>
|
||||
<label class="flag"><input type="checkbox" id="spec" data-val="128">Specular</label>
|
||||
</div>
|
||||
|
||||
<h5>Flag Values</h5>
|
||||
<div class="flag-values">
|
||||
<label>Integer Value<input type="number" max="256" min="0" id="flag" value="0"></label>
|
||||
<label>Hex Value<input type="text" maxlength="2" id="flag-hex" value="00"></label>
|
||||
<button type="button" id="values-to-flags">↑ Values to Flags</button>
|
||||
<button type="button" id="flags-to-values">↓ Flags to Values</button>
|
||||
</div>
|
||||
|
||||
<div class="render-type">
|
||||
<h5>Render Type</h5>
|
||||
<div class="inputs">
|
||||
<div>
|
||||
<label for="render-type">Render Type</label>
|
||||
<select id="render-type">
|
||||
<option value="0">00 - Normal</option>
|
||||
<option value="1">01 - Glow</option>
|
||||
<option value="2">02 - Lightmap</option>
|
||||
<option value="3">03 - Scrolling</option>
|
||||
<option value="4">04 - Specular</option>
|
||||
<option value="5">05 - Glossmap</option>
|
||||
<option value="6">06 - Chrome</option>
|
||||
<option value="7">07 - Animated</option>
|
||||
<option value="8">08 - Ice</option>
|
||||
<option value="9">09 - Sky</option>
|
||||
<option value="10">10 - Water</option>
|
||||
<option value="11">11 - Detail</option>
|
||||
<option value="12">12 - 2 Scroll</option>
|
||||
<option value="13">13 - Rotate</option>
|
||||
<option value="14">14 - Glow Rotate</option>
|
||||
<option value="15">15 - Planar Reflection</option>
|
||||
<option value="16">16 - Glow Scroll</option>
|
||||
<option value="17">17 - Glow 2 Scroll</option>
|
||||
<option value="18">18 - Curved Reflection</option>
|
||||
<option value="19">19 - Normalmap Fade</option>
|
||||
<option value="20">20 - Normalmap Inv Fade</option>
|
||||
<option value="21">21 - Ice Reflection</option>
|
||||
<option value="22">22 - Ice Refraction</option>
|
||||
<option value="23">23 - Emboss</option>
|
||||
<option value="24">24 - Wireframe</option>
|
||||
<option value="25">25 - Energy</option>
|
||||
<option value="26">26 - Afterburner</option>
|
||||
<option value="27">27 - Bumpmap</option>
|
||||
<option value="28">28 - Bumpmap + Glossmap</option>
|
||||
<option value="29">29 - Teleportal</option>
|
||||
<option value="30">30 - Multistate</option>
|
||||
<option value="31">31 - Shield</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="render-type-hex">Hex Value</label>
|
||||
<input type="text" maxlength="3" id="render-type-hex" value="00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data-values">
|
||||
<h5>Data Values</h5>
|
||||
<div class="inputs">
|
||||
<div>
|
||||
<label for="data0">Data0 Integer Value</label>
|
||||
<input type="number" max="256" min="0" id="data0" value="0">
|
||||
</div>
|
||||
<div>
|
||||
<label for="data0-hex">Data0 Hex Value</label>
|
||||
<input type="text" maxlength="3" id="data0-hex" value="00">
|
||||
</div>
|
||||
<div>
|
||||
<label for="data1">Data1 Integer Value</label>
|
||||
<input type="number" max="256" min="0" id="data1" value="0">
|
||||
</div>
|
||||
<div>
|
||||
<label for="data1-hex">Data1 Hex Value</label>
|
||||
<input type="text" maxlength="3" id="data1-hex" value="00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5>Chunk</h5>
|
||||
<div class="chunk">
|
||||
<div>
|
||||
<input type="text" id="chunk" maxlength="35" size="37" value="415452420400000000000000">
|
||||
<label><input type="checkbox" id="build-with-spaces">Spaces</label>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" id="build">↓ Build ATRB Chunk</button>
|
||||
<button type="button" id="from-chunk">↑ Calculate from ATRB Chunk</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script src="../js/calc.js"></script>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="zero-crc-implementation">Zero CRC Default Implementation</h2>
|
||||
|
||||
<pre><code class="cpp">// CRC table
|
||||
static unsigned table32[256] =
|
||||
{
|
||||
0x00000000, 0x04C11DB7, 0x09823B6E, 0x0D4326D9,
|
||||
0x130476DC, 0x17C56B6B, 0x1A864DB2, 0x1E475005,
|
||||
0x2608EDB8, 0x22C9F00F, 0x2F8AD6D6, 0x2B4BCB61,
|
||||
0x350C9B64, 0x31CD86D3, 0x3C8EA00A, 0x384FBDBD,
|
||||
0x4C11DB70, 0x48D0C6C7, 0x4593E01E, 0x4152FDA9,
|
||||
0x5F15ADAC, 0x5BD4B01B, 0x569796C2, 0x52568B75,
|
||||
0x6A1936C8, 0x6ED82B7F, 0x639B0DA6, 0x675A1011,
|
||||
0x791D4014, 0x7DDC5DA3, 0x709F7B7A, 0x745E66CD,
|
||||
0x9823B6E0, 0x9CE2AB57, 0x91A18D8E, 0x95609039,
|
||||
0x8B27C03C, 0x8FE6DD8B, 0x82A5FB52, 0x8664E6E5,
|
||||
0xBE2B5B58, 0xBAEA46EF, 0xB7A96036, 0xB3687D81,
|
||||
0xAD2F2D84, 0xA9EE3033, 0xA4AD16EA, 0xA06C0B5D,
|
||||
0xD4326D90, 0xD0F37027, 0xDDB056FE, 0xD9714B49,
|
||||
0xC7361B4C, 0xC3F706FB, 0xCEB42022, 0xCA753D95,
|
||||
0xF23A8028, 0xF6FB9D9F, 0xFBB8BB46, 0xFF79A6F1,
|
||||
0xE13EF6F4, 0xE5FFEB43, 0xE8BCCD9A, 0xEC7DD02D,
|
||||
0x34867077, 0x30476DC0, 0x3D044B19, 0x39C556AE,
|
||||
0x278206AB, 0x23431B1C, 0x2E003DC5, 0x2AC12072,
|
||||
0x128E9DCF, 0x164F8078, 0x1B0CA6A1, 0x1FCDBB16,
|
||||
0x018AEB13, 0x054BF6A4, 0x0808D07D, 0x0CC9CDCA,
|
||||
0x7897AB07, 0x7C56B6B0, 0x71159069, 0x75D48DDE,
|
||||
0x6B93DDDB, 0x6F52C06C, 0x6211E6B5, 0x66D0FB02,
|
||||
0x5E9F46BF, 0x5A5E5B08, 0x571D7DD1, 0x53DC6066,
|
||||
0x4D9B3063, 0x495A2DD4, 0x44190B0D, 0x40D816BA,
|
||||
0xACA5C697, 0xA864DB20, 0xA527FDF9, 0xA1E6E04E,
|
||||
0xBFA1B04B, 0xBB60ADFC, 0xB6238B25, 0xB2E29692,
|
||||
0x8AAD2B2F, 0x8E6C3698, 0x832F1041, 0x87EE0DF6,
|
||||
0x99A95DF3, 0x9D684044, 0x902B669D, 0x94EA7B2A,
|
||||
0xE0B41DE7, 0xE4750050, 0xE9362689, 0xEDF73B3E,
|
||||
0xF3B06B3B, 0xF771768C, 0xFA325055, 0xFEF34DE2,
|
||||
0xC6BCF05F, 0xC27DEDE8, 0xCF3ECB31, 0xCBFFD686,
|
||||
0xD5B88683, 0xD1799B34, 0xDC3ABDED, 0xD8FBA05A,
|
||||
0x690CE0EE, 0x6DCDFD59, 0x608EDB80, 0x644FC637,
|
||||
0x7A089632, 0x7EC98B85, 0x738AAD5C, 0x774BB0EB,
|
||||
0x4F040D56, 0x4BC510E1, 0x46863638, 0x42472B8F,
|
||||
0x5C007B8A, 0x58C1663D, 0x558240E4, 0x51435D53,
|
||||
0x251D3B9E, 0x21DC2629, 0x2C9F00F0, 0x285E1D47,
|
||||
0x36194D42, 0x32D850F5, 0x3F9B762C, 0x3B5A6B9B,
|
||||
0x0315D626, 0x07D4CB91, 0x0A97ED48, 0x0E56F0FF,
|
||||
0x1011A0FA, 0x14D0BD4D, 0x19939B94, 0x1D528623,
|
||||
0xF12F560E, 0xF5EE4BB9, 0xF8AD6D60, 0xFC6C70D7,
|
||||
0xE22B20D2, 0xE6EA3D65, 0xEBA91BBC, 0xEF68060B,
|
||||
0xD727BBB6, 0xD3E6A601, 0xDEA580D8, 0xDA649D6F,
|
||||
0xC423CD6A, 0xC0E2D0DD, 0xCDA1F604, 0xC960EBB3,
|
||||
0xBD3E8D7E, 0xB9FF90C9, 0xB4BCB610, 0xB07DABA7,
|
||||
0xAE3AFBA2, 0xAAFBE615, 0xA7B8C0CC, 0xA379DD7B,
|
||||
0x9B3660C6, 0x9FF77D71, 0x92B45BA8, 0x9675461F,
|
||||
0x8832161A, 0x8CF30BAD, 0x81B02D74, 0x857130C3,
|
||||
0x5D8A9099, 0x594B8D2E, 0x5408ABF7, 0x50C9B640,
|
||||
0x4E8EE645, 0x4A4FFBF2, 0x470CDD2B, 0x43CDC09C,
|
||||
0x7B827D21, 0x7F436096, 0x7200464F, 0x76C15BF8,
|
||||
0x68860BFD, 0x6C47164A, 0x61043093, 0x65C52D24,
|
||||
0x119B4BE9, 0x155A565E, 0x18197087, 0x1CD86D30,
|
||||
0x029F3D35, 0x065E2082, 0x0B1D065B, 0x0FDC1BEC,
|
||||
0x3793A651, 0x3352BBE6, 0x3E119D3F, 0x3AD08088,
|
||||
0x2497D08D, 0x2056CD3A, 0x2D15EBE3, 0x29D4F654,
|
||||
0xC5A92679, 0xC1683BCE, 0xCC2B1D17, 0xC8EA00A0,
|
||||
0xD6AD50A5, 0xD26C4D12, 0xDF2F6BCB, 0xDBEE767C,
|
||||
0xE3A1CBC1, 0xE760D676, 0xEA23F0AF, 0xEEE2ED18,
|
||||
0xF0A5BD1D, 0xF464A0AA, 0xF9278673, 0xFDE69BC4,
|
||||
0x89B8FD09, 0x8D79E0BE, 0x803AC667, 0x84FBDBD0,
|
||||
0x9ABC8BD5, 0x9E7D9662, 0x933EB0BB, 0x97FFAD0C,
|
||||
0xAFB010B1, 0xAB710D06, 0xA6322BDF, 0xA2F33668,
|
||||
0xBCB4666D, 0xB8757BDA, 0xB5365D03, 0xB1F740B4,
|
||||
};
|
||||
|
||||
// case translation table
|
||||
static unsigned char toLower[256] =
|
||||
{
|
||||
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
|
||||
0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
|
||||
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
|
||||
0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,
|
||||
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
|
||||
0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
|
||||
0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,
|
||||
0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
|
||||
0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,
|
||||
0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
|
||||
0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,
|
||||
0x78,0x79,0x7a,0x5b,0x5c,0x5d,0x5e,0x5f,
|
||||
0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,
|
||||
0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
|
||||
0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,
|
||||
0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
|
||||
0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,
|
||||
0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,
|
||||
0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,
|
||||
0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,
|
||||
0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,
|
||||
0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,
|
||||
0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,
|
||||
0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,
|
||||
0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
|
||||
0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
|
||||
0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,
|
||||
0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,
|
||||
0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff,
|
||||
};
|
||||
|
||||
|
||||
unsigned __cdecl CalcLowerCRC(const char* str, unsigned crc)
|
||||
{
|
||||
const unsigned char *p;
|
||||
|
||||
crc = ~crc;
|
||||
if (str) {
|
||||
for (p = (const unsigned char *) str; *p; p++) {
|
||||
crc = (crc << 8) ^ table32[(crc >> 24) ^ toLower[*p]];
|
||||
}
|
||||
}
|
||||
return ~crc;
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
4314
src_research_readme/mesh-info-pages/ze_filetypes/msh.html
Normal file
4314
src_research_readme/mesh-info-pages/ze_filetypes/msh.html
Normal file
File diff suppressed because it is too large
Load Diff
1031
src_research_readme/mesh-info-pages/ze_filetypes/render-types.html
Normal file
1031
src_research_readme/mesh-info-pages/ze_filetypes/render-types.html
Normal file
File diff suppressed because it is too large
Load Diff
427
src_research_readme/mesh-info-pages/ze_filetypes/ter.html
Normal file
427
src_research_readme/mesh-info-pages/ze_filetypes/ter.html
Normal file
@@ -0,0 +1,427 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
|
||||
<title>.ter Format</title>
|
||||
|
||||
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="programming, code">
|
||||
|
||||
<link rel="shortcut icon" type="image/png" href="http://schlechtwetterfront.github.io/images/personal_logo_small.png"/>
|
||||
<link rel="stylesheet" href="../css/subpage-style.css" type="text/css" />
|
||||
</head>
|
||||
<body class="page-fileformats">
|
||||
|
||||
<div class="container padded">
|
||||
<h1 class="page-title">.ter Format</h1>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<aside class="menu">
|
||||
<ul class="navigation blocks">
|
||||
|
||||
|
||||
|
||||
<li class="category"><span class="category-title">Navigation</span></li>
|
||||
|
||||
<li class="link"><a href="ter.html#overview">Overview</a></li>
|
||||
|
||||
<li class="link"><a href="index.html">Back</a></li>
|
||||
|
||||
|
||||
<li class="category"><span class="category-title">Format</span></li>
|
||||
|
||||
<li class="link"><a href="http://schlechtwetterfront.github.io/ze_filetypes/terrain-header">Terrain Header</a></li>
|
||||
|
||||
<li class="link"><a href="http://schlechtwetterfront.github.io/ze_filetypes/terrain-header">Terrain Blocks</a></li>
|
||||
|
||||
<li class="link"><a href="http://schlechtwetterfront.github.io/ze_filetypes/terrain-structs">Terrain Structs</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="overview">Overview</h2>
|
||||
|
||||
<p>Terrain files (*.ter) represent a single terrain to be used by a world.
|
||||
This file format is generated by ZeroEditor and used during the munge process
|
||||
to create the <em>tern</em> chunk within *.lvl files.</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="structure">Structure</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Size (bytes)</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Terrain Header</td>
|
||||
<td>2820/2821 (v21/22)</td>
|
||||
<td>Header storing general information about the terrain.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Height Block</td>
|
||||
<td><strong>size * size</strong> * 2</td>
|
||||
<td>Height grid data.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color Block</td>
|
||||
<td><strong>size * size</strong> * 4</td>
|
||||
<td>RGBA colors for the terrain grid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color Block</td>
|
||||
<td><strong>size * size</strong> * 4</td>
|
||||
<td>RGBA colors for the terrain grid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Texture Block</td>
|
||||
<td><strong>size * size</strong> * 16</td>
|
||||
<td>Texture layer opacity for the terrain grid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>?</td>
|
||||
<td><strong>size * size</strong> / 2</td>
|
||||
<td>Maybe Water/Foliage.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>?</td>
|
||||
<td><strong>size * size</strong> / 2</td>
|
||||
<td>Probably Water.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>?</td>
|
||||
<td>Variable</td>
|
||||
<td>Not sure what this contains but it seems that this block is not required.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="terrain-header">Terrain Header</h2>
|
||||
|
||||
<p>The Terrain Header is always 2821 bytes in length.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data Type</th>
|
||||
<th>Size (bytes)</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>byte [4]</code></td>
|
||||
<td>4</td>
|
||||
<td>Terrain Header Marker (TERR).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>long int</code></td>
|
||||
<td>4</td>
|
||||
<td>.TER file version number (21 for SWBF, 22 for SWBFII).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>short int [4]</code></td>
|
||||
<td>8</td>
|
||||
<td>Terrain extents. <em>Example: -8, -8, 8, 8 for a 16x16 map.</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>long int</code></td>
|
||||
<td>4</td>
|
||||
<td>? (ie. 164)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>float [16]</code></td>
|
||||
<td>64</td>
|
||||
<td>Tile-range for each texture layer. _0.031 (1/32): the texture spans 32 meters. This is stored as 1/X of the value in ZeroEditor.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>byte [16]</code></td>
|
||||
<td>16</td>
|
||||
<td>Mapping for each texture-layer. 0 is normal.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>byte [64]</code></td>
|
||||
<td>64</td>
|
||||
<td>Unknown. Possibly 16 floats for texture-layer rotations.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>float</code></td>
|
||||
<td>4</td>
|
||||
<td>Map height multiplier.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>float</code></td>
|
||||
<td>4</td>
|
||||
<td>Grid-scale. Distance between points.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>long int</code></td>
|
||||
<td>4</td>
|
||||
<td>? (1)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>long int</code></td>
|
||||
<td>4</td>
|
||||
<td>Full map size stored in the .TER file. The same or bigger than the map extents.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>long int</code></td>
|
||||
<td>4</td>
|
||||
<td>? (2)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>byte</code></td>
|
||||
<td>1</td>
|
||||
<td>? (0F) Only exists in SWBF II (version 22) terrain.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>TextureLayer [16]</code></td>
|
||||
<td>1024</td>
|
||||
<td>Texture layers (see below).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>WaterLayer [16]</code></td>
|
||||
<td>1086</td>
|
||||
<td>Water layers (see below).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>byte [524]</code></td>
|
||||
<td>524</td>
|
||||
<td>Unknown.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="terrain-blocks">Terrain Blocks</h2>
|
||||
|
||||
<p>The Terrain Header is 2820 (SWBF) or 2821 (SWBFII) bytes in length.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Data Type</th>
|
||||
<th>Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>Height</strong></td>
|
||||
<td><code>signed short</code></td>
|
||||
<td><strong>Full map size * Full map size</strong> * 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Height value for every point on the grid. This value will be multiplied with the map scale multiplier.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Color</strong></td>
|
||||
<td><code>byte [4]</code></td>
|
||||
<td><strong>Full map size * Full map size</strong> * 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Color values for every point on the grid. 4 bytes (from 0 to 255) corresponding to the RGBA channels.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Color 2</strong></td>
|
||||
<td><code>byte [4]</code></td>
|
||||
<td><strong>Full map size * Full map size</strong> * 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Color values for every point on the grid. 4 bytes (from 0 to 255) corresponding to the RGBA channels.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Texture</strong></td>
|
||||
<td><code>byte [16]</code></td>
|
||||
<td><strong>Full map size * Full map size</strong> * 16</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>One byte (0-255) for each texture layer indicating the transparency of the corresponding texture layer.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Water</strong></td>
|
||||
<td><code>byte</code></td>
|
||||
<td><strong>Full map size * Full map size</strong> / 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Structure unknown.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Foliage</strong></td>
|
||||
<td><code>byte</code></td>
|
||||
<td><strong>Full map size * Full map size</strong> / 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Structure unknown.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Unknwon</strong></td>
|
||||
<td><code>byte</code></td>
|
||||
<td>Variable</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Structure unknown.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="terrain-structs">Terrain Structs</h2>
|
||||
|
||||
<h3>TextureLayer</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data Type</th>
|
||||
<th>Size (bytes)</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>char [32]</code></td>
|
||||
<td>32</td>
|
||||
<td>Diffuse texture name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>char [32]</code></td>
|
||||
<td>32</td>
|
||||
<td>Detail texture name.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>WaterLayer</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data Type</th>
|
||||
<th>Size (bytes)</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>float [2]</code></td>
|
||||
<td>8</td>
|
||||
<td>Water height value (twice).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>byte [8]</code></td>
|
||||
<td>8</td>
|
||||
<td>Unknown, always zero.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>float [2]</code></td>
|
||||
<td>8</td>
|
||||
<td>UV animation velocity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>float [2]</code></td>
|
||||
<td>8</td>
|
||||
<td>UV animation repeat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>byte [4]</code></td>
|
||||
<td>4</td>
|
||||
<td>RGBA color values.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>char [32]</code></td>
|
||||
<td>32</td>
|
||||
<td>Water texture name.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>End-of-file Block</h3>
|
||||
<p>Can be empty</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data Type</th>
|
||||
<th>Size (bytes)</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td>4</td>
|
||||
<td>Length of the block.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td>4</td>
|
||||
<td>Number of items. Can be zero, in which case there are no further fields and this block ends.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td>4</td>
|
||||
<td>Number of (sub-)items?</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
313
src_research_readme/mesh-info-pages/ze_filetypes/xxw.html
Normal file
313
src_research_readme/mesh-info-pages/ze_filetypes/xxw.html
Normal file
@@ -0,0 +1,313 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
|
||||
<title>.xxw Format</title>
|
||||
|
||||
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="programming, code">
|
||||
|
||||
<link rel="shortcut icon" type="image/png" href="http://schlechtwetterfront.github.io/images/personal_logo_small.png"/>
|
||||
<link rel="stylesheet" href="../css/subpage-style.css" type="text/css" />
|
||||
</head>
|
||||
<body class="page-fileformats">
|
||||
|
||||
<div class="container padded">
|
||||
<h1 class="page-title">.xxw Format</h1>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<aside class="menu">
|
||||
<ul class="navigation blocks">
|
||||
|
||||
|
||||
|
||||
<li class="category"><span class="category-title">Navigation</span></li>
|
||||
|
||||
<li class="link"><a href="xxw.html#overview">Overview</a></li>
|
||||
|
||||
<li class="link"><a href="index.html">Back</a></li>
|
||||
|
||||
|
||||
<li class="category"><span class="category-title">Format</span></li>
|
||||
|
||||
<li class="link"><a href="http://schlechtwetterfront.github.io/ze_filetypes/terrain-header">Terrain Header</a></li>
|
||||
|
||||
<li class="link"><a href="http://schlechtwetterfront.github.io/ze_filetypes/terrain-header">Terrain Blocks</a></li>
|
||||
|
||||
<li class="link"><a href="http://schlechtwetterfront.github.io/ze_filetypes/terrain-structs">Terrain Structs</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="overview">Overview</h2>
|
||||
|
||||
<p>Terrain files (<code>*.xxw</code>) represent a single terrain to be used by a world.
|
||||
This format was used in <em>Star Wars: The Clone Wars</em>.</p>
|
||||
<p>This page contains snippets of research.</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="terrain-header">Terrain Header</h2>
|
||||
|
||||
<p>The Terrain Header is always 1152 bytes in length.</p>
|
||||
<pre><code>ad length type ex desc
|
||||
0 4 ? 1152 ?
|
||||
4 long 3 version?
|
||||
8 long 1024 terrain size?
|
||||
12 int 257 ?
|
||||
16 int 2 ?
|
||||
20 float 32 grid size?
|
||||
24 float 0.1... ?
|
||||
28
|
||||
32 int 128 map size?
|
||||
36
|
||||
40 int 128 extents with 8? or 6 sets of RGB colors?
|
||||
|
||||
64-124 float Tile-range for each texture layer
|
||||
|
||||
|
||||
1,668 - 514 size chunks?
|
||||
132,218
|
||||
--- BLOCKS
|
||||
size * size (* 2) heights
|
||||
xV4_ ?
|
||||
|
||||
|
||||
</code></pre>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Offset</th>
|
||||
<th>Data Type</th>
|
||||
<th>Size (bytes)</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>0</td>
|
||||
<td class="orange">byte [4]</td>
|
||||
<td>4</td>
|
||||
<td>Header size indicator (1152).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td class="red">long uint</td>
|
||||
<td>4</td>
|
||||
<td>File format version? (03)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8</td>
|
||||
<td class="red">long uint</td>
|
||||
<td>4</td>
|
||||
<td>? (1024)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>12</td>
|
||||
<td class="red">long uint</td>
|
||||
<td>4</td>
|
||||
<td>Terrain size. (257, 513)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>16</td>
|
||||
<td class="red">long uint</td>
|
||||
<td>4</td>
|
||||
<td>? (2)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td class="red">float </td>
|
||||
<td>4</td>
|
||||
<td>Grid scale. (32, 16, 8)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>24</td>
|
||||
<td class="red">float </td>
|
||||
<td>4</td>
|
||||
<td>Height scale. (0.1, 0.03, 0.23)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28</td>
|
||||
<td class="red">long int [4]</td>
|
||||
<td>16</td>
|
||||
<td>Map extents (i.e. -256, 256, -256, 256 for a 512x512 map)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>44+</td>
|
||||
<td>?</td>
|
||||
<td>20</td>
|
||||
<td>?</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>64</td>
|
||||
<td class="red">float [16] </td>
|
||||
<td>64</td>
|
||||
<td>Tile-range for each texture layer. <em>0.031 (1/32): the texture spans 32 meters. This is stored as 1/X of the value in ZeroEditor.</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>128</td>
|
||||
<td>TextureLayer [16]</td>
|
||||
<td>1024</td>
|
||||
<td>Texture layers (see below).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="terrain-blocks">Terrain Blocks</h2>
|
||||
|
||||
<p>The Terrain Header is always 2821 bytes in length.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Data Type</th>
|
||||
<th>Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>Height</strong></td>
|
||||
<td class="red">signed short</td>
|
||||
<td><strong>Terrain size * Terrain size</strong> * 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Height value for every point on the grid. This value will be multiplied with the map scale multiplier.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>?</strong></td>
|
||||
<td>?</td>
|
||||
<td>Size: (Terrain size - 1) * (Terrain size - 1) * 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>?</strong></td>
|
||||
<td>?</td>
|
||||
<td>Size:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Chunks with 38 bytes of data?</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="block">
|
||||
|
||||
<h2 id="terrain-structs">Terrain Structs</h2>
|
||||
|
||||
<h3>TextureLayer</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data Type</th>
|
||||
<th>Size (bytes)</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>char [32]</code></td>
|
||||
<td>32</td>
|
||||
<td>Diffuse texture name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>char [32]</code></td>
|
||||
<td>32</td>
|
||||
<td>Detail texture name.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>WaterLayer</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data Type</th>
|
||||
<th>Size (bytes)</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>float [2]</code></td>
|
||||
<td>8</td>
|
||||
<td>Water height value (twice).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>byte [8]</code></td>
|
||||
<td>8</td>
|
||||
<td>Unknown, always zero.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>float [2]</code></td>
|
||||
<td>8</td>
|
||||
<td>UV animation velocity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>float [2]</code></td>
|
||||
<td>8</td>
|
||||
<td>UV animation repeat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>byte [4]</code></td>
|
||||
<td>4</td>
|
||||
<td>RGBA color values.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>char [32]</code></td>
|
||||
<td>32</td>
|
||||
<td>Water texture name.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user