Add convenience logic for "offset" to Address definitions in GameConf (#580)

Allows for the last "read" offset for an Address to instead be "offset", which doesn't deref the addr pointer after applying the offset
Shortens the necessary coding to get a particular Address inside a function (old: store offset in a separate GameConf Offsets entry, apply the offset to the Address in SP)
This commit is contained in:
FlaminSarge
2017-10-28 12:11:32 +01:00
committed by Asher Baker
parent 4bab834716
commit c3b25e54f8
2 changed files with 27 additions and 7 deletions
+3 -1
View File
@@ -103,8 +103,9 @@ private:
char signatureName[64];
int readCount;
int read[8];
bool lastIsOffset;
AddressConf(char *sigName, unsigned sigLength, unsigned readCount, int *read);
AddressConf(char *sigName, unsigned sigLength, unsigned readCount, int *read, bool lastIsOffset);
AddressConf() {}
};
@@ -113,6 +114,7 @@ private:
char m_AddressSignature[64];
int m_AddressReadCount;
int m_AddressRead[8];
bool m_AddressLastIsOffset;
StringHashMap<AddressConf> m_Addresses;
const char *m_pEngine;
const char *m_pBaseEngine;