Skip to content

Commit

Permalink
chore: clear the code
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKonstantinSh committed Sep 16, 2020
1 parent 7e118a2 commit 33b5349
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Lab_1/Lab_1/Lab_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
#define WM_UPDATE_SPRITE (WM_USER + 1)
#define WM_LOAD_DEFAULT_SPRITE (WM_USER + 2)

#define VK_W 0x57
#define VK_A 0x41
#define VK_S 0x53
#define VK_D 0x44

#define VK_Q 0x51
#define VK_E 0x45

#define VK_L 0x4c

constexpr auto WINDOW_NAME = "Lab_1";
constexpr auto SPRITE_STEP = 10;
constexpr auto SPRITE_DEGREE_ROTATE_STEP = 15;

constexpr auto VK_W = 0x57;
constexpr auto VK_A = 0x41;
constexpr auto VK_S = 0x53;
constexpr auto VK_D = 0x44;

constexpr auto VK_Q = 0x51;
constexpr auto VK_E = 0x45;

constexpr auto VK_L = 0x4c;

ATOM RegisterWindowClass(HINSTANCE);
BOOL InitWindowInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
Expand Down Expand Up @@ -432,6 +432,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
}
break;
case WM_ERASEBKGND:
return 1;
case WM_SIZE:
PostUpdateSpriteMessage(hWnd);
return DefWindowProc(hWnd, message, wParam, lParam);
Expand Down

0 comments on commit 33b5349

Please sign in to comment.