mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-27 15:20:25 +00:00
countLeadingZeroBits
This commit is contained in:
parent
3a97c18505
commit
57a6a8eaad
16
PCTex.cpp
16
PCTex.cpp
@ -357,10 +357,20 @@ void copyConvertBitmap(void const *,i32,i32,void *,i32,i32,i32,i32,bool)
|
||||
printf("copyConvertBitmap(void const *,i32,i32,void *,i32,i32,i32,i32,bool)");
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
void countLeadingZeroBits(u32)
|
||||
// @Ok
|
||||
i32 countLeadingZeroBits(u32 num)
|
||||
{
|
||||
printf("countLeadingZeroBits(u32)");
|
||||
if (!num)
|
||||
return 0;
|
||||
|
||||
i32 count = 0;
|
||||
while (num & 1)
|
||||
{
|
||||
num >>= 1;
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
|
2
PCTex.h
2
PCTex.h
@ -89,7 +89,7 @@ EXPORT void PCTex_UpdateForSoftwareRenderer(void);
|
||||
EXPORT ClutPC* clutToClutPc(const u16*);
|
||||
EXPORT void copyBitmap(void const *,i32,void *,i32,i32,i32,i32);
|
||||
EXPORT void copyConvertBitmap(void const *,i32,i32,void *,i32,i32,i32,i32,bool);
|
||||
EXPORT void countLeadingZeroBits(u32);
|
||||
EXPORT i32 countLeadingZeroBits(u32);
|
||||
EXPORT void downloadTexture(PCTexture *,u16 *,i32,i32);
|
||||
EXPORT void enumPixelFormatsCB(_DDPIXELFORMAT *,void *);
|
||||
EXPORT void releaseClutPc(ClutPC *);
|
||||
|
Loading…
Reference in New Issue
Block a user