Decompile fn_17681 (WorldSpatialTree::ReadBounds)
Batch #11167 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_17681 WorldSpatialTree::ReadBounds: logic confirmed by peer review Peer-reviewed-by: kyoshi, dori, StrawberrysherbetIX Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
dcc5e3bf7e
commit
81859374ce
1 changed files with 15 additions and 10 deletions
|
|
@ -41,6 +41,11 @@ CWorld::~CWorld() {
|
|||
// OFFSET: 0x00AC66F0
|
||||
// FUNCTION: fn_17652
|
||||
WorldSpatialTree::WorldSpatialTree() : parent(nullptr), children{}, minimum{}, maximum{}, center{}, halfSize{}, dirty(1) {
|
||||
this->parent = nullptr;
|
||||
for (unsigned index = 0; index < 4; ++index) {
|
||||
this->children[index] = nullptr;
|
||||
}
|
||||
this->dirty = 1;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AC71E0
|
||||
|
|
@ -106,25 +111,25 @@ void WorldSpatialTree::Subdivide(int depth) {
|
|||
// OFFSET: 0x00AC8F60
|
||||
// FUNCTION: fn_17681
|
||||
void WorldSpatialTree::ReadBounds(CFile& input, int depth) {
|
||||
for (float& value : this->maximum) {
|
||||
input.Read(&value, sizeof(value));
|
||||
for (unsigned index = 0; index < 3; ++index) {
|
||||
input.Read(&this->maximum[index], sizeof(float));
|
||||
}
|
||||
|
||||
for (float& value : this->minimum) {
|
||||
input.Read(&value, sizeof(value));
|
||||
for (unsigned index = 0; index < 3; ++index) {
|
||||
input.Read(&this->minimum[index], sizeof(float));
|
||||
}
|
||||
|
||||
for (float& value : this->halfSize) {
|
||||
input.Read(&value, sizeof(value));
|
||||
for (unsigned index = 0; index < 3; ++index) {
|
||||
input.Read(&this->halfSize[index], sizeof(float));
|
||||
}
|
||||
|
||||
for (float& value : this->center) {
|
||||
input.Read(&value, sizeof(value));
|
||||
for (unsigned index = 0; index < 3; ++index) {
|
||||
input.Read(&this->center[index], sizeof(float));
|
||||
}
|
||||
|
||||
if (depth != 5) {
|
||||
for (WorldSpatialTree* child : this->children) {
|
||||
child->ReadBounds(input, depth + 1);
|
||||
for (unsigned index = 0; index < 4; ++index) {
|
||||
this->children[index]->ReadBounds(input, depth + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue