(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().

This commit is contained in:
celestar
2007-01-11 11:05:01 +00:00
parent 0677847569
commit 08de6b082a
19 changed files with 40 additions and 39 deletions

View File

@@ -832,7 +832,7 @@ static const SpriteGroup *VehicleResolveReal(const ResolverObject *object, const
} else if (v->cargo_count == 0 || totalsets == 2) {
set = 0;
} else {
set = v->cargo_count * (totalsets - 2) / max(1, v->cargo_cap) + 1;
set = v->cargo_count * (totalsets - 2) / max((uint16)1, v->cargo_cap) + 1;
}
return in_motion ? group->g.real.loaded[set] : group->g.real.loading[set];