diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -2,10 +2,15 @@ #include <cmath> #include "window.h" +#include "windows.h" #include "bitmap.h" #include "level.h" #include "train.h" +#include "iostream" +#pragma comment(lib, "winmm.lib") // For audio files + + struct Point2D { float x, y; }; @@ -85,13 +90,16 @@ int main(int argc, char **argv) Level level(32, 32); Bitmap bitmap(Width, Height); + TrainCar car(0, 0); + + //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; - TrainCar car(0, 0); - window.onMouseDown([&](int button, int x, int y) { if (button == 1) { static const auto update_direction = [&](int xt, int yt) { |