From dc5bef2cb84cceb30179df750d986eecdef8b474 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sat, 16 Jun 2012 13:33:49 +0400 Subject: Add lua internal api functions needed for scanning memory. --- Lua API.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Lua API.html') diff --git a/Lua API.html b/Lua API.html index 04745798..90e61211 100644 --- a/Lua API.html +++ b/Lua API.html @@ -1332,6 +1332,22 @@ global environment, persistent between calls to the script.
dfhack.internal.getMemRanges()
Returns a sequence of tables describing virtual memory ranges of the process.
dfhack.internal.memmove(dest,src,count)
+Wraps the standard memmove function. Accepts both numbers and refs as pointers.
+dfhack.internal.memcmp(ptr1,ptr2,count)
+Wraps the standard memcmp function.
+dfhack.internal.memscan(haystack,count,step,needle,nsize)
+Searches for needle of nsize bytes in haystack, +using count steps of step bytes. +Returns: step_idx, sum_idx, found_ptr, or nil if not found.
+dfhack.internal.diffscan(old_data, new_data, start_idx, end_idx, eltsize[, oldval, newval, delta])
+Searches for differences between buffers at ptr1 and ptr2, as integers of size eltsize. +The oldval, newval or delta arguments may be used to specify additional constraints. +Returns: found_index, or nil if end reached.
+