diff --git a/content/sounds/SWITCH3.wav b/content/sounds/SWITCH3.wav new file mode 100644 index 0000000..195138e Binary files /dev/null and b/content/sounds/SWITCH3.wav differ diff --git a/main.cpp b/main.cpp index 4e827cd..3893fcd 100644 --- a/main.cpp +++ b/main.cpp @@ -37,6 +37,7 @@ static G3D::RealTime messageTime = 0; static G3D::RealTime inputTime = 0; static int FPSVal[8] = {10, 20, 30, 60, 120, 240, INT_MAX,1}; static int index = 2; +static std::string cameraSound = ""; static float TIMERVAL = 60.0F; static int SCOREVAL = 0; static AudioPlayer soundSystem; @@ -250,6 +251,7 @@ public: void CameraButtonListener::onButton1MouseClick(BaseButtonInstance* button) { + soundSystem.PlaySound(cameraSound); CoordinateFrame frame = usableApp->debugCamera.getCoordinateFrame(); if(button->name == "CenterCam") centerCam = true; @@ -878,11 +880,13 @@ void Demo::onUserInput(UserInput* ui) { if(ui->keyPressed(SDL_MOUSE_WHEEL_UP_KEY)) { + soundSystem.PlaySound(cameraSound); CoordinateFrame frame = app->debugCamera.getCoordinateFrame(); cameraPos = cameraPos + frame.lookVector()*2; } if(ui->keyPressed(SDL_MOUSE_WHEEL_DOWN_KEY)) { + soundSystem.PlaySound(cameraSound); CoordinateFrame frame = app->debugCamera.getCoordinateFrame(); cameraPos = cameraPos - frame.lookVector()*2; } @@ -1371,6 +1375,7 @@ void App::main() { cursor = Texture::fromFile(GetFileInPath("/content/cursor2.png")); fntdominant = GFont::fromFile(GetFileInPath("/content/font/dominant.fnt")); fntlighttrek = GFont::fromFile(GetFileInPath("/content/font/lighttrek.fnt")); + cameraSound = GetFileInPath("/content/sounds/SWITCH3.wav"); sky = Sky::create(NULL, ExePath() + "/content/sky/"); cursorid = cursor->openGLID(); applet->run();