(svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them

This commit is contained in:
tron
2005-10-03 21:20:01 +00:00
parent a4287a47b3
commit 6d7c7e67b2
12 changed files with 48 additions and 44 deletions

View File

@@ -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)