OS Windows support

master
Vectozavr 2021-10-19 01:58:19 +07:00
parent 7f4b9027ee
commit 22c18968f6
6 changed files with 53 additions and 53 deletions

View File

@ -16,8 +16,8 @@
class Screen final {
private:
int _w;
int _h;
int _w{};
int _h{};
std::string _title;

View File

@ -337,7 +337,7 @@ void RigidBody::makeLogObjPolytope(const std::vector<Vec3D> &polytope, const std
for(auto &p : polytope)
file << "v " << p.x() << " " << p.y() << " " << p.z() << std::endl;
for(int i = 0; i < faces.size(); i += 3)
for(size_t i = 0; i < faces.size(); i += 3)
file << "f " << faces[i + 0]+1 << " " << faces[i + 1]+1 << " " << faces[i + 2]+1 << std::endl;
file.close();

View File

@ -39,7 +39,7 @@ public:
Vec3D operator[](unsigned i) const {
auto it = _points.begin();
for(int k=0; k<i; k++)
for(unsigned k=0; k<i; k++)
++it;
return *it;

View File

@ -168,6 +168,7 @@
<ClCompile Include="engine\gui\Button.cpp" />
<ClCompile Include="engine\gui\Window.cpp" />
<ClCompile Include="engine\Keyboard.cpp" />
<ClCompile Include="engine\Matrix4x4.cpp" />
<ClCompile Include="engine\Mesh.cpp" />
<ClCompile Include="engine\Mouse.cpp" />
<ClCompile Include="engine\network\ClientUDP.cpp" />
@ -178,15 +179,16 @@
<ClCompile Include="engine\network\UDPSocket.cpp" />
<ClCompile Include="engine\Object.cpp" />
<ClCompile Include="engine\physics\RigidBody.cpp" />
<ClCompile Include="engine\physics\Solver.cpp" />
<ClCompile Include="engine\Plane.cpp" />
<ClCompile Include="engine\Point4D.cpp" />
<ClCompile Include="engine\ResourceManager.cpp" />
<ClCompile Include="engine\Screen.cpp" />
<ClCompile Include="engine\SoundController.cpp" />
<ClCompile Include="engine\Triangle.cpp" />
<ClCompile Include="engine\utils\Log.cpp" />
<ClCompile Include="engine\utils\Matrix4x4.cpp" />
<ClCompile Include="engine\utils\Point4D.cpp" />
<ClCompile Include="engine\utils\Time.cpp" />
<ClCompile Include="engine\Vec2D.cpp" />
<ClCompile Include="engine\Vec3D.cpp" />
<ClCompile Include="engine\World.cpp" />
<ClCompile Include="Player.cpp" />
<ClCompile Include="PlayerController.cpp" />
@ -213,14 +215,15 @@
<ClInclude Include="engine\animation\Interpolation.h" />
<ClInclude Include="engine\animation\Timeline.h" />
<ClInclude Include="engine\Camera.h" />
<ClInclude Include="engine\Consts.h" />
<ClInclude Include="engine\Engine.h" />
<ClInclude Include="engine\gui\Button.h" />
<ClInclude Include="engine\gui\Window.h" />
<ClInclude Include="engine\Keyboard.h" />
<ClInclude Include="engine\Matrix4x4.h" />
<ClInclude Include="engine\Mesh.h" />
<ClInclude Include="engine\Mouse.h" />
<ClInclude Include="engine\network\ClientUDP.h" />
<ClInclude Include="engine\network\config.h" />
<ClInclude Include="engine\network\MsgType.h" />
<ClInclude Include="engine\network\ReliableMsg.h" />
<ClInclude Include="engine\network\ServerUDP.h" />
@ -229,20 +232,22 @@
<ClInclude Include="engine\Object.h" />
<ClInclude Include="engine\physics\RigidBody.h" />
<ClInclude Include="engine\physics\Simplex.h" />
<ClInclude Include="engine\physics\Solver.h" />
<ClInclude Include="engine\Plane.h" />
<ClInclude Include="engine\Point4D.h" />
<ClInclude Include="engine\ResourceManager.h" />
<ClInclude Include="engine\Screen.h" />
<ClInclude Include="engine\SoundController.h" />
<ClInclude Include="engine\Triangle.h" />
<ClInclude Include="engine\utils\Log.h" />
<ClInclude Include="engine\utils\Matrix4x4.h" />
<ClInclude Include="engine\utils\Point4D.h" />
<ClInclude Include="engine\utils\Time.h" />
<ClInclude Include="engine\Vec2D.h" />
<ClInclude Include="engine\Vec3D.h" />
<ClInclude Include="engine\World.h" />
<ClInclude Include="Player.h" />
<ClInclude Include="PlayerController.h" />
<ClInclude Include="Server.h" />
<ClInclude Include="Shooter.h" />
<ClInclude Include="ShooterConsts.h" />
<ClInclude Include="weapon\Ak47.h" />
<ClInclude Include="weapon\Gold_Ak47.h" />
<ClInclude Include="weapon\Gun.h" />
@ -250,16 +255,6 @@
<ClInclude Include="weapon\Shotgun.h" />
<ClInclude Include="weapon\Weapon.h" />
</ItemGroup>
<ItemGroup>
<Text Include="maps\materials.txt" />
<Text Include="obj\ability_mat.txt" />
<Text Include="obj\ak47_mat.txt" />
<Text Include="obj\gold_ak47_mat.txt" />
<Text Include="obj\gun_mat.txt" />
<Text Include="obj\hill_mat.txt" />
<Text Include="obj\rifle_mat.txt" />
<Text Include="obj\shotgun_mat.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -72,21 +72,12 @@
<ClCompile Include="engine\utils\Log.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\utils\Matrix4x4.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\utils\Point4D.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\utils\Time.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\physics\RigidBody.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\physics\Solver.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\network\ClientUDP.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
@ -132,6 +123,21 @@
<ClCompile Include="weapon\Weapon.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\Matrix4x4.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\Point4D.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\SoundController.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\Vec2D.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="engine\Vec3D.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Bonus.h">
@ -188,12 +194,6 @@
<ClInclude Include="engine\utils\Log.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\utils\Matrix4x4.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\utils\Point4D.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\utils\Time.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
@ -203,15 +203,9 @@
<ClInclude Include="engine\physics\Simplex.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\physics\Solver.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\network\ClientUDP.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\network\config.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\network\MsgType.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
@ -281,15 +275,26 @@
<ClInclude Include="weapon\Weapon.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="obj\ability_mat.txt" />
<Text Include="obj\ak47_mat.txt" />
<Text Include="obj\gold_ak47_mat.txt" />
<Text Include="obj\gun_mat.txt" />
<Text Include="obj\hill_mat.txt" />
<Text Include="obj\rifle_mat.txt" />
<Text Include="obj\shotgun_mat.txt" />
<Text Include="maps\materials.txt" />
<ClInclude Include="ShooterConsts.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\Consts.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\Matrix4x4.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\Point4D.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\SoundController.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\Vec2D.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
<ClInclude Include="engine\Vec3D.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -51,7 +51,7 @@ void Weapon::reload() {
_stockAmmo = 0;
}
SoundController::playSound(SoundTag("fire"), reloadSound);
SoundController::playSound(SoundTag("reload"), reloadSound);
Log::log("Weapon::reload (" + std::to_string(_stockAmmo) + " : " + std::to_string(_clipAmmo) + ")");
_lastReloadTime = Time::time();
}