forked from yinhui1129754/CppFishingCode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stdafx.h
91 lines (78 loc) · 1.79 KB
/
stdafx.h
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
79
80
81
82
83
84
85
86
87
88
89
90
91
// stdafx.h : 标准系统包含文件的包含文件,
// 或是经常使用但不常更改的
// 特定于项目的包含文件
//
#pragma once
#include "instance/targetver.h"
#define WIN32_LEAN_AND_MEAN // 从 Windows 头中排除极少使用的资料
// Windows 头文件:
#include <windows.h>
#include <functional>
// C 运行时头文件
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <wchar.h>
//C++运行库
#include <iostream>
#include <thread>
#include <sstream>
#include <set>
#define M_PI 3.14159265358979323846 // pi
#include <cmath>
#include <time.h>
// TODO: 在此处引用程序需要的其他头文件
#include <d2d1.h>
#include <d2d1helper.h>
#include <dwrite.h>
#include <wincodec.h>
#pragma comment(lib,"d2d1.lib")
#pragma comment (lib, "dwrite.lib")
#include <vector>
using namespace std;
#include "instance/utils.h"
#include"instance/oMap.h"
//#include "oMap.h"
template<class Interface>
inline void SafeRelease(
Interface **ppInterfaceToRelease
)
{
if (*ppInterfaceToRelease != NULL)
{
(*ppInterfaceToRelease)->Release();
(*ppInterfaceToRelease) = NULL;
}
}
#ifndef Assert
#if defined( DEBUG ) || defined( _DEBUG )
#define Assert(b) do {if (!(b)) {OutputDebugStringA("Assert: " #b "\n");}} while(0)
#else
#define Assert(b)
#endif //DEBUG || _DEBUG
#endif
#ifndef HINST_THISCOMPONENT
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
#define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase)
#endif
wchar_t * g_chartowchar2(const char* cchar);
template <typename T1, typename T2>
string g_concat(const T1 &v1, const T2 &v2)
{
stringstream ss;
ss << v1 << v2;
return ss.str();
}
float random();
typedef struct {
int x;
int y;
int width;
int height;
} u_rect;
#include "render/ticker.h"
#include "render/action.h"
#include "render/sprite.h"
#include "render/Content.h"
#include "instance/DemoApp.h"
#include "instance/colVec.h"