changed AudioPlayer::PlaySound() to AudioPlayer::playSound()
This commit is contained in:
@@ -58,7 +58,7 @@ void mixaudio(void *unused, Uint8 *stream, int len)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioPlayer::PlaySound(std::string fileString)
|
void AudioPlayer::playSound(std::string fileString)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(initiated)
|
if(initiated)
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ class AudioPlayer
|
|||||||
public:
|
public:
|
||||||
AudioPlayer(void);
|
AudioPlayer(void);
|
||||||
~AudioPlayer(void);
|
~AudioPlayer(void);
|
||||||
static void PlaySound(std::string);
|
static void playSound(std::string);
|
||||||
static void init();
|
static void init();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -234,30 +234,14 @@
|
|||||||
RelativePath=".\AudioPlayer.cpp"
|
RelativePath=".\AudioPlayer.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\BaseButtonInstance.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\ButtonListener.cpp"
|
RelativePath=".\ButtonListener.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\DataModelInstance.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Dialogs.rc"
|
RelativePath=".\Dialogs.rc"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\ImageButtonInstance.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Instance.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="main.cpp"
|
RelativePath="main.cpp"
|
||||||
>
|
>
|
||||||
@@ -278,6 +262,25 @@
|
|||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="Instances"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\BaseButtonInstance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\DataModelInstance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ImageButtonInstance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Instance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PhysicalInstance.cpp"
|
RelativePath=".\PhysicalInstance.cpp"
|
||||||
>
|
>
|
||||||
@@ -286,6 +289,11 @@
|
|||||||
RelativePath=".\TextButtonInstance.cpp"
|
RelativePath=".\TextButtonInstance.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\WorkspaceInstance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
@@ -296,11 +304,18 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\BaseButtonInstance.h"
|
RelativePath=".\ButtonListener.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\ButtonListener.h"
|
RelativePath=".\resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="Instances"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\BaseButtonInstance.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@@ -319,14 +334,15 @@
|
|||||||
RelativePath=".\PhysicalInstance.h"
|
RelativePath=".\PhysicalInstance.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\resource.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\TextButtonInstance.h"
|
RelativePath=".\TextButtonInstance.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\WorkspaceInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Resource Files"
|
Name="Resource Files"
|
||||||
|
|||||||
12
main.cpp
12
main.cpp
@@ -255,7 +255,7 @@ public:
|
|||||||
|
|
||||||
void CameraButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
void CameraButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||||
{
|
{
|
||||||
AudioPlayer::PlaySound(cameraSound);
|
AudioPlayer::playSound(cameraSound);
|
||||||
CoordinateFrame frame = usableApp->debugCamera.getCoordinateFrame();
|
CoordinateFrame frame = usableApp->debugCamera.getCoordinateFrame();
|
||||||
if(button->name == "CenterCam")
|
if(button->name == "CenterCam")
|
||||||
centerCam = true;
|
centerCam = true;
|
||||||
@@ -280,7 +280,7 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
|||||||
{
|
{
|
||||||
if(selectedInstance != NULL)
|
if(selectedInstance != NULL)
|
||||||
{
|
{
|
||||||
AudioPlayer::PlaySound(dingSound);
|
AudioPlayer::playSound(dingSound);
|
||||||
if(button->name == "Duplicate")
|
if(button->name == "Duplicate")
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -298,7 +298,7 @@ void RotateButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
|||||||
{
|
{
|
||||||
if(selectedInstance != NULL)
|
if(selectedInstance != NULL)
|
||||||
{
|
{
|
||||||
AudioPlayer::PlaySound(clickSound);
|
AudioPlayer::playSound(clickSound);
|
||||||
if(selectedInstance->getClassName() == "Part")
|
if(selectedInstance->getClassName() == "Part")
|
||||||
{
|
{
|
||||||
PhysicalInstance* part = (PhysicalInstance*) selectedInstance;
|
PhysicalInstance* part = (PhysicalInstance*) selectedInstance;
|
||||||
@@ -324,7 +324,7 @@ void deleteInstance()
|
|||||||
instances.erase(instances.begin() + i);
|
instances.erase(instances.begin() + i);
|
||||||
delete deleting;
|
delete deleting;
|
||||||
selectedInstance = NULL;
|
selectedInstance = NULL;
|
||||||
AudioPlayer::PlaySound(GetFileInPath("/content/sounds/pageturn.wav"));
|
AudioPlayer::playSound(GetFileInPath("/content/sounds/pageturn.wav"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1049,13 +1049,13 @@ void Demo::onUserInput(UserInput* ui) {
|
|||||||
|
|
||||||
if(ui->keyPressed(SDL_MOUSE_WHEEL_UP_KEY))
|
if(ui->keyPressed(SDL_MOUSE_WHEEL_UP_KEY))
|
||||||
{
|
{
|
||||||
AudioPlayer::PlaySound(cameraSound);
|
AudioPlayer::playSound(cameraSound);
|
||||||
CoordinateFrame frame = app->debugCamera.getCoordinateFrame();
|
CoordinateFrame frame = app->debugCamera.getCoordinateFrame();
|
||||||
cameraPos = cameraPos + frame.lookVector()*2;
|
cameraPos = cameraPos + frame.lookVector()*2;
|
||||||
}
|
}
|
||||||
if(ui->keyPressed(SDL_MOUSE_WHEEL_DOWN_KEY))
|
if(ui->keyPressed(SDL_MOUSE_WHEEL_DOWN_KEY))
|
||||||
{
|
{
|
||||||
AudioPlayer::PlaySound(cameraSound);
|
AudioPlayer::playSound(cameraSound);
|
||||||
CoordinateFrame frame = app->debugCamera.getCoordinateFrame();
|
CoordinateFrame frame = app->debugCamera.getCoordinateFrame();
|
||||||
cameraPos = cameraPos - frame.lookVector()*2;
|
cameraPos = cameraPos - frame.lookVector()*2;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user