… | |
… | |
487 | SET_FLAG (op, flag); \ |
487 | SET_FLAG (op, flag); \ |
488 | else \ |
488 | else \ |
489 | CLEAR_FLAG (op, flag) \ |
489 | CLEAR_FLAG (op, flag) \ |
490 | |
490 | |
491 | int |
491 | int |
492 | parse_object (object *op, object_thawer & thawer, int map_flags) |
492 | parse_object (object *op, object_thawer &thawer, int map_flags) |
493 | { |
493 | { |
494 | bool ismore = 0; |
494 | bool ismore = 0; |
495 | object *op_inv = op->inv; |
495 | object *op_inv = op->inv; |
496 | |
496 | |
497 | for (;;) |
497 | for (;;) |
… | |
… | |
502 | { |
502 | { |
503 | case KW_Object: // uppercase alias |
503 | case KW_Object: // uppercase alias |
504 | case KW_object: |
504 | case KW_object: |
505 | thawer.get (op->name); |
505 | thawer.get (op->name); |
506 | |
506 | |
507 | if (op->arch != NULL) |
507 | if (op->arch) |
508 | op->arch->name = op->name; |
508 | op->arch->name = op->name; |
509 | |
509 | |
510 | break; |
510 | break; |
511 | |
511 | |
512 | case KW_uuid: |
512 | case KW_uuid: |
… | |
… | |
1062 | * LO_NEWFILE (2): This is the first read from a particular file, so the buffers should |
1062 | * LO_NEWFILE (2): This is the first read from a particular file, so the buffers should |
1063 | * be reset. |
1063 | * be reset. |
1064 | * LO_NOREAD (3): Reset the buffers, but don't read from it. (op can be null) |
1064 | * LO_NOREAD (3): Reset the buffers, but don't read from it. (op can be null) |
1065 | * |
1065 | * |
1066 | */ |
1066 | */ |
1067 | |
|
|
1068 | int |
1067 | int |
1069 | load_object (object_thawer & fp, object *op, int map_flags) |
1068 | load_object (object_thawer &fp, object *op, int map_flags) |
1070 | { |
1069 | { |
1071 | return parse_object (op, fp, map_flags); |
1070 | return parse_object (op, fp, map_flags); |
1072 | } |
1071 | } |
1073 | |
|
|
1074 | |
1072 | |
1075 | /* This takes a buffer, scans it for variables, and sets those variables |
1073 | /* This takes a buffer, scans it for variables, and sets those variables |
1076 | * as appropriate in op. |
1074 | * as appropriate in op. |
1077 | * |
1075 | * |
1078 | * This function appears to be used in only 2 places - in crossedit to |
1076 | * This function appears to be used in only 2 places - in crossedit to |
… | |
… | |
1428 | CMP_OUT (move_on); |
1426 | CMP_OUT (move_on); |
1429 | CMP_OUT (move_off); |
1427 | CMP_OUT (move_off); |
1430 | CMP_OUT (move_slow); |
1428 | CMP_OUT (move_slow); |
1431 | CMP_OUT (move_slow_penalty); |
1429 | CMP_OUT (move_slow_penalty); |
1432 | |
1430 | |
1433 | if (op->flags != tmp->flags) |
1431 | if (op->flag != tmp->flag) |
1434 | for (i = 0; i <= NUM_FLAGS; i++) |
1432 | for (i = 0; i <= NUM_FLAGS; i++) |
1435 | if (flag_names[i] && (QUERY_FLAG (op, i) != QUERY_FLAG (tmp, i))) |
1433 | if (flag_names [i] && op->flag [i] != tmp->flag [i]) |
1436 | f.put (flag_names[i], QUERY_FLAG (op, i) ? "1" : "0"); |
1434 | f.put (flag_names [i], op->flag [i] ? "1" : "0"); |
1437 | |
1435 | |
1438 | /* Save body locations */ |
1436 | /* Save body locations */ |
1439 | for (i = 0; i < NUM_BODY_LOCATIONS; i++) |
1437 | for (i = 0; i < NUM_BODY_LOCATIONS; i++) |
1440 | if (op->body_info[i] != tmp->body_info[i]) |
1438 | if (op->body_info[i] != tmp->body_info[i]) |
1441 | f.put (body_locations[i].save_name, op->body_info[i]); |
1439 | f.put (body_locations[i].save_name, op->body_info[i]); |