… | |
… | |
28 | #include <bitset> |
28 | #include <bitset> |
29 | |
29 | |
30 | #include "cfperl.h" |
30 | #include "cfperl.h" |
31 | #include "shstr.h" |
31 | #include "shstr.h" |
32 | |
32 | |
|
|
33 | //+GPL |
|
|
34 | |
33 | typedef int tag_t; |
35 | typedef int tag_t; |
34 | |
36 | |
35 | enum { |
37 | enum { |
36 | body_skill, |
38 | body_skill, |
37 | body_combat, |
39 | body_combat, |
… | |
… | |
85 | { |
87 | { |
86 | key_value *next; |
88 | key_value *next; |
87 | shstr key, value; |
89 | shstr key, value; |
88 | }; |
90 | }; |
89 | |
91 | |
|
|
92 | //-GPL |
|
|
93 | |
90 | struct UUID |
94 | struct UUID |
91 | { |
95 | { |
92 | uint64 seq; |
96 | uint64 seq; |
93 | |
97 | |
94 | static UUID cur; // last uuid generated |
98 | static UUID cur; // last uuid generated |
… | |
… | |
119 | static BUF buf; |
123 | static BUF buf; |
120 | |
124 | |
121 | return c_str (buf, sizeof (buf)); |
125 | return c_str (buf, sizeof (buf)); |
122 | } |
126 | } |
123 | }; |
127 | }; |
|
|
128 | |
|
|
129 | //+GPL |
124 | |
130 | |
125 | /* Definition for WILL_APPLY values. Replaces having harcoded values |
131 | /* Definition for WILL_APPLY values. Replaces having harcoded values |
126 | * sprinkled in the code. Note that some of these also replace fields |
132 | * sprinkled in the code. Note that some of these also replace fields |
127 | * that were in the can_apply area. What is the point of having both |
133 | * that were in the can_apply area. What is the point of having both |
128 | * can_apply and will_apply? |
134 | * can_apply and will_apply? |
… | |
… | |
332 | |
338 | |
333 | // privates / perl |
339 | // privates / perl |
334 | shstr_tmp kv_get (shstr_tmp key) const; |
340 | shstr_tmp kv_get (shstr_tmp key) const; |
335 | void kv_del (shstr_tmp key); |
341 | void kv_del (shstr_tmp key); |
336 | void kv_set (shstr_tmp key, shstr_tmp value); |
342 | void kv_set (shstr_tmp key, shstr_tmp value); |
|
|
343 | |
|
|
344 | //-GPL |
337 | |
345 | |
338 | // custom extra fields management |
346 | // custom extra fields management |
339 | struct key_value_access_proxy |
347 | struct key_value_access_proxy |
340 | { |
348 | { |
341 | object &ob; |
349 | object &ob; |
… | |
… | |
769 | } |
777 | } |
770 | |
778 | |
771 | return ob; |
779 | return ob; |
772 | } |
780 | } |
773 | |
781 | |
|
|
782 | //+GPL |
|
|
783 | |
774 | object *find_skill_by_name_fuzzy (object *who, const char *name); |
784 | object *find_skill_by_name_fuzzy (object *who, const char *name); |
775 | object *find_skill_by_name (object *who, shstr_cmp sh); |
785 | object *find_skill_by_name (object *who, shstr_cmp sh); |
776 | object *find_skill_by_number (object *who, int skillno); |
786 | object *find_skill_by_number (object *who, int skillno); |
777 | |
787 | |
778 | /* |
788 | /* |
… | |
… | |
782 | * be much left in the archetype - all it really is is a holder for the |
792 | * be much left in the archetype - all it really is is a holder for the |
783 | * object and pointers. This structure should get removed, and just replaced |
793 | * object and pointers. This structure should get removed, and just replaced |
784 | * by the object structure |
794 | * by the object structure |
785 | */ |
795 | */ |
786 | |
796 | |
|
|
797 | //-GPL |
|
|
798 | |
787 | INTERFACE_CLASS (archetype) |
799 | INTERFACE_CLASS (archetype) |
788 | struct archetype : object |
800 | struct archetype : object |
789 | { |
801 | { |
790 | static arch_ptr empty; // the empty_archetype |
802 | static arch_ptr empty; // the empty_archetype |
791 | MTH static void gc (); |
803 | MTH static void gc (); |
… | |
… | |
849 | statementvar (object *, var, actives [_i]) |
861 | statementvar (object *, var, actives [_i]) |
850 | |
862 | |
851 | #define for_all_archetypes(var) \ |
863 | #define for_all_archetypes(var) \ |
852 | for (unsigned _i = 0; _i < archetypes.size (); ++_i) \ |
864 | for (unsigned _i = 0; _i < archetypes.size (); ++_i) \ |
853 | statementvar (archetype *, var, archetypes [_i]) |
865 | statementvar (archetype *, var, archetypes [_i]) |
|
|
866 | |
|
|
867 | //+GPL |
854 | |
868 | |
855 | /* Used by update_object to know if the object being passed is |
869 | /* Used by update_object to know if the object being passed is |
856 | * being added or removed. |
870 | * being added or removed. |
857 | */ |
871 | */ |
858 | #define UP_OBJ_INSERT 1 |
872 | #define UP_OBJ_INSERT 1 |
… | |
… | |
890 | #define INS_ON_TOP 0x0008 |
904 | #define INS_ON_TOP 0x0008 |
891 | #define INS_BELOW_ORIGINATOR 0x0010 |
905 | #define INS_BELOW_ORIGINATOR 0x0010 |
892 | |
906 | |
893 | #define ARCH_DEPLETION "depletion" |
907 | #define ARCH_DEPLETION "depletion" |
894 | |
908 | |
|
|
909 | //-GPL |
|
|
910 | |
895 | #endif |
911 | #endif |
896 | |
912 | |