diff options
author | wiz <wiz@pkgsrc.org> | 2001-01-04 01:08:55 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2001-01-04 01:08:55 +0000 |
commit | c3661d0549660a303444b9907ca4c3c6e97d9ddf (patch) | |
tree | bf75e805b37052e77604a6fdb925c3a51c8dcc55 /games | |
parent | 31751e476b799ee74e10d67da3e35ab0482b6fb3 (diff) | |
download | pkgsrc-c3661d0549660a303444b9907ca4c3c6e97d9ddf.tar.gz |
Use random(3) instead of rand(3) -- makes the game much more interesting...
Diffstat (limited to 'games')
-rw-r--r-- | games/clanbomber/Makefile | 3 | ||||
-rw-r--r-- | games/clanbomber/files/patch-sum | 14 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-aa | 16 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-ab | 25 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-ad | 24 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-ae | 13 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-af | 30 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-ag | 22 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-ah | 44 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-aj | 13 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-ak | 49 | ||||
-rw-r--r-- | games/clanbomber/patches/patch-al | 36 |
12 files changed, 279 insertions, 10 deletions
diff --git a/games/clanbomber/Makefile b/games/clanbomber/Makefile index 7e7dd2b7cfe..829f536f702 100644 --- a/games/clanbomber/Makefile +++ b/games/clanbomber/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.2 2000/12/20 14:24:03 wiz Exp $ +# $NetBSD: Makefile,v 1.3 2001/01/04 01:08:55 wiz Exp $ DISTNAME= clanbomber-1.01 +PKGNAME= ${DISTNAME}nb1 CATEGORIES= games x11 MASTER_SITES= http://www.clanbomber.de/files/ diff --git a/games/clanbomber/files/patch-sum b/games/clanbomber/files/patch-sum index 506243ed650..8b45780efbf 100644 --- a/games/clanbomber/files/patch-sum +++ b/games/clanbomber/files/patch-sum @@ -1,4 +1,12 @@ -$NetBSD: patch-sum,v 1.1.1.1 2000/12/15 07:42:32 garbled Exp $ +$NetBSD: patch-sum,v 1.2 2001/01/04 01:08:56 wiz Exp $ -MD5 (patch-aa) = 025ea5c07590e611e12ed341f8b2a1de -MD5 (patch-ab) = 10fc30a3bc944fab025f46ba96442826 +MD5 (patch-aa) = fc280de89f38b5ae1aa7d6bba23c21b2 +MD5 (patch-ab) = 613bfdd8024e10953325595f862f26c8 +MD5 (patch-ad) = afed8b52af35aa833ff0cdea64190372 +MD5 (patch-ae) = 7145999a981ce403bd1d1ee7e31d7237 +MD5 (patch-af) = 2e37b2cc00bf296fcb2f45bca69f51ba +MD5 (patch-ag) = 981b1d2a1b0c417616301c2fe71ee49d +MD5 (patch-ah) = a5632faaca21c16235e34be99001e9ec +MD5 (patch-aj) = f5c950b7547ffcd95ab406dbf63531be +MD5 (patch-ak) = 6a3c6f8fa7a47a137ea451d3df63c357 +MD5 (patch-al) = 011dc5607dad88db9da89f6ef1ac967d diff --git a/games/clanbomber/patches/patch-aa b/games/clanbomber/patches/patch-aa index 5faab07413e..ec52a723dbe 100644 --- a/games/clanbomber/patches/patch-aa +++ b/games/clanbomber/patches/patch-aa @@ -1,6 +1,7 @@ -$NetBSD: patch-aa,v 1.1.1.1 2000/12/15 07:42:32 garbled Exp $ ---- clanbomber/Resources.cpp.orig Fri Dec 15 00:10:49 2000 -+++ clanbomber/Resources.cpp Fri Dec 15 00:13:12 2000 +$NetBSD: patch-aa,v 1.2 2001/01/04 01:08:58 wiz Exp $ + +--- clanbomber/Resources.cpp.orig Tue Mar 28 17:04:30 2000 ++++ clanbomber/Resources.cpp @@ -24,6 +24,7 @@ #include <ClanLib/Core/Sound/soundbuffer.h> @@ -19,3 +20,12 @@ $NetBSD: patch-aa,v 1.1.1.1 2000/12/15 07:42:32 garbled Exp $ } catch (CL_Error err) { +@@ -149,7 +149,7 @@ + { + if (!sur_titlescreen) + { +- if (rand()%2) ++ if (random()%2) + { + sur_titlescreen = CL_Surface::load("Titlescreen/andi", res); + } diff --git a/games/clanbomber/patches/patch-ab b/games/clanbomber/patches/patch-ab index 96bb9de78c1..02ce6c5dae8 100644 --- a/games/clanbomber/patches/patch-ab +++ b/games/clanbomber/patches/patch-ab @@ -1,6 +1,16 @@ -$NetBSD: patch-ab,v 1.1.1.1 2000/12/15 07:42:32 garbled Exp $ ---- clanbomber/ClanBomber.cpp.orig Fri Dec 15 00:27:16 2000 -+++ clanbomber/ClanBomber.cpp Fri Dec 15 00:27:46 2000 +$NetBSD: patch-ab,v 1.2 2001/01/04 01:08:59 wiz Exp $ + +--- clanbomber/ClanBomber.cpp.orig Sat Apr 1 18:39:50 2000 ++++ clanbomber/ClanBomber.cpp +@@ -83,7 +83,7 @@ + CL_SetupCore::init_display(); + CL_SetupCore::init_sound(); + +- srand( (long)time(NULL) ); ++ srandom( (long)time(NULL) ); + + CL_Display::set_videomode(800, 600, 16); + @@ -95,7 +95,7 @@ show_fps = false; key_F1 = false; @@ -10,3 +20,12 @@ $NetBSD: patch-ab,v 1.1.1.1 2000/12/15 07:42:32 garbled Exp $ if (!opendir(map_path)) { map_path = "/usr/local/share/clanbomber/maps"; +@@ -790,7 +790,7 @@ + Resources::Intro_fl_logo()->put_screen( 100, 250, 0 ); + Resources::Font_small()->print_left( 230, 360, domi_str->mid(0,domispell) ); + CL_Display::flip_display(); +- CL_System::sleep(rand()%100 + 80); ++ CL_System::sleep(random()%100 + 80); + } + CL_System::sleep(1500); + diff --git a/games/clanbomber/patches/patch-ad b/games/clanbomber/patches/patch-ad new file mode 100644 index 00000000000..17cc6acb971 --- /dev/null +++ b/games/clanbomber/patches/patch-ad @@ -0,0 +1,24 @@ +$NetBSD: patch-ad,v 1.1 2001/01/04 01:08:59 wiz Exp $ + +--- clanbomber/Controller_AI.cpp.orig Tue Mar 7 01:36:56 2000 ++++ clanbomber/Controller_AI.cpp +@@ -588,8 +588,8 @@ + + for (int per=0; per<10; per++) + { +- int a = rand()%4; +- int b = rand()%4; ++ int a = random()%4; ++ int b = random()%4; + Direction dummy; + dummy = dirs[a]; + dirs[a] = dirs[b]; +@@ -960,7 +960,7 @@ + bomber->set_pos( x_org, y_org ); + } + +- if (dmap[x][y] > 0 && dmap[x][y] == best.z && rand()%2) ++ if (dmap[x][y] > 0 && dmap[x][y] == best.z && random()%2) + { + if (distance >= max_distance) + { diff --git a/games/clanbomber/patches/patch-ae b/games/clanbomber/patches/patch-ae new file mode 100644 index 00000000000..ebfa97c0e38 --- /dev/null +++ b/games/clanbomber/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1 2001/01/04 01:08:59 wiz Exp $ + +--- clanbomber/Corpse_Part.cpp.orig Sat Dec 11 11:17:28 1999 ++++ clanbomber/Corpse_Part.cpp +@@ -25,7 +25,7 @@ + { + speed = 400; + surface = Resources::Corpse_part(); +- sprite_nr = rand()%4; ++ sprite_nr = random()%4; + z = Z_CORPSE_PART; + countdown = 2.0f; + can_fly_over_walls = false; diff --git a/games/clanbomber/patches/patch-af b/games/clanbomber/patches/patch-af new file mode 100644 index 00000000000..f2cf28b9d1b --- /dev/null +++ b/games/clanbomber/patches/patch-af @@ -0,0 +1,30 @@ +$NetBSD: patch-af,v 1.1 2001/01/04 01:08:59 wiz Exp $ + +--- clanbomber/Credits.cpp.orig Tue Mar 28 17:04:30 2000 ++++ clanbomber/Credits.cpp +@@ -150,9 +150,9 @@ + t += Timer::time_elapsed(); + for (; t>0.04f; t-=0.04f) + { +- Corpse_Part* cp = new Corpse_Part( rand()%800-60, -40, app ); +- cp->fly_to( rand()%800-60, 540 ); +- Resources::Splash(rand()%2)->play(); ++ Corpse_Part* cp = new Corpse_Part( random()%800-60, -40, app ); ++ cp->fly_to( random()%800-60, 540 ); ++ Resources::Splash(random()%2)->play(); + } + } + yoffset = 50; +@@ -172,9 +172,9 @@ + t += Timer::time_elapsed(); + for (; t>0.04f; t-=0.04f) + { +- Corpse_Part* cp = new Corpse_Part( rand()%800-60, -40, app ); +- cp->fly_to( rand()%800-60, 540 ); +- Resources::Splash(rand()%2)->play(); ++ Corpse_Part* cp = new Corpse_Part( random()%800-60, -40, app ); ++ cp->fly_to( random()%800-60, 540 ); ++ Resources::Splash(random()%2)->play(); + } + } + yoffset = -text.get_num_items()*40 + 100; diff --git a/games/clanbomber/patches/patch-ag b/games/clanbomber/patches/patch-ag new file mode 100644 index 00000000000..5dbb47a9d9a --- /dev/null +++ b/games/clanbomber/patches/patch-ag @@ -0,0 +1,22 @@ +$NetBSD: patch-ag,v 1.1 2001/01/04 01:08:59 wiz Exp $ + +--- clanbomber/Debug.cpp.orig Sun Jan 9 02:18:32 2000 ++++ clanbomber/Debug.cpp +@@ -64,7 +64,7 @@ + if (CL_Keyboard::get_keycode(CL_KEY_F2) && !key_F2) + { + +- Bomber* bomber =new Bomber(((rand()%(MAP_WIDTH-2))+1)*40,((rand()%(MAP_HEIGHT-2))+1)*40,Bomber::GREEN, Controller::create(Controller::AI), "Debug Robi", 0,0, app); ++ Bomber* bomber =new Bomber(((random()%(MAP_WIDTH-2))+1)*40,((random()%(MAP_HEIGHT-2))+1)*40,Bomber::GREEN, Controller::create(Controller::AI), "Debug Robi", 0,0, app); + // bomber->fly_to(app->map->get_passable()); + bomber->controller->activate(); + } +@@ -72,7 +72,7 @@ + + if (CL_Keyboard::get_keycode(CL_KEY_F3) && !key_F3) + { +- Bomber* bomber =new Bomber(((rand()%(MAP_WIDTH-2))+1)*40,((rand()%(MAP_HEIGHT-2))+1)*40,Bomber::RED, Controller::create(Controller::AI_MIC), "Debug Robi MIC", 0,0, app); ++ Bomber* bomber =new Bomber(((random()%(MAP_WIDTH-2))+1)*40,((random()%(MAP_HEIGHT-2))+1)*40,Bomber::RED, Controller::create(Controller::AI_MIC), "Debug Robi MIC", 0,0, app); + // bomber->fly_to(app->map->get_passable()); + bomber->controller->activate(); + } diff --git a/games/clanbomber/patches/patch-ah b/games/clanbomber/patches/patch-ah new file mode 100644 index 00000000000..b430afc7f9d --- /dev/null +++ b/games/clanbomber/patches/patch-ah @@ -0,0 +1,44 @@ +$NetBSD: patch-ah,v 1.1 2001/01/04 01:08:59 wiz Exp $ + +--- clanbomber/Map.cpp.orig Mon Mar 27 15:05:47 2000 ++++ clanbomber/Map.cpp +@@ -236,7 +236,7 @@ + { + do + { +- spin_to(rand()%get_map_count()); ++ spin_to(random()%get_map_count()); + } while (Config::get_number_of_players() > get_max_players() || !current_map->is_enabled()); + reload(); + } +@@ -314,7 +314,7 @@ + maptiles[x][y] = MapTile::create(MapTile::BOX, 40*x, 40*y, app); + break; + case 'R': +- if ( rand() %3) ++ if ( random() %3) + { + maptiles[x][y] = MapTile::create(MapTile::BOX, 40*x, 40*y, app); + } +@@ -590,8 +590,8 @@ + int ymapfield; + do + { +- xmapfield = rand() % 17; +- ymapfield = rand() % 13; ++ xmapfield = random() % 17; ++ ymapfield = random() % 13; + if (maptiles[xmapfield][ymapfield]->is_passable() && !maptiles[xmapfield][ymapfield]->is_vanishing()) + { + return maptiles[xmapfield][ymapfield]; +@@ -609,8 +609,8 @@ + int ymapfield; + do + { +- xmapfield = rand() % 17; +- ymapfield = rand() % 13; ++ xmapfield = random() % 17; ++ ymapfield = random() % 13; + if (maptiles[xmapfield][ymapfield]->get_type()!=MapTile::NONE && !maptiles[xmapfield][ymapfield]->is_vanishing()) + { + return maptiles[xmapfield][ymapfield]; diff --git a/games/clanbomber/patches/patch-aj b/games/clanbomber/patches/patch-aj new file mode 100644 index 00000000000..482bd058c04 --- /dev/null +++ b/games/clanbomber/patches/patch-aj @@ -0,0 +1,13 @@ +$NetBSD: patch-aj,v 1.1 2001/01/04 01:09:00 wiz Exp $ + +--- clanbomber/MapEntry.cpp.orig Sun Jan 9 01:34:44 2000 ++++ clanbomber/MapEntry.cpp +@@ -385,7 +385,7 @@ + int new_pos; + do + { +- new_pos = rand()%max_players; ++ new_pos = random()%max_players; + }while (taken[new_pos]==true); + + temp_bomber_pos[new_pos]=bomber_pos[i]; diff --git a/games/clanbomber/patches/patch-ak b/games/clanbomber/patches/patch-ak new file mode 100644 index 00000000000..0d2be4f8254 --- /dev/null +++ b/games/clanbomber/patches/patch-ak @@ -0,0 +1,49 @@ +$NetBSD: patch-ak,v 1.1 2001/01/04 01:09:00 wiz Exp $ + +--- clanbomber/MapTile.cpp.orig Sun Jan 9 01:40:25 2000 ++++ clanbomber/MapTile.cpp +@@ -118,7 +118,7 @@ + } + if (Config::get_theme() == 4) + { +- ret->set_sprite_nr( (rand()%4) *4 +type); ++ ret->set_sprite_nr( (random()%4) *4 +type); + } + else + { +@@ -166,7 +166,7 @@ + + void MapTile::draw_shaken() + { +- draw( rand()%4, rand()%4 ); ++ draw( random()%4, random()%4 ); + } + + void MapTile::vanish() +@@ -254,7 +254,7 @@ + + void MapTile::spawn_extra() + { +- switch (rand()%8) ++ switch (random()%8) + { + case 0: + if (Config::get_power()) +@@ -284,7 +284,7 @@ + } + break; + case 3: +- switch (rand()%2) ++ switch (random()%2) + { + case 0: + if (!Config::get_start_kick() && Config::get_kick()) +@@ -307,7 +307,7 @@ + } + break; + case 4: +- switch (rand()%16) ++ switch (random()%16) + { + case 0: + if (Config::get_joint()) diff --git a/games/clanbomber/patches/patch-al b/games/clanbomber/patches/patch-al new file mode 100644 index 00000000000..c056e0b6dfc --- /dev/null +++ b/games/clanbomber/patches/patch-al @@ -0,0 +1,36 @@ +$NetBSD: patch-al,v 1.1 2001/01/04 01:09:00 wiz Exp $ + +--- clanbomber/Bomber_Corpse.cpp.orig Sun Jan 9 02:18:32 2000 ++++ clanbomber/Bomber_Corpse.cpp +@@ -76,7 +76,7 @@ + + if (splash_counter!=-1) + { +- cur_dir = Direction(rand() % 4); ++ cur_dir = Direction(random() % 4); + move(); + CL_Iterator<Bomber> bomber_object_counter(app->bomber_objects); + while (bomber_object_counter.next() != NULL) +@@ -89,7 +89,7 @@ + { + if (ready_to_splash) + { +- PLAY_PAN(Resources::Splash(rand()%2)); ++ PLAY_PAN(Resources::Splash(random()%2)); + splash_counter++; + if (splash_counter==5) + { +@@ -126,10 +126,10 @@ + cp = new Corpse_Part( x, y, app ); + + int xmaptiles, ymaptiles; +- xmaptiles = rand() % 17; +- ymaptiles = rand() % 13; ++ xmaptiles = random() % 17; ++ ymaptiles = random() % 13; + +- cp->fly_to(xmaptiles*40 +rand()%20-10 ,ymaptiles*40 +rand()%20-10); ++ cp->fly_to(xmaptiles*40 +random()%20-10 ,ymaptiles*40 +random()%20-10); + } + } + } |