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

Comparing deliantra/server/common/map.C (file contents):
Revision 1.69 by root, Thu Jan 4 16:56:39 2007 UTC vs.
Revision 1.70 by root, Thu Jan 4 20:29:45 2007 UTC

731 * MSW 2001-07-01 731 * MSW 2001-07-01
732 */ 732 */
733bool 733bool
734maptile::load_header (object_thawer &thawer) 734maptile::load_header (object_thawer &thawer)
735{ 735{
736 char buf[HUGE_BUF], msgbuf[HUGE_BUF], maplorebuf[HUGE_BUF], *key = NULL, *value, *end;
737 int msgpos = 0;
738 int maplorepos = 0;
739
740 for (;;) 736 for (;;)
741 { 737 {
742 keyword kw = thawer.get_kv (); 738 keyword kw = thawer.get_kv ();
743 739
744 switch (kw) 740 switch (kw)
747 LOG (llevError, "%s: end of file while reading map header, aborting header load.\n", &path); 743 LOG (llevError, "%s: end of file while reading map header, aborting header load.\n", &path);
748 return false; 744 return false;
749 745
750 case KW_end: 746 case KW_end:
751 return true; 747 return true;
748
749 default:
750 case KW_ERROR:
751 LOG (llevError, "%s: skipping errornous line (%s) while reading map header.\n", &path, thawer.last_keyword);
752 break;
752 753
753 case KW_msg: 754 case KW_msg:
754 thawer.get_ml (KW_endmsg, msg); 755 thawer.get_ml (KW_endmsg, msg);
755 break; 756 break;
756 757
807 808
808 case KW_tile_path_1: thawer.get (tile_path [0]); break; 809 case KW_tile_path_1: thawer.get (tile_path [0]); break;
809 case KW_tile_path_2: thawer.get (tile_path [1]); break; 810 case KW_tile_path_2: thawer.get (tile_path [1]); break;
810 case KW_tile_path_3: thawer.get (tile_path [2]); break; 811 case KW_tile_path_3: thawer.get (tile_path [2]); break;
811 case KW_tile_path_4: thawer.get (tile_path [3]); break; 812 case KW_tile_path_4: thawer.get (tile_path [3]); break;
812
813 default:
814 LOG (llevError, "%s: skipping unknown key in map header: %s\n", &path, keyword_str [kw]);
815 break;
816 } 813 }
817 } 814 }
818 815
819 abort (); 816 abort ();
820} 817}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines