-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
59 lines (46 loc) · 955 Bytes
/
main.cpp
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
#include "control.h"
#include "define.h"
#include "draw.h"
#include "game.h"
#include "tetromino.h"
#include "utils.h"
#include "graphics.h"
#include "music.h"
#include <string>
void init() {
dw::init();
gm::init();
mus::init();
srand(time(0));
BeginBatchDraw();
}
void loop() {
mus::bgm();
while (gm::running) {
ut::frame_start_time = GetTickCount();
cleardevice();
dw::print_ui();
gm::keyboard_event();
gm::process();
dw::print_next();
dw::print_hold();
dw::print_fps();
dw::print_pps();
dw::print_points();
dw::print_time();
dw::print_frame(gm::frame,60,480);
FlushBatchDraw();
ut::frame_sleep();
}
}
void exit() {
mus::warning_end();
MessageBox(GetHWnd(), _T("Ŷ°¡°¡ÚÀÚÀ°¡"), _T("ÓÎÏ·½áÊø"), MB_OK);
EndBatchDraw();
}
int main() {
init();
loop();
exit();
return 0;
}