summaryrefslogtreecommitdiff
path: root/namegen.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-03 21:20:01 +0000
committertron <tron@openttd.org>2005-10-03 21:20:01 +0000
commitdb3b1228bfad7fb42ce708dc93db21d840b07577 (patch)
tree4379525d1560a92903c1fdc87cdbad70a36ea271 /namegen.c
parentb0a365ee676b8b612d88a3df1cac904db73e8bcf (diff)
downloadopenttd-db3b1228bfad7fb42ce708dc93db21d840b07577.tar.xz
(svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them
Diffstat (limited to 'namegen.c')
-rw-r--r--namegen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/namegen.c b/namegen.c
index d43893a8f..8aa009f10 100644
--- a/namegen.c
+++ b/namegen.c
@@ -3,12 +3,13 @@
#include "stdafx.h"
#include "openttd.h"
#include "debug.h"
+#include "macros.h"
#include "namegen.h"
#include "table/namegen.h"
static inline uint32 SeedChance(int shift_by, int max, uint32 seed)
{
- return ((uint16)(seed >> shift_by) * max) >> 16;
+ return (GB(seed, shift_by, 16) * max) >> 16;
}
static inline uint32 SeedModChance(int shift_by, int max, uint32 seed)