for (;;)
{
word = feof (fp) ? "End" : fread_word (fp);
fMatch = FALSE;
switch (UPPER (word[0]))
{
case 'N':
SKEY ("Name", pArea->name);
break;
case 'S':
KEY ("Security", pArea->security, fread_number (fp));
break;
case 'V':
if (!str_cmp (word, "VNUMs"))
{
pArea->min_vnum = fread_number (fp);
pArea->max_vnum = fread_number (fp);
}
break;
case 'E':
if (!str_cmp (word, "End"))
{
fMatch = TRUE;
if (area_first == NULL)
area_first = pArea;
if (area_last != NULL)
area_last->next = pArea;
area_last = pArea;
pArea->next = NULL;
current_area = pArea;
top_area++;
return;
}
break;
case 'B':
SKEY ("Builders", pArea->builders);
break;
case 'C':
SKEY ("Credits", pArea->credits);
break;
}
}
}
With my current Quest system, I'm going to follow the style of having vnums and keeping quests
in areas for now. I may implement a central quest file for global quests.
I'm trying to figure out how the file reading works in ROM, for example in load_area():
I know that the fread_* functions are set up to read data from the area files in the ROM format right?
If i decided to add a #QUESTS section, could I just follow this standard? As in, does it not care about whitespaces? Does it just care about the order in which you have the data?
eg: