… | |
… | |
1078 | CALL_CALL ("ext::books::make_book", G_VOID); |
1078 | CALL_CALL ("ext::books::make_book", G_VOID); |
1079 | CALL_END; |
1079 | CALL_END; |
1080 | } |
1080 | } |
1081 | |
1081 | |
1082 | void |
1082 | void |
1083 | cfperl_send_msg (client *ns, int color, const char *type, const char *msg) |
1083 | cfperl_send_msg (client *ns, int color, const_utf8_string type, const_utf8_string msg) |
1084 | { |
1084 | { |
1085 | CALL_BEGIN (4); |
1085 | CALL_BEGIN (4); |
1086 | CALL_ARG (ns); |
1086 | CALL_ARG (ns); |
1087 | CALL_ARG (type); |
1087 | CALL_ARG (type); |
1088 | CALL_ARG_SV (newSVpv_utf8 (msg)); |
1088 | CALL_ARG_SV (newSVpv_utf8 (msg)); |
… | |
… | |
1117 | CALL_CALL ("cf::mapscript::activate", G_VOID); |
1117 | CALL_CALL ("cf::mapscript::activate", G_VOID); |
1118 | CALL_END; |
1118 | CALL_END; |
1119 | } |
1119 | } |
1120 | |
1120 | |
1121 | player * |
1121 | player * |
1122 | player::find (const char *name) |
1122 | player::find (const_utf8_string name) |
1123 | { |
1123 | { |
1124 | CALL_BEGIN (1); |
1124 | CALL_BEGIN (1); |
1125 | CALL_ARG (name); |
1125 | CALL_ARG (name); |
1126 | CALL_CALL ("cf::player::find", G_SCALAR); |
1126 | CALL_CALL ("cf::player::find", G_SCALAR); |
1127 | |
1127 | |
… | |
… | |
1132 | |
1132 | |
1133 | return retval; |
1133 | return retval; |
1134 | } |
1134 | } |
1135 | |
1135 | |
1136 | maptile * |
1136 | maptile * |
1137 | find_style (const char *dirname, const char *stylename, int difficulty) |
1137 | find_style (const_utf8_string dirname, const_utf8_string stylename, int difficulty) |
1138 | { |
1138 | { |
1139 | CALL_BEGIN (3); |
1139 | CALL_BEGIN (3); |
1140 | CALL_ARG (dirname); |
1140 | CALL_ARG (dirname); |
1141 | CALL_ARG (stylename); |
1141 | CALL_ARG (stylename); |
1142 | CALL_ARG (difficulty); |
1142 | CALL_ARG (difficulty); |
… | |
… | |
1149 | |
1149 | |
1150 | return retval; |
1150 | return retval; |
1151 | } |
1151 | } |
1152 | |
1152 | |
1153 | maptile * |
1153 | maptile * |
1154 | maptile::find_sync (const char *path, maptile *origin) |
1154 | maptile::find_sync (const_utf8_string path, maptile *origin) |
1155 | { |
1155 | { |
1156 | CALL_BEGIN (2); |
1156 | CALL_BEGIN (2); |
1157 | CALL_ARG (path); |
1157 | CALL_ARG (path); |
1158 | CALL_ARG (origin); |
1158 | CALL_ARG (origin); |
1159 | CALL_CALL ("cf::map::find_sync", G_SCALAR); |
1159 | CALL_CALL ("cf::map::find_sync", G_SCALAR); |
… | |
… | |
1165 | |
1165 | |
1166 | return retval; |
1166 | return retval; |
1167 | } |
1167 | } |
1168 | |
1168 | |
1169 | maptile * |
1169 | maptile * |
1170 | maptile::find_async (const char *path, maptile *origin, bool load) |
1170 | maptile::find_async (const_utf8_string path, maptile *origin, bool load) |
1171 | { |
1171 | { |
1172 | CALL_BEGIN (3); |
1172 | CALL_BEGIN (3); |
1173 | CALL_ARG (path); |
1173 | CALL_ARG (path); |
1174 | CALL_ARG (origin); |
1174 | CALL_ARG (origin); |
1175 | CALL_ARG (load); |
1175 | CALL_ARG (load); |
… | |
… | |
1204 | CALL_CALL ("cf::object::player::enter_exit", G_VOID); |
1204 | CALL_CALL ("cf::object::player::enter_exit", G_VOID); |
1205 | CALL_END; |
1205 | CALL_END; |
1206 | } |
1206 | } |
1207 | |
1207 | |
1208 | void |
1208 | void |
1209 | object::player_goto (const char *path, int x, int y) |
1209 | object::player_goto (const_utf8_string path, int x, int y) |
1210 | { |
1210 | { |
1211 | if (type != PLAYER) |
1211 | if (type != PLAYER) |
1212 | return; |
1212 | return; |
1213 | |
1213 | |
1214 | CALL_BEGIN (4); |
1214 | CALL_BEGIN (4); |
… | |
… | |
1218 | CALL_ARG (y); |
1218 | CALL_ARG (y); |
1219 | CALL_CALL ("cf::object::player::goto", G_VOID); |
1219 | CALL_CALL ("cf::object::player::goto", G_VOID); |
1220 | CALL_END; |
1220 | CALL_END; |
1221 | } |
1221 | } |
1222 | |
1222 | |
1223 | const char * |
1223 | const_utf8_string |
1224 | object::ref () const |
1224 | object::ref () const |
1225 | { |
1225 | { |
1226 | if (type == PLAYER) |
1226 | if (type == PLAYER) |
1227 | return format ("player/<1.%llx>/%s", (unsigned long long)uuid.seq, &name); |
1227 | return format ("player/<1.%llx>/%s", (unsigned long long)uuid.seq, &name); |
1228 | else |
1228 | else |
1229 | return 0; |
1229 | return 0; |
1230 | } |
1230 | } |
1231 | |
1231 | |
1232 | object * |
1232 | object * |
1233 | object::deref (const char *ref) |
1233 | object::deref (const_utf8_string ref) |
1234 | { |
1234 | { |
1235 | object *retval = 0; |
1235 | object *retval = 0; |
1236 | |
1236 | |
1237 | if (ref) |
1237 | if (ref) |
1238 | { |
1238 | { |
… | |
… | |
1264 | CALL_END; |
1264 | CALL_END; |
1265 | #endif |
1265 | #endif |
1266 | } |
1266 | } |
1267 | |
1267 | |
1268 | bool |
1268 | bool |
1269 | is_match_expr (const char *expr) |
1269 | is_match_expr (const_utf8_string expr) |
1270 | { |
1270 | { |
1271 | return !strncmp (expr, "match ", sizeof ("match ") - 1); |
1271 | return !strncmp (expr, "match ", sizeof ("match ") - 1); |
1272 | } |
1272 | } |
1273 | |
1273 | |
1274 | bool |
1274 | bool |
1275 | match (const char *expr, object *ob, object *self, object *source, object *originator) |
1275 | match (const_utf8_string expr, object *ob, object *self, object *source, object *originator) |
1276 | { |
1276 | { |
1277 | if (!strncmp (expr, "match ", sizeof ("match ") - 1)) |
1277 | if (!strncmp (expr, "match ", sizeof ("match ") - 1)) |
1278 | expr += sizeof ("match ") - 1; |
1278 | expr += sizeof ("match ") - 1; |
1279 | |
1279 | |
1280 | CALL_BEGIN (5); |
1280 | CALL_BEGIN (5); |
… | |
… | |
1291 | |
1291 | |
1292 | return matched; |
1292 | return matched; |
1293 | } |
1293 | } |
1294 | |
1294 | |
1295 | object * |
1295 | object * |
1296 | match_one (const char *expr, object *ob, object *self, object *source, object *originator) |
1296 | match_one (const_utf8_string expr, object *ob, object *self, object *source, object *originator) |
1297 | { |
1297 | { |
1298 | if (!strncmp (expr, "match ", sizeof ("match ") - 1)) |
1298 | if (!strncmp (expr, "match ", sizeof ("match ") - 1)) |
1299 | expr += sizeof ("match ") - 1; |
1299 | expr += sizeof ("match ") - 1; |
1300 | |
1300 | |
1301 | CALL_BEGIN (5); |
1301 | CALL_BEGIN (5); |
… | |
… | |
2144 | int mortals_size () |
2144 | int mortals_size () |
2145 | CODE: |
2145 | CODE: |
2146 | RETVAL = attachable::mortals.size (); |
2146 | RETVAL = attachable::mortals.size (); |
2147 | OUTPUT: RETVAL |
2147 | OUTPUT: RETVAL |
2148 | |
2148 | |
2149 | const char *slot_use_name (U32 slot) |
2149 | const_utf8_string slot_use_name (U32 slot) |
2150 | ALIAS: |
2150 | ALIAS: |
2151 | slot_nonuse_name = 1 |
2151 | slot_nonuse_name = 1 |
2152 | CODE: |
2152 | CODE: |
2153 | { |
2153 | { |
2154 | if (slot >= NUM_BODY_LOCATIONS) |
2154 | if (slot >= NUM_BODY_LOCATIONS) |