diff options
author | aap <aap@papnet.eu> | 2020-04-15 14:05:24 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-04-15 14:05:40 +0200 |
commit | 90be379bede299aa53bca5027ecc19c356e50f86 (patch) | |
tree | 40a5d2e19da49d0007faf39e4762d96d02c6cba2 /src/core/common.h | |
parent | Merge pull request #435 from GTAmodding/appveyor (diff) | |
download | re3-90be379bede299aa53bca5027ecc19c356e50f86.tar re3-90be379bede299aa53bca5027ecc19c356e50f86.tar.gz re3-90be379bede299aa53bca5027ecc19c356e50f86.tar.bz2 re3-90be379bede299aa53bca5027ecc19c356e50f86.tar.lz re3-90be379bede299aa53bca5027ecc19c356e50f86.tar.xz re3-90be379bede299aa53bca5027ecc19c356e50f86.tar.zst re3-90be379bede299aa53bca5027ecc19c356e50f86.zip |
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/common.h b/src/core/common.h index 7688b182..454b848a 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -23,6 +23,15 @@ #include <rwcore.h> #include <rpworld.h> +// gotta put this somewhere +#ifdef LIBRW +#define STREAMPOS(str) ((str)->tell()) +#define STREAMFILE(str) (((rw::StreamFile*)(str))->file) +#else +#define STREAMPOS(str) ((str)->Type.memory.position) +#define STREAMFILE(str) ((str)->Type.file.fpFile) +#endif + #define rwVENDORID_ROCKSTAR 0x0253F2 // Get rid of bullshit windows definitions, we're not running on an 8086 @@ -39,9 +48,6 @@ #ifndef min #define min(a,b) ((a) < (b) ? (a) : (b)) #endif -#ifndef ARRAYSIZE -#define ARRAYSIZE(a) (sizeof(a) / sizeof(*(a))) -#endif typedef uint8_t uint8; typedef int8_t int8; @@ -55,7 +61,9 @@ typedef int64_t int64; // hardcode ucs-2 typedef uint16_t wchar; +#ifndef nil #define nil nullptr +#endif #include "config.h" |