summaryrefslogtreecommitdiff
path: root/plugins/FlashAvatars/src/stdafx.h
blob: fb175de920ca90cd8992e9df18063eb2094b5126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently

#define _CRT_SECURE_NO_WARNINGS

#pragma once
#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
#define BZ_NO_STDIO

#ifdef _WIN32
# define _WIN32_WINNT 0x0500
# define _WIN32_IE	0x0501
#endif

#ifdef _DEBUG
# define _STLP_DEBUG 1
#endif

#ifndef _WIN64
	#define _USE_32BIT_TIME_T
#endif

#define _STLP_DONT_USE_SHORT_STRING_OPTIM 1	// Uses small string buffer, so it saves memory for a lot of strings
#define _STLP_USE_PTR_SPECIALIZATIONS 1		// Reduces some code bloat
#define _STLP_USE_TEMPLATE_EXPRESSION 1		// Speeds up string concatenation
#define _STLP_NO_ANACHRONISMS 1

#include <windows.h>
#include <io.h>
#include <fcntl.h>
#include <Winsock2.h>

#include <newpluginapi.h>
#include <m_system_cpp.h>
#include <m_database.h>
#include <m_protosvc.h>
#include <m_langpack.h>
#include <m_avatars.h>
#include <m_netlib.h>
#include <m_clistint.h>
#include <win2k.h>

#include <m_folders.h>
#include <m_flash.h>

#include "CriticalSection.h"
#include "TigerHash.h"
#include "Version.h"
#include "resource.h"

#ifdef _DEBUG

inline void _cdecl debugTrace(const char* format, ...)
{
	va_list args;
	va_start(args, format);
	
	char buf[512];
	
	_vsnprintf(buf, sizeof(buf), format, args);
	OutputDebugStringA(buf);
	va_end(args);
}

# define debug debugTrace
#define assert(exp) \
do { if (!(exp)) { \
	debug("Assertion hit in %s(%d): " #exp "\n", __FILE__, __LINE__); \
	if(1 == _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, #exp)) \
_CrtDbgBreak(); } } while(false)

#else
# define debug
# define assert
#endif