-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello.cpp
More file actions
43 lines (35 loc) · 1.01 KB
/
Copy pathhello.cpp
File metadata and controls
43 lines (35 loc) · 1.01 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
#define _USE_MATH_DEFINES
#include <cmath>
#include <list>
#include <iostream>
#include "DxLib.h"
#define XINPUT_L_THUMB_DEADZONE 7849
#define XINPUT_R_THUMB_DEADZONE 8689
#include "InputState.h"
#include "Jiki.h"
#include "GameProcess.h"
#include "Enemy.h"
using namespace std;
int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int) {
//ウィンドウモード変更と初期化と裏画面設定
if (ChangeWindowMode(TRUE) != 0 || DxLib_Init() != 0) {
return 0;
}
if (SetDrawScreen(DX_SCREEN_BACK) != 0) {
DxLib_End();
return 0;
}
InputState inputState;
int handle = LoadGraph("自機.png");
Jiki jiki(handle, &inputState);
GameProcess gameProcess(&inputState, &jiki);
// while(裏画面を表画面に反映, メッセージ処理, 画面クリア)
while (ScreenFlip() == 0 && ProcessMessage() == 0 && ClearDrawScreen() == 0 && inputState.gpUpdateKey() == 0) {
//計算部分
gameProcess.calc();
//描画部分
gameProcess.draw();
}
DxLib_End(); // DXライブラリ終了処理
return 0;
}