REDRIVER2/src_rebuild/EMULATOR/INLINE_C.C
2020-03-31 22:56:49 +06:00

29 lines
341 B
C

#include "INLINE_C.H"
#include "LIBGTE.H"
#include "GTEREG.H"
void gte_SetGeomScreen(int h)
{
H = h;
}
int gte_ldlzc(int input)
{
int leadingZeroCount = 0;
if (input > 0)
{
for (int i = (sizeof(int) * 8)-1; i >= 0 ; i--)
{
if (input & (1 << i))
{
break;
}
leadingZeroCount++;
}
}
return leadingZeroCount;
}