forked from Fluorohydride/ygopro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.h
More file actions
92 lines (78 loc) · 1.86 KB
/
Copy pathconfig.h
File metadata and controls
92 lines (78 loc) · 1.86 KB
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
92
#ifndef YGOPRO_CONFIG_H
#define YGOPRO_CONFIG_H
#define _IRR_STATIC_LIB_
#define IRR_COMPILE_WITH_DX9_DEV_PACK
#ifdef _WIN32
#define NOMINMAX
#include <WinSock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#ifdef _MSC_VER
#define mywcsncasecmp _wcsnicmp
#define mystrncasecmp _strnicmp
#elif __GNUC__
#define mywcsncasecmp _wcsnicmp
#define mystrncasecmp _strnicmp
#else
#define mywcsncasecmp wcsncasecmp
#define mystrncasecmp strncasecmp
#endif
#define socklen_t int
#else //_WIN32
#include <errno.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#define SD_BOTH 2
#define SOCKET int
#define closesocket close
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#define SOCKADDR_IN sockaddr_in
#define SOCKADDR sockaddr
#define SOCKET_ERRNO() (errno)
#define mywcsncasecmp wcsncasecmp
#define mystrncasecmp strncasecmp
#endif
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <algorithm>
#include <string>
#include "bufferio.h"
#include "../ocgcore/ocgapi.h"
#include "../ocgcore/common.h"
template<size_t N, typename... TR>
inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
return swprintf(buf, N, fmt, args...);
}
inline FILE* myfopen(const wchar_t* filename, const char* mode) {
FILE* fp{};
#ifdef _WIN32
wchar_t wmode[20]{};
BufferIO::CopyCharArray(mode, wmode);
fp = _wfopen(filename, wmode);
#else
char fname[1024]{};
BufferIO::EncodeUTF8(filename, fname);
fp = fopen(fname, mode);
#endif
return fp;
}
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
extern const unsigned short PRO_VERSION;
extern unsigned int enable_log;
extern bool exit_on_return;
extern bool open_file;
extern wchar_t open_file_name[256];
extern bool bot_mode;
#endif