r5sdk/r5dev/common/sdkdefs.h
Kawe Mazidjatari 6e7bfab4bd RTech: major cleanup of pak globals and improvement
Add missing types to fully mapped out PakGlobals_s struct, which is a 13MiB+ structure! This covers the vast majority of the pakfile system which is why we had to change a bunch of stuff for this patch. This patch also comes with:

- Reversed 'JobFifoLock_s' structure
- Reversed 'PakTracker_s' structure
- Reversed 'PakAssetTracker_s' structure

Many globals have been dropped as they were covered by the large PakGlobals_s singleton.

The pak decoder logic has been changed up as well, we now use a decode mode enumerant which will make it easier to add in more decoders for the pak files in the future.
2024-04-05 18:13:31 +02:00

48 lines
938 B
C++

#ifndef SDKDEFS_H
#define SDKDEFS_H
// Common type declarations to reduce code verbosity.
using std::pair;
using std::regex;
using std::string;
using std::wstring;
using std::u16string;
using std::u32string;
using std::vector;
using std::fstream;
using std::ifstream;
using std::ofstream;
using std::stringstream;
using std::ostringstream;
using std::unordered_map;
typedef DWORD ThreadId_t;
typedef uintptr_t uintp;
typedef intptr_t intp;
typedef const unsigned char* rsig_t;
// 32bit and 64bit wide boolean type
typedef int32_t b32;
typedef int64_t b64;
// signed size types
typedef std::make_signed_t<std::size_t> ssize_t;
#ifndef SSIZE_MAX
#ifdef _WIN64
#define SSIZE_MAX 9223372036854775807i64
#define SSIZE_MIN (-9223372036854775807i64 - 1)
#else
#define SSIZE_MAX 2147483647
#define SSIZE_MIN (-2147483647 - 1)
#endif
#endif
// unsigned size types
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t) -1)
#endif
#endif // SDKDEFS_H