mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-24 11:22:39 +01:00
29 lines
356 B
C
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;
|
|
} |