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.14 by root, Tue Apr 15 03:00:24 2008 UTC vs.
Revision 1.15 by root, Sun May 4 14:12:37 2008 UTC

71 SizeX = xsize / 2 - 2; 71 SizeX = xsize / 2 - 2;
72 SizeY = ysize / 2 - 2; 72 SizeY = ysize / 2 - 2;
73 73
74 /* select random options if necessary */ 74 /* select random options if necessary */
75 if (option == 0) 75 if (option == 0)
76 option = rndm (MAX_SPIRAL_OPT); 76 option = rmg_rndm (MAX_SPIRAL_OPT);
77 77
78 /* the order in which these are evaluated matters */ 78 /* the order in which these are evaluated matters */
79 79
80 /* the following two are mutually exclusive. 80 /* the following two are mutually exclusive.
81 pick one if they're both set. */ 81 pick one if they're both set. */
82 if ((option & REGULAR_SPIRAL) && (option & FIT_SPIRAL)) 82 if ((option & REGULAR_SPIRAL) && (option & FIT_SPIRAL))
83 { 83 {
84 /* unset REGULAR_SPIRAL half the time */ 84 /* unset REGULAR_SPIRAL half the time */
85 if (rndm (2) && (option & REGULAR_SPIRAL)) 85 if (rmg_rndm (2) && (option & REGULAR_SPIRAL))
86 option -= REGULAR_SPIRAL; 86 option -= REGULAR_SPIRAL;
87 else 87 else
88 option -= FIT_SPIRAL; 88 option -= FIT_SPIRAL;
89 } 89 }
90 90
91 xscale = yscale = MAX_FINE; /* fine spiral */ 91 xscale = yscale = MAX_FINE; /* fine spiral */
92 92
93 /* choose the spiral pitch */ 93 /* choose the spiral pitch */
94 if (!(option & FINE_SPIRAL)) 94 if (!(option & FINE_SPIRAL))
95 { 95 {
96 float pitch = (rndm (5)) / 10. + 10. / 22.; 96 float pitch = (rmg_rndm (5)) / 10. + 10. / 22.;
97 97
98 xscale = yscale = pitch; 98 xscale = yscale = pitch;
99 } 99 }
100 100
101 if ((option & FIT_SPIRAL) && (xsize != ysize)) 101 if ((option & FIT_SPIRAL) && (xsize != ysize))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines