-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
6,166 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Some samples were taken from the ARMA 3 mod JSRS (Explosion sounds) and | ||
mixed with other effects. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#include "Crewmember.h" | ||
|
||
static SoLoud::Wav* radio = nullptr; | ||
|
||
|
||
|
||
void Crewmember::speak(std::string text) | ||
{ | ||
if (radio == nullptr) | ||
{ | ||
radio = new SoLoud::Wav(); | ||
radio->load("radio.wav"); | ||
} | ||
|
||
g_soloud->play(*radio); | ||
|
||
voice.setText((". . ." + text).c_str()); | ||
g_soloud->play(voice, 1.6f); | ||
|
||
g_status->strings.push_back(name + ": " + text); | ||
} | ||
|
||
|
||
Crewmember::Crewmember() | ||
{ | ||
std::array<std::string, 15> first_names = | ||
{ | ||
"Bob", | ||
"John", | ||
"Robert", | ||
"Michael", | ||
"William", | ||
"David", | ||
"Richard", | ||
"Joseph", | ||
"Guamedo", | ||
"Thomas", | ||
"Charles", | ||
"Donald", | ||
"Mark", | ||
"Brian", | ||
"Alex" | ||
}; | ||
|
||
std::array<std::string, 17> last_names = | ||
{ | ||
"Smith", | ||
"Bobbins", | ||
"Williams", | ||
"Jones", | ||
"Brown", | ||
"Davis", | ||
"Miller", | ||
"Wilson", | ||
"Moore", | ||
"Taylor", | ||
"Anderson", | ||
"Thomas", | ||
"Jackson", | ||
"White", | ||
"Garcia", | ||
"Martinez", | ||
"Young" | ||
}; | ||
|
||
name = first_names[rand() % first_names.size()] + " " + last_names[rand() % last_names.size()]; | ||
|
||
int wave = KW_TRIANGLE; | ||
if (g_random->getFloat(0.0f, 1.0f) >= 0.5f) | ||
{ | ||
wave = KW_PULSE; | ||
} | ||
else if (g_random->getFloat(0.0f, 1.0f) >= 0.5f) | ||
{ | ||
wave = KW_WARBLE; | ||
} | ||
else if (g_random->getFloat(0.0f, 1.0f) >= 0.5f) | ||
{ | ||
wave = KW_SQUARE; | ||
} | ||
|
||
voice.setParams(g_random->getInt(900, 1900), g_random->getFloat(6.5f, 8.5f), g_random->getFloat(0.4f, 0.6f), wave); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
#include <string> | ||
#include "defines.h" | ||
#include <soloud_speech.h> | ||
#include <soloud_wav.h> | ||
|
||
class Crewmember | ||
{ | ||
public: | ||
SoLoud::Speech voice; | ||
std::string name; | ||
bool is_captain; | ||
|
||
|
||
void speak(std::string text); | ||
|
||
Crewmember(); | ||
}; | ||
|
Oops, something went wrong.