… | |
… | |
555 | } |
555 | } |
556 | |
556 | |
557 | parse_object (tmp, thawer, map_flags); |
557 | parse_object (tmp, thawer, map_flags); |
558 | |
558 | |
559 | if (tmp->arch) |
559 | if (tmp->arch) |
|
|
560 | { |
560 | 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 | } |
561 | else |
576 | else |
562 | { |
577 | { |
563 | LOG (llevDebug, "Discarding object without arch: %s\n", |
578 | LOG (llevDebug, "Discarding object without arch: %s\n", |
564 | tmp->name ? (const char *) tmp->name : "(null)"); |
579 | tmp->name ? (const char *) tmp->name : "(null)"); |
565 | free_object (tmp); |
580 | free_object (tmp); |
… | |
… | |
1008 | thawer.line += strlen (thawer.line) + 1; |
1023 | thawer.line += strlen (thawer.line) + 1; |
1009 | |
1024 | |
1010 | break; |
1025 | break; |
1011 | |
1026 | |
1012 | default: |
1027 | default: |
1013 | 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]); |
1014 | abort (); |
1029 | break; |
1015 | } |
1030 | } |
1016 | } |
1031 | } |
1017 | } |
1032 | } |
1018 | |
1033 | |
1019 | /* |
1034 | /* |
… | |
… | |
1040 | * as appropriate in op. |
1055 | * as appropriate in op. |
1041 | * |
1056 | * |
1042 | * 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 |
1043 | * override values and in c_wiz to mutate values. |
1058 | * override values and in c_wiz to mutate values. |
1044 | */ |
1059 | */ |
|
|
1060 | int |
1045 | int set_variable(object *op,char *buf) { |
1061 | set_variable(object *op, char *buf) |
|
|
1062 | { |
|
|
1063 | return 0; |
1046 | #if 0 |
1064 | #if 0 |
1047 | int retval; |
1065 | int retval; |
1048 | object_thawer thawer (0); |
1066 | object_thawer thawer (0); |
1049 | |
1067 | |
1050 | strcpy(msgbuf, ""); |
1068 | strcpy(msgbuf, ""); |
… | |
… | |
1107 | |
1125 | |
1108 | void init_vars() { |
1126 | void init_vars() { |
1109 | } |
1127 | } |
1110 | |
1128 | |
1111 | /* 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 |
1112 | static char* get_string_move_type(MoveType mt) |
1132 | static char* get_string_move_type(MoveType mt) |
1113 | { |
1133 | { |
1114 | static char retbuf[MAX_BUF], retbuf_all[MAX_BUF]; |
1134 | static char retbuf[MAX_BUF], retbuf_all[MAX_BUF]; |
1115 | int i, all_count=0, count; |
1135 | int i, all_count=0, count; |
1116 | |
1136 | |
… | |
… | |
1144 | * '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' |
1145 | */ |
1165 | */ |
1146 | if (all_count <=1) return retbuf_all+1; |
1166 | if (all_count <=1) return retbuf_all+1; |
1147 | else return retbuf+1; |
1167 | else return retbuf+1; |
1148 | } |
1168 | } |
1149 | |
1169 | #endif |
|
|
1170 | |
1150 | // compare *op against *tmp and output differences |
1171 | // compare *op against *tmp and output differences |
1151 | void |
1172 | void |
1152 | put (object_freezer &f, object *op, object *tmp) |
1173 | put (object_freezer &f, object *op, object *tmp) |
1153 | { |
1174 | { |
1154 | int i; |
1175 | int i; |