From e500b13533d94d4a602c02cd62e18f17710bfe17 Mon Sep 17 00:00:00 2001 From: belal Date: Wed, 10 Mar 2010 21:24:31 -0500 Subject: [PATCH] offsets are all correct for 40d, creature offsets are not constant all the way back to 38.a, so more work needs to be done there This could probably be used in stonesense as it is though, all the map data is correct --- library/DFHackAPI.cpp | 2 +- library/DFHackAPI.h | 3 +- output/Memory.xml | 207 ++++++++++++++++++++---------------------- 3 files changed, 98 insertions(+), 114 deletions(-) diff --git a/library/DFHackAPI.cpp b/library/DFHackAPI.cpp index bffe0c730..a69c4f951 100644 --- a/library/DFHackAPI.cpp +++ b/library/DFHackAPI.cpp @@ -331,7 +331,7 @@ bool API::WriteTileTypes (uint32_t x, uint32_t y, uint32_t z, uint16_t *buffer) return false; } -bool API::getCurrentCursorCreatures (uint32_t & creature_index) +bool API::getCurrentCursorCreature (uint32_t & creature_index) { if(!d->cursorWindowInited) return false; creature_index = g_pProcess->readDWord(d->current_cursor_creature_offset); diff --git a/library/DFHackAPI.h b/library/DFHackAPI.h index 77d75f9da..71fcfb50d 100644 --- a/library/DFHackAPI.h +++ b/library/DFHackAPI.h @@ -199,8 +199,7 @@ namespace DFHack bool getCursorCoords (int32_t &x, int32_t &y, int32_t &z); bool setCursorCoords (const int32_t x, const int32_t y, const int32_t z); - /// This returns false if there is nothing under the cursor, it puts the addresses in a vector if there is - bool getCurrentCursorCreatures(std::vector &addresses); + bool API::getCurrentCursorCreature (uint32_t & creature_index); bool InitViewSize(); bool getWindowSize(int32_t & width, int32_t & height); diff --git a/output/Memory.xml b/output/Memory.xml index b8259b985..5957d7327 100644 --- a/output/Memory.xml +++ b/output/Memory.xml @@ -744,6 +744,7 @@ and W I N E + 0x47b6fac2 48c831b6f3950913b8e1aeada563d2db
0x014639f4
@@ -775,6 +776,98 @@
0x014a4ec4
0x014a4ec8
0x014a4ecc
+ + + 0x08 + + + 0x08 + 0x2C + 0x0062 + 0x0264 + 0x0664 + 0x1D64 + + + 0x00 + 0x1C + 0x38 + 0x6c + 0x88 + 0x8C + 0x94 + 0xE4 + 0xE8 + 0xF2 + 0xF4 + 0x1A4 + 0x228 + 0x2F8 + 0x2AC + 0x438 + 0x43C + 0x440 + 0x444 + 0x454 + 0x474 + 0x520 + 0x5D0 + + + 0x70 + + + 0x84 + 0x86 + 0x684 + 0x6B4 + + + 0x5C + 0x58 + + + 0x4 + + + 0x10 + + + 0x84 + 0x60 + + 0x08 + 0x2C + 0x0062 + 0x0264 + 0x0664 + 0x1D64 + + 0x3C + + 0x2 + 0x4 + 0x8 + 0x24 + + 0x1C + 0x20 + + 0x38 + 0x7a + 0x100 + + 0x68 + 0x24 + 0x1C + 0x28 + 0x24 + 0x24 + 0x24 + 0x5C + 0x94 + 0xB0 +
0x47c12f36 8bd90fb6db8388f129fde224a35459de @@ -800,9 +893,9 @@
0x01467d70
0x01295d58
0x01284184
-
0x00c68354
+
0x00c3fb40
0x00c23594
-
0x00c68354
+
0x00c68354
0x014a66d4
0x014a50bc
0x014a50c0
@@ -923,7 +1016,7 @@ 0x4888672c 32f68422f5b4d938549eed0565bcfb92
- + 0x489d8c7f 33db0401081058fb54252210bf371344
0x01576468
@@ -1029,114 +1122,6 @@
0x015c4d70
0x015c4d74
0x015c4d78
- - - 0x08 - - -
0x015C4D70
-
0x015C4D74
-
0x015C4D78
- - -
0x015C4D88
-
0x015C4D8C
-
0x015C4D90
- - - 0x08 - 0x2C - 0x0062 - 0x0264 - 0x0664 - 0x1D64 - - - 0x00 - 0x1C - 0x38 - 0x6c - 0x88 - 0x8C - 0x94 - 0xE4 - 0xE8 - 0xF2 - 0xF4 - 0x1A4 - 0x228 - 0x2F8 - 0x2AC - 0x438 - 0x43C - 0x440 - 0x444 - 0x458 - 0x474 - 0x520 - 0x5D0 - - - 0x70 - - -
0x015C6388
- 0x84 - 0x86 - 0x684 - 0x6B4 - - - 0x5C - 0x58 - - - 0x4 - - -
0x015C6D70
- 0x10 - - - 0x84 - 0x60 - -
0x9fc294
-
0xd457f4
-
0xd73868
-
0xd73844
-
0x1706d4c
- 0x08 - 0x2C - 0x0062 - 0x0264 - 0x0664 - 0x1D64 - - 0x54 - - 0x2 - 0x4 - 0x8 - 0x24 - - 0x1C - 0x20 - - 0x38 - 0x7a - 0x100 - - 0x68 - 0x24 - 0x1C - 0x28 - 0x24 - 0x24 - 0x24 - 0x5C - 0x94 - 0xB0