Posted: Sun Aug 07, 2011 6:13 pm Post subject: reading a linked list
Could someone explain (or point me in the right direction) how I am supposed to read in a linked list in a target program ?
I figured out that the structure for an inventory item is 48 bytes big and that the first 4 bytes of each structure is a pointer to the next inventory item.
The last inventory item has all zeroes in the next_item_pointer field (end of LL)
I also located a static pointer that always points to the first item (first node on the linked list).
I suppose LUA needs to parse each node as it is variable how many nodes (inventory items) are present at any time.
(target program is nethack for windows)
if anyone has any code snipets, advise or pointers where I should look for info on how to do this in CE, that would be greatly appreciated.
I'm no wiz coder, but there is no need to dumb it down I can handle it.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum