16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 08:09:19 +02:00

replaced char parameters in sound system with stl string

This commit is contained in:
tmj-fstate
2017-05-19 13:31:26 +02:00
parent c6fbfbbb29
commit 93787db20d
18 changed files with 184 additions and 330 deletions

View File

@@ -11,17 +11,6 @@ http://mozilla.org/MPL/2.0/.
#include "stdafx.h"
#define SafeDelete(a) \
{ \
delete (a); \
a = nullptr; \
}
#define SafeDeleteArray(a) \
{ \
delete[](a); \
a = nullptr; \
}
#define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
#define DegToRad(a) ((M_PI / 180.0) * (a)) //(a) w nawiasie, bo może być dodawaniem
@@ -31,9 +20,22 @@ http://mozilla.org/MPL/2.0/.
#define asSceneryPath std::string("scenery\\")
#define szSceneryPath "scenery\\"
#define szTexturePath "textures\\"
#define szSoundPath "sounds\\"
#define MAKE_ID4(a,b,c,d) (((std::uint32_t)(d)<<24)|((std::uint32_t)(c)<<16)|((std::uint32_t)(b)<<8)|(std::uint32_t)(a))
template <typename _Type>
void SafeDelete( _Type &Pointer ) {
delete Pointer;
Pointer = nullptr;
}
template <typename _Type>
void SafeDeleteArray( _Type &Pointer ) {
delete[] Pointer;
Pointer = nullptr;
}
template <typename _Type>
_Type
clamp( _Type const Value, _Type const Min, _Type const Max ) {