mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-23 09:16:04 +01:00
xash3d_types: start refactoring engine to use stdint.h types
This commit is contained in:
parent
c39d42cc62
commit
8d942bcc86
@ -7,6 +7,7 @@
|
||||
#endif // _WIN32
|
||||
|
||||
#include <sys/types.h> // off_t
|
||||
#include STDINT_H
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef int sound_t;
|
||||
@ -29,14 +30,7 @@ typedef enum { false, true } qboolean;
|
||||
typedef int qboolean;
|
||||
#endif
|
||||
|
||||
#if _MSC_VER == 1200
|
||||
typedef __int64 integer64; //msvc6
|
||||
#elif defined (XASH_SDL) && !defined(REF_DLL)
|
||||
typedef Uint64 integer64;
|
||||
#else
|
||||
typedef unsigned long long integer64;
|
||||
#endif
|
||||
typedef integer64 longtime_t;
|
||||
typedef uint64_t longtime_t;
|
||||
|
||||
#define MAX_STRING 256 // generic string
|
||||
#define MAX_INFO_STRING 256 // infostrings are transmitted across network
|
||||
|
@ -29,7 +29,7 @@ should be enough to determine if device exist in identifier
|
||||
|
||||
==========================================================
|
||||
*/
|
||||
typedef integer64 bloomfilter_t;
|
||||
typedef uint64_t bloomfilter_t;
|
||||
|
||||
static bloomfilter_t id;
|
||||
|
||||
@ -48,7 +48,7 @@ bloomfilter_t BloomFilter_Process( const char *buffer, int size )
|
||||
|
||||
while( crc32 )
|
||||
{
|
||||
value |= ((integer64)1) << ( crc32 & bf64_mask );
|
||||
value |= ((uint64_t)1) << ( crc32 & bf64_mask );
|
||||
crc32 = crc32 >> 6;
|
||||
}
|
||||
|
||||
|
@ -113,9 +113,9 @@ GNU General Public License for more details.
|
||||
typedef struct netsplit_chain_packet_s
|
||||
{
|
||||
// bool vector
|
||||
unsigned int recieved_v[8];
|
||||
uint32_t recieved_v[8];
|
||||
// serial number
|
||||
unsigned int id;
|
||||
uint32_t id;
|
||||
byte data[NET_MAX_PAYLOAD];
|
||||
byte received;
|
||||
byte count;
|
||||
@ -124,10 +124,10 @@ typedef struct netsplit_chain_packet_s
|
||||
// raw packet format
|
||||
typedef struct netsplit_packet_s
|
||||
{
|
||||
unsigned int signature; // 0xFFFFFFFE
|
||||
unsigned int length;
|
||||
unsigned int part;
|
||||
unsigned int id;
|
||||
uint32_t signature; // 0xFFFFFFFE
|
||||
uint32_t length;
|
||||
uint32_t part;
|
||||
uint32_t id;
|
||||
// max 256 parts
|
||||
byte count;
|
||||
byte index;
|
||||
@ -138,8 +138,8 @@ typedef struct netsplit_packet_s
|
||||
typedef struct netsplit_s
|
||||
{
|
||||
netsplit_chain_packet_t packets[NETSPLIT_BACKUP];
|
||||
integer64 total_received;
|
||||
integer64 total_received_uncompressed;
|
||||
uint64_t total_received;
|
||||
uint64_t total_received_uncompressed;
|
||||
} netsplit_t;
|
||||
|
||||
// packet splitting
|
||||
|
2
mainui
2
mainui
@ -1 +1 @@
|
||||
Subproject commit 9ef06db97fd612c820674c399db757d00176ada5
|
||||
Subproject commit f7bde4076321a5e9172a91e789d45dd643c6840e
|
Loading…
Reference in New Issue
Block a user