--- deliantra/server/random_maps/random_map.C 2006/09/10 16:06:37 1.3 +++ deliantra/server/random_maps/random_map.C 2006/09/29 20:12:32 1.6 @@ -1,9 +1,3 @@ - -/* - * static char *rcsid_random_map_c = - * "$Id: random_map.C,v 1.3 2006/09/10 16:06:37 root Exp $"; - */ - /* CrossFire, A Multiplayer game for X-windows @@ -24,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - The authors can be reached via e-mail at crossfire-devel@real-time.com + The authors can be reached via e-mail at */ #include @@ -58,11 +52,11 @@ printf ("\n"); } EXTERN FILE *logfile; -mapstruct * +maptile * generate_random_map (const char *OutFileName, RMParms * RP) { char **layout, buf[HUGE_BUF]; - mapstruct *theMap; + maptile *theMap; int i; /* pick a random seed, or use the one from the input file */ @@ -76,18 +70,19 @@ if (RP->difficulty == 0) { RP->difficulty = RP->dungeon_level; /* use this instead of a map difficulty */ + if (RP->difficulty_increase > 0.001) - { - RP->difficulty = (int) ((float) RP->dungeon_level * RP->difficulty_increase); - if (RP->difficulty < 1) - RP->difficulty = 1; - } + RP->difficulty = (int) ((float) RP->dungeon_level * RP->difficulty_increase); + + if (RP->difficulty < 1) + RP->difficulty = 1; } else RP->difficulty_given = 1; if (RP->Xsize < MIN_RANDOM_MAP_SIZE) RP->Xsize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5; + if (RP->Ysize < MIN_RANDOM_MAP_SIZE) RP->Ysize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5; @@ -170,7 +165,6 @@ return theMap; } - /* function selects the layout function and gives it whatever arguments it needs. */ char **