diff options
author | skidd13 <skidd13@openttd.org> | 2007-11-26 17:50:22 +0000 |
---|---|---|
committer | skidd13 <skidd13@openttd.org> | 2007-11-26 17:50:22 +0000 |
commit | 71c10f7df7c1ec20bbc0c23580041a2e337b2500 (patch) | |
tree | 2e39f6768332621cf233165bcce1d8d2ee07f273 /src/misc.cpp | |
parent | 734b22e070ca1dac717780d0a4d1ca962c4ddfbf (diff) | |
download | openttd-71c10f7df7c1ec20bbc0c23580041a2e337b2500.tar.xz |
(svn r11527) -Codechange: Split the bitmath functions of to their own files
Diffstat (limited to 'src/misc.cpp')
-rw-r--r-- | src/misc.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/misc.cpp b/src/misc.cpp index 52cd764e8..a74bc1394 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -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; |