Dependencies: lib_2da, lib_anon, lib_array, lib_fn, lib_ini, lib_sfo, lib_struct, lib_sugar, lib_tools
strref_2da(function:s)=() patch
Acting on the current file, assumed to be a 2da file, apply 'function' to each of the strrefs in it.
Note that detection of which numbers in a 2da file are strrefs is of necessity a bit heuristic. We assume that
strref_apply(function:f)=() patch
Apply the (SFO standard patch) function 'function' to every strref in the current file, replacing it with the output. Currently doesn't do wmp files.
strref_script(function:s)=() patch
Acting on the current file, assumed to be a decompiled script, apply 'function' to each of the strrefs in it
These should not be called from outside the library itself.
strref_opcode(opcode_offset:i, parameter1_offset:i, parameter2_offset:i, special_offset:i, function:s)=() patch
Read the opcode at opcode_offset and, if appropriate, apply 'function' to any strref encoded in it
strref_struct(function:f)=() patch
Go through a struct file, applying 'function' to each strref in it and returning the new one. Also does opcodes.
strref_struct_helper(struct:a, strtype:s, function:f)=(struct:a) patch