Changeset - r8001:577b1328f7bd
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-12-02 19:23:46
rubidium@openttd.org
(svn r11560) -Codechange: replace 'custom' version of FindLastBit with the generic.
1 file changed with 1 insertions and 13 deletions:
0 comments (0 inline, 0 general)
src/airport.cpp
Show inline comments
 
@@ -431,18 +431,6 @@ static const char* const _airport_headin
 
	"DUMMY" // extra heading for 255
 
};
 

	
 
static uint AirportBlockToString(uint32 block)
 
{
 
	uint i = 0;
 
	if (block & 0xffff0000) { block >>= 16; i += 16; }
 
	if (block & 0x0000ff00) { block >>=  8; i +=  8; }
 
	if (block & 0x000000f0) { block >>=  4; i +=  4; }
 
	if (block & 0x0000000c) { block >>=  2; i +=  2; }
 
	if (block & 0x00000002) { i += 1; }
 
	return i;
 
}
 

	
 

	
 
static void AirportPrintOut(uint nofelements, const AirportFTA *layout, bool full_report)
 
{
 
	if (!full_report) printf("(P = Current Position; NP = Next Position)\n");
 
@@ -453,7 +441,7 @@ static void AirportPrintOut(uint nofelem
 
				byte heading = (current->heading == 255) ? MAX_HEADINGS + 1 : current->heading;
 
				printf("\tPos:%2d NPos:%2d Heading:%15s Block:%2d\n", current->position,
 
					    current->next_position, _airport_heading_strings[heading],
 
							AirportBlockToString(current->block));
 
							FindLastBit(current->block));
 
			} else {
 
				printf("P:%2d NP:%2d", current->position, current->next_position);
 
			}
0 comments (0 inline, 0 general)