-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
74 lines (57 loc) · 1.42 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#pragma once
#include <DxLib.h>
#include <iostream>
#include "myglobal.h"
#include "Resource.h"
#include "Func.h"
#include "Draw.h"
#include "GameMgr.h"
#include "Screen.h"
#include "Effects.h"
#include "Color.h"
#include "Dir.h"
#include "MyString.h"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
SetWindowIconID(101);
SetMainWindowText("Natasha");
ChangeWindowMode(TRUE);
SetGraphMode(ScreenWidth, ScreenHeight, 32);
Func::setBackgroundColor0x(0x000000);
SetOutApplicationLogValidFlag(FALSE);//logを生成しないように設定
if (DxLib_Init() == 1){ return -1; }//初期化に失敗時にエラーを吐かせて終了
Input::get();
Screen::get();
GameMgr::get().loadResource();
GameMgr::get().loadButton();
while( ProcessMessage() == 0)
{
GameMgr::get().update();
ButtonAdder::addDValBoolButton("ToWhite");
if (DVal::bool_["ToWhite"]){
Screen::setWhiteOut(5);
Screen::setShake(10);
DVal::bool_["ToWhite"] = false;
}
if (Input::keyDown(KEY_INPUT_Z)){
Screen::setWhiteOut(5);
Screen::setShake(10);
}
if (Input::keyDown(KEY_INPUT_X)){
}
if (Input::keyDown(KEY_INPUT_C)){
}
Screen::DrawStart(); //描画開始, ClearScreen
{
GameMgr::get().draw();
Draw.center(Input::mousePos(), Graph::handle("dot32"), 255);
}
Screen::DrawEnd(); //描画終了, ScreenFlip
//フラグがtrueならゲーム終了
if (gameEndFlag){
break;
}
}
DxLib_End();
return 0;
}