equal
deleted
inserted
replaced
302 * pointer. If it is NULL we are dealing with global variables so the address |
302 * pointer. If it is NULL we are dealing with global variables so the address |
303 * is taken. If non-null only the offset is stored in the union and we need |
303 * is taken. If non-null only the offset is stored in the union and we need |
304 * to add this to the address of the object */ |
304 * to add this to the address of the object */ |
305 static inline void *GetVariableAddress(const void *object, const SaveLoad *sld) |
305 static inline void *GetVariableAddress(const void *object, const SaveLoad *sld) |
306 { |
306 { |
307 return (byte*)object + (ptrdiff_t)sld->address; |
307 return (byte*)(sld->global ? NULL : object) + (ptrdiff_t)sld->address; |
308 } |
308 } |
309 |
309 |
310 int64 ReadValue(const void *ptr, VarType conv); |
310 int64 ReadValue(const void *ptr, VarType conv); |
311 void WriteValue(void *ptr, VarType conv, int64 val); |
311 void WriteValue(void *ptr, VarType conv, int64 val); |
312 |
312 |