diff options
author | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-08-31 08:30:47 +0200 |
---|---|---|
committer | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-08-31 08:30:47 +0200 |
commit | 12bafff5c0ca6bfdcca3553a0717c80f21e27182 (patch) | |
tree | 7c07954a140c879b8c71e33a71c603f27076ab56 /tools/nitrogfx/global.h | |
parent | 4e4192cd7007d16cefe00facbc7b721353c94f60 (diff) | |
parent | 05ded46ab7f556956a2eee2411a8d2968b7e8ad6 (diff) |
Merge branch 'master' into unk_02006D98
Diffstat (limited to 'tools/nitrogfx/global.h')
-rw-r--r-- | tools/nitrogfx/global.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/nitrogfx/global.h b/tools/nitrogfx/global.h index 65dd351d..32378a9f 100644 --- a/tools/nitrogfx/global.h +++ b/tools/nitrogfx/global.h @@ -28,4 +28,10 @@ do { \ #endif // _MSC_VER +#define PTR_ADD(ptr, value) ((void*)((uintptr_t)(ptr) + (value))) +#define PTR_SUB(ptr, value) ((void*)((uintptr_t)(ptr) - (value))) +#define PTR_IADD(ptr, value) do { (ptr) = PTR_ADD(ptr, value); } while (0) +#define PTR_ISUB(ptr, value) do { (ptr) = PTR_SUB(ptr, value); } while (0) +#define PTR_DIFF(right, left) ((uintptr_t)(right) - (uintptr_t)(left)) + #endif // GLOBAL_H |