Main Page | Data Structures | Directories | File List | Data Fields | Globals

ldsvguts.h File Reference

Go to the source code of this file.

Functions

void load_saved_city (char *s)
void sanity_check (void)


Function Documentation

void load_saved_city char *  s  ) 
 

Definition at line 642 of file ldsvguts.c.

00643 {
00644     char *cname = (char *) malloc (strlen (lc_save_dir) + strlen (s) + 2);
00645     sprintf (cname, "%s%c%s", lc_save_dir, PATH_SLASH, s);
00646     load_city (cname);
00647     free (cname);
00648 }

void sanity_check void   ) 
 

Definition at line 717 of file ldsvguts.c.

00718 {
00719     static int flag = 0;
00720     int x, y, xx, yy;
00721     for (x = 0; x < WORLD_SIDE_LEN; x++)
00722         for (y = 0; y < WORLD_SIDE_LEN; y++) {
00723             if (MP_TYPE(x,y) == CST_USED) {
00724                 xx = MP_INFO(x,y).int_1;
00725                 yy = MP_INFO(x,y).int_2;
00726                 if (xx < (x - 4) || yy < (y - 4) || xx > x || yy > y ||
00727                     xx < 0 || xx > WORLD_SIDE_LEN ||
00728                     yy < 0 || yy > WORLD_SIDE_LEN) {
00729                     printf ("Sanity failed at %d %d, points to %d %d\n", x, y, xx, yy);
00730                     if (flag == 0)
00731                         yn_dial_box ("MP sanity check error",
00732                                      "Please mail  lincity-users@lists.sourceforge.net",
00733                                      "telling me what you just did.",
00734                                      "Do you think I'll find this bug?");
00735                     flag = 1;
00736                 }
00737             }
00738         }
00739 }


Generated on Sun Dec 26 11:23:34 2004 for lincity by  doxygen 1.3.9.1