void *ptr;
struct obj_data *obj;
sscanf(txt, "%p", &ptr);
obj = (struct obj_data *)ptr;
Beware, though. This is a sure way to crash your game. There is no check for validity involved. If you happen to
put in a wrong number, the 'obj' pointer may cause all sorts of troubles.
You should consider other ways of getting to the object. Whether you wish to have some sort of internal numbering or recognize it by name is your choice, but typing in memory values is asking for trouble.
|