… | |
… | |
29 | #include <global.h> |
29 | #include <global.h> |
30 | #include <loader.h> |
30 | #include <loader.h> |
31 | #include <sproto.h> |
31 | #include <sproto.h> |
32 | |
32 | |
33 | ///////////////////////////////////////////////////////////////////////////// |
33 | ///////////////////////////////////////////////////////////////////////////// |
|
|
34 | |
|
|
35 | loader_base::~loader_base () |
|
|
36 | { |
|
|
37 | } |
34 | |
38 | |
35 | // the base class warns about and skips everything |
39 | // the base class warns about and skips everything |
36 | archetype * |
40 | archetype * |
37 | loader_base::get_arch (const char *name) |
41 | loader_base::get_arch (const char *name) |
38 | { |
42 | { |
… | |
… | |
714 | tmp = arch_to_object (arch); |
718 | tmp = arch_to_object (arch); |
715 | else |
719 | else |
716 | { |
720 | { |
717 | tmp = object::create (); |
721 | tmp = object::create (); |
718 | /* record the name of the broken object */ |
722 | /* record the name of the broken object */ |
|
|
723 | //TODO: but do not log??? |
719 | tmp->name = str; |
724 | tmp->name = str; |
720 | } |
725 | } |
721 | |
726 | |
722 | // decativate the object we, as we are still going |
727 | // decativate the object we, as we are still going |
723 | // to read the speed value. Objects should be activated |
728 | // to read the speed value. Objects should be activated |
… | |
… | |
781 | op->other_arch = archetype::find (thawer.get_str ()); |
786 | op->other_arch = archetype::find (thawer.get_str ()); |
782 | break; |
787 | break; |
783 | |
788 | |
784 | case KW_animation: |
789 | case KW_animation: |
785 | { |
790 | { |
|
|
791 | CLEAR_FLAG (op, FLAG_ANIMATE); |
|
|
792 | op->animation_id = 0; |
|
|
793 | |
786 | const char *str = thawer.get_str (); |
794 | const char *str = thawer.get_str (); |
787 | |
|
|
788 | if (!str) |
|
|
789 | { |
|
|
790 | op->animation_id = 0; |
|
|
791 | CLEAR_FLAG (op, FLAG_ANIMATE); |
|
|
792 | } |
|
|
793 | else if ((op->animation_id = find_animation (str))) |
795 | if (str && (op->animation_id = find_animation (str))) |
794 | SET_FLAG (op, FLAG_ANIMATE); |
796 | SET_FLAG (op, FLAG_ANIMATE); |
795 | } |
797 | } |
796 | |
|
|
797 | break; |
798 | break; |
798 | |
799 | |
799 | case KW_last_heal: thawer.get (op->last_heal); break; |
800 | case KW_last_heal: thawer.get (op->last_heal); break; |
800 | case KW_last_sp: thawer.get (op->last_sp); break; |
801 | case KW_last_sp: thawer.get (op->last_sp); break; |
801 | case KW_last_grace: thawer.get (op->last_grace); break; |
802 | case KW_last_grace: thawer.get (op->last_grace); break; |
… | |
… | |
866 | case KW_path_denied: thawer.get (op->path_denied); break; |
867 | case KW_path_denied: thawer.get (op->path_denied); break; |
867 | case KW_invisible: thawer.get (op->invisible); break; |
868 | case KW_invisible: thawer.get (op->invisible); break; |
868 | case KW_magic: thawer.get (op->magic); break; |
869 | case KW_magic: thawer.get (op->magic); break; |
869 | case KW_state: thawer.get (op->state); break; |
870 | case KW_state: thawer.get (op->state); break; |
870 | case KW_move_slow_penalty: thawer.get (op->move_slow_penalty); break; |
871 | case KW_move_slow_penalty: thawer.get (op->move_slow_penalty); break; |
871 | case KW_material: thawer.get (op->material); break; |
872 | case KW_material: thawer.get (op->materials); break; //TODO: nuke |
872 | case KW_materialname: thawer.get (op->materialname); break; |
873 | case KW_materialname: thawer.get (op->materialname); break; |
873 | |
874 | |
874 | /* These are the new values */ |
875 | /* These are the new values */ |
875 | case KW_move_block: set_move (op->move_block, thawer.get_str ()); break; |
876 | case KW_move_block: set_move (op->move_block, thawer.get_str ()); break; |
876 | case KW_move_allow: set_move (op->move_allow, thawer.get_str ()); break; |
877 | case KW_move_allow: set_move (op->move_allow, thawer.get_str ()); break; |
… | |
… | |
1138 | add_button_link (op, op->map, thawer.get_sint32 ()); |
1139 | add_button_link (op, op->map, thawer.get_sint32 ()); |
1139 | break; |
1140 | break; |
1140 | |
1141 | |
1141 | case KW_randomitems: |
1142 | case KW_randomitems: |
1142 | op->randomitems = find_treasurelist (thawer.get_str ()); |
1143 | op->randomitems = find_treasurelist (thawer.get_str ()); |
|
|
1144 | //if (!op->randomitems) |
|
|
1145 | // LOG (llevError, "%s uses unknown randomitems '%s'.\n", op->debug_desc (), thawer.get_str ()); |
1143 | break; |
1146 | break; |
1144 | |
1147 | |
1145 | case KW_msg: |
1148 | case KW_msg: |
1146 | thawer.get_ml (KW_endmsg, op->msg); |
1149 | thawer.get_ml (KW_endmsg, op->msg); |
1147 | //TODO: allow longer messages |
1150 | //TODO: allow longer messages |
… | |
… | |
1535 | f.put (resist_save[i], op->resist[i]); |
1538 | f.put (resist_save[i], op->resist[i]); |
1536 | |
1539 | |
1537 | CMP_OUT (path_attuned); |
1540 | CMP_OUT (path_attuned); |
1538 | CMP_OUT (path_repelled); |
1541 | CMP_OUT (path_repelled); |
1539 | CMP_OUT (path_denied); |
1542 | CMP_OUT (path_denied); |
1540 | CMP_OUT (material); |
1543 | CMP_OUT2 (material, materials);//TODO: nuke |
1541 | CMP_OUT (materialname); |
1544 | CMP_OUT (materialname); |
1542 | CMP_OUT (value); |
1545 | CMP_OUT (value); |
1543 | CMP_OUT (carrying); |
1546 | CMP_OUT (carrying); |
1544 | CMP_OUT (weight); |
1547 | CMP_OUT (weight); |
1545 | CMP_OUT (invisible); |
1548 | CMP_OUT (invisible); |