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

Comparing deliantra/server/common/loader.C (file contents):
Revision 1.3 by root, Mon Sep 4 13:55:54 2006 UTC vs.
Revision 1.8 by pippijn, Thu Sep 7 09:37:12 2006 UTC

509 { 509 {
510 keyword kw = thawer.get_kv (); 510 keyword kw = thawer.get_kv ();
511 511
512 switch (kw) 512 switch (kw)
513 { 513 {
514 case KW_Object: // uppercase alias
514 case KW_object: 515 case KW_object:
515 thawer.get (op->name); 516 thawer.get (op->name);
516 517
517 if (op->arch != NULL) 518 if (op->arch != NULL)
518 op->arch->name = op->name; 519 op->arch->name = op->name;
554 } 555 }
555 556
556 parse_object (tmp, thawer, map_flags); 557 parse_object (tmp, thawer, map_flags);
557 558
558 if (tmp->arch) 559 if (tmp->arch)
560 {
559 insert_ob_in_ob (tmp, op); 561 // was: insert_ob_in_ob (tmp, op);
562 // but manually adding it can improve map loading times a lot
563 CLEAR_FLAG (tmp, FLAG_OBJ_ORIGINAL);
564 CLEAR_FLAG (tmp, FLAG_REMOVED);
565 tmp->env = op;
566
567 if (!op->inv)
568 op->inv = tmp;
569 else
570 {
571 tmp->below = op->inv;
572 tmp->below->above = tmp;
573 op->inv = tmp;
574 }
575 }
560 else 576 else
561 { 577 {
562 LOG (llevDebug, "Discarding object without arch: %s\n", 578 LOG (llevDebug, "Discarding object without arch: %s\n",
563 tmp->name ? (const char *) tmp->name : "(null)"); 579 tmp->name ? (const char *) tmp->name : "(null)");
564 free_object (tmp); 580 free_object (tmp);
632 op->face = 0; 648 op->face = 0;
633 break; 649 break;
634 650
635 case KW_x: thawer.get (op->x); break; 651 case KW_x: thawer.get (op->x); break;
636 case KW_y: thawer.get (op->y); break; 652 case KW_y: thawer.get (op->y); break;
653 case KW_Str: // uppercase alias
637 case KW_str: thawer.get (op->stats.Str); break; 654 case KW_str: thawer.get (op->stats.Str); break;
655 case KW_Dex: // uppercase alias
638 case KW_dex: thawer.get (op->stats.Dex); break; 656 case KW_dex: thawer.get (op->stats.Dex); break;
657 case KW_Con: // uppercase alias
639 case KW_con: thawer.get (op->stats.Con); break; 658 case KW_con: thawer.get (op->stats.Con); break;
659 case KW_Wis: // uppercase alias
640 case KW_wis: thawer.get (op->stats.Wis); break; 660 case KW_wis: thawer.get (op->stats.Wis); break;
661 case KW_Cha: // uppercase alias
641 case KW_cha: thawer.get (op->stats.Cha); break; 662 case KW_cha: thawer.get (op->stats.Cha); break;
663 case KW_Int: // uppercase alias
642 case KW_int: thawer.get (op->stats.Int); break; 664 case KW_int: thawer.get (op->stats.Int); break;
665 case KW_Pow: // uppercase alias
643 case KW_pow: thawer.get (op->stats.Pow); break; 666 case KW_pow: thawer.get (op->stats.Pow); break;
644 case KW_hp: thawer.get (op->stats.hp); break; 667 case KW_hp: thawer.get (op->stats.hp); break;
645 case KW_maxhp: thawer.get (op->stats.maxhp); break; 668 case KW_maxhp: thawer.get (op->stats.maxhp); break;
646 case KW_sp: thawer.get (op->stats.sp); break; 669 case KW_sp: thawer.get (op->stats.sp); break;
647 case KW_maxsp: thawer.get (op->stats.maxsp); break; 670 case KW_maxsp: thawer.get (op->stats.maxsp); break;
968 991
969 case KW_editable: 992 case KW_editable:
970 case KW_editor_folder: 993 case KW_editor_folder:
971 break; 994 break;
972 995
996 case KW_More: // uppercase alias
973 case KW_more: 997 case KW_more:
974 /* We need to record that this is a multipart object, 998 /* We need to record that this is a multipart object,
975 * so the calling function can glue things back together 999 * so the calling function can glue things back together
976 */ 1000 */
977 ismore = 1; 1001 ismore = 1;
999 thawer.line += strlen (thawer.line) + 1; 1023 thawer.line += strlen (thawer.line) + 1;
1000 1024
1001 break; 1025 break;
1002 1026
1003 default: 1027 default:
1004 printf ("kw abort %s\n", keyword_str [kw]);//D 1028 LOG (llevError, "UNSUPPORTED KEYWORD IN MAP: \"%s\", bug in normaliser. skipping.\n", keyword_str [kw]);
1005 abort (); 1029 break;
1006 } 1030 }
1007 } 1031 }
1008} 1032}
1009 1033
1010/* 1034/*
1031 * as appropriate in op. 1055 * as appropriate in op.
1032 * 1056 *
1033 * This function appears to be used in only 2 places - in crossedit to 1057 * This function appears to be used in only 2 places - in crossedit to
1034 * override values and in c_wiz to mutate values. 1058 * override values and in c_wiz to mutate values.
1035 */ 1059 */
1060int
1036int set_variable(object *op,char *buf) { 1061set_variable(object *op, char *buf)
1062{
1063 return 0;
1037#if 0 1064#if 0
1038 int retval; 1065 int retval;
1039 object_thawer thawer (0); 1066 object_thawer thawer (0);
1040 1067
1041 strcpy(msgbuf, ""); 1068 strcpy(msgbuf, "");
1098 1125
1099void init_vars() { 1126void init_vars() {
1100} 1127}
1101 1128
1102/* This returns a string of the integer movement type */ 1129/* This returns a string of the integer movement type */
1130#if 0
1131// unused function
1103static char* get_string_move_type(MoveType mt) 1132static char* get_string_move_type(MoveType mt)
1104{ 1133{
1105 static char retbuf[MAX_BUF], retbuf_all[MAX_BUF]; 1134 static char retbuf[MAX_BUF], retbuf_all[MAX_BUF];
1106 int i, all_count=0, count; 1135 int i, all_count=0, count;
1107 1136
1135 * 'all -walk -fly_low' - it is shorter to return 'fly_high swim' 1164 * 'all -walk -fly_low' - it is shorter to return 'fly_high swim'
1136 */ 1165 */
1137 if (all_count <=1) return retbuf_all+1; 1166 if (all_count <=1) return retbuf_all+1;
1138 else return retbuf+1; 1167 else return retbuf+1;
1139} 1168}
1140 1169#endif
1170
1141// compare *op against *tmp and output differences 1171// compare *op against *tmp and output differences
1142void 1172void
1143put (object_freezer &f, object *op, object *tmp) 1173put (object_freezer &f, object *op, object *tmp)
1144{ 1174{
1145 int i; 1175 int i;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines