51 lines
1.0 KiB
Plaintext
51 lines
1.0 KiB
Plaintext
|
module;
|
||
|
#include <Windows.h>
|
||
|
#include <vector>
|
||
|
#include <wrl/client.h>
|
||
|
#include <chrono>
|
||
|
|
||
|
export module MegaEngine;
|
||
|
|
||
|
import Input;
|
||
|
import Graphics;
|
||
|
import GameObject;
|
||
|
import Steve;
|
||
|
|
||
|
using namespace std;
|
||
|
using namespace std::chrono;
|
||
|
|
||
|
export class Game
|
||
|
{
|
||
|
public:
|
||
|
static constexpr LPCWSTR wndClassName = L"1mGameWnd";
|
||
|
static constexpr LPCWSTR gameTitle = L"1mGame";
|
||
|
static constexpr int wndHeight = 450;
|
||
|
static constexpr int wndWidth = 1050;
|
||
|
|
||
|
void Run();
|
||
|
|
||
|
private:
|
||
|
Steve steve;
|
||
|
steady_clock::time_point last;
|
||
|
float delta;
|
||
|
|
||
|
HWND hwnd = nullptr;
|
||
|
bool done = false;
|
||
|
|
||
|
void StartUp();
|
||
|
|
||
|
void Update();
|
||
|
void Render();
|
||
|
void LaterUpdate();
|
||
|
|
||
|
void CleanUp();
|
||
|
|
||
|
void CreateWnd();
|
||
|
bool PeekMsg();
|
||
|
bool Done();
|
||
|
|
||
|
static LRESULT CALLBACK WndProcSetUp(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||
|
static LRESULT CALLBACK WndProcThunk(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||
|
LRESULT WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||
|
};
|