mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 18:30:27 +01:00
Fixed the bsr Portable C function, the game start correctly now
This commit is contained in:
parent
8c49b5f7a0
commit
8c03fccd64
|
@ -521,15 +521,15 @@ static void RSBinToGroups( ScenePolygon *pspoFirst)
|
|||
|
||||
#else
|
||||
// emulate x86's bsr opcode...not fast. :/
|
||||
register INDEX val = _ctGroupsCount;
|
||||
register INDEX bsr = 0;
|
||||
register DWORD val = _ctGroupsCount;
|
||||
register INDEX bsr = 31;
|
||||
if (val != 0)
|
||||
{
|
||||
while (bsr < 32)
|
||||
while (bsr > 0)
|
||||
{
|
||||
if (val & (1 << bsr))
|
||||
if (val & (1l << bsr))
|
||||
break;
|
||||
bsr++;
|
||||
bsr--;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user