pkgsrc/games/kapooka/patches/patch-ab
2004-11-29 20:16:59 +00:00

22 lines
491 B
Text

$NetBSD: patch-ab,v 1.1 2004/11/29 20:16:59 wiz Exp $
--- helpers.c.orig 2004-10-20 21:40:31.000000000 +0200
+++ helpers.c
@@ -63,6 +63,8 @@ void HLP_UpdateSinWave(HLP_Wave *_wave)
// Returns the value wrapped inside the range [min, max] inclusive
int HLP_Wrap(int x, int min, int max)
{
+ int diff = max-min;
+
#ifdef DEBUG_CHECKS
if (min >= max)
{
@@ -70,8 +72,6 @@ int HLP_Wrap(int x, int min, int max)
}
#endif
- int diff = max-min;
-
while (x < min)
{
x += diff;