diff options
author | jusipat <justin10patrick@gmail.com> | 2022-01-25 10:35:31 -0700 |
---|---|---|
committer | jusipat <justin10patrick@gmail.com> | 2022-01-25 10:35:31 -0700 |
commit | f02693eed80de7ebf1d03f3d7a8069dd8a3b53ae (patch) | |
tree | e21d8cb90a9d62068435a70fcb8754183aa65c88 /main.cpp | |
parent | e0f29aa0b03807ef3968edd5673d9dc5637f32af (diff) |
Added music player
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2,9 +2,14 @@ #include <cmath> #include "window.h" +#include "windows.h" #include "bitmap.h" #include "level.h" +#include "iostream" +#pragma comment(lib, "winmm.lib") // For audio files + + struct Point2D { float x, y; }; @@ -85,10 +90,16 @@ int main(int argc, char **argv) Bitmap bitmap(Width, Height); + //bool audio_play1 = PlaySound(TEXT("res\\Starliner.wav"), NULL, SND_LOOP | SND_ASYNC); + //Adds Starliner.wav and plays it on startup and loops, + //I imagine this would get very annoying during debug so it's commented out for now. + int xOffs = 0, yOffs = 0; int xDrag, yDrag; bool isDragging = false; + + window.onMouseDown([&](int button, int x, int y) { if (button == 1) { static const auto update_direction = [&](int xt, int yt) { |