diff options
-rw-r--r-- | games/urban/distinfo | 5 | ||||
-rw-r--r-- | games/urban/patches/patch-ab | 25 | ||||
-rw-r--r-- | games/urban/patches/patch-src_objects_tank.cc | 24 |
3 files changed, 48 insertions, 6 deletions
diff --git a/games/urban/distinfo b/games/urban/distinfo index aaa6014a769..cb1e0e52c7f 100644 --- a/games/urban/distinfo +++ b/games/urban/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2010/02/14 22:04:01 joerg Exp $ +$NetBSD: distinfo,v 1.9 2011/11/27 19:40:50 joerg Exp $ SHA1 (urban-1.5.3.tar.gz) = 3450988a83fa969df0148e4cdce179c033fa0868 RMD160 (urban-1.5.3.tar.gz) = 55c3aab336f16936139601f50dda4854470f38fb @@ -7,7 +7,7 @@ SHA1 (sound.tar.gz) = 828f93e1ac6ee43cb82fcd6290a62ba94d7ba18b RMD160 (sound.tar.gz) = 250815b664b9e3f8415c9850eeb00dce09e3006f Size (sound.tar.gz) = 8116030 bytes SHA1 (patch-aa) = eed2cef240eaf0bee47208918e27b65b6cd897f4 -SHA1 (patch-ab) = 52f943c7740e05de2f57a6e874d30cf11d5ac5f5 +SHA1 (patch-ab) = 575bccbfaf8533fcf7c8481e9106558a165a4011 SHA1 (patch-ac) = 6c6d978ef899fbed49d598c4fde8e65d9ec4d8d9 SHA1 (patch-ad) = 6b877d79f6f5d2c26f8072979a5d0285f1448ff5 SHA1 (patch-ae) = 637883461b08a002fc75bb49ae18298f1d35bd79 @@ -15,3 +15,4 @@ SHA1 (patch-af) = c1aad1d42792113e56e60a6a2a572d33aad1000b SHA1 (patch-ag) = 181df221bf1f8ba7ee649315257d47e832b19b1a SHA1 (patch-ah) = e11a947ef03677dec035e30dfb06dcf24eb03cf6 SHA1 (patch-ai) = 622526ee3063af3c87a8e0e8fbf10ced0cebbe70 +SHA1 (patch-src_objects_tank.cc) = f56fa0039798dfcc256fff5a27591167cfa4fb5d diff --git a/games/urban/patches/patch-ab b/games/urban/patches/patch-ab index 1c6724694ef..fd84ed5e4f9 100644 --- a/games/urban/patches/patch-ab +++ b/games/urban/patches/patch-ab @@ -1,8 +1,16 @@ -$NetBSD: patch-ab,v 1.1.1.1 2004/04/16 18:18:28 xtraeme Exp $ +$NetBSD: patch-ab,v 1.2 2011/11/27 19:40:50 joerg Exp $ ---- src/credits/credits.cc.orig 2004-04-16 19:33:15.000000000 +0200 -+++ src/credits/credits.cc 2004-04-16 19:35:57.000000000 +0200 -@@ -72,50 +72,46 @@ +--- src/credits/credits.cc.orig 1999-06-11 12:25:40.000000000 +0000 ++++ src/credits/credits.cc +@@ -33,6 +33,7 @@ + + *****************************************************************************/ + ++#include <algorithm> + #include <stdlib.h> + #include <stdio.h> + #include <math.h> +@@ -72,50 +73,46 @@ struct CreditsInfo { int erase_title; } _ci[] = { {"PROGRAMMING", @@ -81,3 +89,12 @@ $NetBSD: patch-ab,v 1.1.1.1 2004/04/16 18:18:28 xtraeme Exp $ uchar lightmap[256 * 256] = {}; +@@ -141,7 +138,7 @@ static void InitLightmap() { + nz = 0; + + lightmap[x + y * 256] = +- (uchar)(255 <? nz * 191 + nz * nz * nz * nz * nz * nz * nz * nz * nz * 64); ++ (uchar)std::min(255.0f, nz * 191 + nz * nz * nz * nz * nz * nz * nz * nz * nz * 64); + } + } + 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 |