REDRIVER2/src_rebuild/PsyX/INLINE_C.C
Ilya Shurumov 0bc848da2c - rename EMULATOR to Psy-X
- move it's makefile
2020-11-19 01:14:45 +06:00

29 lines
356 B
C

#include "INLINE_C.H"
#include "LIBGTE.H"
#include "GTEREG.H"
void gte_SetGeomScreen(int h)
{
CTC2(*(uint*)&h, 26);
}
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;
}