Beispiel #1
0
void
write_map_data (SaveFile *f)
{
  int i;

  save_file_write_int (f, map.w);
  save_file_write_int (f, map.h);
  save_file_write_int (f, map.totalRooms);
  save_file_write_int (f, place_of_power);

  for (i = 0; i < map.w * map.h; i++)
    {
      save_file_write_char (f, map.m[i]);
      save_file_write_int (f, map.r[i]);

      if ((i % 7447) == 7446)
        SavingScreen (0, (float)i / (float) (map.w * map.h));
    }

  for (i = 0; i < map.totalRooms; i++)
    {
      write_room_data (f, &(map.rooms)[i]);

      if ((i % 85) == 84)
        SavingScreen (1, (float)i / (float) map.totalRooms);
    }
}
Beispiel #2
0
void WriteMapData()
{
	int i;

	FWInt(map.w);
	FWInt(map.h);
	FWInt(map.totalRooms);
	FWInt(place_of_power);
	for (i = 0; i < map.w*map.h; i++) {
		FWChar(map.m[i]);
		FWInt(map.r[i]);
		if ((i % 7447) == 7446) {
			SavingScreen(0, (float)i / (float)(map.w*map.h));
		}
	}
	for (i = 0; i < map.totalRooms; i++) {
		WriteRoomData(&rooms[i]);
		if ((i % 85)==84) {
			SavingScreen(1, (float)i / (float)map.totalRooms);
		}
	}
}