diff options
Diffstat (limited to 'games/urban/patches/patch-src_objects_tank.cc')
-rw-r--r-- | games/urban/patches/patch-src_objects_tank.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/games/urban/patches/patch-src_objects_tank.cc b/games/urban/patches/patch-src_objects_tank.cc new file mode 100644 index 00000000000..fbf9fb6b1c7 --- /dev/null +++ b/games/urban/patches/patch-src_objects_tank.cc @@ -0,0 +1,24 @@ +$NetBSD: patch-src_objects_tank.cc,v 1.1 2011/11/27 19:40:50 joerg Exp $ + +--- src/objects/tank.cc.orig 2011-11-27 02:41:49.000000000 +0000 ++++ src/objects/tank.cc +@@ -28,6 +28,7 @@ + + thomas.nyberg@usa.net jonas_b@bitsmart.com + *****************************************************************************/ ++#include <algorithm> + #include <string.h> + #include <stdlib.h> + #include <allegro.h> +@@ -53,9 +54,9 @@ char *comments[] = { + "samples/olvictor.wav"}; + + +-#define __URK ((NUM_SKADA - 1) - (energy <? (MAX_ENERGY - 1)) / (MAX_ENERGY / NUM_SKADA)) ++#define __URK ((NUM_SKADA - 1) - std::min(energy, (MAX_ENERGY - 1)) / (MAX_ENERGY / NUM_SKADA)) + +-#define IMAGE(x) ((x) + 3 * (__URK <? 3)) ++#define IMAGE(x) ((x) + 3 * std::min(__URK, 3)) + #define FROMIMAGE(x) ((x) % 3) + + #define STATE_NONE 0 |