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

Comparing deliantra/server/random_maps/random_map.C (file contents):
Revision 1.17 by pippijn, Sat Jan 6 14:42:30 2007 UTC vs.
Revision 1.18 by root, Thu Jan 11 00:41:08 2007 UTC

54} 54}
55 55
56maptile * 56maptile *
57generate_random_map (const char *OutFileName, random_map_params *RP) 57generate_random_map (const char *OutFileName, random_map_params *RP)
58{ 58{
59 char **layout, buf[HUGE_BUF]; 59 char **layout, buf[16384];
60 maptile *theMap; 60 maptile *theMap;
61 int i; 61 int i;
62 62
63 /* pick a random seed, or use the one from the input file */ 63 /* pick a random seed, or use the one from the input file */
64 SRANDOM (RP->random_seed ? RP->random_seed + RP->dungeon_level : time (0)); 64 SRANDOM (RP->random_seed ? RP->random_seed + RP->dungeon_level : time (0));
631} 631}
632 632
633void 633void
634write_map_parameters_to_string (char *buf, random_map_params *RP) 634write_map_parameters_to_string (char *buf, random_map_params *RP)
635{ 635{
636 char small_buf[2048]; 636 char small_buf[16384];
637 637
638 sprintf (buf, "xsize %d\nysize %d\n", RP->Xsize, RP->Ysize); 638 sprintf (buf, "xsize %d\nysize %d\n", RP->Xsize, RP->Ysize);
639 639
640 if (RP->wallstyle[0]) 640 if (RP->wallstyle[0])
641 { 641 {
785 } 785 }
786 786
787 if (RP->random_seed) 787 if (RP->random_seed)
788 { 788 {
789 sprintf (small_buf, "random_seed %d\n", RP->random_seed); 789 sprintf (small_buf, "random_seed %d\n", RP->random_seed);
790 strcat (buf, small_buf);
791 }
792
793 if (RP->custom)
794 {
795 sprintf (small_buf, "custom %s\n", RP->custom);
790 strcat (buf, small_buf); 796 strcat (buf, small_buf);
791 } 797 }
792} 798}
793 799
794void 800void
816 int difficulty_given_n, 822 int difficulty_given_n,
817 int decoroptions_n, 823 int decoroptions_n,
818 int orientation_n, 824 int orientation_n,
819 int origin_x_n, int origin_y_n, int random_seed_n, int treasureoptions_n, float difficulty_increase) 825 int origin_x_n, int origin_y_n, int random_seed_n, int treasureoptions_n, float difficulty_increase)
820{ 826{
821 char small_buf[2048]; 827 char small_buf[16384];
822 828
823 sprintf (buf, "xsize %d\nysize %d\n", xsize_n, ysize_n); 829 sprintf (buf, "xsize %d\nysize %d\n", xsize_n, ysize_n);
824 830
825 if (wallstyle_n && wallstyle_n[0]) 831 if (wallstyle_n && wallstyle_n[0])
826 { 832 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines