summaryrefslogtreecommitdiff
path: root/namegen.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-23 13:04:44 +0000
committertron <tron@openttd.org>2005-10-23 13:04:44 +0000
commit181d586a7c13a296a1b9355e15e55dda7ac0fcb2 (patch)
tree7a8d1fbbe0d0d6ee2c8e981c57be6a9003505e97 /namegen.c
parent0b936c3222b3945f738885c6c7db3b46363ec6fe (diff)
downloadopenttd-181d586a7c13a296a1b9355e15e55dda7ac0fcb2.tar.xz
(svn r3078) Some more stuff, which piled up:
- const, whitespace, indentation, bracing, GB/SB, pointless casts - use the trinary operator where appropriate - data types (uint[] -> AcceptedCargo, ...) - if cascade -> switch - if (ptr) -> if (ptr != NULL) - DeMorgan's Law - Fix some comments - 0 -> '\0', change magic numbers to symbolic constants
Diffstat (limited to 'namegen.c')
-rw-r--r--namegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/namegen.c b/namegen.c
index 8aa009f10..f058a3e8f 100644
--- a/namegen.c
+++ b/namegen.c
@@ -642,7 +642,7 @@ uint32 GetOldTownName(uint32 townnameparts, byte old_town_name_type)
/* NUM_SILLY_1 - lower 16 bits
* NUM_SILLY_2 - upper 16 bits without leading 1 (first 8 bytes)
* 1000 0000 2222 2222 0000 0000 1111 1111 */
- return FIXNUM(townnameparts, lengthof(name_silly_1), 0) | FIXNUM(((townnameparts >> 16)&0xFF), lengthof(name_silly_2), 16);
+ return FIXNUM(townnameparts, lengthof(name_silly_1), 0) | FIXNUM(GB(townnameparts, 16, 8), lengthof(name_silly_2), 16);
}
return 0;
}