(svn r11527) -Codechange: Split the bitmath functions of to their own files

This commit is contained in:
skidd13
2007-11-26 17:50:22 +00:00
parent 734b22e070
commit 71c10f7df7
10 changed files with 348 additions and 299 deletions

View File

@@ -205,24 +205,6 @@ void InitializeLandscapeVariables(bool only_constants)
}
int FindFirstBit(uint32 value)
{
/* The macro FIND_FIRST_BIT is better to use when your value is
not more than 128. */
byte i = 0;
if (value == 0) return 0;
if ((value & 0x0000ffff) == 0) { value >>= 16; i += 16; }
if ((value & 0x000000ff) == 0) { value >>= 8; i += 8; }
if ((value & 0x0000000f) == 0) { value >>= 4; i += 4; }
if ((value & 0x00000003) == 0) { value >>= 2; i += 2; }
if ((value & 0x00000001) == 0) { i += 1; }
return i;
}
static void Save_NAME()
{
int i;