-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
55 lines (42 loc) · 1.02 KB
/
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
#pragma once
#include <DxLib.h>
#include <iostream>
#include "myglobal.h"
#include "Resource.h"
#include "Func.h"
#include "GameMgr.h"
#include "Screen.h"
#include "Effects.h"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
SetWindowIconID(101);
SetMainWindowText("CRYSTAL WINGS");
ChangeWindowMode(TRUE);
SetGraphMode(ScreenWidth, ScreenHeight, 32);
SetBackgroundColor(255, 255, 255);//背景白に設定
SetOutApplicationLogValidFlag(FALSE);//logを生成しないように設定
if (DxLib_Init() == 1){ return -1; }//初期化に失敗時にエラーを吐かせて終了
Input::get();
Screen::get();
GameMgr::get().loadResource();
while( ProcessMessage() == 0)
{
GameMgr::get().update();
#if DEBUG == 1
if (Input::keydown(KEY_INPUT_A)){
}
#endif
Screen::DrawStart(); //描画開始, ClearScreen
{
GameMgr::get().draw();
GameMgr::get().draw2();
}
Screen::DrawEnd(); //描画終了, ScreenFlip
//フラグがtrueならゲーム終了
if (mgr.gameEndFlag){
break;
}
}
DxLib_End();
return 0;
}