list_xxx functions can be used to loop over all items on a map.
list_begin takes an argument telling sfall what you want to list. (Defined in
sfall.h) It returns a list pointer, which you iterate through with
list_next. Finally, when you’ve finished with the list use
list_end on it. Not calling
list_end will result in a memory leak. Alternatively, use
list_as_array to get the whole list at once as a temp array variable, which can be looped over using
len_array and which you don’t need to remember to free afterwards.
array list_as_array(int type)
int list_begin(int type)
void list_end(int listid)
int list_next(int listid)
array party_member_list(int includeHidden)
Returns array of all current party members. 0 - only critter-type, alive and visible will be returned, 1 - all object, including Trunk, etc.