-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstdafx.h
56 lines (45 loc) · 969 Bytes
/
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
#pragma once
#include "targetver.h"
#ifdef WIN32
#include <Windows.h>
#include <tchar.h>
typedef HANDLE COUTHANDLE;
#define ENUMCLASS(n,t) enum n
#else
#include <unistd.h>
#include <termios.h>
#include <fcntl.h>
#include <sys/time.h>
typedef int COUTHANDLE;
#ifdef __Linux__
#define ENUMCLASS(n,t) enum n
#else
#define ENUMCLASS(n,t) enum class n : t
#endif
#endif
#include <stdio.h>
#include <algorithm>
#include <list>
#include <vector>
#include "mt.h"
#include "tasks.h"
#include "taskstage.h"
#define KEY_ESCAPE (1<<0)
#define KEY_LEFT (1<<1)
#define KEY_RIGHT (1<<2)
#define KEY_DOWN (1<<3)
#define KEY_ROTATION (1<<4)
COUTHANDLE ConsoleInit();
void ConsoleLocate(COUTHANDLE hOUT, int x, int y);
void ConsolePrintLine(COUTHANDLE hOUT, const char *pStr);
void ConsoleClear(COUTHANDLE hOUT);
unsigned int getMS();
void mSleep(int ms);
typedef struct tagG{
TaskMan *pTaskMan;
// input
int keys;
int keyTrg;
void onUpdate();
}G;
extern G g;