I know this isn't strictly related to C++ programming but I could not think of anywhere else, if anyone knows of a better place then please provide a link.
For reference sake I'm using a custom tool for hacking into PCSX2 SVN while running the game Star Ocean: Till the End of Time.
The problem is that while I can locate variables (such as the map percentage), I cannot locate the pointer to them. I tried searching for the address as a value but got no results, I then tried a ranged search with max/min values being the address +/- 200 and still did not get any results.
I cannot think of any other way and I know for certain that they are not static because I watched the memory change whenever I zoned out to another map (including battles).
#include <iostream>
int main()
{
int x = 15;
int *xp = &x;
std::cout << "The address of x is : " << std::hex << &x << std::endl;
std::cout << "The value of x is : " << std::dec << x << std::endl;
std::cout << "The address of xp is : " << std::hex << &xp << std::endl;
std::cout << "The value of xp is : " << std::hex << xp << std::endl;
std::cout << "The value at the address of xp is : " << std::dec << *xp << std::endl;
return 0;
}
Thanks but that doesn't entirely help in this case because PCSX2 is an external process I don't know how to grab unknown pointers that I only have the value's address of. I'm also using wxWidgets on my custom tool so using iostream at the same time may cause problems (haven't actually tried that yet).