commit x64 compilation from lulu cause the other branch dont seems to compile properly at home

This commit is contained in:
2026-07-17 16:08:20 +02:00
parent c0f3eeb00d
commit 0efa4ee6f7
625 changed files with 117283 additions and 4426 deletions

View File

@ -0,0 +1,55 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#include "bih/bih.h"
using namespace GS;
using namespace GS::BIH;
//------------------------------------------------------------------------------
uint Tree::IntersectNode(Node *node, MinMax &mm, uint *iarray, uint max)
{
uint count = 0;
if (node->axis == 3)
{
if (node->count > max)
return 0;
Memory::Copy(iarray, (uint *)node->p, sizeof(uint) * node->count);
return node->count;
}
else
{
if (mm.mx[node->axis] > node->split[1])
{
MinMax sub_mm = mm;
if (node->split[1] > sub_mm.mn[node->axis])
sub_mm.mn[node->axis] = node->split[1];
uint added = IntersectNode(&((Node *)node->p)[1], sub_mm, iarray/* + count*/, max);
max -= added; count += added;
}
if (mm.mn[node->axis] < node->split[0])
{
MinMax sub_mm = mm;
if (node->split[0] < sub_mm.mx[node->axis])
sub_mm.mx[node->axis] = node->split[0];
uint added = IntersectNode(&((Node *)node->p)[0], sub_mm, iarray + count, max);
/*max -= added;*/ count += added;
}
}
return count;
}
uint Tree::Intersect(MinMax &in_mm, uint *iarray, uint max)
{
if (root.IsNull() || !in_mm.TestOverlap(minmax))
return 0;
return IntersectNode(root, in_mm, iarray, max);
}
//------------------------------------------------------------------------------