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.71 by pippijn, Sat Jan 6 14:42:29 2007 UTC

1/* 1/*
2 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
3 3
4 Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
4 Copyright (C) 2001-2003 Mark Wedel & Crossfire Development Team 5 Copyright (C) 2001-2003 Mark Wedel & Crossfire Development Team
5 Copyright (C) 1992 Frank Tore Johansen 6 Copyright (C) 1992 Frank Tore Johansen
6 7
7 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
731 * MSW 2001-07-01 732 * MSW 2001-07-01
732 */ 733 */
733bool 734bool
734maptile::load_header (object_thawer &thawer) 735maptile::load_header (object_thawer &thawer)
735{ 736{
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 (;;) 737 for (;;)
741 { 738 {
742 keyword kw = thawer.get_kv (); 739 keyword kw = thawer.get_kv ();
743 740
744 switch (kw) 741 switch (kw)
747 LOG (llevError, "%s: end of file while reading map header, aborting header load.\n", &path); 744 LOG (llevError, "%s: end of file while reading map header, aborting header load.\n", &path);
748 return false; 745 return false;
749 746
750 case KW_end: 747 case KW_end:
751 return true; 748 return true;
749
750 default:
751 case KW_ERROR:
752 LOG (llevError, "%s: skipping errornous line (%s) while reading map header.\n", &path, thawer.last_keyword);
753 break;
752 754
753 case KW_msg: 755 case KW_msg:
754 thawer.get_ml (KW_endmsg, msg); 756 thawer.get_ml (KW_endmsg, msg);
755 break; 757 break;
756 758
807 809
808 case KW_tile_path_1: thawer.get (tile_path [0]); break; 810 case KW_tile_path_1: thawer.get (tile_path [0]); break;
809 case KW_tile_path_2: thawer.get (tile_path [1]); break; 811 case KW_tile_path_2: thawer.get (tile_path [1]); break;
810 case KW_tile_path_3: thawer.get (tile_path [2]); break; 812 case KW_tile_path_3: thawer.get (tile_path [2]); break;
811 case KW_tile_path_4: thawer.get (tile_path [3]); break; 813 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 } 814 }
817 } 815 }
818 816
819 abort (); 817 abort ();
820} 818}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines