Skip to content

Commit

Permalink
Added alternative controls
Browse files Browse the repository at this point in the history
  • Loading branch information
tatjam committed Mar 18, 2020
1 parent bf2b66f commit 022fdf8
Show file tree
Hide file tree
Showing 76 changed files with 6,166 additions and 582 deletions.
Binary file added 7DRL.exe
Binary file not shown.
25 changes: 20 additions & 5 deletions 7DRL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>D:\Programming\libtcod-1.15.1-x86_64-msvc\include;</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>C:\Users\Usuario\Source\Repos\7DRL\src\soloud\include;D:\Programming\SDL2\include;D:\Programming\libtcod-1.15.1-x86_64-msvc\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WITH_SDL2;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand All @@ -126,13 +127,18 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\Crewmember.cpp" />
<ClCompile Include="src\disembark\BuildingMap.cpp" />
<ClCompile Include="src\disembark\EmbarkScene.cpp" />
<ClCompile Include="src\flight\entity\Monsters.cpp" />
<ClCompile Include="src\flight\entity\Buildings.cpp" />
<ClCompile Include="src\flight\Gamemaster.cpp" />
<ClCompile Include="src\vehicle\workbench\Battery.cpp" />
<ClCompile Include="src\vehicle\workbench\Machines.cpp" />
<ClCompile Include="src\vehicle\workbench\Periscope.cpp" />
<ClCompile Include="src\vehicle\workbench\Maneouver.cpp" />
<ClCompile Include="src\vehicle\workbench\Listening.cpp" />
<ClCompile Include="src\vehicle\Crewmember.cpp" />
<ClCompile Include="src\vehicle\workbench\Targeting.cpp" />
<ClCompile Include="src\vehicle\FlightCrew.cpp" />
<ClCompile Include="src\vehicle\workbench\Radio.cpp" />
<ClCompile Include="src\vehicle\workbench\Sonar.cpp" />
<ClCompile Include="src\flight\FlightMap.cpp" />
Expand Down Expand Up @@ -200,6 +206,7 @@
<ClCompile Include="src\soloud\src\filter\soloud_waveshaperfilter.cpp" />
<ClCompile Include="src\Status.cpp" />
<ClCompile Include="src\vehicle\Vehicle.cpp" />
<ClCompile Include="src\flight\entity\EntityTorpedo.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="libtcod.dll" />
Expand All @@ -208,14 +215,21 @@
<None Include="src\soloud\src\c_api\soloud.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Popup.h" />
<ClInclude Include="src\Crewmember.h" />
<ClInclude Include="src\disembark\EmbarkScene.h" />
<ClInclude Include="src\disembark\BuildingMap.h" />
<ClInclude Include="src\flight\entity\Monsters.h" />
<ClInclude Include="src\flight\entity\Buildings.h" />
<ClInclude Include="src\flight\entity\FlightEntity.h" />
<ClInclude Include="src\flight\Gamemaster.h" />
<ClInclude Include="src\vehicle\workbench\Battery.h" />
<ClInclude Include="src\vehicle\workbench\Machines.h" />
<ClInclude Include="src\vehicle\workbench\Periscope.h" />
<ClInclude Include="src\vehicle\workbench\Maneouver.h" />
<ClInclude Include="src\vehicle\workbench\Listening.h" />
<ClInclude Include="src\vehicle\workbench\Targeting.h" />
<ClInclude Include="src\Speech.h" />
<ClInclude Include="src\vehicle\Crewmember.h" />
<ClInclude Include="src\vehicle\FlightCrew.h" />
<ClInclude Include="src\Date.h" />
<ClInclude Include="src\vehicle\workbench\Radio.h" />
<ClInclude Include="src\Drawing.h" />
Expand All @@ -237,6 +251,7 @@
<ClInclude Include="src\Status.h" />
<ClInclude Include="src\vehicle\Vehicle.h" />
<ClInclude Include="src\vehicle\workbench\Workbench.h" />
<ClInclude Include="src\flight\entity\EntityTorpedo.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
66 changes: 54 additions & 12 deletions 7DRL.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,12 @@
<ClCompile Include="src\vehicle\Vehicle.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\vehicle\Crewmember.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\vehicle\workbench\Sonar.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\vehicle\workbench\Radio.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\vehicle\workbench\Listening.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\vehicle\workbench\Maneouver.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -237,6 +231,30 @@
<ClCompile Include="src\flight\Gamemaster.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\flight\entity\Buildings.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\flight\entity\Monsters.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\flight\entity\EntityTorpedo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\vehicle\workbench\Targeting.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\disembark\EmbarkScene.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\disembark\BuildingMap.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\vehicle\FlightCrew.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Crewmember.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="libtcod.dll" />
Expand Down Expand Up @@ -303,9 +321,6 @@
<ClInclude Include="src\vehicle\Vehicle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\vehicle\Crewmember.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\Speech.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand All @@ -318,9 +333,6 @@
<ClInclude Include="src\vehicle\workbench\Radio.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\vehicle\workbench\Listening.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\vehicle\workbench\Maneouver.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand All @@ -336,5 +348,35 @@
<ClInclude Include="src\flight\Gamemaster.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\flight\entity\Buildings.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\flight\entity\FlightEntity.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\flight\entity\Monsters.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\flight\entity\EntityTorpedo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\vehicle\workbench\Targeting.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\disembark\BuildingMap.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\disembark\EmbarkScene.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\vehicle\FlightCrew.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\Crewmember.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\Popup.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
Binary file added 7DRL.zip
Binary file not shown.
2 changes: 2 additions & 0 deletions SAMPLES.txt
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 modified Test.xp
Binary file not shown.
Binary file added alien_die.wav
Binary file not shown.
Binary file added biter/attack.wav
Binary file not shown.
Binary file added biter/idle.wav
Binary file not shown.
Binary file added collide.wav
Binary file not shown.
Binary file added collide2.wav
Binary file not shown.
Binary file added crawler/attack.wav
Binary file not shown.
Binary file added crawler/idle.wav
Binary file not shown.
Binary file added crawler/moving.wav
Binary file not shown.
Binary file added diesel_off.wav
Binary file not shown.
Binary file added explo_far_dist.wav
Binary file not shown.
Binary file added explo_med_dist.wav
Binary file not shown.
Binary file added explo_near_dist.wav
Binary file not shown.
Binary file added four_way.wav
Binary file not shown.
Binary file added grenade.wav
Binary file not shown.
Binary file added grenade_land.wav
Binary file not shown.
Binary file added gunshot.wav
Binary file not shown.
Binary file added hurt.wav
Binary file not shown.
Binary file added hurt_alien.wav
Binary file not shown.
Binary file added hurt_metal.wav
Binary file not shown.
Binary file added man_die.wav
Binary file not shown.
Binary file added metal_die.wav
Binary file not shown.
Binary file added shock.wav
Binary file not shown.
84 changes: 84 additions & 0 deletions src/Crewmember.cpp
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);

}
19 changes: 19 additions & 0 deletions src/Crewmember.h
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();
};

Loading

0 comments on commit 022fdf8

Please sign in to comment.