--- deliantra/server/random_maps/room_gen_spiral.C 2006/12/31 19:02:24 1.5 +++ deliantra/server/random_maps/room_gen_spiral.C 2007/01/27 02:19:37 1.9 @@ -1,26 +1,26 @@ - /* - CrossFire, A Multiplayer game for X-windows - - Copyright (C) 1994 Mark Wedel - Copyright (C) 1992 Frank Tore Johansen - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - The author can be reached via e-mail to mark@pyramid.com -*/ + * CrossFire, A Multiplayer game for X-windows + * + * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team + * Copyright (C) 1994 Mark Wedel + * Copyright (C) 1992 Frank Tore Johansen + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * The author can be reached via e-mail to mark@pyramid.com + */ /* The onion room generator: @@ -84,7 +84,7 @@ /* select random options if necessary */ if (option == 0) { - option = RANDOM () % MAX_SPIRAL_OPT; + option = rndm (MAX_SPIRAL_OPT); } /* the order in which these are evaluated matters */ @@ -94,7 +94,7 @@ if ((option & REGULAR_SPIRAL) && (option & FIT_SPIRAL)) { /* unset REGULAR_SPIRAL half the time */ - if (RANDOM () % 2 && (option & REGULAR_SPIRAL)) + if (rndm (2) && (option & REGULAR_SPIRAL)) option -= REGULAR_SPIRAL; else option -= FIT_SPIRAL; @@ -105,7 +105,7 @@ /* choose the spiral pitch */ if (!(option & FINE_SPIRAL)) { - float pitch = (RANDOM () % 5) / 10. + 10. / 22.; + float pitch = (rndm (5)) / 10. + 10. / 22.; xscale = yscale = pitch; }