ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/room_gen_spiral.C
(Generate patch)

Comparing deliantra/server/random_maps/room_gen_spiral.C (file contents):
Revision 1.26 by root, Tue Jan 3 11:25:34 2012 UTC vs.
Revision 1.30 by root, Sun Jan 29 02:47:05 2017 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 1994 Mark Wedel 5 * Copyright (©) 1994 Mark Wedel
6 * Copyright (©) 1992 Frank Tore Johansen 6 * Copyright (©) 1992 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 9 * the terms of the Affero GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your 10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version. 11 * option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the Affero GNU General Public License 18 * You should have received a copy of the Affero GNU General Public License
19 * and the GNU General Public License along with this program. If not, see 19 * and the GNU General Public License along with this program. If not, see
20 * <http://www.gnu.org/licenses/>. 20 * <http://www.gnu.org/licenses/>.
21 * 21 *
22 * The authors can be reached via e-mail to <support@deliantra.net> 22 * The authors can be reached via e-mail to <support@deliantra.net>
23 */ 23 */
24 24
25/* The onion room generator: 25/* The onion room generator:
26Onion rooms are like this: 26Onion rooms are like this:
43#define MAX_FINE .454545 43#define MAX_FINE .454545
44 44
45void 45void
46map_gen_spiral (layout &maze, int option) 46map_gen_spiral (layout &maze, int option)
47{ 47{
48 int i, j;
49 float parm = 0; 48 float parm = 0;
50 float x = 0, y = 0; 49 float x = 0, y = 0;
51 int ic, jc; 50 int ic, jc;
52 float SizeX, SizeY; 51 float SizeX, SizeY;
53 float xscale, yscale; 52 float xscale, yscale;
67 if (option == 0) 66 if (option == 0)
68 option = rmg_rndm (MAX_SPIRAL_OPT); 67 option = rmg_rndm (MAX_SPIRAL_OPT);
69 68
70 /* the order in which these are evaluated matters */ 69 /* the order in which these are evaluated matters */
71 70
72 /* the following two are mutually exclusive. 71 /* the following two are mutually exclusive.
73 pick one if they're both set. */ 72 pick one if they're both set. */
74 if ((option & REGULAR_SPIRAL) && (option & FIT_SPIRAL)) 73 if ((option & REGULAR_SPIRAL) && (option & FIT_SPIRAL))
75 { 74 {
76 /* unset REGULAR_SPIRAL half the time */ 75 /* unset REGULAR_SPIRAL half the time */
77 if (rmg_rndm (2) && (option & REGULAR_SPIRAL)) 76 if (rmg_rndm (2) && (option & REGULAR_SPIRAL))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines