+ if ('\n' == line[0] || 0 == line[0])
+ {
+ break;
+ }
+ struct MapObjAct * moa = try_malloc(sizeof(struct MapObjAct), f_name);
+ moa->id = atoi(strtok(line, delim));
+ moa->effort = atoi(strtok(NULL, delim));
+ char * funcname = strtok(NULL, "\n");
+ uint8_t len_name = strlen(funcname) + 1;
+ moa->name = try_malloc(len_name, f_name);
+ memcpy(moa->name, funcname, len_name);
+ if (!( try_func_name(moa, "move", actor_move)
+ || try_func_name(moa, "pick_up", actor_pick)
+ || try_func_name(moa, "drop", actor_drop)
+ || try_func_name(moa, "use", actor_use)))
+ {
+ moa->func = actor_wait;
+ }
+ moa->next = NULL;
+ * moa_ptr_ptr = moa;
+ moa_ptr_ptr = &moa->next;